Closed Bug 945277 Opened 11 years ago Closed 11 years ago

Align calculated display-ports to tile boundaries on sub-frames

Categories

(Core :: Panning and Zooming, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: cwiiis, Assigned: cwiiis)

References

Details

Attachments

(1 file, 1 obsolete file)

So, looks like I forgot to change UpdateSubFrame in bug 907743, so the change only applied for the root frame and not for sub-frames (which is good enough for the b2g browser, but significantly less useful when APZC is used outside of that use-case).

Patch incoming.
I realise that it would be a smaller delta to take a const FrameMetrics into the function, but I thought it'd be good for it to operate in the same way as the root version, and that we may end up needing it to update the FrameMetrics at some point. Feel free to disagree though and I'll change it :)
Attachment #8341139 - Flags: review?(botond)
Comment on attachment 8341139 [details] [diff] [review]
Align sub-frame display ports to tile boundaries

Actually, ignore this for now, the results aren't correct - think I'm making a bad assumption about the scaling...
Attachment #8341139 - Flags: review?(botond)
Here's the correct patch. It fixes two bugs in the MaybeAlignAndClampToDisplayPort function:

1- It used mZoom instead of LayersPixelsPerCSSPixel() (which didn't matter on the root frame)
2- It used ClampRect instead of Intersect (which meant the display-port wouldn't be tile-aligned at the very top and near-bottom of the document)

Although the Settings app has some bad behaviour (some of which is the fault of the platform, some of which I think is Gaia's fault), it does what I expect now, and the Contacts app shows pretty decent behaviour.
Attachment #8341139 - Attachment is obsolete: true
Attachment #8341715 - Flags: review?(botond)
Blocks: 915673
Comment on attachment 8341715 [details] [diff] [review]
Align sub-frame display ports to tile boundaries (v2)

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

Looks good!
Attachment #8341715 - Flags: review?(botond) → review+
https://hg.mozilla.org/mozilla-central/rev/0ae343996d36
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: