mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 757362. Use the displayport for the dirty rect (if one is set) when building the display list for a subdocument so that position: fixed items are correctly included. r=roc
This commit is contained in:
parent
e83aeac3ec
commit
756c5f818c
@ -298,10 +298,17 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
|
||||
nsRect dirty;
|
||||
if (subdocRootFrame) {
|
||||
// get the dirty rect relative to the root frame of the subdoc
|
||||
dirty = aDirtyRect + GetOffsetToCrossDoc(subdocRootFrame);
|
||||
// and convert into the appunits of the subdoc
|
||||
dirty = dirty.ConvertAppUnitsRoundOut(parentAPD, subdocAPD);
|
||||
nsIDocument* doc = subdocRootFrame->PresContext()->Document();
|
||||
nsIContent* root = doc ? doc->GetRootElement() : nsnull;
|
||||
nsRect displayPort;
|
||||
if (root && nsLayoutUtils::GetDisplayPort(root, &displayPort)) {
|
||||
dirty = displayPort;
|
||||
} else {
|
||||
// get the dirty rect relative to the root frame of the subdoc
|
||||
dirty = aDirtyRect + GetOffsetToCrossDoc(subdocRootFrame);
|
||||
// and convert into the appunits of the subdoc
|
||||
dirty = dirty.ConvertAppUnitsRoundOut(parentAPD, subdocAPD);
|
||||
}
|
||||
|
||||
aBuilder->EnterPresShell(subdocRootFrame, dirty);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user