Closed Bug 1143902 Opened 10 years ago Closed 10 years ago

[Browser] Private Window header briefly displays as untranslated when launching it

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g-v2.2 affected, b2g-v2.5 verified, b2g-master verified)

VERIFIED FIXED
Tracking Status
b2g-v2.2 --- affected
b2g-v2.5 --- verified
b2g-master --- verified

People

(Reporter: pcheng, Assigned: zbraniecki)

References

Details

(Whiteboard: [3.0-Daily-Testing])

Attachments

(3 files)

Attached file logcat of issue
Description: Issue is observed in Accented English and French. When launching private window, on the URL bar the exact untranslated phrase "Private Window" is briefly displayed when in another language. STR: 0) In a non-English supported language 1) Go to Browser 2) Tap on Private Window button and observe the following screen Expected: English is not observed Actual: English is observed for a brief second. See video: https://www.youtube.com/watch?v=8HLgLdVQnbk Also attaching a logcat. Repro rate: 5/5. Device: Flame 3.0 Master (full flash 319MB KK) BuildID: 20150316010202 Gaia: 4868c56c0a3b7a1e51d55b24457e44a7709ea1ae Gecko: 436686833af0 Gonk: b83fc73de7b64594cd74b33e498bf08332b5d87b Version: 39.0a1 (3.0 Master) Firmware Version: v18D-1 User Agent: Mozilla/5.0 (Mobile; rv:39.0) Gecko/39.0 Firefox/39.0
This issue is also observed on 2.2. Device: Flame 2.2 BuildID: 20150316002502 Gaia: a6b2d3f8478ec250beb49950fecbb8a16465ff6f Gecko: 18619f8f6c5c Gonk: b83fc73de7b64594cd74b33e498bf08332b5d87b Version: 37.0 (2.2) Firmware Version: v18D-1 User Agent: Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37.0
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
Whiteboard: [3.0-Daily-Testing]
I have seen this in other areas as well. Delphine, can you take a look at this?
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker)
Ni on Gandalf to see if he can help out - I've seen this as well, IIRC
Flags: needinfo?(gandalf)
It's gonna be an interesting one to fix... The cause of the problem is that main process rocketbar picks the window title and puts it in the URL bar. This happens before firstPaint of the new window and before the l10n.js happens - so it basically takes the pretranslated <title> element of the apps/system/private-browser.html. During window loading, l10n.js activates and translates <title/>, then rocketbar picks the new title and updates the URL bar. The best solution, imho, would be to delay rocketbar from picking the title until window.load. That would allow JS init code of any app to set the title and I think that there's little reason for rockerbar to show the title before the window is ready. Alternatively, we could achieve the same by ignoring <title/> element during build time pretranslation and keep it empty and only translate it at runtime. But that would be specialcasing in l10n.js, so I'd prefer to avoid that. Kevin, would you be ok with the former approach?
Flags: needinfo?(gandalf) → needinfo?(kgrandon)
Thanks for looking into this. I am a bit worried about the onload solution because it could slow down title population for typical websites. I believe this could impact the users perceived performance. It's an option we can investigate, but I'd want to profile the impact with websites, and get UX feedback before landing. For this private browsing landing page I have been thinking about removing the HTML file and just using static content in the system app. I think that's probably a bit too much work for 2.2 at this point, but maybe that could be the better long term solution. I think my preference in this case would actually be the l10n.js buildtime special casing. I imagine we want to fix this for 2.2, and that seems like the least risky approach. Zibi - does that sound ok to you?
Flags: needinfo?(kgrandon) → needinfo?(gandalf)
Blocks: 1143007
One other option would be to just set the <title/> from JS instead of HTML. Would that work for you Kevin?
Flags: needinfo?(gandalf)
(In reply to Zibi Braniecki [:gandalf][:zibi] from comment #6) > One other option would be to just set the <title/> from JS instead of HTML. > Would that work for you Kevin? Yeah, that's a fairly simple option that would work for me as well. We do need to make sure that the app chrome code is happy with that though, maybe it will default the title to a URL which could result in flashing? We'd need to test it out I think.
Though I guess that would be the same as not populating it in the build system?
We can have an empty <title> in HTML and populate it from JS.
Assignee: nobody → gandalf
Status: NEW → ASSIGNED
Attachment #8582039 - Flags: review?(kgrandon)
Comment on attachment 8582039 [details] [review] [gaia] zbraniecki:1143902-populate-private-window-title-from-js > mozilla-b2g:master lgtm.
Attachment #8582039 - Flags: review?(kgrandon) → review+
Component: Gaia::Browser → Gaia::System::Browser Chrome
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
This bug has been verified as "pass" on the latest build of Flame 2.5&master and Aries KK 2.5&master by the STR in comment 0. Actual results: After selecting the Private Window button from menu options, the Private Window header displays as translated normally. See attachment: verified_Aries_master.3gp Reproduce rate: 0/10 Device: Flame KK master_512mb eng (Pass) Build ID 20151208150206 Gaia Revision 6b430ea7274af4c352de16b75e6bb85d7621ca83 Gaia Date 2015-12-08 06:31:07 Gecko Revision https://hg.mozilla.org/mozilla-central/rev/a8965ae93c5d098a4f91ad9da72150bb43df07a7 Gecko Version 45.0a1 Device Name flame Firmware(Release) 4.4.2 Firmware(Incremental) eng.cltbld.20151208.183034 Firmware Date Tue Dec 8 18:30:47 EST 2015 Firmware Version v18D v4 Bootloader L1TC000118D0 Device: Aries KK master eng (Pass) Build ID 20151208222037 Gaia Revision 6b430ea7274af4c352de16b75e6bb85d7621ca83 Gaia Date 2015-12-08 06:31:07 Gecko Revision https://hg.mozilla.org/mozilla-central/rev/a8965ae93c5d098a4f91ad9da72150bb43df07a7 Gecko Version 45.0a1 Device Name aries Firmware(Release) 4.4.2 Firmware(Incremental) eng.worker.20151208.213715 Firmware Date Tue Dec 8 21:37:23 UTC 2015 Bootloader s1 Device: Flame KK 2.5_512mb user (Pass) Build ID 20151208120554 Gaia Revision 2d54c29f429bed790b5d8284633812dc2b782518 Gaia Date 2015-12-02 14:41:15 Gecko Revision http://hg.mozilla.org/releases/mozilla-b2g44_v2_5/rev/ff31a251b2f6149edf4fc0a199133ef2e190ceac Gecko Version 44.0a2 Device Name flame Firmware(Release) 4.4.2 Firmware(Incremental) eng.worker.20151208.111719 Firmware Date Tue Dec 8 11:17:29 UTC 2015 Firmware Version v18D v4 Bootloader L1TC000118D0 Device: Aries KK 2.5 dogfood (Pass) Build ID 20151208121136 Gaia Revision 2d54c29f429bed790b5d8284633812dc2b782518 Gaia Date 2015-12-02 14:41:15 Gecko Revision http://hg.mozilla.org/releases/mozilla-b2g44_v2_5/rev/ff31a251b2f6149edf4fc0a199133ef2e190ceac Gecko Version 44.0a2 Device Name aries Firmware(Release) 4.4.2 Firmware(Incremental) eng.worker.20151208.111803 Firmware Date Tue Dec 8 11:18:12 UTC 2015 Bootloader s1
Status: RESOLVED → VERIFIED
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage+][MGSEI-Triage+]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: