diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp index b4e2573966e8..e2f247a149c2 100644 --- a/dom/base/nsDOMWindowUtils.cpp +++ b/dom/base/nsDOMWindowUtils.cpp @@ -2149,6 +2149,13 @@ nsDOMWindowUtils::IsInModalState(bool* retval) { return NS_OK; } +NS_IMETHODIMP +nsDOMWindowUtils::GetDesktopModeViewport(bool* retval) { + nsCOMPtr window = do_QueryReferent(mWindow); + *retval = window && window->IsDesktopModeViewport(); + return NS_OK; +} + NS_IMETHODIMP nsDOMWindowUtils::SetDesktopModeViewport(bool aDesktopMode) { nsCOMPtr window = do_QueryReferent(mWindow); diff --git a/dom/interfaces/base/nsIDOMWindowUtils.idl b/dom/interfaces/base/nsIDOMWindowUtils.idl index 6b3159579b6c..5b4618b32a51 100644 --- a/dom/interfaces/base/nsIDOMWindowUtils.idl +++ b/dom/interfaces/base/nsIDOMWindowUtils.idl @@ -1323,9 +1323,9 @@ interface nsIDOMWindowUtils : nsISupports { boolean isInModalState(); /** - * Request set internal desktopMode flag change. + * Internal desktopMode flag. */ - void setDesktopModeViewport(in boolean aDesktopModeViewport); + attribute boolean desktopModeViewport; /** * Suspend/resume timeouts on this window and its descendant windows.