New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 10 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 24
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature

Blocking:
issue 789729



Sign in to add a comment
link

Issue 807560: Implement constructable stylesheet

Reported by kochi@chromium.org, Jan 31 2018 Project Member

Issue description

Spec:
https://tabatkins.github.io/specs/construct-stylesheets/

Design doc: to be published
Intent to Implement: to be sent to blink-dev
Chromestatus: to be filed
 

Comment 2 by dgro...@chromium.org, Jan 31 2018

Labels: -Type-Bug Type-Feature

Comment 3 by kochi@chromium.org, Feb 5 2018

Blocking: 789729

Comment 4 by kochi@chromium.org, Feb 5 2018

See also:  bug 712080  and bug 699838

Comment 6 by e...@chromium.org, Feb 5 2018

Labels: -Pri-1 Pri-2

Comment 7 by kochi@chromium.org, Feb 6 2018

P2 sounds okay and matches our team OKRs.

Comment 8 by kochi@chromium.org, Feb 6 2018

Status: Started (was: Assigned)
Summary: Implement constructable stylesheet (was: Implement constructible stylesheet)
The rough roadmap is:

- Implement constructable stylesheet (this)
- Add interface to give constructed stylesheet to custom element
  (https://github.com/w3c/webcomponents/issues/468) to plumb the
  stylesheet to default styles for custom elements
  (https://drafts.csswg.org/css-scoping/#default-element-styles)

and on the way lots of clarifications for the spec or behaviors are expected.
Also we need to have performance numbers for demonstrating in which scenario
this feature makes much sense.

Comment 9 by bugdroid1@chromium.org, Feb 13 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3c0a7b3e71ccddb844e486f9af1053897c5fefbe

commit 3c0a7b3e71ccddb844e486f9af1053897c5fefbe
Author: Rakina Zata Amni <rakina@chromium.org>
Date: Tue Feb 13 09:08:55 2018

Add Constructor for CSSStyleSheet behind flag

Expose constructor method for CSS Stylesheet behind a runtime flag.
Spec draft: https://wicg.github.io/construct-stylesheets/#dom-cssstylesheet-cssstylesheet

Bug:  807560 
Change-Id: Ie8099ef6eca1c38fd3782dee238e866455949e78
Reviewed-on: https://chromium-review.googlesource.com/898762
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Takayoshi Kochi <kochi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536307}
[modify] https://crrev.com/3c0a7b3e71ccddb844e486f9af1053897c5fefbe/third_party/WebKit/LayoutTests/external/wpt/css/cssom/interfaces-expected.txt
[add] https://crrev.com/3c0a7b3e71ccddb844e486f9af1053897c5fefbe/third_party/WebKit/LayoutTests/fast/css/CSSStyleSheet-constructable.html
[modify] https://crrev.com/3c0a7b3e71ccddb844e486f9af1053897c5fefbe/third_party/WebKit/Source/bindings/core/v8/BUILD.gn
[modify] https://crrev.com/3c0a7b3e71ccddb844e486f9af1053897c5fefbe/third_party/WebKit/Source/core/BUILD.gn
[modify] https://crrev.com/3c0a7b3e71ccddb844e486f9af1053897c5fefbe/third_party/WebKit/Source/core/core_idl_files.gni
[modify] https://crrev.com/3c0a7b3e71ccddb844e486f9af1053897c5fefbe/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp
[modify] https://crrev.com/3c0a7b3e71ccddb844e486f9af1053897c5fefbe/third_party/WebKit/Source/core/css/CSSStyleSheet.h
[modify] https://crrev.com/3c0a7b3e71ccddb844e486f9af1053897c5fefbe/third_party/WebKit/Source/core/css/CSSStyleSheet.idl
[add] https://crrev.com/3c0a7b3e71ccddb844e486f9af1053897c5fefbe/third_party/WebKit/Source/core/css/CSSStyleSheetInit.idl
[add] https://crrev.com/3c0a7b3e71ccddb844e486f9af1053897c5fefbe/third_party/WebKit/Source/core/css/CSSStyleSheetTest.cpp
[modify] https://crrev.com/3c0a7b3e71ccddb844e486f9af1053897c5fefbe/third_party/WebKit/Source/core/css/StyleSheetCandidate.cpp
[modify] https://crrev.com/3c0a7b3e71ccddb844e486f9af1053897c5fefbe/third_party/WebKit/Source/platform/runtime_enabled_features.json5

Comment 10 by kochi@chromium.org, Feb 26 2018

It would be nice to benchmark this against
https://bugs.chromium.org/p/chromium/issues/detail?id=789729

Comment 11 by bugdroid1@chromium.org, Feb 26 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dd4d74b8571682848ceb9c61af00e91a780a81a3

commit dd4d74b8571682848ceb9c61af00e91a780a81a3
Author: Rakina Zata Amni <rakina@chromium.org>
Date: Mon Feb 26 12:45:43 2018

Apply style changes when moreStyleSheets is updated

This change is the continuation of crrev.com/c/898762. With this change,
a list of constructed stylesheets can be assigned to TreeScope's
moreStyleSheets andthe TreeScope will update its style (lazily).
This change also adds handling of disabled and alternate stylesheets.

Spec draft: https://wicg.github.io/construct-stylesheets/#dom-cssstylesheet-cssstylesheet

Bug:  807560 
Change-Id: If6bc583d9923b193d6b308f48900e4979ff5bf4e
Reviewed-on: https://chromium-review.googlesource.com/925763
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Takayoshi Kochi <kochi@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539113}
[modify] https://crrev.com/dd4d74b8571682848ceb9c61af00e91a780a81a3/third_party/WebKit/LayoutTests/external/wpt/css/cssom/interfaces-expected.txt
[modify] https://crrev.com/dd4d74b8571682848ceb9c61af00e91a780a81a3/third_party/WebKit/LayoutTests/fast/css/CSSStyleSheet-constructable.html
[modify] https://crrev.com/dd4d74b8571682848ceb9c61af00e91a780a81a3/third_party/WebKit/LayoutTests/platform/mac-mac10.12/external/wpt/css/cssom/interfaces-expected.txt
[modify] https://crrev.com/dd4d74b8571682848ceb9c61af00e91a780a81a3/third_party/WebKit/LayoutTests/platform/win/external/wpt/css/cssom/interfaces-expected.txt
[modify] https://crrev.com/dd4d74b8571682848ceb9c61af00e91a780a81a3/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/dd4d74b8571682848ceb9c61af00e91a780a81a3/third_party/WebKit/Source/core/BUILD.gn
[modify] https://crrev.com/dd4d74b8571682848ceb9c61af00e91a780a81a3/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp
[modify] https://crrev.com/dd4d74b8571682848ceb9c61af00e91a780a81a3/third_party/WebKit/Source/core/css/CSSStyleSheet.h
[modify] https://crrev.com/dd4d74b8571682848ceb9c61af00e91a780a81a3/third_party/WebKit/Source/core/css/CSSStyleSheetTest.cpp
[modify] https://crrev.com/dd4d74b8571682848ceb9c61af00e91a780a81a3/third_party/WebKit/Source/core/css/DocumentStyleSheetCollection.cpp
[modify] https://crrev.com/dd4d74b8571682848ceb9c61af00e91a780a81a3/third_party/WebKit/Source/core/css/ShadowTreeStyleSheetCollection.cpp
[modify] https://crrev.com/dd4d74b8571682848ceb9c61af00e91a780a81a3/third_party/WebKit/Source/core/css/StyleEngine.cpp
[modify] https://crrev.com/dd4d74b8571682848ceb9c61af00e91a780a81a3/third_party/WebKit/Source/core/css/StyleEngine.h
[modify] https://crrev.com/dd4d74b8571682848ceb9c61af00e91a780a81a3/third_party/WebKit/Source/core/css/StyleSheetCandidate.cpp
[modify] https://crrev.com/dd4d74b8571682848ceb9c61af00e91a780a81a3/third_party/WebKit/Source/core/css/StyleSheetList.cpp
[modify] https://crrev.com/dd4d74b8571682848ceb9c61af00e91a780a81a3/third_party/WebKit/Source/core/css/StyleSheetList.h
[modify] https://crrev.com/dd4d74b8571682848ceb9c61af00e91a780a81a3/third_party/WebKit/Source/core/css/StyleSheetList.idl
[add] https://crrev.com/dd4d74b8571682848ceb9c61af00e91a780a81a3/third_party/WebKit/Source/core/css/StyleSheetListTest.cpp
[modify] https://crrev.com/dd4d74b8571682848ceb9c61af00e91a780a81a3/third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.cpp
[modify] https://crrev.com/dd4d74b8571682848ceb9c61af00e91a780a81a3/third_party/WebKit/Source/core/dom/DocumentOrShadowRoot.h
[modify] https://crrev.com/dd4d74b8571682848ceb9c61af00e91a780a81a3/third_party/WebKit/Source/core/dom/DocumentOrShadowRoot.idl
[modify] https://crrev.com/dd4d74b8571682848ceb9c61af00e91a780a81a3/third_party/WebKit/Source/core/dom/TreeScope.cpp
[modify] https://crrev.com/dd4d74b8571682848ceb9c61af00e91a780a81a3/third_party/WebKit/Source/core/dom/TreeScope.h

Comment 12 by bugdroid1@chromium.org, Mar 1 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c51745d466eade82bdf393671b123fbf97703153

commit c51745d466eade82bdf393671b123fbf97703153
Author: Rakina Zata Amni <rakina@chromium.org>
Date: Thu Mar 01 15:01:53 2018

Apply constructed stylesheets CSSOM changes

This change is the continuation of crrev.com/c/925763. With this change,
CSSOM changes to constructed stylesheets are reflected on all TreeScopes
where the style is applied to.

Spec draft: https://wicg.github.io/construct-stylesheets/#dom-cssstylesheet-cssstylesheet

Bug:  807560 
Change-Id: I1cddeea9dc346aa238fa4d0aabe233397166e2a5
Reviewed-on: https://chromium-review.googlesource.com/938872
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540152}
[modify] https://crrev.com/c51745d466eade82bdf393671b123fbf97703153/third_party/WebKit/LayoutTests/fast/css/CSSStyleSheet-constructable.html
[modify] https://crrev.com/c51745d466eade82bdf393671b123fbf97703153/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp
[modify] https://crrev.com/c51745d466eade82bdf393671b123fbf97703153/third_party/WebKit/Source/core/css/CSSStyleSheet.h
[modify] https://crrev.com/c51745d466eade82bdf393671b123fbf97703153/third_party/WebKit/Source/core/css/StyleEngine.cpp
[modify] https://crrev.com/c51745d466eade82bdf393671b123fbf97703153/third_party/WebKit/Source/core/css/StyleEngine.h
[modify] https://crrev.com/c51745d466eade82bdf393671b123fbf97703153/third_party/WebKit/Source/core/dom/TreeScope.cpp

Comment 13 by kochi@chromium.org, Jun 18 2018

Cc: -rakina@chromium.org
Owner: rakina@chromium.org
Reflecting the reality - rakina@ is leading the implementation.

Remaining tasks are following up all the blocking issues at
- follow up all the blocking issues at 
  https://github.com/WICG/construct-stylesheets/issues (label: needs-resolution)
- get the resolution reflected to the spec draft
- get the spec draft accepted by CSSWG
- send "intent to ship"

Comment 14 by bugdroid1@chromium.org, Jul 6 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0cf5335291d8d064de758455e6aa393097901f21

commit 0cf5335291d8d064de758455e6aa393097901f21
Author: Rakina Zata Amni <rakina@chromium.org>
Date: Fri Jul 06 04:18:40 2018

Remove DocumentOrShadowRoot.moreStyleSheets

We are removing moreStyleSheets, as it has been removed from the draft
spec: https://wicg.github.io/construct-stylesheets/
DocumentorShadowRoot.moreStyleSheets was added in crrev.com/c/925763
as a way to use constructed CSSStyleSheets as there aren't any way to
use them. For more details see the old draft spec at
https://tabatkins.github.io/specs/construct-stylesheets/#dom-treescope-morestylesheets

We are also going to remove CSStyleSheet sync constructor and change
it to a sync constructor producing an empty stylesheet, and add
Document.createCSSStyleSheet that returns Promise<CSSStyleSheet>
in future CLs.

Bug:  807560 
Change-Id: I2f9c692317c4d28fb325e8f34c1a2c3b7720cf21
Reviewed-on: https://chromium-review.googlesource.com/1125741
Reviewed-by: Takayoshi Kochi <kochi@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572891}
[modify] https://crrev.com/0cf5335291d8d064de758455e6aa393097901f21/third_party/WebKit/LayoutTests/external/wpt/css/cssom/interfaces-expected.txt
[modify] https://crrev.com/0cf5335291d8d064de758455e6aa393097901f21/third_party/WebKit/LayoutTests/fast/css/CSSStyleSheet-constructable.html
[modify] https://crrev.com/0cf5335291d8d064de758455e6aa393097901f21/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/0cf5335291d8d064de758455e6aa393097901f21/third_party/blink/renderer/core/BUILD.gn
[modify] https://crrev.com/0cf5335291d8d064de758455e6aa393097901f21/third_party/blink/renderer/core/css/document_style_sheet_collection.cc
[modify] https://crrev.com/0cf5335291d8d064de758455e6aa393097901f21/third_party/blink/renderer/core/css/shadow_tree_style_sheet_collection.cc
[modify] https://crrev.com/0cf5335291d8d064de758455e6aa393097901f21/third_party/blink/renderer/core/css/style_engine.cc
[modify] https://crrev.com/0cf5335291d8d064de758455e6aa393097901f21/third_party/blink/renderer/core/css/style_engine.h
[modify] https://crrev.com/0cf5335291d8d064de758455e6aa393097901f21/third_party/blink/renderer/core/css/style_sheet_list.cc
[modify] https://crrev.com/0cf5335291d8d064de758455e6aa393097901f21/third_party/blink/renderer/core/css/style_sheet_list.h
[modify] https://crrev.com/0cf5335291d8d064de758455e6aa393097901f21/third_party/blink/renderer/core/css/style_sheet_list.idl
[delete] https://crrev.com/7261c7b6992929ff6a27dd4376310f2b3c51a584/third_party/blink/renderer/core/css/style_sheet_list_test.cc
[modify] https://crrev.com/0cf5335291d8d064de758455e6aa393097901f21/third_party/blink/renderer/core/dom/document_or_shadow_root.h
[modify] https://crrev.com/0cf5335291d8d064de758455e6aa393097901f21/third_party/blink/renderer/core/dom/document_or_shadow_root.idl
[modify] https://crrev.com/0cf5335291d8d064de758455e6aa393097901f21/third_party/blink/renderer/core/dom/tree_scope.cc
[modify] https://crrev.com/0cf5335291d8d064de758455e6aa393097901f21/third_party/blink/renderer/core/dom/tree_scope.h

Comment 15 by bugdroid1@chromium.org, Jul 9 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/143f24fc70141c38e74e17e8406eda0be24948f0

commit 143f24fc70141c38e74e17e8406eda0be24948f0
Author: Rakina Zata Amni <rakina@chromium.org>
Date: Mon Jul 09 06:43:51 2018

Change CSSStyleSheet constructor to produce only empty CSSStyleSheets

We previously implemented constructable CSSStyleSheet synchronously,
but discussions in https://github.com/WICG/construct-stylesheets/issues/2
have gravitated away from that and we are now interested in asynchronous
creation of CSSStyleSheet, but also provide synchronous constructor that
only result in an empty sheet.

This CL changed the constructors to not accept CSS text. This also
changes part of the constructor where we process passed MediaList
data to copy the given MediaList instead of using the same instance
to avoid introducing the concept of mutable MediaLists.
See: https://github.com/WICG/construct-stylesheets/issues/13

CL for promise-based API: crrev.com/c/1126754

Bug:  807560 
Change-Id: I0aeb052b63e45d81fc46cde3052f3d134afa16fa
Reviewed-on: https://chromium-review.googlesource.com/1126898
Reviewed-by: Fergal Daly <fergal@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Reviewed-by: Takayoshi Kochi <kochi@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573233}
[modify] https://crrev.com/143f24fc70141c38e74e17e8406eda0be24948f0/third_party/WebKit/LayoutTests/external/wpt/css/cssom/interfaces-expected.txt
[modify] https://crrev.com/143f24fc70141c38e74e17e8406eda0be24948f0/third_party/WebKit/LayoutTests/fast/css/CSSStyleSheet-constructable.html
[modify] https://crrev.com/143f24fc70141c38e74e17e8406eda0be24948f0/third_party/WebKit/LayoutTests/fast/dom/dom-constructors-expected.txt
[modify] https://crrev.com/143f24fc70141c38e74e17e8406eda0be24948f0/third_party/blink/renderer/core/css/css_style_sheet.cc
[modify] https://crrev.com/143f24fc70141c38e74e17e8406eda0be24948f0/third_party/blink/renderer/core/css/css_style_sheet.h
[modify] https://crrev.com/143f24fc70141c38e74e17e8406eda0be24948f0/third_party/blink/renderer/core/css/css_style_sheet.idl
[modify] https://crrev.com/143f24fc70141c38e74e17e8406eda0be24948f0/third_party/blink/renderer/core/css/css_style_sheet_test.cc
[modify] https://crrev.com/143f24fc70141c38e74e17e8406eda0be24948f0/third_party/blink/renderer/core/html/custom/custom_element_registry_test.cc

Comment 16 by bugdroid1@chromium.org, Jul 17 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1de71b638f99c15a3f97ec7b25b0c6dc920fbee0

commit 1de71b638f99c15a3f97ec7b25b0c6dc920fbee0
Author: Rakina Zata Amni <rakina@chromium.org>
Date: Tue Jul 17 10:33:19 2018

Implement Document.createCSSStyleSheet

We previously implemented constructable CSSStyleSheet synchronously,
but discussions in  https://github.com/WICG/construct-stylesheets/issues/2
have gravitated away from that and we are now interested in asynchronous
creation of CSSStyleSheet.

This CL added Document.createCSSStyleSheet that returns a
Promise<CSSStyleSheet>, while also removing the exposed CSSStyleSheet
that was previously exposed. Note that because CSS parsing is still
done on the main thread, this function is actually still blocking.

The previously implemented CSSStyleSheet is changed to only produce
empty CSSStyleSheets in this CL: crrev.com/c/1126898

