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

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

Issue 2865903002: [LayoutNG] Inline margin/border/padding, inter-item breaking, and tests (Closed)
Patch Set: ikilpatrick review Created 3 years, 7 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.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item.cc b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item.cc
index 61a5e31a44e2df3f67200a3dd06c578ad7ba11b3..6db6e7004a781089eba567db8a89c7cb4e613996 100644
--- a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item.cc
+++ b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item.cc
@@ -4,6 +4,7 @@
#include "core/layout/ng/inline/ng_inline_item.h"
+#include "core/layout/LayoutInline.h"
#include "core/layout/LayoutObject.h"
#include "platform/fonts/CharacterRange.h"
#include "platform/fonts/shaping/ShapeResultBuffer.h"
@@ -123,6 +124,18 @@ void NGInlineItem::GetFallbackFonts(
shape_result_->FallbackFonts(fallback_fonts);
}
+bool NGInlineItem::HasStartEdge() const {
+ DCHECK(Type() == kOpenTag || Type() == kCloseTag);
+ // TODO(kojii): Should use break token when NG has its own tree building.
+ return !GetLayoutObject()->IsInlineElementContinuation();
+}
+
+bool NGInlineItem::HasEndEdge() const {
+ DCHECK(Type() == kOpenTag || Type() == kCloseTag);
+ // TODO(kojii): Should use break token when NG has its own tree building.
+ return !ToLayoutInline(GetLayoutObject())->Continuation();
+}
+
NGInlineItemRange::NGInlineItemRange(Vector<NGInlineItem>* items,
unsigned start_index,
unsigned end_index)

Powered by Google App Engine
This is Rietveld 408576698