ShadowRoot.styleSheets.length is always 0 in import documents
Reported by
r...@opera.com,
May 16 2017
|
|||
Issue descriptionIf we attach shadow trees to elements in html import documents, and add stylesheets, they are parsed and available through CSSOM on the style elements, but the styleSheets collection on the ShadowRoot is still empty. This is really low priority, and I'm not even sure the stylesheet should have been instantiated, but it is coincidentally fixed by a more important issue, so let's track it here.
,
May 18 2017
,
May 23 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e1719ffa41c44d3434095850fee7ffa5b6e57c4f commit e1719ffa41c44d3434095850fee7ffa5b6e57c4f Author: rune <rune@opera.com> Date: Tue May 23 10:08:28 2017 Don't trigger full active style update on styleSheets access. Element.styleSheets and ShadowRoot.styleSheets need to be made up-to- date on access. We used to do a full active style update, but re- collecting the stylesheet list should be enough, leaving the active style dirty flags intact. We introduce a dirty-flag for the stylesheet list in StyleSheetCollection to avoid repeatedly re-collecting this list while the active style is still dirty. This coincidentally fixes issue 722826 since we do not collect stylesheets in import shadow trees as part of the active style update, but is now made up-to-date on request when accessing the styleSheets collection on shadow roots inside import documents. This fixes the performance issue 717506 . R=meade@chromium.org BUG= 717506 , 722826 Review-Url: https://codereview.chromium.org/2884993002 Cr-Commit-Position: refs/heads/master@{#473846} [add] https://crrev.com/e1719ffa41c44d3434095850fee7ffa5b6e57c4f/third_party/WebKit/LayoutTests/fast/html/imports/import-css-sheet-in-shadow.html [modify] https://crrev.com/e1719ffa41c44d3434095850fee7ffa5b6e57c4f/third_party/WebKit/Source/core/dom/StyleEngine.cpp [modify] https://crrev.com/e1719ffa41c44d3434095850fee7ffa5b6e57c4f/third_party/WebKit/Source/core/dom/StyleEngine.h [modify] https://crrev.com/e1719ffa41c44d3434095850fee7ffa5b6e57c4f/third_party/WebKit/Source/core/dom/StyleEngineTest.cpp [modify] https://crrev.com/e1719ffa41c44d3434095850fee7ffa5b6e57c4f/third_party/WebKit/Source/core/dom/StyleSheetCollection.cpp [modify] https://crrev.com/e1719ffa41c44d3434095850fee7ffa5b6e57c4f/third_party/WebKit/Source/core/dom/StyleSheetCollection.h [modify] https://crrev.com/e1719ffa41c44d3434095850fee7ffa5b6e57c4f/third_party/WebKit/Source/core/dom/TreeScopeStyleSheetCollection.cpp [modify] https://crrev.com/e1719ffa41c44d3434095850fee7ffa5b6e57c4f/third_party/WebKit/Source/core/dom/TreeScopeStyleSheetCollection.h [modify] https://crrev.com/e1719ffa41c44d3434095850fee7ffa5b6e57c4f/third_party/WebKit/Source/web/tests/HTMLImportSheetsTest.cpp
,
May 23 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by alancutter@chromium.org
, May 18 2017