The default bug view has changed. See this FAQ.

Custom menu is a tad slower to expand on initial invoke in Jellybean (Android 4.1)

VERIFIED FIXED in Firefox 15

Status

()

Firefox for Android
General
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: aaronmt, Unassigned)

Tracking

17 Branch
Firefox 17
ARM
Android
Points:
---

Firefox Tracking Flags

(firefox15+ fixed, firefox16+ verified, firefox17+ verified)

Details

(Whiteboard: [jellybean])

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Load up a new profile of Fennec on Jellybean 4.1.x and open the custom menu - in comparison to ICS it 'inflates' a tad slower the first time. 

Tested via:

--
Nightly (07/18)
Galaxy Nexus (Android 4.1.1)
(Reporter)

Updated

5 years ago
status-firefox15: --- → affected
status-firefox16: --- → affected
status-firefox17: --- → affected
Whiteboard: [jellybean]
Created attachment 645548 [details] [diff] [review]
Patch

The problem was depending on child's height -- which is 0 until it is shown for the first time -- which caused the problem.
Hence the ScrollView measured a 0, and then the actual height -- showing the flickering.
Instead, this does an AT_MOST call on preferred height of 75% of screen height. This fixes the problem.
Attachment #645548 - Flags: review?(mbrubeck)
Duplicate of this bug: 767668

Comment 3

5 years ago
Moving the tracking flags over from bug 767668.
tracking-firefox15: --- → +
tracking-firefox16: --- → +
tracking-firefox17: --- → +
Comment on attachment 645548 [details] [diff] [review]
Patch

Nice!

>         protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
>+            super.onMeasure(widthMeasureSpec, heightMeasureSpec);
> 
>             DisplayMetrics metrics = new DisplayMetrics();
>             ((Activity) GeckoApp.mAppContext).getWindowManager().getDefaultDisplay().getMetrics(metrics);
> 
>             // heightPixels changes during rotation.
>+            int restrictedHeightSpec = MeasureSpec.makeMeasureSpec((int) (0.75 * metrics.heightPixels), MeasureSpec.AT_MOST);
> 
>             super.onMeasure(widthMeasureSpec, restrictedHeightSpec);
>         }

We're calling super.onMeasure twice now.  Is the first call still useful, or should it be removed?
Attachment #645548 - Flags: review?(mbrubeck) → review+
The first call is still useful. I still removing it and it failed.
So (from my understanding), the first call makes the size to be 100% of its children (which may fill the entire screen). The second call restricts the height to 75%.
We do super.onMeasure() which takes care of setMeasuredDimension().
http://hg.mozilla.org/integration/mozilla-inbound/rev/9f8f2b6e2f8b
Comment on attachment 645548 [details] [diff] [review]
Patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): -
User impact if declined: The menu will take time to show in JB. HTC will have visual glitches.
Testing completed (on m-c, etc.): Landed in m-i on 07/24
Risk to taking this patch (and alternatives if risky): None.
String or UUID changes made by this patch: None.
Attachment #645548 - Flags: approval-mozilla-beta?
Attachment #645548 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/9f8f2b6e2f8b
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 17
Comment on attachment 645548 [details] [diff] [review]
Patch

no risk, mobile only - approving.
Attachment #645548 - Flags: approval-mozilla-beta?
Attachment #645548 - Flags: approval-mozilla-beta+
Attachment #645548 - Flags: approval-mozilla-aurora?
Attachment #645548 - Flags: approval-mozilla-aurora+

Updated

5 years ago
status-firefox17: affected → fixed
Pushed to aurora:
https://hg.mozilla.org/releases/mozilla-aurora/rev/540cd72d8445
Pushed to beta:
https://hg.mozilla.org/releases/mozilla-beta/rev/686479fc0e26

Updated

5 years ago
status-firefox15: affected → fixed
status-firefox16: affected → fixed
(Reporter)

Updated

5 years ago
Status: RESOLVED → VERIFIED
status-firefox16: fixed → verified
status-firefox17: fixed → verified

Comment 12

5 years ago
I am still seeing bug 767668 (duplicate of this bug) in Beta. Did the beta update of 7/27 include Sriram's fixes?
(In reply to Daniel Asarnow from comment #12)
> I am still seeing bug 767668 (duplicate of this bug) in Beta. Did the beta
> update of 7/27 include Sriram's fixes?

No, it didn't.  This fix will be included in the next beta update (probably later this week).
You need to log in before you can comment on or make changes to this bug.