-
Momoko Sumida authored
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}
2abadb62