Bug 201731

Summary: [SVG2] fill-opacity, stroke-opacity, stop-opacity and flood-opacity doe not support percentage
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: SVGAssignee: Dirk Schulze <krit>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dbates, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, joepeck, krit, macpherson, menard, simon.fraser, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 191292, 200143, 203503    
Attachments:
Description Flags
fill-opacity-percentage
none
Patch
none
Archive of layout-test-results from ews210 for win-future
none
Patch none

Said Abou-Hallawa
Reported 2019-09-12 11:50:41 PDT
The specs: https://svgwg.org/svg2-draft/painting.html#FillOpacityProperty https://svgwg.org/svg2-draft/painting.html#StrokeOpacity https://svgwg.org/svg2-draft/pservers.html#StopOpacityProperty https://drafts.fxtf.org/filter-effects/#propdef-flood-opacity https://drafts.csswg.org/css-color-4/#typedef-alpha-value show that the opacity can be either a number or a percentage which should be clamped to the range [0..1]. Currently we only support the number format and we do not support the percentage. See the attached test case.
Attachments
fill-opacity-percentage (1005 bytes, image/svg+xml)
2019-09-12 11:52 PDT, Said Abou-Hallawa
no flags
Patch (24.18 KB, patch)
2019-10-28 13:20 PDT, Dirk Schulze
no flags
Archive of layout-test-results from ews210 for win-future (14.18 MB, application/zip)
2019-10-28 15:02 PDT, EWS Watchlist
no flags
Patch (53.39 KB, patch)
2019-10-29 00:57 PDT, Dirk Schulze
no flags
Said Abou-Hallawa
Comment 1 2019-09-12 11:52:35 PDT
Created attachment 378665 [details] fill-opacity-percentage
Dirk Schulze
Comment 3 2019-10-28 07:17:54 PDT
This is an issue with the normal opacity property as well. All take the same values now.
Dirk Schulze
Comment 4 2019-10-28 13:20:48 PDT
Simon Fraser (smfr)
Comment 5 2019-10-28 13:27:00 PDT
Comment on attachment 382098 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=382098&action=review > Source/WebCore/ChangeLog:16 > + 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 These should be WPT, if there isn't already WPT coverage. > LayoutTests/fast/css/parsing-opacity.html:62 > +testInner("opacity", "0", "0"); > +testInner("opacity", "0.5", "0.5"); > +testInner("opacity", "1", "1"); > +testInner("opacity", "1000", "1000"); > +testInner("opacity", "-400", "-400"); > +testInner("opacity", "20%", "20%"); > +testInner("opacity", "-600%", "-600%"); > +testInner("opacity", "700%", "700%"); > +testComputed("opacity", "0", "0"); > +testComputed("opacity", "0.5", "0.5"); > +testComputed("opacity", "1", "1"); > +testComputed("opacity", "1000", "1"); > +testComputed("opacity", "-400", "0"); > +testComputed("opacity", "25%", "0.25"); > +testComputed("opacity", "-600%", "0"); > +testComputed("opacity", "700%", "1"); > +negativeTest("opacity", "2px"); > +negativeTest("opacity", "auto"); > +negativeTest("opacity", "none"); > +negativeTest("opacity", "'str'"); How about 100.2% and 2.5E2 values and %?
EWS Watchlist
Comment 6 2019-10-28 15:02:00 PDT
Comment on attachment 382098 [details] Patch Attachment 382098 [details] did not pass win-ews (win): Output: https://webkit-queues.webkit.org/results/13185980 New failing tests: svg/W3C-SVG-1.1/painting-fill-05-b.svg svg/css/parse-calc-length.html svg/custom/invalid-css.svg
EWS Watchlist
Comment 7 2019-10-28 15:02:03 PDT
Created attachment 382115 [details] Archive of layout-test-results from ews210 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews210 Port: win-future Platform: CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit
Dirk Schulze
Comment 8 2019-10-29 00:57:36 PDT
Dirk Schulze
Comment 9 2019-10-29 01:01:03 PDT
There are indeed WPT tests. However, Bug 203503 prevents them from running currently. No need to duplicate the tests in WPT. Added suggested additional tests.
WebKit Commit Bot
Comment 10 2019-10-29 03:27:43 PDT
Comment on attachment 382163 [details] Patch Clearing flags on attachment: 382163 Committed r251696: <https://trac.webkit.org/changeset/251696>
WebKit Commit Bot
Comment 11 2019-10-29 03:27:45 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 12 2019-10-29 03:28:18 PDT
Note You need to log in before you can comment on or make changes to this bug.