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

Unified Diff: third_party/WebKit/Source/core/editing/FrameSelection.cpp

Issue 2709943004: Expand FrameSeleciton::extent() to increase chances of hoisting update layout (Closed)
Patch Set: 2017-02-23T18:48:11 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/core/editing/FrameSelection.cpp
diff --git a/third_party/WebKit/Source/core/editing/FrameSelection.cpp b/third_party/WebKit/Source/core/editing/FrameSelection.cpp
index e64e78de969f5615c9e4ab38f5702af910c7b31b..cda12879ea7be1f8a09c73aa9f581a9e1edebc66 100644
--- a/third_party/WebKit/Source/core/editing/FrameSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/FrameSelection.cpp
@@ -977,10 +977,10 @@ void FrameSelection::revealSelection(const ScrollAlignment& alignment,
rect = LayoutRect(absoluteCaretBounds());
break;
case RangeSelection:
- rect = LayoutRect(
- revealExtentOption == RevealExtent
- ? absoluteCaretBoundsOf(createVisiblePosition(extent()))
- : enclosingIntRect(unclippedBounds()));
+ rect = LayoutRect(revealExtentOption == RevealExtent
+ ? absoluteCaretBoundsOf(createVisiblePosition(
+ computeVisibleSelectionInDOMTree().extent()))
+ : enclosingIntRect(unclippedBounds()));
break;
}

Powered by Google App Engine
This is Rietveld 408576698