Bug 1409677 - Adjust kCommonAliasedLineWidthRangeMax to 1 in WebGL resistFingerprint mode; r=cfu,jgilbert
authorDaosheng Mu <daoshengmu@gmail.com>
Mon, 20 Nov 2017 17:19:22 +0800
changeset 701860 22f422e17767554189749560358dd632dc2dae97
parent 701859 80d8ceae7039e6263f142c1b1c42e2b0eea81112
child 701861 ee92a8351073a7df9af706c110a0512808d1b700
push id90298
push userbmo:bpostelnicu@mozilla.com
push dateWed, 22 Nov 2017 10:54:01 +0000
reviewerscfu, jgilbert
bugs1409677
milestone59.0a1
Bug 1409677 - Adjust kCommonAliasedLineWidthRangeMax to 1 in WebGL resistFingerprint mode; r=cfu,jgilbert MozReview-Commit-ID: 4gusUhU9VMI
dom/canvas/WebGLContextValidate.cpp
dom/canvas/test/webgl-mochitest/mochitest.ini
dom/canvas/test/webgl-mochitest/test_webgl_fingerprinting_resistance.html
--- a/dom/canvas/WebGLContextValidate.cpp
+++ b/dom/canvas/WebGLContextValidate.cpp
@@ -73,17 +73,17 @@ const uint32_t kCommonMaxFragmentUniform
 const uint32_t kCommonMaxVaryingVectors         =   8;
 
 const uint32_t kCommonMaxViewportDims = 4096;
 
 // The following ranges came from a 2013 Moto E and an old macbook.
 const float kCommonAliasedPointSizeRangeMin =  1;
 const float kCommonAliasedPointSizeRangeMax = 63;
 const float kCommonAliasedLineWidthRangeMin =  1;
-const float kCommonAliasedLineWidthRangeMax =  5;
+const float kCommonAliasedLineWidthRangeMax =  1;
 
 template<class T>
 static bool
 RestrictCap(T* const cap, const T restrictedVal)
 {
     if (*cap < restrictedVal) {
         return false; // already too low!
     }
--- a/dom/canvas/test/webgl-mochitest/mochitest.ini
+++ b/dom/canvas/test/webgl-mochitest/mochitest.ini
@@ -102,10 +102,10 @@ skip-if = toolkit == 'android' #bug 8654
 [test_webgl2_uniform_block.html]
 [test_fuzzing_bugs.html]
 [test_video_fastpath_mp4.html]
 [test_video_fastpath_theora.html]
 [test_video_fastpath_vp8.html]
 [test_video_fastpath_vp9.html]
 [test_webglcontextcreationerror.html]
 [test_webgl_fingerprinting_resistance.html]
-fail-if = (os == 'mac') || (os == 'win') # on try server, LOCAL_GL_MAX_CUBE_MAP_TEXTURE_SIZE = 512 on mac and LOCAL_GL_ALIASED_LINE_WIDTH_RANGE = [1, 1] on win
+fail-if = (os == 'mac') # on try server, LOCAL_GL_MAX_CUBE_MAP_TEXTURE_SIZE = 512 on mac
 [test_without_index_validation.html]
--- a/dom/canvas/test/webgl-mochitest/test_webgl_fingerprinting_resistance.html
+++ b/dom/canvas/test/webgl-mochitest/test_webgl_fingerprinting_resistance.html
@@ -36,12 +36,12 @@ document.addEventListener("DOMContentLoa
   let viewportDims = gl.getParameter(gl.MAX_VIEWPORT_DIMS);
   SimpleTest.is(viewportDims[0],  4096, "MAX_VIEWPORT_DIMS[0]");
   SimpleTest.is(viewportDims[1],  4096, "MAX_VIEWPORT_DIMS[1]");
   let aliasedPointSizeRange = gl.getParameter(gl.ALIASED_POINT_SIZE_RANGE);
   SimpleTest.is(aliasedPointSizeRange[0],  1, "ALIASED_POINT_SIZE_RANGE[0]");
   SimpleTest.is(aliasedPointSizeRange[1],  63, "ALIASED_POINT_SIZE_RANGE[1]");
   let aliasedLineWIdthRange = gl.getParameter(gl.ALIASED_LINE_WIDTH_RANGE);
   SimpleTest.is(aliasedLineWIdthRange[0],  1, "ALIASED_LINE_WIDTH_RANGE[0]");
-  SimpleTest.is(aliasedLineWIdthRange[1],  5, "ALIASED_LINE_WIDTH_RANGE[1]");
+  SimpleTest.is(aliasedLineWIdthRange[1],  1, "ALIASED_LINE_WIDTH_RANGE[1]");
   SimpleTest.finish();
 });
 </script>