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

Unified Diff: third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item_result.cc

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
Index: third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item_result.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item_result.cc b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item_result.cc
index 3c315cb33407504046ddc165dbeaa7a3d8e753ca..60c5bfbc5a44d175ea1fd90aa14daaed27e8a699 100644
--- a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item_result.cc
+++ b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item_result.cc
@@ -4,6 +4,8 @@
#include "core/layout/ng/inline/ng_inline_item_result.h"
+#include "core/layout/ng/inline/ng_inline_node.h"
+
namespace blink {
NGInlineItemResult::NGInlineItemResult() {}
@@ -17,4 +19,16 @@ NGInlineItemResult::NGInlineItemResult(unsigned index,
no_break_opportunities_inside(false),
prohibit_break_after(false) {}
+void NGLineInfo::SetLineStyle(const NGInlineNode& node, bool is_first_line) {
+ LayoutObject* layout_object = node.GetLayoutObject();
+ if (is_first_line &&
+ layout_object->GetDocument().GetStyleEngine().UsesFirstLineRules()) {
+ is_first_line_ = true;
+ line_style_ = layout_object->FirstLineStyle();
+ return;
+ }
+ is_first_line_ = false;
+ line_style_ = layout_object->Style();
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698