Closed
Bug 370933
Opened 19 years ago
Closed 19 years ago
"ASSERTION: aBlock must be a block" with <input type="file">
Categories
(Core :: Layout: Form Controls, defect)
Core
Layout: Form Controls
Tracking
()
RESOLVED
FIXED
People
(Reporter: jruderman, Assigned: MatsPalmgren_bugz)
References
Details
(Keywords: assertion, regression, testcase)
Attachments
(4 files)
|
20 bytes,
text/html
|
Details | |
|
19 bytes,
text/html
|
Details | |
|
10 bytes,
text/html
|
Details | |
|
8.72 KB,
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
Many pages, including
https://bugzilla.mozilla.org/attachment.cgi?bugid=12345&action=enter
and
https://bugzilla.mozilla.org/query.cgi?format=advanced
trigger
###!!! ASSERTION: aBlock must be a block: 'blockFrame', file layout/generic/nsBlockFrame.cpp
I reduced the former to just <input type="file">.
Flags: blocking1.9?
| Assignee | ||
Updated•19 years ago
|
Assignee: nobody → mats.palmgren
OS: Mac OS X → All
Hardware: PC → All
| Assignee | ||
Comment 1•19 years ago
|
||
| Assignee | ||
Comment 2•19 years ago
|
||
| Assignee | ||
Comment 3•19 years ago
|
||
nsFileControlFrame, nsIsIndexFrame and nsLegendFrame are subclasses of
nsAreaFrame, so they should use nsAreaFrame::QueryInterface() at the end of
their QI impl method, not nsHTMLContainerFrame::QueryInterface().
The fix is nsHTMLContainerFrame -> nsAreaFrame, the rest is just a bit
of cleanup.
Attachment #255726 -
Flags: superreview?(bzbarsky)
Attachment #255726 -
Flags: review?(bzbarsky)
Comment 4•19 years ago
|
||
Comment on attachment 255726 [details] [diff] [review]
Patch rev. 1
Makes sense, and good catch!
Attachment #255726 -
Flags: superreview?(bzbarsky)
Attachment #255726 -
Flags: superreview+
Attachment #255726 -
Flags: review?(bzbarsky)
Attachment #255726 -
Flags: review+
Comment 5•19 years ago
|
||
Comment on attachment 255726 [details] [diff] [review]
Patch rev. 1
Actually, I think might confuse code that's outside these controls and expects them to actually be blocks in some sane way if they QI to that interface.
Attachment #255726 -
Flags: superreview-
Attachment #255726 -
Flags: superreview+
Attachment #255726 -
Flags: review-
Attachment #255726 -
Flags: review+
Comment 6•19 years ago
|
||
roc, do you think it's safe for random block-like replaced elements to QI to the block CID? Or should we just remove this assert?
Though <legend> probably _should_ QI to a block, as far as that goes, no matter what.
I think we've been using QI to mean "is nsBlockFrame or a subclass" and I think that's appropriate.
We *really* need some better checks via IsFrameOfType so we can get rid of the QI and avoid a lot of confusion. I'd like to see at least:
1) implements nsBlockFrame
2) IsFloatContainingBlock (which I think is the same as "lays out contents in block fashion", i.e. display-model:block (right?))
3) IsBlockLevel (i.e., acts like a block to the outside, i.e. display-role:block)
(In reply to comment #7)
> 3) IsBlockLevel (i.e., acts like a block to the outside, i.e.
> display-role:block)
I think this one is probably better determined from the style data than the frame type -- and we already can. Lots of frame types (e.g., images, form controls) can be given display:block. (One could argue that form controls should then become nsBlockFrames rather than form controls -- in fact, I think that probably would have been better -- but it's a little late for that now.)
Hmm, and currently IsFloatContainingBlock is true precisely for nsBlockFrame and its descendants. So maybe we just need one bit here, defined as both 1) and 2).
| Assignee | ||
Comment 10•19 years ago
|
||
Note: if we decide to keep the QI's as is, we should probably make
nsComboboxControlFrame use nsHTMLContainerFrame too.
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/layout/forms/nsComboboxControlFrame.cpp&rev=1.394&root=/cvsroot&mark=321#291
Comment 11•19 years ago
|
||
Comment on attachment 255726 [details] [diff] [review]
Patch rev. 1
Let's take this to fix the asserts and then we can work on eliminating uses of this CID for determining block-frame-ness.
Attachment #255726 -
Flags: superreview-
Attachment #255726 -
Flags: superreview+
Attachment #255726 -
Flags: review-
Attachment #255726 -
Flags: review+
Comment 12•19 years ago
|
||
IsFloatContainingBlock() (or equivalent bit) should mean "won't drop frames that you put on its float list". This is probably equivalent to "is an nsBlockFrame", but I'd also be happy using two different bits for those two slightly different concepts...
| Assignee | ||
Comment 14•19 years ago
|
||
Checked in to trunk at 2007-02-23 20:42 PST
-> FIXED
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 15•18 years ago
|
||
Should be covered by plenty of existing tests. We just need assertions to turn Tinderbox orange!
Flags: in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•