stylo: preshints (mapped attributes) not handled correctly for elements created from non-docshell-associated document
Categories
(Core :: CSS Parsing and Computation, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox57 | --- | wontfix |
People
(Reporter: xidorn, Unassigned)
References
Details
Reporter | ||
Updated•7 years ago
|
Updated•7 years ago
|
Reporter | ||
Comment 1•7 years ago
|
||
Reporter | ||
Comment 2•7 years ago
|
||
Comment 3•7 years ago
|
||
Comment 4•5 years ago
|
||
This is still failing. The original testcase no longer shows the problem due to disconnected elements no longer having useful computed style, but this testcase does:
<!DOCTYPE html>
<body>
<script>
document.body.offsetWidth;
var doc = document.implementation.createHTMLDocument();
var f = doc.createElement("font");
doc.body.appendChild(f);
f.setAttribute("color", "green");
alert(getComputedStyle(f).color);
</script>
</body>
That alerts rgb(0, 0, 0)
in Gecko (now with stylo), empty string in Chrome, rgb(0, 128 ,0)
in Safari.
I wonder whether we could get the spec to specify a simple behavior here that people could align on, given the lack of compat.
Comment 5•5 years ago
|
||
That test-case is also using getComputedStyle
from a different window... Per spec Safari is right, and we'd match it if we fixed bug 1471231 I suspect (since we'd be able to compute the style there).
But we can probably get away specifying the Chrome behavior too for this case, if we wanted. And should be somewhat easy to implement as long as it's easy to distinguish from the display: none iframe case.
Comment 6•5 years ago
|
||
That test-case is also using getComputedStyle from a different window...
Well, sort of. There's only one window involved here; doc
does not have a window at all.
Updated•2 years ago
|
Description
•