mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 09:45:41 +00:00
Bug 1225508 - Add a displayport on non-scrollable frames which have a resolution. r=botond
This commit is contained in:
parent
9008199c76
commit
02c2652ed5
@ -222,8 +222,13 @@ void
|
||||
MobileViewportManager::UpdateDisplayPortMargins()
|
||||
{
|
||||
if (nsIFrame* root = mPresShell->GetRootScrollFrame()) {
|
||||
if (!nsLayoutUtils::GetDisplayPort(root->GetContent(), nullptr)) {
|
||||
// There isn't already a displayport, so we don't want to add one.
|
||||
bool hasDisplayPort = nsLayoutUtils::GetDisplayPort(root->GetContent(), nullptr);
|
||||
bool hasResolution = mPresShell->ScaleToResolution() &&
|
||||
mPresShell->GetResolution() != 1.0f;
|
||||
if (!hasDisplayPort && !hasResolution) {
|
||||
// We only want to update the displayport if there is one already, or
|
||||
// add one if there's a resolution on the document (see bug 1225508
|
||||
// comment 1).
|
||||
return;
|
||||
}
|
||||
nsIScrollableFrame* scrollable = do_QueryFrame(root);
|
||||
|
Loading…
Reference in New Issue
Block a user