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

Unified Diff: third_party/WebKit/Source/core/layout/line/RootInlineBox.cpp

Issue 1583783002: Use IndentTextOrNot instead of a bool (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@568851-2
Patch Set: Created 4 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/layout/line/RootInlineBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/line/RootInlineBox.cpp b/third_party/WebKit/Source/core/layout/line/RootInlineBox.cpp
index d8edbf355611ec057d251de3302230d4268b7f3e..cb9704fa7a7fcd691b052020ec8a12fb1ac114a0 100644
--- a/third_party/WebKit/Source/core/layout/line/RootInlineBox.cpp
+++ b/third_party/WebKit/Source/core/layout/line/RootInlineBox.cpp
@@ -389,10 +389,10 @@ LayoutUnit RootInlineBox::selectionTop() const
// 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);
+ LayoutUnit prevLeft = block().logicalLeftOffsetForLine(prevBottom, DoNotIndentText);
+ LayoutUnit prevRight = block().logicalRightOffsetForLine(prevBottom, DoNotIndentText);
+ LayoutUnit newLeft = block().logicalLeftOffsetForLine(selectionTop, DoNotIndentText);
+ LayoutUnit newRight = block().logicalRightOffsetForLine(selectionTop, DoNotIndentText);
if (prevLeft > newLeft || prevRight < newRight)
return selectionTop;
}
@@ -440,10 +440,10 @@ LayoutUnit RootInlineBox::selectionBottom() const
// The next line has actually been moved further over, 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 next
// line's top if the offsets are greater on both sides.
- LayoutUnit nextLeft = block().logicalLeftOffsetForLine(nextTop, false);
- LayoutUnit nextRight = block().logicalRightOffsetForLine(nextTop, false);
- LayoutUnit newLeft = block().logicalLeftOffsetForLine(selectionBottom, false);
- LayoutUnit newRight = block().logicalRightOffsetForLine(selectionBottom, false);
+ LayoutUnit nextLeft = block().logicalLeftOffsetForLine(nextTop, DoNotIndentText);
+ LayoutUnit nextRight = block().logicalRightOffsetForLine(nextTop, DoNotIndentText);
+ LayoutUnit newLeft = block().logicalLeftOffsetForLine(selectionBottom, DoNotIndentText);
+ LayoutUnit newRight = block().logicalRightOffsetForLine(selectionBottom, DoNotIndentText);
if (nextLeft > newLeft || nextRight < newRight)
return selectionBottom;
}

Powered by Google App Engine
This is Rietveld 408576698