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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp

Issue 2931563002: [LayoutNG] Implement 'text-align-last' (Closed)
Patch Set: Rebase Created 3 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 | « no previous file | third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item_result.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
index 78a1208c509d74d9b31d70bb57ff2d9bc7540dda..107aa301e85e2418dd4c839cad6386c9b6f11942 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
@@ -361,31 +361,7 @@ RootInlineBox* LayoutBlockFlow::ConstructLine(BidiRunList<BidiRun>& bidi_runs,
ETextAlign LayoutBlockFlow::TextAlignmentForLine(
bool ends_with_soft_break) const {
- ETextAlign alignment = Style()->GetTextAlign();
- if (ends_with_soft_break)
- return alignment;
-
- ETextAlignLast alignment_last = Style()->TextAlignLast();
- switch (alignment_last) {
- case ETextAlignLast::kStart:
- return ETextAlign::kStart;
- case ETextAlignLast::kEnd:
- return ETextAlign::kEnd;
- case ETextAlignLast::kLeft:
- return ETextAlign::kLeft;
- case ETextAlignLast::kRight:
- return ETextAlign::kRight;
- case ETextAlignLast::kCenter:
- return ETextAlign::kCenter;
- case ETextAlignLast::kJustify:
- return ETextAlign::kJustify;
- case ETextAlignLast::kAuto:
- if (alignment == ETextAlign::kJustify)
- return ETextAlign::kStart;
- return alignment;
- }
-
- return alignment;
+ return Style()->GetTextAlign(!ends_with_soft_break);
}
static bool TextAlignmentNeedsTrailingSpace(ETextAlign text_align,
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item_result.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698