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

Unified Diff: sky/engine/core/rendering/RootInlineBox.cpp

Issue 692563004: Remove more support for floats from RenderBlockFlow. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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: sky/engine/core/rendering/RootInlineBox.cpp
diff --git a/sky/engine/core/rendering/RootInlineBox.cpp b/sky/engine/core/rendering/RootInlineBox.cpp
index 1bc05b68333e57d6d365e8abeccd37a91478849e..57cbe83be8cef04f22bbc98ddcc0500aa264c85b 100644
--- a/sky/engine/core/rendering/RootInlineBox.cpp
+++ b/sky/engine/core/rendering/RootInlineBox.cpp
@@ -379,20 +379,7 @@ LayoutUnit RootInlineBox::selectionTop() const
if (!prevRootBox())
return selectionTop;
- LayoutUnit prevBottom = prevRootBox()->selectionBottom();
- if (prevBottom < selectionTop && block().containsFloats()) {
- // This line has actually been moved further down, probably from a large line-height, but possibly because the
- // line was forced to clear floats. If so, let's check the offsets, and only be willing to use the previous
- // line's bottom if the offsets are greater on both sides.
- LayoutUnit prevLeft = block().logicalLeftOffsetForLine(prevBottom, false);
- LayoutUnit prevRight = block().logicalRightOffsetForLine(prevBottom, false);
- LayoutUnit newLeft = block().logicalLeftOffsetForLine(selectionTop, false);
- LayoutUnit newRight = block().logicalRightOffsetForLine(selectionTop, false);
- if (prevLeft > newLeft || prevRight < newRight)
- return selectionTop;
- }
-
- return prevBottom;
+ return prevRootBox()->selectionBottom();
}
LayoutUnit RootInlineBox::selectionTopAdjustedForPrecedingBlock() const
« sky/engine/core/rendering/RenderBlockFlow.cpp ('K') | « sky/engine/core/rendering/RenderBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698