Changeset 190818 in webkit


Ignore:
Timestamp:
Oct 9, 2015 2:07:25 PM (8 years ago)
Author:
Simon Fraser
Message:

Garbage pixels on enphaseenergy.com site
https://bugs.webkit.org/show_bug.cgi?id=149915
rdar://problem/22976184

Reviewed by Darin Adler.

Source/WebCore:

When the <html> gets a composited RenderLayer, and we ask whether its background
is opaque, return false, since the document element's background propagates
to the root, and is painted by the RenderView.

Also improve the compositing logging to indicate when fore- and background layers
are present.

Test: compositing/contents-opaque/negative-z-before-html.html

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateGeometry):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::logLayerInfo):

LayoutTests:

New ref test. Also update the expected result for another test that uses negative
z-index children.

  • compositing/contents-opaque/body-background-painted-expected.txt:
  • compositing/contents-opaque/negative-z-before-html-expected.html: Added.
  • compositing/contents-opaque/negative-z-before-html.html: Added.
  • platform/mac-wk2/compositing/contents-opaque/body-background-painted-expected.txt:
Location:
trunk
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r190816 r190818  
     12015-10-09  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Garbage pixels on enphaseenergy.com site
     4        https://bugs.webkit.org/show_bug.cgi?id=149915
     5        rdar://problem/22976184
     6
     7        Reviewed by Darin Adler.
     8       
     9        New ref test. Also update the expected result for another test that uses negative
     10        z-index children.
     11
     12        * compositing/contents-opaque/body-background-painted-expected.txt:
     13        * compositing/contents-opaque/negative-z-before-html-expected.html: Added.
     14        * compositing/contents-opaque/negative-z-before-html.html: Added.
     15        * platform/mac-wk2/compositing/contents-opaque/body-background-painted-expected.txt:
     16
    1172015-10-09  Antoine Quint  <graouts@apple.com>
    218
  • trunk/LayoutTests/compositing/contents-opaque/body-background-painted-expected.txt

    r168244 r190818  
    99        (GraphicsLayer
    1010          (bounds 800.00 600.00)
    11           (contentsOpaque 1)
    1211          (drawsContent 1)
    1312          (children 2
  • trunk/LayoutTests/compositing/contents-opaque/body-background-painted.html

    r154281 r190818  
    2929    <!-- Composited body over the child div. -->
    3030    <!-- Root <html> element has a background-color. -->
    31     <!-- Background for the body element is painted in this case. ->
     31    <!-- Background for the body element is painted in this case. -->
    3232    <!-- GraphicsLayer::contentsOpaque for the body layer should be false. -->
    3333    <body>
  • trunk/LayoutTests/platform/mac-wk2/compositing/contents-opaque/body-background-painted-expected.txt

    r168244 r190818  
    1010        (GraphicsLayer
    1111          (bounds 800.00 600.00)
    12           (contentsOpaque 1)
    1312          (drawsContent 1)
    1413          (children 2
  • trunk/Source/WebCore/ChangeLog

    r190816 r190818  
     12015-10-09  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Garbage pixels on enphaseenergy.com site
     4        https://bugs.webkit.org/show_bug.cgi?id=149915
     5        rdar://problem/22976184
     6
     7        Reviewed by Darin Adler.
     8       
     9        When the <html> gets a composited RenderLayer, and we ask whether its background
     10        is opaque, return false, since the document element's background propagates
     11        to the root, and is painted by the RenderView.
     12       
     13        Also improve the compositing logging to indicate when fore- and background layers
     14        are present.
     15
     16        Test: compositing/contents-opaque/negative-z-before-html.html
     17
     18        * rendering/RenderLayerBacking.cpp:
     19        (WebCore::RenderLayerBacking::updateGeometry):
     20        * rendering/RenderLayerCompositor.cpp:
     21        (WebCore::RenderLayerCompositor::logLayerInfo):
     22
    1232015-10-09  Antoine Quint  <graouts@apple.com>
    224
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r190363 r190818  
    61286128        return false;
    61296129
     6130    if (renderer().isRoot()) {
     6131        // Normally the document element doens't have a layer.  If it does have a layer, its background propagates to the RenderView
     6132        // so this layer doesn't draw it.
     6133        return false;
     6134    }
     6135
    61306136    // We can't use hasVisibleContent(), because that will be true if our renderer is hidden, but some child
    61316137    // is visible and that child doesn't cover the entire rect.
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r190627 r190818  
    862862    logString.appendLiteral(") ");
    863863
    864     if (backing->graphicsLayer()->contentsOpaque() || backing->paintsIntoCompositedAncestor()) {
     864    if (backing->graphicsLayer()->contentsOpaque() || backing->paintsIntoCompositedAncestor() || backing->foregroundLayer() || backing->backgroundLayer()) {
    865865        logString.append('[');
    866         if (backing->graphicsLayer()->contentsOpaque())
     866        bool prependSpace = false;
     867        if (backing->graphicsLayer()->contentsOpaque()) {
    867868            logString.appendLiteral("opaque");
    868         if (backing->paintsIntoCompositedAncestor())
     869            prependSpace = true;
     870        }
     871
     872        if (backing->paintsIntoCompositedAncestor()) {
     873            if (prependSpace)
     874                logString.appendLiteral(", ");
    869875            logString.appendLiteral("paints into ancestor");
     876            prependSpace = true;
     877        }
     878
     879        if (backing->foregroundLayer() || backing->backgroundLayer()) {
     880            if (prependSpace)
     881                logString.appendLiteral(", ");
     882            if (backing->foregroundLayer() && backing->backgroundLayer())
     883                logString.appendLiteral("foreground+background");
     884            else if (backing->foregroundLayer())
     885                logString.appendLiteral("foreground");
     886            else
     887                logString.appendLiteral("background");
     888        }
     889
    870890        logString.appendLiteral("] ");
    871891    }
Note: See TracChangeset for help on using the changeset viewer.