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

Unified Diff: sky/engine/core/rendering/RenderBlockFlow.h

Issue 751483002: Fix bug from 3db9471ae80bd492f2a346113d2323ba8eee0c09. (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/RenderBlockFlow.h
diff --git a/sky/engine/core/rendering/RenderBlockFlow.h b/sky/engine/core/rendering/RenderBlockFlow.h
index 514638b016b2723143a1a49a27bb6790799513dc..fdd8bad5604c76ee6e4f18c3eed402d54760ed15 100644
--- a/sky/engine/core/rendering/RenderBlockFlow.h
+++ b/sky/engine/core/rendering/RenderBlockFlow.h
@@ -65,11 +65,17 @@ public:
}
LayoutUnit logicalRightOffsetForLine(bool shouldIndentText) const
{
- return logicalRightOffsetForLine(logicalRightOffsetForContent(), shouldIndentText);
+ LayoutUnit right = logicalRightOffsetForContent();
+ if (shouldIndentText && !style()->isLeftToRightDirection())
+ right -= textIndentOffset();
+ return right;
}
LayoutUnit logicalLeftOffsetForLine(bool shouldIndentText) const
{
- return logicalLeftOffsetForLine(logicalLeftOffsetForContent(), shouldIndentText);
+ LayoutUnit left = logicalLeftOffsetForContent();
+ if (shouldIndentText && style()->isLeftToRightDirection())
+ left += textIndentOffset();
+ return left;
}
LayoutUnit startOffsetForLine(bool shouldIndentText) const
{
@@ -125,21 +131,6 @@ protected:
void determineLogicalLeftPositionForChild(RenderBox* child);
private:
- LayoutUnit logicalRightOffsetForLine(LayoutUnit fixedOffset, bool applyTextIndent) const
- {
- LayoutUnit right = fixedOffset;
- if (applyTextIndent && !style()->isLeftToRightDirection())
- right -= textIndentOffset();
- return right;
- }
- LayoutUnit logicalLeftOffsetForLine(LayoutUnit fixedOffset, bool applyTextIndent) const
- {
- LayoutUnit left = fixedOffset;
- if (applyTextIndent && style()->isLeftToRightDirection())
- left += textIndentOffset();
- return left;
- }
-
void layoutBlockFlow(bool relayoutChildren, SubtreeLayoutScope&);
void layoutBlockChildren(bool relayoutChildren, SubtreeLayoutScope&, LayoutUnit beforeEdge, LayoutUnit afterEdge);

Powered by Google App Engine
This is Rietveld 408576698