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

VERIFIED FIXED in Firefox 31

Status

()

defect
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: mcomella, Assigned: mcomella)

Tracking

unspecified
Firefox 31
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(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: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 31

Comment 4

5 years ago
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
You need to log in before you can comment on or make changes to this bug.