Bug 1409677 - Adjust kCommonAliasedLineWidthRangeMax to 1 in WebGL resistFingerprint mode; r=cfu,jgilbert a=gchang
authorDaosheng Mu <daoshengmu@gmail.com>
Mon, 20 Nov 2017 17:19:22 +0800
changeset 442511 99df250531e1b7aaa6d1cffa825a8beacb084e41
parent 442510 a66f23b1940632778b6447d967469bb97c2e72ab
child 442512 780900bb90913f473e7722568dc62fa22e82d3aa
push id8238
push useraciure@mozilla.com
push dateMon, 27 Nov 2017 10:33:36 +0000
treeherdermozilla-beta@24ed530c9a03 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscfu, jgilbert, gchang
bugs1409677
milestone58.0
Bug 1409677 - Adjust kCommonAliasedLineWidthRangeMax to 1 in WebGL resistFingerprint mode; r=cfu,jgilbert a=gchang 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
@@ -101,10 +101,10 @@ skip-if = toolkit == 'android' #bug 8654
 skip-if = toolkit == 'android' #bug 865443- seperate suite - the non_conf* tests pass except for one on armv6 tests
 [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>