Closed Bug 909731 Opened 11 years ago Closed 11 years ago

Disable zoom on start tab

Categories

(Firefox for Metro Graveyard :: Pan and Zoom, defect)

x86_64
Windows 8.1
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 28

People

(Reporter: jimm, Assigned: rsilveira)

References

Details

(Whiteboard: [block28])

Attachments

(1 file)

Currently you can zoom the start tab. We need to find a way to disable zoom on certain content pages.
One way to do this is to get <meta name="viewport"> working in Metro (bug 801186) and then add <meta name="viewport" content="user-scalable=no"> to about:start and any other pages that shouldn't zoom.
Depends on: 801186
Assignee: nobody → jmathies
this isn't as critical as some others, think it can wait.
Assignee: jmathies → nobody
I dont understand why we would want to go out of our way to prevent zoom on about:start? It should be treated like any other web page IMO, and if I have trouble reading or tapping on the exact target I need for whatever reason, I should be able to zoom and pan to mitigate that.
Blocks: 915724
No longer blocks: metro-apzc
I move to WONTFIX this. I think zooming would be useful today. At worst you get large tiles and have to pan around, at best we improve accessibility and usability for high-res/high-density displays. Also, in the future we want to look at semantic zooming which requires normal zooming to work first. Yuan, Asa what's the thinking behind preventing zoom in the start page?
Flags: needinfo?(asa)
This is tricky.  Firefox Start is sort of half way between chrome and content.  We don't allow zooming in the Firefox app bar's auto-complete pop-up which is very similar. (note: we do allow selection in the auto-complete results but it doesn't trigger a contextual app bar so it's probably not behaving as we'd like.) 

I'm also in favor of doing smart things with zoom on Firefox Start (semantic zooming, zoom to tile group, etc.) but right now we don't do anything smart and so zoom feels kind of broken.  I lean towards disabling it until we make it smarter. 

Yuan, what do you think?
Flags: needinfo?(asa) → needinfo?(yuan)
I agree with Asa.
Eventually I hope the start page will have semantic zoom built in. Currently it does feel kind of broken. I think it's wise to disable zoom for now.
Flags: needinfo?(yuan)
Whiteboard: [block28]
Note that if you want to implement this without implementing meta-viewport it should be possible to do. Once I re-fix bug 937688 you just need to call APZCTreeManager::UpdateZoomConstraints with the right arguments to disable zooming on the about:start page. Implementing meta viewport would let you do this in a generic way but you could hard-code it for about:start.
I'll work on the temporary solution without meta-viewport.
Assignee: nobody → rsilveira
Attached patch Patch v1 (deleted) — Splinter Review
Calling UpdateZoomConstraints on first paint to make sure viewId is set. 

Whenever I open the console and go back to start screen it enables zooming again, hence the ToolPanelHidden processing. Both presShell and view ID are the same though, not sure why it loses the zoom constraints setting.
Attachment #8337171 - Flags: review?(mbrubeck)
Would you mind updating those message strings to match the other apzc messages?
Comment on attachment 8337171 [details] [diff] [review]
Patch v1

Review of attachment 8337171 [details] [diff] [review]:
-----------------------------------------------------------------

r=mbrubeck with jimm's requested change

::: browser/metro/base/content/startui/StartUI.js
@@ +110,5 @@
>          aEvent.preventDefault();
>          aEvent.stopPropagation();
>          break;
> +      case "ToolPanelHidden":
> +        // After opening panel UI (console) set disableZoom again.

Weird -- do you know why this was necessary?  (Mostly I'm curious if we need to deal with the same thing elsewhere in our code.)
Attachment #8337171 - Flags: review?(mbrubeck) → review+
No longer blocks: 915724
Blocks: metro-apzc
Status: NEW → ASSIGNED
(In reply to Matt Brubeck (:mbrubeck) from comment #11)
> Comment on attachment 8337171 [details] [diff] [review]
> Patch v1
> 
> Review of attachment 8337171 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> r=mbrubeck with jimm's requested change
> 
> ::: browser/metro/base/content/startui/StartUI.js
> @@ +110,5 @@
> >          aEvent.preventDefault();
> >          aEvent.stopPropagation();
> >          break;
> > +      case "ToolPanelHidden":
> > +        // After opening panel UI (console) set disableZoom again.
> 
> Weird -- do you know why this was necessary?  (Mostly I'm curious if we need
> to deal with the same thing elsewhere in our code.)

The apzc where the zoom constraints is set is being destroyed when the console's panel completely obstructs it. When the console is hidden, it gets re-generated with the default zoom constraints.

This feels hacky, but I guess we can live with it for the temporary solution. I couldn't find any other instances where zoom is brought back, but it wouldn't surprise me if there are more ways to break this :)
Updated message names. Also added a try/catch around getting the viewId - it was throwing and causing test failures on tests that were too quick.

https://hg.mozilla.org/integration/fx-team/rev/33e652387cd5
https://hg.mozilla.org/mozilla-central/rev/33e652387cd5
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 28
OS: Windows 8 Metro → Windows 8.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: