Bug 187888

Summary: [css-masking] Unprefix -webkit-clip-path
Product: WebKit Reporter: Dirk Schulze <krit>
Component: CSSAssignee: Dirk Schulze <krit>
Status: RESOLVED FIXED    
Severity: Normal CC: clopez, commit-queue, dbates, dino, dstockwell, esprehn+autocc, ews-watchlist, fmalita, glenn, gyuyoung.kim, joepeck, kondapallykalyan, macpherson, menard, pdr, rniwa, sabouhallawa, schenney, sergio, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=196761
Bug Depends on: 187880    
Bug Blocks: 126207    
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews100 for mac-sierra
none
Archive of layout-test-results from ews106 for mac-sierra-wk2
none
Archive of layout-test-results from ews115 for mac-sierra
none
Archive of layout-test-results from ews121 for ios-simulator-wk2
none
Archive of layout-test-results from ews202 for win-future
none
Patch
none
Patch
none
Archive of layout-test-results from ews215 for win-future
none
Patch
none
Patch
none
Patch
none
Patch for landing
none
Patch for landing none

Description Dirk Schulze 2018-07-22 01:23:51 PDT
In my testing, -webkit-clip-path covers the current support of clip-path as defined in SVG and currently implemented and is compatible to CSS Masking. There are open issues for fragments/inline boxes but those are present in other browsers like Chrome or Firefox as well and can be worked on over time. Firefox as well as Chrome unprefixed clip-path already.
Comment 1 Dirk Schulze 2018-07-24 03:32:48 PDT
Created attachment 345652 [details]
Patch
Comment 2 EWS Watchlist 2018-07-24 04:46:05 PDT
Comment on attachment 345652 [details]
Patch

Attachment 345652 [details] did not pass mac-ews (mac):
Output: https://webkit-queues.webkit.org/results/8637030

New failing tests:
imported/w3c/web-platform-tests/css/css-shapes/shape-outside/formatting-context/shape-outside-formatting-context.tentative.html
imported/mozilla/svg/svg-integration/clipPath-html-01.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-04.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-02.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-05.xhtml
imported/w3c/web-platform-tests/css/css-shapes/basic-shape-circle-ellipse-serialization.html
imported/mozilla/svg/svg-integration/clipPath-html-06.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-03.xhtml
Comment 3 EWS Watchlist 2018-07-24 04:46:07 PDT
Created attachment 345660 [details]
Archive of layout-test-results from ews100 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 4 EWS Watchlist 2018-07-24 04:53:09 PDT
Comment on attachment 345652 [details]
Patch

Attachment 345652 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/8637044

New failing tests:
imported/w3c/web-platform-tests/css/css-shapes/shape-outside/formatting-context/shape-outside-formatting-context.tentative.html
imported/mozilla/svg/svg-integration/clipPath-html-01.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-04.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-02.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-05.xhtml
imported/w3c/web-platform-tests/css/css-shapes/basic-shape-circle-ellipse-serialization.html
imported/mozilla/svg/svg-integration/clipPath-html-06.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-03.xhtml
Comment 5 EWS Watchlist 2018-07-24 04:53:11 PDT
Created attachment 345661 [details]
Archive of layout-test-results from ews106 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 6 EWS Watchlist 2018-07-24 05:18:13 PDT
Comment on attachment 345652 [details]
Patch

Attachment 345652 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/8637068

New failing tests:
imported/w3c/web-platform-tests/css/css-shapes/shape-outside/formatting-context/shape-outside-formatting-context.tentative.html
imported/mozilla/svg/svg-integration/clipPath-html-01.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-04.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-02.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-05.xhtml
imported/w3c/web-platform-tests/css/css-shapes/basic-shape-circle-ellipse-serialization.html
imported/mozilla/svg/svg-integration/clipPath-html-06.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-03.xhtml
Comment 7 EWS Watchlist 2018-07-24 05:18:15 PDT
Created attachment 345663 [details]
Archive of layout-test-results from ews115 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews115  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 8 EWS Watchlist 2018-07-24 05:28:03 PDT
Comment on attachment 345652 [details]
Patch

