Closed
Bug 550325
Opened 15 years ago
Closed 14 years ago
"ASSERTION: We should have padding here" with abs pos, overflow:scroll
Categories
(Core :: Layout, defect, P2)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla2.0b8
Tracking | Status | |
---|---|---|
blocking2.0 | --- | final+ |
People
(Reporter: jruderman, Assigned: MatsPalmgren_bugz)
References
Details
(Keywords: assertion, regression, testcase)
Attachments
(4 files, 1 obsolete file)
153 bytes,
text/html
|
Details | |
156 bytes,
text/html
|
Details | |
19.11 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
19.22 KB,
patch
|
Details | Diff | Splinter Review |
###!!! ASSERTION: We should have padding here! (out of memory?): 'hasPadding', file /Users/jruderman/central/layout/generic/nsFrame.cpp, line 695
This assertion (in its current form) was added by bug 542361.
Updated•15 years ago
|
blocking2.0: --- → ?
blocking2.0: ? → final+
Priority: -- → P2
Assignee | ||
Comment 1•14 years ago
|
||
I'll take a look...
Assignee: nobody → matspal
OS: Mac OS X → All
Hardware: x86 → All
Assignee | ||
Comment 2•14 years ago
|
||
Adding an "X" to show that the left position is wrong.
Assignee | ||
Comment 3•14 years ago
|
||
The problem is that the UsedPaddingProperty is missing, that causes the
assertion and the layout error. nsGfxScrollFrame explicitly sets it:
http://hg.mozilla.org/mozilla-central/annotate/9b79a3d0c554/layout/generic/nsGfxScrollFrame.cpp#l495
but this is immediately removed by nsHTMLReflowState::InitConstraints
http://hg.mozilla.org/mozilla-central/annotate/9b79a3d0c554/layout/generic/nsHTMLReflowState.cpp#l1656
which then never sets it up again, since in nsCSSOffsetState::InitOffsets
http://hg.mozilla.org/mozilla-central/annotate/9b79a3d0c554/layout/generic/nsHTMLReflowState.cpp#l1893
we take the first 'else' which just assigns 'mComputedPadding' --
it's ComputePadding() in the last 'else' that sets it up (when needed):
http://hg.mozilla.org/mozilla-central/annotate/9b79a3d0c554/layout/generic/nsHTMLReflowState.cpp#l2190
Assignee | ||
Comment 4•14 years ago
|
||
Let's handle these properties in InitOffsets() instead of in multiple places.
(It's called from InitConstraints() unconditionally, and only from there.)
This also allows us to optimize the Delete+Set in case the property
exists (avoiding delete+new and extra property search).
The bug fix is that when the aPadding argument is non-null we set the
property if the padding style is width dependent.
I'm also slightly changing ComputePadding() for some table elements;
it used to compute a %-padding and set the property to that value and
then set mComputedPadding to zero. This seems like a bug, I think the
property value should always be the same as the computed value.
Passed TryServer unit tests (some known orange).
Attachment #488862 -
Flags: review?(roc)
Assignee | ||
Comment 5•14 years ago
|
||
> property value should always be the same as the computed value
We should also fix that for border-collapse tables and scrollbars
which set mComputedPadding to zero at the end of InitOffsets:
http://hg.mozilla.org/mozilla-central/annotate/9b79a3d0c554/layout/generic/nsHTMLReflowState.cpp#l1934
Updating UsedPaddingProperty at the end InitOffsets should fix that.
Attachment #488862 -
Attachment is obsolete: true
Attachment #488871 -
Flags: review?(roc)
Attachment #488862 -
Flags: review?(roc)
Comment on attachment 488871 [details] [diff] [review]
Patch rev. 2
Split needProp into needMarginProp and needPaddingProp.
Attachment #488871 -
Flags: review?(roc) → review+
Assignee | ||
Comment 7•14 years ago
|
||
Nit fixed. Also, I moved local variable 'presContext' a bit earlier
to eliminate a 'frame->PresContext()'. Trivial change, so not going
to ask for a new review.
Assignee | ||
Comment 8•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b8
Reporter | ||
Comment 9•14 years ago
|
||
Bug 611532 has another testcase that triggers the assertion.
You need to log in
before you can comment on or make changes to this bug.
Description
•