Bug 1479543 - Expose getBoxObjectFor on Document instead of XULDocument;r=bzbarsky
authorBrian Grinstead <bgrinstead@mozilla.com>
Wed, 01 Aug 2018 22:00:44 +0000
changeset 429646 f32aa04aee9c3674d50128d05cb9fada94b94bb7
parent 429645 a659bb6920033a6c21da58c4d6cab704daeec708
child 429684 f4c112eaaa7546fadbeccac3c49b60a940c73497
push id67214
push userbgrinstead@mozilla.com
push dateWed, 01 Aug 2018 22:02:33 +0000
treeherderautoland@f32aa04aee9c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs1479543
milestone63.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 1479543 - Expose getBoxObjectFor on Document instead of XULDocument;r=bzbarsky Differential Revision: https://phabricator.services.mozilla.com/D2570
devtools/shared/webconsole/test/test_bug819670_getter_throws.html
dom/webidl/Document.webidl
dom/webidl/XULDocument.webidl
dom/xul/XULDocument.h
--- a/devtools/shared/webconsole/test/test_bug819670_getter_throws.html
+++ b/devtools/shared/webconsole/test/test_bug819670_getter_throws.html
@@ -47,17 +47,16 @@ function onEvaluate(aState, aResponse)
 
 function onInspect(aState, aResponse)
 {
   ok(!aResponse.error, "no response error");
 
   let expectedProps = {
     "addBroadcastListenerFor": { value: { type: "object" } },
     "commandDispatcher": { get: { type: "object" } },
-    "getBoxObjectFor": { value: { type: "object" } },
   };
 
   let props = aResponse.ownProperties;
   ok(props, "response properties available");
 
   if (props) {
     ok(Object.keys(props).length > Object.keys(expectedProps).length,
        "number of enumerable properties");
--- a/dom/webidl/Document.webidl
+++ b/dom/webidl/Document.webidl
@@ -170,16 +170,18 @@ partial interface Document {
                 [Pref="dom.select_events.enabled"]
                 attribute EventHandler onselectionchange;
 
   /**
    * True if this document is synthetic : stand alone image, video, audio file,
    * etc.
    */
   [Func="IsChromeOrXBL"] readonly attribute boolean mozSyntheticDocument;
+  [Throws, Func="IsChromeOrXBL"]
+  BoxObject? getBoxObjectFor(Element? element);
   /**
    * Returns the script element whose script is currently being processed.
    *
    * @see <https://developer.mozilla.org/en/DOM/document.currentScript>
    */
   [Pure]
   readonly attribute Element? currentScript;
   /**
--- a/dom/webidl/XULDocument.webidl
+++ b/dom/webidl/XULDocument.webidl
@@ -26,12 +26,9 @@ interface XULDocument : Document {
 
   readonly attribute XULCommandDispatcher? commandDispatcher;
 
   [Throws]
   void addBroadcastListenerFor(Element broadcaster, Element observer,
                                DOMString attr);
   void removeBroadcastListenerFor(Element broadcaster, Element observer,
                                   DOMString attr);
-
-  [Throws]
-  BoxObject? getBoxObjectFor(Element? element);
 };
--- a/dom/xul/XULDocument.h
+++ b/dom/xul/XULDocument.h
@@ -146,17 +146,16 @@ public:
     nsIDOMXULCommandDispatcher* GetCommandDispatcher() const
     {
         return mCommandDispatcher;
     }
     void AddBroadcastListenerFor(Element& aBroadcaster, Element& aListener,
                                  const nsAString& aAttr, ErrorResult& aRv);
     void RemoveBroadcastListenerFor(Element& aBroadcaster, Element& aListener,
                                     const nsAString& aAttr);
-    using nsDocument::GetBoxObjectFor;
 
 protected:
     virtual ~XULDocument();
 
     // Implementation methods
     friend nsresult
     (::NS_NewXULDocument(nsIDocument** aResult));