зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1071686 - Enable creation of an initial displayport on non-B2G platforms. r=mstange
This commit is contained in:
Родитель
7e0d0bdea2
Коммит
9125c553f6
|
@ -88,6 +88,7 @@
|
||||||
#include "mozilla/Preferences.h"
|
#include "mozilla/Preferences.h"
|
||||||
#include "nsFrameSelection.h"
|
#include "nsFrameSelection.h"
|
||||||
#include "FrameLayerBuilder.h"
|
#include "FrameLayerBuilder.h"
|
||||||
|
#include "mozilla/layers/AsyncPanZoomController.h"
|
||||||
|
|
||||||
#ifdef MOZ_XUL
|
#ifdef MOZ_XUL
|
||||||
#include "nsXULPopupManager.h"
|
#include "nsXULPopupManager.h"
|
||||||
|
@ -98,10 +99,6 @@
|
||||||
#include "nsTransitionManager.h"
|
#include "nsTransitionManager.h"
|
||||||
#include "RestyleManager.h"
|
#include "RestyleManager.h"
|
||||||
|
|
||||||
// Additional includes used on B2G by code in GetOrMaybeCreateDisplayPort().
|
|
||||||
#ifdef MOZ_WIDGET_GONK
|
|
||||||
#include "mozilla/layers/AsyncPanZoomController.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
using namespace mozilla::dom;
|
using namespace mozilla::dom;
|
||||||
|
@ -2734,9 +2731,6 @@ nsLayoutUtils::GetFramesForArea(nsIFrame* aFrame, const nsRect& aRect,
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function is only used on B2G, and some compilers complain about
|
|
||||||
// unused static functions, so we need to #ifdef it.
|
|
||||||
#ifdef MOZ_WIDGET_GONK
|
|
||||||
// aScrollFrame and aScrollFrameAsScrollable must be non-nullptr
|
// aScrollFrame and aScrollFrameAsScrollable must be non-nullptr
|
||||||
static FrameMetrics
|
static FrameMetrics
|
||||||
CalculateFrameMetricsForDisplayPort(nsIFrame* aScrollFrame,
|
CalculateFrameMetricsForDisplayPort(nsIFrame* aScrollFrame,
|
||||||
|
@ -2784,7 +2778,6 @@ CalculateFrameMetricsForDisplayPort(nsIFrame* aScrollFrame,
|
||||||
|
|
||||||
return metrics;
|
return metrics;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
nsLayoutUtils::GetOrMaybeCreateDisplayPort(nsDisplayListBuilder& aBuilder,
|
nsLayoutUtils::GetOrMaybeCreateDisplayPort(nsDisplayListBuilder& aBuilder,
|
||||||
|
@ -2804,8 +2797,7 @@ nsLayoutUtils::GetOrMaybeCreateDisplayPort(nsDisplayListBuilder& aBuilder,
|
||||||
|
|
||||||
bool haveDisplayPort = GetDisplayPort(content, aOutDisplayport);
|
bool haveDisplayPort = GetDisplayPort(content, aOutDisplayport);
|
||||||
|
|
||||||
#ifdef MOZ_WIDGET_GONK
|
// We perform an optimization where we ensure that at least one
|
||||||
// On B2G, we perform an optimization where we ensure that at least one
|
|
||||||
// async-scrollable frame (i.e. one that WantsAsyncScroll()) has a displayport.
|
// async-scrollable frame (i.e. one that WantsAsyncScroll()) has a displayport.
|
||||||
// If that's not the case yet, and we are async-scrollable, we will get a
|
// If that's not the case yet, and we are async-scrollable, we will get a
|
||||||
// displayport.
|
// displayport.
|
||||||
|
@ -2834,7 +2826,6 @@ nsLayoutUtils::GetOrMaybeCreateDisplayPort(nsDisplayListBuilder& aBuilder,
|
||||||
// Record that the we now have a scrollable display port.
|
// Record that the we now have a scrollable display port.
|
||||||
aBuilder.SetHaveScrollableDisplayPort();
|
aBuilder.SetHaveScrollableDisplayPort();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
return haveDisplayPort;
|
return haveDisplayPort;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче