mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
Bug 919144. Part 2: Force creation of a layer for every viewport with a displayport. r=mattwoodrow
This ensures that for all fixed-pos content attached to a viewport with a displayport, the viewport has a layer and the fixed-pos content's layer will be a direct child of the viewport's layer. --HG-- extra : rebase_source : da35bacad5518b94cb0b92a198d4f607cede4ac9
This commit is contained in:
parent
fd9ce678dc
commit
3e2af1e7b8
@ -350,11 +350,13 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
int32_t subdocAPD = presContext->AppUnitsPerDevPixel();
|
||||
|
||||
nsRect dirty;
|
||||
bool haveDisplayPort = false;
|
||||
if (subdocRootFrame) {
|
||||
nsIDocument* doc = subdocRootFrame->PresContext()->Document();
|
||||
nsIContent* root = doc ? doc->GetRootElement() : nullptr;
|
||||
nsRect displayPort;
|
||||
if (root && nsLayoutUtils::GetDisplayPort(root, &displayPort)) {
|
||||
haveDisplayPort = true;
|
||||
dirty = displayPort;
|
||||
} else {
|
||||
// get the dirty rect relative to the root frame of the subdoc
|
||||
@ -376,6 +378,7 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
(presShell->GetXResolution() != 1.0 || presShell->GetYResolution() != 1.0);
|
||||
bool constructZoomItem = subdocRootFrame && parentAPD != subdocAPD;
|
||||
bool needsOwnLayer = constructResolutionItem || constructZoomItem ||
|
||||
haveDisplayPort ||
|
||||
presContext->IsRootContentDocument() || (sf && sf->IsScrollingActive());
|
||||
|
||||
nsDisplayList childItems;
|
||||
|
Loading…
Reference in New Issue
Block a user