Closed Bug 1158323 Opened 5 years ago Closed 4 years ago

Many "Attempting to get a margins-based displayport with no base data!" warnings in console on OS X with APZ

Categories

(Core :: Layout, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(2 files, 1 obsolete file)

Attached file Backtrace
I see this warning a bunch when running on OS X with APZ enabled. It fires on the root content element of the root XUL document, see backtrace.
We should probably just call nsLayoutUtils::SetDisplayPortBase() in ChromeProcessController::InitializeRoot().
That would be good. We could also set the display port base in the BuildDisplayList of one of the frames near near the root, the root (viewport frame) perhaps.
mContent appears to be null inside nsViewportFrame::BuildDisplayList so I'm not sure how we could set the displayport base there.
Yeah, we would have to specifically use the root element in that case (instead of mContent).
Attached patch Patch (obsolete) — Splinter Review
Attachment #8598222 - Flags: review?(tnikkel)
Comment on attachment 8598222 [details] [diff] [review]
Patch

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

Maybe add a comment in InitalizeRoot, saying where the base rect will be set?
Comment on attachment 8598222 [details] [diff] [review]
Patch

I think I have a better way to do it. If there is a root scroll frame in the same document as the viewport frame then we would end up setting the display port base twice, once in the viewport frame, and once in the scroll frame.

Refering to http://mxr.mozilla.org/mozilla-central/source/layout/base/nsCSSFrameConstructor.cpp#2722 I think we should set the display port base in nsRootBoxFrame. That way we only set it in xul documents that don't have root scroll frames.

One nit: we should set the base to the dirty rect intersected with our local rect.
Attachment #8598222 - Flags: review?(tnikkel)
Attached patch PatchSplinter Review
Sounds good, this works too.
Assignee: nobody → bugmail.mozilla
Attachment #8598222 - Attachment is obsolete: true
Attachment #8598636 - Flags: review?(tnikkel)
Comment on attachment 8598636 [details] [diff] [review]
Patch

Thanks.
Attachment #8598636 - Flags: review?(tnikkel) → review+
https://hg.mozilla.org/mozilla-central/rev/18db17b9f922
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.