mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 08:12:05 +00:00
Bug 1151421 Part 1: Change Window scroll and offset properties to be doubles instead of ints. r=smaug
MozReview-Commit-ID: KeTokCIO5D9 --HG-- extra : rebase_source : 02f4aedf0e9dd662c53816dcc22766041f962bdb
This commit is contained in:
parent
ffc5dfb2ca
commit
3b8561b408
@ -6337,7 +6337,7 @@ nsGlobalWindow::GetScrollMaxY(ErrorResult& aError)
|
||||
FORWARD_TO_OUTER_OR_THROW(GetScrollBoundaryOuter, (eSideBottom), aError, 0);
|
||||
}
|
||||
|
||||
CSSIntPoint
|
||||
CSSPoint
|
||||
nsGlobalWindow::GetScrollXY(bool aDoFlush)
|
||||
{
|
||||
MOZ_ASSERT(IsOuterWindow());
|
||||
@ -6361,30 +6361,30 @@ nsGlobalWindow::GetScrollXY(bool aDoFlush)
|
||||
return GetScrollXY(true);
|
||||
}
|
||||
|
||||
return sf->GetScrollPositionCSSPixels();
|
||||
return CSSPoint::FromAppUnits(scrollPos);
|
||||
}
|
||||
|
||||
int32_t
|
||||
double
|
||||
nsGlobalWindow::GetScrollXOuter()
|
||||
{
|
||||
MOZ_RELEASE_ASSERT(IsOuterWindow());
|
||||
return GetScrollXY(false).x;
|
||||
}
|
||||
|
||||
int32_t
|
||||
double
|
||||
nsGlobalWindow::GetScrollX(ErrorResult& aError)
|
||||
{
|
||||
FORWARD_TO_OUTER_OR_THROW(GetScrollXOuter, (), aError, 0);
|
||||
}
|
||||
|
||||
int32_t
|
||||
double
|
||||
nsGlobalWindow::GetScrollYOuter()
|
||||
{
|
||||
MOZ_RELEASE_ASSERT(IsOuterWindow());
|
||||
return GetScrollXY(false).y;
|
||||
}
|
||||
|
||||
int32_t
|
||||
double
|
||||
nsGlobalWindow::GetScrollY(ErrorResult& aError)
|
||||
{
|
||||
FORWARD_TO_OUTER_OR_THROW(GetScrollYOuter, (), aError, 0);
|
||||
|
@ -1090,15 +1090,15 @@ public:
|
||||
void SetInnerHeight(JSContext* aCx, JS::Handle<JS::Value> aValue,
|
||||
mozilla::dom::CallerType aCallerType,
|
||||
mozilla::ErrorResult& aError);
|
||||
int32_t GetScrollXOuter();
|
||||
int32_t GetScrollX(mozilla::ErrorResult& aError);
|
||||
int32_t GetPageXOffset(mozilla::ErrorResult& aError)
|
||||
double GetScrollXOuter();
|
||||
double GetScrollX(mozilla::ErrorResult& aError);
|
||||
double GetPageXOffset(mozilla::ErrorResult& aError)
|
||||
{
|
||||
return GetScrollX(aError);
|
||||
}
|
||||
int32_t GetScrollYOuter();
|
||||
int32_t GetScrollY(mozilla::ErrorResult& aError);
|
||||
int32_t GetPageYOffset(mozilla::ErrorResult& aError)
|
||||
double GetScrollYOuter();
|
||||
double GetScrollY(mozilla::ErrorResult& aError);
|
||||
double GetPageYOffset(mozilla::ErrorResult& aError)
|
||||
{
|
||||
return GetScrollY(aError);
|
||||
}
|
||||
@ -1635,7 +1635,7 @@ public:
|
||||
// If aDoFlush is true, we'll flush our own layout; otherwise we'll try to
|
||||
// just flush our parent and only flush ourselves if we think we need to.
|
||||
// Outer windows only.
|
||||
mozilla::CSSIntPoint GetScrollXY(bool aDoFlush);
|
||||
mozilla::CSSPoint GetScrollXY(bool aDoFlush);
|
||||
|
||||
int32_t GetScrollBoundaryOuter(mozilla::Side aSide);
|
||||
|
||||
|
@ -183,14 +183,10 @@ partial interface Window {
|
||||
[ChromeOnly] void mozScrollSnap();
|
||||
// The four properties below are double per spec at the moment, but whether
|
||||
// that will continue is unclear.
|
||||
//[Replaceable, Throws] readonly attribute double scrollX;
|
||||
//[Replaceable, Throws] readonly attribute double pageXOffset;
|
||||
//[Replaceable, Throws] readonly attribute double scrollY;
|
||||
//[Replaceable, Throws] readonly attribute double pageYOffset;
|
||||
[Replaceable, Throws] readonly attribute long scrollX;
|
||||
[Replaceable, Throws] readonly attribute long pageXOffset;
|
||||
[Replaceable, Throws] readonly attribute long scrollY;
|
||||
[Replaceable, Throws] readonly attribute long pageYOffset;
|
||||
[Replaceable, Throws] readonly attribute double scrollX;
|
||||
[Replaceable, Throws] readonly attribute double pageXOffset;
|
||||
[Replaceable, Throws] readonly attribute double scrollY;
|
||||
[Replaceable, Throws] readonly attribute double pageYOffset;
|
||||
|
||||
// client
|
||||
// These are writable because we allow chrome to write them. And they need
|
||||
|
Loading…
Reference in New Issue
Block a user