Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(688)

Unified Diff: third_party/WebKit/Source/web/WebRange.cpp

Issue 2704933006: Expand FrameSeleciton::rootEditableElement() to increase chances of hoisting update layout (Closed)
Patch Set: 2017-02-21T15:42:51 Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/WebRange.cpp
diff --git a/third_party/WebKit/Source/web/WebRange.cpp b/third_party/WebKit/Source/web/WebRange.cpp
index e3194e31c2d3864593820b8418611c563795ef58..803d8429d7e625dd7e1646887933663fa22a3382 100644
--- a/third_party/WebKit/Source/web/WebRange.cpp
+++ b/third_party/WebKit/Source/web/WebRange.cpp
@@ -61,7 +61,9 @@ WebRange::WebRange(const PlainTextRange& range) {
}
EphemeralRange WebRange::createEphemeralRange(LocalFrame* frame) const {
- Element* selectionRoot = frame->selection().rootEditableElement();
+ Element* selectionRoot = frame->selection()
+ .computeVisibleSelectionInDOMTreeDeprecated()
+ .rootEditableElement();
ContainerNode* scope =
selectionRoot ? selectionRoot : frame->document()->documentElement();
« no previous file with comments | « third_party/WebKit/Source/core/page/DragController.cpp ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698