Closed Bug 890938 Opened 11 years ago Closed 11 years ago

Convert AsyncPanZoomController::ZoomToRect to take a CSSRect instead of a gfxRect

Categories

(Core :: Graphics: Layers, defect)

23 Branch
All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: kats, Assigned: botond)

References

Details

Attachments

(1 file, 2 obsolete files)

This should be a decent first bug for Botond. Pretty straightforward - convert APZC::ZoomToRect to take a CSSRect and update callers and so on. See http://mxr.mozilla.org/mozilla-central/ident?i=ZoomToRect&filter= to quickly find places this is called/used so that the appropriate places can be patched. Note that MXR includes false positives (unrelated ZoomToRect identifiers) so you'll have to be careful. Try to propagate the CSSRect as far as it'll go, which should be to TabChild.cpp.
Assignee: nobody → botond
Attached patch patch (obsolete) — Splinter Review
While waiting for Botond to get his L1 commit access, I pushed this to try since it exercises mostly B2G code paths:

https://tbpl.mozilla.org/?tree=Try&rev=d828c691a073
Attachment #772714 - Flags: review?(bugmail.mozilla)
Comment on attachment 772714 [details] [diff] [review]
patch

Review of attachment 772714 [details] [diff] [review]:
-----------------------------------------------------------------

Noticed a style issue (see below) but that should be easily fixable. Please upload a new patch with the comment below addressed and "r=kats" appended to the commit message. The try run is looking good so far and I don't anticipate any problems so we should be able to flag this bug for checkin once the new patch is up.

::: gfx/layers/ipc/AsyncPanZoomController.cpp
@@ +1272,5 @@
>  void AsyncPanZoomController::DetectScrollableSubframe() {
>    mDelayPanning = true;
>  }
>  
> +void AsyncPanZoomController::ZoomToRect(CSSRect zoomToRect) {

In our coding style, arguments to functions should start with "a", so this should be "aZoomToRect" (or just aRect if you don't want to change the name from before).

::: gfx/layers/ipc/AsyncPanZoomController.h
@@ +136,2 @@
>     */
> +  void ZoomToRect(CSSRect zoomToRect);

Ditto here.
Attachment #772714 - Flags: review?(bugmail.mozilla) → review+
Attached patch updated patch (obsolete) — Splinter Review
Attachment #772714 - Attachment is obsolete: true
Attachment #772895 - Flags: review?
Attachment #772895 - Flags: review? → review?(bugmail.mozilla)
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #3)
> Comment on attachment 772714 [details] [diff] [review]
> patch
> 
> Review of attachment 772714 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Noticed a style issue (see below) but that should be easily fixable. Please
> upload a new patch with the comment below addressed and "r=kats" appended to
> the commit message. The try run is looking good so far and I don't
> anticipate any problems so we should be able to flag this bug for checkin
> once the new patch is up.
> 
> ::: gfx/layers/ipc/AsyncPanZoomController.cpp
> @@ +1272,5 @@
> >  void AsyncPanZoomController::DetectScrollableSubframe() {
> >    mDelayPanning = true;
> >  }
> >  
> > +void AsyncPanZoomController::ZoomToRect(CSSRect zoomToRect) {
> 
> In our coding style, arguments to functions should start with "a", so this
> should be "aZoomToRect" (or just aRect if you don't want to change the name
> from before).
> 
> ::: gfx/layers/ipc/AsyncPanZoomController.h
> @@ +136,2 @@
> >     */
> > +  void ZoomToRect(CSSRect zoomToRect);
> 
> Ditto here.

Done.
Comment on attachment 772895 [details] [diff] [review]
updated patch

Review of attachment 772895 [details] [diff] [review]:
-----------------------------------------------------------------

Perfect, thanks!
Attachment #772895 - Flags: review?(bugmail.mozilla) → review+
Fixed in updated patch.
Attachment #772895 - Attachment is obsolete: true
Attachment #773394 - Flags: review?(bugmail.mozilla)
Attachment #773394 - Flags: review?(bugmail.mozilla) → review+
https://hg.mozilla.org/mozilla-central/rev/2b99aac5ea46
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: