Bug 201892

Summary: transform-box: content-box, stroke-box missing
Product: WebKit Reporter: Dirk Schulze <krit>
Component: CSSAssignee: Dirk Schulze <krit>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dbates, dino, esprehn+autocc, ews-watchlist, fmalita, fred.wang, glenn, gyuyoung.kim, joepeck, kondapallykalyan, macpherson, menard, pdr, repstein, sabouhallawa, schenney, sergio, simon.fraser, tsavell, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=211068
Attachments:
Description Flags
Patch
none
Patch
none
Archive of layout-test-results from ews215 for win-future
none
Patch
none
Archive of layout-test-results from ews210 for win-future
none
Patch
none
Patch
none
Patch for landing
none
Patch for landing
none
Patch for landing
none
Patch none

Description Dirk Schulze 2019-09-17 19:38:03 PDT
transform-box should support the keywords content-box and stroke-box. Currently it only supports fill-box, view-box, border-box. Mapping gets described here: https://drafts.csswg.org/css-transforms/#transform-box
Comment 1 Dirk Schulze 2019-09-17 22:06:11 PDT
Also, fill-box maps to content-box now which will make the HTML code change too. Not sure if it should be tracked in a different issue though.
Comment 2 Dirk Schulze 2019-09-17 22:07:01 PDT
From https://trac.webkit.org/changeset/217236/webkit

> For non-SVG elements, the used value is always border-box, so there is no change
> in behavior.

This did change since then. fill-box does map to content-box now.
Comment 3 Dirk Schulze 2019-09-18 01:15:59 PDT
Created attachment 379027 [details]
Patch
Comment 4 Dirk Schulze 2019-09-18 01:20:17 PDT
Uploading the patch for initial testing on the bots since I currently can't execute the webkit tests locally.
Comment 5 Dirk Schulze 2019-09-18 07:13:02 PDT
Created attachment 379035 [details]
Patch
Comment 6 EWS Watchlist 2019-09-18 09:14:33 PDT
Comment on attachment 379035 [details]
Patch

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

