mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 15:55:36 +00:00
Bug 1237086. When getting the displayport for a content node if there is no root scroll frame just use the primary frame of the content node. r=botond
XUL documents don't have a root scroll frame, so this would early return and prevent any of the tiling and max texture size code from running. The root element of XUL documents likely only ever has zero-margin displayports, and they are not scrollable, so it may not be important.
This commit is contained in:
parent
e9f77a4e94
commit
cb06741b61
@ -883,10 +883,9 @@ GetDisplayPortFromMarginsData(nsIContent* aContent,
|
||||
if (aContent->OwnerDoc()->GetRootElement() == aContent) {
|
||||
// We want the scroll frame, the root scroll frame differs from all
|
||||
// others in that the primary frame is not the scroll frame.
|
||||
frame = frame->PresContext()->PresShell()->GetRootScrollFrame();
|
||||
if (!frame) {
|
||||
// If there is no root scrollframe, just exit.
|
||||
return base;
|
||||
if (nsIFrame* rootScrollFrame =
|
||||
frame->PresContext()->PresShell()->GetRootScrollFrame()) {
|
||||
frame = rootScrollFrame;
|
||||
}
|
||||
|
||||
isRoot = true;
|
||||
|
Loading…
Reference in New Issue
Block a user