Bug 960195 - Put drawSystemFocusRing behind a new runtime flag. r=roc
authorRik Cabanier <cabanier@adobe.com>
Thu, 16 Jan 2014 08:27:03 -0500
changeset 163699 8d3e02a7f23ce58733e4ee20fa64d9c9637835b8
parent 163698 b971b8137039052358ac0aeb5b23d6f588b8bb55
child 163700 2628e64cf37571a3699985562935c47cf051d9a6
push id38544
push userryanvm@gmail.com
push dateThu, 16 Jan 2014 13:27:44 +0000
treeherdermozilla-inbound@8d3e02a7f23c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs960195
milestone29.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 960195 - Put drawSystemFocusRing behind a new runtime flag. r=roc
content/canvas/test/reftest/reftest.list
content/canvas/test/test_canvas_focusring.html
dom/webidl/CanvasRenderingContext2D.webidl
modules/libpref/src/init/all.js
--- a/content/canvas/test/reftest/reftest.list
+++ b/content/canvas/test/reftest/reftest.list
@@ -186,9 +186,9 @@ skip-if(!winWidget) pref(webgl.prefer-na
 # Do we correctly handle multiple clip paths?
 != clip-multiple-paths.html clip-multiple-paths-badref.html
 
 # Bug 815648
 == stroketext-shadow.html stroketext-shadow-ref.html
 
 # focus rings
 pref(canvas.focusring.enabled,true) skip-if(B2G) skip-if(Android&&AndroidVersion<15,8,500) skip-if(winWidget) needs-focus == drawFocusIfNeeded.html drawFocusIfNeeded-ref.html
-pref(canvas.focusring.enabled,true) skip-if(B2G) skip-if(Android&&AndroidVersion<15,8,500) skip-if(winWidget) needs-focus == drawCustomFocusRing.html drawCustomFocusRing-ref.html
+pref(canvas.customfocusring.enabled,true) skip-if(B2G) skip-if(Android&&AndroidVersion<15,8,500) skip-if(winWidget) needs-focus == drawCustomFocusRing.html drawCustomFocusRing-ref.html
--- a/content/canvas/test/test_canvas_focusring.html
+++ b/content/canvas/test/test_canvas_focusring.html
@@ -4,16 +4,17 @@
 <link rel="stylesheet" href="/tests/SimpleTest/test.css">
 <body>
 <script>
 
 SimpleTest.waitForExplicitFinish();
 const Cc = SpecialPowers.Cc;
 const Cr = SpecialPowers.Cr;
 SpecialPowers.setBoolPref("canvas.focusring.enabled", true);
+SpecialPowers.setBoolPref("canvas.customfocusring.enabled", true);
 </script>
 
 <p>Canvas test: drawCustomFocusRing</p>
 <canvas id="c688" class="output" width="100" height="50">+
     <input id="button1" type="range" min="1" max="12"></input>
     <input id="button2" type="range" min="1" max="12"></input>
 </canvas>
 <script type="text/javascript">
@@ -85,14 +86,15 @@ function runTests() {
   try {
   test_drawFocusIfNeeded_canvas();
  } catch(e) {
   throw e;
   ok(false, "unexpected exception thrown in: test_drawFocusIfNeeded_canvas");
  }
 
  SpecialPowers.setBoolPref("canvas.focusring.enabled", false);
+ SpecialPowers.setBoolPref("canvas.customfocusring.enabled", false);
  SimpleTest.finish();
 }
 
 addLoadEvent(runTests);
 
 </script>
--- a/dom/webidl/CanvasRenderingContext2D.webidl
+++ b/dom/webidl/CanvasRenderingContext2D.webidl
@@ -79,17 +79,17 @@ interface CanvasRenderingContext2D {
   // path API (see also CanvasPathMethods)
   void beginPath();
   void fill(optional CanvasWindingRule winding = "nonzero");
 // NOT IMPLEMENTED  void fill(Path path);
   void stroke();
 // NOT IMPLEMENTED  void stroke(Path path);
   [Pref="canvas.focusring.enabled"] void drawFocusIfNeeded(Element element);
 // NOT IMPLEMENTED  void drawSystemFocusRing(Path path, HTMLElement element);
-  [Pref="canvas.focusring.enabled"] boolean drawCustomFocusRing(Element element);
+  [Pref="canvas.customfocusring.enabled"] boolean drawCustomFocusRing(Element element);
 // NOT IMPLEMENTED  boolean drawCustomFocusRing(Path path, HTMLElement element);
 // NOT IMPLEMENTED  void scrollPathIntoView();
 // NOT IMPLEMENTED  void scrollPathIntoView(Path path);
   void clip(optional CanvasWindingRule winding = "nonzero");
 // NOT IMPLEMENTED  void clip(Path path);
 // NOT IMPLEMENTED  void resetClip();
   boolean isPointInPath(unrestricted double x, unrestricted double y, optional CanvasWindingRule winding = "nonzero");
 // NOT IMPLEMENTED  boolean isPointInPath(Path path, unrestricted double x, unrestricted double y);
--- a/modules/libpref/src/init/all.js
+++ b/modules/libpref/src/init/all.js
@@ -431,16 +431,17 @@ pref("ui.scrollToClick", 0);
 
 #else
 // Only on mac tabfocus is expected to handle UI widgets as well as web content
 pref("accessibility.tabfocus_applies_to_xul", true);
 #endif
 
 // provide ability to turn on support for canvas focus rings
 pref("canvas.focusring.enabled", false);
+pref("canvas.customfocusring.enabled", false);
 
 // We want the ability to forcibly disable platform a11y, because
 // some non-a11y-related components attempt to bring it up.  See bug
 // 538530 for details about Windows; we have a pref here that allows it
 // to be disabled for performance and testing resons.
 // See bug 761589 for the crossplatform aspect.
 //
 // This pref is checked only once, and the browser needs a restart to