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

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: 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
Index: Source/core/rendering/RenderBlockLineLayout.cpp
diff --git a/Source/core/rendering/RenderBlockLineLayout.cpp b/Source/core/rendering/RenderBlockLineLayout.cpp
index bf4ef4a89f934be907b19d5d2fdbbf6cfc5b95c5..7e3831d2ed55c887b829520464278ddba099de48 100644
--- a/Source/core/rendering/RenderBlockLineLayout.cpp
+++ b/Source/core/rendering/RenderBlockLineLayout.cpp
@@ -320,6 +320,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:
@@ -335,8 +338,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;

Powered by Google App Engine
This is Rietveld 408576698