Closed
Bug 314095
Opened 19 years ago
Closed 10 years ago
Eliminate nsIContent::GetDocument
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla34
People
(Reporter: bzbarsky, Assigned: smaug)
Details
Attachments
(1 file, 3 obsolete files)
55.58 KB,
patch
|
Details | Diff | Splinter Review |
We should replace this with either GetOwnerDoc or GetCurrentDoc (or both if some caller needs both!). The basic split is: if the caller is doing something that depends on the DOM, use GetOwnerDoc. If it depends on the presentation, use GetCurrentDoc. s/depends on/affects/ if desired So e.g. nsIDocumentObserver notifications would use the current doc (or both if they're not the same?). Events are a pain since they need both, in some cases Security checks... probably the owner doc. This needs thought in some cases. Base URIs... owner doc.
I wonder if we should clarify the names a bit. And even adding something that returns what GetCurrentDoc returns now.
Comment 2•19 years ago
|
||
(In reply to comment #1) > And even adding something that returns what GetCurrentDoc returns now. Why? GetCurrentDoc isn't going to change, is it?
Comment 3•19 years ago
|
||
Ignore me ;-). Do we have concrete usecases for such a function though?
Updated•15 years ago
|
Assignee: general → nobody
QA Contact: ian → general
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → bugs
Assignee | ||
Comment 4•10 years ago
|
||
GetUncomposedDoc() is the same as the old GetCurrentDoc(), and GetComposedDoc() returns a valid value also in case the node is somewhere in shadow dom which is attached to normal dom subtree which is in document. https://tbpl.mozilla.org/?tree=Try&rev=cd373d42ec03
Attachment #8476757 -
Flags: review?(jst)
Assignee | ||
Comment 5•10 years ago
|
||
Additional patch to fix some OSX specific code paths.
Comment 6•10 years ago
|
||
Comment on attachment 8476757 [details] [diff] [review] remove_nsIContent_GetDocument.diff r=jst. We should file bugs on your XXX comments though.
Attachment #8476757 -
Flags: review?(jst) → review+
Assignee | ||
Comment 7•10 years ago
|
||
Filed Bug 1057470 for GetElementById, and other XXX have bugs.
Assignee | ||
Comment 8•10 years ago
|
||
Attachment #8476757 -
Attachment is obsolete: true
Attachment #8476775 -
Attachment is obsolete: true
Assignee | ||
Comment 9•10 years ago
|
||
Attachment #8477610 -
Attachment is obsolete: true
Assignee | ||
Comment 10•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/9684e1598f4e
Comment 11•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/9684e1598f4e
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•