Closed Bug 930288 Opened 6 years ago Closed 6 years ago

Defect - Tab previews appear "zoomed" after using snapped view

Categories

(Firefox for Metro Graveyard :: App Bar, defect, P2)

x86_64
Windows 8.1
defect

Tracking

(Not tracked)

VERIFIED FIXED
Firefox 28

People

(Reporter: kjozwiak, Assigned: rsilveira)

References

Details

(Whiteboard: [block28] feature=defect c=Tabs_app_bar u=metro_firefox_user p=1)

Attachments

(3 files, 2 obsolete files)

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
Assignee: nobody → rsilveira
Assignee: rsilveira → nobody
Assignee: nobody → rsilveira
Blocks: metrov1it20
No longer blocks: metrov1backlog
Status: NEW → ASSIGNED
Priority: -- → P2
QA Contact: jbecerra
Whiteboard: [release28] feature=defect c=Tabs_app_bar u=metro_firefox_user p=0 → [block28] feature=defect c=Tabs_app_bar u=metro_firefox_user p=1
Attached patch 930288.patch (obsolete) — Splinter Review
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.
Attached patch Patch v1 (obsolete) — Splinter Review
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.
Attachment #8339400 - Attachment is obsolete: true
Attachment #8339421 - Flags: review?(mbrubeck)
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+
Attached patch Patch v2Splinter Review
Switched to using SizeChanged event. Waiting for open tree.
Attachment #8339421 - Attachment is obsolete: true
Attachment #8341281 - Flags: review+
Attachment #8341281 - Flags: checkin+
https://hg.mozilla.org/mozilla-central/rev/63f2a21f15fa
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
Depends on: 972974
OS: Windows 8 Metro → Windows 8.1
You need to log in before you can comment on or make changes to this bug.