Closed Bug 930288 Opened 6 years ago Closed 6 years ago
Defect - Tab previews appear "zoomed" after using snapped view
If you move the Firefox Metro browser into "Snapped View", all the tab previews will look "zoomed in" even after going back into full view. When the user starts opening more tabs, those will appear correctly but the ones that were opened when the user moved the browser into snapped view will still appear zoomed. Reproduced this on several different machines and attached two screenshots. Steps to reproduce the issue: 1) Open Firefox Metro 2) Open several tabs by going to a few different websites 3) Once you have a few tabs opened, move the firefox metro browser into snapped view and then back into full view 4) Slide in the "Tab App Bar" and you'll notice that the tab previews look "zoomed" 5) Open a few new tabs and you'll notice that they will look correct but the original tabs will still look "zoomed in" Current Behaviour: - Moving the Firefox Metro browser into snapped view and then back into full view will change all of the current tab previews so they appear as "zoomed in" Expected Behaviour: - Moving the Firefox Metro browser between different views shouldn't change the tabs preview appearance Used the following build: http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2013-10-23-03-02-05-mozilla-central/
Whiteboard: feature=defect c=Tabs_app_bar u=metro_firefox_user p=0 → [triage] feature=defect c=Tabs_app_bar u=metro_firefox_user p=0
Whiteboard: [triage] feature=defect c=Tabs_app_bar u=metro_firefox_user p=0 → [release28] feature=defect c=Tabs_app_bar u=metro_firefox_user p=0
We were already updating the thumbnail after a metro_viewstate_changed, but there's a delay between changing the viewstate and the page finishing adjusting. The good old setTimeout fixed it. I'll see if I can find a better way to figure out the page is done adjusting. Will try resize event.
Resize worked much better. Also added a delay to give some sites a little extra time to adjust similar to what we do on load. This works great on sites like http://www.mozilla.org/en-US/about/ which resizes the images after a resize.
Comment on attachment 8339421 [details] [diff] [review] Patch v1 Review of attachment 8339421 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/metro/base/content/browser.js @@ +1324,5 @@ > case "DOMWindowCreated": > case "SizeChanged": > this.updateViewport(); > break; > + case "resize": You should check if (aEvent.target == window), to filter out "resize" events coming from elements inside of content tabs. Or you can listen for the "SizeChanged" event from ContentAreaObserver instead, which is basically a filtered version of the "resize" event.
Attachment #8339421 - Flags: review?(mbrubeck) → review+
Switched to using SizeChanged event. Waiting for open tree.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 28
Mozilla/5.0 (Windows NT 6.2; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0 Verified on latest nightly (build ID: 20131209053402) using the scenario from comment 0 and got the expected results.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.