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

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

Issue 1308323004: Introduce absoluteCaretBoundsOf() for VisiblePosition (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-28T19:12:35 Rebase Created 5 years, 4 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
« no previous file with comments | « no previous file | Source/core/editing/GranularityStrategy.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/FrameSelection.cpp
diff --git a/Source/core/editing/FrameSelection.cpp b/Source/core/editing/FrameSelection.cpp
index 8863a3c8ef46838b472d7fd36c17b21516712458..68a830f352cda03541b0d79c02da19dea8160fba 100644
--- a/Source/core/editing/FrameSelection.cpp
+++ b/Source/core/editing/FrameSelection.cpp
@@ -1095,7 +1095,7 @@ bool FrameSelection::modify(EAlteration alter, SelectionDirection direction, Tex
// FIXME: Maybe baseline would be better?
static bool absoluteCaretY(const VisiblePosition &c, int &y)
{
- IntRect rect = c.absoluteCaretBounds();
+ IntRect rect = absoluteCaretBoundsOf(c);
if (rect.isEmpty())
return false;
y = rect.y() + rect.height() / 2;
@@ -1861,7 +1861,7 @@ void FrameSelection::revealSelection(const ScrollAlignment& alignment, RevealExt
rect = LayoutRect(absoluteCaretBounds());
break;
case RangeSelection:
- rect = LayoutRect(revealExtentOption == RevealExtent ? VisiblePosition(extent()).absoluteCaretBounds() : enclosingIntRect(unclippedBounds()));
+ rect = LayoutRect(revealExtentOption == RevealExtent ? absoluteCaretBoundsOf(VisiblePosition(extent())) : enclosingIntRect(unclippedBounds()));
break;
}
« no previous file with comments | « no previous file | Source/core/editing/GranularityStrategy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698