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

Unified Diff: Source/core/rendering/RenderBlockLineLayout.cpp

Issue 59753002: text-align-last only affect to the last line when text-align is justify. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Combining the two ref tests as one ref test Created 6 years, 6 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 | « LayoutTests/fast/css3-text/css3-text-align-last/text-align-last-start-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBlockLineLayout.cpp
diff --git a/Source/core/rendering/RenderBlockLineLayout.cpp b/Source/core/rendering/RenderBlockLineLayout.cpp
index e244d5419f4f10856babf460eb66c39debcabaf9..9f4ead1e58e89f0364a7821c8f25d19736ae1695 100644
--- a/Source/core/rendering/RenderBlockLineLayout.cpp
+++ b/Source/core/rendering/RenderBlockLineLayout.cpp
@@ -319,6 +319,9 @@ ETextAlign RenderBlockFlow::textAlignmentForLine(bool endsWithSoftBreak) const
if (!RuntimeEnabledFeatures::css3TextEnabled())
return (alignment == JUSTIFY) ? TASTART : alignment;
+ if (alignment != JUSTIFY)
+ return alignment;
+
TextAlignLast alignmentLast = style()->textAlignLast();
switch (alignmentLast) {
case TextAlignLastStart:
@@ -334,8 +337,6 @@ ETextAlign RenderBlockFlow::textAlignmentForLine(bool endsWithSoftBreak) const
case TextAlignLastJustify:
return JUSTIFY;
case TextAlignLastAuto:
- if (alignment != JUSTIFY)
- return alignment;
if (style()->textJustify() == TextJustifyDistribute)
return JUSTIFY;
return TASTART;
« no previous file with comments | « LayoutTests/fast/css3-text/css3-text-align-last/text-align-last-start-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698