Closed
Bug 748692
Opened 12 years ago
Closed 12 years ago
Dynamically created style rule gets disabled/removed
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla15
People
(Reporter: t.tampe, Assigned: bzbarsky)
Details
Attachments
(2 files)
1.06 KB,
text/html
|
Details | |
7.44 KB,
patch
|
sicking
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0 Build ID: 20120420145725 Steps to reproduce: I created a style node at runtime and added some style rules to it. Then I changed the style node's className. (see attached file for a working demonstration) Actual results: The styles did not apply. It appears, the style rules got deleted. According to http://forums.mozillazine.org/viewtopic.php?f=25&t=2461781 the same happens if an id is added to the style node. Note: this works, if the classname is set to the style node before adding the rules. But: remains a problem, since you can't change the classname. Expected results: The styles should apply even if you change the style node's classname.
Updated•12 years ago
|
Attachment #618189 -
Attachment mime type: text/plain → text/html
Assignee | ||
Comment 1•12 years ago
|
||
Hmm. nsHTMLStyleSheet::SetAttr reparses the stylesheet from the textnode contents unconditionally, looks like. Jonas, is there a reason we're doing that instead of just doing it on changes to title/media/type attributes?
Yeah, the current code looks busted. I don't know of any reason we're doing what we're doing.
Assignee | ||
Comment 3•12 years ago
|
||
Attachment #626702 -
Flags: review?(jonas)
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → bzbarsky
Whiteboard: [need review]
Version: 12 Branch → Trunk
Assignee | ||
Updated•12 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #626702 -
Flags: review?(jonas) → review+
Assignee | ||
Comment 4•12 years ago
|
||
http://hg.mozilla.org/integration/mozilla-inbound/rev/d13475bed11b
Flags: in-testsuite+
Whiteboard: [need review]
Target Milestone: --- → mozilla15
Assignee | ||
Comment 5•12 years ago
|
||
Closed tree makes a liar of me. Actual changeset: http://hg.mozilla.org/integration/mozilla-inbound/rev/3946bc720e97
Comment 6•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/3946bc720e97
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•