WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
191042
CSS Custom Properties API Should Support syntax="*" and "<length>", and handle cycles properly
https://bugs.webkit.org/show_bug.cgi?id=191042
Summary
CSS Custom Properties API Should Support syntax="*" and "<length>", and handl...
Justin Michaud
Reported
2018-10-29 14:39:16 PDT
<
https://bugs.webkit.org/show_bug.cgi?id=190039
> was rolled out due to a performance regression in speedometer. Let's try this again.
Attachments
Patch
(127.96 KB, patch)
2018-10-29 19:10 PDT
,
Justin Michaud
no flags
Details
Formatted Diff
Diff
Changes from last patch
(3.13 KB, patch)
2018-10-30 10:23 PDT
,
Justin Michaud
no flags
Details
Formatted Diff
Diff
Patch
(128.56 KB, patch)
2018-10-30 12:02 PDT
,
Justin Michaud
no flags
Details
Formatted Diff
Diff
Changes from unrolled patch
(4.92 KB, patch)
2018-10-30 12:03 PDT
,
Justin Michaud
no flags
Details
Formatted Diff
Diff
Patch
(128.70 KB, patch)
2018-10-31 11:36 PDT
,
Justin Michaud
no flags
Details
Formatted Diff
Diff
Changes from last patch
(5.13 KB, patch)
2018-10-31 11:37 PDT
,
Justin Michaud
no flags
Details
Formatted Diff
Diff
Patch
(128.58 KB, patch)
2018-10-31 20:08 PDT
,
Justin Michaud
no flags
Details
Formatted Diff
Diff
Changes from rolled out patch
(7.47 KB, patch)
2018-10-31 20:09 PDT
,
Justin Michaud
no flags
Details
Formatted Diff
Diff
Patch
(128.62 KB, patch)
2018-10-31 20:34 PDT
,
Justin Michaud
no flags
Details
Formatted Diff
Diff
Changes from rolled-out patch
(8.45 KB, patch)
2018-10-31 20:35 PDT
,
Justin Michaud
no flags
Details
Formatted Diff
Diff
Show Obsolete
(8)
View All
Add attachment
proposed patch, testcase, etc.
Justin Michaud
Comment 1
2018-10-29 14:43:39 PDT
Comment hidden (obsolete)
<
rdar://45477680
>
Justin Michaud
Comment 2
2018-10-29 14:46:36 PDT
Roll out: <
rdar://problem/45546003
>
Justin Michaud
Comment 3
2018-10-29 19:10:20 PDT
Created
attachment 353344
[details]
Patch
Justin Michaud
Comment 4
2018-10-29 20:36:18 PDT
<
rdar://45477680
>
Justin Michaud
Comment 5
2018-10-30 10:23:42 PDT
Created
attachment 353382
[details]
Changes from last patch
Antti Koivisto
Comment 6
2018-10-30 11:13:19 PDT
Justin said he is trying some template specialization for no-custom-properties case to eliminate the remaining regression.
Justin Michaud
Comment 7
2018-10-30 12:02:52 PDT
Created
attachment 353394
[details]
Patch
Justin Michaud
Comment 8
2018-10-30 12:03:21 PDT
Created
attachment 353395
[details]
Changes from unrolled patch
Dean Jackson
Comment 9
2018-10-30 12:09:13 PDT
Comment on
attachment 353395
[details]
Changes from unrolled patch View in context:
https://bugs.webkit.org/attachment.cgi?id=353395&action=review
> Source/WebCore/css/StyleResolver.cpp:2356 > + // We are in a cycle (eg. setting font size using registered custom property value containing em) > + // So this value should be unset
Nit: .
Antti Koivisto
Comment 10
2018-10-31 02:58:04 PDT
Comment on
attachment 353394
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=353394&action=review
> Source/WebCore/css/StyleResolver.cpp:2336 > + return applyCascadedPropertiesImpl<false>(firstProperty, lastProperty, state); > + return applyCascadedPropertiesImpl<true>(firstProperty, lastProperty, state);
It would be nicer to use enum instead of bool: applyCascadedPropertiesImpl<CustomPropertyCycleTracking::Enabled>(..) or similar.
Justin Michaud
Comment 11
2018-10-31 11:36:37 PDT
Created
attachment 353513
[details]
Patch
Justin Michaud
Comment 12
2018-10-31 11:37:10 PDT
Created
attachment 353514
[details]
Changes from last patch
Antti Koivisto
Comment 13
2018-10-31 12:21:19 PDT
Comment on
attachment 353513
[details]
Patch R=me
Justin Michaud
Comment 14
2018-10-31 20:08:25 PDT
Created
attachment 353574
[details]
Patch
Justin Michaud
Comment 15
2018-10-31 20:09:20 PDT
Created
attachment 353575
[details]
Changes from rolled out patch
Justin Michaud
Comment 16
2018-10-31 20:34:25 PDT
Created
attachment 353576
[details]
Patch
Justin Michaud
Comment 17
2018-10-31 20:35:42 PDT
Created
attachment 353577
[details]
Changes from rolled-out patch
Justin Michaud
Comment 18
2018-11-01 10:17:08 PDT
This patch seems to have fixed all of the performance regressions. Once the perf trial finishes, it looks like it should be good to land.
WebKit Commit Bot
Comment 19
2018-11-01 13:35:35 PDT
Comment on
attachment 353576
[details]
Patch Clearing flags on attachment: 353576 Committed
r237697
: <
https://trac.webkit.org/changeset/237697
>
WebKit Commit Bot
Comment 20
2018-11-01 13:35:37 PDT
All reviewed patches have been landed. Closing bug.
Antti Koivisto
Comment 21
2018-11-04 03:04:56 PST
Comment on
attachment 353576
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=353576&action=review
A few minor additional comments.
> Source/WebCore/css/StyleResolver.cpp:2354 > + if (TrackCycles == CustomPropertyCycleTracking::Disabled) { > + // If we don't have any custom properties, then there can't be any cycles. > + property.apply(*this, state); > + } else { > + if (UNLIKELY(state.inProgressProperties.get(propertyID))) {
We usually try to main flow of the function the common case and use early return/continue for uncommon cases. That would suggest structure like if (TrackCycles == CustomPropertyCycleTracking::Enabled) { ... continue; } property.apply(*this, state);
> Source/WebCore/css/StyleResolver.h:328 > + enum CustomPropertyCycleTracking { Enabled = 0, Disabled };
This should be a an enum class so we don't put Enabled and Disabled to StyleResolver namespace. No need for = 0
Antti Koivisto
Comment 22
2018-11-04 03:05:39 PST
*try to make
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug