mirror of
https://github.com/servo/servo.git
synced 2025-08-08 23:15:33 +01:00
Auto merge of #23073 - sbansal3096:master, r=emilio
Expose public getter to stylesheet's owner <!-- Please describe your changes on the following line: --> - [x] expose a public getter on CSSStyleSheet to return the stylesheet's owner - [x] in CSSRuleList::insert_rule, use the new getter to pass a non-None value as an argument to arc.insert_rule - [x] add a test for this that verifies that the new stylesheet is actually loaded --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #23028 <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23073) <!-- Reviewable:end -->
This commit is contained in:
commit
059ac12c00
7 changed files with 79 additions and 4 deletions
|
@ -0,0 +1,6 @@
|
|||
<!doctype html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>insertrule @import test reference</title>
|
||||
<link rel="stylesheet" href="support/black.css">
|
||||
</head>
|
|
@ -0,0 +1,12 @@
|
|||
<!doctype html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>insertrule @import test</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/cssom/">
|
||||
<link rel="help" href="http://www.w3.org/TR/cssom-1/#the-cssrule-interface">
|
||||
<link rel="match" href="insertRule-from-script-ref.html">
|
||||
<style></style>
|
||||
</head>
|
||||
<body>
|
||||
<script>document.styleSheets[0].insertRule("@import url(\"support/black.css\");");</script>
|
||||
</body>
|
4
tests/wpt/web-platform-tests/css/cssom/support/black.css
Normal file
4
tests/wpt/web-platform-tests/css/cssom/support/black.css
Normal file
|
@ -0,0 +1,4 @@
|
|||
html {
|
||||
background-color: black;
|
||||
color: white;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue