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

RESOLVED FIXED in mozilla28

Status

()

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: cwiiis, Assigned: cwiiis)

Tracking

unspecified
mozilla28
All
Gonk (Firefox OS)
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
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.
(Assignee)

Comment 1

5 years ago
Created attachment 8341139 [details] [diff] [review]
Align sub-frame display ports to tile boundaries

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)
(Assignee)

Comment 2

5 years ago
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)
(Assignee)

Comment 3

5 years ago
Created attachment 8341715 [details] [diff] [review]
Align sub-frame display ports to tile boundaries (v2)

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)
(Assignee)

Updated

5 years ago
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
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
You need to log in before you can comment on or make changes to this bug.