[gfx scrollbar] Crash in GfxScrollFrame when style rules indicate display:none

VERIFIED DUPLICATE of bug 21890

Status

()

Core
XUL
P3
critical
VERIFIED DUPLICATE of bug 21890
19 years ago
18 years ago

People

(Reporter: jst, Assigned: David Hyatt)

Tracking

({crash})

Trunk
crash
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments)

(Reporter)

Description

19 years ago
Loading an XML document with a stylesheet containing

* {
  display: block;
  padding: 20px;
}

makes the elements in the GFX scrollbars in mozilla get a padding of 20px!

I'll attach testcases...
(Reporter)

Comment 1

19 years ago
Created attachment 5383 [details]
Stylesheet for the sample XML file.
(Reporter)

Comment 2

19 years ago
Created attachment 5385 [details]
XML testcase.
(Reporter)

Comment 3

19 years ago
Created attachment 5386 [details]
Screenshot
(Reporter)

Comment 4

19 years ago
I also noticed that specifying

* {
  display: none;
}

makes mozilla crash in the GFX scrollbar code since it assumes that some frames
exist even if they don't.
Summary: Document stylesheet interferes with XUL/XBL → Document stylesheet interferes with XUL/XBL style

Comment 5

19 years ago
This is the correct behavior: if you specify a style in a user stylesheet then 
that overrides the styles specified by the user agent. The global style rule is 
a very powerful one...

There is a valid bug here, and that is the crash in GfxScrollFrame when the 
following style rule is set in an HTML or XML page:

* {
   display : none;
}

The GfxScrollFrame method SetInitialChildList should check the scrollbar frames 
for NULL before dereferencing them. I'm changing this bug into a crash bug in 
GfxScrollFrame and sending to eric vaughan.
Assignee: pierre → evaughan
Component: Style System → XP Toolkit/Widgets
Summary: Document stylesheet interferes with XUL/XBL style → [gfx scrollbar] Crash in GfxScrollFrame when style rules indicate display:none

Comment 6

19 years ago
Created attachment 6045 [details]
HTML test case showing crash in GfxScrollFrame
The crash in GfxScrollFrame is definitely not the *only* bug here, regardless of
the style in the *document* that is loaded the GFX scrollbars should look the
same! The scrollbars are not part of the HTML document (well in a way they are
but...)! The only stylesheets that should affect the scrollbars is the chrome
stylesheets, *not* the *document* stylesheets!

Updated

19 years ago
Severity: major → critical
Keywords: crash

Comment 8

18 years ago
hyatt,

passing to you because scrollbars should not be styled by the * selector.
Assignee: evaughan → hyatt
(Assignee)

Comment 9

18 years ago

*** This bug has been marked as a duplicate of 21890 ***
Status: NEW → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → DUPLICATE
Marking verified dup.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.