Closed
Bug 621888
Opened 14 years ago
Closed 14 years ago
Fennec zoom to the wrong area when the search result is at the bottom of the page
Categories
(Firefox for Android Graveyard :: Panning/Zooming, defect)
Firefox for Android Graveyard
Panning/Zooming
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: vingtetun, Assigned: vingtetun)
References
Details
Attachments
(2 files)
16.13 KB,
patch
|
mbrubeck
:
review+
|
Details | Diff | Splinter Review |
5.02 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
Because most of the zoom calculation is done using browser.getBoundingClientRect().height, zooming to an element using the form helper or the find helper could result into zooming to the wrong area.
Steps to reproduce:
* go to http://www.google.com (non-mobile version)
* go to the site menu and click on "Find in page"
* in the search textbox type "back"
Actual result:
* The UI try to zoom near the bottom of the page but fail
Expected result:
* The UI zoom and show the "Change Background Image" link at the bottom left corner of the page.
Attachment #500191 -
Flags: review?(mbrubeck)
Attachment #500191 -
Flags: review?(mark.finkle)
Comment 1•14 years ago
|
||
Comment on attachment 500191 [details] [diff] [review]
Patch
Looks good to me.
Attachment #500191 -
Flags: review?(mbrubeck) → review+
Assignee | ||
Comment 2•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•14 years ago
|
Attachment #500191 -
Flags: review?(mark.finkle)
Assignee | ||
Updated•14 years ago
|
Attachment #500218 -
Flags: review?(mark.finkle)
Comment 4•14 years ago
|
||
Comment on attachment 500218 [details] [diff] [review]
Patch
>diff --git a/chrome/content/browser.js b/chrome/content/browser.js
>- update: function va_update(aIsVKB) {
>- Browser.styles["viewable-height"].height = (this.height - Elements.contentNavigator.getBoundingClientRect().height) + "px";
>- Browser.styles["viewable-width"].width = this.width + "px";
>+ update: function va_update() {
>+ let oldHeight = parseInt(Browser.styles["viewable-height"].height);
>+ let newHeight = this.height - Elements.contentNavigator.getBoundingClientRect().height;
>+ if (newHeight != oldHeight) {
>+ Browser.styles["viewable-height"].height = (this.height - Elements.contentNavigator.getBoundingClientRect().height) + "px";
just use newHeight, so we can avoid anther call to getBoundingClientRect:
>+ Browser.styles["viewable-height"].height = newHeight + "px";
r+ with that change
Attachment #500218 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 5•14 years ago
|
||
Assignee | ||
Comment 6•14 years ago
|
||
Shame! I've forgot to rename a this->self...
http://hg.mozilla.org/mobile-browser/rev/6e20491a80f5
Comment 7•14 years ago
|
||
verified FIXED on build:
Mozilla/5.0 (Android; Linux armv71; rv:2.0b9pre) Gecko/20101230 Namoroka/4.0b9pre Fennec/4.0b4pre
Status: RESOLVED → VERIFIED
Updated•14 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•