Changeset 170307 in webkit


Ignore:
Timestamp:
Jun 23, 2014 12:00:34 PM (10 years ago)
Author:
Simon Fraser
Message:

CSS clip property should make layers non-opaque
https://bugs.webkit.org/show_bug.cgi?id=134147

Source/WebCore:
<rdar://problem/17324579>

Reviewed by Tim Horton.

https://www.fairphone.com has position:fixed elements with clip: rect(...)
but we were making those layers opaque, resulting in garbage pixels
in areas outside the clip rect.

Fix by checking for the clip property in RenderBox::backgroundIsKnownToBeOpaqueInRect().

Test: compositing/contents-opaque/opaque-with-clip.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect):

LayoutTests:

Reviewed by Tim Horton.

  • compositing/contents-opaque/opaque-with-clip-expected.html: Added.
  • compositing/contents-opaque/opaque-with-clip.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r170306 r170307  
     12014-06-23  Simon Fraser  <simon.fraser@apple.com>
     2
     3        CSS clip property should make layers non-opaque
     4        https://bugs.webkit.org/show_bug.cgi?id=134147
     5
     6        Reviewed by Tim Horton.
     7
     8        * compositing/contents-opaque/opaque-with-clip-expected.html: Added.
     9        * compositing/contents-opaque/opaque-with-clip.html: Added.
     10
    1112014-06-23  Simon Fraser  <simon.fraser@apple.com>
    212
  • trunk/LayoutTests/compositing/geometry/clip-inside-expected.txt

    r168244 r170307  
    1313          (anchor 0.50 0.44)
    1414          (bounds 90.00 80.00)
    15           (contentsOpaque 1)
    1615          (drawsContent 1)
    1716          (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
  • trunk/Source/WebCore/ChangeLog

    r170306 r170307  
     12014-06-23  Simon Fraser  <simon.fraser@apple.com>
     2
     3        CSS clip property should make layers non-opaque
     4        https://bugs.webkit.org/show_bug.cgi?id=134147
     5        <rdar://problem/17324579>
     6
     7        Reviewed by Tim Horton.
     8       
     9        https://www.fairphone.com has position:fixed elements with clip: rect(...)
     10        but we were making those layers opaque, resulting in garbage pixels
     11        in areas outside the clip rect.
     12       
     13        Fix by checking for the clip property in RenderBox::backgroundIsKnownToBeOpaqueInRect().
     14
     15        Test: compositing/contents-opaque/opaque-with-clip.html
     16
     17        * rendering/RenderBox.cpp:
     18        (WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect):
     19
    1202014-06-23  Simon Fraser  <simon.fraser@apple.com>
    221
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r170304 r170307  
    13511351    // FIXME: Check the opaqueness of background images.
    13521352
    1353     if (hasClipPath())
     1353    if (hasClip() || hasClipPath())
    13541354        return false;
    13551355
Note: See TracChangeset for help on using the changeset viewer.