Changeset 269237 in webkit
- Timestamp:
- Nov 1, 2020 12:14:18 PM (21 months ago)
- Location:
- trunk
- Files:
-
- 7 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/TestExpectations (modified) (1 diff)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-size-computed-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-size-invalid-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/css/parser/CSSPropertyParser.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r269236 r269237 1 2020-11-01 Tyler Wilcock <twilco.o@protonmail.com> 2 3 background-size should not accept negative values 4 https://bugs.webkit.org/show_bug.cgi?id=183990 5 6 Reviewed by Darin Adler. 7 8 We now reject negative background-size values. Update newly passing 9 test expectations to reflect this. 10 11 * TestExpectations: 12 1 13 2020-11-01 Sam Weinig <weinig@apple.com> 2 14 -
trunk/LayoutTests/TestExpectations
r269187 r269237 3441 3441 webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/background-position-negative-percentage-comparison.html [ ImageOnlyFailure ] 3442 3442 webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/background-size-cover-003.html [ ImageOnlyFailure ] 3443 webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/background-size-with-negative-value.html [ ImageOnlyFailure]3443 webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/background-size-with-negative-value.html [ Pass ] 3444 3444 webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/background-size/background-size-cover-svg.html [ ImageOnlyFailure ] 3445 3445 webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/background-size/vector/background-size-vector-003.html [ ImageOnlyFailure ] -
trunk/LayoutTests/imported/w3c/ChangeLog
r269235 r269237 1 2020-11-01 Tyler Wilcock <twilco.o@protonmail.com> 2 3 background-size should not accept negative values 4 https://bugs.webkit.org/show_bug.cgi?id=183990 5 6 Reviewed by Darin Adler. 7 8 We now reject negative values for background-size. Update newly 9 passing test expectations to reflect this. 10 11 * web-platform-tests/css/css-backgrounds/parsing/background-size-computed-expected.txt: 12 * web-platform-tests/css/css-backgrounds/parsing/background-size-invalid-expected.txt: 13 1 14 2020-11-01 Chris Dumez <cdumez@apple.com> 2 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-size-computed-expected.txt
r267650 r269237 8 8 PASS Property background-size value 'contain' 9 9 PASS Property background-size value 'cover' 10 FAIL Property background-size value 'calc(10px + 0.5em) calc(10px - 0.5em)' assert_equals: expected "30px 0px" but got "30px -10px" 11 FAIL Property background-size value 'calc(10px - 0.5em) calc(10px + 0.5em)' assert_equals: expected "0px 30px" but got "-10px 30px" 10 PASS Property background-size value 'calc(10px + 0.5em) calc(10px - 0.5em)' 11 PASS Property background-size value 'calc(10px - 0.5em) calc(10px + 0.5em)' 12 12 PASS Property background-size value 'auto 1px, 2% 3%, contain' 13 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-size-invalid-expected.txt
r267650 r269237 1 1 2 FAIL e.style['background-size'] = "-1px" should not set the property value assert_equals: expected "" but got "-1px" 3 FAIL e.style['background-size'] = "2% -3%" should not set the property value assert_equals: expected "" but got "2% -3%" 2 PASS e.style['background-size'] = "-1px" should not set the property value 3 PASS e.style['background-size'] = "2% -3%" should not set the property value 4 4 PASS e.style['background-size'] = "1px 2px 3px" should not set the property value 5 5 -
trunk/Source/WebCore/ChangeLog
r269232 r269237 1 2020-11-01 Tyler Wilcock <twilco.o@protonmail.com> 2 3 background-size should not accept negative values 4 https://bugs.webkit.org/show_bug.cgi?id=183990 5 6 Reviewed by Darin Adler. 7 8 Reject negative background-size length-percentage values, 9 as these are explicitly disallowed by the spec. 10 11 https://www.w3.org/TR/2017/CR-css-backgrounds-3-20171017/#the-background-size 12 13 Change is covered by existing tests that now pass. 14 15 * css/parser/CSSPropertyParser.cpp: 16 (WebCore::consumeBackgroundSize): Reject negative length-percentage 17 values as is mandated by the spec. 18 1 19 2020-11-01 Chris Fleizach <cfleizach@apple.com> 2 20 -
trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp
r268889 r269237 3195 3195 RefPtr<CSSPrimitiveValue> horizontal = consumeIdent<CSSValueAuto>(range); 3196 3196 if (!horizontal) 3197 horizontal = consumeLengthOrPercent(range, cssParserMode, ValueRange All, UnitlessQuirk::Allow);3197 horizontal = consumeLengthOrPercent(range, cssParserMode, ValueRangeNonNegative, UnitlessQuirk::Allow); 3198 3198 3199 3199 RefPtr<CSSPrimitiveValue> vertical; … … 3202 3202 range.consumeIncludingWhitespace(); 3203 3203 else 3204 vertical = consumeLengthOrPercent(range, cssParserMode, ValueRange All, UnitlessQuirk::Allow);3204 vertical = consumeLengthOrPercent(range, cssParserMode, ValueRangeNonNegative, UnitlessQuirk::Allow); 3205 3205 } else if (!vertical && property == CSSPropertyWebkitBackgroundSize) { 3206 3206 // Legacy syntax: "-webkit-background-size: 10px" is equivalent to "background-size: 10px 10px".
Note: See TracChangeset
for help on using the changeset viewer.