Bug 163212

Summary: Support scoped style for user agent shadow trees
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: graouts, jonlee, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 163383    
Bug Blocks:    
Attachments:
Description Flags
patch
none
patch
buildbot: commit-queue-
Archive of layout-test-results from ews115 for mac-yosemite
none
Archive of layout-test-results from ews122 for ios-simulator-wk2
none
patch
none
patch
none
patch rniwa: review+

Description Antti Koivisto 2016-10-10 07:40:49 PDT
We now support scoped style for author shadow trees. This mechanism should be also available for internal shadow trees.
Comment 1 Radar WebKit Bug Importer 2016-10-11 09:36:04 PDT
<rdar://problem/28715318>
Comment 2 Antti Koivisto 2016-10-11 10:21:10 PDT
Created attachment 291274 [details]
patch
Comment 3 Antti Koivisto 2016-10-11 10:28:15 PDT
Created attachment 291275 [details]
patch
Comment 4 Build Bot 2016-10-11 11:46:29 PDT
Comment on attachment 291275 [details]
patch

Attachment 291275 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/2264108

New failing tests:
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-background.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-stylesheet.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-webkit-image-set.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-cursor.html
Comment 5 Build Bot 2016-10-11 11:46:32 PDT
Created attachment 291281 [details]
Archive of layout-test-results from ews115 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews115  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 6 Build Bot 2016-10-11 12:03:20 PDT
Comment on attachment 291275 [details]
patch

Attachment 291275 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/2264117

New failing tests:
fast/dom/HTMLMeterElement/meter-styles.html
fast/dom/HTMLMeterElement/meter-styles-changing-pseudo.html
fast/dom/HTMLMeterElement/meter-optimums.html
fast/dom/HTMLMeterElement/meter-element.html
fast/dom/HTMLMeterElement/meter-element-repaint-on-update-value.html
fast/dom/HTMLMeterElement/meter-appearances-capacity.html
fast/dom/HTMLMeterElement/meter-boundary-values.html
fast/dom/HTMLMeterElement/meter-appearances-rating-relevancy.html
Comment 7 Build Bot 2016-10-11 12:03:24 PDT
Created attachment 291282 [details]
Archive of layout-test-results from ews122 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews122  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.6
Comment 8 Antti Koivisto 2016-10-11 13:52:51 PDT
Created attachment 291293 [details]
patch
Comment 9 Antti Koivisto 2016-10-12 01:17:09 PDT
Created attachment 291345 [details]
patch

Now without separate mode. Instead UA shadow trees switch to per-scope style resolver automatically when there is a stylesheet in the shadow tree.
Comment 10 Antti Koivisto 2016-10-12 01:20:35 PDT
Created attachment 291346 [details]
patch
Comment 11 Andreas Kling 2016-10-12 12:15:41 PDT
Comment on attachment 291346 [details]
patch

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

r=me

> Source/WebCore/css/StyleResolver.h:252
> -                unsigned treeContextOrdinal : 28;
> +                int treeContextOrdinal;

Please get rid of the surrounding union if you do this, as it will no longer serve a purpose.
Comment 12 Antti Koivisto 2016-10-13 02:26:05 PDT
https://trac.webkit.org/changeset/207280