Closed Bug 1026955 Opened 10 years ago Closed 10 years ago

Resize and center headers according to Gecko's logic

Categories

(Firefox OS Graveyard :: Gaia::System, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(b2g-v1.4 unaffected, b2g-v2.0 fixed, b2g-v2.1 fixed)

RESOLVED FIXED
2.0 S6 (18july)
Tracking Status
b2g-v1.4 --- unaffected
b2g-v2.0 --- fixed
b2g-v2.1 --- fixed

People

(Reporter: gmarty, Assigned: gmarty)

References

Details

(Whiteboard: [systemsfe][p=3])

Attachments

(1 file)

(deleted), text/x-github-pull-request
vingtetun
: review+
Details
There is a subtle edge case in the header resizing/centering. When we compute the text width and the available space, we find that some text can fit, but Gecko think it won't and apply the ellipsis. e.g. Text as measured by the canvas method: 219 pixels Available container space: 220 px Gecko adds ellipsis See https://bugzilla.mozilla.org/show_bug.cgi?id=908300#c99
Blocks: 908300
Attached file Github PR (deleted) —
The solution involves subtracting 2 pixels from the container width to cope with Gecko's logic. It's probably safe to merge as it's a trivial patch.
Assignee: nobody → gmarty
It turns out there is no reliable way to check for text overflow. I updated the test suite to add general overflow checking but this particular edge case can't be tested.
Comment on attachment 8441960 [details] Github PR Vivien, can you have a look at this change? The change itself is just a one liner but I edited the unit tests.
Attachment #8441960 - Flags: review?(21)
Comment on attachment 8441960 [details] Github PR r+ with nits fixed.
Attachment #8441960 - Flags: review?(21) → review+
Guillaume, are we ready to land?
Flags: needinfo?(gmarty)
Can we also land this on 2.0? I suspect this patch to fix many of the truncations discovered during LocRun2.0 (like bug 1035516 for instance)
(In reply to Théo Chevalier [:tchevalier] from comment #6) > Can we also land this on 2.0? I suspect this patch to fix many of the > truncations discovered during LocRun2.0 (like bug 1035516 for instance) Makes sense. Let's ask for uplift approval once this lands on master.
Whiteboard: [systemsfe][p=3]
Target Milestone: --- → 2.0 S6 (18july)
It's now merged on the master: https://github.com/mozilla-b2g/gaia/commit/744921dddb4eac5d94503e6a4f14dc074af2b3c8 What's the usual procedure for uplifting? Should I leave this bug as NEW?
Flags: needinfo?(gmarty)
(In reply to gmarty from comment #8) > It's now merged on the master: > https://github.com/mozilla-b2g/gaia/commit/ > 744921dddb4eac5d94503e6a4f14dc074af2b3c8 > > What's the usual procedure for uplifting? Should I leave this bug as NEW? You can close it as RESOLVED FIXED and ask for approval‑gaia‑v2.0 in attachment details. (More info https://wiki.mozilla.org/Release_Management/B2G_Landing#v2.0.0 )
Just flashed Flame with this patch, I can confirm bug 1035516 is now fixed. Should be safe to uplift on 2.0
gmarty, please ask for uplift approval. Thanks!
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment on attachment 8441960 [details] Github PR Not sure who to request it from, but there you go.
Attachment #8441960 - Flags: approval-gaia-v2.0?
(In reply to gmarty from comment #12) > Comment on attachment 8441960 [details] > Github PR > > Not sure who to request it from, but there you go. Can you please help fill in the approval request form that pop's up when you request approval ? NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings. [Approval Request Comment] [Bug caused by] (feature/regressing bug #): [User impact] if declined: [Testing completed]: [Risk to taking this patch] (and alternatives if risky): [String changes made]:
Comment on attachment 8441960 [details] Github PR Hi Bhavana. How about this? [Approval Request Comment] [Bug caused by] Headers visual refresh [User impact] if declined: some headers may not look good on some edge case [Testing completed]: [Risk to taking this patch] very low risk, polish change
Attachment #8441960 - Flags: approval-gaia-v2.0? → approval-gaia-v2.0?(bbajaj)
Attachment #8441960 - Flags: approval-gaia-v2.0?(bbajaj) → approval-gaia-v2.0+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: