haikuwebkit/LayoutTests/fast/css/parsing-opacity-expected.txt

36 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

[SVG2] fill-opacity, stroke-opacity, stop-opacity and flood-opacity doe not support percentage https://bugs.webkit.org/show_bug.cgi?id=201731 Source/WebCore: Patch by Dirk Schulze <krit@webkit.org> on 2019-10-29 Reviewed by Simon Fraser. The CSS properties opacity, fill-opacity, stroke-opacity, stop-opacity, flood-opacity support percentage in addition to number values. Add percentage support. Tests: fast/css/parsing-opacity.html fast/svg/parsing-fill-opacity.html fast/svg/parsing-flood-opacity.html fast/svg/parsing-stop-opacity.html fast/svg/parsing-stroke-opacity.html * css/CSSProperties.json: opacity needs to use Opacity converter now. * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertOpacity): Clamp values to [0,1] * css/parser/CSSPropertyParser.cpp: (WebCore::CSSPropertyParser::parseSingleValue): Parse percentage values. LayoutTests: Test number and percentage values for opacity, fill-opacity, stroke-opacity, stop-opacity, flood-opacity. Patch by Dirk Schulze <krit@webkit.org> on 2019-10-29 Reviewed by Simon Fraser. * fast/css/parsing-opacity-expected.txt: Added. * fast/css/parsing-opacity.html: Added. * fast/svg/parsing-fill-opacity-expected.txt: Added. * fast/svg/parsing-fill-opacity.html: Added. * fast/svg/parsing-flood-opacity-expected.txt: Added. * fast/svg/parsing-flood-opacity.html: Added. * fast/svg/parsing-stop-opacity-expected.txt: Added. * fast/svg/parsing-stop-opacity.html: Added. * fast/svg/parsing-stroke-opacity-expected.txt: Added. * fast/svg/parsing-stroke-opacity.html: Added. Canonical link: https://commits.webkit.org/216922@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-29 10:27:35 +00:00
Test parsing and computed style of opacity
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS innerStyle("opacity", "0") is "0"
PASS innerStyle("opacity", "0.5") is "0.5"
PASS innerStyle("opacity", "1") is "1"
PASS innerStyle("opacity", "1000") is "1000"
PASS innerStyle("opacity", "-400") is "-400"
PASS innerStyle("opacity", "20%") is "0.2"
PASS innerStyle("opacity", "-600%") is "-6"
PASS innerStyle("opacity", "700%") is "7"
[SVG2] fill-opacity, stroke-opacity, stop-opacity and flood-opacity doe not support percentage https://bugs.webkit.org/show_bug.cgi?id=201731 Source/WebCore: Patch by Dirk Schulze <krit@webkit.org> on 2019-10-29 Reviewed by Simon Fraser. The CSS properties opacity, fill-opacity, stroke-opacity, stop-opacity, flood-opacity support percentage in addition to number values. Add percentage support. Tests: fast/css/parsing-opacity.html fast/svg/parsing-fill-opacity.html fast/svg/parsing-flood-opacity.html fast/svg/parsing-stop-opacity.html fast/svg/parsing-stroke-opacity.html * css/CSSProperties.json: opacity needs to use Opacity converter now. * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertOpacity): Clamp values to [0,1] * css/parser/CSSPropertyParser.cpp: (WebCore::CSSPropertyParser::parseSingleValue): Parse percentage values. LayoutTests: Test number and percentage values for opacity, fill-opacity, stroke-opacity, stop-opacity, flood-opacity. Patch by Dirk Schulze <krit@webkit.org> on 2019-10-29 Reviewed by Simon Fraser. * fast/css/parsing-opacity-expected.txt: Added. * fast/css/parsing-opacity.html: Added. * fast/svg/parsing-fill-opacity-expected.txt: Added. * fast/svg/parsing-fill-opacity.html: Added. * fast/svg/parsing-flood-opacity-expected.txt: Added. * fast/svg/parsing-flood-opacity.html: Added. * fast/svg/parsing-stop-opacity-expected.txt: Added. * fast/svg/parsing-stop-opacity.html: Added. * fast/svg/parsing-stroke-opacity-expected.txt: Added. * fast/svg/parsing-stroke-opacity.html: Added. Canonical link: https://commits.webkit.org/216922@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-29 10:27:35 +00:00
PASS innerStyle("opacity", "2.5e-1") is "0.25"
PASS innerStyle("opacity", "2.5e1%") is "0.25"
PASS innerStyle("opacity", "100.25%") is "1.0025"
[SVG2] fill-opacity, stroke-opacity, stop-opacity and flood-opacity doe not support percentage https://bugs.webkit.org/show_bug.cgi?id=201731 Source/WebCore: Patch by Dirk Schulze <krit@webkit.org> on 2019-10-29 Reviewed by Simon Fraser. The CSS properties opacity, fill-opacity, stroke-opacity, stop-opacity, flood-opacity support percentage in addition to number values. Add percentage support. Tests: fast/css/parsing-opacity.html fast/svg/parsing-fill-opacity.html fast/svg/parsing-flood-opacity.html fast/svg/parsing-stop-opacity.html fast/svg/parsing-stroke-opacity.html * css/CSSProperties.json: opacity needs to use Opacity converter now. * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertOpacity): Clamp values to [0,1] * css/parser/CSSPropertyParser.cpp: (WebCore::CSSPropertyParser::parseSingleValue): Parse percentage values. LayoutTests: Test number and percentage values for opacity, fill-opacity, stroke-opacity, stop-opacity, flood-opacity. Patch by Dirk Schulze <krit@webkit.org> on 2019-10-29 Reviewed by Simon Fraser. * fast/css/parsing-opacity-expected.txt: Added. * fast/css/parsing-opacity.html: Added. * fast/svg/parsing-fill-opacity-expected.txt: Added. * fast/svg/parsing-fill-opacity.html: Added. * fast/svg/parsing-flood-opacity-expected.txt: Added. * fast/svg/parsing-flood-opacity.html: Added. * fast/svg/parsing-stop-opacity-expected.txt: Added. * fast/svg/parsing-stop-opacity.html: Added. * fast/svg/parsing-stroke-opacity-expected.txt: Added. * fast/svg/parsing-stroke-opacity.html: Added. Canonical link: https://commits.webkit.org/216922@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-29 10:27:35 +00:00
PASS computedStyle("opacity", "0") is "0"
PASS computedStyle("opacity", "0.5") is "0.5"
PASS computedStyle("opacity", "1") is "1"
PASS computedStyle("opacity", "1000") is "1"
PASS computedStyle("opacity", "-400") is "0"
PASS computedStyle("opacity", "25%") is "0.25"
PASS computedStyle("opacity", "-600%") is "0"
PASS computedStyle("opacity", "700%") is "1"
PASS computedStyle("opacity", "2.5e-1") is "0.25"
PASS computedStyle("opacity", "2.5e1%") is "0.25"
PASS computedStyle("opacity", "100.25%") is "1"
PASS innerStyle("opacity", "2px") is ""
PASS innerStyle("opacity", "auto") is ""
PASS innerStyle("opacity", "none") is ""
PASS innerStyle("opacity", "'str'") is ""
PASS successfullyParsed is true
TEST COMPLETE