Returns inconsistent types for el.style.property and el.style.getPropertyValue('color')
authorbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Aug 2015 05:14:43 +0000 (05:14 +0000)
committerbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Aug 2015 05:14:43 +0000 (05:14 +0000)
commit7038255ea6e81ab6d537fb96e616343ec01f23bb
treed20ee6d44f4a32943837372f24f87a27a7af9ffc
parentb97e820578805d1db3a83e998faf566f8125fe27
Returns inconsistent types for el.style.property and el.style.getPropertyValue('color')
https://bugs.webkit.org/show_bug.cgi?id=147549

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-08-03
Reviewed by Andreas Kling.

Source/WebCore:

Kudos to Greg Whitworth for finding this bug.

Test: fast/css/getPropertyValue-returns-empty-on-missing-property.html

* css/CSSStyleDeclaration.idl:
Our definition was wrong.
Current spec: http://www.w3.org/TR/cssom/#dom-cssstyledeclaration-getpropertyvalue
Current draft: https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-getpropertyvalue
Gecko and EdgeHTML follow the spec.

LayoutTests:

The bug is very old, there were a lot of tests to update.

The tests in css3/shapes are incorrect W3C tests. I only updated the expected
results.

The test fast/css/getPropertyValue-returns-empty-on-missing-property.html
is the new one covering the bug fix.

* animations/script-tests/trigger-parsing.js:
(testTriggerRule):
* animations/trigger-parsing-expected.txt:
* animations/unprefixed-properties-expected.txt:
* animations/unprefixed-properties.html:
* css3/blending/blend-mode-property-parsing-invalid-expected.txt:
* css3/blending/script-tests/blend-mode-property-parsing-invalid.js:
(testInvalidFilterRule):
* css3/filters/backdrop/backdropfilter-property-parsing-invalid-expected.txt:
* css3/filters/backdrop/script-tests/backdropfilter-property-parsing-invalid.js:
(testInvalidFilterRule):
* css3/filters/filter-property-parsing-invalid-expected.txt:
* css3/filters/script-tests/filter-property-parsing-invalid.js:
(testInvalidFilterRule):
* css3/shapes/shape-outside/values/shape-image-threshold-002-expected.txt:
* css3/shapes/shape-outside/values/shape-image-threshold-003-expected.txt:
* css3/shapes/shape-outside/values/shape-margin-004-expected.txt:
* css3/shapes/shape-outside/values/shape-margin-005-expected.txt:
* css3/shapes/shape-outside/values/shape-outside-circle-003-expected.txt:
* css3/shapes/shape-outside/values/shape-outside-circle-006-expected.txt:
* css3/shapes/shape-outside/values/shape-outside-circle-007-expected.txt:
* css3/shapes/shape-outside/values/shape-outside-circle-008-expected.txt:
* css3/shapes/shape-outside/values/shape-outside-ellipse-003-expected.txt:
* css3/shapes/shape-outside/values/shape-outside-ellipse-006-expected.txt:
* css3/shapes/shape-outside/values/shape-outside-ellipse-007-expected.txt:
* css3/shapes/shape-outside/values/shape-outside-ellipse-008-expected.txt:
* css3/shapes/shape-outside/values/shape-outside-inset-005-expected.txt:
* css3/shapes/shape-outside/values/shape-outside-inset-006-expected.txt:
* css3/shapes/shape-outside/values/shape-outside-inset-007-expected.txt:
* css3/shapes/shape-outside/values/shape-outside-polygon-003-expected.txt:
* fast/backgrounds/repeat/parsing-background-repeat-expected.txt:
* fast/backgrounds/repeat/script-tests/parsing-background-repeat.js:
* fast/backgrounds/size/parsing-background-size-values-expected.txt:
* fast/backgrounds/size/resources/parsing-background-size-values.js:
* fast/box-decoration-break/box-decoration-break-parsing-expected.txt:
* fast/box-decoration-break/box-decoration-break-parsing.html:
* fast/box-shadow/box-shadow-parsing-invalid-expected.txt:
* fast/box-shadow/script-tests/box-shadow-parsing-invalid.js:
(testInvalidFilterRule):
* fast/css/background-clip-text-expected.txt:
* fast/css/border-spacing-without-vertical-value.html:
* fast/css/getPropertyValue-border-expected.txt:
* fast/css/getPropertyValue-border.html:
* fast/css/getPropertyValue-column-rule-expected.txt:
* fast/css/getPropertyValue-column-rule.html:
* fast/css/getPropertyValue-columns-expected.txt:
* fast/css/getPropertyValue-columns.html:
* fast/css/getPropertyValue-returns-empty-on-missing-property-expected.txt: Added.
* fast/css/getPropertyValue-returns-empty-on-missing-property.html: Added.
* fast/css/getPropertyValue-webkit-margin-collapse-expected.txt:
* fast/css/getPropertyValue-webkit-margin-collapse.html:
* fast/css/getPropertyValue-webkit-marquee-expected.txt:
* fast/css/getPropertyValue-webkit-marquee.html:
* fast/css/getPropertyValue-webkit-text-stroke-expected.txt:
* fast/css/getPropertyValue-webkit-text-stroke.html:
* fast/css/line-height-text-autosizing.html:
* fast/css/outline-offset-parsing-expected.txt:
* fast/css/parsing-color-correction-expected.txt:
* fast/css/parsing-object-fit-expected.txt:
* fast/css/parsing-object-fit.html:
* fast/css/parsing-text-rendering-expected.txt:
* fast/css/parsing-webkit-font-smoothing-expected.txt:
* fast/css/resources/parsing-color-correction.js:
* fast/css/resources/parsing-text-rendering.js:
* fast/css/resources/parsing-webkit-font-smoothing.js:
* fast/css/script-tests/background-clip-text.js:
* fast/css/script-tests/outline-offset-parsing.js:
* fast/css/script-tests/transform-origin-parsing.js:
* fast/css/sticky/parsing-position-sticky-expected.txt:
* fast/css/sticky/resources/parsing-position-sticky.js:
* fast/css/transform-origin-parsing-expected.txt:
* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip-expected.txt:
* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip.html:
* fast/css3-text/font-synthesis-parse-expected.txt:
* fast/css3-text/font-synthesis-parse.html:
* fast/filter-image/parse-filter-image-expected.txt:
* fast/filter-image/parse-filter-image.html:
* fast/masking/parsing-clip-path-shape-expected.txt:
* fast/masking/parsing-clip-path-shape.html:
* fast/masking/parsing-mask-expected.txt:
* fast/masking/parsing-mask.html:
* fast/shapes/css-shapes-disabled-expected.txt:
* fast/shapes/css-shapes-disabled.html:
* fast/shapes/parsing/parsing-shape-lengths-expected.txt:
* fast/shapes/parsing/parsing-shape-lengths.html:
* platform/mac/fast/css/dashboard-region-parser-expected.txt:
* platform/mac/fast/css/dashboard-region-parser.html:
* platform/mac/fast/text/trailing-word-parse-expected.txt:
* platform/mac/fast/text/trailing-word-parse.html:
* svg/paint-order/parsing-paint-order-expected.txt:
* svg/paint-order/parsing-paint-order.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@187813 268f45cc-cd09-0410-ab3c-d52691b4dbfc
89 files changed:
LayoutTests/ChangeLog
LayoutTests/animations/script-tests/trigger-parsing.js
LayoutTests/animations/trigger-parsing-expected.txt
LayoutTests/animations/unprefixed-properties-expected.txt
LayoutTests/animations/unprefixed-properties.html
LayoutTests/css3/blending/blend-mode-property-parsing-invalid-expected.txt
LayoutTests/css3/blending/script-tests/blend-mode-property-parsing-invalid.js
LayoutTests/css3/filters/backdrop/backdropfilter-property-parsing-invalid-expected.txt
LayoutTests/css3/filters/backdrop/script-tests/backdropfilter-property-parsing-invalid.js
LayoutTests/css3/filters/filter-property-parsing-invalid-expected.txt
LayoutTests/css3/filters/script-tests/filter-property-parsing-invalid.js
LayoutTests/css3/shapes/shape-outside/values/shape-image-threshold-002-expected.txt
LayoutTests/css3/shapes/shape-outside/values/shape-image-threshold-003-expected.txt
LayoutTests/css3/shapes/shape-outside/values/shape-margin-004-expected.txt
LayoutTests/css3/shapes/shape-outside/values/shape-margin-005-expected.txt
LayoutTests/css3/shapes/shape-outside/values/shape-outside-circle-003-expected.txt
LayoutTests/css3/shapes/shape-outside/values/shape-outside-circle-006-expected.txt
LayoutTests/css3/shapes/shape-outside/values/shape-outside-circle-007-expected.txt
LayoutTests/css3/shapes/shape-outside/values/shape-outside-circle-008-expected.txt
LayoutTests/css3/shapes/shape-outside/values/shape-outside-ellipse-003-expected.txt
LayoutTests/css3/shapes/shape-outside/values/shape-outside-ellipse-006-expected.txt
LayoutTests/css3/shapes/shape-outside/values/shape-outside-ellipse-007-expected.txt
LayoutTests/css3/shapes/shape-outside/values/shape-outside-ellipse-008-expected.txt
LayoutTests/css3/shapes/shape-outside/values/shape-outside-inset-005-expected.txt
LayoutTests/css3/shapes/shape-outside/values/shape-outside-inset-006-expected.txt
LayoutTests/css3/shapes/shape-outside/values/shape-outside-inset-007-expected.txt
LayoutTests/css3/shapes/shape-outside/values/shape-outside-polygon-003-expected.txt
LayoutTests/fast/backgrounds/repeat/parsing-background-repeat-expected.txt
LayoutTests/fast/backgrounds/repeat/script-tests/parsing-background-repeat.js
LayoutTests/fast/backgrounds/size/parsing-background-size-values-expected.txt
LayoutTests/fast/backgrounds/size/resources/parsing-background-size-values.js
LayoutTests/fast/box-decoration-break/box-decoration-break-parsing-expected.txt
LayoutTests/fast/box-decoration-break/box-decoration-break-parsing.html
LayoutTests/fast/box-shadow/box-shadow-parsing-invalid-expected.txt
LayoutTests/fast/box-shadow/script-tests/box-shadow-parsing-invalid.js
LayoutTests/fast/css/background-clip-text-expected.txt
LayoutTests/fast/css/border-spacing-without-vertical-value.html
LayoutTests/fast/css/getPropertyValue-border-expected.txt
LayoutTests/fast/css/getPropertyValue-border.html
LayoutTests/fast/css/getPropertyValue-column-rule-expected.txt
LayoutTests/fast/css/getPropertyValue-column-rule.html
LayoutTests/fast/css/getPropertyValue-columns-expected.txt
LayoutTests/fast/css/getPropertyValue-columns.html
LayoutTests/fast/css/getPropertyValue-returns-empty-on-missing-property-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/getPropertyValue-returns-empty-on-missing-property.html [new file with mode: 0644]
LayoutTests/fast/css/getPropertyValue-webkit-margin-collapse-expected.txt
LayoutTests/fast/css/getPropertyValue-webkit-margin-collapse.html
LayoutTests/fast/css/getPropertyValue-webkit-marquee-expected.txt
LayoutTests/fast/css/getPropertyValue-webkit-marquee.html
LayoutTests/fast/css/getPropertyValue-webkit-text-stroke-expected.txt
LayoutTests/fast/css/getPropertyValue-webkit-text-stroke.html
LayoutTests/fast/css/line-height-text-autosizing.html
LayoutTests/fast/css/outline-offset-parsing-expected.txt
LayoutTests/fast/css/parsing-color-correction-expected.txt
LayoutTests/fast/css/parsing-object-fit-expected.txt
LayoutTests/fast/css/parsing-object-fit.html
LayoutTests/fast/css/parsing-text-rendering-expected.txt
LayoutTests/fast/css/parsing-webkit-font-smoothing-expected.txt
LayoutTests/fast/css/resources/parsing-color-correction.js
LayoutTests/fast/css/resources/parsing-text-rendering.js
LayoutTests/fast/css/resources/parsing-webkit-font-smoothing.js
LayoutTests/fast/css/script-tests/background-clip-text.js
LayoutTests/fast/css/script-tests/outline-offset-parsing.js
LayoutTests/fast/css/script-tests/transform-origin-parsing.js
LayoutTests/fast/css/sticky/parsing-position-sticky-expected.txt
LayoutTests/fast/css/sticky/resources/parsing-position-sticky.js
LayoutTests/fast/css/transform-origin-parsing-expected.txt
LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip-expected.txt
LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip.html
LayoutTests/fast/css3-text/font-synthesis-parse-expected.txt
LayoutTests/fast/css3-text/font-synthesis-parse.html
LayoutTests/fast/filter-image/parse-filter-image-expected.txt
LayoutTests/fast/filter-image/parse-filter-image.html
LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt
LayoutTests/fast/masking/parsing-clip-path-shape.html
LayoutTests/fast/masking/parsing-mask-expected.txt
LayoutTests/fast/masking/parsing-mask.html
LayoutTests/fast/shapes/css-shapes-disabled-expected.txt
LayoutTests/fast/shapes/css-shapes-disabled.html
LayoutTests/fast/shapes/parsing/parsing-shape-lengths-expected.txt
LayoutTests/fast/shapes/parsing/parsing-shape-lengths.html
LayoutTests/platform/mac/fast/css/dashboard-region-parser-expected.txt
LayoutTests/platform/mac/fast/css/dashboard-region-parser.html
LayoutTests/platform/mac/fast/text/trailing-word-parse-expected.txt
LayoutTests/platform/mac/fast/text/trailing-word-parse.html
LayoutTests/svg/paint-order/parsing-paint-order-expected.txt
LayoutTests/svg/paint-order/parsing-paint-order.html
Source/WebCore/ChangeLog
Source/WebCore/css/CSSStyleDeclaration.idl