Closed
Bug 1364880
Opened 8 years ago
Closed 8 years ago
stylo: The style we return when resolving a pseudo style that doesn't match any rules looks fishy.
Categories
(Core :: CSS Parsing and Computation, enhancement, P1)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
Details
Attachments
(1 file)
We return the element style, and I think we should, if only, return a style inheriting from it, instead.
Updated•8 years ago
|
Assignee: nobody → emilio+bugs
Priority: -- → P2
Updated•8 years ago
|
Priority: P2 → P1
![]() |
||
Comment 1•8 years ago
|
||
Simple testcase showing incorrect behavior:
<div style="position: absolute"></div>
<script>
alert(getComputedStyle(document.querySelector("div"), "::before").position);
</script>
alerts "absolute", which is wrong; should be "static".
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
![]() |
||
Comment 4•8 years ago
|
||
mozreview-review |
Comment on attachment 8881003 [details]
Bug 1364880: Test non-existent pseudo-element styles.
https://reviewboard.mozilla.org/r/152360/#review157418
::: testing/web-platform/tests/cssom/getComputedStyle-pseudo.html:48
(Diff revision 2)
> +test(function() {
> + var has_no_pseudos = document.body;
> + has_no_pseudos.style.position = "relative";
> + [":before", ":after"].forEach(function(pseudo) {
> + assert_equals(getComputedStyle(has_no_pseudos, pseudo).position, "static",
> + "Unexisting " + pseudo + " pseudo-element shouldn't claim to have " +
s/Unexisting/Nonexistent/
and the same in the test description string.
Attachment #8881003 -
Flags: review?(bzbarsky) → review+
Comment hidden (mozreview-request) |
Pushed by ecoal95@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/ef997eeca061
Test non-existent pseudo-element styles. r=bz
Comment 7•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•