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

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

Issue 2641053005: Brush up localSelectionRectOfPositionTemplate (Closed)
Patch Set: Created 3 years, 11 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/VisibleUnits.cpp
diff --git a/third_party/WebKit/Source/core/editing/VisibleUnits.cpp b/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
index 7551fa9aca421a97db3626f5ab5ffe45be2a8c94..63dfc47add6113e7ef59cbe2db62ed821a8af7f6 100644
--- a/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
+++ b/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
@@ -2564,10 +2564,10 @@ LayoutRect localSelectionRectOfPositionTemplate(
if (rect.isEmpty())
return rect;
- InlineBoxPosition boxPosition =
+ const InlineBoxPosition boxPosition =
computeInlineBoxPosition(position.position(), position.affinity());
- InlineTextBox* box = toInlineTextBox(boxPosition.inlineBox);
+ InlineBox* const box = boxPosition.inlineBox;
yosin_UTC9 2017/01/20 05:59:53 Please see also https://codereview.chromium.org/26
if (layoutObject->style()->isHorizontalWritingMode()) {
rect.setY(box->root().selectionTop());
rect.setHeight(box->root().selectionHeight());

Powered by Google App Engine
This is Rietveld 408576698