Closed
Bug 959847
Opened 11 years ago
Closed 11 years ago
respect ignore viewport scrolling flag on subdocuments and RecordFrameMetrics on root layers of all documents exactly when we are ignoring viewport scrolling
Categories
(Core :: Layout, defect)
Tracking
()
People
(Reporter: tnikkel, Assigned: tnikkel)
References
Details
Attachments
(11 files, 12 obsolete files)
(deleted),
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
We don't create scroll layers for root scroll frames of of presshell's that are ignoring viewport scrolling. So we should call RecordFrameMetrics on the root layer of the document if we are ignoring viewport scrolling. We have always also ignored the "ignore viewport scrolling" flag for all subdocuments.
Assignee | ||
Comment 1•11 years ago
|
||
Assignee | ||
Comment 2•11 years ago
|
||
Assignee | ||
Comment 3•11 years ago
|
||
In the rare case where we have both I think this is the correct order.
Assignee | ||
Comment 4•11 years ago
|
||
This is kats' patch from https://github.com/staktrace/mozilla-central/commit/4aae77913a7bbeced7699c512e612de0ba04b33b unbitrotted and then I made some changes to it as well.
Assignee | ||
Comment 5•11 years ago
|
||
Assignee | ||
Comment 6•11 years ago
|
||
Assignee | ||
Comment 7•11 years ago
|
||
Comment 8•11 years ago
|
||
I tested these patches (in isolation, without my bug 935219 patches) on B2G and Fennec.
Things look fine on B2G, but on Fennec I see a lot heavier checkerboarding with these patches than without. It's almost as if we don't have a displayport at all. I will have to look into this.
I haven't tested on Metro yet (still building, Metro builds take forever).
Assignee | ||
Comment 9•11 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #8)
> Things look fine on B2G, but on Fennec I see a lot heavier checkerboarding
> with these patches than without. It's almost as if we don't have a
> displayport at all. I will have to look into this.
On Fennec the layer structure has always been the "other" way, so I would not be surprised if the Fennec APZC (what do we call it?) does not know how to deal with this.
Comment 10•11 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #8)
> I haven't tested on Metro yet (still building, Metro builds take forever).
Intent on proving me wrong, my Metro build finished a couple of minutes after I wrote this. Unfortunately, Metro seems to crash on startup with these patches, after showing the UI for 1-2 seconds. I will have to look into this as well.
Comment 11•11 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #10)
> (In reply to Botond Ballo [:botond] from comment #8)
> > I haven't tested on Metro yet (still building, Metro builds take forever).
>
> Intent on proving me wrong, my Metro build finished a couple of minutes
> after I wrote this. Unfortunately, Metro seems to crash on startup with
> these patches, after showing the UI for 1-2 seconds. I will have to look
> into this as well.
Good news: the crash happens without the patches too, so it's not caused by them. It's in the layers dumping code, so maybe related to bug 946879.
Comment 12•11 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #11)
> Good news: the crash happens without the patches too, so it's not caused by
> them. It's in the layers dumping code, so maybe related to bug 946879.
It seems the Metro crash was indeed related to bug 946879, as the same workaround that fixed that fixed this crash as well.
I tested these patches with the workaround on Metro. I didn't see any blatant regression with checkerboarding the way I did on Fennec, nor any correctness issues.
Comment 13•11 years ago
|
||
(In reply to Timothy Nikkel (:tn) from comment #9)
> (In reply to Botond Ballo [:botond] from comment #8)
> > Things look fine on B2G, but on Fennec I see a lot heavier checkerboarding
> > with these patches than without. It's almost as if we don't have a
> > displayport at all. I will have to look into this.
>
> On Fennec the layer structure has always been the "other" way, so I would
> not be surprised if the Fennec APZC (what do we call it?) does not know how
> to deal with this.
Kats suggested on IRC that the issue might be related to what LayerManager::GetPrimaryScrollableLayer() [1] returns.
Here is the layer structure without the patches:
A1 ContainerLayer [chrome document]
A2 ContainerLayer [root content document]
A3 ContainerLayer <scrollable>
A4 ThebesLayer
and with:
B1 ContainerLayer [chrome document]
B2 ContainerLayer [root content document] <scrollable>
B3 ThebesLayer
GetPrimaryScrollableLayer() returns A3 without the patches, and B2 with them. I believe that's in order.
I also saw in the layer dump that B2 has a displayport set on it that looks reasonable.
So nothing seems wrong so far. I guess we'll need to investigate further.
[1] http://mxr.mozilla.org/mozilla-central/source/gfx/layers/Layers.cpp#55
Comment 14•11 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #13)
> I guess we'll need to investigate further.
Further investigation revealed a relevant difference between the the before- and after- layer trees. With the patches in this bug, the valid region of the thebes layer representing the scrollable content is smaller than expected (the size of the scroll port rather than the size of the display port).
Comment 15•11 years ago
|
||
Comment 16•11 years ago
|
||
I posted a couple of more patches that Timothy sent me over email. With these patches I saw no checkerboarding regression on Fennec (or anywhere else) and the bug 935219 patch works correctly on top of these.
Comment 17•11 years ago
|
||
Without this we don't hit APZ performance target for 1.4.
blocking-b2g: --- → 1.4+
Assignee | ||
Comment 18•11 years ago
|
||
Attachment #8360074 -
Attachment is obsolete: true
Assignee | ||
Comment 19•11 years ago
|
||
Attachment #8360075 -
Attachment is obsolete: true
Assignee | ||
Comment 20•11 years ago
|
||
Attachment #8360077 -
Attachment is obsolete: true
Assignee | ||
Comment 21•11 years ago
|
||
Attachment #8360079 -
Attachment is obsolete: true
Assignee | ||
Comment 22•11 years ago
|
||
Attachment #8360081 -
Attachment is obsolete: true
Assignee | ||
Comment 23•11 years ago
|
||
Attachment #8360083 -
Attachment is obsolete: true
Assignee | ||
Comment 24•11 years ago
|
||
Attachment #8360084 -
Attachment is obsolete: true
Assignee | ||
Comment 25•11 years ago
|
||
Attachment #8380788 -
Attachment is obsolete: true
Assignee | ||
Comment 26•11 years ago
|
||
Attachment #8380791 -
Attachment is obsolete: true
Assignee | ||
Comment 27•11 years ago
|
||
Assignee | ||
Comment 28•11 years ago
|
||
Assignee | ||
Comment 29•11 years ago
|
||
This makes nsDisplaySubDocument and nsDisplayScrollLayer duplicate a lot of code. It would be nice if we could refactor out this duplication, but I haven't done it yet.
Assignee | ||
Comment 30•11 years ago
|
||
The basic idea here is to make the root layer for a subdocument be the scrollable layer, instead of having a child layer created by the root scroll frame by the scrollable layer. This is what we do for display root documents currently. We want to do the same for subdocuments. We want to do this so that the resolution is on the same layer that we async pan because that is what AZPC can handle.
Assignee | ||
Updated•11 years ago
|
Attachment #8382043 -
Flags: review?(roc)
Assignee | ||
Updated•11 years ago
|
Attachment #8382044 -
Flags: review?(roc)
Assignee | ||
Updated•11 years ago
|
Attachment #8382045 -
Flags: review?(roc)
Assignee | ||
Updated•11 years ago
|
Attachment #8382046 -
Flags: review?(roc)
Assignee | ||
Updated•11 years ago
|
Attachment #8382048 -
Flags: review?(roc)
Assignee | ||
Updated•11 years ago
|
Attachment #8382049 -
Flags: review?(roc)
Assignee | ||
Updated•11 years ago
|
Attachment #8382050 -
Flags: review?(roc)
Assignee | ||
Updated•11 years ago
|
Attachment #8382052 -
Flags: review?(roc)
Assignee | ||
Updated•11 years ago
|
Attachment #8382053 -
Flags: review?(roc)
Assignee | ||
Updated•11 years ago
|
Attachment #8382055 -
Flags: review?(roc)
Assignee | ||
Updated•11 years ago
|
Attachment #8382057 -
Flags: review?(roc)
Assignee | ||
Comment 31•11 years ago
|
||
This looks big, but a lot of them are simple patches or cleanup.
Comment 32•11 years ago
|
||
aborted |
Try push of these patches on top of latest m-c code:
https://tbpl.mozilla.org/?tree=Try&rev=4c0873272efb
(Trying to figure out if the failures we saw in the try push for bug 935219 are real or not)
Assignee | ||
Comment 33•11 years ago
|
||
Attachment #8382044 -
Attachment is obsolete: true
Attachment #8382044 -
Flags: review?(roc)
Attachment #8382599 -
Flags: review?(roc)
Assignee | ||
Comment 34•11 years ago
|
||
Attachment #8382057 -
Attachment is obsolete: true
Attachment #8382057 -
Flags: review?(roc)
Attachment #8382601 -
Flags: review?(roc)
Comment 35•11 years ago
|
||
green try |
Aborted the try push in comment 32, new try push with the updated patches (to fix minor compile error):
https://tbpl.mozilla.org/?tree=Try&rev=5b6d53559be2
Attachment #8382043 -
Flags: review?(roc) → review+
Comment on attachment 8382045 [details] [diff] [review]
Part 3. Contain zoom items inside resolution items.
Review of attachment 8382045 [details] [diff] [review]:
-----------------------------------------------------------------
Please explain somewhere why this is correct (and why it matters!)
Attachment #8382045 -
Flags: review?(roc) → review-
Attachment #8382599 -
Flags: review?(roc) → review+
Comment on attachment 8382046 [details] [diff] [review]
Part 4. Call RecordFrameMetrics for root layers of subdocuments.
Review of attachment 8382046 [details] [diff] [review]:
-----------------------------------------------------------------
This is kind of yucky, but it will go away when we convert scrolling to be driven from FrameLayerBuilder instead of scroll display items.
Attachment #8382046 -
Flags: review?(roc) → review+
Attachment #8382048 -
Flags: review?(roc) → review+
Attachment #8382049 -
Flags: review?(roc) → review+
Attachment #8382050 -
Flags: review?(roc) → review+
Attachment #8382052 -
Flags: review?(roc) → review+
Attachment #8382053 -
Flags: review?(roc) → review+
Attachment #8382055 -
Flags: review?(roc) → review+
Attachment #8382601 -
Flags: review?(roc) → review+
Assignee | ||
Comment 38•11 years ago
|
||
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #36)
> Comment on attachment 8382045 [details] [diff] [review]
> Part 3. Contain zoom items inside resolution items.
>
> Review of attachment 8382045 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Please explain somewhere why this is correct (and why it matters!)
I don't have any evidence that it matters, but I feel that conceptually this is the right order. App units per dev pixel changes cause the document to be laid out differently, whereas resolution is just a scale transform applied after all other layout. So conceptually the scale transform is happening last. Do you feel the other way? I don't think this is needed, I just noticed it while working on this code.
Assignee | ||
Comment 39•11 years ago
|
||
(In reply to Timothy Nikkel (:tn) from comment #38)
> (In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #36)
> > Comment on attachment 8382045 [details] [diff] [review]
> > Part 3. Contain zoom items inside resolution items.
> >
> > Review of attachment 8382045 [details] [diff] [review]:
> > -----------------------------------------------------------------
> >
> > Please explain somewhere why this is correct (and why it matters!)
>
> I don't have any evidence that it matters, but I feel that conceptually this
> is the right order. App units per dev pixel changes cause the document to be
> laid out differently, whereas resolution is just a scale transform applied
> after all other layout. So conceptually the scale transform is happening
> last. Do you feel the other way? I don't think this is needed, I just
> noticed it while working on this code.
Looking at the original bug that gave us resolution items and gave us the current ordering (bug 732971) it looks my intention was always to have zoom items be contained inside resolution items, but somehow it didn't make it into the final code that landed.
Find, just add a comment in the patch explaining why.
Flags: needinfo?(roc)
Comment 42•11 years ago
|
||
Try push for these patches is green. Feel free to land whenever ready.
Assignee | ||
Comment 43•11 years ago
|
||
Attachment #8382045 -
Attachment is obsolete: true
Attachment #8383241 -
Flags: review?(roc)
Attachment #8383241 -
Flags: review?(roc) → review+
Assignee | ||
Comment 44•11 years ago
|
||
landing |
https://hg.mozilla.org/integration/b2g-inbound/rev/a11ecf90de1a
https://hg.mozilla.org/integration/b2g-inbound/rev/ffb2d1363821
https://hg.mozilla.org/integration/b2g-inbound/rev/522ba2d5437b
https://hg.mozilla.org/integration/b2g-inbound/rev/95590431aebb
https://hg.mozilla.org/integration/b2g-inbound/rev/c984b7ac2a84
https://hg.mozilla.org/integration/b2g-inbound/rev/ed8cade5616f
https://hg.mozilla.org/integration/b2g-inbound/rev/dc9252c6de8d
https://hg.mozilla.org/integration/b2g-inbound/rev/3bf7def1b7f4
https://hg.mozilla.org/integration/b2g-inbound/rev/33a413a575e6
https://hg.mozilla.org/integration/b2g-inbound/rev/4432a2475f49
https://hg.mozilla.org/integration/b2g-inbound/rev/d5595e7a7a3c
Comment 45•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/a11ecf90de1a
https://hg.mozilla.org/mozilla-central/rev/ffb2d1363821
https://hg.mozilla.org/mozilla-central/rev/522ba2d5437b
https://hg.mozilla.org/mozilla-central/rev/95590431aebb
https://hg.mozilla.org/mozilla-central/rev/c984b7ac2a84
https://hg.mozilla.org/mozilla-central/rev/ed8cade5616f
https://hg.mozilla.org/mozilla-central/rev/dc9252c6de8d
https://hg.mozilla.org/mozilla-central/rev/3bf7def1b7f4
https://hg.mozilla.org/mozilla-central/rev/33a413a575e6
https://hg.mozilla.org/mozilla-central/rev/4432a2475f49
https://hg.mozilla.org/mozilla-central/rev/d5595e7a7a3c
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Updated•11 years ago
|
status-b2g-v1.4:
--- → fixed
status-firefox28:
--- → wontfix
status-firefox29:
--- → wontfix
status-firefox30:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•