mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 00:08:39 +09:00
Issue #2714 - Implement the Visual Viewport API
This DOM/Web API is entirely irrelevant for desktop use. We give back the width/height of the root scrollframe of content and for scale we pass forward our dpp resolution (usually 1.0). Since we have no "no touch" zones in our content on desktop,. the rest (origin and offset) is hard-coded to (0,0).
This commit is contained in:
parent
ace2c1c1ee
commit
a036cfeb69
11 changed files with 246 additions and 0 deletions
|
|
@ -23,6 +23,7 @@
|
|||
#include "mozilla/dom/StorageEventBinding.h"
|
||||
#include "mozilla/dom/Timeout.h"
|
||||
#include "mozilla/dom/TimeoutHandler.h"
|
||||
#include "mozilla/dom/VisualViewport.h"
|
||||
#include "mozilla/IntegerPrintfMacros.h"
|
||||
#include "nsDOMOfflineResourceList.h"
|
||||
#include "nsError.h"
|
||||
|
|
@ -4156,6 +4157,16 @@ nsGlobalWindow::GetNavigator()
|
|||
return navigator;
|
||||
}
|
||||
|
||||
VisualViewport*
|
||||
nsGlobalWindow::VisualViewport()
|
||||
{
|
||||
if (!mVisualViewport) {
|
||||
mVisualViewport = new mozilla::dom::VisualViewport(this);
|
||||
}
|
||||
|
||||
return mVisualViewport;
|
||||
}
|
||||
|
||||
nsScreen*
|
||||
nsGlobalWindow::GetScreen(ErrorResult& aError)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue