Closed Bug 181692 Opened 22 years ago Closed 22 years ago

[FIX]Crash if page sets display:inline on *|*:-moz-viewport

Categories

(Core :: Layout, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.3alpha

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Details

Attachments

(2 files, 2 obsolete files)

Testcase:

<html>
<head>
<style>
*|*:-moz-viewport {
  display: inline;
}
</style>
</head>
<body>
</body>
</html>

This will lead to a crash because the viewport frame will think it's not a
percentage base and nsHTMLReflowState::InitCBReflowState() will try to look at
the parent reflow state, which is null (this is nsPresShell::InitialReflow(),
called directly on the viewport).

We could make those rules !important.  We could make nsViewportFrame implement
its own IsPercentageBase().  We could even do both.  Thoughts?
Priority: -- → P1
Target Milestone: --- → mozilla1.3alpha
It seems broken that the viewport frame can have a style context with any
arbitrary display type.  Doing both seems like the right short-term fix, but in
general I guess I don't like style rules influencing these frames much at all...
Actually, maybe it's better to just do the !important.
Attached patch Per irc conversation (obsolete) — Splinter Review
Attachment #107293 - Flags: superreview?(dbaron)
Attachment #107293 - Flags: review?(karnaze)
Summary: Crash if page sets display:inline on *|*:-moz-viewport → [FIX]Crash if page sets display:inline on *|*:-moz-viewport
Attachment #107293 - Attachment is obsolete: true
Attachment #107295 - Flags: superreview?(dbaron)
Attachment #107295 - Flags: review?(karnaze)
Attachment #107293 - Flags: superreview?(dbaron)
Attachment #107293 - Flags: review?(karnaze)
Comment on attachment 107295 [details] [diff] [review]
Oops.  Need to move the namespace rule.

Hmmm.  The division between what you moved to ua.css and what stayed in
html.css seems rather arbitrary.  Maybe it would be better to leave that
organization as-is, or move more?
Yeah... I basically moved the "magic" section....

I'll look over the other ones and see which should be moved.
Attachment #107295 - Flags: superreview?(dbaron) → superreview-
This moves everything that does not use HTML elements in the selector.
Attachment #107295 - Attachment is obsolete: true
Attachment #107309 - Flags: superreview?(dbaron)
Attachment #107309 - Flags: review?(karnaze)
Attachment #107295 - Flags: review?(karnaze)
Attachment #107309 - Flags: superreview?(dbaron) → superreview+
Attachment #107309 - Flags: review?(karnaze) → review+
fixed
Status: NEW → RESOLVED
Closed: 22 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: