Closed Bug 1232852 Opened 9 years ago Closed 9 years ago

Remove lots of unused parameters, mostly in layout/base/

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla46
Tracking Status
firefox46 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

(Blocks 1 open bug)

Details

Attachments

(9 files)

1.45 KB, patch
roc
: review+
Details | Diff | Splinter Review
3.09 KB, patch
roc
: review+
Details | Diff | Splinter Review
50.29 KB, patch
tbsaunde
: review+
Details | Diff | Splinter Review
25.63 KB, patch
heycam
: review+
Details | Diff | Splinter Review
18.55 KB, patch
heycam
: review+
Details | Diff | Splinter Review
9.62 KB, patch
tnikkel
: review+
Details | Diff | Splinter Review
19.81 KB, patch
tnikkel
: review+
Details | Diff | Splinter Review
21.69 KB, patch
roc
: review+
Details | Diff | Splinter Review
6.57 KB, patch
tnikkel
: review+
Details | Diff | Splinter Review
I've been fiddling with -Wunused-parameter. Here are some things I've found with it.
No longer blocks: -Wunused-parameter
Depends on: -Wunused-parameter
Assignee: nobody → n.nethercote
Status: NEW → ASSIGNED
It doesn't need to store the nsIContent. It just needs to record if mPointerId
has been set. This is because ReleasePointerCapturingContent() doesn't use its
second parameter.
Attachment #8703989 - Flags: review?(tnikkel)
Attachment #8703987 - Flags: review?(tnikkel) → review+
Comment on attachment 8703989 [details] [diff] [review]
(part 9) - Simplify ReleasePointerCaptureCaller

I think you need to bump the iid of nsIPresShell.
Attachment #8703989 - Flags: review?(tnikkel) → review+
Attachment #8703986 - Flags: review?(tnikkel) → review+
Attachment #8703984 - Flags: review?(cam) → review+
Comment on attachment 8703985 [details] [diff] [review]
(part 5) - Remove some unused parameters in and around layout/base/

Review of attachment 8703985 [details] [diff] [review]:
-----------------------------------------------------------------

::: layout/base/nsDisplayList.h
@@ -2060,5 @@
>     */
>    bool ComputeVisibilityForSublist(nsDisplayListBuilder* aBuilder,
>                                     nsRegion* aVisibleRegion,
> -                                   const nsRect& aListVisibleBounds,
> -                                   nsIFrame* aDisplayPortFrame = nullptr);

Please remove the comment for this argument.

@@ -2072,5 @@
>     * @param aDisplayPortFrame The root scroll frame, if a displayport is set
>     */
>    bool ComputeVisibilityForRoot(nsDisplayListBuilder* aBuilder,
> -                                nsRegion* aVisibleRegion,
> -                                nsIFrame* aDisplayPortFrame = nullptr);

Here too.

::: layout/base/nsPresShell.h
@@ -85,5 @@
>    static bool BeforeAfterKeyboardEventEnabled();
>  
>    void Init(nsIDocument* aDocument, nsPresContext* aPresContext,
> -            nsViewManager* aViewManager, nsStyleSet* aStyleSet,
> -            nsCompatibility aCompatMode);

You should be able to remove the #include "nsCompatibility.h" from nsIPresShell.h at the same time.
Attachment #8703985 - Flags: review?(cam) → review+
Comment on attachment 8703982 [details] [diff] [review]
(part 2) - Remove some dead member functions from nsILayoutDebugger

Review of attachment 8703982 [details] [diff] [review]:
-----------------------------------------------------------------

::: layout/base/nsILayoutDebugger.h
@@ -38,5 @@
> -  NS_IMETHOD GetFrameSize(nsIPresShell* aPresentation,
> -                          int32_t* aSizeInBytesResult) = 0;
> -
> -  NS_IMETHOD GetStyleSize(nsIPresShell* aPresentation,
> -                          int32_t* aSizeInBytesResult) = 0;

Better rev the IID
Attachment #8703982 - Flags: review?(roc) → review+
Comment on attachment 8703983 [details] [diff] [review]
(part 3) - Remove unused parameters from some accessibility code

This actually contains a bit of layout stuff I don't know much about, but assuming it compiles it seems reasonable.
Attachment #8703983 - Flags: review?(tbsaunde+mozbugs) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/e50e92020a6eb15246e398e4f0e651b0405c7d3a
Bug 1232852 (part 1) - Set |aSnap| in two GetOpaqueRegion() overloadings that are missing it. r=roc.

https://hg.mozilla.org/integration/mozilla-inbound/rev/85068fa089ec5e908469db8cf57fef89dffbf4d8
Bug 1232852 (part 2) - Remove some dead member functions from nsILayoutDebugger. r=roc.

https://hg.mozilla.org/integration/mozilla-inbound/rev/0149483be551fcdd823781bcc90dd3cf18abf310
Bug 1232852 (part 3) - Remove unused parameters from some accessibility code. r=tbsaunde.

https://hg.mozilla.org/integration/mozilla-inbound/rev/81412f10431df126532c2c3cf4bb6361a5575ffa
Bug 1232852 (part 4) - Remove some unused parameters in and around layout/base/. r=heycam.

https://hg.mozilla.org/integration/mozilla-inbound/rev/ec7f6ab2e853b061f7363d1ae96d5ba8918f1166
Bug 1232852 (part 5) - Remove some unused parameters in and around layout/base/. r=heycam.

https://hg.mozilla.org/integration/mozilla-inbound/rev/36adfe32e2771dafaf7ea4886d537efda94e4055
Bug 1232852 (part 6) - Remove unused parameters from some layout sort functions. r=tn.

https://hg.mozilla.org/integration/mozilla-inbound/rev/da2c4222fb7cda18fceac902c4e70f00dcf66d81
Bug 1232852 (part 7) - Remove some unused parameters in and around layout/base/. r=tn.

https://hg.mozilla.org/integration/mozilla-inbound/rev/2a1e282baa42720af204334d88d1ed002d3dc895
Bug 1232852 (part 8) - Remove some unused parameters in and around layout/base/. r=roc.

https://hg.mozilla.org/integration/mozilla-inbound/rev/046479939ba1a9349c4e65900751c3ca57ec4565
Bug 1232852 (part 9) - Simplify ReleasePointerCaptureCaller. r=tn.
No longer depends on: -Wunused-parameter
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: