Changeset 184932 in webkit


Ignore:
Timestamp:
May 27, 2015, 5:39:35 PM (11 years ago)
Author:
Simon Fraser
Message:

REGRESSION (r183820): webkit.org/blog/ background painting issue on reload, when the page contains videos
https://bugs.webkit.org/show_bug.cgi?id=145420

Reviewed by Dean Jackson.
Source/WebCore:

After r183820, the media controls no longer had a wrapper that created CSS stacking context.
The media controls on Mac use mix-blend-mode, which causes the compositing code to look for
a stacking context ancestor and make it composited. After this change, it would walk up
to a layer outside of the media element (e.g. the document element's layer), and make
that composited. This triggered bugs with root background painting.

Prevent mix-blend-mode affecting content outside the media elements by having the media element's
layer act as a stacking context.

Test: media/controls-layers.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::RenderLayer):

  • rendering/RenderLayer.h:

LayoutTests:

Test that dumps compositing layers in a document with media controls.

  • media/controls-layers.html: Added.
  • platform/mac/media/controls-layers-expected.txt: Added.
  • platform/mac-mavericks/media/controls-layers-expected.txt: Added.
Location:
trunk
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r184918 r184932  
     12015-05-27  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION (r183820): webkit.org/blog/ background painting issue on reload, when the page contains videos
     4        https://bugs.webkit.org/show_bug.cgi?id=145420
     5
     6        Reviewed by Dean Jackson.
     7       
     8        Test that dumps compositing layers in a document with media controls.
     9
     10        * media/controls-layers.html: Added.
     11        * platform/mac/media/controls-layers-expected.txt: Added.
     12        * platform/mac-mavericks/media/controls-layers-expected.txt: Added.
     13
    1142015-05-27  Alexey Proskuryakov  <ap@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r184930 r184932  
     12015-05-27  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION (r183820): webkit.org/blog/ background painting issue on reload, when the page contains videos
     4        https://bugs.webkit.org/show_bug.cgi?id=145420
     5
     6        Reviewed by Dean Jackson.
     7
     8        After r183820, the media controls no longer had a wrapper that created CSS stacking context.
     9        The media controls on Mac use mix-blend-mode, which causes the compositing code to look for
     10        a stacking context ancestor and make it composited. After this change, it would walk up
     11        to a layer outside of the media element (e.g. the document element's layer), and make
     12        that composited. This triggered bugs with root background painting.
     13
     14        Prevent mix-blend-mode affecting content outside the media elements by having the media element's
     15        layer act as a stacking context.
     16
     17        Test: media/controls-layers.html
     18
     19        * rendering/RenderLayer.cpp:
     20        (WebCore::RenderLayer::RenderLayer):
     21        * rendering/RenderLayer.h:
     22
    1232015-05-27  Andreas Kling  <akling@apple.com>
    224
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r184749 r184932  
    262262
    263263RenderLayer::RenderLayer(RenderLayerModelObject& rendererLayerModelObject)
    264     : m_inResizeMode(false)
     264    : m_isRootLayer(rendererLayerModelObject.isRenderView())
     265    , m_forcedStackingContext(rendererLayerModelObject.isMedia())
     266    , m_inResizeMode(false)
    265267    , m_scrollDimensionsDirty(true)
    266268    , m_normalFlowListDirty(true)
     
    271273    , m_needsCompositedScrolling(false)
    272274    , m_descendantsAreContiguousInStackingOrder(false)
    273     , m_isRootLayer(rendererLayerModelObject.isRenderView())
    274275    , m_usedTransparency(false)
    275276    , m_paintingInsideReflection(false)
  • trunk/Source/WebCore/rendering/RenderLayer.h

    r184749 r184932  
    703703    // Non-auto z-index always implies stacking context here, because StyleResolver::adjustRenderStyle already adjusts z-index
    704704    // based on positioning and other criteria.
    705     bool isStackingContext(const RenderStyle* style) const { return !style->hasAutoZIndex() || isRootLayer(); }
     705    bool isStackingContext(const RenderStyle* style) const { return !style->hasAutoZIndex() || isRootLayer() || m_forcedStackingContext; }
    706706
    707707    bool isDirtyStackingContainer() const { return m_zOrderListsDirty && isStackingContainer(); }
     
    992992    // The bitfields are up here so they will fall into the padding from ScrollableArea on 64-bit.
    993993
     994    const bool m_isRootLayer : 1;
     995    const bool m_forcedStackingContext : 1;
     996
    994997    // Keeps track of whether the layer is currently resizing, so events can cause resizing to start and stop.
    995998    bool m_inResizeMode : 1;
     
    10191022    // able to safely become a stacking context.
    10201023    bool m_descendantsAreContiguousInStackingOrder : 1;
    1021 
    1022     const bool m_isRootLayer : 1;
    10231024
    10241025    bool m_usedTransparency : 1; // Tracks whether we need to close a transparent layer, i.e., whether
Note: See TracChangeset for help on using the changeset viewer.