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

Unified Diff: Source/core/layout/LayoutBox.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/LayoutBlockFlowLine.cpp ('k') | Source/core/layout/LayoutBoxModelObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutBox.cpp
diff --git a/Source/core/layout/LayoutBox.cpp b/Source/core/layout/LayoutBox.cpp
index f66e84c78e83ee478e460df7504e5a0ca3d44d3f..0dc69e022b5e13d8e96858008db145adf629eb62 100644
--- a/Source/core/layout/LayoutBox.cpp
+++ b/Source/core/layout/LayoutBox.cpp
@@ -1728,7 +1728,7 @@ void LayoutBox::positionLineBox(InlineBox* box)
// our object was inline originally, since otherwise it would have ended up underneath
// the inlines.
RootInlineBox& root = box->root();
- root.block().setStaticInlinePositionForChild(*this, LayoutUnit::fromFloatRound(box->logicalLeft()));
+ root.block().setStaticInlinePositionForChild(*this, box->logicalLeft());
} else {
// Our object was a block originally, so we make our normal flow position be
// just below the line box (as though all the inlines that came before us got
@@ -1746,7 +1746,7 @@ void LayoutBox::positionLineBox(InlineBox* box)
} else if (isReplaced()) {
// FIXME: the call to roundedLayoutPoint() below is temporary and should be removed once
// the transition to LayoutUnit-based types is complete (crbug.com/321237)
- setLocationAndUpdateOverflowControlsIfNeeded(box->topLeft().roundedLayoutPoint());
+ setLocationAndUpdateOverflowControlsIfNeeded(box->topLeft());
setInlineBoxWrapper(box);
}
}
@@ -3797,11 +3797,11 @@ LayoutRect LayoutBox::localCaretRect(InlineBox* box, int caretOffset, LayoutUnit
// They never refer to children.
// FIXME: Paint the carets inside empty blocks differently than the carets before/after elements.
- LayoutRect rect(location(), LayoutSize(caretWidth, size().height()));
+ LayoutRect rect(location(), LayoutSize(caretWidth(), size().height()));
bool ltr = box ? box->isLeftToRightDirection() : style()->isLeftToRightDirection();
if ((!caretOffset) ^ ltr)
- rect.move(LayoutSize(size().width() - caretWidth, 0));
+ rect.move(LayoutSize(size().width() - caretWidth(), 0));
if (box) {
RootInlineBox& rootBox = box->root();
« no previous file with comments | « Source/core/layout/LayoutBlockFlowLine.cpp ('k') | Source/core/layout/LayoutBoxModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698