diff options
author | Michael BrĂ¼ning <michael.bruning@qt.io> | 2023-11-17 14:09:21 +0100 |
---|---|---|
committer | Michael BrĂ¼ning <michael.bruning@qt.io> | 2024-03-22 11:57:56 +0000 |
commit | 68302c9ea158fbc83cd28570a0560e5a892b45e8 (patch) | |
tree | 08c0039e3f33730a05ca4ef2340641a67419c009 /chromium/third_party/catapult/third_party/polymer2/bower_components/polymer/lib/utils/settings.html | |
parent | 38655f07d8ef13eb067e3a29bb3a0c2dc0b19716 (diff) |
Enable building with Python 3
Port and fix up the patch used by the Debian project, see
https://salsa.debian.org/qt-kde-team/qt/qtwebengine/-/blob/0db62e47f0e2f5e4e00193b65da912fe0083088c/debian/patches/chromium-python3.patch which in turn was largely based on a patch from ArchLinux:
https://github.com/archlinux/svntogit-packages/blob/packages/qt5-webengine/trunk/qt5-webengine-chromium-python3.patch
Also contains upgrades of six and catapult to build with Python 3.11
and 3.12, plus some other additional fixes, e.g. for macOS builds.
Change-Id: I6b999505150495caabdcf05f6e4c7af588eff7ee
Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/542809
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/third_party/catapult/third_party/polymer2/bower_components/polymer/lib/utils/settings.html')
-rw-r--r-- | chromium/third_party/catapult/third_party/polymer2/bower_components/polymer/lib/utils/settings.html | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/chromium/third_party/catapult/third_party/polymer2/bower_components/polymer/lib/utils/settings.html b/chromium/third_party/catapult/third_party/polymer2/bower_components/polymer/lib/utils/settings.html new file mode 100644 index 00000000000..5b0dc42039d --- /dev/null +++ b/chromium/third_party/catapult/third_party/polymer2/bower_components/polymer/lib/utils/settings.html @@ -0,0 +1,118 @@ +<!-- +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link rel="import" href="../utils/boot.html"> +<link rel="import" href="../utils/resolve-url.html"> + +<script> +/** @suppress {deprecated} */ +(function() { + 'use strict'; + + /** + * Sets the global, legacy settings. + * + * @deprecated + * @namespace + * @memberof Polymer + */ + Polymer.Settings = Polymer.Settings || {}; + + Polymer.Settings.useShadow = !(window.ShadyDOM); + Polymer.Settings.useNativeCSSProperties = + Boolean(!window.ShadyCSS || window.ShadyCSS.nativeCss); + Polymer.Settings.useNativeCustomElements = + !(window.customElements.polyfillWrapFlushCallback); + + + /** + * Globally settable property that is automatically assigned to + * `Polymer.ElementMixin` instances, useful for binding in templates to + * make URL's relative to an application's root. Defaults to the main + * document URL, but can be overridden by users. It may be useful to set + * `Polymer.rootPath` to provide a stable application mount path when + * using client side routing. + * + * @memberof Polymer + */ + let rootPath = Polymer.rootPath || + Polymer.ResolveUrl.pathFromUrl(document.baseURI || window.location.href); + + Polymer.rootPath = rootPath; + + /** + * Sets the global rootPath property used by `Polymer.ElementMixin` and + * available via `Polymer.rootPath`. + * + * @memberof Polymer + * @param {string} path The new root path + * @return {void} + */ + Polymer.setRootPath = function(path) { + Polymer.rootPath = path; + }; + + /** + * A global callback used to sanitize any value before inserting it into the DOM. The callback signature is: + * + * Polymer = { + * sanitizeDOMValue: function(value, name, type, node) { ... } + * } + * + * Where: + * + * `value` is the value to sanitize. + * `name` is the name of an attribute or property (for example, href). + * `type` indicates where the value is being inserted: one of property, attribute, or text. + * `node` is the node where the value is being inserted. + * + * @type {(function(*,string,string,Node):*)|undefined} + * @memberof Polymer + */ + let sanitizeDOMValue = Polymer.sanitizeDOMValue; + + // This is needed for tooling + Polymer.sanitizeDOMValue = sanitizeDOMValue; + + /** + * Sets the global sanitizeDOMValue available via `Polymer.sanitizeDOMValue`. + * + * @memberof Polymer + * @param {(function(*,string,string,Node):*)|undefined} newSanitizeDOMValue the global sanitizeDOMValue callback + * @return {void} + */ + Polymer.setSanitizeDOMValue = function(newSanitizeDOMValue) { + Polymer.sanitizeDOMValue = newSanitizeDOMValue; + }; + + /** + * Globally settable property to make Polymer Gestures use passive TouchEvent listeners when recognizing gestures. + * When set to `true`, gestures made from touch will not be able to prevent scrolling, allowing for smoother + * scrolling performance. + * Defaults to `false` for backwards compatibility. + * + * @memberof Polymer + */ + let passiveTouchGestures = false; + + Polymer.passiveTouchGestures = passiveTouchGestures; + + /** + * Sets `passiveTouchGestures` globally for all elements using Polymer Gestures. + * + * @memberof Polymer + * @param {boolean} usePassive enable or disable passive touch gestures globally + * @return {void} + */ + Polymer.setPassiveTouchGestures = function(usePassive) { + Polymer.passiveTouchGestures = usePassive; + }; +})(); +</script> |