diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-05-20 09:47:09 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-06-07 11:15:42 +0000 |
commit | 189d4fd8fad9e3c776873be51938cd31a42b6177 (patch) | |
tree | 6497caeff5e383937996768766ab3bb2081a40b2 /chromium/ui/accessibility/extensions/chromevoxclassic/chromevox | |
parent | 8bc75099d364490b22f43a7ce366b366c08f4164 (diff) | |
download | qtwebengine-chromium-189d4fd8fad9e3c776873be51938cd31a42b6177.tar.gz |
BASELINE: Update Chromium to 90.0.4430.221
Change-Id: Iff4d9d18d2fcf1a576f3b1f453010f744a232920
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/ui/accessibility/extensions/chromevoxclassic/chromevox')
5 files changed, 29 insertions, 12 deletions
diff --git a/chromium/ui/accessibility/extensions/chromevoxclassic/chromevox/background/tabs_api_handler.js b/chromium/ui/accessibility/extensions/chromevoxclassic/chromevox/background/tabs_api_handler.js index 000462fae0e..350ce628a9e 100644 --- a/chromium/ui/accessibility/extensions/chromevoxclassic/chromevox/background/tabs_api_handler.js +++ b/chromium/ui/accessibility/extensions/chromevoxclassic/chromevox/background/tabs_api_handler.js @@ -208,15 +208,6 @@ cvox.TabsApiHandler.prototype = { * @private */ refreshAutomationHandler_: function(tabId) { - if (!cvox.ChromeVox.isMac) - return; - - chrome.automation.getTree(tabId, function(node) { - if (this.handler_) - this.handler_.removeAllListeners(); - - this.handler_ = new TabsAutomationHandler(node); - }.bind(this)); }, /** diff --git a/chromium/ui/accessibility/extensions/chromevoxclassic/chromevox/injected/api.js b/chromium/ui/accessibility/extensions/chromevoxclassic/chromevox/injected/api.js index 30947603953..9c05e4c1ea3 100644 --- a/chromium/ui/accessibility/extensions/chromevoxclassic/chromevox/injected/api.js +++ b/chromium/ui/accessibility/extensions/chromevoxclassic/chromevox/injected/api.js @@ -80,7 +80,9 @@ if (typeof(goog) != 'undefined' && goog.require) { } channel = new MessageChannel(); - window.postMessage(PORT_SETUP_MSG, [channel.port2], '*'); + window.postMessage( + PORT_SETUP_MSG, '*' /* target origin */, + [channel.port2] /* transfer */); channel.port1.onmessage = function(event) { if (event.data == DISCONNECT_MSG) { channel = null; diff --git a/chromium/ui/accessibility/extensions/chromevoxclassic/chromevox/injected/mathjax.js b/chromium/ui/accessibility/extensions/chromevoxclassic/chromevox/injected/mathjax.js index 1b926721519..50c99fa0659 100644 --- a/chromium/ui/accessibility/extensions/chromevoxclassic/chromevox/injected/mathjax.js +++ b/chromium/ui/accessibility/extensions/chromevoxclassic/chromevox/injected/mathjax.js @@ -38,7 +38,9 @@ if (typeof(goog) != 'undefined' && goog.require) { channel_.port1.onmessage = function(evt) { cvox.MathJax.execMessage(evt.data); }; - window.postMessage('cvox.MathJaxPortSetup', '*', [channel_.port2]); + window.postMessage( + 'cvox.MathJaxPortSetup', '*' /* target origin */, + [channel_.port2] /* transfer */); }; diff --git a/chromium/ui/accessibility/extensions/chromevoxclassic/chromevox/injected/pdf_processor.js b/chromium/ui/accessibility/extensions/chromevoxclassic/chromevox/injected/pdf_processor.js index 5b232946476..b443fa1398a 100644 --- a/chromium/ui/accessibility/extensions/chromevoxclassic/chromevox/injected/pdf_processor.js +++ b/chromium/ui/accessibility/extensions/chromevoxclassic/chromevox/injected/pdf_processor.js @@ -73,7 +73,7 @@ cvox.PdfProcessor.processEmbeddedPdfs = function() { cvox.PdfProcessor.process = function() { cvox.PdfProcessor.pageCount = null; cvox.PdfProcessor.pageIndex = null; - window.postMessage({'type': 'getAccessibilityJSON'}, '*'); + window.postMessage({'type': 'getAccessibilityJSON'}, '*' /* target origin */); }; /** diff --git a/chromium/ui/accessibility/extensions/chromevoxclassic/chromevox/injected/shadydom_loader.js b/chromium/ui/accessibility/extensions/chromevoxclassic/chromevox/injected/shadydom_loader.js new file mode 100644 index 00000000000..15a1c8ab80e --- /dev/null +++ b/chromium/ui/accessibility/extensions/chromevoxclassic/chromevox/injected/shadydom_loader.js @@ -0,0 +1,22 @@ +// Copyright 2020 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Load the Shady DOM polyfill as soon as possible. +(function() { + function loadScripts() { + if (!document.head) { + setTimeout(loadScripts, 0); + return; + } + var script1 = document.createElement('script'); + script1.innerHTML = ` + window.ShadyDOM = {force: true, noPatch: true}; + `; + var script2 = document.createElement('script'); + script2.src = chrome.extension.getURL('/shadydom.js'); + document.head.prepend(script1); + document.head.prepend(script2); + } + loadScripts(); +}()); |