Bug:  807560 
Change-Id: I9f9d17ae04829ff399ae384f8b3a6d97a3b0613b
Reviewed-on: https://chromium-review.googlesource.com/1126754
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Reviewed-by: Takayoshi Kochi <kochi@chromium.org>
Reviewed-by: Fergal Daly <fergal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575600}
[modify] https://crrev.com/1de71b638f99c15a3f97ec7b25b0c6dc920fbee0/third_party/WebKit/LayoutTests/fast/css/CSSStyleSheet-constructable.html
[modify] https://crrev.com/1de71b638f99c15a3f97ec7b25b0c6dc920fbee0/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/1de71b638f99c15a3f97ec7b25b0c6dc920fbee0/third_party/blink/renderer/core/css/css_style_sheet.h
[modify] https://crrev.com/1de71b638f99c15a3f97ec7b25b0c6dc920fbee0/third_party/blink/renderer/core/css/css_style_sheet_test.cc
[modify] https://crrev.com/1de71b638f99c15a3f97ec7b25b0c6dc920fbee0/third_party/blink/renderer/core/dom/document.cc
[modify] https://crrev.com/1de71b638f99c15a3f97ec7b25b0c6dc920fbee0/third_party/blink/renderer/core/dom/document.h
[modify] https://crrev.com/1de71b638f99c15a3f97ec7b25b0c6dc920fbee0/third_party/blink/renderer/core/dom/document.idl

Comment 18 by rakina@chromium.org, Aug 2

Cc: momon@google.com

Comment 19 by bugdroid1@chromium.org, Aug 7

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2abadb6243b1d7246b1167de226850a2f10442e0

commit 2abadb6243b1d7246b1167de226850a2f10442e0
Author: Momoko Sumida <momon@google.com>
Date: Tue Aug 07 08:43:40 2018

Implement Document.createEmptyCSSStyleSheet

Currently, empty CSSStyleSheets can only be constructed using a constructor method.
This CL adds Document.createEmptyCSSStyleSheet so that it can be tied to document in the future.
Tying it to document restricts the use of a CSSStyleSheet in different documents, which means CSSStyleSheets can only be used in the documents where they are constructed. This will reduce security risk.

Note:
The constructed CSSStyleSheet is not currently tied to the Document yet
Constructor method will be deleted in another CL
createEmptyCSSStyleSheet(CSSStyleSheetInit) produces an empty CSSStyleSheet, while createCSSStyleSheet(text, CSSStyleSheetInit) creates a CSSStyleSheet with text

Link to related comments in discussion:
https://github.com/WICG/construct-stylesheets/issues/23#issuecomment-379180786
https://github.com/WICG/construct-stylesheets/issues/15#issuecomment-391216056

Bug:  807560 

Change-Id: I94ea6f795deaf0dee67fba5c2705c8749ac72da8
Reviewed-on: https://chromium-review.googlesource.com/1160422
Commit-Queue: Momoko Sumida <momon@google.com>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581169}
[modify] https://crrev.com/2abadb6243b1d7246b1167de226850a2f10442e0/third_party/WebKit/LayoutTests/fast/css/CSSStyleSheet-constructable.html
[modify] https://crrev.com/2abadb6243b1d7246b1167de226850a2f10442e0/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/2abadb6243b1d7246b1167de226850a2f10442e0/third_party/blink/renderer/core/dom/document.cc
[modify] https://crrev.com/2abadb6243b1d7246b1167de226850a2f10442e0/third_party/blink/renderer/core/dom/document.h
[modify] https://crrev.com/2abadb6243b1d7246b1167de226850a2f10442e0/third_party/blink/renderer/core/dom/document.idl

Comment 20 by bugdroid1@chromium.org, Aug 9

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/af00b29ef10cda1bec17f975930ac23de6375da9

commit af00b29ef10cda1bec17f975930ac23de6375da9
Author: Momoko Sumida <momon@google.com>
Date: Thu Aug 09 09:10:45 2018

Delete constructor for creating empty CSSStyleSheets

Currently, empty CSSStyleSheets can be constructed either with a constructor or with Document.createEmptyCSSStyleSheet.
This CL deletes the constructor so that they can only be produced by Document.createEmptyCSSStyleSheet.

Document.createEmptyCSSStyleSheet is considered to be more desirable, as CSSStyleSheets produced by Document.createEmptyCSSStyleSheet can be tied to documents in the future. This means that their use can be limited in the documents where they were produced, resulting in higher security.

Note:
The constructed CSSStyleSheet is not currently tied to the Document yet

Link to related comments in discussion:
https://github.com/WICG/construct-stylesheets/issues/23#issuecomment-379180786
https://github.com/WICG/construct-stylesheets/issues/15#issuecomment-391216056

Bug:  807560 
Change-Id: I767e15e83e1f31eb278bc81233c8b579d0f511c7
Reviewed-on: https://chromium-review.googlesource.com/1164876
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Momoko Sumida <momon@google.com>
Cr-Commit-Position: refs/heads/master@{#581836}
[modify] https://crrev.com/af00b29ef10cda1bec17f975930ac23de6375da9/third_party/WebKit/LayoutTests/external/wpt/css/cssom/interfaces-expected.txt
[modify] https://crrev.com/af00b29ef10cda1bec17f975930ac23de6375da9/third_party/WebKit/LayoutTests/fast/css/CSSStyleSheet-constructable.html
[modify] https://crrev.com/af00b29ef10cda1bec17f975930ac23de6375da9/third_party/WebKit/LayoutTests/fast/dom/dom-constructors-expected.txt
[modify] https://crrev.com/af00b29ef10cda1bec17f975930ac23de6375da9/third_party/blink/renderer/core/css/css_style_sheet.cc
[modify] https://crrev.com/af00b29ef10cda1bec17f975930ac23de6375da9/third_party/blink/renderer/core/css/css_style_sheet.h
[modify] https://crrev.com/af00b29ef10cda1bec17f975930ac23de6375da9/third_party/blink/renderer/core/css/css_style_sheet.idl
[modify] https://crrev.com/af00b29ef10cda1bec17f975930ac23de6375da9/third_party/blink/renderer/core/css/css_style_sheet_test.cc
[modify] https://crrev.com/af00b29ef10cda1bec17f975930ac23de6375da9/third_party/blink/renderer/core/html/custom/custom_element_registry_test.cc

Comment 21 by bugdroid1@chromium.org, Aug 10

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2472878c1953dba5360a183647d077cd1634db81

commit 2472878c1953dba5360a183647d077cd1634db81
Author: Matt Giuca <mgiuca@chromium.org>
Date: Fri Aug 10 04:26:31 2018

Revert "Delete constructor for creating empty CSSStyleSheets"

This reverts commit af00b29ef10cda1bec17f975930ac23de6375da9.

Reason for revert: Suspect for  https://crbug.com/873015 

I have low confidence that this is the culprit but it's my best guess.

Original change's description:
> Delete constructor for creating empty CSSStyleSheets
> 
> Currently, empty CSSStyleSheets can be constructed either with a constructor or with Document.createEmptyCSSStyleSheet.
> This CL deletes the constructor so that they can only be produced by Document.createEmptyCSSStyleSheet.
> 
> Document.createEmptyCSSStyleSheet is considered to be more desirable, as CSSStyleSheets produced by Document.createEmptyCSSStyleSheet can be tied to documents in the future. This means that their use can be limited in the documents where they were produced, resulting in higher security.
> 
> Note:
> The constructed CSSStyleSheet is not currently tied to the Document yet
> 
> Link to related comments in discussion:
> https://github.com/WICG/construct-stylesheets/issues/23#issuecomment-379180786
> https://github.com/WICG/construct-stylesheets/issues/15#issuecomment-391216056
> 
> Bug:  807560 
> Change-Id: I767e15e83e1f31eb278bc81233c8b579d0f511c7
> Reviewed-on: https://chromium-review.googlesource.com/1164876
> Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
> Reviewed-by: Hayato Ito <hayato@chromium.org>
> Commit-Queue: Momoko Sumida <momon@google.com>
> Cr-Commit-Position: refs/heads/master@{#581836}

TBR=hayato@chromium.org,rakina@chromium.org,momon@google.com

Change-Id: Iea70ff4dcc3a5ecf3a806b417572fd8f88e2e58b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  807560 ,  873015 
Reviewed-on: https://chromium-review.googlesource.com/1170462
Reviewed-by: Matt Giuca <mgiuca@chromium.org>
Commit-Queue: Matt Giuca <mgiuca@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582054}
[modify] https://crrev.com/2472878c1953dba5360a183647d077cd1634db81/third_party/WebKit/LayoutTests/external/wpt/css/cssom/interfaces-expected.txt
[modify] https://crrev.com/2472878c1953dba5360a183647d077cd1634db81/third_party/WebKit/LayoutTests/fast/css/CSSStyleSheet-constructable.html
[modify] https://crrev.com/2472878c1953dba5360a183647d077cd1634db81/third_party/WebKit/LayoutTests/fast/dom/dom-constructors-expected.txt
[modify] https://crrev.com/2472878c1953dba5360a183647d077cd1634db81/third_party/blink/renderer/core/css/css_style_sheet.cc
[modify] https://crrev.com/2472878c1953dba5360a183647d077cd1634db81/third_party/blink/renderer/core/css/css_style_sheet.h
[modify] https://crrev.com/2472878c1953dba5360a183647d077cd1634db81/third_party/blink/renderer/core/css/css_style_sheet.idl
[modify] https://crrev.com/2472878c1953dba5360a183647d077cd1634db81/third_party/blink/renderer/core/css/css_style_sheet_test.cc
[modify] https://crrev.com/2472878c1953dba5360a183647d077cd1634db81/third_party/blink/renderer/core/html/custom/custom_element_registry_test.cc

Comment 22 by bugdroid1@chromium.org, Aug 31

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/38d22cebeac720b0156bdc78ef8e542636d0c9ee

commit 38d22cebeac720b0156bdc78ef8e542636d0c9ee
Author: Rakina Zata Amni <rakina@chromium.org>
Date: Fri Aug 31 11:35:40 2018

Bring back moreStyleSheets as adoptedStyleSheets

After discussions regarding https://github.com/WICG/construct-stylesheets,
we are actually interested in having a way to style TreeScopes
with constructed CSSStyleSheet. This CL brings back moreStyleSheets,
renaming it as adoptedStylSheets (was deleted in crrev.com/c/1125741
and crrev.com/c/1155286). No additional behavior change from previous
implementation. Other changes to the spec will be added in separate CL.

Draft spec at: https://wicg.github.io/construct-stylesheets/
Previous implementation CLs: crrev.com/c/925763, crrev.com/c/938872

Bug:  807560 
Change-Id: I65b4de496c0a70566d293374249816643456d8b9
Reviewed-on: https://chromium-review.googlesource.com/1197002
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587993}
[modify] https://crrev.com/38d22cebeac720b0156bdc78ef8e542636d0c9ee/third_party/WebKit/LayoutTests/external/wpt/css/cssom/interfaces-expected.txt
[modify] https://crrev.com/38d22cebeac720b0156bdc78ef8e542636d0c9ee/third_party/WebKit/LayoutTests/fast/css/CSSStyleSheet-constructable.html
[modify] https://crrev.com/38d22cebeac720b0156bdc78ef8e542636d0c9ee/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/38d22cebeac720b0156bdc78ef8e542636d0c9ee/third_party/blink/renderer/core/css/css_style_sheet.cc
[modify] https://crrev.com/38d22cebeac720b0156bdc78ef8e542636d0c9ee/third_party/blink/renderer/core/css/css_style_sheet.h
[modify] https://crrev.com/38d22cebeac720b0156bdc78ef8e542636d0c9ee/third_party/blink/renderer/core/css/document_style_sheet_collection.cc
[modify] https://crrev.com/38d22cebeac720b0156bdc78ef8e542636d0c9ee/third_party/blink/renderer/core/css/shadow_tree_style_sheet_collection.cc
[modify] https://crrev.com/38d22cebeac720b0156bdc78ef8e542636d0c9ee/third_party/blink/renderer/core/css/style_engine.cc
[modify] https://crrev.com/38d22cebeac720b0156bdc78ef8e542636d0c9ee/third_party/blink/renderer/core/css/style_engine.h
[modify] https://crrev.com/38d22cebeac720b0156bdc78ef8e542636d0c9ee/third_party/blink/renderer/core/css/style_sheet_list.cc
[modify] https://crrev.com/38d22cebeac720b0156bdc78ef8e542636d0c9ee/third_party/blink/renderer/core/css/style_sheet_list.h
[modify] https://crrev.com/38d22cebeac720b0156bdc78ef8e542636d0c9ee/third_party/blink/renderer/core/css/style_sheet_list.idl
[modify] https://crrev.com/38d22cebeac720b0156bdc78ef8e542636d0c9ee/third_party/blink/renderer/core/dom/document_or_shadow_root.h
[modify] https://crrev.com/38d22cebeac720b0156bdc78ef8e542636d0c9ee/third_party/blink/renderer/core/dom/document_or_shadow_root.idl
[modify] https://crrev.com/38d22cebeac720b0156bdc78ef8e542636d0c9ee/third_party/blink/renderer/core/dom/tree_scope.cc
[modify] https://crrev.com/38d22cebeac720b0156bdc78ef8e542636d0c9ee/third_party/blink/renderer/core/dom/tree_scope.h

Comment 23 by bugdroid1@chromium.org, Sep 14

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/eb63b845febd59990afb4eda6062edde359f1871

commit eb63b845febd59990afb4eda6062edde359f1871
Author: Momoko Sumida <momon@google.com>
Date: Fri Sep 14 08:50:17 2018

Restrict the use of CSSStyleSheets to only one Document

After discussions in
https://github.com/WICG/construct-stylesheets/issues/23, we concluded
that using the same constructable stylesheet in multiple Documents
should not be allowed, as it can raise security risk.
This CL bans the use of CSSStyleSheets in different Documents by
introducing associated_document_ in CSSStyleSheet and checking if the
style is applied to the same Document when it's added to
AdoptedStyleSheets of any TreeScope.

Link to the issue:
https://github.com/WICG/construct-stylesheets/issues/23

Link to related CLs:
crrev.com/c/1197002
^ Bring back moreStyleSheets as adoptedStyleSheets
crrev.com/c/1160422
^ Implement Document.createEmptyCSSStyleSheet

Bug:  807560 
Change-Id: Ia0ff0af8f9baeca09b14bcbeb10897cc99b5a0bf
Reviewed-on: https://chromium-review.googlesource.com/1220527
Commit-Queue: Momoko Sumida <momon@google.com>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591303}
[modify] https://crrev.com/eb63b845febd59990afb4eda6062edde359f1871/third_party/WebKit/LayoutTests/fast/css/CSSStyleSheet-constructable.html
[modify] https://crrev.com/eb63b845febd59990afb4eda6062edde359f1871/third_party/blink/renderer/core/css/css_style_sheet.cc
[modify] https://crrev.com/eb63b845febd59990afb4eda6062edde359f1871/third_party/blink/renderer/core/css/css_style_sheet.h
[modify] https://crrev.com/eb63b845febd59990afb4eda6062edde359f1871/third_party/blink/renderer/core/dom/document.cc
[modify] https://crrev.com/eb63b845febd59990afb4eda6062edde359f1871/third_party/blink/renderer/core/dom/document_or_shadow_root.h
[modify] https://crrev.com/eb63b845febd59990afb4eda6062edde359f1871/third_party/blink/renderer/core/dom/document_or_shadow_root.idl
[modify] https://crrev.com/eb63b845febd59990afb4eda6062edde359f1871/third_party/blink/renderer/core/dom/tree_scope.cc
[modify] https://crrev.com/eb63b845febd59990afb4eda6062edde359f1871/third_party/blink/renderer/core/dom/tree_scope.h

Comment 24 by bugdroid1@chromium.org, Oct 11

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7f4f7291285fde21753607f2c8f544e5eaf87178

commit 7f4f7291285fde21753607f2c8f544e5eaf87178
Author: Rakina Zata Amni <rakina@chromium.org>
Date: Thu Oct 11 12:26:03 2018

Implement document.createCSSStyleSheetSync

A new factory function, createCSSStyleSheetSync will allow synchronous
creation of CSSStyleSheet objects that have text but do not have
@import rules. If the sheet text turn out to have @import rules, an
exception will be thrown.

Draft spec at: https://wicg.github.io/construct-stylesheets/
Discussion: https://github.com/WICG/construct-stylesheets/issues/38#issuecomment-423355490

Bug:  807560 
Change-Id: I9f8ef4151f616ecc343a12f3ddd0e5a31e1be363
Reviewed-on: https://chromium-review.googlesource.com/c/1237803
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598731}
[modify] https://crrev.com/7f4f7291285fde21753607f2c8f544e5eaf87178/third_party/WebKit/LayoutTests/fast/css/CSSStyleSheet-constructable.html
[add] https://crrev.com/7f4f7291285fde21753607f2c8f544e5eaf87178/third_party/WebKit/LayoutTests/fast/css/constructable-import.css
[modify] https://crrev.com/7f4f7291285fde21753607f2c8f544e5eaf87178/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/7f4f7291285fde21753607f2c8f544e5eaf87178/third_party/blink/renderer/core/css/css_style_sheet.cc
[modify] https://crrev.com/7f4f7291285fde21753607f2c8f544e5eaf87178/third_party/blink/renderer/core/css/css_style_sheet.h
[modify] https://crrev.com/7f4f7291285fde21753607f2c8f544e5eaf87178/third_party/blink/renderer/core/css/parser/css_parser.cc
[modify] https://crrev.com/7f4f7291285fde21753607f2c8f544e5eaf87178/third_party/blink/renderer/core/css/parser/css_parser.h
[modify] https://crrev.com/7f4f7291285fde21753607f2c8f544e5eaf87178/third_party/blink/renderer/core/css/parser/css_parser_impl.cc
[modify] https://crrev.com/7f4f7291285fde21753607f2c8f544e5eaf87178/third_party/blink/renderer/core/css/parser/css_parser_impl.h
[modify] https://crrev.com/7f4f7291285fde21753607f2c8f544e5eaf87178/third_party/blink/renderer/core/css/style_sheet_contents.cc
[modify] https://crrev.com/7f4f7291285fde21753607f2c8f544e5eaf87178/third_party/blink/renderer/core/css/style_sheet_contents.h
[modify] https://crrev.com/7f4f7291285fde21753607f2c8f544e5eaf87178/third_party/blink/renderer/core/dom/document.cc
[modify] https://crrev.com/7f4f7291285fde21753607f2c8f544e5eaf87178/third_party/blink/renderer/core/dom/document.h
[modify] https://crrev.com/7f4f7291285fde21753607f2c8f544e5eaf87178/third_party/blink/renderer/core/dom/document.idl
[modify] https://crrev.com/7f4f7291285fde21753607f2c8f544e5eaf87178/third_party/blink/renderer/core/inspector/inspector_style_sheet.cc

Comment 25 by bugdroid1@chromium.org, Dec 11

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5aeb932e04f7f94225f5eb804967f3985ed3de9d

commit 5aeb932e04f7f94225f5eb804967f3985ed3de9d
Author: Rakina Zata Amni <rakina@chromium.org>
Date: Tue Dec 11 12:31:11 2018

Constructable Stylesheets with replace methods

The draft spec for Constructable Stylesheets has moved on from factory
functions to normal constructors for CSSStyleSheets, with methods to
replace the contents of a constructed stylesheet synchronously or
asynchronously.

This CL replaces the old factory functions to normal constructors,
and implements replace and replaceSync method, the constructed flag,
and the disallow modification flag.

Not implemented in this CL: allow usage of constructed stylesheets in
multiple Documents, FrozenArray instead of StyleSheetList for
adoptedStyleSheets.

Draft spec: https://wicg.github.io/construct-stylesheets/index.html

Bug:  807560 
Change-Id: I3c4ea296338d03585ede6332bf29d6732b71c816
Reviewed-on: https://chromium-review.googlesource.com/c/1347647
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615499}
[modify] https://crrev.com/5aeb932e04f7f94225f5eb804967f3985ed3de9d/third_party/blink/renderer/core/css/css_style_sheet.cc
[modify] https://crrev.com/5aeb932e04f7f94225f5eb804967f3985ed3de9d/third_party/blink/renderer/core/css/css_style_sheet.h
[modify] https://crrev.com/5aeb932e04f7f94225f5eb804967f3985ed3de9d/third_party/blink/renderer/core/css/css_style_sheet.idl
[modify] https://crrev.com/5aeb932e04f7f94225f5eb804967f3985ed3de9d/third_party/blink/renderer/core/css/css_style_sheet_test.cc
[modify] https://crrev.com/5aeb932e04f7f94225f5eb804967f3985ed3de9d/third_party/blink/renderer/core/css/style_sheet_contents.cc
[modify] https://crrev.com/5aeb932e04f7f94225f5eb804967f3985ed3de9d/third_party/blink/renderer/core/dom/document.cc
[modify] https://crrev.com/5aeb932e04f7f94225f5eb804967f3985ed3de9d/third_party/blink/renderer/core/dom/document.h
[modify] https://crrev.com/5aeb932e04f7f94225f5eb804967f3985ed3de9d/third_party/blink/renderer/core/dom/document.idl
[modify] https://crrev.com/5aeb932e04f7f94225f5eb804967f3985ed3de9d/third_party/blink/renderer/core/dom/tree_scope.cc
[modify] https://crrev.com/5aeb932e04f7f94225f5eb804967f3985ed3de9d/third_party/blink/web_tests/external/wpt/css/cssom/interfaces-expected.txt
[modify] https://crrev.com/5aeb932e04f7f94225f5eb804967f3985ed3de9d/third_party/blink/web_tests/fast/css/CSSStyleSheet-constructable.html
[modify] https://crrev.com/5aeb932e04f7f94225f5eb804967f3985ed3de9d/third_party/blink/web_tests/fast/css/constructable-import.css
[modify] https://crrev.com/5aeb932e04f7f94225f5eb804967f3985ed3de9d/third_party/blink/web_tests/fast/dom/custom/define-with-default-style.html
[modify] https://crrev.com/5aeb932e04f7f94225f5eb804967f3985ed3de9d/third_party/blink/web_tests/fast/dom/dom-constructors-expected.txt
[modify] https://crrev.com/5aeb932e04f7f94225f5eb804967f3985ed3de9d/third_party/blink/web_tests/fast/dom/dom-constructors.html
[modify] https://crrev.com/5aeb932e04f7f94225f5eb804967f3985ed3de9d/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt

Comment 26 by bugdroid1@chromium.org, Dec 11

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f10b3d0be8f73b26e746a0cafdc913cf909c56a6

commit f10b3d0be8f73b26e746a0cafdc913cf909c56a6
Author: Rakina Zata Amni <rakina@chromium.org>
Date: Tue Dec 11 22:35:23 2018

Use FrozenArray for adoptedStyleSheets

Use FrozenArray instead of StyleSheetList for adoptedStyleSheets.
Draft spec: https://wicg.github.io/construct-stylesheets/index.html

Bug:  807560 
Change-Id: I683bf3ae2f5a1c44f9128b49e41662988c3f53d9
Reviewed-on: https://chromium-review.googlesource.com/c/1371687
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615698}
[modify] https://crrev.com/f10b3d0be8f73b26e746a0cafdc913cf909c56a6/third_party/blink/renderer/core/css/document_style_sheet_collection.cc
[modify] https://crrev.com/f10b3d0be8f73b26e746a0cafdc913cf909c56a6/third_party/blink/renderer/core/css/shadow_tree_style_sheet_collection.cc
[modify] https://crrev.com/f10b3d0be8f73b26e746a0cafdc913cf909c56a6/third_party/blink/renderer/core/css/style_engine.cc
[modify] https://crrev.com/f10b3d0be8f73b26e746a0cafdc913cf909c56a6/third_party/blink/renderer/core/css/style_engine.h
[modify] https://crrev.com/f10b3d0be8f73b26e746a0cafdc913cf909c56a6/third_party/blink/renderer/core/css/style_sheet_list.cc
[modify] https://crrev.com/f10b3d0be8f73b26e746a0cafdc913cf909c56a6/third_party/blink/renderer/core/css/style_sheet_list.h
[modify] https://crrev.com/f10b3d0be8f73b26e746a0cafdc913cf909c56a6/third_party/blink/renderer/core/css/style_sheet_list.idl
[modify] https://crrev.com/f10b3d0be8f73b26e746a0cafdc913cf909c56a6/third_party/blink/renderer/core/dom/document_or_shadow_root.h
[modify] https://crrev.com/f10b3d0be8f73b26e746a0cafdc913cf909c56a6/third_party/blink/renderer/core/dom/document_or_shadow_root.idl
[modify] https://crrev.com/f10b3d0be8f73b26e746a0cafdc913cf909c56a6/third_party/blink/renderer/core/dom/tree_scope.cc
[modify] https://crrev.com/f10b3d0be8f73b26e746a0cafdc913cf909c56a6/third_party/blink/renderer/core/dom/tree_scope.h
[modify] https://crrev.com/f10b3d0be8f73b26e746a0cafdc913cf909c56a6/third_party/blink/web_tests/external/wpt/css/cssom/interfaces-expected.txt
[modify] https://crrev.com/f10b3d0be8f73b26e746a0cafdc913cf909c56a6/third_party/blink/web_tests/fast/css/CSSStyleSheet-constructable.html

Comment 27 by bugdroid1@chromium.org, Dec 13

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3bbfdce8eb580536cd48bf734f8d2ad1ebba9411

commit 3bbfdce8eb580536cd48bf734f8d2ad1ebba9411
Author: Rakina Zata Amni <rakina@chromium.org>
Date: Thu Dec 13 05:57:45 2018

