PageActionLayout cleanup

RESOLVED FIXED in Firefox 33

Status

()

Firefox for Android
General
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: bnicholson, Assigned: bnicholson)

Tracking

(Blocks: 1 bug)

Trunk
Firefox 33
All
Android
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Comment hidden (empty)
(Assignee)

Comment 1

4 years ago
Created attachment 8442550 [details] [diff] [review]
PageActionLayout cleanup

Lots of miscellaneous style/formatting nits.
Attachment #8442550 - Flags: review?(wjohnston)
(Assignee)

Updated

4 years ago
Blocks: 1011712
Comment on attachment 8442550 [details] [diff] [review]
PageActionLayout cleanup

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

::: mobile/android/base/toolbar/PageActionLayout.java
@@ +37,5 @@
>      private static final int DEFAULT_PAGE_ACTIONS_SHOWN = 2;
>  
> +    private final Context mContext;
> +    private final LinearLayout mLayout;
> +    private final ArrayList<PageAction> mPageActionList;

Make this a List.

@@ +134,5 @@
>          });
>      }
>  
>      private void removePageAction(String id) {
> +        for (int i = 0; i < mPageActionList.size(); i++) {

Flip this to an iterator.

@@ +193,5 @@
>  
>      private void refreshPageActionIcons() {
>          final Resources resources = mContext.getResources();
> +        for (int index = 0; index < this.getChildCount(); index++) {
> +            final ImageButton v = (ImageButton) this.getChildAt(index);

And flip this to use i instead of index.
Attachment #8442550 - Flags: review?(wjohnston) → review+
sorry had to backout this change in https://tbpl.mozilla.org/?tree=Fx-Team&rev=7e6ee365e01c since the first push caused a test failure like:

https://tbpl.mozilla.org/php/getParsedLog.php?id=43805525&tree=Fx-Team
(Assignee)

Comment 5

4 years ago
Failures were from bug 1027135, which should be fixed.

https://hg.mozilla.org/integration/fx-team/rev/6b76b46afe7a
https://hg.mozilla.org/mozilla-central/rev/6b76b46afe7a
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 33
You need to log in before you can comment on or make changes to this bug.