Closed
Bug 208190
Opened 21 years ago
Closed 15 years ago
work on removing |aPresContext| parameters
Categories
(Core :: Layout, defect, P2)
Core
Layout
Tracking
()
RESOLVED
FIXED
People
(Reporter: dbaron, Assigned: dbaron)
References
Details
Attachments
(5 files, 1 obsolete file)
(deleted),
patch
|
roc
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
See bug 190735 comment 25 and bug 190735 comment 26.
As a first pass, I'd like to add some inline accessors to nsIPresContext and
nsIPresShell (probably some other places too, but these will help with removing
|aPresContext| parameters from nsIFrameManager methods.
Does this seem like the direction we want to go?
Assignee | ||
Comment 1•21 years ago
|
||
Assignee | ||
Comment 2•21 years ago
|
||
slightly more accessors
Attachment #124864 -
Attachment is obsolete: true
Assignee | ||
Comment 3•21 years ago
|
||
Comment on attachment 125049 [details] [diff] [review]
add inline accessors to nsIPresShell and nsIPresContext
Is this the direction we want to go?
Attachment #125049 -
Flags: superreview?(bz-bugspam)
Attachment #125049 -
Flags: review?(roc+moz)
Assignee | ||
Updated•21 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P2
Whiteboard: [patch]
Target Milestone: --- → mozilla1.5alpha
Comment 4•21 years ago
|
||
Comment on attachment 125049 [details] [diff] [review]
add inline accessors to nsIPresShell and nsIPresContext
The direction looks fine (great, even). Two questions:
1) What happens if the prescontext's mShell pointer is null and one of the
other accessors is called?
2) Why the move from nsCOMPtrs to raw pointers?
Assignee | ||
Comment 5•21 years ago
|
||
> 1) What happens if the prescontext's mShell pointer is null and one of the
> other accessors is called?
The same thing that happens to the few hundred places currently in the code
where we do things like:
nsCOMPtr<nsIPresShell> shell;
aPresContext->GetShell(getter_AddRefs(shell));
shell->do_something();
> 2) Why the move from nsCOMPtrs to raw pointers?
So that I don't have to include headers, which could vastly increase
dependencies (slow down compilation and likely mess up REQUIRES). (And the
ability to forward-declare nsCOMPtrs wouldn't solve this, since the inline
functions use them.)
Comment 6•21 years ago
|
||
Comment on attachment 125049 [details] [diff] [review]
add inline accessors to nsIPresShell and nsIPresContext
>Index: base/src/nsPresContext.cpp
>+ *aManager = GetEventStateManager();
>+ if (!*aManager)
>+ return NS_ERROR_UNEXPECTED;
NS_ERROR_OUT_OF_MEMORY seems more appropriate here...
>Index: html/base/src/nsPresShell.cpp
>+ mDocument = aDocument;
>+ NS_IF_ADDREF(mDocument);
We already assert that the document is non-null, so this may as well be
NS_ADDREF.
sr=me with those minor nits.
Attachment #125049 -
Flags: superreview?(bz-bugspam) → superreview+
Comment on attachment 125049 [details] [diff] [review]
add inline accessors to nsIPresShell and nsIPresContext
Yummy
Attachment #125049 -
Flags: review?(roc+moz) → review+
Assignee | ||
Comment 8•21 years ago
|
||
Comment on attachment 125049 [details] [diff] [review]
add inline accessors to nsIPresShell and nsIPresContext
Patch checked in to trunk, 2003-06-19 11:16 -0700.
Assignee | ||
Comment 9•21 years ago
|
||
Assignee | ||
Updated•21 years ago
|
Attachment #126053 -
Flags: superreview?(bzbarsky)
Attachment #126053 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 10•21 years ago
|
||
This adds nsIFrame::GetPresContext as I suggested in bug 190735 comment 29. It
also cleans up some related signatures on nsStyleContext and nsRuleNode, and
removes an unused method from nsRuleNode.
Assignee | ||
Updated•21 years ago
|
Attachment #126064 -
Flags: superreview?(roc+moz)
Attachment #126064 -
Flags: review?(roc+moz)
Comment 11•21 years ago
|
||
Comment on attachment 126053 [details] [diff] [review]
remove |aPresContext| and |aPresShell| parameters from nsIFrameManager methods
r+sr=me.
Attachment #126053 -
Flags: superreview?(bzbarsky)
Attachment #126053 -
Flags: superreview+
Attachment #126053 -
Flags: review?(bzbarsky)
Attachment #126053 -
Flags: review+
Assignee | ||
Comment 12•21 years ago
|
||
Comment on attachment 126053 [details] [diff] [review]
remove |aPresContext| and |aPresShell| parameters from nsIFrameManager methods
Patch checked in to trunk, 2003-06-19 16:52 -0700.
Comment on attachment 126064 [details] [diff] [review]
add nsIFrame::GetPresContext and clean up some nsRuleNode/nsStyleContext signatures
fabulous, r+sr=roc
Attachment #126064 -
Flags: superreview?(roc+moz)
Attachment #126064 -
Flags: superreview+
Attachment #126064 -
Flags: review?(roc+moz)
Attachment #126064 -
Flags: review+
Assignee | ||
Comment 14•21 years ago
|
||
Comment on attachment 126064 [details] [diff] [review]
add nsIFrame::GetPresContext and clean up some nsRuleNode/nsStyleContext signatures
Patch checked in to trunk, 2003-06-19 18:22 -0700.
Assignee | ||
Comment 15•21 years ago
|
||
This bug made inspector crash sometimes.
Assignee | ||
Updated•21 years ago
|
Attachment #126591 -
Flags: superreview?(bzbarsky)
Attachment #126591 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•21 years ago
|
Attachment #126591 -
Flags: superreview?(roc+moz)
Attachment #126591 -
Flags: superreview?(bzbarsky)
Attachment #126591 -
Flags: review?(roc+moz)
Attachment #126591 -
Flags: review?(bzbarsky)
Comment on attachment 126591 [details] [diff] [review]
fix regression from attachment 126064 [details] [diff] [review]
looks familiar :-)
Attachment #126591 -
Flags: superreview?(roc+moz)
Attachment #126591 -
Flags: superreview+
Attachment #126591 -
Flags: review?(roc+moz)
Attachment #126591 -
Flags: review+
Assignee | ||
Comment 17•21 years ago
|
||
Comment on attachment 126591 [details] [diff] [review]
fix regression from attachment 126064 [details] [diff] [review]
Patch checked in to trunk, 2003-06-27 14:06 -0700.
Assignee | ||
Comment 18•21 years ago
|
||
Assignee | ||
Updated•21 years ago
|
Attachment #127579 -
Flags: superreview?(roc+moz)
Attachment #127579 -
Flags: review?(roc+moz)
Comment on attachment 127579 [details] [diff] [review]
add frame manager accessors, clean up nsIFrame::(Get|Set)View
+ f && (f->GetStateBits() & NS_FRAME_HAS_CHILD_WITH_VIEW);
Shouldnt't that be !(f->GetStateBits() & NS_FRAME_HAS_CHILD_WITH_VIEW
?
With that change, r+sr=roc
Attachment #127579 -
Flags: superreview?(roc+moz)
Attachment #127579 -
Flags: superreview+
Attachment #127579 -
Flags: review?(roc+moz)
Attachment #127579 -
Flags: review+
Assignee | ||
Comment 20•21 years ago
|
||
Comment on attachment 127579 [details] [diff] [review]
add frame manager accessors, clean up nsIFrame::(Get|Set)View
Patch checked in to trunk (with correction), 2003-07-11 17:46/48/50 -0700.
Assignee | ||
Updated•21 years ago
|
Whiteboard: [patch]
Target Milestone: mozilla1.5alpha → Future
Updated•16 years ago
|
QA Contact: nobody → layout.misc-code
Comment 21•15 years ago
|
||
Should this bug still be open? It looks like all the work was done and checked in years ago.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•14 years ago
|
Target Milestone: Future → ---
Updated•6 years ago
|
Product: Core → Core Graveyard
Updated•6 years ago
|
Component: Layout: Misc Code → Layout
Product: Core Graveyard → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•