Closed Bug 998426 Opened 10 years ago Closed 10 years ago

Use same constructor across API levels in shrunken BrowserToolbar's LayoutParams

Categories

(Firefox for Android Graveyard :: Awesomescreen, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
Firefox 31

People

(Reporter: mcomella, Assigned: mcomella)

References

Details

Attachments

(1 file)

(In reply to Michael Comella (:mcomella) from bug 965548 comment 114)
> Thus, for correctness, it should be ViewGroup.MarginLayoutParam.

I looked through the Android source to make sure this a reasonable assertion. It looks like more values, specific to `RelativeLayout.LayoutParams` are copied using the RelativeLayout.LayoutParams constructor, making it a comprehensive copy constructor [1]. The `ViewGroup.MarginLayoutParams` constructor only copies the size and the margins [2], which is actually all we need here (for now).

To ensure we get consistent behavior across platfoms, I made a patch to make the cast to `ViewGroup.MarginLayoutParams`.

Nice catch, Wes.

[1]: http://androidxref.com/4.4.2_r2/xref/frameworks/base/core/java/android/widget/RelativeLayout.java#1343
[2]: http://androidxref.com/4.4.2_r2/xref/frameworks/base/core/java/android/view/ViewGroup.java#6193
Attachment #8409076 - Flags: review?(wjohnston) → review+
https://hg.mozilla.org/mozilla-central/rev/fa5e77def52e
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 31
I was experiencing an issue when trying to start fennec: fennec was stalling to a blank(white) screen, and got the following errors in logcat: http://pastebin.mozilla.org/4903483. After updating to the latest sources the issue does not reproduce anymore. Verified this issue as fixed on Alcatel One Touch 8008D(Android 4.1.2), after updating to the latest sources, and building fennec.
Status: RESOLVED → VERIFIED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.