Commit 6e5d92ef authored by Aleks Totic's avatar Aleks Totic Committed by Commit Bot

[LayoutNG] remove unused TriggerScrollbars from ConstraintSpace

Unfortunatelly, handling scrollbars in NG is delayed to next milestone.

Bug: 635619
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I50ba6eb28ed040da2cbb8857c1b3eb84c3a609a3
Reviewed-on: https://chromium-review.googlesource.com/1053298Reviewed-by: default avatarChristian Biesinger <cbiesinger@chromium.org>
Commit-Queue: Aleks Totic <atotic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557432}
parent bb82ff6a
...@@ -29,8 +29,6 @@ NGConstraintSpace::NGConstraintSpace( ...@@ -29,8 +29,6 @@ NGConstraintSpace::NGConstraintSpace(
bool is_fixed_size_block, bool is_fixed_size_block,
bool fixed_size_block_is_definite, bool fixed_size_block_is_definite,
bool is_shrink_to_fit, bool is_shrink_to_fit,
bool is_inline_direction_triggers_scrollbar,
bool is_block_direction_triggers_scrollbar,
NGFragmentationType block_direction_fragmentation_type, NGFragmentationType block_direction_fragmentation_type,
bool separate_leading_fragmentainer_margins, bool separate_leading_fragmentainer_margins,
bool is_new_fc, bool is_new_fc,
...@@ -54,10 +52,6 @@ NGConstraintSpace::NGConstraintSpace( ...@@ -54,10 +52,6 @@ NGConstraintSpace::NGConstraintSpace(
is_fixed_size_block_(is_fixed_size_block), is_fixed_size_block_(is_fixed_size_block),
fixed_size_block_is_definite_(fixed_size_block_is_definite), fixed_size_block_is_definite_(fixed_size_block_is_definite),
is_shrink_to_fit_(is_shrink_to_fit), is_shrink_to_fit_(is_shrink_to_fit),
is_inline_direction_triggers_scrollbar_(
is_inline_direction_triggers_scrollbar),
is_block_direction_triggers_scrollbar_(
is_block_direction_triggers_scrollbar),
block_direction_fragmentation_type_(block_direction_fragmentation_type), block_direction_fragmentation_type_(block_direction_fragmentation_type),
separate_leading_fragmentainer_margins_( separate_leading_fragmentainer_margins_(
separate_leading_fragmentainer_margins), separate_leading_fragmentainer_margins),
...@@ -177,10 +171,6 @@ scoped_refptr<NGConstraintSpace> NGConstraintSpace::CreateFromLayoutObject( ...@@ -177,10 +171,6 @@ scoped_refptr<NGConstraintSpace> NGConstraintSpace::CreateFromLayoutObject(
return builder.SetAvailableSize(available_size) return builder.SetAvailableSize(available_size)
.SetPercentageResolutionSize(percentage_size) .SetPercentageResolutionSize(percentage_size)
.SetIsInlineDirectionTriggersScrollbar(
box.StyleRef().OverflowInlineDirection() == EOverflow::kAuto)
.SetIsBlockDirectionTriggersScrollbar(
box.StyleRef().OverflowBlockDirection() == EOverflow::kAuto)
.SetIsFixedSizeInline(fixed_inline) .SetIsFixedSizeInline(fixed_inline)
.SetIsFixedSizeBlock(fixed_block) .SetIsFixedSizeBlock(fixed_block)
.SetFixedSizeBlockIsDefinite(fixed_block_is_definite) .SetFixedSizeBlockIsDefinite(fixed_block_is_definite)
...@@ -230,10 +220,6 @@ bool NGConstraintSpace::operator==(const NGConstraintSpace& other) const { ...@@ -230,10 +220,6 @@ bool NGConstraintSpace::operator==(const NGConstraintSpace& other) const {
is_fixed_size_inline_ == other.is_fixed_size_inline_ && is_fixed_size_inline_ == other.is_fixed_size_inline_ &&
is_fixed_size_block_ == other.is_fixed_size_block_ && is_fixed_size_block_ == other.is_fixed_size_block_ &&
is_shrink_to_fit_ == other.is_shrink_to_fit_ && is_shrink_to_fit_ == other.is_shrink_to_fit_ &&
is_inline_direction_triggers_scrollbar_ ==
other.is_inline_direction_triggers_scrollbar_ &&
is_block_direction_triggers_scrollbar_ ==
other.is_block_direction_triggers_scrollbar_ &&
block_direction_fragmentation_type_ == block_direction_fragmentation_type_ ==
other.block_direction_fragmentation_type_ && other.block_direction_fragmentation_type_ &&
is_new_fc_ == other.is_new_fc_ && is_new_fc_ == other.is_new_fc_ &&
......
...@@ -116,18 +116,6 @@ class CORE_EXPORT NGConstraintSpace final ...@@ -116,18 +116,6 @@ class CORE_EXPORT NGConstraintSpace final
// Also note this is true only when the document has ':first-line' rules. // Also note this is true only when the document has ':first-line' rules.
bool UseFirstLineStyle() const { return use_first_line_style_; } bool UseFirstLineStyle() const { return use_first_line_style_; }
// Whether exceeding the AvailableSize() triggers the presence of a scrollbar
// for the indicated direction.
// If exceeded the current layout should be aborted and invoked again with a
// constraint space modified to reserve space for a scrollbar.
bool IsInlineDirectionTriggersScrollbar() const {
return is_inline_direction_triggers_scrollbar_;
}
bool IsBlockDirectionTriggersScrollbar() const {
return is_block_direction_triggers_scrollbar_;
}
// Some layout modes “stretch” their children to a fixed size (e.g. flex, // Some layout modes “stretch” their children to a fixed size (e.g. flex,
// grid). These flags represented whether a layout needs to produce a // grid). These flags represented whether a layout needs to produce a
// fragment that satisfies a fixed constraint in the inline and block // fragment that satisfies a fixed constraint in the inline and block
...@@ -235,8 +223,6 @@ class CORE_EXPORT NGConstraintSpace final ...@@ -235,8 +223,6 @@ class CORE_EXPORT NGConstraintSpace final
bool is_fixed_size_block, bool is_fixed_size_block,
bool fixed_size_block_is_definite, bool fixed_size_block_is_definite,
bool is_shrink_to_fit, bool is_shrink_to_fit,
bool is_inline_direction_triggers_scrollbar,
bool is_block_direction_triggers_scrollbar,
NGFragmentationType block_direction_fragmentation_type, NGFragmentationType block_direction_fragmentation_type,
bool separate_leading_fragmentainer_margins_, bool separate_leading_fragmentainer_margins_,
bool is_new_fc, bool is_new_fc,
...@@ -264,9 +250,6 @@ class CORE_EXPORT NGConstraintSpace final ...@@ -264,9 +250,6 @@ class CORE_EXPORT NGConstraintSpace final
unsigned is_shrink_to_fit_ : 1; unsigned is_shrink_to_fit_ : 1;
unsigned is_inline_direction_triggers_scrollbar_ : 1;
unsigned is_block_direction_triggers_scrollbar_ : 1;
unsigned block_direction_fragmentation_type_ : 2; unsigned block_direction_fragmentation_type_ : 2;
unsigned separate_leading_fragmentainer_margins_ : 1; unsigned separate_leading_fragmentainer_margins_ : 1;
......
...@@ -25,8 +25,6 @@ NGConstraintSpaceBuilder::NGConstraintSpaceBuilder(WritingMode writing_mode, ...@@ -25,8 +25,6 @@ NGConstraintSpaceBuilder::NGConstraintSpaceBuilder(WritingMode writing_mode,
is_fixed_size_block_(false), is_fixed_size_block_(false),
fixed_size_block_is_definite_(true), fixed_size_block_is_definite_(true),
is_shrink_to_fit_(false), is_shrink_to_fit_(false),
is_inline_direction_triggers_scrollbar_(false),
is_block_direction_triggers_scrollbar_(false),
fragmentation_type_(kFragmentNone), fragmentation_type_(kFragmentNone),
separate_leading_fragmentainer_margins_(false), separate_leading_fragmentainer_margins_(false),
is_new_fc_(false), is_new_fc_(false),
...@@ -108,22 +106,6 @@ NGConstraintSpaceBuilder& NGConstraintSpaceBuilder::SetIsShrinkToFit( ...@@ -108,22 +106,6 @@ NGConstraintSpaceBuilder& NGConstraintSpaceBuilder::SetIsShrinkToFit(
return *this; return *this;
} }
NGConstraintSpaceBuilder&
NGConstraintSpaceBuilder::SetIsInlineDirectionTriggersScrollbar(
bool is_inline_direction_triggers_scrollbar) {
is_inline_direction_triggers_scrollbar_ =
is_inline_direction_triggers_scrollbar;
return *this;
}
NGConstraintSpaceBuilder&
NGConstraintSpaceBuilder::SetIsBlockDirectionTriggersScrollbar(
bool is_block_direction_triggers_scrollbar) {
is_block_direction_triggers_scrollbar_ =
is_block_direction_triggers_scrollbar;
return *this;
}
NGConstraintSpaceBuilder& NGConstraintSpaceBuilder::SetFragmentationType( NGConstraintSpaceBuilder& NGConstraintSpaceBuilder::SetFragmentationType(
NGFragmentationType fragmentation_type) { NGFragmentationType fragmentation_type) {
fragmentation_type_ = fragmentation_type; fragmentation_type_ = fragmentation_type;
...@@ -230,8 +212,6 @@ scoped_refptr<NGConstraintSpace> NGConstraintSpaceBuilder::ToConstraintSpace( ...@@ -230,8 +212,6 @@ scoped_refptr<NGConstraintSpace> NGConstraintSpaceBuilder::ToConstraintSpace(
initial_containing_block_size_, fragmentainer_block_size_, initial_containing_block_size_, fragmentainer_block_size_,
fragmentainer_space_at_bfc_start_, is_fixed_size_inline_, fragmentainer_space_at_bfc_start_, is_fixed_size_inline_,
is_fixed_size_block_, fixed_size_block_is_definite_, is_shrink_to_fit_, is_fixed_size_block_, fixed_size_block_is_definite_, is_shrink_to_fit_,
is_inline_direction_triggers_scrollbar_,
is_block_direction_triggers_scrollbar_,
static_cast<NGFragmentationType>(fragmentation_type_), static_cast<NGFragmentationType>(fragmentation_type_),
separate_leading_fragmentainer_margins_, is_new_fc_, is_anonymous_, separate_leading_fragmentainer_margins_, is_new_fc_, is_anonymous_,
use_first_line_style_, adjoining_floats_, margin_strut, bfc_offset, use_first_line_style_, adjoining_floats_, margin_strut, bfc_offset,
...@@ -245,8 +225,6 @@ scoped_refptr<NGConstraintSpace> NGConstraintSpaceBuilder::ToConstraintSpace( ...@@ -245,8 +225,6 @@ scoped_refptr<NGConstraintSpace> NGConstraintSpaceBuilder::ToConstraintSpace(
initial_containing_block_size_, fragmentainer_block_size_, initial_containing_block_size_, fragmentainer_block_size_,
fragmentainer_space_at_bfc_start_, is_fixed_size_block_, fragmentainer_space_at_bfc_start_, is_fixed_size_block_,
is_fixed_size_inline_, true, is_shrink_to_fit_, is_fixed_size_inline_, true, is_shrink_to_fit_,
is_block_direction_triggers_scrollbar_,
is_inline_direction_triggers_scrollbar_,
static_cast<NGFragmentationType>(fragmentation_type_), static_cast<NGFragmentationType>(fragmentation_type_),
separate_leading_fragmentainer_margins_, is_new_fc_, is_anonymous_, separate_leading_fragmentainer_margins_, is_new_fc_, is_anonymous_,
use_first_line_style_, adjoining_floats_, margin_strut, bfc_offset, use_first_line_style_, adjoining_floats_, margin_strut, bfc_offset,
......
...@@ -49,11 +49,6 @@ class CORE_EXPORT NGConstraintSpaceBuilder final { ...@@ -49,11 +49,6 @@ class CORE_EXPORT NGConstraintSpaceBuilder final {
NGConstraintSpaceBuilder& SetIsShrinkToFit(bool shrink_to_fit); NGConstraintSpaceBuilder& SetIsShrinkToFit(bool shrink_to_fit);
NGConstraintSpaceBuilder& SetIsInlineDirectionTriggersScrollbar(
bool is_inline_direction_triggers_scrollbar);
NGConstraintSpaceBuilder& SetIsBlockDirectionTriggersScrollbar(
bool is_block_direction_triggers_scrollbar);
NGConstraintSpaceBuilder& SetFragmentationType(NGFragmentationType); NGConstraintSpaceBuilder& SetFragmentationType(NGFragmentationType);
NGConstraintSpaceBuilder& SetSeparateLeadingFragmentainerMargins(bool val) { NGConstraintSpaceBuilder& SetSeparateLeadingFragmentainerMargins(bool val) {
...@@ -109,8 +104,6 @@ class CORE_EXPORT NGConstraintSpaceBuilder final { ...@@ -109,8 +104,6 @@ class CORE_EXPORT NGConstraintSpaceBuilder final {
unsigned is_fixed_size_block_ : 1; unsigned is_fixed_size_block_ : 1;
unsigned fixed_size_block_is_definite_ : 1; unsigned fixed_size_block_is_definite_ : 1;
unsigned is_shrink_to_fit_ : 1; unsigned is_shrink_to_fit_ : 1;
unsigned is_inline_direction_triggers_scrollbar_ : 1;
unsigned is_block_direction_triggers_scrollbar_ : 1;
unsigned fragmentation_type_ : 2; unsigned fragmentation_type_ : 2;
unsigned separate_leading_fragmentainer_margins_ : 1; unsigned separate_leading_fragmentainer_margins_ : 1;
unsigned is_new_fc_ : 1; unsigned is_new_fc_ : 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment