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

Unified Diff: third_party/WebKit/Source/core/layout/ng/inline/ng_inline_box_state.h

Issue 2931363002: [LayoutNG] More precise checks for empty inline and add test (Closed)
Patch Set: ikilpatrick review 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_box_state.h
diff --git a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_box_state.h b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_box_state.h
index 4e24390b7ceb91c28f41b94596297edde6e95931..cbc48e713252acc00613b2d0171d278c0895d554 100644
--- a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_box_state.h
+++ b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_box_state.h
@@ -51,6 +51,7 @@ struct NGInlineBoxState {
Vector<NGPendingPositions> pending_descendants;
bool include_used_fonts = false;
bool needs_box_fragment = false;
+ bool needs_box_fragment_when_empty = false;
// Compute text metrics for a box. All text in a box share the same metrics.
void ComputeTextMetrics(const ComputedStyle& style, FontBaseline);
@@ -60,9 +61,7 @@ struct NGInlineBoxState {
FontBaseline);
// Create a box fragment for this box.
- void SetNeedsBoxFragment(const NGInlineItem&,
- const NGInlineItemResult&,
- LayoutUnit position);
+ void SetNeedsBoxFragment(bool when_empty);
void SetLineRightForBoxFragment(const NGInlineItem&,
const NGInlineItemResult&,
LayoutUnit position);
@@ -82,7 +81,10 @@ class NGInlineLayoutStateStack {
NGInlineBoxState* OnBeginPlaceItems(const ComputedStyle*, FontBaseline);
// Push a box state stack.
- NGInlineBoxState* OnOpenTag(const NGInlineItem&, NGLineBoxFragmentBuilder*);
+ NGInlineBoxState* OnOpenTag(const NGInlineItem&,
+ const NGInlineItemResult&,
+ NGLineBoxFragmentBuilder*,
+ LayoutUnit position);
// Pop a box state stack.
NGInlineBoxState* OnCloseTag(const NGInlineItem&,

Powered by Google App Engine
This is Rietveld 408576698