Closed Bug 560902 Opened 16 years ago Closed 16 years ago

Optimize nsFocusManager::ContentRemoved

Categories

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

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: smaug, Assigned: smaug)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

The method shows up a bit in profiles where lots of elements are removed from document. nsPIDOMWindow::GetFocusedNode() should be inline, and so should nsIDocument::GetWindow().
Attached patch patch (obsolete) — — Splinter Review
Neil, do the mFocusedNode changes look ok to you? I'll ask another review for nsIDocument changes. Posted to tryserver.
Attachment #441468 - Flags: review?(enndeakin)
Attachment #441468 - Attachment is obsolete: true
Attachment #441469 - Flags: review?(enndeakin)
Attachment #441468 - Flags: review?(enndeakin)
Attachment #441469 - Flags: review?(enndeakin) → review+
Comment on attachment 441469 [details] [diff] [review] up-to-date with trunk Note, I needed to use raw mFocusedNode because of the #include hell related nsIContent.h, nsIDocument.h and nsPIDOMWindow.h.
Attachment #441469 - Flags: superreview?(jonas)
Manually refcounting mFocusedNode sucks. That's bound to bite us. You don't need to #include nsIContent.h just because you're creating a nsCOMPtr to it. If you add a non-inlined ctor and dtor to nsPIDOMWindow and implement that in a .cpp file, it should work fine.
Attached patch Compiles on OSX — — Splinter Review
I need to push this to tryserver to see if also Windows is happy with this.
Attachment #441677 - Flags: review?(jonas)
Status: NEW → RESOLVED
Closed: 16 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: