Closed Bug 1368651 Opened 7 years ago Closed 7 years ago

stylo: @import rule objects sometimes may fail to be constructed

Categories

(Core :: CSS Parsing and Computation, enhancement, P2)

53 Branch
enhancement

Tracking

()

RESOLVED FIXED

People

(Reporter: xidorn, Unassigned)

References

Details

In bug 1352968 part 8, we try to construct CSSOM object for @import rules when possible. But there are cases that we cannot construct the object correctly, those cases include: 1. when the stylesheet is a clone, its child sheet list may not be rebuilt correctly (bug 1367213) 2. when the newly inserted child sheet is a clone from an existing sheet, but the Servo side @import rule struct is holding an independent stylesheet (bug 1368381) When those bugs are fixed, we should be able to always return non-null object for @import rule, and also change several warnings added in bug 1352968 to assertions.
I'm not getting a properly constructed import rule in this simple case, either. Not sure if it's the same bug: <style type='text/css'> @import url('foo.css') </style> <script type="text/javascript">document.write(document.styleSheets[0].cssRules[0])</script> (It prints null in Stylo)
Blocks: stylo-wpt
Depends on: 1371488
(In reply to Manish Goregaokar [:manishearth] from comment #1) > I'm not getting a properly constructed import rule in this simple case, > either. Not sure if it's the same bug: > > <style type='text/css'> @import url('foo.css') </style> > <script > type="text/javascript">document.write(document.styleSheets[0].cssRules[0])</ > script> > > (It prints null in Stylo) This is a new bug unrelated to existing two. Thanks for mentioning. Filed bug 1371488 and submitted patch there.
No longer blocks: stylo-wpt
Priority: -- → P2
This should be all be fixed by emilio's patch in bug 1372041.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.