Changeset 117622 in webkit
- Timestamp:
- May 18, 2012 1:52:24 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r117616 r117622 1 2012-05-18 Joe Thomas <joethomas@motorola.com> 2 3 background-size specified by a single value in background shorthand fails to parse. 4 https://bugs.webkit.org/show_bug.cgi?id=86739 5 6 Reviewed by Tony Chang. 7 8 While parsing the background shorthand property, if the second parsedValue is not a valid unit, 9 parseFillSize should return the first parsedValue instead of failing. 10 11 * fast/backgrounds/background-shorthand-with-backgroundSize-style-expected.txt: 12 * fast/backgrounds/background-shorthand-with-backgroundSize-style.html: 13 1 14 2012-05-18 Raphael Kubo da Costa <rakuco@webkit.org> 2 15 -
trunk/LayoutTests/fast/backgrounds/background-shorthand-with-backgroundSize-style-expected.txt
r117603 r117622 39 39 PASS checkComputedStyleValue() is true 40 40 41 PASS e.style.background is 'red url(dummy://test.png) no-repeat fixed 50px 60px / 50%' 42 PASS e.style.backgroundSize is '50%' 43 PASS checkStyle() is true 44 PASS computedStyle.getPropertyValue("background") is 'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 50px 60px / 50%' 45 PASS computedStyle.getPropertyValue("background-size") is '50%' 46 PASS checkComputedStyleValue() is true 47 48 PASS e.style.background is 'red url(dummy://test.png) repeat scroll padding-box padding-box 0% 0% / 100px' 49 PASS e.style.backgroundSize is '100px' 50 PASS checkStyle() is true 51 PASS computedStyle.getPropertyValue("background") is 'rgb(255, 0, 0) url(dummy://test.png) repeat scroll 0% 0% / 100px' 52 PASS computedStyle.getPropertyValue("background-size") is '100px' 53 PASS checkComputedStyleValue() is true 54 55 PASS e.style.background is 'red url(dummy://test.png) repeat fixed content-box content-box 50% 50% / auto' 56 PASS e.style.backgroundSize is 'auto' 57 PASS checkStyle() is true 58 PASS computedStyle.getPropertyValue("background") is 'rgb(255, 0, 0) url(dummy://test.png) repeat fixed 50% 50% / auto' 59 PASS computedStyle.getPropertyValue("background-size") is 'auto' 60 PASS checkComputedStyleValue() is true 61 41 62 PASS e.style.background is '' 42 63 PASS e.style.backgroundSize is '' -
trunk/LayoutTests/fast/backgrounds/background-shorthand-with-backgroundSize-style.html
r117603 r117622 68 68 debug("") 69 69 70 e.style.background = "url(dummy://test.png) red 50px 60px / 50% no-repeat fixed"; 71 shouldBe("e.style.background", "'red url(dummy://test.png) no-repeat fixed 50px 60px / 50%'"); 72 shouldBe("e.style.backgroundSize", "'50%'"); 73 shouldBe("checkStyle()", "true"); 74 shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 50px 60px / 50%'"); 75 shouldBe('computedStyle.getPropertyValue("background-size")', "'50%'"); 76 shouldBe("checkComputedStyleValue()", "true"); 77 debug("") 78 79 e.style.background = "red repeat scroll padding-box padding-box top left / 100px url(dummy://test.png)"; 80 shouldBe("e.style.background", "'red url(dummy://test.png) repeat scroll padding-box padding-box 0% 0% / 100px'"); 81 shouldBe("e.style.backgroundSize", "'100px'"); 82 shouldBe("checkStyle()", "true"); 83 shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png) repeat scroll 0% 0% / 100px'"); 84 shouldBe('computedStyle.getPropertyValue("background-size")', "'100px'"); 85 shouldBe("checkComputedStyleValue()", "true"); 86 debug("") 87 88 e.style.background = "50% / auto fixed url(dummy://test.png) repeat content-box red"; 89 shouldBe("e.style.background", "'red url(dummy://test.png) repeat fixed content-box content-box 50% 50% / auto'"); 90 shouldBe("e.style.backgroundSize", "'auto'"); 91 shouldBe("checkStyle()", "true"); 92 shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png) repeat fixed 50% 50% / auto'"); 93 shouldBe('computedStyle.getPropertyValue("background-size")', "'auto'"); 94 shouldBe("checkComputedStyleValue()", "true"); 95 debug("") 96 70 97 e.style.background = ""; 71 98 e.style.background = "red / cover url(dummy://test.png) repeat"; -
trunk/Source/WebCore/ChangeLog
r117613 r117622 1 2012-05-18 Joe Thomas <joethomas@motorola.com> 2 3 background-size specified by a single value in background shorthand fails to parse. 4 https://bugs.webkit.org/show_bug.cgi?id=86739 5 6 Reviewed by Tony Chang. 7 8 While parsing the background shorthand property, if the second parsedValue is not a valid unit, 9 parseFillSize should return the first parsedValue instead of failing. 10 11 * css/CSSParser.cpp: 12 (WebCore::CSSParser::parseFillSize): 13 1 14 2012-05-18 Tony Chang <tony@chromium.org> 2 15 -
trunk/Source/WebCore/css/CSSParser.cpp
r117613 r117622 3376 3376 allowComma = false; 3377 3377 else if (value->id != CSSValueAuto) { 3378 if (!validUnit(value, FLength | FPercent)) 3379 return 0; 3380 parsedValue2 = createPrimitiveNumericValue(value); 3378 if (!validUnit(value, FLength | FPercent)) { 3379 if (!inShorthand()) 3380 return 0; 3381 // We need to rewind the value list, so that when it is advanced we'll end up back at this value. 3382 m_valueList->previous(); 3383 } else 3384 parsedValue2 = createPrimitiveNumericValue(value); 3381 3385 } 3382 3386 } else if (!parsedValue2 && propId == CSSPropertyWebkitBackgroundSize) {
Note: See TracChangeset
for help on using the changeset viewer.