Changeset 173295 in webkit


Ignore:
Timestamp:
Sep 4, 2014, 5:23:10 PM (11 years ago)
Author:
Simon Fraser
Message:

border-radius should not force layer backing store
https://bugs.webkit.org/show_bug.cgi?id=136555

Reviewed by Dean Jackson.

Source/WebCore:

Border-radius is not a reason to allocate backing store; it's not relevant unless
we also have a border or background, and hasBoxDecorations() already checks for that.

With that gone, we can now use renderer.hasBoxDecorations() (which also checks for
a background), but it doesn't check for outlines, so do that in addition.

Test: compositing/backing/border-radius-no-backing.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects):

LayoutTests:

Test that dumps layers on some composited elements with border-radius

  • compositing/backing/border-radius-no-backing-expected.txt: Added.
  • compositing/backing/border-radius-no-backing.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/LayoutTests/ChangeLog

    r173294 r173295  
     12014-09-04  Simon Fraser  <simon.fraser@apple.com>
     2
     3        border-radius should not force layer backing store
     4        https://bugs.webkit.org/show_bug.cgi?id=136555
     5
     6        Reviewed by Dean Jackson.
     7       
     8        Test that dumps layers on some composited elements with border-radius
     9
     10        * compositing/backing/border-radius-no-backing-expected.txt: Added.
     11        * compositing/backing/border-radius-no-backing.html: Added.
     12
    1132014-09-04  Simon Fraser  <simon.fraser@apple.com>
    214
  • TabularUnified trunk/Source/WebCore/ChangeLog

    r173294 r173295  
     12014-09-04  Simon Fraser  <simon.fraser@apple.com>
     2
     3        border-radius should not force layer backing store
     4        https://bugs.webkit.org/show_bug.cgi?id=136555
     5
     6        Reviewed by Dean Jackson.
     7       
     8        Border-radius is not a reason to allocate backing store; it's not relevant unless
     9        we also have a border or background, and hasBoxDecorations() already checks for that.
     10       
     11        With that gone, we can now use renderer.hasBoxDecorations() (which also checks for
     12        a background), but it doesn't check for outlines, so do that in addition.
     13
     14        Test: compositing/backing/border-radius-no-backing.html
     15
     16        * rendering/RenderLayer.cpp:
     17        (WebCore::RenderLayer::calculateClipRects):
     18
    1192014-09-04  Simon Fraser  <simon.fraser@apple.com>
    220
  • TabularUnified trunk/Source/WebCore/rendering/RenderLayer.cpp

    r173294 r173295  
    62476247}
    62486248
    6249 // FIXME: use RenderObject::hasBoxDecorations(). And why hasBorderRadius()?
    6250 static bool hasBoxDecorations(const RenderStyle& style)
    6251 {
    6252     return style.hasBorder() || style.hasBorderRadius() || style.hasOutline() || style.hasAppearance() || style.boxShadow();
    6253 }
    6254 
    62556249static bool hasBoxDecorationsOrBackground(const RenderElement& renderer)
    62566250{
    6257     return hasBoxDecorations(renderer.style()) || renderer.hasBackground();
     6251    return renderer.hasBoxDecorations() || renderer.style().hasOutline();
    62586252}
    62596253
Note: See TracChangeset for help on using the changeset viewer.