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

Unified Diff: Source/core/layout/LayoutBoxModelObject.cpp

Issue 1043643002: Switch line layout to LayoutUnit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More TestExpectations tweaks Created 5 years, 7 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 | « Source/core/layout/LayoutBox.cpp ('k') | Source/core/layout/LayoutDeprecatedFlexibleBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutBoxModelObject.cpp
diff --git a/Source/core/layout/LayoutBoxModelObject.cpp b/Source/core/layout/LayoutBoxModelObject.cpp
index a1c4e4474400ed203df6ee7e345912cc5a26177a..b82d053b67fbd5e03673e2ab8e59a7425c382031 100644
--- a/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/Source/core/layout/LayoutBoxModelObject.cpp
@@ -819,17 +819,17 @@ LayoutRect LayoutBoxModelObject::localCaretRectForEmptyElement(LayoutUnit width,
x -= textIndentOffset / 2;
break;
case AlignRight:
- x = maxX - caretWidth;
+ x = maxX - caretWidth();
if (!currentStyle.isLeftToRightDirection())
x -= textIndentOffset;
break;
}
- x = std::min(x, std::max<LayoutUnit>(maxX - caretWidth, 0));
+ x = std::min(x, std::max<LayoutUnit>(maxX - caretWidth(), 0));
LayoutUnit height = style()->fontMetrics().height();
LayoutUnit verticalSpace = lineHeight(true, currentStyle.isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes) - height;
LayoutUnit y = paddingTop() + borderTop() + (verticalSpace / 2);
- return currentStyle.isHorizontalWritingMode() ? LayoutRect(x, y, caretWidth, height) : LayoutRect(y, x, height, caretWidth);
+ return currentStyle.isHorizontalWritingMode() ? LayoutRect(x, y, caretWidth(), height) : LayoutRect(y, x, height, caretWidth());
}
void LayoutBoxModelObject::mapAbsoluteToLocalPoint(MapCoordinatesFlags mode, TransformState& transformState) const
« no previous file with comments | « Source/core/layout/LayoutBox.cpp ('k') | Source/core/layout/LayoutDeprecatedFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698