Closed
Bug 87485
Opened 23 years ago
Closed 23 years ago
Styles changed by DOM are not being realized in layout
Categories
(Core :: DOM: CSS Object Model, defect)
Tracking
()
RESOLVED
FIXED
mozilla0.9.3
People
(Reporter: jrspm, Assigned: hyatt)
References
()
Details
(Keywords: regression, Whiteboard: [Hixie-P1])
Attachments
(2 files)
Using build 2001062211 on Win2k (SP2) Steps to reproduce: 1. go to: http://www.mozilla.org/newlayout/xml/debugdemos/tocdemo/rights.xml 2. click the "Contents" button 3. see the TOC display on the left 4. notice that the main body overlays the original document Actual: TOC overlays body Expected: When TOC is created, it is given a width of 12em. Right before that, the main body of the page is given a margin-left of 12em ( document.styleSheets[0].cssRules[0].style.marginLeft = "12em"; ) meaning that the main body should not be overlayed by the TOC. It should be to the right of TOC. attaching a testcase shortly showing that styles can be read and set via the Style DOM, however the new styles are not being rendered in the document. Jake
Reporter | ||
Comment 1•23 years ago
|
||
Reporter | ||
Comment 2•23 years ago
|
||
Reporter | ||
Comment 3•23 years ago
|
||
Woops, accidentally uploaded the css file as text/html. Well, testcase still loads the css file ok. I'll leave that. Note: in the testcase, the text with background black and color white is the element that is being restyled via a class selector ( .test ). What should be happening when you toggle the style is: Initially: background-color: black; margin-left: 12em; After first toggle: background-color: green; margin-left: 0; ( I set it to "0", Mozilla reports it as "0pt"...bug? ) Jake
Comment 4•23 years ago
|
||
adding cc
Comment 6•23 years ago
|
||
This is not a DOM problem, the DOM code does properly tell layout about this style change, something goes wrong either in the style code or in the reflow/frame construction code. Over to attinasi, this could be a regression from hyatt's stylesystem changes...
Assignee: jst → attinasi
It works correctly in NS6.1b1, so this has regressed since then...
Keywords: regression
Comment 8•23 years ago
|
||
hyatt: this is probably a style system regression.
Assignee | ||
Comment 9•23 years ago
|
||
It is. This has to do something similar to what is done when the .style property is changed, namely invalidating portions of the rule tree cache.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.3
Reporter | ||
Comment 10•23 years ago
|
||
Any progress on this? jake
Comment 11•23 years ago
|
||
i've been searching in bugzilla on if a bug exists about a style property not being updated correctly. this is happening on a page where i'm dynamically enabling and disabling a style sheet via the .disabled property. *ALL* styles *ARE* updated with the exception of the background-color property. http://www.cherny.com/mozilla/css_switch/index.html These style swaps work correctly in IE5.0+ and NS6.01 but not 0.9.1 or 0.9.2 ... I'm not sure if this is related to this bug, bug 34849, or another completely. opinions? should I file a new one? or is it related? thanks :rob
Comment 12•23 years ago
|
||
I do not think that this is a dup of bug 34849. Rather, this is a regression from a recent change to the style system. A related bug is bug 90081 - the problem discovered there is that the rule tree needs to be rebuilt when the rule processors are rebuilt, and this happens when a stylesheet is added, removed, or enabled or disabled. Currently, we are not rebuilding the rule tree so the cascade is not effectively being reprocessed and applied. To be sure, try a build before the 6/01 build - that was when the new style code was landed. David, do you have any plans for managing invalidation of parts of the rule tree? If so, that may help me with bug 90081 (there are many issues I am running into trying to clear the rule tree, documented in that bug).
Comment 13•23 years ago
|
||
yeah i wasn't convinced it was a direct duplicate, but maybe related in some way. i'll see if i can't check out the example i had with a build back-dated like you suggested, see if it does manifest itself around those dates. again, it's not everything, most style changes take in my example, just the background color isn't updated. however, now that i think about it, my example has only the one *color* change ... i should try some other color changes on the same thing, see if it behaves the same way.
Reporter | ||
Comment 14•23 years ago
|
||
is -moz-opacity also not working because of this? The following testcase is taken from bug 66022. That bug is only about a crash that was happening when using -moz-opacity. The crash is now fixed, but the testcase doesn't work. jst said to post a new bug about it, but I want to check here to see if this bug is the reason for it not working? http://bugzilla.mozilla.org/showattachment.cgi?attach_id=22999 Jake
Reporter | ||
Comment 15•23 years ago
|
||
Rob, the problem you are seeing sounds a heck of a lot like bug 88681. "style change to background-color or background-image after disabling a style sheet is not complete" Jake
Comment 16•23 years ago
|
||
yeah totally ... martin (who reported that) and i actually exchanged discussion on that on the newsgroups. thanks!!
Assignee | ||
Comment 17•23 years ago
|
||
Fixed by the fix for 90081.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 18•23 years ago
|
||
bug 90081 was re-opened because the patch was backed out. That leaves this bug unfixed. I hear there is a freeze tomorrow night. Does this mean that Netscape 6.1 won't be supporting a whole bunch of DHTML stuff like this? I gotta say, that would be a real shame, since previous versions supported this. Jake
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Updated•23 years ago
|
Target Milestone: mozilla0.9.3 → mozilla0.9.4
Assignee | ||
Comment 19•23 years ago
|
||
Working on this one for 0.9.3 actually.
Status: REOPENED → ASSIGNED
Target Milestone: mozilla0.9.4 → mozilla0.9.3
Assignee | ||
Comment 20•23 years ago
|
||
Fixed by 90081.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → FIXED
Reporter | ||
Updated•23 years ago
|
Attachment #39839 -
Attachment mime type: text/html → text/css
You need to log in
before you can comment on or make changes to this bug.
Description
•