Closed
Bug 980493
Opened 10 years ago
Closed 10 years ago
Transition other fields of FrameMetrics to use getters/setters
Categories
(Core :: Panning and Zooming, defect)
Core
Panning and Zooming
Tracking
()
RESOLVED
FIXED
mozilla31
People
(Reporter: botond, Assigned: botond)
Details
Attachments
(5 files, 3 obsolete files)
35.31 KB,
patch
|
kats
:
review+
|
Details | Diff | Splinter Review |
51.10 KB,
patch
|
botond
:
review+
|
Details | Diff | Splinter Review |
2.96 KB,
patch
|
kats
:
review+
lsblakk
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
34.31 KB,
patch
|
botond
:
review+
|
Details | Diff | Splinter Review |
3.04 KB,
patch
|
Details | Diff | Splinter Review |
My immediate motivation for this is to make debugging easier, since you can set a single breakpoint (or add a single print statement) every time a particular field is set. This also maintains flexibility for the longer term (if we later want to do something nontrivial in a getter/setter).
Assignee | ||
Comment 1•10 years ago
|
||
Assignee: nobody → botond
Attachment #8389848 -
Flags: review?(bugmail.mozilla)
Comment 2•10 years ago
|
||
Comment on attachment 8389848 [details] [diff] [review] Transition FrameMetrics::mScrollOffset to use a getter/setter Review of attachment 8389848 [details] [diff] [review]: ----------------------------------------------------------------- Seems pretty mechanical; rubber-stamping.
Attachment #8389848 -
Flags: review?(bugmail.mozilla) → review+
Assignee | ||
Comment 3•10 years ago
|
||
Note that in addition to the mechanical changes, I've added FrameMetrics::ZoomBy(float). The motivation for this was that I thought it unfortunate to have to rewrite the fairly common metrics.mZoom.scale *= someFloat; as metrics.SetZoom(CSSToScreenScale(metrics.GetZoom().scale * someFloat)); Now instead we cam write metrics.ZoomBy(someFloat); Note that the Part 1 patch rewrites metrics.mScrollOffset += somePoint; as metrics.SetScrollOffset(metrics.GetScrollOffset() + somePoint); If you think we should add a ScrollBy() to make this a bit nicer, I can change that.
Attachment #8389891 -
Flags: review?(bugmail.mozilla)
Updated•10 years ago
|
Attachment #8389891 -
Flags: review?(bugmail.mozilla) → review+
Comment 4•10 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #3) > If you think we should add a ScrollBy() to make this a bit nicer, I can > change that. It would be a little nicer but I don't care too much either way - your call.
Assignee | ||
Comment 5•10 years ago
|
||
Updated Part 1 patch to add FrameMetrics::ScrollBy(). Carrying r+. Try push for the two patches together: https://tbpl.mozilla.org/?tree=Try&rev=66d94f15848c
Attachment #8389848 -
Attachment is obsolete: true
Attachment #8389922 -
Flags: review+
Assignee | ||
Comment 6•10 years ago
|
||
Missed some uses of mScrollOffset in android-only code. Updated patch to fix these, carrying r+. ReTrying for android only: https://tbpl.mozilla.org/?tree=Try&rev=5c0f6c8be526
Attachment #8389922 -
Attachment is obsolete: true
Attachment #8389985 -
Flags: review+
Assignee | ||
Comment 7•10 years ago
|
||
landed-on-30 landing |
https://hg.mozilla.org/integration/mozilla-inbound/rev/509090e51f4c https://hg.mozilla.org/integration/mozilla-inbound/rev/27737607943d
Assignee | ||
Comment 8•10 years ago
|
||
Marking 'leave-open' as we will likely want to transition other fields as well.
Keywords: leave-open
Comment 9•10 years ago
|
||
landed-on-30 |
https://hg.mozilla.org/mozilla-central/rev/509090e51f4c https://hg.mozilla.org/mozilla-central/rev/27737607943d
Assignee | ||
Comment 10•10 years ago
|
||
There is no rush for transitioning the other fields, but we should do it at some point. Sounds like a good candidate for a mentored bug, and simple enough to be a first bug.
Whiteboard: [mentor=botond] [lang=c++] [good first bug]
Assignee | ||
Updated•10 years ago
|
Assignee: botond → nobody
Assignee | ||
Comment 11•10 years ago
|
||
I missed the uses of mScrollOffset and mZoom in APZC_LOG calls, which are only compiled when APZC_LOG is defined to do something.
Attachment #8394315 -
Flags: review?(bugmail.mozilla)
Updated•10 years ago
|
Attachment #8394315 -
Flags: review?(bugmail.mozilla) → review+
Comment 12•10 years ago
|
||
Transition FrameMetrics::mScrollId to use a getter/setter
Attachment #8394364 -
Flags: review?(botond)
Assignee | ||
Comment 13•10 years ago
|
||
landed-on-31 landing |
Landed the patch from comment 11: https://hg.mozilla.org/integration/mozilla-inbound/rev/b10649cebf55.
Comment 14•10 years ago
|
||
landed-on-31 |
https://hg.mozilla.org/mozilla-central/rev/b10649cebf55
Assignee | ||
Comment 15•10 years ago
|
||
Comment on attachment 8394364 [details] [diff] [review] This is a patch to transition FrameMetrics::mScrollId to use a getter/setter Review of attachment 8394364 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for this patch! I have one small comment about the parameter type of SetScrollId(). ::: gfx/layers/FrameMetrics.h @@ +371,5 @@ > + { > + return mScrollId; > + } > + > + void SetScrollId(const ViewID scrollId) There is not much point in making a parameter passed by value 'const'. Generally an input parameter should be either a const reference, or a (non-const) value. In this case, since ViewID is just a typdef for an integer type, we might as well just pass it by (non-const) value.
Attachment #8394364 -
Flags: review?(botond) → review+
Assignee | ||
Comment 16•10 years ago
|
||
I pushed your patch, with the suggested change, to the Try server: https://tbpl.mozilla.org/?tree=Try&rev=a14b7403e2e0 Also, let's ask Kats whether we should land this now, or wait until the end of the 31 cycle to avoid annoying people trying to uplift to 30 (including b2g 1.4, which is probably expecting a few APZ-related uplifts).
Flags: needinfo?(bugmail.mozilla)
Comment 17•10 years ago
|
||
I'm fine with landing it now; it'll probably bitrot otherwise.
Flags: needinfo?(bugmail.mozilla)
Comment 18•10 years ago
|
||
This fixes the const parameter mentioned in the review above.
Attachment #8394364 -
Attachment is obsolete: true
Attachment #8394992 -
Flags: review?(botond)
Assignee | ||
Comment 19•10 years ago
|
||
Comment on attachment 8394992 [details] [diff] [review] This is a patch to transition FrameMetrics::mScrollId to use a getter/setter Thanks!
Attachment #8394992 -
Flags: review?(botond) → review+
Assignee | ||
Comment 20•10 years ago
|
||
The Try run is clean. We prefer having full names in the "user" field of a commit - could you fill out your name in your Bugzilla profile (and use it in the "user" field of future patches)? I'll then commit the patch for you. Thanks!
Flags: needinfo?(chaddcw)
Assignee | ||
Comment 21•10 years ago
|
||
landed-on-31 landing |
(In reply to Botond Ballo [:botond] from comment #20) > The Try run is clean. > > We prefer having full names in the "user" field of a commit - could you fill > out your name in your Bugzilla profile (and use it in the "user" field of > future patches)? I'll then commit the patch for you. Thanks! Whoops, my bad, just realized the patch already has a proper "user" field. (It got lost for me when I 'hg import'-ed your patch.) All's good then! Landed: https://hg.mozilla.org/integration/mozilla-inbound/rev/39f409d75550
Flags: needinfo?(chaddcw)
Comment 22•10 years ago
|
||
Excellent. Thanks for all of your help. This is really the perfect [good first bug].
Comment 23•10 years ago
|
||
landed-on-31 |
https://hg.mozilla.org/mozilla-central/rev/39f409d75550
Comment 24•10 years ago
|
||
Actually I saw a lot of activity in comments and I don't know whether this bug is fixed or not ? If not I want to work on this bug I am a newbie and urge proper guidance
Assignee | ||
Comment 25•10 years ago
|
||
(In reply to amanjain110893 from comment #24) > Actually I saw a lot of activity in comments and I don't know whether this > bug is fixed or not ? If not I want to work on this bug > > I am a newbie and urge proper guidance We have been transitioning one field at a time. Three of the fields have been transitioned (mScrollOffset, mZoom, and mScrollId); the rest still need to be transitioned. If you'd like to work on this bug, pick any other field and transition it and post the patch here. Feel free to transition multiple fields, just keep them one per patch. Thanks!
Comment 26•10 years ago
|
||
Hi, Amanjain - Here are some links that will help you get started setting up your development environment: https://wiki.mozilla.org/Mobile/Get_Involved https://developer.mozilla.org/docs/Introduction If you're still interested in pursuing this bug, please do!
Assignee | ||
Comment 27•10 years ago
|
||
Comment on attachment 8394315 [details] [diff] [review] Update uses of mScrollOffset and mZoom in APZC_LOG calls The first two patches in this bug landed in 30, the third one only in 31. As a result, 30 does not compile if APZC_LOG debugging is enabled. Requesting uplift of third patch to fix this. [Approval Request Comment] Bug caused by (feature/regressing bug #): First two patches in this bug. User impact if declined: None. Developer impact is that you get compiler errors if you turn on APZC_LOG debugging. Testing completed (on m-c, etc.): N/A Risk to taking this patch (and alternatives if risky): None. This patch only touches debugging code that has to be explicitly enabled via a code change. String or IDL/UUID changes made by this patch: None
Attachment #8394315 -
Flags: approval-mozilla-aurora?
Updated•10 years ago
|
Attachment #8394315 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 28•10 years ago
|
||
I'm going to close this bug because it's already got patches split across two releases and I don't want it split across a third as well. We should file follow-up bugs for other fields we want converted if needed, after deciding if we want one bug per field or one bug for everything.
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox31:
--- → fixed
Keywords: leave-open
Resolution: --- → FIXED
Whiteboard: [mentor=botond] [lang=c++] [good first bug]
Target Milestone: --- → mozilla31
Comment 29•10 years ago
|
||
Patches need rebasing for Aurora uplift.
Assignee: nobody → botond
status-firefox30:
--- → affected
Flags: needinfo?(botond)
Keywords: branch-patch-needed
Assignee | ||
Comment 30•10 years ago
|
||
Rebased to aurora. Note that this is the only patch that needs to be uplifted.
Flags: needinfo?(botond)
Assignee | ||
Updated•10 years ago
|
Keywords: branch-patch-needed
Comment 31•10 years ago
|
||
Comment 14 was post-uplift, no? Is that going to be 31-only?
Flags: needinfo?(botond)
Assignee | ||
Comment 32•10 years ago
|
||
(In reply to Ryan VanderMeulen [:RyanVM UTC-4] from comment #31) > Comment 14 was post-uplift, no? Is that going to be 31-only? Comment 14 is the one I rebased and am asking to have uplifted Comment 23 can be 31-only. (In general the patches in this bug aren't high-priority and don't need uplifting. The only reason to uplift the comment 14 patch is that it fixes compiler errors in patches that landed in 30.)
Flags: needinfo?(botond)
Assignee | ||
Comment 33•10 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #28) > I'm going to close this bug because it's already got patches split across > two releases and I don't want it split across a third as well. We should > file follow-up bugs for other fields we want converted if needed, after > deciding if we want one bug per field or one bug for everything. I prefer to do one bug per train, as doing one bug per field is tedious while doing one bug for everything is unfriendly to contributors (because it requires them writing a giant patch, or else rebase other people's older patches). Filed bug 1001582 for 32.
You need to log in
before you can comment on or make changes to this bug.
Description
•