Attachment 345652 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/8637076

New failing tests:
imported/mozilla/svg/svg-integration/clipPath-html-01.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-04.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-02.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-05.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-06.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-03.xhtml
Comment 9 EWS Watchlist 2018-07-24 05:28:05 PDT
Created attachment 345665 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.4
Comment 10 Dirk Schulze 2018-07-24 05:48:25 PDT
All failing tests are progressions and we would need to update the references. Not sure how this is done for imported tests though.
Comment 11 EWS Watchlist 2018-07-24 07:26:05 PDT
Comment on attachment 345652 [details]
Patch

Attachment 345652 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/8638005

New failing tests:
imported/mozilla/svg/svg-integration/clipPath-html-01.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-04.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-02.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-05.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-06.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-03.xhtml
Comment 12 EWS Watchlist 2018-07-24 07:26:17 PDT
Created attachment 345675 [details]
Archive of layout-test-results from ews202 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews202  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 13 Dirk Schulze 2019-10-05 09:34:35 PDT
Created attachment 380287 [details]
Patch
Comment 14 Dirk Schulze 2019-10-05 09:35:21 PDT
Updated the patch to master. Failing tests still need to looked at.
Comment 15 Dirk Schulze 2019-10-10 22:58:33 PDT
Created attachment 380726 [details]
Patch
Comment 16 EWS Watchlist 2019-10-11 08:12:07 PDT
Comment on attachment 380726 [details]
Patch

Attachment 380726 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/13120319

New failing tests:
imported/mozilla/svg/svg-integration/clipPath-html-01.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-04.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-02.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-05.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-06.xhtml
imported/mozilla/svg/svg-integration/clipPath-html-03.xhtml
Comment 17 EWS Watchlist 2019-10-11 08:12:10 PDT
Created attachment 380755 [details]
Archive of layout-test-results from ews215 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews215  Port: win-future  Platform: CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit
Comment 18 Dirk Schulze 2019-10-11 09:12:59 PDT
All failing tests actually pass. 

However, the Mozilla tests seem odd since the references are either incorrect (assuming clipping doesn’t work, which does in Gecko) or hard to actually test with reference tests.

The Shape test is simply incorrect I’d say.

Any idea how they got integrated and what to do about them?
Comment 19 Dirk Schulze 2019-10-11 09:14:47 PDT
Said,  could you please comment how you integrated the Mozilla tests and what is wrong with the reference tests?
Comment 20 Dirk Schulze 2019-10-19 01:24:27 PDT
Created attachment 381369 [details]
Patch
Comment 21 Dirk Schulze 2019-10-19 05:25:15 PDT
Created attachment 381370 [details]
Patch
Comment 22 Dirk Schulze 2019-10-19 07:56:30 PDT
Created attachment 381371 [details]
Patch
Comment 23 Simon Fraser (smfr) 2019-10-21 10:35:23 PDT
Comment on attachment 381371 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=381371&action=review

> Source/WebCore/css/parser/CSSPropertyParser.cpp:4143
>          return consumeWebkitClipPath(m_range, m_context);

I think you should rename this function too: consumeWebkitClipPath
Comment 24 Dirk Schulze 2019-10-21 11:52:28 PDT
Created attachment 381425 [details]
Patch for landing
Comment 25 WebKit Commit Bot 2019-10-30 05:01:39 PDT
Comment on attachment 381425 [details]
Patch for landing

Rejecting attachment 381425 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'apply-attachment', '--no-update', '--non-interactive', 381425, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Logging in as commit-queue@webkit.org...
Fetching: https://bugs.webkit.org/attachment.cgi?id=381425&action=edit
Fetching: https://bugs.webkit.org/show_bug.cgi?id=187888&ctype=xml&excludefield=attachmentdata
Processing 1 patch from 1 bug.
Processing patch 381425 from bug 187888.
Fetching: https://bugs.webkit.org/attachment.cgi?id=381425
Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Parsed 26 diffs from patch file(s).
patching file Source/WebCore/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Hunk #1 FAILED at 387.
Hunk #2 succeeded at 3541 (offset -382 lines).
Hunk #3 succeeded at 3842 (offset -382 lines).
1 out of 3 hunks FAILED -- saving rejects to file Source/WebCore/css/CSSComputedStyleDeclaration.cpp.rej
patching file Source/WebCore/css/CSSProperties.json
patching file Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp
patching file Source/WebCore/css/parser/CSSPropertyParser.cpp
Hunk #3 succeeded at 4145 (offset 6 lines).
patching file Source/WebCore/page/animation/CSSPropertyAnimation.cpp
patching file Source/WebCore/rendering/style/SVGRenderStyle.h
patching file Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp
patching file Source/WebCore/rendering/style/SVGRenderStyleDefs.h
patching file Source/WebCore/rendering/style/WillChangeData.cpp
patching file Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp
patching file Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp
patching file Source/WebCore/rendering/svg/SVGResources.cpp
patching file LayoutTests/imported/mozilla/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file LayoutTests/imported/w3c/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file LayoutTests/imported/mozilla/svg/svg-integration/clipPath-html-01-expected.xhtml
patching file LayoutTests/imported/mozilla/svg/svg-integration/clipPath-html-02-expected.xhtml
patching file LayoutTests/imported/mozilla/svg/svg-integration/clipPath-html-02.xhtml
patching file LayoutTests/imported/mozilla/svg/svg-integration/clipPath-html-03-expected.xhtml
patching file LayoutTests/imported/mozilla/svg/svg-integration/clipPath-html-04-expected.xhtml
patching file LayoutTests/imported/mozilla/svg/svg-integration/clipPath-html-05-expected.xhtml
patching file LayoutTests/imported/mozilla/svg/svg-integration/clipPath-html-06-expected.xhtml
patching file LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-computed-expected.txt
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-computed-expected.txt.rej
patching file LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-valid-expected.txt
patching file LayoutTests/imported/w3c/web-platform-tests/css/css-shapes/basic-shape-circle-ellipse-serialization-expected.txt
patching file LayoutTests/imported/w3c/web-platform-tests/css/css-shapes/shape-outside/formatting-context/shape-outside-formatting-context.tentative-expected.html

Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Full output: https://webkit-queues.webkit.org/results/13191043
Comment 26 Dirk Schulze 2019-10-30 09:20:35 PDT
Created attachment 382321 [details]
Patch for landing
Comment 27 WebKit Commit Bot 2019-10-30 10:07:09 PDT
Comment on attachment 382321 [details]
Patch for landing

Clearing flags on attachment: 382321

Committed r251776: <https://trac.webkit.org/changeset/251776>
Comment 28 WebKit Commit Bot 2019-10-30 10:07:11 PDT
All reviewed patches have been landed.  Closing bug.
Comment 29 Radar WebKit Bug Importer 2019-10-30 10:08:30 PDT
<rdar://problem/56748309>
Comment 30 Carlos Alberto Lopez Perez 2020-03-16 21:43:10 PDT
Comment on attachment 382321 [details]
Patch for landing

View in context: https://bugs.webkit.org/attachment.cgi?id=382321&action=review

> LayoutTests/imported/w3c/ChangeLog:14
> +        * web-platform-tests/css/css-shapes/shape-outside/formatting-context/shape-outside-formatting-context.tentative-expected.html:
> +                Test result is incorrect: Doesn't test the shifing of content when shape-outside is set.

...

> LayoutTests/imported/w3c/web-platform-tests/css/css-shapes/shape-outside/formatting-context/shape-outside-formatting-context.tentative-expected.html:27
>  .flex {
>    display: flex;
>    height: 50px;
> +  width: 200px;
>    background: rebeccapurple;
> +  left: 50px;
> +  top: -100px;
> +  position: relative;
>  }
>  </style>
>  <div class="test">

I wonder about this changes.
I don't see them exported on the WPT repository in the expected file there <https://github.com/web-platform-tests/wpt/blob/master/css/css-shapes/shape-outside/formatting-context/reference/shape-outside-formatting-context-ref.html>
Is there any open PR for this?