Changeset 48040 in webkit


Ignore:
Timestamp:
Sep 4, 2009 12:15:36 AM (15 years ago)
Author:
eric@webkit.org
Message:

2009-09-04 Yaar Schnitman <yaar@chromium.org>

Reviewed by Eric Seidel.

Two bugs:

https://bugs.webkit.org/show_bug.cgi?id=25489
CSS property background-position is now serialized in shorthand string as
background-position-x background-position-y, as the specification requires
(See http://www.w3.org/TR/2008/WD-css3-background-20080910/#the-background-position).

https://bugs.webkit.org/show_bug.cgi?id=26541
CSS background-color is now be serialized before other background properties,
as CSS specification requires (See http://dev.w3.org/csswg/cssom/#css-value).

An existing layout test that accepted wrong order and skipped position test
had to be modified.

  • fast/dom/background-shorthand-csstext-expected.txt:
  • fast/dom/background-shorthand-csstext.html:

2009-09-04 Yaar Schnitman <yaar@chromium.org>

Reviewed by Eric Seidel.

Two bugs:

https://bugs.webkit.org/show_bug.cgi?id=25489
CSS property background-position is now serialized in shorthand string as
background-position-x background-position-y, as the specification requires
(See http://www.w3.org/TR/2008/WD-css3-background-20080910/#the-background-position).

https://bugs.webkit.org/show_bug.cgi?id=26541
CSS background-color is now be serialized before other background properties,
as CSS specification requires (See http://dev.w3.org/csswg/cssom/#css-value).

An existing layout test that accepted wrong order and skipped position test
had to be modified.

  • css/CSSMutableStyleDeclaration.cpp: (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r48038 r48040  
     12009-09-04  Yaar Schnitman  <yaar@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Two bugs:
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=25489
     8        CSS property background-position is now serialized in shorthand string as
     9        background-position-x background-position-y, as the specification requires
     10        (See http://www.w3.org/TR/2008/WD-css3-background-20080910/#the-background-position).
     11       
     12
     13        https://bugs.webkit.org/show_bug.cgi?id=26541
     14        CSS background-color is now be serialized before other background properties,
     15        as CSS specification requires (See http://dev.w3.org/csswg/cssom/#css-value). 
     16
     17        An existing layout test that accepted wrong order and skipped position test
     18        had to be modified.
     19
     20        * fast/dom/background-shorthand-csstext-expected.txt:
     21        * fast/dom/background-shorthand-csstext.html:
     22
    1232009-09-03  Kent Tamura  <tkent@chromium.org>
    224
  • trunk/LayoutTests/fast/dom/background-shorthand-csstext-expected.txt

    r32417 r48040  
    22
    33PASS: document.body.style.background == 'green' should be true and is.
    4 PASS: document.getElementById('div1').style.background == 'repeat-x, repeat-y white' should be true and is.
    5 FAIL: document.getElementById('div2').style.background == '50% 50% blue' should be true but instead is false.
     4PASS: document.getElementById('div1').style.background == 'repeat-x, white repeat-y' should be true and is.
     5PASS: document.getElementById('div2').style.background == 'blue 50% 50%' should be true and is.
     6PASS: document.getElementById('div3').style.background == 'rgb(255, 255, 255) none repeat scroll' should be true and is.
  • trunk/LayoutTests/fast/dom/background-shorthand-csstext.html

    r21700 r48040  
    3333   
    3434    shouldBe("document.body.style.background == 'green'", true);
    35     shouldBe("document.getElementById('div1').style.background == 'repeat-x, repeat-y white'", true);
    36     shouldBe("document.getElementById('div2').style.background == '50% 50% blue'", true);
     35    shouldBe("document.getElementById('div1').style.background == 'repeat-x, white repeat-y'", true);
     36    shouldBe("document.getElementById('div2').style.background == 'blue 50% 50%'", true);
     37    shouldBe("document.getElementById('div3').style.background == 'rgb(255, 255, 255) none repeat scroll'", true);
    3738}
    3839</script>
     
    4344<div id="div1" style="background-repeat: repeat-x, repeat-y; background-color:white"></div>
    4445<div id="div2" style="background: 50% 50% blue"></div>
     46<div id="div3" style="background: rgb(255, 255, 255) none repeat scroll"></div>
    4547
    4648<p>This page tests whether or not the background shorthand properly omits
  • trunk/WebCore/ChangeLog

    r48038 r48040  
     12009-09-04  Yaar Schnitman  <yaar@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Two bugs:
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=25489
     8        CSS property background-position is now serialized in shorthand string as
     9        background-position-x background-position-y, as the specification requires
     10        (See http://www.w3.org/TR/2008/WD-css3-background-20080910/#the-background-position).
     11       
     12
     13        https://bugs.webkit.org/show_bug.cgi?id=26541
     14        CSS background-color is now be serialized before other background properties,
     15        as CSS specification requires (See http://dev.w3.org/csswg/cssom/#css-value). 
     16
     17        An existing layout test that accepted wrong order and skipped position test
     18        had to be modified.
     19
     20        * css/CSSMutableStyleDeclaration.cpp:
     21        (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
     22
    1232009-09-03  Kent Tamura  <tkent@chromium.org>
    224
  • trunk/WebCore/css/CSSMutableStyleDeclaration.cpp

    r47906 r48040  
    120120        }
    121121        case CSSPropertyBackground: {
    122             const int properties[8] = { CSSPropertyBackgroundImage, CSSPropertyBackgroundRepeatX, CSSPropertyBackgroundRepeatY,
    123                                         CSSPropertyBackgroundAttachment, CSSPropertyBackgroundPosition, CSSPropertyBackgroundClip,
    124                                         CSSPropertyBackgroundOrigin, CSSPropertyBackgroundColor };
    125             return getLayeredShorthandValue(properties, 8);
     122            const int properties[9] = { CSSPropertyBackgroundColor,
     123                                        CSSPropertyBackgroundImage,
     124                                        CSSPropertyBackgroundRepeatX,
     125                                        CSSPropertyBackgroundRepeatY,
     126                                        CSSPropertyBackgroundAttachment,
     127                                        CSSPropertyBackgroundPositionX,
     128                                        CSSPropertyBackgroundPositionY,
     129                                        CSSPropertyBackgroundClip,
     130                                        CSSPropertyBackgroundOrigin };
     131            return getLayeredShorthandValue(properties, 9);
    126132        }
    127133        case CSSPropertyBorder: {
Note: See TracChangeset for help on using the changeset viewer.