Note: There are a few cases of duplicates in user autocompletion which are being worked on.

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

RESOLVED FIXED in mozilla1.3alpha

Status

()

Core
Layout: Misc Code
P1
critical
RESOLVED FIXED
15 years ago
15 years ago

People

(Reporter: bz, Assigned: bz)

Tracking

Trunk
mozilla1.3alpha
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 2 obsolete attachments)

(Assignee)

Description

15 years ago
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?
(Assignee)

Comment 1

15 years ago
Created attachment 107257 [details]
testcase -- THIS CRASHES
(Assignee)

Updated

15 years ago
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.
(Assignee)

Comment 4

15 years ago
Created attachment 107293 [details] [diff] [review]
Per irc conversation
(Assignee)

Updated

15 years ago
Attachment #107293 - Flags: superreview?(dbaron)
Attachment #107293 - Flags: review?(karnaze)
(Assignee)

Updated

15 years ago
Summary: Crash if page sets display:inline on *|*:-moz-viewport → [FIX]Crash if page sets display:inline on *|*:-moz-viewport
(Assignee)

Comment 5

15 years ago
Created attachment 107295 [details] [diff] [review]
Oops.  Need to move the namespace rule.
Attachment #107293 - Attachment is obsolete: true
(Assignee)

Updated

15 years ago
Attachment #107295 - Flags: superreview?(dbaron)
Attachment #107295 - Flags: review?(karnaze)
(Assignee)

Updated

15 years ago
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?
(Assignee)

Comment 7

15 years ago
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-
(Assignee)

Comment 8

15 years ago
Created attachment 107309 [details] [diff] [review]
move non-HTML stuff out completely

This moves everything that does not use HTML elements in the selector.
Attachment #107295 - Attachment is obsolete: true
(Assignee)

Updated

15 years ago
Attachment #107309 - Flags: superreview?(dbaron)
Attachment #107309 - Flags: review?(karnaze)
(Assignee)

Updated

15 years ago
Attachment #107295 - Flags: review?(karnaze)
Attachment #107309 - Flags: superreview?(dbaron) → superreview+

Updated

15 years ago
Attachment #107309 - Flags: review?(karnaze) → review+
(Assignee)

Comment 9

15 years ago
fixed
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.