Closed
Bug 1386865
Opened 7 years ago
Closed 7 years ago
Stylo: DevTools test using XBL triggers "MOZ_ASSERT_UNREACHABLE: We should be able to map a raw rule to a rule"
Categories
(Core :: CSS Parsing and Computation, enhancement, P2)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox-esr52 | --- | unaffected |
firefox55 | --- | unaffected |
firefox56 | --- | wontfix |
firefox57 | --- | fixed |
People
(Reporter: jryans, Assigned: xidorn)
References
Details
(Keywords: assertion)
Attachments
(2 files)
DevTools test devtools/client/inspector/markup/test/browser_markup_anonymous_04.js triggers[1] an assertion in Stylo debug builds:
Assertion failure: false (MOZ_ASSERT_UNREACHABLE: We should be able to map a raw rule to a rule), at /home/worker/workspace/build/src/layout/inspector/inDOMUtils.cpp:286
[1]: https://treeherder.mozilla.org/logviewer.html#?job_id=120109119&repo=try&lineNumber=3111
Reporter | ||
Updated•7 years ago
|
Priority: -- → P2
Assignee | ||
Comment 1•7 years ago
|
||
Hmmm, suspect it is some XBL rule which may not be covered by ServoStyleRuleMap.
Reporter | ||
Comment 2•7 years ago
|
||
(In reply to Xidorn Quan [:xidorn] UTC+10 from comment #1)
> Hmmm, suspect it is some XBL rule which may not be covered by
> ServoStyleRuleMap.
Sounds likely, the test appears to involve <video> elements.
Assignee | ||
Comment 3•7 years ago
|
||
Had a look at bug 1290276, it seems XBL <stylesheet> uses a separate styleset. Maybe we don't have a separate document for accessing that styleset?
Anyway, we need to get the proper ServoStyleSet in inDOMUtils::GetCSSStyleRules, so that we can create a ServoStyleRuleMap for it.
TYLin, how can we get the styleset of XBL given an element it styles?
Flags: needinfo?(tlin)
Comment 4•7 years ago
|
||
On servo side, we can call element's each_xbl_stylist(), which walks the given element's binding chain to the parent, and call the callback f for each stylist.
This re-implmentes gecko's nsBindingManager::WalkRules(). If we need to call it on gecko side, I think we could replace nsXBLBinding::WalkRules() [2] by nsXBLBinding::GetServoStyleSet(), and do something to each of the elements stylesets.
[1] http://searchfox.org/mozilla-central/rev/f0e4ae5f8c40ba742214e89aba3f554da0b89a33/servo/components/style/gecko/wrapper.rs#1142
[2] http://searchfox.org/mozilla-central/rev/f0e4ae5f8c40ba742214e89aba3f554da0b89a33/dom/xbl/nsBindingManager.cpp#687
Flags: needinfo?(tlin)
Assignee | ||
Comment 5•7 years ago
|
||
So the style rule we failed to map in this case is in toolkit/themes/shared/media/videocontrols.css, which is referenced from toolkit/content/widgets/videocontrols.xml, so it is indeed a rule from XBL binding.
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → xidorn+moz
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 8•7 years ago
|
||
mozreview-review |
Comment on attachment 8893236 [details]
Bug 1386865 part 1 - Have GetServoStyleSet return non-const ServoStyleSet.
https://reviewboard.mozilla.org/r/164278/#review169620
r=me assuming this is needed by part 2.
Attachment #8893236 -
Flags: review?(tlin) → review+
Comment 9•7 years ago
|
||
mozreview-review |
Comment on attachment 8893237 [details]
Bug 1386865 part 2 - Collect style rule maps for XBL bindings.
https://reviewboard.mozilla.org/r/164280/#review169628
::: layout/inspector/inDOMUtils.cpp:279
(Diff revision 1)
> map->EnsureTable();
>
> + // Collect style rule maps for bindings.
> + nsTArray<ServoStyleRuleMap*> bindingMaps;
How about we put `map` in `bindingMaps` so that below we can just look up `bindingMaps` instead of looking at `map` and `bindingMaps` separately.
Attachment #8893237 -
Flags: review?(cam) → review+
Comment hidden (mozreview-request) |
Comment 11•7 years ago
|
||
Pushed by xquan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7b89f778658e
part 1 - Have GetServoStyleSet return non-const ServoStyleSet. r=TYLin
https://hg.mozilla.org/integration/autoland/rev/28a61ac5f305
part 2 - Collect style rule maps for XBL bindings. r=heycam
Comment 12•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7b89f778658e
https://hg.mozilla.org/mozilla-central/rev/28a61ac5f305
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Updated•7 years ago
|
status-firefox55:
--- → unaffected
status-firefox56:
--- → wontfix
status-firefox-esr52:
--- → unaffected
Reporter | ||
Updated•7 years ago
|
Summary: Stylo: DevTools test triggers "MOZ_ASSERT_UNREACHABLE: We should be able to map a raw rule to a rule" → Stylo: DevTools test using XBL triggers "MOZ_ASSERT_UNREACHABLE: We should be able to map a raw rule to a rule"
Comment 13•7 years ago
|
||
https://hg.mozilla.org/projects/date/rev/7b89f778658ef54fc9e8aa2478aee1fd51432555
Bug 1386865 part 1 - Have GetServoStyleSet return non-const ServoStyleSet. r=TYLin
https://hg.mozilla.org/projects/date/rev/28a61ac5f3056b32b107e2bb94858be345b09055
Bug 1386865 part 2 - Collect style rule maps for XBL bindings. r=heycam
You need to log in
before you can comment on or make changes to this bug.
Description
•