mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 16:28:38 +09:00
JS - make window.pageYOffset/pageXOffset/scrollX/scrollY double
This commit is contained in:
parent
e64a819dc3
commit
49ffafc979
16 changed files with 133 additions and 55 deletions
|
|
@ -6187,7 +6187,7 @@ nsGlobalWindow::GetScrollMaxY(ErrorResult& aError)
|
|||
FORWARD_TO_OUTER_OR_THROW(GetScrollBoundaryOuter, (eSideBottom), aError, 0);
|
||||
}
|
||||
|
||||
CSSIntPoint
|
||||
CSSPoint
|
||||
nsGlobalWindow::GetScrollXY(bool aDoFlush)
|
||||
{
|
||||
MOZ_ASSERT(IsOuterWindow());
|
||||
|
|
@ -6211,30 +6211,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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue