Changeset 190658 in webkit


Ignore:
Timestamp:
Oct 6, 2015, 7:51:29 PM (10 years ago)
Author:
Alan Bujtas
Message:

Paint artifacts when hovering on http://jsfiddle.net/Sherbrow/T87Mn/
https://bugs.webkit.org/show_bug.cgi?id=149535
rdar://problem/22874920

Reviewed by Simon Fraser.

When due to some style change, a renderer's self-painting layer is getting destroyed
and the parent's overflow is no longer set to visible, we don't clean up the overflow part.

When a renderer has a self-painting layer, the parent stops tracking the child's
visual overflow rect. All overflow painting is delegated to the self-painting layer.
However when this layer gets destroyed, no-one issues repaint to clean up
the overflow bits.
This patch ensures that we issue a repaint when the self-painting layer is destroyed
and the triggering style change requires full repaint.

Source/WebCore:

Test: fast/repaint/overflow-hidden-with-self-painting-child-layer.html

  • rendering/RenderLayer.h:
  • rendering/RenderLayerModelObject.cpp:

(WebCore::RenderLayerModelObject::styleDidChange):

LayoutTests:

  • css3/blending/repaint/blend-mode-isolate-stacking-context-expected.txt: progression.
  • fast/repaint/absolute-position-change-containing-block-expected.txt: progression.
  • fast/repaint/overflow-hidden-with-self-painting-child-layer-expected.txt: Added.
  • fast/repaint/overflow-hidden-with-self-painting-child-layer.html: Added.
Location:
trunk
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r190657 r190658  
     12015-10-06  Zalan Bujtas  <zalan@apple.com>
     2
     3        Paint artifacts when hovering on http://jsfiddle.net/Sherbrow/T87Mn/
     4        https://bugs.webkit.org/show_bug.cgi?id=149535
     5        rdar://problem/22874920
     6
     7        Reviewed by Simon Fraser.
     8
     9        When due to some style change, a renderer's self-painting layer is getting destroyed
     10        and the parent's overflow is no longer set to visible, we don't clean up the overflow part.
     11
     12        When a renderer has a self-painting layer, the parent stops tracking the child's
     13        visual overflow rect. All overflow painting is delegated to the self-painting layer.
     14        However when this layer gets destroyed, no-one issues repaint to clean up
     15        the overflow bits.
     16        This patch ensures that we issue a repaint when the self-painting layer is destroyed
     17        and the triggering style change requires full repaint.
     18
     19        * css3/blending/repaint/blend-mode-isolate-stacking-context-expected.txt: progression.
     20        * fast/repaint/absolute-position-change-containing-block-expected.txt: progression.
     21        * fast/repaint/overflow-hidden-with-self-painting-child-layer-expected.txt: Added.
     22        * fast/repaint/overflow-hidden-with-self-painting-child-layer.html: Added.
     23
    1242015-10-06  Jon Honeycutt  <jhoneycutt@apple.com>
    225
  • trunk/LayoutTests/css3/blending/repaint/blend-mode-isolate-stacking-context-expected.txt

    r168354 r190658  
    2020  (rect 28 290 60 60)
    2121  (rect 48 290 60 60)
     22  (rect 28 290 60 60)
    2223  (rect 48 290 60 60)
    2324  (rect 48 408 60 60)
     
    2728  (rect 48 644 60 60)
    2829  (rect 68 644 60 60)
     30  (rect 48 644 60 60)
    2931  (rect 68 644 60 60)
    3032  (rect 28 290 60 60)
  • trunk/LayoutTests/fast/repaint/absolute-position-change-containing-block-expected.txt

    r189185 r190658  
    33  (rect 108 5100 100 100)
    44  (rect 8 8 784 2000)
     5  (rect 8 5000 100 100)
    56  (rect 108 5100 100 100)
    67  (rect 100 100 100 100)
  • trunk/Source/WebCore/ChangeLog

    r190655 r190658  
     12015-10-06  Zalan Bujtas  <zalan@apple.com>
     2
     3        Paint artifacts when hovering on http://jsfiddle.net/Sherbrow/T87Mn/
     4        https://bugs.webkit.org/show_bug.cgi?id=149535
     5        rdar://problem/22874920
     6
     7        Reviewed by Simon Fraser.
     8
     9        When due to some style change, a renderer's self-painting layer is getting destroyed
     10        and the parent's overflow is no longer set to visible, we don't clean up the overflow part.
     11
     12        When a renderer has a self-painting layer, the parent stops tracking the child's
     13        visual overflow rect. All overflow painting is delegated to the self-painting layer.
     14        However when this layer gets destroyed, no-one issues repaint to clean up
     15        the overflow bits.
     16        This patch ensures that we issue a repaint when the self-painting layer is destroyed
     17        and the triggering style change requires full repaint.
     18
     19        Test: fast/repaint/overflow-hidden-with-self-painting-child-layer.html
     20
     21        * rendering/RenderLayer.h:
     22        * rendering/RenderLayerModelObject.cpp:
     23        (WebCore::RenderLayerModelObject::styleDidChange):
     24
    1252015-10-06  Jer Noble  <jer.noble@apple.com>
    226
  • trunk/Source/WebCore/rendering/RenderLayer.h

    r189144 r190658  
    537537
    538538    void setRepaintStatus(RepaintStatus status) { m_repaintStatus = status; }
     539    RepaintStatus repaintStatus() const { return static_cast<RepaintStatus>(m_repaintStatus); }
    539540
    540541    LayoutUnit staticInlinePosition() const { return m_staticInlinePosition; }
  • trunk/Source/WebCore/rendering/RenderLayerModelObject.cpp

    r190330 r190658  
    160160        setHasTransformRelatedProperty(false); // All transform-related propeties force layers, so we know we don't have one or the object doesn't support them.
    161161        setHasReflection(false);
     162        // Repaint the about to be destroyed self-painting layer when style change also triggers repaint.
     163        if (layer()->isSelfPaintingLayer() && layer()->repaintStatus() == NeedsFullRepaint)
     164            repaintUsingContainer(containerForRepaint(), layer()->repaintRect());
    162165        layer()->removeOnlyThisLayer(); // calls destroyLayer() which clears m_layer
    163166        if (s_wasFloating && isFloating())
Note: See TracChangeset for help on using the changeset viewer.