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

RESOLVED FIXED in Firefox 46

Status

()

Core
Layout
RESOLVED FIXED
2 years ago
10 months ago

People

(Reporter: njn, Assigned: njn)

Tracking

(Blocks: 1 bug)

unspecified
mozilla46
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox46 fixed)

Details

Attachments

(9 attachments)

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
(Assignee)

Description

2 years ago
I've been fiddling with -Wunused-parameter. Here are some things I've found with it.
(Assignee)

Updated

2 years ago
No longer blocks: 1232547
Depends on: 1232547
(Assignee)

Comment 1

2 years ago
Created attachment 8703981 [details] [diff] [review]
(part 1) - Set |aSnap| in two GetOpaqueRegion() overloadings that are missing it
Attachment #8703981 - Flags: review?(roc)
(Assignee)

Updated

2 years ago
Assignee: nobody → n.nethercote
Status: NEW → ASSIGNED
(Assignee)

Comment 2

2 years ago
Created attachment 8703982 [details] [diff] [review]
(part 2) - Remove some dead member functions from nsILayoutDebugger
Attachment #8703982 - Flags: review?(roc)
(Assignee)

Comment 3

2 years ago
Created attachment 8703983 [details] [diff] [review]
(part 3) - Remove unused parameters from some accessibility code
Attachment #8703983 - Flags: review?(tbsaunde+mozbugs)
(Assignee)

Comment 4

2 years ago
Created attachment 8703984 [details] [diff] [review]
(part 4) - Remove some unused parameters in and around layout/base/
Attachment #8703984 - Flags: review?(cam)
(Assignee)

Comment 5

2 years ago
Created attachment 8703985 [details] [diff] [review]
(part 5) - Remove some unused parameters in and around layout/base/
Attachment #8703985 - Flags: review?(cam)
(Assignee)

Comment 6

2 years ago
Created attachment 8703986 [details] [diff] [review]
(part 6) - Remove unused parameters from some layout sort functions
Attachment #8703986 - Flags: review?(tnikkel)
(Assignee)

Comment 7

2 years ago
Created attachment 8703987 [details] [diff] [review]
(part 7) - Remove some unused parameters in and around layout/base/
Attachment #8703987 - Flags: review?(tnikkel)
(Assignee)

Comment 8

2 years ago
Created attachment 8703988 [details] [diff] [review]
(part 8) - Remove some unused parameters in and around layout/base/
Attachment #8703988 - Flags: review?(roc)
(Assignee)

Comment 9

2 years ago
Created attachment 8703989 [details] [diff] [review]
(part 9) - Simplify ReleasePointerCaptureCaller

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+
Attachment #8703981 - Flags: review?(roc) → 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+
Attachment #8703988 - 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+
(Assignee)

Comment 14

2 years ago
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.
(Assignee)

Updated

2 years ago
Blocks: 1232547
No longer depends on: 1232547

Comment 15

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/e50e92020a6e
https://hg.mozilla.org/mozilla-central/rev/85068fa089ec
https://hg.mozilla.org/mozilla-central/rev/0149483be551
https://hg.mozilla.org/mozilla-central/rev/81412f10431d
https://hg.mozilla.org/mozilla-central/rev/ec7f6ab2e853
https://hg.mozilla.org/mozilla-central/rev/36adfe32e277
https://hg.mozilla.org/mozilla-central/rev/da2c4222fb7c
https://hg.mozilla.org/mozilla-central/rev/2a1e282baa42
https://hg.mozilla.org/mozilla-central/rev/046479939ba1
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox46: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Blocks: 1328530
You need to log in before you can comment on or make changes to this bug.