Closed
Bug 391034
Opened 17 years ago
Closed 17 years ago
[FIX]"ASSERTION: Unexpected left/right/top/bottom unit" with getComputedStyle on "position: relative; left: 3ch;" element
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jruderman, Assigned: bzbarsky)
References
Details
(Keywords: assertion, testcase)
Attachments
(2 files, 1 obsolete file)
296 bytes,
application/xhtml+xml
|
Details | |
5.86 KB,
patch
|
dbaron
:
review+
dbaron
:
superreview+
dbaron
:
approval1.9+
|
Details | Diff | Splinter Review |
###!!! ASSERTION: Unexpected left/right/top/bottom unit: 'Error', file /Users/jruderman/trunk/mozilla/layout/style/nsComputedDOMStyle.cpp, line 2726
This reminds me of bug 379405.
Assignee | ||
Comment 1•17 years ago
|
||
This does fix the bug... but I wonder about the behavior here in general. In particular, the behavior of returning 0 if the offsets are auto, or are percentages and there's no containing block, as well as the "look at the opposite side" thing. I think it might make more sense to just use SetValueToCoord here and be done with it...
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #275606 -
Flags: superreview?(dbaron)
Attachment #275606 -
Flags: review?(dbaron)
Assignee | ||
Comment 2•17 years ago
|
||
Attachment #275606 -
Attachment is obsolete: true
Attachment #275607 -
Flags: superreview?(dbaron)
Attachment #275607 -
Flags: review?(dbaron)
Attachment #275606 -
Flags: superreview?(dbaron)
Attachment #275606 -
Flags: review?(dbaron)
Assignee | ||
Comment 3•17 years ago
|
||
That patch depends on bug 391221.
Depends on: 391221
Summary: "ASSERTION: Unexpected left/right/top/bottom unit" with getComputedStyle on "position: relative; left: 3ch;" element → [FIX]"ASSERTION: Unexpected left/right/top/bottom unit" with getComputedStyle on "position: relative; left: 3ch;" element
Comment on attachment 275607 [details] [diff] [review]
The right diff
>+ // XXXbz I wish there were some centralized place that had the
>+ // condition of this |if| statement.
> if (coord.GetUnit() != eStyleUnit_Coord &&
>- coord.GetUnit() != eStyleUnit_Percent) {
>+ coord.GetUnit() != eStyleUnit_Percent &&
>+ coord.GetUnit() != eStyleUnit_Chars) {
Can you just check coord.GetUnit() == eStyleUnit_Auto?
(Was this one of the places where there used to be some eStyleUnit_Null?)
r+sr+a=dbaron
(Didn't really look at the test, but I trust you there. I hope you generally test that the test fails without the patch?)
Attachment #275607 -
Flags: superreview?(dbaron)
Attachment #275607 -
Flags: superreview+
Attachment #275607 -
Flags: review?(dbaron)
Attachment #275607 -
Flags: review+
Attachment #275607 -
Flags: approval1.9+
Assignee | ||
Comment 5•17 years ago
|
||
> Can you just check coord.GetUnit() == eStyleUnit_Auto?
Um.... yes. ;)
And yes, I do check that the tests fail without the patch.
Assignee | ||
Comment 6•17 years ago
|
||
Checked in with that change. Fixed.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•