Closed
Bug 1159405
Opened 10 years ago
Closed 10 years ago
Fix "Found a non-root APZ with no handoff parent" warning when root process has a root XUL document with scrollable subframes
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla40
Tracking | Status | |
---|---|---|
firefox40 | --- | fixed |
People
(Reporter: danilo.eu, Assigned: danilo.eu)
References
Details
Attachments
(1 file, 3 obsolete files)
1.62 KB,
patch
|
danilo.eu
:
review+
|
Details | Diff | Splinter Review |
When running Fennec with C++ APZ, we get a warning for each tap.
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8598853 -
Flags: review?(bugmail.mozilla)
Attachment #8598853 -
Flags: review?(botond)
Assignee | ||
Updated•10 years ago
|
Blocks: apz-fennec
Comment 2•10 years ago
|
||
Sorry for the delay, I wanted to do a build locally and check some assumptions of mine. I'll review this today for sure, but in the meantime you should be able to continue working since this just fixes a warning and shouldn't block you.
Comment 3•10 years ago
|
||
Ok, so it turns out this warning can be triggered in desktop builds as well with APZ enabled, if you load a page like about:preferences which lives in the root process and is scrollable. It's basically the same presshell arrangement as we see in Fennec, where there's a root presShell for the XUL window (which is the presShell in PaintFrame) and then there's a child presShell in the same process which generates a scrollable layer, and the handoff parent for that scrollable layer is not set even though there is an APZ higher in the tree (from the root document's root element).
... Anyway so that means we actually don't need the ifdef in this patch (sorry about that!) and we'll probably want to adjust the comment accordingly.
Assignee | ||
Comment 4•10 years ago
|
||
I'll rewrite the patch. Thanks.
Comment 5•10 years ago
|
||
Comment on attachment 8598853 [details] [diff] [review]
bug-1159405.patch
Review of attachment 8598853 [details] [diff] [review]:
-----------------------------------------------------------------
::: layout/base/nsLayoutUtils.cpp
@@ +3113,5 @@
> id = nsLayoutUtils::FindOrCreateIDFor(content);
> }
> }
> }
> +#if defined(MOZ_ANDROID_APZ)
Remove ifdef (sorry again about telling you to add it in the first place)
@@ +3114,5 @@
> }
> }
> }
> +#if defined(MOZ_ANDROID_APZ)
> + else if (!ignoreViewportScrolling && !presContext->IsRootContentDocument()) {
I think this condition can be changed to "else if (presShell->GetDocument() && presShell->GetDocument()->IsRootDisplayDocument()) {" to match the code at http://mxr.mozilla.org/mozilla-central/source/layout/base/nsLayoutUtils.cpp?rev=18d118c05f8a#1889.
@@ +3118,5 @@
> + else if (!ignoreViewportScrolling && !presContext->IsRootContentDocument()) {
> + // For fennec, when ignoreVirwPortScrolling and presContext->IsRootContentDocument() are
> + // false, it means that the screen doesn't have a scrollable root
> + // element. In that case, we want the ViewID to be the ID of the top
> + // most element.
This comment should be made more generic:
"In cases where the root document is a XUL document, we want to take the ViewID from the root element, as that will be the ViewID of the root APZ in the tree."
Attachment #8598853 -
Flags: review?(bugmail.mozilla) → review-
Updated•10 years ago
|
Blocks: apz-desktop
Component: Widget: Android → Layout
Updated•10 years ago
|
OS: Android → All
Summary: Fix "Found a non-root APZ with no handoff parent" warning when running Fennec with C++ APZ → Fix "Found a non-root APZ with no handoff parent" warning when root process has a root XUL document with scrollable subframes
Assignee | ||
Comment 6•10 years ago
|
||
Attachment #8598853 -
Attachment is obsolete: true
Attachment #8598853 -
Flags: review?(botond)
Attachment #8599367 -
Flags: review?(bugmail.mozilla)
Comment 7•10 years ago
|
||
Comment on attachment 8599367 [details] [diff] [review]
bug-1159405.patch
Review of attachment 8599367 [details] [diff] [review]:
-----------------------------------------------------------------
Update commit message to be more descriptive, e.g. "Ensure we set the handoff parent for scrollable frames in a process with a root XUL document"
::: layout/base/nsLayoutUtils.cpp
@@ +3113,5 @@
> id = nsLayoutUtils::FindOrCreateIDFor(content);
> }
> }
> }
> + else if (presShell->GetDocument() && presShell->GetDocument()->IsRootDisplayDocument()) {
Move else up to follow } on previous line
@@ +3116,5 @@
> }
> + else if (presShell->GetDocument() && presShell->GetDocument()->IsRootDisplayDocument()) {
> + // In cases where the root document is a XUL document, we want to take
> + // the ViewID from the root element, as that will be the ViewID of the
> + // root APZ in the tree.".
Remove trailing ".
Attachment #8599367 -
Flags: review?(bugmail.mozilla) → review?(botond)
Assignee | ||
Comment 8•10 years ago
|
||
done.
Attachment #8599367 -
Attachment is obsolete: true
Attachment #8599367 -
Flags: review?(botond)
Attachment #8599378 -
Flags: review?(bugmail.mozilla)
Updated•10 years ago
|
Attachment #8599378 -
Flags: review?(bugmail.mozilla) → review?(botond)
Comment 9•10 years ago
|
||
Comment on attachment 8599378 [details] [diff] [review]
bug-1159405.patch
Hmm, isn't this going to create a non-null scrollid for the root layer in non-APZ fennec? And wouldn't that break things?
Comment 10•10 years ago
|
||
Comment on attachment 8599378 [details] [diff] [review]
bug-1159405.patch
Review of attachment 8599378 [details] [diff] [review]:
-----------------------------------------------------------------
I think Timothy's right in comment 9, we don't want to do this on non-APZ Fennec.
So, it seems we should have an #ifdef after all, but it should be:
#if !defined(MOZ_WIDGET_ANDROID) || defined(MOZ_ANDROID_APZ)
(just like the one in the change to PaintRoot in bug 1156401, which can be thought of as going hand-in-hand with this change).
r+ with that change.
http://mxr.mozilla.org/mozilla-central/source/layout/base/nsDisplayList.cpp?rev=8efcb1c3142e#1487
::: layout/base/nsLayoutUtils.cpp
@@ +3115,5 @@
> }
> + } else if (presShell->GetDocument() && presShell->GetDocument()->IsRootDisplayDocument()) {
> + // In cases where the root document is a XUL document, we want to take
> + // the ViewID from the root element, as that will be the ViewID of the
> + // root APZ in the tree.
s/APZ/APZC
("APZ" (Async Panning and Zooming) refers to the feature (or the module of the code that implements it), while "APZC" (AsyncPanZoomController) is the object that does async panning and zooming for a single scrollable frame.)
Attachment #8599378 -
Flags: review?(botond) → review+
Assignee | ||
Comment 11•10 years ago
|
||
r+ from botond
Attachment #8599378 -
Attachment is obsolete: true
Attachment #8599853 -
Flags: review+
Assignee | ||
Comment 12•10 years ago
|
||
try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=9a9f7ddca5b3 (also contains the changes from 1156401)
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 13•10 years ago
|
||
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in
before you can comment on or make changes to this bug.
Description
•