Changeset 260828 in webkit


Ignore:
Timestamp:
Apr 28, 2020 9:05:36 AM (4 years ago)
Author:
Antti Koivisto
Message:

msn.com: Header flickers when scrolling articles
https://bugs.webkit.org/show_bug.cgi?id=211126
<rdar://problem/56439177>

Reviewed by Simon Fraser.

Source/WebCore:

Test: compositing/fixed-with-clip-stability.html

In case of fixed positioned elements the decision to create backing depends on clip rect.
However RenderLayer::localClipRect() tests for backing in call to clippingRootForPainting(). This creates
instability since clipping depends on backing decision, and backing decision depends on clipping.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::localClipRect const):

Specifically the result of clipExceedsBounds test here is affected by computed offsetFromRoot:
"clipRect.contains(cssClipRect)" test fails for zero sized clips with different offsets.

Compute clipExceedsBounds by looking at the clip sizes only and ignoring the position (which should match).

LayoutTests:

  • compositing/fixed-with-clip-stability-expected.txt: Added.
  • compositing/fixed-with-clip-stability.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r260823 r260828  
     12020-04-28  Antti Koivisto  <antti@apple.com>
     2
     3        msn.com: Header flickers when scrolling articles
     4        https://bugs.webkit.org/show_bug.cgi?id=211126
     5        <rdar://problem/56439177>
     6
     7        Reviewed by Simon Fraser.
     8
     9        * compositing/fixed-with-clip-stability-expected.txt: Added.
     10        * compositing/fixed-with-clip-stability.html: Added.
     11
    1122020-04-28  Jason Lawrence  <lawrence.j@apple.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r260827 r260828  
     12020-04-28  Antti Koivisto  <antti@apple.com>
     2
     3        msn.com: Header flickers when scrolling articles
     4        https://bugs.webkit.org/show_bug.cgi?id=211126
     5        <rdar://problem/56439177>
     6
     7        Reviewed by Simon Fraser.
     8
     9        Test: compositing/fixed-with-clip-stability.html
     10
     11        In case of fixed positioned elements the decision to create backing depends on clip rect.
     12        However RenderLayer::localClipRect() tests for backing in call to clippingRootForPainting(). This creates
     13        instability since clipping depends on backing decision, and backing decision depends on clipping.
     14
     15        * rendering/RenderLayer.cpp:
     16        (WebCore::RenderLayer::localClipRect const):
     17
     18        Specifically the result of clipExceedsBounds test here is affected by computed offsetFromRoot:
     19        "clipRect.contains(cssClipRect)" test fails for zero sized clips with different offsets.
     20
     21        Compute clipExceedsBounds by looking at the clip sizes only and ignoring the position (which should match).
     22
    1232020-04-28  Zalan Bujtas  <zalan@apple.com>
    224
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r260774 r260828  
    59795979    if (renderer().hasClip()) {
    59805980        // CSS clip may be larger than our border box.
    5981         LayoutRect cssClipRect = downcast<RenderBox>(renderer()).clipRect(toLayoutPoint(offsetFromRoot), nullptr);
    5982         clipExceedsBounds = !clipRect.contains(cssClipRect);
     5981        LayoutRect cssClipRect = downcast<RenderBox>(renderer()).clipRect({ }, nullptr);
     5982        clipExceedsBounds = !cssClipRect.isEmpty() && (clipRect.width() < cssClipRect.width() || clipRect.height() < cssClipRect.height());
    59835983    }
    59845984
Note: See TracChangeset for help on using the changeset viewer.