Closed
Bug 484159
Opened 15 years ago
Closed 2 years ago
Optimize nsContentUtils::ContentIsDescendantOf
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: smaug, Assigned: smaug)
Details
Attachments
(1 obsolete file)
if aPossibleDescendant is in doc, but aPossibleAncestor isn't, or vise-versa, aPossibleAncestor can't be ancestor of aPossibleDescendant. The method shows up occasionally in some profiles.
Attachment #368225 -
Flags: superreview?(jonas)
Attachment #368225 -
Flags: review?(jonas)
Comment on attachment 368225 [details] [diff] [review] patch Hard to say if this actually is an improvement or not in the general case. Depends on how often we call this with out-of-doc nodes. Did you have a reason to go for this specific optimization? I wonder if we should inline the function as well. Or instead. r/sr=me either way.
Attachment #368225 -
Flags: superreview?(jonas)
Attachment #368225 -
Flags: superreview+
Attachment #368225 -
Flags: review?(jonas)
Attachment #368225 -
Flags: review+
Assignee | ||
Comment 2•15 years ago
|
||
(In reply to comment #1) > Did you have a reason to go for this specific optimization? If the DOM is very deep and we add a new child to it.
Ah, makes sense.
Though if that's the only case that benefits from this optimization, you could put that check in the caller instead?
Assignee | ||
Updated•15 years ago
|
Attachment #368225 -
Attachment is obsolete: true
Assignee | ||
Comment 5•15 years ago
|
||
Comment on attachment 368225 [details] [diff] [review] patch For some reason this causes assertions in nsRange when closing the browser.
Assignee | ||
Comment 6•15 years ago
|
||
(In reply to comment #5) > For some reason this causes assertions in nsRange when closing the browser. The reason is native anonymous content which is still marked to be in document, even though their parent isn't. This happens when destroying input element.
Comment 7•15 years ago
|
||
Hmm. Doesn't that unbind the native anon content?
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
Assignee | ||
Comment 8•2 years ago
|
||
There is no nsContentUtils::ContentIsDescendantOf anymore and similar code has been optimized elsewhere in the past few years.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•