Closed Bug 129494 Opened 24 years ago Closed 23 years ago

[RR/RCF]Disabling, enabling stylesheets leaves layout dirty

Categories

(Core :: CSS Parsing and Computation, defect, P1)

defect

Tracking

()

RESOLVED WORKSFORME
mozilla1.2alpha

People

(Reporter: erik, Assigned: dbaron)

Details

(Keywords: testcase)

Attachments

(3 files)

If a page contains more than one link element pointing to a css file and the disabled properties of these are changed through scripting the layout state becomes corrupted resulting in hidden element becoming visible and the other way around. To reproduce. Create a page with at least two different linked css files. Set up a rule for DIV (this can be empty but the attached files sets the color to make it a bit clearer). After this create a few div. Disable all but one style sheet. Update the style.display properties for a few div. Switch style sheets and notice how the display.block is not correctly reflected. Build nr: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.9+) Gecko/20020307 I've seen the same bug using Windows NT5.0 and NT5.1. It might be windows only but most likely it applies to all platforms. Attachment coming...
Uses two css files with empty rules and switches between this. To see bug. Change css file and change the display and then change back to the first css file.
Comment on attachment 72983 [details] Test case with two linked css files For future reference, the best way to attach things like this is to attach the 2 CSS files to the bug, then change the links in your HTML, and attach the HTML that points to the attachments, so that the whole thing can be viewed from the bug without downloading.
This is already reported....
Whiteboard: DUPEME
If this has already been reported then this should be marked as a duplicate. Since I didn't find a duplicate when I reported this it would be nice if you (Boris Zbarsky) could tell what bug this a duplicate of and then makk this bug as such.
Attached file simpler testcase —
This test case doesn't involve any linked CSS. Steps to reproduce: 1. load this testcase 2. Click "Toggle div-two" 3. Click "Disable Red" 4. Click "Toggle div-two" 5. Click "Enable Red" Expected results: Step 5 causes everything to become red. Actual results: Step 5 causes everything to become red *AND* causes div-two to be hidden again.
This *might* be related to the undisplayed content map, like bug 138120 comment 2.
Depends on: 136728
This testcase basically mimicks the javascript that enables disables stylesheets in the "view/Use Style" menu. Two titled stylsheets contain display:none statements. When one stylesheet is displayed, it sets display:none on the SPAN tag with an ID the same as its title so that the link for the stylesheet that is disabled shows up (since it isn't telling its SPAN with ID matching the title to not display). So, text in the link should alternate between "Other" and "Added-Extras" whenever the link is clicked. What happens now is that once the link is clicked, no link is seen again unless the page is reloaded. This worked fine until very recently. Jake
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → mozilla1.1beta
Summary: Disabling, enabling stylesheets leaves layout dirty → [RR/RCF]Disabling, enabling stylesheets leaves layout dirty
cc'ing myself
Target Milestone: mozilla1.1beta → mozilla1.2alpha
Keywords: testcase
WFM build 20020901, Windows 2000
yep, WFM now in build 2002090604 on Win2k (sp2sr1). This can probably be closed. Jake
WFM.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: