9 years ago
9 years ago


(Reporter: mbrubeck, Assigned: mbrubeck)


Dependency tree / graph
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)



(1 attachment)

Followup to bug 597230 to address Stover's concerns:

* Does this really belong in updateViewportSize? It's convenient because it's
always called on a resize, but it does an orthogonal task which is flagged by
whether aRatio is passed in. Smells like a separate function to me
* Preserving the viewport may still be useful in autosize layout, but I'm not
sure. Also, there is a case where not-autosize layout does change (when
kDefaultBrowserWidth is not used).
Posted patch patchSplinter Review
This patch moves the code into a new "restoreViewportPosition" function.  It also adds a check to call the function only if the layout hasn't changed.  (If the viewport size changes, then we don't have a reliable way to keep the same content visible... but maybe we can find some compromize solution for that case.)

Includes some minor cleanup to related code (changing code order and variable names) and fixes a strict-mode warning about window.cachedWidth.

All tests are green with this patch.  It shouldn't change behavior except in the somewhat rare case that a non-autoSize page changes its viewport width on orientation change.
Attachment #481912 - Flags: review?(webapps)
Comment on attachment 481912 [details] [diff] [review]

Thanks for the refactor.
Attachment #481912 - Flags: review?(webapps) → review+
Closed: 9 years ago
Resolution: --- → FIXED
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.