Bug 1043961 - Disabled desktop display port changes for android. r=tn

--HG--
extra : rebase_source : d1de78af825bac1e7f06ff81c4394d70a75cc8fd
This commit is contained in:
Matt Woodrow 2014-07-29 12:07:36 +12:00
Родитель fc4fffcb3c
Коммит 21c89b906b
4 изменённых файлов: 5 добавлений и 11 удалений

Просмотреть файл

@ -359,7 +359,7 @@ nsDOMWindowUtils::SetDisplayPortForElement(float aXPx, float aYPx,
new DisplayPortPropertyData(displayport, aPriority),
nsINode::DeleteProperty<DisplayPortPropertyData>);
if (gfxPrefs::AsyncPanZoomEnabled()) {
if (nsLayoutUtils::UsesAsyncScrolling()) {
nsIFrame* rootScrollFrame = presShell->GetRootScrollFrame();
if (rootScrollFrame && content == rootScrollFrame->GetContent()) {
// We are setting a root displayport for a document.

Просмотреть файл

@ -3626,11 +3626,10 @@ nsDisplaySubDocument::ComputeVisibility(nsDisplayListBuilder* aBuilder,
aBuilder, &childVisibleRegion, boundedRect,
usingDisplayPort ? mFrame : nullptr);
#ifndef MOZ_WIDGET_ANDROID
// If APZ is enabled then don't allow this computation to influence
// aVisibleRegion, on the assumption that the layer can be asynchronously
// scrolled so we'll definitely need all the content under it.
if (!gfxPrefs::AsyncPanZoomEnabled()) {
if (!nsLayoutUtils::UsesAsyncScrolling()) {
bool snap;
nsRect bounds = GetBounds(aBuilder, &snap);
nsRegion removed;
@ -3638,7 +3637,6 @@ nsDisplaySubDocument::ComputeVisibility(nsDisplayListBuilder* aBuilder,
aBuilder->SubtractFromVisibleRegion(aVisibleRegion, removed);
}
#endif
return visible;
}
@ -3938,18 +3936,16 @@ nsDisplayScrollLayer::ComputeVisibility(nsDisplayListBuilder* aBuilder,
aBuilder, &childVisibleRegion, boundedRect,
usingDisplayPort ? mScrollFrame : nullptr);
#ifndef MOZ_WIDGET_ANDROID
// If APZ is enabled then don't allow this computation to influence
// aVisibleRegion, on the assumption that the layer can be asynchronously
// scrolled so we'll definitely need all the content under it.
if (!gfxPrefs::AsyncPanZoomEnabled()) {
if (!nsLayoutUtils::UsesAsyncScrolling()) {
bool snap;
nsRect bounds = GetBounds(aBuilder, &snap);
nsRegion removed;
removed.Sub(bounds, childVisibleRegion);
aBuilder->SubtractFromVisibleRegion(aVisibleRegion, removed);
}
#endif
return visible;
}

Просмотреть файл

@ -929,7 +929,7 @@ nsLayoutUtils::SetDisplayPortMargins(nsIContent* aContent,
aMargins, aAlignmentX, aAlignmentY, aPriority),
nsINode::DeleteProperty<DisplayPortMarginsPropertyData>);
if (gfxPrefs::AsyncPanZoomEnabled()) {
if (nsLayoutUtils::UsesAsyncScrolling()) {
nsIFrame* rootScrollFrame = aPresShell->GetRootScrollFrame();
if (rootScrollFrame && aContent == rootScrollFrame->GetContent()) {
// We are setting a root displayport for a document.

Просмотреть файл

@ -1607,10 +1607,9 @@ ScrollFrameHelper::ScrollFrameHelper(nsContainerFrame* aOuter,
EnsureImageVisPrefsCached();
#ifndef MOZ_WIDGET_ANDROID
if (mScrollingActive &&
gfxPrefs::LayersTilesEnabled() &&
!gfxPrefs::AsyncPanZoomEnabled() &&
!nsLayoutUtils::UsesAsyncScrolling() &&
mOuter->GetContent()) {
// If we have tiling but no APZ, then set a 0-margin display port on
// active scroll containers so that we paint by whole tile increments
@ -1622,7 +1621,6 @@ ScrollFrameHelper::ScrollFrameHelper(nsContainerFrame* aOuter,
0,
nsLayoutUtils::RepaintMode::DoNotRepaint);
}
#endif
}