Closed Bug 780395 Opened 12 years ago Closed 11 years ago

B2G: Listen for scrollTo calls and metrics being clobbered

Categories

(Core :: Panning and Zooming, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: drs, Assigned: drs)

References

Details

(Keywords: feature, Whiteboard: [WebAPI:P0])

Attachments

(1 file, 2 obsolete files)

Currently, if we're async panning and zooming and content requests a scrollTo or metrics are otherwise updated in such a way that our old ones are no longer valid, we just write over them.

We need to:
a) Listen for the scroll offset being updated and refresh our metrics.
b) Re-validate the current zoom level and scroll offset whenever the CSS rect is updated.
c) Re-validate the current scroll offset whenever the screen size changes (ex. due to a rotation)
Blocks: 750974
Blocks: 745136
No longer blocks: 750974
What do we do for fennec here? If we don't handle this on Fennec, we similarly don't need to for basecamp.
blocking-basecamp: --- → ?
Fennec has this functionality.
cjones says we shipped fennec without this in the past so not a Basecamp blocker.
blocking-basecamp: ? → -
This is a web-facing regression (see bug 786780); I'm surprised we'd ship a browser without this.

But anyway, we need this for bug 785663, which blocks.
Blocks: 786808
This needs additional work, both in this bug and elsewhere. See bug 786808.
Attachment #656592 - Flags: review?(jones.chris.g)
Whiteboard: [leave open]
Better patch.
Attachment #656592 - Attachment is obsolete: true
Attachment #656592 - Flags: review?(jones.chris.g)
Attachment #656608 - Flags: review?(jones.chris.g)
Comment on attachment 656608 [details] [diff] [review]
Part 1, Listen for scrollTo calls and metrics being clobbered

The document size could have changed too, right?  I think we should update all the rendering state here.
Attachment #656608 - Flags: review?(jones.chris.g)
(In reply to Chris Jones [:cjones] [:warhammer] from comment #8)
> Comment on attachment 656608 [details] [diff] [review]
> Part 1, Listen for scrollTo calls and metrics being clobbered
> 
> The document size could have changed too, right?  I think we should update
> all the rendering state here.

We already handle that here:
https://mxr.mozilla.org/mozilla-central/source/gfx/layers/ipc/AsyncPanZoomController.cpp#971

However, you're right, there are a _lot_ of problems with things like orientation flips causing us to go off screen if we're zoomed out. I will fix these problems up in a follow-up in this bug (the parts b and c I listed above).
Attachment #656608 - Flags: review?(jones.chris.g)
Comment on attachment 656608 [details] [diff] [review]
Part 1, Listen for scrollTo calls and metrics being clobbered


>diff --git a/gfx/layers/ipc/AsyncPanZoomController.cpp b/gfx/layers/ipc/AsyncPanZoomController.cpp

>+  } else {
>+    // No paint was requested, but we got one anyways. One possible cause of this
>+    // is that content could have fired a scrollTo(). In this case, we should take
>+    // the new scroll offset.

Note here that document/viewport changes are handled elsewhere.

It makes sense to me to consolidate that code, but since particular deficiency is causing serious problems we can get it landed now.  Do ensure the followup gets done ;).
Attachment #656608 - Flags: review?(jones.chris.g) → review+
Whiteboard: [leave open] → [leave open] [WebAPI:P0]
Since this blocks a blocker, we need to make this blocking too unfortunately.
blocking-basecamp: - → +
Marking as P1 as this makes bug 785663 simple to fix per jlebar.
Whiteboard: [leave open] [WebAPI:P0] → [leave open] [WebAPI:P1]
Keywords: feature
(In reply to Chris Lee [:clee] from comment #12)
> Marking as P1 as this makes bug 785663 simple to fix per jlebar.

Hi, Chris.

The WebAPI priorities are internal priorities that the WebAPI team agreed to in a meeting yesterday.  They're not product or any other team's priorities.

Did you speak with Andrew or Jonas before re-prioritizing this bug?  It was marked as a P0 because the team believed that it was not part of the WebAPI umbrella.  I'm going to set it back to that, because that's the last I heard us agree to.

If product wants its own set of priorities, you are more than welcome to add your own whiteboard flag.  In fact, I bet product could even use the Bugzilla priority flag.  Shiny.  :)
Whiteboard: [leave open] [WebAPI:P1] → [leave open] [WebAPI:P0]
Assignee: nobody → bugzilla
r+ carried, fixed review comment.
Attachment #656608 - Attachment is obsolete: true
Attachment #661364 - Flags: review+
Whiteboard: [leave open] [WebAPI:P0] → [leave open] [WebAPI:P0] [checkin-needed]
Keywords: checkin-needed
Whiteboard: [leave open] [WebAPI:P0] [checkin-needed] → [leave open] [WebAPI:P0]
Should I wait for a try run, or should I trust you on this?
It's been given try runs before, but combined with other bugs. I made sure it built but there's nothing that tests this, so it should be fine.
The basecamp-blocking part of this has landed, removing blocking-basecamp.
blocking-basecamp: + → ---
I think bug 895905 at least partially addresses this issue.
Depends on: 895905
A patch landed here, marking this bug fixed. As Botond said, bug 895905 addressed some of this, and bug 921020 covers the remaining bits.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Component: Graphics: Layers → Panning and Zooming
Whiteboard: [leave open] [WebAPI:P0] → [WebAPI:P0]
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: