diff options
Diffstat (limited to 'www/chromium-uc/patches/extra/bromite/flag-fingerprinting-canvas-image-data-noise.patch')
| -rw-r--r-- | www/chromium-uc/patches/extra/bromite/flag-fingerprinting-canvas-image-data-noise.patch | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/www/chromium-uc/patches/extra/bromite/flag-fingerprinting-canvas-image-data-noise.patch b/www/chromium-uc/patches/extra/bromite/flag-fingerprinting-canvas-image-data-noise.patch index 23ce165..6ebc7a1 100644 --- a/www/chromium-uc/patches/extra/bromite/flag-fingerprinting-canvas-image-data-noise.patch +++ b/www/chromium-uc/patches/extra/bromite/flag-fingerprinting-canvas-image-data-noise.patch | |||
| @@ -21,8 +21,8 @@ approach to change color components. | |||
| 21 | .../platform/graphics/static_bitmap_image.h | 2 + | 21 | .../platform/graphics/static_bitmap_image.h | 2 + |
| 22 | 4 files changed, 163 insertions(+), 2 deletions(-) | 22 | 4 files changed, 163 insertions(+), 2 deletions(-) |
| 23 | 23 | ||
| 24 | --- a/chrome/browser/bromite_flag_entries.h | 24 | --- chrome/browser/bromite_flag_entries.h.orig |
| 25 | +++ b/chrome/browser/bromite_flag_entries.h | 25 | +++ chrome/browser/bromite_flag_entries.h |
| 26 | @@ -16,4 +16,8 @@ | 26 | @@ -16,4 +16,8 @@ |
| 27 | flag_descriptions::kMaxConnectionsPerHostName, | 27 | flag_descriptions::kMaxConnectionsPerHostName, |
| 28 | flag_descriptions::kMaxConnectionsPerHostDescription, | 28 | flag_descriptions::kMaxConnectionsPerHostDescription, |
| @@ -32,9 +32,9 @@ approach to change color components. | |||
| 32 | + "Slightly modifies at most 10 pixels in Canvas image data extracted via JS APIs. ungoogled-chromium flag, Bromite feature.", | 32 | + "Slightly modifies at most 10 pixels in Canvas image data extracted via JS APIs. ungoogled-chromium flag, Bromite feature.", |
| 33 | + kOsAll, SINGLE_VALUE_TYPE(switches::kFingerprintingCanvasImageDataNoise)}, | 33 | + kOsAll, SINGLE_VALUE_TYPE(switches::kFingerprintingCanvasImageDataNoise)}, |
| 34 | #endif // CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_ | 34 | #endif // CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_ |
| 35 | --- a/content/browser/renderer_host/render_process_host_impl.cc | 35 | --- content/browser/renderer_host/render_process_host_impl.cc.orig |
| 36 | +++ b/content/browser/renderer_host/render_process_host_impl.cc | 36 | +++ content/browser/renderer_host/render_process_host_impl.cc |
| 37 | @@ -3290,6 +3290,7 @@ void RenderProcessHostImpl::PropagateBro | 37 | @@ -3468,6 +3468,7 @@ void RenderProcessHostImpl::PropagateBro |
| 38 | switches::kFileUrlPathAlias, | 38 | switches::kFileUrlPathAlias, |
| 39 | switches::kFingerprintingClientRectsNoise, | 39 | switches::kFingerprintingClientRectsNoise, |
| 40 | switches::kFingerprintingCanvasMeasureTextNoise, | 40 | switches::kFingerprintingCanvasMeasureTextNoise, |
| @@ -42,9 +42,9 @@ approach to change color components. | |||
| 42 | switches::kForceDeviceScaleFactor, | 42 | switches::kForceDeviceScaleFactor, |
| 43 | switches::kForceDisplayColorProfile, | 43 | switches::kForceDisplayColorProfile, |
| 44 | switches::kForceGpuMemAvailableMb, | 44 | switches::kForceGpuMemAvailableMb, |
| 45 | --- a/content/child/runtime_features.cc | 45 | --- content/child/runtime_features.cc.orig |
| 46 | +++ b/content/child/runtime_features.cc | 46 | +++ content/child/runtime_features.cc |
| 47 | @@ -486,6 +486,8 @@ void SetRuntimeFeaturesFromCommandLine(c | 47 | @@ -471,6 +471,8 @@ void SetRuntimeFeaturesFromCommandLine(c |
| 48 | switches::kFingerprintingClientRectsNoise, true}, | 48 | switches::kFingerprintingClientRectsNoise, true}, |
| 49 | {wrf::EnableFingerprintingCanvasMeasureTextNoise, | 49 | {wrf::EnableFingerprintingCanvasMeasureTextNoise, |
| 50 | switches::kFingerprintingCanvasMeasureTextNoise, true}, | 50 | switches::kFingerprintingCanvasMeasureTextNoise, true}, |
| @@ -53,9 +53,9 @@ approach to change color components. | |||
| 53 | }; | 53 | }; |
| 54 | for (const auto& mapping : switchToFeatureMapping) { | 54 | for (const auto& mapping : switchToFeatureMapping) { |
| 55 | if (command_line.HasSwitch(mapping.switch_name)) | 55 | if (command_line.HasSwitch(mapping.switch_name)) |
| 56 | --- a/third_party/blink/public/platform/web_runtime_features.h | 56 | --- third_party/blink/public/platform/web_runtime_features.h.orig |
| 57 | +++ b/third_party/blink/public/platform/web_runtime_features.h | 57 | +++ third_party/blink/public/platform/web_runtime_features.h |
| 58 | @@ -218,6 +218,7 @@ class WebRuntimeFeatures { | 58 | @@ -220,6 +220,7 @@ class WebRuntimeFeatures { |
| 59 | BLINK_PLATFORM_EXPORT static void EnableAllowSyncXHRInPageDismissal(bool); | 59 | BLINK_PLATFORM_EXPORT static void EnableAllowSyncXHRInPageDismissal(bool); |
| 60 | BLINK_PLATFORM_EXPORT static void EnableFingerprintingClientRectsNoise(bool); | 60 | BLINK_PLATFORM_EXPORT static void EnableFingerprintingClientRectsNoise(bool); |
| 61 | BLINK_PLATFORM_EXPORT static void EnableFingerprintingCanvasMeasureTextNoise(bool); | 61 | BLINK_PLATFORM_EXPORT static void EnableFingerprintingCanvasMeasureTextNoise(bool); |
| @@ -63,17 +63,17 @@ approach to change color components. | |||
| 63 | BLINK_PLATFORM_EXPORT static void EnableSignedExchangeSubresourcePrefetch( | 63 | BLINK_PLATFORM_EXPORT static void EnableSignedExchangeSubresourcePrefetch( |
| 64 | bool); | 64 | bool); |
| 65 | BLINK_PLATFORM_EXPORT static void EnableSubresourceWebBundles(bool); | 65 | BLINK_PLATFORM_EXPORT static void EnableSubresourceWebBundles(bool); |
| 66 | --- a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc | 66 | --- third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc.orig |
| 67 | +++ b/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc | 67 | +++ third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc |
| 68 | @@ -29,6 +29,7 @@ | 68 | @@ -30,6 +30,7 @@ |
| 69 | #include "third_party/blink/renderer/platform/graphics/bitmap_image.h" | 69 | #include "third_party/blink/renderer/platform/graphics/bitmap_image.h" |
| 70 | #include "third_party/blink/renderer/platform/graphics/graphics_context.h" | 70 | #include "third_party/blink/renderer/platform/graphics/graphics_context.h" |
| 71 | #include "third_party/blink/renderer/platform/graphics/skia/skia_utils.h" | 71 | #include "third_party/blink/renderer/platform/graphics/skia/skia_utils.h" |
| 72 | +#include "third_party/blink/renderer/platform/graphics/static_bitmap_image.h" | 72 | +#include "third_party/blink/renderer/platform/graphics/static_bitmap_image.h" |
| 73 | #include "third_party/blink/renderer/platform/graphics/stroke_data.h" | 73 | #include "third_party/blink/renderer/platform/graphics/stroke_data.h" |
| 74 | #include "third_party/blink/renderer/platform/graphics/video_frame_image_util.h" | 74 | #include "third_party/blink/renderer/platform/graphics/video_frame_image_util.h" |
| 75 | #include "third_party/blink/renderer/platform/heap/garbage_collected.h" | 75 | #include "third_party/blink/renderer/platform/heap/heap.h" |
| 76 | @@ -2046,6 +2047,9 @@ ImageData* BaseRenderingContext2D::getIm | 76 | @@ -2311,6 +2312,9 @@ ImageData* BaseRenderingContext2D::getIm |
| 77 | snapshot->PaintImageForCurrentFrame().GetSkImageInfo().bounds(); | 77 | snapshot->PaintImageForCurrentFrame().GetSkImageInfo().bounds(); |
| 78 | DCHECK(!bounds.intersect(SkIRect::MakeXYWH(sx, sy, sw, sh))); | 78 | DCHECK(!bounds.intersect(SkIRect::MakeXYWH(sx, sy, sw, sh))); |
| 79 | } | 79 | } |
| @@ -83,9 +83,9 @@ approach to change color components. | |||
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | return image_data; | 85 | return image_data; |
| 86 | --- a/third_party/blink/renderer/platform/BUILD.gn | 86 | --- third_party/blink/renderer/platform/BUILD.gn.orig |
| 87 | +++ b/third_party/blink/renderer/platform/BUILD.gn | 87 | +++ third_party/blink/renderer/platform/BUILD.gn |
| 88 | @@ -1596,7 +1596,9 @@ component("platform") { | 88 | @@ -1645,7 +1645,9 @@ component("platform") { |
| 89 | "//third_party/blink/renderer:non_test_config", | 89 | "//third_party/blink/renderer:non_test_config", |
| 90 | ] | 90 | ] |
| 91 | 91 | ||
| @@ -96,9 +96,9 @@ approach to change color components. | |||
| 96 | 96 | ||
| 97 | allow_circular_includes_from = [ | 97 | allow_circular_includes_from = [ |
| 98 | "//third_party/blink/renderer/platform/blob", | 98 | "//third_party/blink/renderer/platform/blob", |
| 99 | --- a/third_party/blink/renderer/platform/exported/web_runtime_features.cc | 99 | --- third_party/blink/renderer/platform/exported/web_runtime_features.cc.orig |
| 100 | +++ b/third_party/blink/renderer/platform/exported/web_runtime_features.cc | 100 | +++ third_party/blink/renderer/platform/exported/web_runtime_features.cc |
| 101 | @@ -685,4 +685,8 @@ void WebRuntimeFeatures::EnableFingerpri | 101 | @@ -697,4 +697,8 @@ void WebRuntimeFeatures::EnableFingerpri |
| 102 | RuntimeEnabledFeatures::SetFingerprintingCanvasMeasureTextNoiseEnabled(enable); | 102 | RuntimeEnabledFeatures::SetFingerprintingCanvasMeasureTextNoiseEnabled(enable); |
| 103 | } | 103 | } |
| 104 | 104 | ||
| @@ -107,8 +107,8 @@ approach to change color components. | |||
| 107 | +} | 107 | +} |
| 108 | + | 108 | + |
| 109 | } // namespace blink | 109 | } // namespace blink |
| 110 | --- a/third_party/blink/renderer/platform/graphics/image_data_buffer.cc | 110 | --- third_party/blink/renderer/platform/graphics/image_data_buffer.cc.orig |
| 111 | +++ b/third_party/blink/renderer/platform/graphics/image_data_buffer.cc | 111 | +++ third_party/blink/renderer/platform/graphics/image_data_buffer.cc |
| 112 | @@ -36,6 +36,8 @@ | 112 | @@ -36,6 +36,8 @@ |
| 113 | 113 | ||
| 114 | #include "base/compiler_specific.h" | 114 | #include "base/compiler_specific.h" |
| @@ -130,8 +130,8 @@ approach to change color components. | |||
| 130 | if (mime_type == kMimeTypeJpeg) { | 130 | if (mime_type == kMimeTypeJpeg) { |
| 131 | SkJpegEncoder::Options options; | 131 | SkJpegEncoder::Options options; |
| 132 | options.fQuality = ImageEncoder::ComputeJpegQuality(quality); | 132 | options.fQuality = ImageEncoder::ComputeJpegQuality(quality); |
| 133 | --- a/third_party/blink/renderer/platform/graphics/static_bitmap_image.cc | 133 | --- third_party/blink/renderer/platform/graphics/static_bitmap_image.cc.orig |
| 134 | +++ b/third_party/blink/renderer/platform/graphics/static_bitmap_image.cc | 134 | +++ third_party/blink/renderer/platform/graphics/static_bitmap_image.cc |
| 135 | @@ -4,6 +4,8 @@ | 135 | @@ -4,6 +4,8 @@ |
| 136 | 136 | ||
| 137 | #include "third_party/blink/renderer/platform/graphics/static_bitmap_image.h" | 137 | #include "third_party/blink/renderer/platform/graphics/static_bitmap_image.h" |
| @@ -151,10 +151,10 @@ approach to change color components. | |||
| 151 | #include "third_party/skia/include/core/SkPaint.h" | 151 | #include "third_party/skia/include/core/SkPaint.h" |
| 152 | #include "third_party/skia/include/core/SkSurface.h" | 152 | #include "third_party/skia/include/core/SkSurface.h" |
| 153 | +#include "third_party/skia/include/private/SkColorData.h" | 153 | +#include "third_party/skia/include/private/SkColorData.h" |
| 154 | #include "ui/gfx/geometry/skia_conversions.h" | ||
| 155 | #include "v8/include/v8.h" | 154 | #include "v8/include/v8.h" |
| 156 | 155 | ||
| 157 | @@ -113,4 +117,154 @@ void StaticBitmapImage::DrawHelper(cc::P | 156 | namespace blink { |
| 157 | @@ -80,4 +84,154 @@ void StaticBitmapImage::DrawHelper(cc::P | ||
| 158 | WebCoreClampingModeToSkiaRectConstraint(draw_options.clamping_mode)); | 158 | WebCoreClampingModeToSkiaRectConstraint(draw_options.clamping_mode)); |
| 159 | } | 159 | } |
| 160 | 160 | ||
| @@ -309,9 +309,9 @@ approach to change color components. | |||
| 309 | +#undef shuffleComponent | 309 | +#undef shuffleComponent |
| 310 | + | 310 | + |
| 311 | } // namespace blink | 311 | } // namespace blink |
| 312 | --- a/third_party/blink/renderer/platform/graphics/static_bitmap_image.h | 312 | --- third_party/blink/renderer/platform/graphics/static_bitmap_image.h.orig |
| 313 | +++ b/third_party/blink/renderer/platform/graphics/static_bitmap_image.h | 313 | +++ third_party/blink/renderer/platform/graphics/static_bitmap_image.h |
| 314 | @@ -37,6 +37,8 @@ class PLATFORM_EXPORT StaticBitmapImage | 314 | @@ -36,6 +36,8 @@ class PLATFORM_EXPORT StaticBitmapImage |
| 315 | 315 | ||
| 316 | StaticBitmapImage(ImageOrientation orientation) : orientation_(orientation) {} | 316 | StaticBitmapImage(ImageOrientation orientation) : orientation_(orientation) {} |
| 317 | 317 | ||
| @@ -320,9 +320,9 @@ approach to change color components. | |||
| 320 | bool IsStaticBitmapImage() const override { return true; } | 320 | bool IsStaticBitmapImage() const override { return true; } |
| 321 | 321 | ||
| 322 | // Methods overridden by all sub-classes | 322 | // Methods overridden by all sub-classes |
| 323 | --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 | 323 | --- third_party/blink/renderer/platform/runtime_enabled_features.json5.orig |
| 324 | +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 | 324 | +++ third_party/blink/renderer/platform/runtime_enabled_features.json5 |
| 325 | @@ -1143,6 +1143,9 @@ | 325 | @@ -1082,6 +1082,9 @@ |
| 326 | name: "FingerprintingCanvasMeasureTextNoise", | 326 | name: "FingerprintingCanvasMeasureTextNoise", |
| 327 | }, | 327 | }, |
| 328 | { | 328 | { |
