Changeset 149914 in webkit


Ignore:
Timestamp:
May 10, 2013 5:31:59 PM (11 years ago)
Author:
Simon Fraser
Message:

Garbage down left side of nytimes.com page (if subscriber)
https://bugs.webkit.org/show_bug.cgi?id=115839

Source/WebCore:

Reviewed by Antti Koivisto.

RenderLayer::backgroundIsKnownToBeOpaqueInRect() would incorrectly return true
for layers where the given rect wasn't contained in the background rect, but
where some child layer obscured the rect, even though clipping hid part
of that child layer.

So bail from RenderLayer::backgroundIsKnownToBeOpaqueInRect() if we have
any overflow clipping. This could be enhanced in future to test whether child
layers obscure the clipping rect, but that would be more expensive.

Test: compositing/contents-opaque/overflow-hidden-child-layers.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::backgroundIsKnownToBeOpaqueInRect):

LayoutTests:

Reviewed by Antti Koivisto.

  • compositing/contents-opaque/overflow-hidden-child-layers-expected.txt: Added.
  • compositing/contents-opaque/overflow-hidden-child-layers.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r149906 r149914  
     12013-05-10  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Garbage down left side of nytimes.com page (if subscriber)
     4        https://bugs.webkit.org/show_bug.cgi?id=115839
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * compositing/contents-opaque/overflow-hidden-child-layers-expected.txt: Added.
     9        * compositing/contents-opaque/overflow-hidden-child-layers.html: Added.
     10
    1112013-05-10  Eric Carlson  <eric.carlson@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r149906 r149914  
     12013-05-10  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Garbage down left side of nytimes.com page (if subscriber)
     4        https://bugs.webkit.org/show_bug.cgi?id=115839
     5
     6        Reviewed by Antti Koivisto.
     7       
     8        RenderLayer::backgroundIsKnownToBeOpaqueInRect() would incorrectly return true
     9        for layers where the given rect wasn't contained in the background rect, but
     10        where some child layer obscured the rect, even though clipping hid part
     11        of that child layer.
     12       
     13        So bail from RenderLayer::backgroundIsKnownToBeOpaqueInRect() if we have
     14        any overflow clipping. This could be enhanced in future to test whether child
     15        layers obscure the clipping rect, but that would be more expensive.
     16
     17        Test: compositing/contents-opaque/overflow-hidden-child-layers.html
     18
     19        * rendering/RenderLayer.cpp:
     20        (WebCore::RenderLayer::backgroundIsKnownToBeOpaqueInRect):
     21
    1222013-05-10  Eric Carlson  <eric.carlson@apple.com>
    223
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r149504 r149914  
    55865586    // FIXME: We currently only check the immediate renderer,
    55875587    // which will miss many cases.
    5588     return renderer()->backgroundIsKnownToBeOpaqueInRect(localRect)
    5589         || listBackgroundIsKnownToBeOpaqueInRect(posZOrderList(), localRect)
     5588    if (renderer()->backgroundIsKnownToBeOpaqueInRect(localRect))
     5589        return true;
     5590   
     5591    // We can't consult child layers if we clip, since they might cover
     5592    // parts of the rect that are clipped out.
     5593    if (renderer()->hasOverflowClip())
     5594        return false;
     5595   
     5596    return listBackgroundIsKnownToBeOpaqueInRect(posZOrderList(), localRect)
    55905597        || listBackgroundIsKnownToBeOpaqueInRect(negZOrderList(), localRect)
    55915598        || listBackgroundIsKnownToBeOpaqueInRect(normalFlowList(), localRect);
Note: See TracChangeset for help on using the changeset viewer.