Closed
Bug 599132
Opened 15 years ago
Closed 15 years ago
Clean up updateViewportSize
Categories
(Firefox for Android Graveyard :: General, defect)
Firefox for Android Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mbrubeck, Assigned: mbrubeck)
References
Details
Attachments
(1 file)
|
5.24 KB,
patch
|
stechz
:
review+
|
Details | Diff | Splinter Review |
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
(preserveViewport(ratio)?)
* 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).
| Assignee | ||
Comment 1•15 years ago
|
||
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 2•15 years ago
|
||
Comment on attachment 481912 [details] [diff] [review]
patch
Thanks for the refactor.
Attachment #481912 -
Flags: review?(webapps) → review+
| Assignee | ||
Comment 3•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Flags: in-testsuite?
You need to log in
before you can comment on or make changes to this bug.
Description
•