Bug 1194851. Rename GetDisplayPortRelativeToScrollPort back to GetDisplayPort. r=botond

This commit is contained in:
Timothy Nikkel 2016-01-07 18:27:49 -06:00
Родитель 3c7c901321
Коммит 4e74899f7a
3 изменённых файлов: 7 добавлений и 7 удалений

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

@ -1078,7 +1078,7 @@ GetDisplayPortImpl(nsIContent* aContent, nsRect *aResult, float aMultiplier)
}
bool
nsLayoutUtils::GetDisplayPortRelativeToScrollPort(nsIContent* aContent, nsRect *aResult)
nsLayoutUtils::GetDisplayPort(nsIContent* aContent, nsRect *aResult)
{
if (gfxPrefs::UseLowPrecisionBuffer()) {
return GetDisplayPortImpl(aContent, aResult, 1.0f / gfxPrefs::LowPrecisionResolution());
@ -1100,7 +1100,7 @@ bool
nsLayoutUtils::GetDisplayPortRelativeToScrollFrame(nsIContent* aContent, nsRect *aResult)
{
MOZ_ASSERT(aResult);
bool usingDisplayPort = GetDisplayPortRelativeToScrollPort(aContent, aResult);
bool usingDisplayPort = GetDisplayPort(aContent, aResult);
if (usingDisplayPort) {
TranslateFromScrollPortToScrollFrame(aContent, aResult);
}
@ -1109,7 +1109,7 @@ nsLayoutUtils::GetDisplayPortRelativeToScrollFrame(nsIContent* aContent, nsRect
bool
nsLayoutUtils::HasDisplayPort(nsIContent* aContent) {
return GetDisplayPortRelativeToScrollPort(aContent, nullptr);
return GetDisplayPort(aContent, nullptr);
}
/* static */ bool
@ -8522,7 +8522,7 @@ nsLayoutUtils::ComputeFrameMetrics(nsIFrame* aForFrame,
if (aContent) {
scrollId = nsLayoutUtils::FindOrCreateIDFor(aContent);
nsRect dp;
if (nsLayoutUtils::GetDisplayPortRelativeToScrollPort(aContent, &dp)) {
if (nsLayoutUtils::GetDisplayPort(aContent, &dp)) {
metrics.SetDisplayPort(CSSRect::FromAppUnits(dp));
nsLayoutUtils::LogTestDataForPaint(aLayer->Manager(), scrollId, "displayport",
metrics.GetDisplayPort());

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

@ -169,7 +169,7 @@ public:
* Get display port for the given element. The displayport is relative to the
* scrollport.
*/
static bool GetDisplayPortRelativeToScrollPort(nsIContent* aContent, nsRect *aResult);
static bool GetDisplayPort(nsIContent* aContent, nsRect *aResult);
/**
* Get display port for the given element relative to the scroll frame.

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

@ -2540,7 +2540,7 @@ ScrollFrameHelper::ScrollToImpl(nsPoint aPt, const nsRect& aRange, nsIAtom* aOri
}
nsRect oldDisplayPort;
nsLayoutUtils::GetDisplayPortRelativeToScrollPort(mOuter->GetContent(), &oldDisplayPort);
nsLayoutUtils::GetDisplayPort(mOuter->GetContent(), &oldDisplayPort);
oldDisplayPort.MoveBy(-mScrolledFrame->GetPosition());
// Update frame position for scrolling
@ -2557,7 +2557,7 @@ ScrollFrameHelper::ScrollToImpl(nsPoint aPt, const nsRect& aRange, nsIAtom* aOri
// any painting, so no need to schedule one.
nsRect displayPort;
DebugOnly<bool> usingDisplayPort =
nsLayoutUtils::GetDisplayPortRelativeToScrollPort(mOuter->GetContent(), &displayPort);
nsLayoutUtils::GetDisplayPort(mOuter->GetContent(), &displayPort);
NS_ASSERTION(usingDisplayPort, "Must have a displayport for apz scrolls!");
displayPort.MoveBy(-mScrolledFrame->GetPosition());