Commit b3e2863b authored by Micah Tigley's avatar Micah Tigley
Browse files

Bug 1357774 - Part 1: Add a 'SetCurrentRDMPaneOrientation' WebIDL extension on...

Bug 1357774 - Part 1: Add a 'SetCurrentRDMPaneOrientation' WebIDL extension on the Document r=bradwerth,smaug

Differential Revision: https://phabricator.services.mozilla.com/D29455

--HG--
extra : moz-landing-system : lando
parent 1a5e4061
...@@ -1975,6 +1975,12 @@ class Document : public nsINode, ...@@ -1975,6 +1975,12 @@ class Document : public nsINode,
return mOrientationPendingPromise; return mOrientationPendingPromise;
} }
void SetRDMPaneOrientation(OrientationType aType, uint16_t aAngle) {
if (mInRDMPane) {
SetCurrentOrientation(aType, aAngle);
}
}
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// Document notification API's // Document notification API's
......
...@@ -584,4 +584,8 @@ partial interface Document { ...@@ -584,4 +584,8 @@ partial interface Document {
// is not propegated to descendant Documents upon settting. // is not propegated to descendant Documents upon settting.
[ChromeOnly] [ChromeOnly]
attribute boolean inRDMPane; attribute boolean inRDMPane;
// Extension to give chrome JS the ability to set the window screen
// orientation while in RDM.
[ChromeOnly]
void setRDMPaneOrientation(OrientationType type, float rotationAngle);
}; };
...@@ -85,7 +85,7 @@ void GetCurrentScreenConfiguration(ScreenConfiguration* aScreenConfiguration) { ...@@ -85,7 +85,7 @@ void GetCurrentScreenConfiguration(ScreenConfiguration* aScreenConfiguration) {
fallback::GetCurrentScreenConfiguration(aScreenConfiguration); fallback::GetCurrentScreenConfiguration(aScreenConfiguration);
} }
bool LockScreenOrientation(const ScreenOrientation& aOrientation) { bool LockScreenOrientation(const hal::ScreenOrientation& aOrientation) {
bool allowed; bool allowed;
Hal()->SendLockScreenOrientation(aOrientation, &allowed); Hal()->SendLockScreenOrientation(aOrientation, &allowed);
return allowed; return allowed;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment