mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-19 23:07:33 +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
|
|
@ -134,6 +134,7 @@ class SpeechSynthesis;
|
|||
class TabGroup;
|
||||
class Timeout;
|
||||
class U2F;
|
||||
class VisualViewport;
|
||||
class WakeLock;
|
||||
struct WindowPostMessageOptions;
|
||||
class Worklet;
|
||||
|
|
@ -974,6 +975,7 @@ public:
|
|||
already_AddRefed<nsICSSDeclaration>
|
||||
GetComputedStyle(mozilla::dom::Element& aElt, const nsAString& aPseudoElt,
|
||||
mozilla::ErrorResult& aError) override;
|
||||
mozilla::dom::VisualViewport* VisualViewport();
|
||||
already_AddRefed<mozilla::dom::MediaQueryList> MatchMediaOuter(const nsAString& aQuery);
|
||||
already_AddRefed<mozilla::dom::MediaQueryList> MatchMedia(const nsAString& aQuery,
|
||||
mozilla::ErrorResult& aError);
|
||||
|
|
@ -1854,6 +1856,8 @@ protected:
|
|||
RefPtr<nsHistory> mHistory;
|
||||
RefPtr<mozilla::dom::CustomElementRegistry> mCustomElements;
|
||||
|
||||
RefPtr<mozilla::dom::VisualViewport> mVisualViewport;
|
||||
|
||||
// These member variables are used on both inner and the outer windows.
|
||||
nsCOMPtr<nsIPrincipal> mDocumentPrincipal;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue