forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate CSSStyleSheet.replace() with @import rules
See the CSS Resolution [1], the I2R [2], and the chromestatus entry [3]. [1] WICG/construct-stylesheets#119 (comment) [2] https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/RKG8oxp22RY [3] https://chromestatus.com/feature/4735925877735424 Bug: 1055943 Change-Id: I0f71af0d3dae5001a9ba93d1b5e41a859be6481f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2073204 Commit-Queue: Rune Lillesveen <[email protected]> Auto-Submit: Mason Freed <[email protected]> Reviewed-by: Rune Lillesveen <[email protected]> Cr-Commit-Position: refs/heads/master@{#744588}
- Loading branch information
Showing
6 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
third_party/blink/web_tests/cssom/deprecated-stylesheet-replace-import-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CONSOLE MESSAGE: line 6: Start script - there should be a deprecation message below about replace() and @import. | ||
CONSOLE WARNING: line 9: Support for calls to CSSStyleSheet.replace() with stylesheet text that includes @import has been deprecated, and will be removed in M83, around June 2020. See https://chromestatus.com/feature/4735925877735424 for more details. | ||
CONSOLE MESSAGE: line 15: Finish script | ||
CONSOLE MESSAGE: line 10: Replace resolved | ||
|
16 changes: 16 additions & 0 deletions
16
third_party/blink/web_tests/cssom/deprecated-stylesheet-replace-import.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
|
||
<script> | ||
if (window.testRunner) | ||
testRunner.dumpAsText(); | ||
console.log("Start script - there should be a deprecation message below about replace() and @import."); | ||
const sheet = new CSSStyleSheet(); | ||
try { | ||
sheet.replace('@import "resources/import.css";') | ||
.then(() => {console.log("Replace resolved");}); | ||
} catch (e) { | ||
console.log("Replace threw exception"); | ||
} | ||
|
||
console.log("Finish script"); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters