Closed Bug 344453 Opened 18 years ago Closed 18 years ago

Same mutation event is notified twice to the PresShell

Categories

(Core :: DOM: Core & HTML, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: MatsPalmgren_bugz, Assigned: sicking)

Details

Attachments

(2 files)

(spawned off from bug 143065 comment 35.)

Same mutation event is notified twice to the PresShell

STEPS TO REPRODUCE
1. start SeaMonkey
2. open the Preferences window

ACTUAL RESULTS
nsEventStateManager::RegisterAccessKey() is called twice for some elements.
E.g. "Navigator->Display On: Home Page"

The problem occurs in nsNodeUtils::AttributeChanged():
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/content/base/src/nsNodeUtils.cpp&rev=3.1&root=/cvsroot&mark=75-108,120,126-128#73

The same change is notified to PresShell::AttributeChanged() both directly
from nsNodeUtils::AttributeChanged() and through
nsXULDocument::AttributeChanged():
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/content/xul/document/src/nsXULDocument.cpp&rev=1.723&root=/cvsroot&mark=950-953#891

This doesn't seem right to me.
Attached file stacks
Attached patch Patch to fixSplinter Review
Opps! Good catch! Those lines should not be there since nsNodeUtils takes care of all notifications.

I also noticed the other day that the CharacterDataChanged notification is not sent out for nodes in an orphaned subtree.
Assignee: general → bugmail
Status: UNCONFIRMED → ASSIGNED
Attachment #229047 - Flags: superreview?(jst)
Attachment #229047 - Flags: review?(jst)
Comment on attachment 229047 [details] [diff] [review]
Patch to fix

r+sr=jst
Attachment #229047 - Flags: superreview?(jst)
Attachment #229047 - Flags: superreview+
Attachment #229047 - Flags: review?(jst)
Attachment #229047 - Flags: review+
Checked in, thanks for catching this.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: