haikuwebkit/LayoutTests/css3/filters/unprefixed.html

315 lines
11 KiB
HTML
Raw Permalink Normal View History

Support CSS filters without webkit prefix https://bugs.webkit.org/show_bug.cgi?id=148138 <rdar://problem/22331434> Reviewed by Sam Weinig. Source/WebCore: Add support for the un-prefixed form of the CSS filter property. This was straightforward for the general case on HTML content. It was a bit more tricky on SVG content, where there already was an existing "filter" property/attribute. The parsing code is now shared between SVG and HTML, as is the computed style output. Covered by updating the existing tests, and adding one new test: css3/filters/unprefixed.html * css/CSSComputedStyleDeclaration.cpp: Rename CSSPropertyWebkitFilter to CSSPropertyFilter. (WebCore::isLayoutDependent): (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSFilterImageValue.cpp: (WebCore::CSSFilterImageValue::customCSSText): Use "filter(" as the prefix. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Rename CSSPropertyWebkitFilter to CSSPropertyFilter. (WebCore::CSSParser::isGeneratedImageValue): Add support for "filter()". (WebCore::CSSParser::parseGeneratedImage): Ditto. (WebCore::CSSParser::parseBuiltinFilterArguments): * css/CSSPropertyNames.in: Add filter. Make -webkit-filter an alias. * css/SVGCSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::svgPropertyValue): Deleted. * page/animation/CSSPropertyAnimation.cpp: Rename CSSPropertyWebkitFilter to CSSPropertyFilter. (WebCore::PropertyWrapperAcceleratedFilter::PropertyWrapperAcceleratedFilter): * page/animation/KeyframeAnimation.cpp: Ditto. (WebCore::KeyframeAnimation::checkForMatchingFilterFunctionLists): * platform/graphics/GraphicsLayer.cpp: Rename AnimatedPropertyWebkitFilter to AnimatedPropertyFilter. (WebCore::GraphicsLayer::validateFilterOperations): * platform/graphics/GraphicsLayerClient.h: Ditto. * platform/graphics/ca/GraphicsLayerCA.cpp: Ditto. (WebCore::GraphicsLayerCA::moveOrCopyAnimations): (WebCore::GraphicsLayerCA::addAnimation): (WebCore::GraphicsLayerCA::createAnimationFromKeyframes): (WebCore::GraphicsLayerCA::createFilterAnimationsFromKeyframes): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateOrRemoveFilterClients): SVG manages its own filter resources, so we shouldn't add a layer that has an SVG root to the filter clients. * rendering/RenderLayerBacking.cpp: Renaming. (WebCore::RenderLayerBacking::startAnimation): (WebCore::RenderLayerBacking::startTransition): (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty): (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty): * rendering/RenderLayerCompositor.cpp: Ditto. (WebCore::RenderLayerCompositor::requiresCompositingForAnimation): * rendering/style/SVGRenderStyle.h: Remove the SVG filter style. (WebCore::SVGRenderStyle::isolatesBlending): No need to check for hasFilter(). (WebCore::SVGRenderStyle::initialFilterResource): Deleted. (WebCore::SVGRenderStyle::setFilterResource): Deleted. (WebCore::SVGRenderStyle::filterResource): Deleted. (WebCore::SVGRenderStyle::hasFilter): Deleted. * rendering/style/SVGRenderStyleDefs.cpp: Remove the filter resource. (WebCore::StyleResourceData::StyleResourceData): Deleted. (WebCore::StyleResourceData::operator==): Deleted. * rendering/style/SVGRenderStyleDefs.h: * rendering/style/WillChangeData.cpp: Renaming. (WebCore::propertyCreatesStackingContext): (WebCore::propertyTriggersCompositing): * rendering/svg/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::isolatesBlending): Since SVGRenderStyle no longer checks hasFilter() in its isolatesBlending(), we need to do it here. * rendering/svg/SVGRenderingContext.cpp: (WebCore::SVGRenderingContext::prepareToRenderSVGContent): * rendering/svg/SVGRenderTreeAsText.cpp: (WebCore::writeResources): Dump from the CSS style value. * rendering/svg/SVGResources.cpp: Ditto. (WebCore::SVGResources::buildCachedResources): * rendering/svg/SVGResources.h: * rendering/svg/SVGResourcesCache.cpp: (WebCore::SVGResourcesCache::addResourcesFromRenderer): * platform/graphics/texmap/TextureMapperLayer.cpp: Renaming. * platform/graphics/texmap/TextureMapperAnimation.cpp: * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: Source/WebKit2: Rename WebkitFilter to Filter. * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: (IPC::ArgumentCoder<TextureMapperAnimation>::encode): (IPC::ArgumentCoder<TextureMapperAnimation>::decode): LayoutTests: Globally change -webkit-filter to filter in as many places as possible. Then add a new test that makes sure the prefixed and unprefixed value resolve to the same computed style. * animations/resources/animation-test-helpers.js: (parseCSSImage): * css3/filters/backdrop/effect-hw-expected.html: * css3/filters/effect-blur-hw.html: * css3/filters/effect-blur.html: * css3/filters/effect-brightness-clamping-hw.html: * css3/filters/effect-brightness-clamping.html: * css3/filters/effect-brightness-hw.html: * css3/filters/effect-brightness.html: * css3/filters/effect-combined-hw.html: * css3/filters/effect-combined.html: * css3/filters/effect-contrast-hw.html: * css3/filters/effect-contrast.html: * css3/filters/effect-drop-shadow-hw.html: * css3/filters/effect-drop-shadow.html: * css3/filters/effect-grayscale-hw.html: * css3/filters/effect-grayscale.html: * css3/filters/effect-hue-rotate-hw.html: * css3/filters/effect-hue-rotate.html: * css3/filters/effect-invert-hw.html: * css3/filters/effect-invert.html: * css3/filters/effect-opacity-hw.html: * css3/filters/effect-opacity.html: * css3/filters/effect-reference-composite-hw.html: * css3/filters/effect-reference-composite.html: * css3/filters/effect-reference-hw.html: * css3/filters/effect-reference-ordering-hw.html: * css3/filters/effect-reference-ordering.html: * css3/filters/effect-reference.html: * css3/filters/effect-saturate-hw.html: * css3/filters/effect-saturate.html: * css3/filters/effect-sepia-hw.html: * css3/filters/effect-sepia.html: * css3/filters/filter-property-computed-style-expected.txt: * css3/filters/filter-property-parsing-expected.txt: * css3/filters/script-tests/filter-property-computed-style.js: (testComputedFilterRule): * css3/filters/script-tests/filter-property-parsing.js: (testFilterRule): * css3/filters/script-tests/unprefixed.js: Copied from LayoutTests/css3/filters/script-tests/filter-property-computed-style.js. (testComputedFilterRule): * css3/filters/unprefixed-expected.txt: Copied from LayoutTests/css3/filters/filter-property-computed-style-expected.txt. * css3/filters/unprefixed.html: Added. * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/filter-image/clipped-filter-expected.html: * fast/filter-image/clipped-filter.html: * fast/filter-image/filter-image-animation-expected.txt: * fast/filter-image/filter-image-animation.html: * fast/filter-image/filter-image-blur.html: * fast/filter-image/filter-image-expected.html: * fast/filter-image/filter-image-svg.html: * fast/filter-image/filter-image.html: * fast/filter-image/parse-filter-image-expected.txt: * fast/filter-image/parse-filter-image.html: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/166305@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-08-19 20:22:50 +00:00
<!DOCTYPE HTML>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
Remove WebKitCSSFilterValue to make Hyatt happy https://bugs.webkit.org/show_bug.cgi?id=164289 <rdar://problems/29050973> Reviewed by Simon Fraser. Source/WebCore: The new CSS parser should not use WebKitCSSFilterValue. It's non-standard, very likely only used in our tests, doesn't provide much benefit, and will be covered by the new CSSOM function interface. Covered by modifying existing tests. * DerivedSources.make: Remove WebKitCSSFilterValue.idl. * WebCore.xcodeproj/project.pbxproj: Make CSSFunctionValue.h private so API testing can see it. * bindings/js/JSCSSValueCustom.cpp: (WebCore::toJSNewlyCreated): No WebKitCSSFilterValue. * css/CSSComputedStyleDeclaration.cpp: Use CSSFunctionValue or CSSPrimitiveValue to build up the computed style. (WebCore::ComputedStyleExtractor::valueForFilter): * css/CSSValue.cpp: No WebKitCSSFilterValue. (WebCore::CSSValue::equals): (WebCore::CSSValue::cssText): (WebCore::CSSValue::destroy): (WebCore::CSSValue::cloneForCSSOM): * css/CSSValue.h: (WebCore::CSSValue::isFilterImageValue): (WebCore::CSSValue::isWebKitCSSFilterValue): Deleted. * css/StyleResolver.cpp: Resolve against CSSFunctionValues with CSSValueIDs as name, rather than WebKitCSSFilterValue. (WebCore::filterOperationForType): (WebCore::StyleResolver::createFilterOperations): * css/StyleResolver.h: * css/WebKitCSSFilterValue.cpp: Removed. * css/WebKitCSSFilterValue.h: Removed. * css/WebKitCSSFilterValue.idl: Removed. * css/parser/CSSParser.cpp: Parse into CSSPrimitiveValue and CSSFunctionValue. (WebCore::isValidPrimitiveFilterFunction): (WebCore::CSSParser::parseBuiltinFilterArguments): (WebCore::cssValueKeywordIDForFunctionName): (WebCore::CSSParser::parseFilter): (WebCore::filterInfoForName): Deleted. * css/parser/CSSParser.h: * css/parser/CSSPropertyParser.cpp: (WebCore::consumeFilterFunction): LayoutTests: Update the filters tests now that WebKitCSSFilterValue no longer exists. Unfortunately CSSFunctionValue isn't exposed to the Web, so we just rely on the cssText of the resulting CSSStyleDeclaration. I also moved all the script-tests into the HTML files, since there is no point them being separate. * css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt: * css3/filters/backdrop/backdropfilter-property-computed-style.html: * css3/filters/backdrop/backdropfilter-property-parsing-expected.txt: * css3/filters/backdrop/backdropfilter-property-parsing-invalid.html: * css3/filters/backdrop/backdropfilter-property-parsing.html: * css3/filters/backdrop/backdropfilter-property.html: * css3/filters/backdrop/script-tests/backdropfilter-property-computed-style.js: Removed. * css3/filters/backdrop/script-tests/backdropfilter-property-parsing-invalid.js: Removed. * css3/filters/backdrop/script-tests/backdropfilter-property-parsing.js: Removed. * css3/filters/backdrop/script-tests/backdropfilter-property.js: Removed. * css3/filters/effect-reference-delete-crash.html: * css3/filters/effect-reference-reset-style-delete-crash.html: * css3/filters/filter-property-computed-style-expected.txt: * css3/filters/filter-property-computed-style.html: * css3/filters/filter-property-parsing-expected.txt: * css3/filters/filter-property-parsing-invalid.html: * css3/filters/filter-property-parsing.html: * css3/filters/filter-property.html: * css3/filters/script-tests/TEMPLATE.html: Removed. * css3/filters/script-tests/effect-reference-delete-crash.js: Removed. * css3/filters/script-tests/effect-reference-reset-style-delete-crash.js: Removed. * css3/filters/script-tests/filter-property-computed-style.js: Removed. * css3/filters/script-tests/filter-property-parsing-invalid.js: Removed. * css3/filters/script-tests/filter-property-parsing.js: Removed. * css3/filters/script-tests/filter-property.js: Removed. * css3/filters/script-tests/unprefixed.js: Removed. * css3/filters/unprefixed-expected.txt: * css3/filters/unprefixed.html: Canonical link: https://commits.webkit.org/182019@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-11-01 22:31:52 +00:00
<script>
description("Test that -webkit-filter matches filter.");
// These have to be global for the test helpers to see them.
var stylesheet, filterStyle, subRule;
var styleElement = document.createElement("style");
document.head.appendChild(styleElement);
stylesheet = styleElement.sheet;
function testComputedFilterRule(description, rule, expectedLength, expectedTexts)
{
debug("");
debug(`${description} : ${rule}`);
stylesheet.insertRule(`body { -webkit-filter: ${rule}; }`, 0);
filterStyle = window.getComputedStyle(document.body).getPropertyCSSValue("filter");
shouldBe("filterStyle.length", "" + expectedLength);
for (var i = 0; i < expectedLength; i++) {
subRule = filterStyle[i];
Serialize all URLs with double-quotes per CSSOM spec https://bugs.webkit.org/show_bug.cgi?id=184935 Patch by Chris Nardi <cnardi@chromium.org> on 2018-05-04 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: Update expectations for using double quotes when serializing URLs. * web-platform-tests/cssom/serialize-values-expected.txt: * web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt: * web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: * web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt: Source/WebCore: According to https://drafts.csswg.org/cssom/#serialize-a-url, all URLs should be serialized as strings, which means they should have double quotes around the text of the URL. Update our implementation to match this (and Firefox/Chrome). Also remove isCSSTokenizerURL() as this method is no longer needed. Tests: Many LayoutTests updated to use double quotes. * css/CSSMarkup.cpp: (WebCore::serializeString): Remove FIXME as this was already fixed in a previous patch. (WebCore::serializeURL): Remove FIXME and update implementation. LayoutTests: Update tests to use double quotes when serializing URLs, and fixes for using double quotes in the test. * css3/calc/cross-fade-calc.html: * css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt: * css3/filters/backdrop/backdropfilter-property-computed-style.html: * css3/filters/backdrop/backdropfilter-property-parsing-expected.txt: * css3/filters/backdrop/backdropfilter-property-parsing.html: * css3/filters/filter-property-computed-style-expected.txt: * css3/filters/filter-property-computed-style.html: * css3/filters/filter-property-expected.txt: * css3/filters/filter-property-parsing-expected.txt: * css3/filters/filter-property-parsing.html: * css3/filters/filter-property.html: * css3/filters/unprefixed-expected.txt: * css3/filters/unprefixed.html: * fast/backgrounds/background-shorthand-after-set-backgroundSize-expected.txt: * fast/backgrounds/background-shorthand-after-set-backgroundSize.html: * fast/backgrounds/background-shorthand-with-backgroundSize-style-expected.txt: * fast/backgrounds/background-shorthand-with-backgroundSize-style.html: * fast/backgrounds/multiple-backgrounds-computed-style-expected.txt: * fast/backgrounds/multiple-backgrounds-computed-style.html: * fast/css/background-position-serialize-expected.txt: * fast/css/cursor-parsing-expected.txt: * fast/css/cursor-parsing-image-set-expected.txt: * fast/css/cursor-parsing-image-set.html: * fast/css/cursor-parsing.html: * fast/css/getComputedStyle/computed-style-border-image-expected.txt: * fast/css/getComputedStyle/computed-style-border-image.html: * fast/css/getComputedStyle/computed-style-cross-fade-expected.txt: * fast/css/getComputedStyle/computed-style-cross-fade.html: * fast/css/getComputedStyle/computed-style-properties-expected.txt: * fast/css/getComputedStyle/computed-style-properties.html: * fast/css/getComputedStyle/getComputedStyle-background-shorthand-expected.txt: * fast/css/getComputedStyle/getComputedStyle-background-shorthand.html: * fast/css/getComputedStyle/getComputedStyle-list-style-shorthand-expected.txt: * fast/css/getComputedStyle/getComputedStyle-list-style-shorthand.html: * fast/css/image-set-parsing.html: * fast/css/image-set-setting-expected.txt: * fast/css/image-set-setting.html: * fast/css/image-set-unprefixed-expected.txt: * fast/css/image-set-unprefixed.html: * fast/css/invalid-cursor-property-crash.html: * fast/css/parse-border-image-repeat-null-crash-expected.txt: * fast/css/uri-token-parsing-expected.txt: * fast/css/uri-token-parsing.html: * fast/css/url-with-multi-byte-unicode-escape-expected.txt: * fast/css/url-with-multi-byte-unicode-escape.html: * fast/filter-image/parse-filter-image-expected.txt: * fast/filter-image/parse-filter-image.html: * fast/innerHTML/innerHTML-uri-resolution.html: * fast/inspector-support/cssURLQuotes-expected.txt: * fast/inspector-support/cssURLQuotes.html: * fast/masking/parsing-clip-path-iri-expected.txt: * fast/masking/parsing-clip-path-iri.html: * fast/masking/parsing-mask-expected.txt: * fast/masking/parsing-mask.html: * fast/shapes/parsing/parsing-shape-outside-expected.txt: * fast/shapes/parsing/parsing-shape-outside.html: * fast/shapes/parsing/parsing-test-utils.js: (removeBaseURL): * platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt: * platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: * platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt: * platform/ios/fast/css/image-set-unprefixed-expected.txt: Removed. * platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt: * platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: * platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt: * platform/win/fast/css/parse-border-image-repeat-null-crash-expected.txt: * platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt: * platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: * platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt: * resources/image-preload-helper.js: (preloadImagesFromStyle): * svg/css/svg-attribute-parser-mode-expected.txt: * svg/css/svg-attribute-parser-mode.html: * svg/custom/marker-getPropertyValue-expected.txt: * svg/custom/marker-getPropertyValue.svg: Canonical link: https://commits.webkit.org/200792@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231359 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-05-04 17:32:48 +00:00
shouldBeEqualToString("subRule.cssText", expectedTexts[i]);
Remove WebKitCSSFilterValue to make Hyatt happy https://bugs.webkit.org/show_bug.cgi?id=164289 <rdar://problems/29050973> Reviewed by Simon Fraser. Source/WebCore: The new CSS parser should not use WebKitCSSFilterValue. It's non-standard, very likely only used in our tests, doesn't provide much benefit, and will be covered by the new CSSOM function interface. Covered by modifying existing tests. * DerivedSources.make: Remove WebKitCSSFilterValue.idl. * WebCore.xcodeproj/project.pbxproj: Make CSSFunctionValue.h private so API testing can see it. * bindings/js/JSCSSValueCustom.cpp: (WebCore::toJSNewlyCreated): No WebKitCSSFilterValue. * css/CSSComputedStyleDeclaration.cpp: Use CSSFunctionValue or CSSPrimitiveValue to build up the computed style. (WebCore::ComputedStyleExtractor::valueForFilter): * css/CSSValue.cpp: No WebKitCSSFilterValue. (WebCore::CSSValue::equals): (WebCore::CSSValue::cssText): (WebCore::CSSValue::destroy): (WebCore::CSSValue::cloneForCSSOM): * css/CSSValue.h: (WebCore::CSSValue::isFilterImageValue): (WebCore::CSSValue::isWebKitCSSFilterValue): Deleted. * css/StyleResolver.cpp: Resolve against CSSFunctionValues with CSSValueIDs as name, rather than WebKitCSSFilterValue. (WebCore::filterOperationForType): (WebCore::StyleResolver::createFilterOperations): * css/StyleResolver.h: * css/WebKitCSSFilterValue.cpp: Removed. * css/WebKitCSSFilterValue.h: Removed. * css/WebKitCSSFilterValue.idl: Removed. * css/parser/CSSParser.cpp: Parse into CSSPrimitiveValue and CSSFunctionValue. (WebCore::isValidPrimitiveFilterFunction): (WebCore::CSSParser::parseBuiltinFilterArguments): (WebCore::cssValueKeywordIDForFunctionName): (WebCore::CSSParser::parseFilter): (WebCore::filterInfoForName): Deleted. * css/parser/CSSParser.h: * css/parser/CSSPropertyParser.cpp: (WebCore::consumeFilterFunction): LayoutTests: Update the filters tests now that WebKitCSSFilterValue no longer exists. Unfortunately CSSFunctionValue isn't exposed to the Web, so we just rely on the cssText of the resulting CSSStyleDeclaration. I also moved all the script-tests into the HTML files, since there is no point them being separate. * css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt: * css3/filters/backdrop/backdropfilter-property-computed-style.html: * css3/filters/backdrop/backdropfilter-property-parsing-expected.txt: * css3/filters/backdrop/backdropfilter-property-parsing-invalid.html: * css3/filters/backdrop/backdropfilter-property-parsing.html: * css3/filters/backdrop/backdropfilter-property.html: * css3/filters/backdrop/script-tests/backdropfilter-property-computed-style.js: Removed. * css3/filters/backdrop/script-tests/backdropfilter-property-parsing-invalid.js: Removed. * css3/filters/backdrop/script-tests/backdropfilter-property-parsing.js: Removed. * css3/filters/backdrop/script-tests/backdropfilter-property.js: Removed. * css3/filters/effect-reference-delete-crash.html: * css3/filters/effect-reference-reset-style-delete-crash.html: * css3/filters/filter-property-computed-style-expected.txt: * css3/filters/filter-property-computed-style.html: * css3/filters/filter-property-parsing-expected.txt: * css3/filters/filter-property-parsing-invalid.html: * css3/filters/filter-property-parsing.html: * css3/filters/filter-property.html: * css3/filters/script-tests/TEMPLATE.html: Removed. * css3/filters/script-tests/effect-reference-delete-crash.js: Removed. * css3/filters/script-tests/effect-reference-reset-style-delete-crash.js: Removed. * css3/filters/script-tests/filter-property-computed-style.js: Removed. * css3/filters/script-tests/filter-property-parsing-invalid.js: Removed. * css3/filters/script-tests/filter-property-parsing.js: Removed. * css3/filters/script-tests/filter-property.js: Removed. * css3/filters/script-tests/unprefixed.js: Removed. * css3/filters/unprefixed-expected.txt: * css3/filters/unprefixed.html: Canonical link: https://commits.webkit.org/182019@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-11-01 22:31:52 +00:00
}
stylesheet.deleteRule(0);
}
testComputedFilterRule("Basic reference",
"url('#a')", 1,
Serialize all URLs with double-quotes per CSSOM spec https://bugs.webkit.org/show_bug.cgi?id=184935 Patch by Chris Nardi <cnardi@chromium.org> on 2018-05-04 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: Update expectations for using double quotes when serializing URLs. * web-platform-tests/cssom/serialize-values-expected.txt: * web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt: * web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: * web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt: Source/WebCore: According to https://drafts.csswg.org/cssom/#serialize-a-url, all URLs should be serialized as strings, which means they should have double quotes around the text of the URL. Update our implementation to match this (and Firefox/Chrome). Also remove isCSSTokenizerURL() as this method is no longer needed. Tests: Many LayoutTests updated to use double quotes. * css/CSSMarkup.cpp: (WebCore::serializeString): Remove FIXME as this was already fixed in a previous patch. (WebCore::serializeURL): Remove FIXME and update implementation. LayoutTests: Update tests to use double quotes when serializing URLs, and fixes for using double quotes in the test. * css3/calc/cross-fade-calc.html: * css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt: * css3/filters/backdrop/backdropfilter-property-computed-style.html: * css3/filters/backdrop/backdropfilter-property-parsing-expected.txt: * css3/filters/backdrop/backdropfilter-property-parsing.html: * css3/filters/filter-property-computed-style-expected.txt: * css3/filters/filter-property-computed-style.html: * css3/filters/filter-property-expected.txt: * css3/filters/filter-property-parsing-expected.txt: * css3/filters/filter-property-parsing.html: * css3/filters/filter-property.html: * css3/filters/unprefixed-expected.txt: * css3/filters/unprefixed.html: * fast/backgrounds/background-shorthand-after-set-backgroundSize-expected.txt: * fast/backgrounds/background-shorthand-after-set-backgroundSize.html: * fast/backgrounds/background-shorthand-with-backgroundSize-style-expected.txt: * fast/backgrounds/background-shorthand-with-backgroundSize-style.html: * fast/backgrounds/multiple-backgrounds-computed-style-expected.txt: * fast/backgrounds/multiple-backgrounds-computed-style.html: * fast/css/background-position-serialize-expected.txt: * fast/css/cursor-parsing-expected.txt: * fast/css/cursor-parsing-image-set-expected.txt: * fast/css/cursor-parsing-image-set.html: * fast/css/cursor-parsing.html: * fast/css/getComputedStyle/computed-style-border-image-expected.txt: * fast/css/getComputedStyle/computed-style-border-image.html: * fast/css/getComputedStyle/computed-style-cross-fade-expected.txt: * fast/css/getComputedStyle/computed-style-cross-fade.html: * fast/css/getComputedStyle/computed-style-properties-expected.txt: * fast/css/getComputedStyle/computed-style-properties.html: * fast/css/getComputedStyle/getComputedStyle-background-shorthand-expected.txt: * fast/css/getComputedStyle/getComputedStyle-background-shorthand.html: * fast/css/getComputedStyle/getComputedStyle-list-style-shorthand-expected.txt: * fast/css/getComputedStyle/getComputedStyle-list-style-shorthand.html: * fast/css/image-set-parsing.html: * fast/css/image-set-setting-expected.txt: * fast/css/image-set-setting.html: * fast/css/image-set-unprefixed-expected.txt: * fast/css/image-set-unprefixed.html: * fast/css/invalid-cursor-property-crash.html: * fast/css/parse-border-image-repeat-null-crash-expected.txt: * fast/css/uri-token-parsing-expected.txt: * fast/css/uri-token-parsing.html: * fast/css/url-with-multi-byte-unicode-escape-expected.txt: * fast/css/url-with-multi-byte-unicode-escape.html: * fast/filter-image/parse-filter-image-expected.txt: * fast/filter-image/parse-filter-image.html: * fast/innerHTML/innerHTML-uri-resolution.html: * fast/inspector-support/cssURLQuotes-expected.txt: * fast/inspector-support/cssURLQuotes.html: * fast/masking/parsing-clip-path-iri-expected.txt: * fast/masking/parsing-clip-path-iri.html: * fast/masking/parsing-mask-expected.txt: * fast/masking/parsing-mask.html: * fast/shapes/parsing/parsing-shape-outside-expected.txt: * fast/shapes/parsing/parsing-shape-outside.html: * fast/shapes/parsing/parsing-test-utils.js: (removeBaseURL): * platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt: * platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: * platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt: * platform/ios/fast/css/image-set-unprefixed-expected.txt: Removed. * platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt: * platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: * platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt: * platform/win/fast/css/parse-border-image-repeat-null-crash-expected.txt: * platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt: * platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: * platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt: * resources/image-preload-helper.js: (preloadImagesFromStyle): * svg/css/svg-attribute-parser-mode-expected.txt: * svg/css/svg-attribute-parser-mode.html: * svg/custom/marker-getPropertyValue-expected.txt: * svg/custom/marker-getPropertyValue.svg: Canonical link: https://commits.webkit.org/200792@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231359 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-05-04 17:32:48 +00:00
['url("#a")']);
Remove WebKitCSSFilterValue to make Hyatt happy https://bugs.webkit.org/show_bug.cgi?id=164289 <rdar://problems/29050973> Reviewed by Simon Fraser. Source/WebCore: The new CSS parser should not use WebKitCSSFilterValue. It's non-standard, very likely only used in our tests, doesn't provide much benefit, and will be covered by the new CSSOM function interface. Covered by modifying existing tests. * DerivedSources.make: Remove WebKitCSSFilterValue.idl. * WebCore.xcodeproj/project.pbxproj: Make CSSFunctionValue.h private so API testing can see it. * bindings/js/JSCSSValueCustom.cpp: (WebCore::toJSNewlyCreated): No WebKitCSSFilterValue. * css/CSSComputedStyleDeclaration.cpp: Use CSSFunctionValue or CSSPrimitiveValue to build up the computed style. (WebCore::ComputedStyleExtractor::valueForFilter): * css/CSSValue.cpp: No WebKitCSSFilterValue. (WebCore::CSSValue::equals): (WebCore::CSSValue::cssText): (WebCore::CSSValue::destroy): (WebCore::CSSValue::cloneForCSSOM): * css/CSSValue.h: (WebCore::CSSValue::isFilterImageValue): (WebCore::CSSValue::isWebKitCSSFilterValue): Deleted. * css/StyleResolver.cpp: Resolve against CSSFunctionValues with CSSValueIDs as name, rather than WebKitCSSFilterValue. (WebCore::filterOperationForType): (WebCore::StyleResolver::createFilterOperations): * css/StyleResolver.h: * css/WebKitCSSFilterValue.cpp: Removed. * css/WebKitCSSFilterValue.h: Removed. * css/WebKitCSSFilterValue.idl: Removed. * css/parser/CSSParser.cpp: Parse into CSSPrimitiveValue and CSSFunctionValue. (WebCore::isValidPrimitiveFilterFunction): (WebCore::CSSParser::parseBuiltinFilterArguments): (WebCore::cssValueKeywordIDForFunctionName): (WebCore::CSSParser::parseFilter): (WebCore::filterInfoForName): Deleted. * css/parser/CSSParser.h: * css/parser/CSSPropertyParser.cpp: (WebCore::consumeFilterFunction): LayoutTests: Update the filters tests now that WebKitCSSFilterValue no longer exists. Unfortunately CSSFunctionValue isn't exposed to the Web, so we just rely on the cssText of the resulting CSSStyleDeclaration. I also moved all the script-tests into the HTML files, since there is no point them being separate. * css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt: * css3/filters/backdrop/backdropfilter-property-computed-style.html: * css3/filters/backdrop/backdropfilter-property-parsing-expected.txt: * css3/filters/backdrop/backdropfilter-property-parsing-invalid.html: * css3/filters/backdrop/backdropfilter-property-parsing.html: * css3/filters/backdrop/backdropfilter-property.html: * css3/filters/backdrop/script-tests/backdropfilter-property-computed-style.js: Removed. * css3/filters/backdrop/script-tests/backdropfilter-property-parsing-invalid.js: Removed. * css3/filters/backdrop/script-tests/backdropfilter-property-parsing.js: Removed. * css3/filters/backdrop/script-tests/backdropfilter-property.js: Removed. * css3/filters/effect-reference-delete-crash.html: * css3/filters/effect-reference-reset-style-delete-crash.html: * css3/filters/filter-property-computed-style-expected.txt: * css3/filters/filter-property-computed-style.html: * css3/filters/filter-property-parsing-expected.txt: * css3/filters/filter-property-parsing-invalid.html: * css3/filters/filter-property-parsing.html: * css3/filters/filter-property.html: * css3/filters/script-tests/TEMPLATE.html: Removed. * css3/filters/script-tests/effect-reference-delete-crash.js: Removed. * css3/filters/script-tests/effect-reference-reset-style-delete-crash.js: Removed. * css3/filters/script-tests/filter-property-computed-style.js: Removed. * css3/filters/script-tests/filter-property-parsing-invalid.js: Removed. * css3/filters/script-tests/filter-property-parsing.js: Removed. * css3/filters/script-tests/filter-property.js: Removed. * css3/filters/script-tests/unprefixed.js: Removed. * css3/filters/unprefixed-expected.txt: * css3/filters/unprefixed.html: Canonical link: https://commits.webkit.org/182019@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-11-01 22:31:52 +00:00
testComputedFilterRule("Bare unquoted reference converting to quoted form",
"url(#a)", 1,
Serialize all URLs with double-quotes per CSSOM spec https://bugs.webkit.org/show_bug.cgi?id=184935 Patch by Chris Nardi <cnardi@chromium.org> on 2018-05-04 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: Update expectations for using double quotes when serializing URLs. * web-platform-tests/cssom/serialize-values-expected.txt: * web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt: * web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: * web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt: Source/WebCore: According to https://drafts.csswg.org/cssom/#serialize-a-url, all URLs should be serialized as strings, which means they should have double quotes around the text of the URL. Update our implementation to match this (and Firefox/Chrome). Also remove isCSSTokenizerURL() as this method is no longer needed. Tests: Many LayoutTests updated to use double quotes. * css/CSSMarkup.cpp: (WebCore::serializeString): Remove FIXME as this was already fixed in a previous patch. (WebCore::serializeURL): Remove FIXME and update implementation. LayoutTests: Update tests to use double quotes when serializing URLs, and fixes for using double quotes in the test. * css3/calc/cross-fade-calc.html: * css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt: * css3/filters/backdrop/backdropfilter-property-computed-style.html: * css3/filters/backdrop/backdropfilter-property-parsing-expected.txt: * css3/filters/backdrop/backdropfilter-property-parsing.html: * css3/filters/filter-property-computed-style-expected.txt: * css3/filters/filter-property-computed-style.html: * css3/filters/filter-property-expected.txt: * css3/filters/filter-property-parsing-expected.txt: * css3/filters/filter-property-parsing.html: * css3/filters/filter-property.html: * css3/filters/unprefixed-expected.txt: * css3/filters/unprefixed.html: * fast/backgrounds/background-shorthand-after-set-backgroundSize-expected.txt: * fast/backgrounds/background-shorthand-after-set-backgroundSize.html: * fast/backgrounds/background-shorthand-with-backgroundSize-style-expected.txt: * fast/backgrounds/background-shorthand-with-backgroundSize-style.html: * fast/backgrounds/multiple-backgrounds-computed-style-expected.txt: * fast/backgrounds/multiple-backgrounds-computed-style.html: * fast/css/background-position-serialize-expected.txt: * fast/css/cursor-parsing-expected.txt: * fast/css/cursor-parsing-image-set-expected.txt: * fast/css/cursor-parsing-image-set.html: * fast/css/cursor-parsing.html: * fast/css/getComputedStyle/computed-style-border-image-expected.txt: * fast/css/getComputedStyle/computed-style-border-image.html: * fast/css/getComputedStyle/computed-style-cross-fade-expected.txt: * fast/css/getComputedStyle/computed-style-cross-fade.html: * fast/css/getComputedStyle/computed-style-properties-expected.txt: * fast/css/getComputedStyle/computed-style-properties.html: * fast/css/getComputedStyle/getComputedStyle-background-shorthand-expected.txt: * fast/css/getComputedStyle/getComputedStyle-background-shorthand.html: * fast/css/getComputedStyle/getComputedStyle-list-style-shorthand-expected.txt: * fast/css/getComputedStyle/getComputedStyle-list-style-shorthand.html: * fast/css/image-set-parsing.html: * fast/css/image-set-setting-expected.txt: * fast/css/image-set-setting.html: * fast/css/image-set-unprefixed-expected.txt: * fast/css/image-set-unprefixed.html: * fast/css/invalid-cursor-property-crash.html: * fast/css/parse-border-image-repeat-null-crash-expected.txt: * fast/css/uri-token-parsing-expected.txt: * fast/css/uri-token-parsing.html: * fast/css/url-with-multi-byte-unicode-escape-expected.txt: * fast/css/url-with-multi-byte-unicode-escape.html: * fast/filter-image/parse-filter-image-expected.txt: * fast/filter-image/parse-filter-image.html: * fast/innerHTML/innerHTML-uri-resolution.html: * fast/inspector-support/cssURLQuotes-expected.txt: * fast/inspector-support/cssURLQuotes.html: * fast/masking/parsing-clip-path-iri-expected.txt: * fast/masking/parsing-clip-path-iri.html: * fast/masking/parsing-mask-expected.txt: * fast/masking/parsing-mask.html: * fast/shapes/parsing/parsing-shape-outside-expected.txt: * fast/shapes/parsing/parsing-shape-outside.html: * fast/shapes/parsing/parsing-test-utils.js: (removeBaseURL): * platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt: * platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: * platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt: * platform/ios/fast/css/image-set-unprefixed-expected.txt: Removed. * platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt: * platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: * platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt: * platform/win/fast/css/parse-border-image-repeat-null-crash-expected.txt: * platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt: * platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: * platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt: * resources/image-preload-helper.js: (preloadImagesFromStyle): * svg/css/svg-attribute-parser-mode-expected.txt: * svg/css/svg-attribute-parser-mode.html: * svg/custom/marker-getPropertyValue-expected.txt: * svg/custom/marker-getPropertyValue.svg: Canonical link: https://commits.webkit.org/200792@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231359 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-05-04 17:32:48 +00:00
['url("#a")']);
Remove WebKitCSSFilterValue to make Hyatt happy https://bugs.webkit.org/show_bug.cgi?id=164289 <rdar://problems/29050973> Reviewed by Simon Fraser. Source/WebCore: The new CSS parser should not use WebKitCSSFilterValue. It's non-standard, very likely only used in our tests, doesn't provide much benefit, and will be covered by the new CSSOM function interface. Covered by modifying existing tests. * DerivedSources.make: Remove WebKitCSSFilterValue.idl. * WebCore.xcodeproj/project.pbxproj: Make CSSFunctionValue.h private so API testing can see it. * bindings/js/JSCSSValueCustom.cpp: (WebCore::toJSNewlyCreated): No WebKitCSSFilterValue. * css/CSSComputedStyleDeclaration.cpp: Use CSSFunctionValue or CSSPrimitiveValue to build up the computed style. (WebCore::ComputedStyleExtractor::valueForFilter): * css/CSSValue.cpp: No WebKitCSSFilterValue. (WebCore::CSSValue::equals): (WebCore::CSSValue::cssText): (WebCore::CSSValue::destroy): (WebCore::CSSValue::cloneForCSSOM): * css/CSSValue.h: (WebCore::CSSValue::isFilterImageValue): (WebCore::CSSValue::isWebKitCSSFilterValue): Deleted. * css/StyleResolver.cpp: Resolve against CSSFunctionValues with CSSValueIDs as name, rather than WebKitCSSFilterValue. (WebCore::filterOperationForType): (WebCore::StyleResolver::createFilterOperations): * css/StyleResolver.h: * css/WebKitCSSFilterValue.cpp: Removed. * css/WebKitCSSFilterValue.h: Removed. * css/WebKitCSSFilterValue.idl: Removed. * css/parser/CSSParser.cpp: Parse into CSSPrimitiveValue and CSSFunctionValue. (WebCore::isValidPrimitiveFilterFunction): (WebCore::CSSParser::parseBuiltinFilterArguments): (WebCore::cssValueKeywordIDForFunctionName): (WebCore::CSSParser::parseFilter): (WebCore::filterInfoForName): Deleted. * css/parser/CSSParser.h: * css/parser/CSSPropertyParser.cpp: (WebCore::consumeFilterFunction): LayoutTests: Update the filters tests now that WebKitCSSFilterValue no longer exists. Unfortunately CSSFunctionValue isn't exposed to the Web, so we just rely on the cssText of the resulting CSSStyleDeclaration. I also moved all the script-tests into the HTML files, since there is no point them being separate. * css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt: * css3/filters/backdrop/backdropfilter-property-computed-style.html: * css3/filters/backdrop/backdropfilter-property-parsing-expected.txt: * css3/filters/backdrop/backdropfilter-property-parsing-invalid.html: * css3/filters/backdrop/backdropfilter-property-parsing.html: * css3/filters/backdrop/backdropfilter-property.html: * css3/filters/backdrop/script-tests/backdropfilter-property-computed-style.js: Removed. * css3/filters/backdrop/script-tests/backdropfilter-property-parsing-invalid.js: Removed. * css3/filters/backdrop/script-tests/backdropfilter-property-parsing.js: Removed. * css3/filters/backdrop/script-tests/backdropfilter-property.js: Removed. * css3/filters/effect-reference-delete-crash.html: * css3/filters/effect-reference-reset-style-delete-crash.html: * css3/filters/filter-property-computed-style-expected.txt: * css3/filters/filter-property-computed-style.html: * css3/filters/filter-property-parsing-expected.txt: * css3/filters/filter-property-parsing-invalid.html: * css3/filters/filter-property-parsing.html: * css3/filters/filter-property.html: * css3/filters/script-tests/TEMPLATE.html: Removed. * css3/filters/script-tests/effect-reference-delete-crash.js: Removed. * css3/filters/script-tests/effect-reference-reset-style-delete-crash.js: Removed. * css3/filters/script-tests/filter-property-computed-style.js: Removed. * css3/filters/script-tests/filter-property-parsing-invalid.js: Removed. * css3/filters/script-tests/filter-property-parsing.js: Removed. * css3/filters/script-tests/filter-property.js: Removed. * css3/filters/script-tests/unprefixed.js: Removed. * css3/filters/unprefixed-expected.txt: * css3/filters/unprefixed.html: Canonical link: https://commits.webkit.org/182019@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-11-01 22:31:52 +00:00
testComputedFilterRule("Multiple references",
"url('#a') url('#b')", 2,
Serialize all URLs with double-quotes per CSSOM spec https://bugs.webkit.org/show_bug.cgi?id=184935 Patch by Chris Nardi <cnardi@chromium.org> on 2018-05-04 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: Update expectations for using double quotes when serializing URLs. * web-platform-tests/cssom/serialize-values-expected.txt: * web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt: * web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: * web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt: Source/WebCore: According to https://drafts.csswg.org/cssom/#serialize-a-url, all URLs should be serialized as strings, which means they should have double quotes around the text of the URL. Update our implementation to match this (and Firefox/Chrome). Also remove isCSSTokenizerURL() as this method is no longer needed. Tests: Many LayoutTests updated to use double quotes. * css/CSSMarkup.cpp: (WebCore::serializeString): Remove FIXME as this was already fixed in a previous patch. (WebCore::serializeURL): Remove FIXME and update implementation. LayoutTests: Update tests to use double quotes when serializing URLs, and fixes for using double quotes in the test. * css3/calc/cross-fade-calc.html: * css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt: * css3/filters/backdrop/backdropfilter-property-computed-style.html: * css3/filters/backdrop/backdropfilter-property-parsing-expected.txt: * css3/filters/backdrop/backdropfilter-property-parsing.html: * css3/filters/filter-property-computed-style-expected.txt: * css3/filters/filter-property-computed-style.html: * css3/filters/filter-property-expected.txt: * css3/filters/filter-property-parsing-expected.txt: * css3/filters/filter-property-parsing.html: * css3/filters/filter-property.html: * css3/filters/unprefixed-expected.txt: * css3/filters/unprefixed.html: * fast/backgrounds/background-shorthand-after-set-backgroundSize-expected.txt: * fast/backgrounds/background-shorthand-after-set-backgroundSize.html: * fast/backgrounds/background-shorthand-with-backgroundSize-style-expected.txt: * fast/backgrounds/background-shorthand-with-backgroundSize-style.html: * fast/backgrounds/multiple-backgrounds-computed-style-expected.txt: * fast/backgrounds/multiple-backgrounds-computed-style.html: * fast/css/background-position-serialize-expected.txt: * fast/css/cursor-parsing-expected.txt: * fast/css/cursor-parsing-image-set-expected.txt: * fast/css/cursor-parsing-image-set.html: * fast/css/cursor-parsing.html: * fast/css/getComputedStyle/computed-style-border-image-expected.txt: * fast/css/getComputedStyle/computed-style-border-image.html: * fast/css/getComputedStyle/computed-style-cross-fade-expected.txt: * fast/css/getComputedStyle/computed-style-cross-fade.html: * fast/css/getComputedStyle/computed-style-properties-expected.txt: * fast/css/getComputedStyle/computed-style-properties.html: * fast/css/getComputedStyle/getComputedStyle-background-shorthand-expected.txt: * fast/css/getComputedStyle/getComputedStyle-background-shorthand.html: * fast/css/getComputedStyle/getComputedStyle-list-style-shorthand-expected.txt: * fast/css/getComputedStyle/getComputedStyle-list-style-shorthand.html: * fast/css/image-set-parsing.html: * fast/css/image-set-setting-expected.txt: * fast/css/image-set-setting.html: * fast/css/image-set-unprefixed-expected.txt: * fast/css/image-set-unprefixed.html: * fast/css/invalid-cursor-property-crash.html: * fast/css/parse-border-image-repeat-null-crash-expected.txt: * fast/css/uri-token-parsing-expected.txt: * fast/css/uri-token-parsing.html: * fast/css/url-with-multi-byte-unicode-escape-expected.txt: * fast/css/url-with-multi-byte-unicode-escape.html: * fast/filter-image/parse-filter-image-expected.txt: * fast/filter-image/parse-filter-image.html: * fast/innerHTML/innerHTML-uri-resolution.html: * fast/inspector-support/cssURLQuotes-expected.txt: * fast/inspector-support/cssURLQuotes.html: * fast/masking/parsing-clip-path-iri-expected.txt: * fast/masking/parsing-clip-path-iri.html: * fast/masking/parsing-mask-expected.txt: * fast/masking/parsing-mask.html: * fast/shapes/parsing/parsing-shape-outside-expected.txt: * fast/shapes/parsing/parsing-shape-outside.html: * fast/shapes/parsing/parsing-test-utils.js: (removeBaseURL): * platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt: * platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: * platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt: * platform/ios/fast/css/image-set-unprefixed-expected.txt: Removed. * platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt: * platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: * platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt: * platform/win/fast/css/parse-border-image-repeat-null-crash-expected.txt: * platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt: * platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: * platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt: * resources/image-preload-helper.js: (preloadImagesFromStyle): * svg/css/svg-attribute-parser-mode-expected.txt: * svg/css/svg-attribute-parser-mode.html: * svg/custom/marker-getPropertyValue-expected.txt: * svg/custom/marker-getPropertyValue.svg: Canonical link: https://commits.webkit.org/200792@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231359 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-05-04 17:32:48 +00:00
['url("#a")', 'url("#b")']);
Remove WebKitCSSFilterValue to make Hyatt happy https://bugs.webkit.org/show_bug.cgi?id=164289 <rdar://problems/29050973> Reviewed by Simon Fraser. Source/WebCore: The new CSS parser should not use WebKitCSSFilterValue. It's non-standard, very likely only used in our tests, doesn't provide much benefit, and will be covered by the new CSSOM function interface. Covered by modifying existing tests. * DerivedSources.make: Remove WebKitCSSFilterValue.idl. * WebCore.xcodeproj/project.pbxproj: Make CSSFunctionValue.h private so API testing can see it. * bindings/js/JSCSSValueCustom.cpp: (WebCore::toJSNewlyCreated): No WebKitCSSFilterValue. * css/CSSComputedStyleDeclaration.cpp: Use CSSFunctionValue or CSSPrimitiveValue to build up the computed style. (WebCore::ComputedStyleExtractor::valueForFilter): * css/CSSValue.cpp: No WebKitCSSFilterValue. (WebCore::CSSValue::equals): (WebCore::CSSValue::cssText): (WebCore::CSSValue::destroy): (WebCore::CSSValue::cloneForCSSOM): * css/CSSValue.h: (WebCore::CSSValue::isFilterImageValue): (WebCore::CSSValue::isWebKitCSSFilterValue): Deleted. * css/StyleResolver.cpp: Resolve against CSSFunctionValues with CSSValueIDs as name, rather than WebKitCSSFilterValue. (WebCore::filterOperationForType): (WebCore::StyleResolver::createFilterOperations): * css/StyleResolver.h: * css/WebKitCSSFilterValue.cpp: Removed. * css/WebKitCSSFilterValue.h: Removed. * css/WebKitCSSFilterValue.idl: Removed. * css/parser/CSSParser.cpp: Parse into CSSPrimitiveValue and CSSFunctionValue. (WebCore::isValidPrimitiveFilterFunction): (WebCore::CSSParser::parseBuiltinFilterArguments): (WebCore::cssValueKeywordIDForFunctionName): (WebCore::CSSParser::parseFilter): (WebCore::filterInfoForName): Deleted. * css/parser/CSSParser.h: * css/parser/CSSPropertyParser.cpp: (WebCore::consumeFilterFunction): LayoutTests: Update the filters tests now that WebKitCSSFilterValue no longer exists. Unfortunately CSSFunctionValue isn't exposed to the Web, so we just rely on the cssText of the resulting CSSStyleDeclaration. I also moved all the script-tests into the HTML files, since there is no point them being separate. * css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt: * css3/filters/backdrop/backdropfilter-property-computed-style.html: * css3/filters/backdrop/backdropfilter-property-parsing-expected.txt: * css3/filters/backdrop/backdropfilter-property-parsing-invalid.html: * css3/filters/backdrop/backdropfilter-property-parsing.html: * css3/filters/backdrop/backdropfilter-property.html: * css3/filters/backdrop/script-tests/backdropfilter-property-computed-style.js: Removed. * css3/filters/backdrop/script-tests/backdropfilter-property-parsing-invalid.js: Removed. * css3/filters/backdrop/script-tests/backdropfilter-property-parsing.js: Removed. * css3/filters/backdrop/script-tests/backdropfilter-property.js: Removed. * css3/filters/effect-reference-delete-crash.html: * css3/filters/effect-reference-reset-style-delete-crash.html: * css3/filters/filter-property-computed-style-expected.txt: * css3/filters/filter-property-computed-style.html: * css3/filters/filter-property-parsing-expected.txt: * css3/filters/filter-property-parsing-invalid.html: * css3/filters/filter-property-parsing.html: * css3/filters/filter-property.html: * css3/filters/script-tests/TEMPLATE.html: Removed. * css3/filters/script-tests/effect-reference-delete-crash.js: Removed. * css3/filters/script-tests/effect-reference-reset-style-delete-crash.js: Removed. * css3/filters/script-tests/filter-property-computed-style.js: Removed. * css3/filters/script-tests/filter-property-parsing-invalid.js: Removed. * css3/filters/script-tests/filter-property-parsing.js: Removed. * css3/filters/script-tests/filter-property.js: Removed. * css3/filters/script-tests/unprefixed.js: Removed. * css3/filters/unprefixed-expected.txt: * css3/filters/unprefixed.html: Canonical link: https://commits.webkit.org/182019@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-11-01 22:31:52 +00:00
testComputedFilterRule("Reference as 2nd value",
"grayscale(1) url('#a')", 2,
Serialize all URLs with double-quotes per CSSOM spec https://bugs.webkit.org/show_bug.cgi?id=184935 Patch by Chris Nardi <cnardi@chromium.org> on 2018-05-04 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: Update expectations for using double quotes when serializing URLs. * web-platform-tests/cssom/serialize-values-expected.txt: * web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt: * web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: * web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt: Source/WebCore: According to https://drafts.csswg.org/cssom/#serialize-a-url, all URLs should be serialized as strings, which means they should have double quotes around the text of the URL. Update our implementation to match this (and Firefox/Chrome). Also remove isCSSTokenizerURL() as this method is no longer needed. Tests: Many LayoutTests updated to use double quotes. * css/CSSMarkup.cpp: (WebCore::serializeString): Remove FIXME as this was already fixed in a previous patch. (WebCore::serializeURL): Remove FIXME and update implementation. LayoutTests: Update tests to use double quotes when serializing URLs, and fixes for using double quotes in the test. * css3/calc/cross-fade-calc.html: * css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt: * css3/filters/backdrop/backdropfilter-property-computed-style.html: * css3/filters/backdrop/backdropfilter-property-parsing-expected.txt: * css3/filters/backdrop/backdropfilter-property-parsing.html: * css3/filters/filter-property-computed-style-expected.txt: * css3/filters/filter-property-computed-style.html: * css3/filters/filter-property-expected.txt: * css3/filters/filter-property-parsing-expected.txt: * css3/filters/filter-property-parsing.html: * css3/filters/filter-property.html: * css3/filters/unprefixed-expected.txt: * css3/filters/unprefixed.html: * fast/backgrounds/background-shorthand-after-set-backgroundSize-expected.txt: * fast/backgrounds/background-shorthand-after-set-backgroundSize.html: * fast/backgrounds/background-shorthand-with-backgroundSize-style-expected.txt: * fast/backgrounds/background-shorthand-with-backgroundSize-style.html: * fast/backgrounds/multiple-backgrounds-computed-style-expected.txt: * fast/backgrounds/multiple-backgrounds-computed-style.html: * fast/css/background-position-serialize-expected.txt: * fast/css/cursor-parsing-expected.txt: * fast/css/cursor-parsing-image-set-expected.txt: * fast/css/cursor-parsing-image-set.html: * fast/css/cursor-parsing.html: * fast/css/getComputedStyle/computed-style-border-image-expected.txt: * fast/css/getComputedStyle/computed-style-border-image.html: * fast/css/getComputedStyle/computed-style-cross-fade-expected.txt: * fast/css/getComputedStyle/computed-style-cross-fade.html: * fast/css/getComputedStyle/computed-style-properties-expected.txt: * fast/css/getComputedStyle/computed-style-properties.html: * fast/css/getComputedStyle/getComputedStyle-background-shorthand-expected.txt: * fast/css/getComputedStyle/getComputedStyle-background-shorthand.html: * fast/css/getComputedStyle/getComputedStyle-list-style-shorthand-expected.txt: * fast/css/getComputedStyle/getComputedStyle-list-style-shorthand.html: * fast/css/image-set-parsing.html: * fast/css/image-set-setting-expected.txt: * fast/css/image-set-setting.html: * fast/css/image-set-unprefixed-expected.txt: * fast/css/image-set-unprefixed.html: * fast/css/invalid-cursor-property-crash.html: * fast/css/parse-border-image-repeat-null-crash-expected.txt: * fast/css/uri-token-parsing-expected.txt: * fast/css/uri-token-parsing.html: * fast/css/url-with-multi-byte-unicode-escape-expected.txt: * fast/css/url-with-multi-byte-unicode-escape.html: * fast/filter-image/parse-filter-image-expected.txt: * fast/filter-image/parse-filter-image.html: * fast/innerHTML/innerHTML-uri-resolution.html: * fast/inspector-support/cssURLQuotes-expected.txt: * fast/inspector-support/cssURLQuotes.html: * fast/masking/parsing-clip-path-iri-expected.txt: * fast/masking/parsing-clip-path-iri.html: * fast/masking/parsing-mask-expected.txt: * fast/masking/parsing-mask.html: * fast/shapes/parsing/parsing-shape-outside-expected.txt: * fast/shapes/parsing/parsing-shape-outside.html: * fast/shapes/parsing/parsing-test-utils.js: (removeBaseURL): * platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt: * platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: * platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt: * platform/ios/fast/css/image-set-unprefixed-expected.txt: Removed. * platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt: * platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: * platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt: * platform/win/fast/css/parse-border-image-repeat-null-crash-expected.txt: * platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt: * platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: * platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt: * resources/image-preload-helper.js: (preloadImagesFromStyle): * svg/css/svg-attribute-parser-mode-expected.txt: * svg/css/svg-attribute-parser-mode.html: * svg/custom/marker-getPropertyValue-expected.txt: * svg/custom/marker-getPropertyValue.svg: Canonical link: https://commits.webkit.org/200792@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231359 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-05-04 17:32:48 +00:00
["grayscale(1)", 'url("#a")']);
Remove WebKitCSSFilterValue to make Hyatt happy https://bugs.webkit.org/show_bug.cgi?id=164289 <rdar://problems/29050973> Reviewed by Simon Fraser. Source/WebCore: The new CSS parser should not use WebKitCSSFilterValue. It's non-standard, very likely only used in our tests, doesn't provide much benefit, and will be covered by the new CSSOM function interface. Covered by modifying existing tests. * DerivedSources.make: Remove WebKitCSSFilterValue.idl. * WebCore.xcodeproj/project.pbxproj: Make CSSFunctionValue.h private so API testing can see it. * bindings/js/JSCSSValueCustom.cpp: (WebCore::toJSNewlyCreated): No WebKitCSSFilterValue. * css/CSSComputedStyleDeclaration.cpp: Use CSSFunctionValue or CSSPrimitiveValue to build up the computed style. (WebCore::ComputedStyleExtractor::valueForFilter): * css/CSSValue.cpp: No WebKitCSSFilterValue. (WebCore::CSSValue::equals): (WebCore::CSSValue::cssText): (WebCore::CSSValue::destroy): (WebCore::CSSValue::cloneForCSSOM): * css/CSSValue.h: (WebCore::CSSValue::isFilterImageValue): (WebCore::CSSValue::isWebKitCSSFilterValue): Deleted. * css/StyleResolver.cpp: Resolve against CSSFunctionValues with CSSValueIDs as name, rather than WebKitCSSFilterValue. (WebCore::filterOperationForType): (WebCore::StyleResolver::createFilterOperations): * css/StyleResolver.h: * css/WebKitCSSFilterValue.cpp: Removed. * css/WebKitCSSFilterValue.h: Removed. * css/WebKitCSSFilterValue.idl: Removed. * css/parser/CSSParser.cpp: Parse into CSSPrimitiveValue and CSSFunctionValue. (WebCore::isValidPrimitiveFilterFunction): (WebCore::CSSParser::parseBuiltinFilterArguments): (WebCore::cssValueKeywordIDForFunctionName): (WebCore::CSSParser::parseFilter): (WebCore::filterInfoForName): Deleted. * css/parser/CSSParser.h: * css/parser/CSSPropertyParser.cpp: (WebCore::consumeFilterFunction): LayoutTests: Update the filters tests now that WebKitCSSFilterValue no longer exists. Unfortunately CSSFunctionValue isn't exposed to the Web, so we just rely on the cssText of the resulting CSSStyleDeclaration. I also moved all the script-tests into the HTML files, since there is no point them being separate. * css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt: * css3/filters/backdrop/backdropfilter-property-computed-style.html: * css3/filters/backdrop/backdropfilter-property-parsing-expected.txt: * css3/filters/backdrop/backdropfilter-property-parsing-invalid.html: * css3/filters/backdrop/backdropfilter-property-parsing.html: * css3/filters/backdrop/backdropfilter-property.html: * css3/filters/backdrop/script-tests/backdropfilter-property-computed-style.js: Removed. * css3/filters/backdrop/script-tests/backdropfilter-property-parsing-invalid.js: Removed. * css3/filters/backdrop/script-tests/backdropfilter-property-parsing.js: Removed. * css3/filters/backdrop/script-tests/backdropfilter-property.js: Removed. * css3/filters/effect-reference-delete-crash.html: * css3/filters/effect-reference-reset-style-delete-crash.html: * css3/filters/filter-property-computed-style-expected.txt: * css3/filters/filter-property-computed-style.html: * css3/filters/filter-property-parsing-expected.txt: * css3/filters/filter-property-parsing-invalid.html: * css3/filters/filter-property-parsing.html: * css3/filters/filter-property.html: * css3/filters/script-tests/TEMPLATE.html: Removed. * css3/filters/script-tests/effect-reference-delete-crash.js: Removed. * css3/filters/script-tests/effect-reference-reset-style-delete-crash.js: Removed. * css3/filters/script-tests/filter-property-computed-style.js: Removed. * css3/filters/script-tests/filter-property-parsing-invalid.js: Removed. * css3/filters/script-tests/filter-property-parsing.js: Removed. * css3/filters/script-tests/filter-property.js: Removed. * css3/filters/script-tests/unprefixed.js: Removed. * css3/filters/unprefixed-expected.txt: * css3/filters/unprefixed.html: Canonical link: https://commits.webkit.org/182019@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-11-01 22:31:52 +00:00
testComputedFilterRule("Integer value",
"grayscale(1)", 1,
["grayscale(1)"]);
testComputedFilterRule("Float value converts to integer",
"grayscale(1.0)", 1,
["grayscale(1)"]);
testComputedFilterRule("Zero value",
"grayscale(0)", 1,
["grayscale(0)"]);
testComputedFilterRule("No values",
"grayscale()", 1,
["grayscale(1)"]);
testComputedFilterRule("Multiple values",
"grayscale(0.5) grayscale(0.25)", 2,
["grayscale(0.5)", "grayscale(0.25)"]);
testComputedFilterRule("Integer value",
"sepia(1)", 1,
["sepia(1)"]);
testComputedFilterRule("Float value converts to integer",
"sepia(1.0)", 1,
["sepia(1)"]);
testComputedFilterRule("Zero value",
"sepia(0)", 1,
["sepia(0)"]);
testComputedFilterRule("No values",
"sepia()", 1,
["sepia(1)"]);
testComputedFilterRule("Multiple values",
"sepia(0.5) sepia(0.25)", 2,
["sepia(0.5)", "sepia(0.25)"]);
testComputedFilterRule("Rule combinations",
"sepia(0.5) grayscale(0.25)", 2,
["sepia(0.5)", "grayscale(0.25)"]);
testComputedFilterRule("Integer value",
"saturate(1)", 1,
["saturate(1)"]);
testComputedFilterRule("Float value converts to integer",
"saturate(1.0)", 1,
["saturate(1)"]);
testComputedFilterRule("Zero value",
"saturate(0)", 1,
["saturate(0)"]);
testComputedFilterRule("No values",
"saturate()", 1,
["saturate(1)"]);
testComputedFilterRule("Multiple values",
"saturate(0.5) saturate(0.25)", 2,
["saturate(0.5)", "saturate(0.25)"]);
testComputedFilterRule("Rule combinations",
"saturate(0.5) grayscale(0.25)", 2,
["saturate(0.5)", "grayscale(0.25)"]);
testComputedFilterRule("Degrees value as integer",
"hue-rotate(10deg)", 1,
["hue-rotate(10deg)"]);
testComputedFilterRule("Degrees float value converts to integer",
"hue-rotate(10.0deg)", 1,
["hue-rotate(10deg)"]);
testComputedFilterRule("Radians value",
"hue-rotate(10rad)", 1,
["hue-rotate(572.9577951308232deg)"]);
testComputedFilterRule("Gradians value",
"hue-rotate(10grad)", 1,
["hue-rotate(9deg)"]);
testComputedFilterRule("Turns value",
"hue-rotate(0.5turn)", 1,
["hue-rotate(180deg)"]);
testComputedFilterRule("Zero value",
"hue-rotate(0)", 1,
["hue-rotate(0deg)"]);
testComputedFilterRule("No values",
"hue-rotate()", 1,
["hue-rotate(0deg)"]);
testComputedFilterRule("Rule combinations",
"hue-rotate(10deg) grayscale(0.25)", 2,
["hue-rotate(10deg)", "grayscale(0.25)"]);
testComputedFilterRule("Integer value",
"invert(1)", 1,
["invert(1)"]);
testComputedFilterRule("Float value converts to integer",
"invert(1.0)", 1,
["invert(1)"]);
testComputedFilterRule("Zero value",
"invert(0)", 1,
["invert(0)"]);
testComputedFilterRule("No values",
"invert()", 1,
["invert(1)"]);
testComputedFilterRule("Multiple values",
"invert(0.5) invert(0.25)", 2,
["invert(0.5)", "invert(0.25)"]);
testComputedFilterRule("Rule combinations",
"invert(0.5) grayscale(0.25)", 2,
["invert(0.5)", "grayscale(0.25)"]);
testComputedFilterRule("Integer value",
"opacity(1)", 1,
["opacity(1)"]);
testComputedFilterRule("Float value converts to integer",
"opacity(1.0)", 1,
["opacity(1)"]);
testComputedFilterRule("Zero value",
"opacity(0)", 1,
["opacity(0)"]);
testComputedFilterRule("No values",
"opacity()", 1,
["opacity(1)"]);
testComputedFilterRule("Multiple values",
"opacity(0.5) opacity(0.25)", 2,
["opacity(0.5)", "opacity(0.25)"]);
testComputedFilterRule("Rule combinations",
"opacity(0.5) grayscale(0.25)", 2,
["opacity(0.5)", "grayscale(0.25)"]);
testComputedFilterRule("Integer value",
"brightness(1)", 1,
["brightness(1)"]);
testComputedFilterRule("Float value converts to integer",
"brightness(1.0)", 1,
["brightness(1)"]);
testComputedFilterRule("Zero value",
"brightness(0)", 1,
["brightness(0)"]);
testComputedFilterRule("No values",
"brightness()", 1,
brightness() filter should default to 1, and not allow negative values https://bugs.webkit.org/show_bug.cgi?id=184937 Reviewed by Dean Jackson. Source/WebCore: Remove the special-casing for brightness() in consumeFilterFunction(), so it now follows the same logic as the other color-related filters in not allowing negative values. Removed the special-casing for brightness() in createFilterOperations() so its default value is now 1. Modified existing tests. * css/StyleResolver.cpp: (WebCore::StyleResolver::createFilterOperations): * css/parser/CSSPropertyParserHelpers.cpp: (WebCore::CSSPropertyParserHelpers::allowsValuesGreaterThanOne): (WebCore::CSSPropertyParserHelpers::consumeFilterFunction): LayoutTests: Added negative value tests to filter-property-parsing.html and backdropfilter-property-parsing.html, and made these tests more similar. Fixed expected computed value for brightness() to be brightness(1) in the tests. The effect-brightness* test results failed because elements with invalid brightness values now no longer create a RenderLayer. * css3/color-filters/color-filter-parsing-expected.txt: * css3/color-filters/color-filter-parsing.html: * css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt: * css3/filters/backdrop/backdropfilter-property-computed-style.html: * css3/filters/backdrop/backdropfilter-property-parsing-expected.txt: * css3/filters/backdrop/backdropfilter-property-parsing.html: * css3/filters/effect-brightness-expected.txt: * css3/filters/filter-property-computed-style-expected.txt: * css3/filters/filter-property-computed-style.html: * css3/filters/filter-property-parsing-expected.txt: * css3/filters/filter-property-parsing.html: * css3/filters/unprefixed-expected.txt: * css3/filters/unprefixed.html: * fast/filter-image/parse-filter-image-expected.txt: * fast/filter-image/parse-filter-image.html: * platform/mac/css3/filters/effect-brightness-clamping-expected.txt: Canonical link: https://commits.webkit.org/200502@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-04-25 23:24:47 +00:00
["brightness(1)"]);
Remove WebKitCSSFilterValue to make Hyatt happy https://bugs.webkit.org/show_bug.cgi?id=164289 <rdar://problems/29050973> Reviewed by Simon Fraser. Source/WebCore: The new CSS parser should not use WebKitCSSFilterValue. It's non-standard, very likely only used in our tests, doesn't provide much benefit, and will be covered by the new CSSOM function interface. Covered by modifying existing tests. * DerivedSources.make: Remove WebKitCSSFilterValue.idl. * WebCore.xcodeproj/project.pbxproj: Make CSSFunctionValue.h private so API testing can see it. * bindings/js/JSCSSValueCustom.cpp: (WebCore::toJSNewlyCreated): No WebKitCSSFilterValue. * css/CSSComputedStyleDeclaration.cpp: Use CSSFunctionValue or CSSPrimitiveValue to build up the computed style. (WebCore::ComputedStyleExtractor::valueForFilter): * css/CSSValue.cpp: No WebKitCSSFilterValue. (WebCore::CSSValue::equals): (WebCore::CSSValue::cssText): (WebCore::CSSValue::destroy): (WebCore::CSSValue::cloneForCSSOM): * css/CSSValue.h: (WebCore::CSSValue::isFilterImageValue): (WebCore::CSSValue::isWebKitCSSFilterValue): Deleted. * css/StyleResolver.cpp: Resolve against CSSFunctionValues with CSSValueIDs as name, rather than WebKitCSSFilterValue. (WebCore::filterOperationForType): (WebCore::StyleResolver::createFilterOperations): * css/StyleResolver.h: * css/WebKitCSSFilterValue.cpp: Removed. * css/WebKitCSSFilterValue.h: Removed. * css/WebKitCSSFilterValue.idl: Removed. * css/parser/CSSParser.cpp: Parse into CSSPrimitiveValue and CSSFunctionValue. (WebCore::isValidPrimitiveFilterFunction): (WebCore::CSSParser::parseBuiltinFilterArguments): (WebCore::cssValueKeywordIDForFunctionName): (WebCore::CSSParser::parseFilter): (WebCore::filterInfoForName): Deleted. * css/parser/CSSParser.h: * css/parser/CSSPropertyParser.cpp: (WebCore::consumeFilterFunction): LayoutTests: Update the filters tests now that WebKitCSSFilterValue no longer exists. Unfortunately CSSFunctionValue isn't exposed to the Web, so we just rely on the cssText of the resulting CSSStyleDeclaration. I also moved all the script-tests into the HTML files, since there is no point them being separate. * css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt: * css3/filters/backdrop/backdropfilter-property-computed-style.html: * css3/filters/backdrop/backdropfilter-property-parsing-expected.txt: * css3/filters/backdrop/backdropfilter-property-parsing-invalid.html: * css3/filters/backdrop/backdropfilter-property-parsing.html: * css3/filters/backdrop/backdropfilter-property.html: * css3/filters/backdrop/script-tests/backdropfilter-property-computed-style.js: Removed. * css3/filters/backdrop/script-tests/backdropfilter-property-parsing-invalid.js: Removed. * css3/filters/backdrop/script-tests/backdropfilter-property-parsing.js: Removed. * css3/filters/backdrop/script-tests/backdropfilter-property.js: Removed. * css3/filters/effect-reference-delete-crash.html: * css3/filters/effect-reference-reset-style-delete-crash.html: * css3/filters/filter-property-computed-style-expected.txt: * css3/filters/filter-property-computed-style.html: * css3/filters/filter-property-parsing-expected.txt: * css3/filters/filter-property-parsing-invalid.html: * css3/filters/filter-property-parsing.html: * css3/filters/filter-property.html: * css3/filters/script-tests/TEMPLATE.html: Removed. * css3/filters/script-tests/effect-reference-delete-crash.js: Removed. * css3/filters/script-tests/effect-reference-reset-style-delete-crash.js: Removed. * css3/filters/script-tests/filter-property-computed-style.js: Removed. * css3/filters/script-tests/filter-property-parsing-invalid.js: Removed. * css3/filters/script-tests/filter-property-parsing.js: Removed. * css3/filters/script-tests/filter-property.js: Removed. * css3/filters/script-tests/unprefixed.js: Removed. * css3/filters/unprefixed-expected.txt: * css3/filters/unprefixed.html: Canonical link: https://commits.webkit.org/182019@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-11-01 22:31:52 +00:00
testComputedFilterRule("Multiple values",
"brightness(0.5) brightness(0.25)", 2,
["brightness(0.5)", "brightness(0.25)"]);
testComputedFilterRule("Rule combinations",
"brightness(0.5) grayscale(0.25)", 2,
["brightness(0.5)", "grayscale(0.25)"]);
testComputedFilterRule("Integer value",
"contrast(1)", 1,
["contrast(1)"]);
testComputedFilterRule("Value greater than 1",
"contrast(2)", 1,
["contrast(2)"]);
testComputedFilterRule("Float value converts to integer",
"contrast(1.0)", 1,
["contrast(1)"]);
testComputedFilterRule("Zero value",
"contrast(0)", 1,
["contrast(0)"]);
testComputedFilterRule("No values",
"contrast()", 1,
["contrast(1)"]);
testComputedFilterRule("Multiple values",
"contrast(0.5) contrast(0.25)", 2,
["contrast(0.5)", "contrast(0.25)"]);
testComputedFilterRule("Rule combinations",
"contrast(0.5) grayscale(0.25)", 2,
["contrast(0.5)", "grayscale(0.25)"]);
testComputedFilterRule("One zero to px",
"blur(0)", 1,
["blur(0px)"]);
testComputedFilterRule("One length",
"blur(2em)", 1,
["blur(32px)"]);
testComputedFilterRule("One length",
"blur(5px)", 1,
["blur(5px)"]);
testComputedFilterRule("No values",
"blur()", 1,
["blur(0px)"]);
testComputedFilterRule("Color then three values",
"drop-shadow(red 1px 2px 3px)", 1,
["drop-shadow(rgb(255, 0, 0) 1px 2px 3px)"]);
testComputedFilterRule("Three values then color",
"drop-shadow(1px 2px 3px red)", 1,
["drop-shadow(rgb(255, 0, 0) 1px 2px 3px)"]);
testComputedFilterRule("Color then three values with zero length",
"drop-shadow(#abc 0 0 0)", 1,
["drop-shadow(rgb(170, 187, 204) 0px 0px 0px)"]);
testComputedFilterRule("Three values with zero length",
"drop-shadow(0 0 0)", 1,
["drop-shadow(rgba(0, 0, 0, 0) 0px 0px 0px)"]);
testComputedFilterRule("Two values no color",
"drop-shadow(1px 2px)", 1,
["drop-shadow(rgba(0, 0, 0, 0) 1px 2px 0px)"]);
testComputedFilterRule("Multiple operations",
"grayscale(0.5) sepia(0.25) saturate(0.75) hue-rotate(35deg) invert(0.2) opacity(0.9) blur(5px)", 7,
[
"grayscale(0.5)",
"sepia(0.25)",
"saturate(0.75)",
"hue-rotate(35deg)",
"invert(0.2)",
"opacity(0.9)",
"blur(5px)"
]);
testComputedFilterRule("Percentage values",
"grayscale(50%) sepia(25%) saturate(75%) invert(20%) opacity(90%) brightness(60%) contrast(30%)", 7,
[
"grayscale(0.5)",
"sepia(0.25)",
"saturate(0.75)",
"invert(0.2)",
"opacity(0.9)",
"brightness(0.6)",
"contrast(0.3)"
]);
successfullyParsed = true;
</script>
Support CSS filters without webkit prefix https://bugs.webkit.org/show_bug.cgi?id=148138 <rdar://problem/22331434> Reviewed by Sam Weinig. Source/WebCore: Add support for the un-prefixed form of the CSS filter property. This was straightforward for the general case on HTML content. It was a bit more tricky on SVG content, where there already was an existing "filter" property/attribute. The parsing code is now shared between SVG and HTML, as is the computed style output. Covered by updating the existing tests, and adding one new test: css3/filters/unprefixed.html * css/CSSComputedStyleDeclaration.cpp: Rename CSSPropertyWebkitFilter to CSSPropertyFilter. (WebCore::isLayoutDependent): (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSFilterImageValue.cpp: (WebCore::CSSFilterImageValue::customCSSText): Use "filter(" as the prefix. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Rename CSSPropertyWebkitFilter to CSSPropertyFilter. (WebCore::CSSParser::isGeneratedImageValue): Add support for "filter()". (WebCore::CSSParser::parseGeneratedImage): Ditto. (WebCore::CSSParser::parseBuiltinFilterArguments): * css/CSSPropertyNames.in: Add filter. Make -webkit-filter an alias. * css/SVGCSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::svgPropertyValue): Deleted. * page/animation/CSSPropertyAnimation.cpp: Rename CSSPropertyWebkitFilter to CSSPropertyFilter. (WebCore::PropertyWrapperAcceleratedFilter::PropertyWrapperAcceleratedFilter): * page/animation/KeyframeAnimation.cpp: Ditto. (WebCore::KeyframeAnimation::checkForMatchingFilterFunctionLists): * platform/graphics/GraphicsLayer.cpp: Rename AnimatedPropertyWebkitFilter to AnimatedPropertyFilter. (WebCore::GraphicsLayer::validateFilterOperations): * platform/graphics/GraphicsLayerClient.h: Ditto. * platform/graphics/ca/GraphicsLayerCA.cpp: Ditto. (WebCore::GraphicsLayerCA::moveOrCopyAnimations): (WebCore::GraphicsLayerCA::addAnimation): (WebCore::GraphicsLayerCA::createAnimationFromKeyframes): (WebCore::GraphicsLayerCA::createFilterAnimationsFromKeyframes): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateOrRemoveFilterClients): SVG manages its own filter resources, so we shouldn't add a layer that has an SVG root to the filter clients. * rendering/RenderLayerBacking.cpp: Renaming. (WebCore::RenderLayerBacking::startAnimation): (WebCore::RenderLayerBacking::startTransition): (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty): (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty): * rendering/RenderLayerCompositor.cpp: Ditto. (WebCore::RenderLayerCompositor::requiresCompositingForAnimation): * rendering/style/SVGRenderStyle.h: Remove the SVG filter style. (WebCore::SVGRenderStyle::isolatesBlending): No need to check for hasFilter(). (WebCore::SVGRenderStyle::initialFilterResource): Deleted. (WebCore::SVGRenderStyle::setFilterResource): Deleted. (WebCore::SVGRenderStyle::filterResource): Deleted. (WebCore::SVGRenderStyle::hasFilter): Deleted. * rendering/style/SVGRenderStyleDefs.cpp: Remove the filter resource. (WebCore::StyleResourceData::StyleResourceData): Deleted. (WebCore::StyleResourceData::operator==): Deleted. * rendering/style/SVGRenderStyleDefs.h: * rendering/style/WillChangeData.cpp: Renaming. (WebCore::propertyCreatesStackingContext): (WebCore::propertyTriggersCompositing): * rendering/svg/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::isolatesBlending): Since SVGRenderStyle no longer checks hasFilter() in its isolatesBlending(), we need to do it here. * rendering/svg/SVGRenderingContext.cpp: (WebCore::SVGRenderingContext::prepareToRenderSVGContent): * rendering/svg/SVGRenderTreeAsText.cpp: (WebCore::writeResources): Dump from the CSS style value. * rendering/svg/SVGResources.cpp: Ditto. (WebCore::SVGResources::buildCachedResources): * rendering/svg/SVGResources.h: * rendering/svg/SVGResourcesCache.cpp: (WebCore::SVGResourcesCache::addResourcesFromRenderer): * platform/graphics/texmap/TextureMapperLayer.cpp: Renaming. * platform/graphics/texmap/TextureMapperAnimation.cpp: * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: Source/WebKit2: Rename WebkitFilter to Filter. * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: (IPC::ArgumentCoder<TextureMapperAnimation>::encode): (IPC::ArgumentCoder<TextureMapperAnimation>::decode): LayoutTests: Globally change -webkit-filter to filter in as many places as possible. Then add a new test that makes sure the prefixed and unprefixed value resolve to the same computed style. * animations/resources/animation-test-helpers.js: (parseCSSImage): * css3/filters/backdrop/effect-hw-expected.html: * css3/filters/effect-blur-hw.html: * css3/filters/effect-blur.html: * css3/filters/effect-brightness-clamping-hw.html: * css3/filters/effect-brightness-clamping.html: * css3/filters/effect-brightness-hw.html: * css3/filters/effect-brightness.html: * css3/filters/effect-combined-hw.html: * css3/filters/effect-combined.html: * css3/filters/effect-contrast-hw.html: * css3/filters/effect-contrast.html: * css3/filters/effect-drop-shadow-hw.html: * css3/filters/effect-drop-shadow.html: * css3/filters/effect-grayscale-hw.html: * css3/filters/effect-grayscale.html: * css3/filters/effect-hue-rotate-hw.html: * css3/filters/effect-hue-rotate.html: * css3/filters/effect-invert-hw.html: * css3/filters/effect-invert.html: * css3/filters/effect-opacity-hw.html: * css3/filters/effect-opacity.html: * css3/filters/effect-reference-composite-hw.html: * css3/filters/effect-reference-composite.html: * css3/filters/effect-reference-hw.html: * css3/filters/effect-reference-ordering-hw.html: * css3/filters/effect-reference-ordering.html: * css3/filters/effect-reference.html: * css3/filters/effect-saturate-hw.html: * css3/filters/effect-saturate.html: * css3/filters/effect-sepia-hw.html: * css3/filters/effect-sepia.html: * css3/filters/filter-property-computed-style-expected.txt: * css3/filters/filter-property-parsing-expected.txt: * css3/filters/script-tests/filter-property-computed-style.js: (testComputedFilterRule): * css3/filters/script-tests/filter-property-parsing.js: (testFilterRule): * css3/filters/script-tests/unprefixed.js: Copied from LayoutTests/css3/filters/script-tests/filter-property-computed-style.js. (testComputedFilterRule): * css3/filters/unprefixed-expected.txt: Copied from LayoutTests/css3/filters/filter-property-computed-style-expected.txt. * css3/filters/unprefixed.html: Added. * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/filter-image/clipped-filter-expected.html: * fast/filter-image/clipped-filter.html: * fast/filter-image/filter-image-animation-expected.txt: * fast/filter-image/filter-image-animation.html: * fast/filter-image/filter-image-blur.html: * fast/filter-image/filter-image-expected.html: * fast/filter-image/filter-image-svg.html: * fast/filter-image/filter-image.html: * fast/filter-image/parse-filter-image-expected.txt: * fast/filter-image/parse-filter-image.html: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/166305@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-08-19 20:22:50 +00:00
<script src="../../resources/js-test-post.js"></script>
</body>
</html>