Closed
Bug 1752392
Opened 3 years ago
Closed 3 years ago
CSSStyleSheet.replace[Sync]() should not replace CSSStyleSheet.cssRules
Categories
(Core :: DOM: CSS Object Model, defect, P3)
Tracking
()
RESOLVED
FIXED
101 Branch
Tracking | Status | |
---|---|---|
firefox101 | --- | fixed |
People
(Reporter: gui.lebas, Assigned: emilio)
References
()
Details
(Keywords: parity-chrome, testcase)
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36
Steps to reproduce:
- Create a new
CSSStyleSheet
- Get a reference of its
cssRules
- Run
CSSStyleSheet.replaceSync()
(orCSSStyleSheet.replace()
) - Compare the reference of
cssRules
withCSSStyleSheet.cssRules
Demo: https://codepen.io/creativewave/pen/mdqJerz
Actual results:
CSSStyleSheet.cssRules
is replaced by a new object when running CSSStyleSheet.replaceSync()
(or CSSStyleSheet.replace()
).
Expected results:
CSSStyleSheet.cssRules
should be the [SameObject]
than before running CSSStyleSheet.replaceSync()
(or CSSStyleSheet.replace()
), as defined by the CSSOM specification:
[SameObject] readonly attribute CSSRuleList cssRules;
https://drafts.csswg.org/cssom/#ref-for-dom-cssstylesheet-replace
Chrome keeps the same object.
Updated•3 years ago
|
Has STR: --- → yes
Component: Untriaged → DOM: CSS Object Model
Keywords: parity-chrome,
testcase
Product: Firefox → Core
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Severity: -- → S3
Priority: -- → P3
Assignee | ||
Comment 1•3 years ago
|
||
As per spec this object should always return the same JS object.
Updated•3 years ago
|
Assignee: nobody → emilio
Status: NEW → ASSIGNED
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/092814d96f1d
Don't drop CSSStyleSheet.cssRules from CSSStyleSheet.replace/Sync(). r=firefox-style-system-reviewers,layout-reviewers,boris
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/33834 for changes under testing/web-platform/tests
Comment 4•3 years ago
|
||
Backed out for causing mochitest failures in test_parseStyleSheetImport.html
- Backout link
- Push with failures
- Push with failures
- Failure Log1
- Failure Log2
- Failure line: webidl/ecmascript-binding/observable-array-ownkeys.window.html | ObservableArray's ownKeys trap - expected FAIL
- Failure line: layout/inspector/tests/test_parseStyleSheetImport.html | reordering preserved suffixed style sheet - got [object CSSStyleSheet], expected [object CSSStyleSheet]
log 3: https://treeherder.mozilla.org/logviewer?job_id=376069995&repo=autoland
Flags: needinfo?(emilio)
Upstream PR was closed without merging
Assignee | ||
Updated•3 years ago
|
Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/842cc90cd235
Don't drop CSSStyleSheet.cssRules from CSSStyleSheet.replace/Sync(). r=firefox-style-system-reviewers,layout-reviewers,boris
Comment 7•3 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
status-firefox101:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in
before you can comment on or make changes to this bug.
Description
•