Bug 1409677 - Adjust kCommonAliasedLineWidthRangeMax to 1 in WebGL resistFingerprint mode; r?jgilbert, cfu draft
authorDaosheng Mu <daoshengmu@gmail.com>
Mon, 20 Nov 2017 17:19:22 +0800
changeset 700972 c19fec0f08483641b97579c2d7ac9a4b9d91e1ea
parent 700338 dd08f8b19cc32da161811abb2f7093e0f5392e69
child 741037 81052bcdd7f90c7a4a111ecd76eea82497a12b40
push id90011
push userbmo:dmu@mozilla.com
push dateTue, 21 Nov 2017 01:49:19 +0000
reviewersjgilbert, cfu
bugs1409677
milestone59.0a1
Bug 1409677 - Adjust kCommonAliasedLineWidthRangeMax to 1 in WebGL resistFingerprint mode; r?jgilbert, cfu 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>