Closed
Bug 160403
Opened 22 years ago
Closed 16 years ago
inherit and -moz-initial repeated when serializing shorthands (breaks roundtripping)
Categories
(Core :: DOM: CSS Object Model, defect)
Core
DOM: CSS Object Model
Tracking
()
RESOLVED
FIXED
mozilla1.9.1b2
People
(Reporter: vladimire, Assigned: dbaron)
References
(Blocks 2 open bugs)
Details
Attachments
(4 files, 1 obsolete file)
(deleted),
text/html
|
Details | |
(deleted),
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
When a property is set to inherit value, the value reported in the dom is quadrippled: "inherit inherit inherit inherit" Attaching the following testcase. <div id="test" style="border-color: inherit;"></div> <script> alert(document.getElementById('test').style.borderColor); </script>
Reporter | ||
Comment 1•22 years ago
|
||
Comment 2•22 years ago
|
||
This is a canonicalization issue, not a correctness one.... Basically, it would be nice to have a version of TryFourSidesShorthand that took eCSSPropertyFoo instead of indices into mOrder....
OS: Windows 2000 → All
Hardware: PC → All
Reporter | ||
Comment 4•22 years ago
|
||
This behaviour is sumilar to what happens with shorthand properties, but border-color is not a shorthand...
Comment 5•22 years ago
|
||
border-color _is_ a shorthand. It sets border-top-color, border-right-color, etc.
Reporter | ||
Comment 6•22 years ago
|
||
then perhaps this is not a bug, the border-color property is outputing values of the properties it is a shorthand for. There is 4 of them (top,left,right,bottom), and they are all inherit because that is what border-color was set to...
Comment 7•22 years ago
|
||
Right. That's why I said it's not a correctness issue in comment 2. But we _should_ canonicalize the whole thing to a single "inherit".
Comment 8•22 years ago
|
||
It is a correctness issue. 'inherit inherit inherit inherit' is not a valid CSS value for the 'border-color' property.
Updated•22 years ago
|
Summary: Inherit property is quadrippled → Inherit property is quadrippled (breaks roundtripping of border-color)
Assignee | ||
Updated•20 years ago
|
Summary: Inherit property is quadrippled (breaks roundtripping of border-color) → Inherit property is quadrupled (breaks roundtripping of border-color)
Assignee | ||
Updated•16 years ago
|
Assignee: daniel → dbaron
Status: NEW → ASSIGNED
QA Contact: ian → general
Summary: Inherit property is quadrupled (breaks roundtripping of border-color) → inherit and -moz-initial repeated when serializing shorthands (breaks roundtripping)
Assignee | ||
Comment 10•16 years ago
|
||
Here's some work in progress which, unfortunately, makes things worse for the direction-sensitive box properties with *-start and *-end variants to match *-right and *-left.
Assignee | ||
Comment 11•16 years ago
|
||
I'm sure this will bitrot quickly, but it's also trivial to rewrite. (And, thanks to mq, easy to keep separate and thus rewrite when needed.) This may be useful for other things, too (like the always-use-my-colors pref).
Attachment #341973 -
Flags: superreview?(bzbarsky)
Attachment #341973 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 12•16 years ago
|
||
This adds a flag for the *-{ltr,rtl}-source properties.
Attachment #341974 -
Flags: superreview?(bzbarsky)
Attachment #341974 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 13•16 years ago
|
||
Attachment #341357 -
Attachment is obsolete: true
Attachment #341975 -
Flags: superreview?(bzbarsky)
Attachment #341975 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•16 years ago
|
Attachment #341974 -
Attachment description: add a flag for the *-source properties → patch 2: add a flag for the *-source properties
Updated•16 years ago
|
Attachment #341973 -
Flags: superreview?(bzbarsky)
Attachment #341973 -
Flags: superreview+
Attachment #341973 -
Flags: review?(bzbarsky)
Attachment #341973 -
Flags: review+
Updated•16 years ago
|
Attachment #341974 -
Flags: superreview?(bzbarsky)
Attachment #341974 -
Flags: superreview+
Attachment #341974 -
Flags: review?(bzbarsky)
Attachment #341974 -
Flags: review+
Comment 14•16 years ago
|
||
Comment on attachment 341975 [details] [diff] [review] patch 3: fix serialization of inherit and -moz-initial on shorthands Looks good, assuming that the existing code in those tests you change caught the issue with background-clip and so on. This doesn't help GetCSSText, but that can be handled in bug 442630.
Attachment #341975 -
Flags: superreview?(bzbarsky)
Attachment #341975 -
Flags: superreview+
Attachment #341975 -
Flags: review?(bzbarsky)
Attachment #341975 -
Flags: review+
Assignee | ||
Comment 15•16 years ago
|
||
(In reply to comment #14) > (From update of attachment 341975 [details] [diff] [review]) > Looks good, assuming that the existing code in those tests you change caught > the issue with background-clip and so on. Yes, the existing tests caught that (and also the issue with the *-source subproperties).
Assignee | ||
Comment 16•16 years ago
|
||
Fixed: http://hg.mozilla.org/mozilla-central/rev/c01934ff662b http://hg.mozilla.org/mozilla-central/rev/08d7f38b8ee3 http://hg.mozilla.org/mozilla-central/rev/7356c512e9e1
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b2
You need to log in
before you can comment on or make changes to this bug.
Description
•