Bug 864845 part 2. Make window.content chromeonly. r=mystor
authorBoris Zbarsky <bzbarsky@mit.edu>
Tue, 12 Sep 2017 15:33:10 -0400
changeset 429857 c991b71d36422d8adecfe27268d18c62faa5b63c
parent 429856 9e6a4d96cf76d8cdd17983fe748bfc8936caefec
child 429858 9873269746359dbcccbd5b44f0e82c0225289945
child 430119 de03f659d5e6585ebcb85c0c0042723986754651
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmystor
bugs864845
milestone57.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 864845 part 2. Make window.content chromeonly. r=mystor MozReview-Commit-ID: Q7hTmngEgI
dom/tests/mochitest/bugs/test_bug440572.html
dom/webidl/Window.webidl
testing/talos/talos/pageloader/chrome/tscroll.js
--- a/dom/tests/mochitest/bugs/test_bug440572.html
+++ b/dom/tests/mochitest/bugs/test_bug440572.html
@@ -24,17 +24,17 @@ function receiveMessage(e)
 }
 
 window.addEventListener("message", receiveMessage);
 
 function runtests()
 {
   is(messages.size, 3, "received the right number of messages.");
   is(messages.get("test"), "success", "test in frame failed.");
-  isnot(messages.get("content"), "success", "parent[\"content\"] should be the WebIDL property of Window.");
+  is(messages.get("content"), "success", "parent[\"content\"] should be the subframe named 'content'");
   isnot(messages.get("dump"), "success", "parent[\"dump\"] should be the WebIDL property of Window.");
 
   SimpleTest.finish();
 }
 
 SimpleTest.waitForExplicitFinish();
 </script>
 <br>
--- a/dom/webidl/Window.webidl
+++ b/dom/webidl/Window.webidl
@@ -331,17 +331,17 @@ partial interface Window {
    * arguments, plus any additional arguments are passed on as
    * arguments on the dialog's window object (window.arguments).
    */
   [Throws, ChromeOnly, UnsafeInPrerendering] WindowProxy? openDialog(optional DOMString url = "",
                                                                    optional DOMString name = "",
                                                                    optional DOMString options = "",
                                                                    any... extraArguments);
 
-  [Replaceable, Throws, NeedsCallerType] readonly attribute object? content;
+  [ChromeOnly, Replaceable, Throws, NeedsCallerType] readonly attribute object? content;
 
   [ChromeOnly, Throws, NeedsCallerType] readonly attribute object? __content;
 
   [Throws, ChromeOnly] any getInterface(IID iid);
 
   /**
    * Same as nsIDOMWindow.windowRoot, useful for event listener targeting.
    */
--- a/testing/talos/talos/pageloader/chrome/tscroll.js
+++ b/testing/talos/talos/pageloader/chrome/tscroll.js
@@ -108,17 +108,17 @@ function testScroll(target, stepSize, op
     return function() {
       return new Promise(function(resolve) {
         setTimeout(resolve, ms);
       });
     };
   }
 
   function rAF(fn) {
-    return content.requestAnimationFrame(fn);
+    return requestAnimationFrame(fn);
   }
 
   function P_rAF() {
     return new Promise(function(resolve) {
       rAF(resolve);
     });
   }