Closed
Bug 1398619
Opened 7 years ago
Closed 7 years ago
stylo: getPropertyValue broken with NS_ERROR_NOT_AVAILABLE after Bug 1389300
Categories
(Core :: CSS Parsing and Computation, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox-esr52 | --- | unaffected |
firefox55 | --- | unaffected |
firefox56 | --- | unaffected |
firefox57 | --- | fixed |
People
(Reporter: yfdyh000, Assigned: xidorn)
References
Details
(Keywords: nightly-community, regression)
Attachments
(2 files)
STR:
1. Install the https://greasyfork.org/scripts/292-my-novel-reader with Tampermonkey or Violentmonkey.
2. Open the http://www.wutuxs.com/html/1/1052/826365.html, click the "阅读模式" at the bottom right corner of the page.
3. Scroll to the bottom of the page.
Actual results:
Failed to load next page, NS_ERROR_NOT_AVAILABLE: 826365.html:6151 at _font_size_text = _heading_style.getPropertyValue("font-size") || 0; when layout.css.servo.enabled=true.
(In reply to YF (Yang) from comment #0)
> 1. Install the https://greasyfork.org/scripts/292-my-novel-reader with
> Tampermonkey or Violentmonkey.
Tested on 6.0.5 (https://greasyfork.org/zh-CN/scripts/292-my-novel-reader?version=216556), 6.0.6 use try to avoid this issue: https://github.com/ywzhaiqi/userscript/commit/92500459c2382492e0cdecc7c08d90eb05137ea1#diff-2f75c47eada4a60bd170ca076b5ad9f9
Comment 2•7 years ago
|
||
Xidorn, can you investigate this, and suggest a priority?
Flags: needinfo?(xidorn+moz)
Assignee | ||
Comment 3•7 years ago
|
||
Haven't tested, but from the code and regression bug (thanks for that!), I think this is because the document of the user script is using gecko backend as it runs in chrome, while it tries to get computed style from the content document, which triggers the condition added in bug 1389300 to return nullptr for computed style.
I'm not completely sure how addon's content script works, i.e. what document/window does it use. I suspect that we need to make them use stylo backend if the document they operate on uses stylo backend.
Will try to investigate further, so keep ni? for now.
Assignee | ||
Comment 4•7 years ago
|
||
And, if that is the case, it could affect all addons which use content script to read computed style from content page, so I think it should be at least P2.
Priority: -- → P2
Assignee | ||
Comment 5•7 years ago
|
||
So the problem here is that document created by DOMParser doesn't have backend set, and since it never has a container, we pick Gecko backend for it.
Flags: needinfo?(xidorn+moz)
Assignee | ||
Comment 6•7 years ago
|
||
Looks like we just need to have DOMParser inherit style backend as well, like what we've already been doing for XHR and DOMImplementation.
Assignee: nobody → xidorn+moz
Assignee | ||
Comment 7•7 years ago
|
||
Oh, actually we do (try to) inherit style backend in DOMParser as well, but there is a small bug :)
Comment hidden (mozreview-request) |
Comment 9•7 years ago
|
||
mozreview-review |
Comment on attachment 8906886 [details]
Bug 1398619 - Correctly inherit backend for document created by DOMParser, and add test for it.
https://reviewboard.mozilla.org/r/178622/#review183622
Doh! r=me
Attachment #8906886 -
Flags: review?(bobbyholley) → review+
Assignee | ||
Comment 10•7 years ago
|
||
Comment 11•7 years ago
|
||
Pushed by xquan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9232bc78ae68
Correctly inherit backend for document created by DOMParser, and add test for it. r=bholley
Comment 12•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Updated•7 years ago
|
status-firefox55:
--- → unaffected
status-firefox-esr52:
--- → unaffected
You need to log in
before you can comment on or make changes to this bug.
Description
•