Chromium Code Reviews (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out

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

Issue 2845493002: [LayoutNG] Fix empty inlines to influence the used line height (Closed)
Patch Set: Mark failure in a test in CSS2/normal-flow Created 3 years, 8 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 e3675e189f5cd7b461ba08e72230a922c6cd72d9..9a52e3958134282a9056c8380491c9b242aa94b8 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
@@ -40,7 +40,11 @@ struct NGInlineBoxState {
bool include_used_fonts = false;
// Compute text metrics for a box. All text in a box share the same metrics.
- void ComputeTextMetrics(const NGInlineItem&, FontBaseline);
+ void ComputeTextMetrics(const ComputedStyle& style, FontBaseline);
+ void AccumulateUsedFonts(const NGInlineItem&,
+ unsigned start,
+ unsigned end,
+ FontBaseline);
// Represents the inline tree structure. This class provides:
@@ -49,9 +53,12 @@ struct NGInlineBoxState {
// 3) Cache common values for a box.
class NGInlineLayoutStateStack {
+ // The box state for the line box.
+ NGInlineBoxState& LineBoxState() { return stack_.front(); }
// Initialize the box state stack for a new line.
// @return The initial box state for the line.
- NGInlineBoxState* OnBeginPlaceItems(const ComputedStyle*);
+ NGInlineBoxState* OnBeginPlaceItems(const ComputedStyle*, FontBaseline);
// Push a box state stack.
NGInlineBoxState* OnOpenTag(const NGInlineItem&,

Powered by Google App Engine
This is Rietveld 408576698