New failing tests:
transforms/transform-box.html
fast/css/transform-box-parsing.html
svg/transforms/svg-transform-box.html
Comment 7 EWS Watchlist 2019-09-18 09:14:41 PDT
Created attachment 379042 [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 8 Dirk Schulze 2019-09-18 13:48:46 PDT
Created attachment 379069 [details]
Patch
Comment 9 EWS Watchlist 2019-09-18 16:12:40 PDT
Comment on attachment 379069 [details]
Patch

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

New failing tests:
fast/workers/worker-cloneport.html
transforms/transform-box.html
svg/transforms/svg-transform-box.html
Comment 10 EWS Watchlist 2019-09-18 16:12:44 PDT
Created attachment 379082 [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
Comment 11 Dirk Schulze 2019-09-21 01:59:17 PDT
Created attachment 379316 [details]
Patch
Comment 12 Dirk Schulze 2019-09-21 04:16:49 PDT
Created attachment 379317 [details]
Patch
Comment 13 Nikolas Zimmermann 2019-09-24 09:33:16 PDT
Comment on attachment 379317 [details]
Patch

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

The patch and the tests look fine to me.

> Source/WebCore/ChangeLog:7
> +

A helpful text is missing here :-)

> Source/WebCore/rendering/RenderLayer.cpp:1264
> +    // stroke-box, view-box compute to border-box for HTML elements.

s/compute/resolve/ ?

> Source/WebCore/rendering/RenderLayer.cpp:1326
> +        LayoutSize offsetFromRoot { };

LayoutSize offsetFromRoot; should be sufficient, no?
Comment 14 Simon Fraser (smfr) 2019-10-02 14:43:44 PDT
Comment on attachment 379317 [details]
Patch

r+ but please address the comments.
Comment 15 Dirk Schulze 2019-10-02 22:37:31 PDT
I will land the patch next Tuesday.
Comment 16 Dirk Schulze 2019-10-05 09:15:41 PDT
Created attachment 380284 [details]
Patch for landing
Comment 17 Dirk Schulze 2019-10-05 09:20:29 PDT
Either my committer rights have been revoked (I have been committing regularly but the last time in May 2018) or there is a mistake in contributions.json.

Anyway, am not able to commit the patch. Simon, could you please add cq+?
Comment 18 Dirk Schulze 2019-10-09 21:14:35 PDT
Smfr ping?
Comment 19 Simon Fraser (smfr) 2019-10-10 13:09:06 PDT
Comment on attachment 380284 [details]
Patch for landing

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

> Source/WebCore/rendering/RenderLayer.cpp:1350
> +                LayoutSize offsetFromRoot { };

No need for {}

> Source/WebCore/rendering/RenderLayer.cpp:1363
> +            LayoutSize offsetFromRoot { };

Ditto

> Source/WebCore/rendering/RenderLayer.cpp:1376
> +        LayoutSize offsetFromRoot { };

Here too
Comment 20 Dirk Schulze 2019-10-10 22:49:06 PDT
Created attachment 380724 [details]
Patch for landing
Comment 21 WebKit Commit Bot 2019-10-11 16:47:12 PDT
The commit-queue encountered the following flaky tests while processing attachment 380724 [details]:

media/modern-media-controls/compact-media-controls/compact-media-controls-constructor.html bug 193587 (author: graouts@apple.com)
The commit-queue is continuing to process your patch.
Comment 22 WebKit Commit Bot 2019-10-11 16:48:05 PDT
Comment on attachment 380724 [details]
Patch for landing

Rejecting attachment 380724 [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', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 380724, '--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=380724&action=edit
Fetching: https://bugs.webkit.org/show_bug.cgi?id=201892&ctype=xml&excludefield=attachmentdata
Processing 1 patch from 1 bug.
Updating working directory
Processing patch 380724 from bug 201892.
Fetching: https://bugs.webkit.org/attachment.cgi?id=380724
Failed to run "['git', 'svn', 'dcommit', '--rmdir']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Committing to http://svn.webkit.org/repository/webkit/trunk ...
	A	LayoutTests/transforms/transform-box-expected.html
	A	LayoutTests/transforms/transform-box.html
	M	LayoutTests/ChangeLog

ERROR from SVN:
Item is out of date: File '/trunk/LayoutTests/ChangeLog' is out of date
W: aefb30b6c0516a3cfd70353d56b1d7c8f7760c8b and refs/remotes/origin/master differ, using rebase:
:040000 040000 561e99b372f7bbfbbab389e75fc25b26c2348e18 8993555ef8dda0560169c7e8295218ff918de0fd M	LayoutTests
:040000 040000 d9573f14db1ecc81ade9f08cc49708be144925f0 0bca10b2862afe94d06ab879014d25097835b63d M	Source
Current branch master is up to date.
ERROR: Not all changes have been committed into SVN, however the committed
ones (if any) seem to be successfully integrated into the working tree.
Please see the above messages for details.


Failed to run "['git', 'svn', 'dcommit', '--rmdir']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Committing to http://svn.webkit.org/repository/webkit/trunk ...
	A	LayoutTests/transforms/transform-box-expected.html
	A	LayoutTests/transforms/transform-box.html
	M	LayoutTests/ChangeLog

ERROR from SVN:
Item is out of date: File '/trunk/LayoutTests/ChangeLog' is out of date
W: aefb30b6c0516a3cfd70353d56b1d7c8f7760c8b and refs/remotes/origin/master differ, using rebase:
:040000 040000 561e99b372f7bbfbbab389e75fc25b26c2348e18 8993555ef8dda0560169c7e8295218ff918de0fd M	LayoutTests
:040000 040000 d9573f14db1ecc81ade9f08cc49708be144925f0 0bca10b2862afe94d06ab879014d25097835b63d M	Source
Current branch master is up to date.
ERROR: Not all changes have been committed into SVN, however the committed
ones (if any) seem to be successfully integrated into the working tree.
Please see the above messages for details.


Failed to run "['git', 'svn', 'dcommit', '--rmdir']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit
Updating OpenSource
From https://git.webkit.org/git/WebKit
   c71295638f5..7e7b87940b2  master     -> origin/master
Partial-rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc ...
Currently at 251027 = c71295638f595a4ed7f2a4a5cfd89dd2298b8a83
r251028 = 81fc0c25836dba863f8b010ef1780d6edd91f8c1
r251029 = 7e7b87940b25767efc592b218ba7b90b8b3c2997
Done rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc
First, rewinding head to replay your work on top of it...
Fast-forwarded master to refs/remotes/origin/master.

Full output: https://webkit-queues.webkit.org/results/13121633
Comment 23 Dirk Schulze 2019-10-12 00:13:41 PDT
Created attachment 380821 [details]
Patch for landing
Comment 24 Nikolas Zimmermann 2019-10-14 10:23:20 PDT
Committed r251081: <https://trac.webkit.org/changeset/251081>
Comment 25 Nikolas Zimmermann 2019-10-14 10:23:58 PDT
Landed on Dirks request.
Comment 26 Truitt Savell 2019-10-14 10:58:08 PDT
It looks like this broke the MacOS and iOS builds:
https://build.webkit.org/builders/Apple%20Mojave%20Release%20%28Build%29/builds/9162
https://build.webkit.org/builders/Apple%20iOS%2013%20Simulator%20Release%20%28Build%29/builds/720

Error:
./rendering/style/RenderStyleConstants.cpp:1223:13: error: enumeration values 'StrokeBox' and 'ContentBox' not handled in switch [-Werror,-Wswitch]
Comment 27 Russell Epstein 2019-10-14 11:19:13 PDT
Reverted r251081 for reason:

Broke macOS and iOS builds.

Committed r251084: <https://trac.webkit.org/changeset/251084>
Comment 28 Radar WebKit Bug Importer 2019-10-14 11:19:34 PDT
<rdar://problem/56256387>
Comment 29 Nikolas Zimmermann 2019-10-14 13:38:35 PDT
Thanks for rolling this out, sorry I did not notice earlier.
Dirk, can you provide an updated patch?
Comment 30 Dirk Schulze 2019-10-15 05:12:58 PDT
Created attachment 380978 [details]
Patch
Comment 31 Dirk Schulze 2019-10-15 05:14:59 PDT
It took so long to land it that the entire world changed around the patch it seems :D.

Thanks for rolling it out.
Comment 32 Dirk Schulze 2019-10-17 02:37:40 PDT
smfr?
Comment 33 WebKit Commit Bot 2019-10-17 12:21:46 PDT
Comment on attachment 380978 [details]
Patch

Clearing flags on attachment: 380978

Committed r251252: <https://trac.webkit.org/changeset/251252>
Comment 34 WebKit Commit Bot 2019-10-17 12:21:49 PDT
All reviewed patches have been landed.  Closing bug.