Closed
Bug 1024138
Opened 11 years ago
Closed 11 years ago
Remove the GetPresShell() and GetPresContext() methods from nsFrameManager
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: jwatt, Assigned: jwatt)
References
Details
Attachments
(1 file)
|
2.97 KB,
patch
|
dholbert
:
review+
|
Details | Diff | Splinter Review |
Nobody calls the GetPresShell() and GetPresContext() methods on nsFrameManager, so we should remove them.
| Assignee | ||
Comment 1•11 years ago
|
||
Attachment #8438728 -
Flags: review?(dholbert)
Comment 2•11 years ago
|
||
Comment on attachment 8438728 [details] [diff] [review]
patch
># HG changeset patch
># Parent ef38952a39abd6be00c72693bbdffdb7a4be04c1
># User Jonathan Watt <jwatt@jwatt.org>
>Bug 1024138 - Remove the GetPresShell() and GetPresContext() methods from nsFrameManager. r=dholbert
(maybe "Remove unused", instead of "Remove the", to make it clearer from the commit message what the scope of this is?)
>diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp
> nsCSSFrameConstructor::nsCSSFrameConstructor(nsIDocument *aDocument,
> nsIPresShell *aPresShell,
> nsStyleSet* aStyleSet)
>- : nsFrameManager(aPresShell, aStyleSet)
>- , mDocument(aDocument)
>+ : mDocument(aDocument)
I don't think we should make this change to the constructors. (shifting responsibility to nsCSSFrameConstructor, for initializing these members)
As long as nsFrameManager itself* manages mPresShell and mStyleSet, it should be the one to set those values in the constructor.
* (OK, technically these members are declared on its evil appendage nsFrameManagerBase, not on nsFrameManager. Nonetheless, nsFrameManager works with them, and e.g. its destructor has assertions about mPresShell at least, so its constructor should still be responsible for setting them.)
If we end up folding it together with nsCSSFrameConstructor, then we can merge their member-data-initialization, but I don't think it makes sense to do that here.
>@@ -152,16 +146,11 @@ public:
>-
>- nsIPresShell* GetPresShell() const { return mPresShell; }
>- nsPresContext* GetPresContext() const {
>- return mPresShell->GetPresContext();
>- }
So, r=me on this part ^. :)
Attachment #8438728 -
Flags: review?(dholbert) → review+
| Assignee | ||
Comment 3•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in
before you can comment on or make changes to this bug.
Description
•