Closed Bug 583828 Opened 9 years ago Closed 9 years ago

Wrong zoom level calculation in _getZoomRectForRect

Categories

(Firefox for Android Graveyard :: Panning/Zooming, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mbrubeck, Assigned: mbrubeck)

Details

Attachments

(1 file, 2 obsolete files)

Attached patch patch (obsolete) — Splinter Review
The old version of this code (_getZoomLevelForElement) called browserToViewportRect on the element's bounding rect, so it needed to multiply vis.width by bv.getZoomLevel() too.

The new code no longer calls browserToViewportRect, so it should no longer apply the getZoomLevel factor.
Attachment #462141 - Flags: review?(webapps)
Attached patch patch (obsolete) — Splinter Review
Also clean up some nearby whitespace.
Assignee: nobody → mbrubeck
Attachment #462141 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #462142 - Flags: review?(webapps)
Attachment #462141 - Flags: review?(webapps)
There are several places where getZoomLevelForRect are called:
http://mxr.mozilla.org/mobile-browser/search?string=getZoomLevelForRect

It looks like FormHelper still seems to do things in viewport coordinates?
Attached patch patch v2Splinter Review
(In reply to comment #2)
> There are several places where getZoomLevelForRect are called:
> http://mxr.mozilla.org/mobile-browser/search?string=getZoomLevelForRect
> 
> It looks like FormHelper still seems to do things in viewport coordinates?

Good catch.  Fixed.
Attachment #462142 - Attachment is obsolete: true
Attachment #462167 - Flags: review?(webapps)
Attachment #462142 - Flags: review?(webapps)
Attachment #462167 - Flags: review?(webapps) → review+
http://hg.mozilla.org/mobile-browser/rev/7b7e45d2918d
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.