mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 959847. Part 5. Only call RecordFrameMetrics for subdocuments if we are ignoring viewport scrolling so that we don't call it twice for the same scroll frame (the other one being the scroll layers created by nsGfxScrollFrame). r=roc
This commit is contained in:
parent
c5eadf4d6e
commit
c1ef4c92c7
@ -464,24 +464,30 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
// created, we don't need to create a separate nsDisplaySubDocument.
|
||||
|
||||
uint32_t flags = nsDisplayOwnLayer::GENERATE_SUBDOC_INVALIDATIONS;
|
||||
// We also want to add nsDisplayOwnLayer::GENERATE_SCROLLABLE_LAYER to whatever
|
||||
// layer becomes the topmost. We do this below.
|
||||
// If ignoreViewportScrolling is true then the top most layer we create here
|
||||
// is going to become the scrollable layer for the root scroll frame, so we
|
||||
// want to add nsDisplayOwnLayer::GENERATE_SCROLLABLE_LAYER to whatever layer
|
||||
// becomes the topmost. We do this below.
|
||||
if (constructZoomItem) {
|
||||
uint32_t zoomFlags = flags;
|
||||
if (ignoreViewportScrolling && !constructResolutionItem) {
|
||||
zoomFlags |= nsDisplayOwnLayer::GENERATE_SCROLLABLE_LAYER;
|
||||
}
|
||||
nsDisplayZoom* zoomItem =
|
||||
new (aBuilder) nsDisplayZoom(aBuilder, subdocRootFrame, &childItems,
|
||||
subdocAPD, parentAPD,
|
||||
flags |
|
||||
(constructResolutionItem ?
|
||||
0 : nsDisplayOwnLayer::GENERATE_SCROLLABLE_LAYER));
|
||||
subdocAPD, parentAPD, zoomFlags);
|
||||
childItems.AppendToTop(zoomItem);
|
||||
needsOwnLayer = false;
|
||||
}
|
||||
// Wrap the zoom item in the resolution item if we have both because we want the
|
||||
// resolution scale applied on top of the app units per dev pixel conversion.
|
||||
if (ignoreViewportScrolling) {
|
||||
flags |= nsDisplayOwnLayer::GENERATE_SCROLLABLE_LAYER;
|
||||
}
|
||||
if (constructResolutionItem) {
|
||||
nsDisplayResolution* resolutionItem =
|
||||
new (aBuilder) nsDisplayResolution(aBuilder, subdocRootFrame, &childItems,
|
||||
flags | nsDisplayOwnLayer::GENERATE_SCROLLABLE_LAYER);
|
||||
flags);
|
||||
childItems.AppendToTop(resolutionItem);
|
||||
needsOwnLayer = false;
|
||||
}
|
||||
@ -489,7 +495,7 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
// We always want top level content documents to be in their own layer.
|
||||
nsDisplaySubDocument* layerItem = new (aBuilder) nsDisplaySubDocument(
|
||||
aBuilder, subdocRootFrame ? subdocRootFrame : this,
|
||||
&childItems, flags | nsDisplayOwnLayer::GENERATE_SCROLLABLE_LAYER);
|
||||
&childItems, flags);
|
||||
childItems.AppendToTop(layerItem);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user