Bug 1593708 - Part 1: Add inRDMPane property to BrowsingContext and expose it to JS. r=smaug
authorMicah Tigley <mtigley@mozilla.com>
Thu, 14 Nov 2019 22:54:56 +0000
changeset 502463 8dd6e18ae2af4006d2d72e160bcd8a12541f5ef6
parent 502462 1e67fb39ab0cb2a0835b6274d776d93d899f90a0
child 502464 157248203e4a53a0f04055c7ee875eeb0c55f11c
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1593708
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1593708 - Part 1: Add inRDMPane property to BrowsingContext and expose it to JS. r=smaug Differential Revision: https://phabricator.services.mozilla.com/D52214
docshell/base/BrowsingContext.h
docshell/base/BrowsingContextFieldList.h
dom/chrome-webidl/BrowsingContext.webidl
--- a/docshell/base/BrowsingContext.h
+++ b/docshell/base/BrowsingContext.h
@@ -260,16 +260,18 @@ class BrowsingContext : public nsISuppor
   }
 
   void GetChildren(Children& aChildren);
 
   BrowsingContextGroup* Group() { return mGroup; }
 
   uint32_t SandboxFlags() { return mSandboxFlags; }
 
+  bool InRDMPane() { return mInRDMPane; }
+
   // Using the rules for choosing a browsing context we try to find
   // the browsing context with the given name in the set of
   // transitively reachable browsing contexts. Performs access control
   // checks with regard to this.
   // See
   // https://html.spec.whatwg.org/multipage/browsers.html#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name.
   //
   // BrowsingContext::FindWithName(const nsAString&) is equivalent to
--- a/docshell/base/BrowsingContextFieldList.h
+++ b/docshell/base/BrowsingContextFieldList.h
@@ -39,9 +39,11 @@ MOZ_BC_FIELD(Muted, bool)
 
 MOZ_BC_FIELD(FeaturePolicy, RefPtr<mozilla::dom::FeaturePolicy>)
 
 // See nsSandboxFlags.h for the possible flags.
 MOZ_BC_FIELD(SandboxFlags, uint32_t)
 
 MOZ_BC_FIELD(HistoryID, nsID)
 
+MOZ_BC_FIELD(InRDMPane, bool)
+
 #undef MOZ_BC_FIELD
--- a/dom/chrome-webidl/BrowsingContext.webidl
+++ b/dom/chrome-webidl/BrowsingContext.webidl
@@ -42,16 +42,20 @@ interface BrowsingContext {
    * sandbox attribute, which is modifiable. They are only used when loading new
    * content, sandbox flags are also immutably set on the document when it is
    * loaded.
    * The sandbox flags of a document depend on the sandbox flags on its
    * browsing context and of its parent document, if any.
    * See nsSandboxFlags.h for the possible flags.
    */
   attribute unsigned long sandboxFlags;
+
+  // The inRDMPane flag indicates whether or not Responsive Design Mode is
+  // active for the browsing context.
+  attribute boolean inRDMPane;
 };
 
 [Exposed=Window, ChromeOnly]
 interface CanonicalBrowsingContext : BrowsingContext {
   sequence<WindowGlobalParent> getWindowGlobals();
 
   readonly attribute WindowGlobalParent? currentWindowGlobal;