Closed Bug 314878 Opened 19 years ago Closed 19 years ago

[FIX]Remove QIs to nsIDOMHTMLSelectElement before calling WipeContainingBlock

Categories

(Core :: Layout, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

See discussion in bug 313496.
Attached patch Like so (obsolete) — Splinter Review
Attachment #201717 - Flags: superreview?(dbaron)
Attachment #201717 - Flags: review?(dbaron)
Comment on attachment 201717 [details] [diff] [review]
Like so

>   // If we don't have a block within an inline, just return false.
>   // XXX We should be more careful about |aFrame| being something
>-  // constructed by tag name (see the SELECT check all callers currenly
>-  // do).
>+  // constructed by tag name; it might have a "block-like" frame
>+  // that's not an area of block and not have a block display....

area *or* block

>+  nsIAtom* frameType = aFrame->GetType();
>   if (NS_STYLE_DISPLAY_INLINE != aFrame->GetStyleDisplay()->mDisplay ||
>+      frameType == nsLayoutAtoms::blockFrame ||
>+      frameType == nsLayoutAtoms::areaFrame ||

Why not do the check the other way around:  skip the display check, and just check frameType != nsLayoutAtoms::inlineFrame && frameType != nsLayoutAtoms::positionedInlineFrame && frameType != nsLayoutAtoms::lineFrame.

(Not sure about the lineFrame, though.)
It looks like block-within-inline splitting is done in ConstructInline, which is called only for inlineFrame and positionedInlineFrame types.  Not sure what bugs we have with {ib} and :first-line, though.
Though nsCSSFrameConstructor::WrapFramesInFirstLineFrame calls IsInlineFrame, so I think you probably would want to check lineFrame type.
<sigh>.   I even talked about that, then forgot to do it...
Attachment #201717 - Attachment is obsolete: true
Attachment #201802 - Flags: superreview?(dbaron)
Attachment #201802 - Flags: review?(dbaron)
Attachment #201717 - Flags: superreview?(dbaron)
Attachment #201717 - Flags: review?(dbaron)
Attachment #201802 - Flags: superreview?(dbaron)
Attachment #201802 - Flags: superreview+
Attachment #201802 - Flags: review?(dbaron)
Attachment #201802 - Flags: review+
Fixed on trunk.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
Component: Layout: Misc Code → Layout
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: