diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-07-16 11:45:35 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-07-17 08:59:23 +0000 |
commit | 552906b0f222c5d5dd11b9fd73829d510980461a (patch) | |
tree | 3a11e6ed0538a81dd83b20cf3a4783e297f26d91 /chromium/third_party/blink/renderer/core/editing/editing_utilities.cc | |
parent | 1b05827804eaf047779b597718c03e7d38344261 (diff) | |
download | qtwebengine-chromium-552906b0f222c5d5dd11b9fd73829d510980461a.tar.gz |
BASELINE: Update Chromium to 83.0.4103.122
Change-Id: Ie3a82f5bb0076eec2a7c6a6162326b4301ee291e
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/core/editing/editing_utilities.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/core/editing/editing_utilities.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/chromium/third_party/blink/renderer/core/editing/editing_utilities.cc b/chromium/third_party/blink/renderer/core/editing/editing_utilities.cc index 6def00469d7..d198257b409 100644 --- a/chromium/third_party/blink/renderer/core/editing/editing_utilities.cc +++ b/chromium/third_party/blink/renderer/core/editing/editing_utilities.cc @@ -64,6 +64,7 @@ #include "third_party/blink/renderer/core/html/html_span_element.h" #include "third_party/blink/renderer/core/html/html_table_cell_element.h" #include "third_party/blink/renderer/core/html/html_ulist_element.h" +#include "third_party/blink/renderer/core/html/image_document.h" #include "third_party/blink/renderer/core/html/parser/html_parser_idioms.h" #include "third_party/blink/renderer/core/html_element_factory.h" #include "third_party/blink/renderer/core/html_names.h" @@ -1246,7 +1247,7 @@ bool IsDisplayInsideTable(const Node* node) { bool IsTableCell(const Node* node) { DCHECK(node); LayoutObject* r = node->GetLayoutObject(); - return r ? r->IsTableCell() : IsHTMLTableCellElement(*node); + return r ? r->IsTableCell() : IsA<HTMLTableCellElement>(*node); } HTMLElement* CreateDefaultParagraphElement(Document& document) { @@ -1580,7 +1581,7 @@ FloatQuad LocalToAbsoluteQuadOf(const LocalCaretRect& caret_rect) { const StaticRangeVector* TargetRangesForInputEvent(const Node& node) { // TODO(editing-dev): The use of UpdateStyleAndLayout // needs to be audited. see http://crbug.com/590369 for more details. - node.GetDocument().UpdateStyleAndLayout(); + node.GetDocument().UpdateStyleAndLayout(DocumentUpdateReason::kEditing); if (!HasRichlyEditableStyle(node)) return nullptr; const EphemeralRange& range = @@ -1725,15 +1726,16 @@ AtomicString GetUrlStringFromNode(const Node& node) { return AtomicString(); } -void WriteImageNodeToClipboard(const Node& node, const String& title) { +void WriteImageNodeToClipboard(SystemClipboard& system_clipboard, + const Node& node, + const String& title) { const scoped_refptr<Image> image = ImageFromNode(node); if (!image.get()) return; const KURL url_string = node.GetDocument().CompleteURL( StripLeadingAndTrailingHTMLSpaces(GetUrlStringFromNode(node))); - SystemClipboard::GetInstance().WriteImageWithTag(image.get(), url_string, - title); - SystemClipboard::GetInstance().CommitWrite(); + system_clipboard.WriteImageWithTag(image.get(), url_string, title); + system_clipboard.CommitWrite(); } Element* FindEventTargetFrom(LocalFrame& frame, @@ -1749,7 +1751,7 @@ Element* FindEventTargetFrom(LocalFrame& frame, HTMLImageElement* ImageElementFromImageDocument(const Document* document) { if (!document) return nullptr; - if (!document->IsImageDocument()) + if (!IsA<ImageDocument>(document)) return nullptr; const HTMLElement* const body = document->body(); |