Closed
Bug 540462
Opened 15 years ago
Closed 15 years ago
Move GetDocument from nsIDocumentViewer to nsIContentViewer
Categories
(Core :: General, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: smaug, Assigned: smaug)
References
Details
Attachments
(2 files)
22.61 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
25.40 KB,
patch
|
Details | Diff | Splinter Review |
This would be the first step of bug 540433. Removing the whole nsIDocumentViewer needs some more work after all and this part is more important for performance reasons. I'll push the patch to tryserver.
Assignee | ||
Comment 1•15 years ago
|
||
Comment on attachment 422231 [details] [diff] [review] WIP First this and then figuring out how to fix nsDocShell::GetEldestPresContext before removing nsIDocumentViewer. (GetEldestPresContext is probably pretty simple to fix, just use prescontext via nsIDocument)
Attachment #422231 -
Attachment is patch: true
Attachment #422231 -
Attachment mime type: application/octet-stream → text/plain
Attachment #422231 -
Flags: review?(bzbarsky)
Comment 2•15 years ago
|
||
Comment on attachment 422231 [details] [diff] [review] WIP >+++ b/accessible/src/base/nsCoreUtils.cpp >@@ -555,22 +554,17 @@ nsCoreUtils::GetDOMNodeForContainer(nsID >+ nsCOMPtr<nsIDocument> doc = cv->GetDocument(); This can just be nsIDocument*, right? >+++ b/content/base/src/nsDocument.cpp >@@ -893,17 +893,17 @@ nsExternalResourceMap::AddExternalResour > nsCOMPtr<nsIDocument> doc; What about this one? In fact, this probably applies to all the places you're making this change. Check whether the refcounting is needed? >+++ b/docshell/base/nsDocShell.cpp >@@ -10092,21 +10077,19 @@ nsDocShell::SetBaseUrlForWyciwyg(nsICont >+ aContentViewer->GetDocument(); >+ if (document) { >+ rv = document->SetBaseURI(baseURI); You need to actually assign to |document|, right? And should it be declared in the block where it's used? Do we not have unit tests covering this codepath? r=me with the above fixed.
Attachment #422231 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 3•15 years ago
|
||
(In reply to comment #2) > Check whether the refcounting is needed? ok > Do we not have unit tests covering this codepath? Uh, right. I guess I need to add some test, if possible.
Assignee | ||
Comment 4•15 years ago
|
||
I couldn't figure out a testcase which would fail with that change.
Assignee | ||
Comment 5•15 years ago
|
||
Ah, maybe I found the testcase.
Assignee | ||
Comment 6•15 years ago
|
||
Assignee | ||
Comment 7•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/582e1c0c2b21
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•