Closed Bug 574123 Opened 10 years ago Closed 10 years ago

Add support for zoom-to-rect for zooming to an element

Categories

(Firefox for Android Graveyard :: General, defect)

x86
Linux
defect
Not set

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: mfinkle, Assigned: mfinkle)

Details

Attachments

(2 files)

e10s broke the ability to double tap to zoom into an element. Easy enough to split it up and add it back.
Attached patch patchSplinter Review
This patch uses messages to send the element bounding rect back to the chrome side, where we use it with the existing zoom code.

* Changed _getZoomRectForElement -> _getZoomRectForRect
* Combined some of the zoom helper code into a single function

This works OK on local pages, but rendering problems make it hard to see zooming work on remote pages. That is a separate bug.

Try it out on about:firstrun to zoom into the middle images, for example.
Assignee: nobody → mark.finkle
Attachment #453828 - Flags: review?(21)
Attachment #453828 - Flags: feedback?(mbrubeck)
Attachment #453828 - Flags: feedback?(mbrubeck) → feedback+
Attachment #453828 - Flags: review?(21) → review?(mbrubeck)
Attachment #453828 - Flags: review?(mbrubeck) → review+
pushed:
http://hg.mozilla.org/mobile-browser/rev/ee4d66c8e5da
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Oops, I missed this during review, but FormHelper._zoom is broken now because it used _getZoomLevelForRect.  Sorry!
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch bustage fixSplinter Review
This patch adds _getZoomLevelForRect back (for FormHelper._zoom) and splits zoomToPoint and zoomFromPoint back into separate functions. I saw Brad wanted to know what happened to the function, so I added it back.
Attachment #453960 - Flags: review?(mbrubeck)
Comment on attachment 453960 [details] [diff] [review]
bustage fix

>   _getZoomRectForRect: function _getZoomRectForRect(rect, y) {
>     const margin = 15;

This is unused now, can be deleted.   r+ with that minor fix.
Attachment #453960 - Flags: review?(mbrubeck) → review+
removed unused const

pushed:
http://hg.mozilla.org/mobile-browser/rev/4e0939e231cd
Status: REOPENED → RESOLVED
Closed: 10 years ago10 years ago
Resolution: --- → FIXED
about:firstrun page is not available any more on the latest Nightly build. How could I verify this issue?
This is fixed if you can double-tap to zoom in to an element on a web page.  The browser should zoom so that the tapped element fits the screen width.
(In reply to Matt Brubeck (:mbrubeck) from comment #8)
> This is fixed if you can double-tap to zoom in to an element on a web page. 
> The browser should zoom so that the tapped element fits the screen width.

Then it seems that this issue is verified fixed on the latest Nightly build.

--
Mozilla/5.0 (Android;Linux armv7l;rv:9.0a1)Gecko/20110921
Firefox/9.0a1 Fennec/9.0a1
Device: Samsung Galaxy S
OS: Android 2.2
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.