Closed
Bug 303779
Opened 19 years ago
Closed 19 years ago
PresShell::GetPrimaryFrameFor should return nsIFrame*
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bastiaan, Assigned: bastiaan)
References
Details
Attachments
(1 file, 2 obsolete files)
153.26 KB,
patch
|
Details | Diff | Splinter Review |
Wallpapering patch for bug 302356 exposed that PresShell::GetPrimaryFrameFor() always returns NS_OK. PresShell::GetPrimaryFrameFor() merely calls nsFrameManager::GetPrimaryFrameFor(), so it might as well just return that. Callers need to be updated, though; this should probably wait for 1.9 to go in.
I see only two similiar cases which might need wallpapered too. http://lxr.mozilla.org/mozilla/source/content/events/src/nsEventStateManager.cpp#4637 http://lxr.mozilla.org/mozilla/source/toolkit/components/satchel/src/nsFormFillController.cpp#145 all other places that check for the return value check for frame non nullness too.
Assignee | ||
Comment 2•19 years ago
|
||
This patch removes GetPrimaryFrameFor's second argument (out param) and changes its return value to nsIFrame*. It also updates all the callers.
Assignee | ||
Comment 3•19 years ago
|
||
Previous attachment got cut off.
Attachment #191989 -
Attachment is obsolete: true
Assignee | ||
Updated•19 years ago
|
Attachment #191991 -
Flags: review?(bzbarsky)
Comment 4•19 years ago
|
||
Comment on attachment 191991 [details] [diff] [review] whole fix >Index: content/events/src/nsEventStateManager.cpp >@@ -4629,18 +4625,18 @@ nsEventStateManager::GetDocSelectionLoca >+ if (isCollapsed /* XXX && startFrame do we care? */) { I wouldn't bother with that XXX comment. >Index: layout/base/nsCSSFrameConstructor.cpp > nsCSSFrameConstructor::CaptureStateForFramesOf(nsIContent* aContent, >+ if (!frame) { >+ return NS_ERROR_FAILURE; This used to return NS_OK in this case, and it should continue doing so. r+sr=bzbarsky with those nits
Attachment #191991 -
Flags: superreview+
Attachment #191991 -
Flags: review?(bzbarsky)
Attachment #191991 -
Flags: review+
Comment 5•19 years ago
|
||
Attachment #191991 -
Attachment is obsolete: true
Comment 6•19 years ago
|
||
Oh, and the nsIPresShell IID needed changing.
Comment 7•19 years ago
|
||
Checked in (with the IID change).
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment 8•19 years ago
|
||
*** Bug 292002 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•