Closed Bug 476097 Opened 17 years ago Closed 17 years ago

"ASSERTION: killing mutation events" with <input type="file">

Categories

(Core :: Layout: Form Controls, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: smaug)

Details

(Keywords: assertion, testcase)

Attachments

(3 files, 1 obsolete file)

Attached file testcase
###!!! ASSERTION: killing mutation events: 'nsContentUtils::IsSafeToRunScript()', file ../../../dist/include/content/nsContentUtils.h, line 1549
Smaug, I thought we didn't fire mutation events on native anon content...
Some of the assertions come from nsFileControlFrame::CreateAnonymousContent where we set attributes using .SetXXX methods before marking elements to be native anonymous.
Assignee: nobody → Olli.Pettay
Attached patch patch (obsolete) — Splinter Review
Mark created elements native anon already before returning from CreateAnonymousContent. Also change SetNativeAnonymous() so that content objects which are marked to be native anon, are marked to be in native anon subtree even before they are bound to anywhere. I went through other CreateAnonymousContent implementations and they looked ok. I could probably remove IsRootOfNativeAnonymousSubtree() check from ::BindToTree, but I'd like to keep it there for now.
Attachment #359744 - Flags: superreview?(bzbarsky)
Attachment #359744 - Flags: review?(bzbarsky)
And nsContentUtils::HasMutationListeners could be optimized so that it would return false in this, even if the elements aren't in native anon.
This fixes the assertion too. I'd like to take both patches.
Attachment #359770 - Flags: superreview?(bzbarsky)
Attachment #359770 - Flags: review?(bzbarsky)
Attachment #359770 - Flags: superreview?(bzbarsky)
Attachment #359770 - Flags: superreview+
Attachment #359770 - Flags: review?(bzbarsky)
Attachment #359770 - Flags: review+
Comment on attachment 359744 [details] [diff] [review] patch This doesn't need an IID rev, does it? And it might be good to add comments in nsFileControlFrame explaining that the anonymous thing is to prevent the notifications about the attr set from seeing non-anonymous nodes.
Attachment #359744 - Flags: superreview?(bzbarsky)
Attachment #359744 - Flags: superreview+
Attachment #359744 - Flags: review?(bzbarsky)
Attachment #359744 - Flags: review+
I wasn't sure about the IID. I decided to update it so that whoever uses nsIContent really gets to updated inline method.
Attached patch patchSplinter Review
Attachment #359744 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: