Commit caac6351 authored by Scott Violet's avatar Scott Violet Committed by Chromium LUCI CQ

blink: converts some usage of HasNonVisibleOverflow()

I believe these should all be converted to other more appropriate
conditionals.

BUG=none
TEST=covered by other tests

Change-Id: Ibd81116aa800ce25876fe3816569b71139007b92
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2631350
Commit-Queue: Scott Violet <sky@chromium.org>
Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#844276}
parent f97b868b
......@@ -800,7 +800,7 @@ TEST_F(ScrollTimelineTest, MultipleScrollOffsetsCurrentTimeCalculations) {
auto* scroller =
To<LayoutBoxModelObject>(GetLayoutObjectByElementId("scroller"));
ASSERT_TRUE(scroller);
ASSERT_TRUE(scroller->HasNonVisibleOverflow());
ASSERT_TRUE(scroller->IsScrollContainer());
PaintLayerScrollableArea* scrollable_area = scroller->GetScrollableArea();
ASSERT_TRUE(scrollable_area);
double time_range = 100.0;
......
......@@ -603,7 +603,7 @@ void LayoutListItem::UpdateOverflow() {
layout_block_object->AddLayoutOverflow(marker_rect);
}
if (object->HasNonVisibleOverflow())
if (object->ShouldClipOverflowAlongBothAxis())
break;
if (object->HasSelfPaintingLayer())
......
......@@ -588,7 +588,7 @@ bool LayoutObject::HasClipRelatedProperty() const {
// CSS clip-path/mask/filter induces a stacking context and applies inherited
// clip to that stacking context, while resetting clip for descendants. This
// special behavior is already handled elsewhere.
if (HasClip() || HasNonVisibleOverflow())
if (HasClip() || ShouldClipOverflowAlongEitherAxis())
return true;
// Paint containment establishes isolation which creates clip isolation nodes.
// Style & Layout containment also establish isolation (see
......@@ -1063,10 +1063,9 @@ static inline bool ObjectIsRelayoutBoundary(const LayoutObject* object) {
// In LayoutNG, if box has any OOF descendants, they are propagated to
// parent. Therefore, we must mark parent chain for layout.
if (const NGLayoutResult* layouot_result =
if (const NGLayoutResult* layout_result =
layout_box->GetCachedLayoutResult()) {
if (layouot_result->PhysicalFragment()
.HasOutOfFlowPositionedDescendants())
if (layout_result->PhysicalFragment().HasOutOfFlowPositionedDescendants())
return false;
}
}
......@@ -1092,7 +1091,7 @@ static inline bool ObjectIsRelayoutBoundary(const LayoutObject* object) {
if (object->IsTextControlIncludingNG())
return true;
if (!object->HasNonVisibleOverflow())
if (!object->ShouldClipOverflowAlongBothAxis())
return false;
// Scrollbar parts can be removed during layout. Avoid the complexity of
......@@ -2699,7 +2698,7 @@ void LayoutObject::SetScrollAnchorDisablingStyleChangedOnAncestor() {
Element* viewport_defining_element = GetDocument().ViewportDefiningElement();
while (object) {
auto* block = DynamicTo<LayoutBlock>(object);
if (block && (block->HasNonVisibleOverflow() ||
if (block && (block->IsScrollContainer() ||
block->GetNode() == viewport_defining_element)) {
block->SetScrollAnchorDisablingStyleChanged(true);
return;
......
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