Move constructable stylesheets layout test to WPT

We're shipping constructable stylesheets soon, so moving the layout
test to WPT now.

Draft spec: https://wicg.github.io/construct-stylesheets/index.html

Bug:  807560 
Change-Id: I37b45b6bbb1b17da51fbc41fbac5f11caabc5070
Reviewed-on: https://chromium-review.googlesource.com/c/1375296
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616226}
[rename] https://crrev.com/3bbfdce8eb580536cd48bf734f8d2ad1ebba9411/third_party/blink/web_tests/external/wpt/css/cssom/CSSStyleSheet-constructable.html
[rename] https://crrev.com/3bbfdce8eb580536cd48bf734f8d2ad1ebba9411/third_party/blink/web_tests/external/wpt/css/cssom/support/constructable-import.css

Comment 28 by bugdroid1@chromium.org, Dec 14

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/90e2c66a47e4e5287e117a55ff161fd10a3bdf7f

commit 90e2c66a47e4e5287e117a55ff161fd10a3bdf7f
Author: Rakina Zata Amni <rakina@chromium.org>
Date: Fri Dec 14 09:32:04 2018

Ignore adopted stylesheets from different document tree

If we adopt a subtree containing a shadowRoot that has
adoptedStyleSheets from one document to a different document, the
adoptedStyleSheets will be moved along with it. We want to ignore
the stylesheets that are constructed in a different document tree
when we're doing style calculation.

Draft spec: https://wicg.github.io/construct-stylesheets/

Bug:  807560 
Change-Id: If36676e642b5d1b5c1c403c14cc24be8e670f153
Reviewed-on: https://chromium-review.googlesource.com/c/1377486
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616621}
[modify] https://crrev.com/90e2c66a47e4e5287e117a55ff161fd10a3bdf7f/third_party/blink/renderer/core/css/document_style_sheet_collection.cc
[modify] https://crrev.com/90e2c66a47e4e5287e117a55ff161fd10a3bdf7f/third_party/blink/renderer/core/css/shadow_tree_style_sheet_collection.cc
[modify] https://crrev.com/90e2c66a47e4e5287e117a55ff161fd10a3bdf7f/third_party/blink/web_tests/external/wpt/css/cssom/CSSStyleSheet-constructable.html

Comment 29 by bugdroid1@chromium.org, Jan 10

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6839a0baa500da4617e7ceab1c0d06363194ab57

commit 6839a0baa500da4617e7ceab1c0d06363194ab57
Author: Rakina Zata Amni <rakina@chromium.org>
Date: Thu Jan 10 05:44:17 2019

Remove runtime flag for Constructable Stylesheets

The Intent to Ship thread for Constructable Stylesheets got 3 LGTMs,
which allows us to ship this feature. Removing the flag to get this
enabled by default by Chrome 73.

I2S: https://groups.google.com/a/chromium.org/d/msg/blink-dev/gL2EVBzO5og/YfId9-vqBAAJ

Bug:  807560 
Change-Id: I78b5be177e1419869a79adbe1b29cfe9f0e2d23a
Reviewed-on: https://chromium-review.googlesource.com/c/1404536
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#621477}
[modify] https://crrev.com/6839a0baa500da4617e7ceab1c0d06363194ab57/third_party/blink/renderer/core/css/css_style_sheet.cc
[modify] https://crrev.com/6839a0baa500da4617e7ceab1c0d06363194ab57/third_party/blink/renderer/core/css/css_style_sheet.idl
[modify] https://crrev.com/6839a0baa500da4617e7ceab1c0d06363194ab57/third_party/blink/renderer/core/css/css_style_sheet_test.cc
[modify] https://crrev.com/6839a0baa500da4617e7ceab1c0d06363194ab57/third_party/blink/renderer/core/css/resolver/scoped_style_resolver.cc
[modify] https://crrev.com/6839a0baa500da4617e7ceab1c0d06363194ab57/third_party/blink/renderer/core/css/style_sheet_list.cc
[modify] https://crrev.com/6839a0baa500da4617e7ceab1c0d06363194ab57/third_party/blink/renderer/core/dom/document_or_shadow_root.idl
[modify] https://crrev.com/6839a0baa500da4617e7ceab1c0d06363194ab57/third_party/blink/renderer/platform/runtime_enabled_features.json5
[modify] https://crrev.com/6839a0baa500da4617e7ceab1c0d06363194ab57/third_party/blink/web_tests/virtual/stable/webexposed/global-interface-listing-expected.txt

Comment 30 by bugdroid1@chromium.org, Jan 17

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d33da12dc25347f5a5f679b06f5ede8eb709a0d1

commit d33da12dc25347f5a5f679b06f5ede8eb709a0d1
Author: Rakina Zata Amni <rakina@chromium.org>
Date: Thu Jan 17 13:09:23 2019

Remove adopted stylesheets when adopting to a different document

When adopting a subtree to a different document, we'll remove all the
adopted stylesheets in that subtree, instead of keeping them and then
ignoring them in style calculation.

Relevant discussion: https://github.com/WICG/construct-stylesheets/issues/23

Bug:  807560 
Change-Id: I7ea6c869892cabd9d3b5a765f26364e51b1419b4
Reviewed-on: https://chromium-review.googlesource.com/c/1415068
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623660}
[modify] https://crrev.com/d33da12dc25347f5a5f679b06f5ede8eb709a0d1/third_party/blink/renderer/core/css/document_style_sheet_collection.cc
[modify] https://crrev.com/d33da12dc25347f5a5f679b06f5ede8eb709a0d1/third_party/blink/renderer/core/css/shadow_tree_style_sheet_collection.cc
[modify] https://crrev.com/d33da12dc25347f5a5f679b06f5ede8eb709a0d1/third_party/blink/renderer/core/css/style_engine.cc
[modify] https://crrev.com/d33da12dc25347f5a5f679b06f5ede8eb709a0d1/third_party/blink/renderer/core/dom/tree_scope.cc
[modify] https://crrev.com/d33da12dc25347f5a5f679b06f5ede8eb709a0d1/third_party/blink/renderer/core/dom/tree_scope_adopter.cc
[modify] https://crrev.com/d33da12dc25347f5a5f679b06f5ede8eb709a0d1/third_party/blink/web_tests/external/wpt/css/cssom/CSSStyleSheet-constructable.html

Comment 31 by rakina@chromium.org, Jan 24

Sign in to add a comment