Release 68.0.3440.90
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
# 68.0.3440.90
|
||||
* reduce rects randomisation by factor of 100
|
||||
* use a fixed user-agent (fixes https://github.com/bromite/bromite/issues/103)
|
||||
|
||||
# 68.0.3440.87
|
||||
* add export button to Bookmarks activity page
|
||||
|
||||
|
||||
+149
-51
File diff suppressed because it is too large
Load Diff
@@ -3,9 +3,11 @@ Date: Sat, 28 Oct 2017 10:09:41 +0200
|
||||
Subject: Cure AMP and tracking from search results
|
||||
|
||||
---
|
||||
third_party/blink/renderer/core/dom/BUILD.gn | 1 +
|
||||
third_party/blink/renderer/core/dom/document.cc | 20 +++++++++++++++++++-
|
||||
2 files changed, 20 insertions(+), 1 deletion(-)
|
||||
third_party/blink/renderer/core/dom/BUILD.gn | 1 +
|
||||
third_party/blink/renderer/core/dom/document.cc | 20 +++++++++++++++++++-
|
||||
.../renderer/core/dom/extensions/anti_amp_cure.h | 6 ++++++
|
||||
3 files changed, 26 insertions(+), 1 deletion(-)
|
||||
create mode 100644 third_party/blink/renderer/core/dom/extensions/anti_amp_cure.h
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/dom/BUILD.gn b/third_party/blink/renderer/core/dom/BUILD.gn
|
||||
--- a/third_party/blink/renderer/core/dom/BUILD.gn
|
||||
@@ -56,6 +58,17 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink
|
||||
|
||||
FirstMeaningfulPaintDetector::From(*this).CheckNetworkStable();
|
||||
}
|
||||
diff --git a/third_party/blink/renderer/core/dom/extensions/anti_amp_cure.h b/third_party/blink/renderer/core/dom/extensions/anti_amp_cure.h
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/third_party/blink/renderer/core/dom/extensions/anti_amp_cure.h
|
||||
@@ -0,0 +1,6 @@
|
||||
+#ifndef anti_amp_cure_h
|
||||
+#define anti_amp_cure_h
|
||||
+
|
||||
+#define ANTI_AMP_CURE_JS "/* Bromite click-tracking and AMP removal v0.3.5 */\n\nfunction recreateHyperlink(a) {\n // skip already-sanitized hyperlinks\n if (a.sane) return false;\n\n // create new A element - old one has event listeners attached\n var newA = document.createElement('a');\n newA.referrerPolicy = 'origin';\n // property set when hyperlink has been created by this script\n newA.sane = 1;\n\n // remove AMP class, get actual page URL\n var ampCur = a.getAttribute('data-amp-cur');\n if (ampCur) {\n newA.href = ampCur;\n a.classList.remove('amp_r');\n } else {\n var realLink = getRealLinkFromGoogleUrl(a);\n if (realLink) {\n newA.href = realLink;\n } else {\n // might not be an actual hyperlink, ignore it\n if (!a.href) {\n return false;\n }\n // leave original href unchanged\n newA.href = a.href;\n }\n }\n // copy CSS classes\n newA.className = a.className;\n\n // copy nodes inside the hyperlink\n while (a.firstChild) {\n newA.appendChild(a.lastChild);\n }\n // replace hyperlink\n a.parentNode.replaceChild(newA, a);\n return true;\n}\n\nfunction isResult(a) {\n if (a.getAttribute('data-amp-cur'))\n return true;\n var inlineMousedown = a.getAttribute('onmousedown');\n if (!inlineMousedown)\n\treturn false;\n // return rwt(....); // E.g Google search results.\n // return google.rwt(...); // E.g. sponsored search results\n // return google.arwt(this); // E.g. sponsored search results (dec 2016).\n return /\\ba?rwt\\(/.test(inlineMousedown) || /\\bctpacw\\b/.test(inlineMousedown);\n}\n\n/**\n * @returns {String} the real URL if the given link is a Google redirect URL.\n */\nfunction getRealLinkFromGoogleUrl(a) {\n if ((a.hostname === location.hostname || a.hostname.indexOf('www.google.') == 0) &&\n /^\\/(local_)?url$/.test(a.pathname)) {\n // Google Maps / Dito (/local_url?q=<url>)\n // Mobile (/url?q=<url>)\n var url = /[?&](?:q|url)=((?:https?|ftp)[%:][^&]+)/.exec(a.search);\n if (url) {\n return decodeURIComponent(url[1]);\n }\n // Help pages, e.g. safe browsing (/url?...&q=%2Fsupport%2Fanswer...)\n url = /[?&](?:q|url)=((?:%2[Ff]|\\/)[^&]+)/.exec(a.search);\n if (url) {\n return a.origin + decodeURIComponent(url[1]);\n }\n }\n}\n\nfunction sanitizeAds() {\n // scan all divs\n var div = document.getElementById('tads');\n if (div) {\n div.style.display = 'none';\n\treturn true;\n }\n return false;\n}\n\nfunction sanitizeAll() {\n console.log(\"ads removed: \", sanitizeAds());\n console.log(\"hyperlinks sanitized: \", sanitizeAllHyperlinks(document));\n}\n\nfunction hookMoreResults() {\n var extrares = document.getElementById('extrares');\n if (!extrares) {\n console.log(\"could not hook more results\");\n return;\n }\n // mutation observers are great but they don't work\n extrares.addEventListener(\"DOMNodeInserted\", function(e) {\n var node = e.target;\n if (node.id && node.id.startsWith(\"arc-srp\"))\n console.log(\"hyperlinks sanitized on new result node: \", sanitizeAllHyperlinks(node));\n });\n}\n\nfunction setMlogoClick() {\n var mlogo = document.getElementById('qslc');\n if (mlogo && mlogo.children[0]) {\n mlogo = mlogo.children[0];\n mlogo.removeAttribute(\"href\");\n mlogo.setAttribute(\"onclick\", \"sanitizeAll()\");\n console.log(\"logo link replaced\");\n } else {\n console.log(\"could not replace logo link\");\n }\n}\n\nfunction sanitizeAllHyperlinks(rootNode) {\n var saned = 0, total = 0;\n rootNode.querySelectorAll('div[data-hveid]:not([data-hveid=\"\"]) a').forEach(function(a) {\n\ttotal++;\n\tvar res = recreateHyperlink(a);\n\tif (res) saned++;\n });\n console.log(\"sanitized \", saned, \"/\", total, \" hyperlinks\");\n\n return saned;\n}\n\n// avoid running cleanup on non-search pages\nif ((document.location.host.indexOf(\"images.google.\") == -1) && (document.location.host.indexOf(\"news.google.\") == -1)) {\n sanitizeAll();\n}\nsetMlogoClick();\n\nhookMoreResults();\n"
|
||||
+
|
||||
+#endif // anti_amp_cure_h
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
||||
@@ -5,9 +5,11 @@ Subject: Play videos in background
|
||||
Break Page Visibility API and Fullscreen API for youtube.com and vimeo.com
|
||||
Original Javascript code by timdream
|
||||
---
|
||||
third_party/blink/renderer/core/dom/BUILD.gn | 1 +
|
||||
third_party/blink/renderer/core/dom/document.cc | 17 +++++++++++++----
|
||||
2 files changed, 14 insertions(+), 4 deletions(-)
|
||||
third_party/blink/renderer/core/dom/BUILD.gn | 1 +
|
||||
third_party/blink/renderer/core/dom/document.cc | 17 +++++++++++++----
|
||||
.../blink/renderer/core/dom/extensions/video_bg_play.h | 6 ++++++
|
||||
3 files changed, 20 insertions(+), 4 deletions(-)
|
||||
create mode 100644 third_party/blink/renderer/core/dom/extensions/video_bg_play.h
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/dom/BUILD.gn b/third_party/blink/renderer/core/dom/BUILD.gn
|
||||
--- a/third_party/blink/renderer/core/dom/BUILD.gn
|
||||
@@ -61,6 +63,17 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink
|
||||
|
||||
FirstMeaningfulPaintDetector::From(*this).CheckNetworkStable();
|
||||
}
|
||||
diff --git a/third_party/blink/renderer/core/dom/extensions/video_bg_play.h b/third_party/blink/renderer/core/dom/extensions/video_bg_play.h
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/third_party/blink/renderer/core/dom/extensions/video_bg_play.h
|
||||
@@ -0,0 +1,6 @@
|
||||
+#ifndef video_bg_play_h
|
||||
+#define video_bg_play_h
|
||||
+
|
||||
+#define VIDEO_BG_PLAY_JS "'use strict';\n\n/* video background play fix - original version by timdream */\ndocument.videoBGFix = {};\n\n// Page Visibility API\nObject.defineProperties(document.videoBGFix,\n { 'hidden': {value: false}, 'visibilityState': {value: 'visible'} });\n\nwindow.addEventListener(\n 'visibilitychange', evt => evt.stopImmediatePropagation(), true);\nwindow.addEventListener(\n 'blur', evt => evt.stopImmediatePropagation(), true);\n\n// Fullscreen API\nwindow.addEventListener('fullscreenchange', evt => {\n Object.defineProperties(document.videoBGFix,\n { 'fullscreenEnabled': {value: true},\n 'fullscreen': {value: true},\n 'fullscreenElement': {value: document.fullscreenElement.videoBGFix}});\n window.addEventListener(\n 'fullscreenchange', evt => evt.stopImmediatePropagation(), true);\n}, { capture: true, once: true });\n"
|
||||
+
|
||||
+#endif // video_bg_play_h
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
||||
@@ -2,22 +2,34 @@ From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Wed, 21 Mar 2018 14:15:28 +0100
|
||||
Subject: User Agent: anonymize
|
||||
|
||||
Remove device name and build id
|
||||
Use a fixed device name and Chrome product version.
|
||||
---
|
||||
content/common/user_agent.cc | 25 ++-----------------------
|
||||
1 file changed, 2 insertions(+), 23 deletions(-)
|
||||
components/version_info/version_info.cc | 2 +-
|
||||
content/common/user_agent.cc | 20 +++-----------------
|
||||
2 files changed, 4 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/components/version_info/version_info.cc b/components/version_info/version_info.cc
|
||||
--- a/components/version_info/version_info.cc
|
||||
+++ b/components/version_info/version_info.cc
|
||||
@@ -13,7 +13,7 @@
|
||||
namespace version_info {
|
||||
|
||||
std::string GetProductNameAndVersionForUserAgent() {
|
||||
- return "Chrome/" + GetVersionNumber();
|
||||
+ return "Chrome/68.0.3440.85";
|
||||
}
|
||||
|
||||
std::string GetProductName() {
|
||||
diff --git a/content/common/user_agent.cc b/content/common/user_agent.cc
|
||||
--- a/content/common/user_agent.cc
|
||||
+++ b/content/common/user_agent.cc
|
||||
@@ -60,26 +60,6 @@ std::string BuildOSCpuInfo() {
|
||||
}
|
||||
@@ -61,25 +61,11 @@ std::string BuildOSCpuInfo() {
|
||||
#elif defined(OS_ANDROID)
|
||||
std::string android_version_str = base::SysInfo::OperatingSystemVersion();
|
||||
-
|
||||
|
||||
- std::string android_info_str;
|
||||
-
|
||||
- // Send information about the device.
|
||||
// Send information about the device.
|
||||
- bool semicolon_inserted = false;
|
||||
- std::string android_build_codename = base::SysInfo::GetAndroidBuildCodename();
|
||||
- std::string android_device_name = base::SysInfo::HardwareModelName();
|
||||
@@ -25,8 +37,9 @@ diff --git a/content/common/user_agent.cc b/content/common/user_agent.cc
|
||||
- android_info_str += "; " + android_device_name;
|
||||
- semicolon_inserted = true;
|
||||
- }
|
||||
-
|
||||
- // Append the build ID.
|
||||
+ std::string android_info_str = "SM-G920T";
|
||||
|
||||
// Append the build ID.
|
||||
- std::string android_build_id = base::SysInfo::GetAndroidBuildID();
|
||||
- if (android_build_id.size() > 0) {
|
||||
- if (!semicolon_inserted) {
|
||||
@@ -34,21 +47,19 @@ diff --git a/content/common/user_agent.cc b/content/common/user_agent.cc
|
||||
- }
|
||||
- android_info_str += " Build/" + android_build_id;
|
||||
- }
|
||||
+ android_info_str += " Build/MMB29M";
|
||||
#elif (defined(OS_POSIX) && !defined(OS_MACOSX)) || defined(OS_FUCHSIA)
|
||||
// Should work on any Posix system.
|
||||
struct utsname unixinfo;
|
||||
@@ -115,9 +95,8 @@ std::string BuildOSCpuInfo() {
|
||||
@@ -115,7 +101,7 @@ std::string BuildOSCpuInfo() {
|
||||
os_minor_version,
|
||||
os_bugfix_version
|
||||
#elif defined(OS_ANDROID)
|
||||
- "Android %s%s",
|
||||
- android_version_str.c_str(),
|
||||
- android_info_str.c_str()
|
||||
+ "Android %s",
|
||||
+ android_version_str.c_str()
|
||||
+ "Android %s; %s",
|
||||
android_version_str.c_str(),
|
||||
android_info_str.c_str()
|
||||
#elif defined(OS_POSIX) || defined(OS_FUCHSIA)
|
||||
"%s %s",
|
||||
unixinfo.sysname, // e.g. Linux
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
||||
+15
-15
@@ -4,7 +4,7 @@ Subject: getClientRects, getBoundingClientRect, measureText: add
|
||||
fingerprinting mitigation
|
||||
|
||||
Scale the result of Range::getClientRects, Element::getBoundingClientRect and
|
||||
Canvas::measureText by a random +/-3/10000th of the original value for each
|
||||
Canvas::measureText by a random +/-3/1000000th of the original value for each
|
||||
float in the returned Rect/Quad.
|
||||
|
||||
Rationale is that the returned values are within the same order of magnitude
|
||||
@@ -36,9 +36,9 @@ diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/
|
||||
GetDocument().AdjustFloatQuadsForScrollAndAbsoluteZoom(
|
||||
quads, *element_layout_object);
|
||||
+
|
||||
+ // scale all quads by 3/10000th
|
||||
+ auto shuffleX = 1 + (base::RandDouble() - 0.5) * 0.0003;
|
||||
+ auto shuffleY = 1 + (base::RandDouble() - 0.5) * 0.0003;
|
||||
+ // scale all quads
|
||||
+ auto shuffleX = 1 + (base::RandDouble() - 0.5) * 0.000003;
|
||||
+ auto shuffleY = 1 + (base::RandDouble() - 0.5) * 0.000003;
|
||||
+
|
||||
+ for (FloatQuad& quad : quads) {
|
||||
+ quad.Scale(shuffleX, shuffleY);
|
||||
@@ -52,9 +52,9 @@ diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/
|
||||
GetDocument().AdjustFloatRectForScrollAndAbsoluteZoom(result,
|
||||
*element_layout_object);
|
||||
+
|
||||
+ // scale rect by 3/10000th
|
||||
+ auto shuffleX = 1 + (base::RandDouble() - 0.5) * 0.0003;
|
||||
+ auto shuffleY = 1 + (base::RandDouble() - 0.5) * 0.0003;
|
||||
+ // scale rect by 3/1000000th
|
||||
+ auto shuffleX = 1 + (base::RandDouble() - 0.5) * 0.000003;
|
||||
+ auto shuffleY = 1 + (base::RandDouble() - 0.5) * 0.000003;
|
||||
+
|
||||
+ result.Scale(shuffleX, shuffleY);
|
||||
+
|
||||
@@ -77,9 +77,9 @@ diff --git a/third_party/blink/renderer/core/dom/range.cc b/third_party/blink/re
|
||||
Vector<FloatQuad> quads;
|
||||
GetBorderAndTextQuads(quads);
|
||||
|
||||
+ // scale all quads by 3/10000th
|
||||
+ auto shuffleX = 1 + (base::RandDouble() - 0.5) * 0.0003;
|
||||
+ auto shuffleY = 1 + (base::RandDouble() - 0.5) * 0.0003;
|
||||
+ // scale all quads by 3/1000000th
|
||||
+ auto shuffleX = 1 + (base::RandDouble() - 0.5) * 0.000003;
|
||||
+ auto shuffleY = 1 + (base::RandDouble() - 0.5) * 0.000003;
|
||||
+
|
||||
+ for (FloatQuad& quad : quads) {
|
||||
+ quad.Scale(shuffleX, shuffleY);
|
||||
@@ -92,9 +92,9 @@ diff --git a/third_party/blink/renderer/core/dom/range.cc b/third_party/blink/re
|
||||
- return DOMRect::FromFloatRect(BoundingRect());
|
||||
+ auto rect = BoundingRect();
|
||||
+
|
||||
+ // scale rect by 3/10000th
|
||||
+ auto shuffleX = 1 + (base::RandDouble() - 0.5) * 0.0003;
|
||||
+ auto shuffleY = 1 + (base::RandDouble() - 0.5) * 0.0003;
|
||||
+ // scale rect by 3/1000000th
|
||||
+ auto shuffleX = 1 + (base::RandDouble() - 0.5) * 0.000003;
|
||||
+ auto shuffleY = 1 + (base::RandDouble() - 0.5) * 0.000003;
|
||||
+
|
||||
+ rect.Scale(shuffleX, shuffleY);
|
||||
+
|
||||
@@ -162,8 +162,8 @@ diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering
|
||||
+ TextMetrics* textMetrics = TextMetrics::Create(font, direction, GetState().GetTextBaseline(),
|
||||
GetState().GetTextAlign(), text);
|
||||
+
|
||||
+ // scale text metrics by 3/10000th
|
||||
+ auto shuffleFactor = 1 + (base::RandDouble() - 0.5) * 0.0003;
|
||||
+ // scale text metrics by 3/1000000th
|
||||
+ auto shuffleFactor = 1 + (base::RandDouble() - 0.5) * 0.000003;
|
||||
+ textMetrics->Shuffle(shuffleFactor);
|
||||
+
|
||||
+ return textMetrics;
|
||||
|
||||
@@ -23,7 +23,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
};
|
||||
|
||||
+const FeatureEntry::Choice kMaxConnectionsPerHostChoices[] = {
|
||||
+ {features::kMaxConnectionsPerHostChoiceDefault, "", "0"},
|
||||
+ {features::kMaxConnectionsPerHostChoiceDefault, "", "6"},
|
||||
+ {features::kMaxConnectionsPerHostChoice6, switches::kMaxConnectionsPerHost, "6"},
|
||||
+ {features::kMaxConnectionsPerHostChoice15, switches::kMaxConnectionsPerHost, "15"},
|
||||
+};
|
||||
|
||||
Reference in New Issue
Block a user