Closed
Bug 975741
Opened 10 years ago
Closed 10 years ago
initial value of 'perspective' should be stored as 'none' rather than '0', and computed style should not work around the invalid storage
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: dbaron, Assigned: dbaron)
References
Details
Attachments
(2 files)
4.09 KB,
patch
|
heycam
:
review+
|
Details | Diff | Splinter Review |
1.74 KB,
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
Right now we internally implement the initial value of perspective as '0' rather than 'none', although we allow an explicitly-specified 'none' to reflect its way through our internal representation. Then we fix up the value in nsComputedDOMStyle to report a '0' as 'none' to hide the other bugs. We don't have any differences in behavior between the '0' and 'none' values (I checked). But: (1) it's a minor spec conformance bug, in that we don't properly reflect '0' as different from 'none' (2) we will likely want to add some internal differences in behavior, for example, for bug 968555; having this data incorrect internally seems likely to things being implemented incorrectly in the future
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8380209 -
Flags: review?(cam)
Assignee | ||
Comment 2•10 years ago
|
||
Er, I said that backwards in both the bug summary and the patch description.
Summary: initial value of 'perspective' should be '0' rather than 'none', and computed style should properly distinguish the two → initial value of 'perspective' should be 'none' rather than '0', and computed style should properly distinguish the two
Assignee | ||
Updated•10 years ago
|
Attachment #8380209 -
Attachment description: Make the initial value of 'perspective' be '0' rather than 'none', and make the nsComputedDOMStyle computed value implementation of 'perspective' properly distinguish between '0' and 'none'. → Make the initial value of 'perspective' be 'none' rather than '0', and make the nsComputedDOMStyle computed value implementation of 'perspective' properly distinguish between '0' and 'none'.
Updated•10 years ago
|
Attachment #8380209 -
Flags: review?(cam) → review+
Assignee | ||
Comment 3•10 years ago
|
||
Oops, I missed the fact that 'perspective' only allows positive values, so the summary of the bug should be slightly different, and I need to change the test to list '0px' in invalid_values. But the patch is fine as-is, and still simplifies the code and makes the storage of identical values more consistent. (Though we can also remove the >0 checks now, actually.
Summary: initial value of 'perspective' should be 'none' rather than '0', and computed style should properly distinguish the two → initial value of 'perspective' should be stored as 'none' rather than '0', and computed style should not work around the invalid storage
Assignee | ||
Comment 4•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/22a2eb6d2145
Assignee | ||
Comment 5•10 years ago
|
||
Now that the first patch in this bug changed things so that 'none' is reliably stored as eStyleUnit_None (rather than being stored as a 0 length when it comes from the initial value), we know mChildPerspective is always > 0 when it is eStyleUnit_Coord, and there's no point making the additional check.
Attachment #8380982 -
Flags: review?(matt.woodrow)
Assignee | ||
Updated•10 years ago
|
Whiteboard: [leave open]
Updated•10 years ago
|
Attachment #8380982 -
Flags: review?(matt.woodrow) → review+
Comment 6•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/22a2eb6d2145
Assignee | ||
Comment 7•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/e8eaec0c9198 (and previous try run at https://tbpl.mozilla.org/?tree=Try&rev=49d369b164bb)
Whiteboard: [leave open]
Comment 8•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/e8eaec0c9198
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in
before you can comment on or make changes to this bug.
Description
•