Changeset 63192 in webkit


Ignore:
Timestamp:
Jul 13, 2010 4:04:53 AM (14 years ago)
Author:
andreas.kling@nokia.com
Message:

2010-07-13 Andreas Kling <andreas.kling@nokia.com>

Reviewed by Antti Koivisto.

CSS3 background: Number of layers should be determined by background-image element count
https://bugs.webkit.org/show_bug.cgi?id=41201

Change FillLayer culling logic to discard all layers
after the first one without an image set.

Manual test: css3-background-layer-count.html

  • manual-tests/css3-background-layer-count.html: Added.
  • rendering/style/FillLayer.cpp: (WebCore::FillLayer::cullEmptyLayers):
Location:
trunk/WebCore
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r63191 r63192  
     12010-07-13  Andreas Kling  <andreas.kling@nokia.com>
     2
     3        Reviewed by Antti Koivisto.
     4
     5        CSS3 background: Number of layers should be determined by background-image element count
     6        https://bugs.webkit.org/show_bug.cgi?id=41201
     7
     8        Change FillLayer culling logic to discard all layers
     9        after the first one without an image set.
     10
     11        Manual test: css3-background-layer-count.html
     12
     13        * manual-tests/css3-background-layer-count.html: Added.
     14        * rendering/style/FillLayer.cpp:
     15        (WebCore::FillLayer::cullEmptyLayers):
     16
    1172010-07-07  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
    218
  • trunk/WebCore/rendering/style/FillLayer.cpp

    r59330 r63192  
    244244void FillLayer::cullEmptyLayers()
    245245{
     246    // CSS3 background layering: the number of background layers is determined
     247    // by the number of values in the 'background-image' property.
     248    // http://www.w3.org/TR/css3-background/#layering
     249
    246250    FillLayer* next;
    247251    for (FillLayer* p = this; p; p = next) {
    248252        next = p->m_next;
    249         if (next && !next->isImageSet() &&
    250             !next->isXPositionSet() && !next->isYPositionSet() &&
    251             !next->isAttachmentSet() && !next->isClipSet() &&
    252             !next->isCompositeSet() && !next->isOriginSet() &&
    253             !next->isRepeatXSet() && !next->isRepeatYSet()
    254             && !next->isSizeSet()) {
     253        if (!next)
     254            break;
     255
     256        bool anyAttributeSet = next->isXPositionSet()
     257            || next->isYPositionSet()
     258            || next->isAttachmentSet()
     259            || next->isClipSet()
     260            || next->isCompositeSet()
     261            || next->isOriginSet()
     262            || next->isRepeatXSet()
     263            || next->isRepeatYSet()
     264            || next->isSizeSet();
     265
     266        if (!next->isImageSet() || !anyAttributeSet) {
    255267            delete next;
    256268            p->m_next = 0;
Note: See TracChangeset for help on using the changeset viewer.