Browse Source

Fix blank flags page

tags/79.0.3945.117-1^0 79.0.3945.117-1
wchen342 1 year ago
parent
commit
0c450d9747
Signed by: wchen342 GPG Key ID: 720B70365E800508
9 changed files with 2815 additions and 2411 deletions
  1. +1
    -1
      CHANGELOG.md
  2. +0
    -1
      android_flags.debug.gn
  3. +1
    -1
      android_flags.gn
  4. +1
    -1
      android_flags.release.gn
  5. +1
    -1
      build.sh
  6. +2810
    -2048
      domain_sub_2.list
  7. +1
    -1
      misc/android_studio_setup.sh
  8. +0
    -1
      patches/series
  9. +0
    -356
      patches/src-fix/fix-closure-compiler-minify-error.patch

+ 1
- 1
CHANGELOG.md View File

@ -44,4 +44,4 @@
* Update NDK to r20b
* Remove split installer dependencies (Google Play), disable DFM
* Other source fixes
* Known issue: some pages, including `chrome://flags`, `chrome://gpu` are not working
* Known issue: ~~some pages, including `chrome://flags`, `chrome://gpu` are not working~~ (Fixed)

+ 0
- 1
android_flags.debug.gn View File

@ -17,7 +17,6 @@ enable_reporting=false
enable_service_discovery=false
enable_swiftshader=false
enable_widevine=true
exclude_unwind_tables=false
fatal_linker_warnings=false
fieldtrial_testing_like_official_build=true
google_api_key=""


+ 1
- 1
android_flags.gn View File

@ -4,7 +4,7 @@ android64_ndk_api_level=21
android_ndk_root = "//third_party/android_ndk"
android_ndk_version = "r20b"
android_ndk_major_version = 20
android_sdk_build_tools_version="27.0.3"
android_sdk_build_tools_version="29.0.2"
android_sdk_tools_version_suffix="-26.2.0-dev"
android_sdk_version=28
clang_base_path="/usr"


+ 1
- 1
android_flags.release.gn View File

@ -6,6 +6,6 @@ enable_iterator_debugging=false
enable_swiftshader=false
fatal_linker_warnings=false
is_debug=false
is_official_build=false
is_official_build=true
proprietary_codecs=true
symbol_level=0

+ 1
- 1
build.sh View File

@ -128,7 +128,7 @@ if [[ -d "$DIRECTORY" ]]; then
fi
mkdir "${DIRECTORY}" && pushd ${DIRECTORY}
# rm -rf add-ons emulator licenses platforms sources tools-lint build-tools ndk-bundle platform-tools tools
mkdir build-tools && ln -s ../../../../../android-sdk/android-sdk_user.9.0.0_r21_linux-x86/build-tools/android-9 build-tools/27.0.3
mkdir build-tools && ln -s ../../../../../android-sdk/android-sdk_user.9.0.0_r21_linux-x86/build-tools/android-9 build-tools/29.0.2
mkdir platforms
ln -s ../../../../../android-sdk/android-sdk_user.9.0.0_r21_linux-x86/platforms/android-9 platforms/android-28
ln -s ../../../../android-sdk/android-sdk_user.9.0.0_r21_linux-x86/platform-tools platform-tools


+ 2810
- 2048
domain_sub_2.list
File diff suppressed because it is too large
View File


+ 1
- 1
misc/android_studio_setup.sh View File

@ -38,7 +38,7 @@ cat ../android_flags.debug.gn ../android_flags.gn > ${output_folder}/args.gn
tools/gn/out/gn gen ${output_folder} --fail-on-unused-args
# Compile apk
ninja -C ${output_folder} ${target}
/usr/bin/ninja -C ${output_folder} ${target}
popd
###


+ 0
- 1
patches/series View File

@ -1,6 +1,5 @@
src-fix/android-rlz-fix-missing-variable.patch
src-fix/fix-null-mInstanceID.patch
src-fix/fix-closure-compiler-minify-error.patch
src-fix/fix-unkown-warning-clang-9.patch
src-fix/fix-safe-browsing-prefs.patch
src-fix/fix-wrong-macro-kSigninAllowedOnNextStartup.patch


+ 0
- 356
patches/src-fix/fix-closure-compiler-minify-error.patch View File

@ -1,356 +0,0 @@
description: prevent closure compiler from files not found error
author: Wengling Chen <[email protected]>
---
ui/webui/resources/js/assert.js | 6 +--
.../resources/js/cr/ui/focus_outline_manager.js | 2 +-
ui/webui/resources/js/i18n_behavior.js | 5 +--
ui/webui/resources/js/load_time_data.js | 7 +---
ui/webui/resources/js/parse_html_subset.js | 2 +-
ui/webui/resources/js/promise_resolver.js | 4 +-
ui/webui/resources/js/util.js | 48 ++++++++++------------
ui/webui/resources/js/web_ui_listener_behavior.js | 4 +-
8 files changed, 32 insertions(+), 46 deletions(-)
diff --git a/ui/webui/resources/js/assert.js b/ui/webui/resources/js/assert.js
--- a/ui/webui/resources/js/assert.js
+++ b/ui/webui/resources/js/assert.js
@@ -16,7 +16,7 @@
* @return {T} A non-null |condition|.
* @closurePrimitive {asserts.truthy}
*/
-/* #export */ function assert(condition, opt_message) {
+function assert(condition, opt_message) {
if (!condition) {
let message = 'Assertion failed';
if (opt_message) {
@@ -59,7 +59,7 @@
* @param {string=} opt_message A message to show when this is hit.
* @closurePrimitive {asserts.fail}
*/
-/* #export */ function assertNotReached(opt_message) {
+function assertNotReached(opt_message) {
assert(false, opt_message || 'Unreachable code hit');
}
@@ -70,7 +70,7 @@
* @return {T}
* @template T
*/
-/* #export */ function assertInstanceof(value, type, opt_message) {
+function assertInstanceof(value, type, opt_message) {
// We don't use assert immediately here so that we avoid constructing an error
// message if we don't have to.
if (!(value instanceof type)) {
diff --git a/ui/webui/resources/js/cr/ui/focus_outline_manager.js b/ui/webui/resources/js/cr/ui/focus_outline_manager.js
--- a/ui/webui/resources/js/cr/ui/focus_outline_manager.js
+++ b/ui/webui/resources/js/cr/ui/focus_outline_manager.js
@@ -26,7 +26,7 @@ cr.define('cr.ui', function() {
* it.
*
*/
- /* #export */ class FocusOutlineManager {
+ class FocusOutlineManager {
/**
* @param {!Document} doc The document to attach the focus outline manager
* to.
diff --git a/ui/webui/resources/js/i18n_behavior.js b/ui/webui/resources/js/i18n_behavior.js
--- a/ui/webui/resources/js/i18n_behavior.js
+++ b/ui/webui/resources/js/i18n_behavior.js
@@ -10,11 +10,8 @@
* handled by a C++ templatizer.
*/
-// #import {parseHtmlSubset} from './parse_html_subset.m.js';
-// #import {loadTimeData, SanitizeInnerHtmlOpts} from './load_time_data.m.js';
-
/** @polymerBehavior */
-/* #export */ const I18nBehavior = {
+const I18nBehavior = {
properties: {
/**
* The language the UI is presented in. Used to signal dynamic language
diff --git a/ui/webui/resources/js/load_time_data.js b/ui/webui/resources/js/load_time_data.js
--- a/ui/webui/resources/js/load_time_data.js
+++ b/ui/webui/resources/js/load_time_data.js
@@ -14,9 +14,6 @@
* change if the page is re-opened later.
*/
-// #import {assert} from './assert.m.js';
-// #import {parseHtmlSubset} from './parse_html_subset.m.js';
-
/**
* @typedef {{
* substitutions: (Array<string>|undefined),
@@ -24,10 +21,10 @@
* tags: (Array<string>|undefined),
* }}
*/
-/* #export */ let SanitizeInnerHtmlOpts;
+let SanitizeInnerHtmlOpts;
// eslint-disable-next-line no-var
-/* #export */ /** @type {!LoadTimeData} */ var loadTimeData;
+/** @type {!LoadTimeData} */ var loadTimeData;
// Expose this type globally as a temporary work around until
// https://github.com/google/closure-compiler/issues/544 is fixed.
diff --git a/ui/webui/resources/js/parse_html_subset.js b/ui/webui/resources/js/parse_html_subset.js
--- a/ui/webui/resources/js/parse_html_subset.js
+++ b/ui/webui/resources/js/parse_html_subset.js
@@ -12,7 +12,7 @@
* @throws {Error} In case of non supported markup.
* @return {DocumentFragment} A document fragment containing the DOM tree.
*/
-/* #export */ const parseHtmlSubset = (function() {
+const parseHtmlSubset = (function() {
'use strict';
const allowedAttributes = {
diff --git a/ui/webui/resources/js/promise_resolver.js b/ui/webui/resources/js/promise_resolver.js
--- a/ui/webui/resources/js/promise_resolver.js
+++ b/ui/webui/resources/js/promise_resolver.js
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// #import {assertNotReached} from './assert.m.js';
-
/**
* @fileoverview PromiseResolver is a helper class that allows creating a
* Promise that will be fulfilled (resolved or rejected) some time later.
@@ -20,7 +18,7 @@
/** @template T */
// eslint-disable-next-line no-var
-/* #export */ var PromiseResolver = class {
+var PromiseResolver = class {
constructor() {
/** @private {function(T=): void} */
this.resolve_;
diff --git a/ui/webui/resources/js/util.js b/ui/webui/resources/js/util.js
--- a/ui/webui/resources/js/util.js
+++ b/ui/webui/resources/js/util.js
@@ -2,16 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// #import {assertInstanceof} from './assert.m.js';
-// #import {dispatchSimpleEvent} from './cr.m.js';
-// <include src="assert.js">
-
/**
* Alias for document.getElementById. Found elements must be HTMLElements.
* @param {string} id The ID of the element to find.
* @return {HTMLElement} The found element or null if not found.
*/
-/* #export */ function $(id) {
+function $(id) {
// Disable getElementById restriction here, since we are instructing other
// places to re-use the $() that is defined here.
// eslint-disable-next-line no-restricted-properties
@@ -26,7 +22,7 @@
* @param {string} id The ID of the element to find.
* @return {Element} The found element or null if not found.
*/
-/* #export */ function getSVGElement(id) {
+function getSVGElement(id) {
// Disable getElementById restriction here, since it is not suitable for SVG
// elements.
// eslint-disable-next-line no-restricted-properties
@@ -38,7 +34,7 @@
* @return {?Element} The currently focused element (including elements that are
* behind a shadow root), or null if nothing is focused.
*/
-/* #export */ function getDeepActiveElement() {
+function getDeepActiveElement() {
let a = document.activeElement;
while (a && a.shadowRoot && a.shadowRoot.activeElement) {
a = a.shadowRoot.activeElement;
@@ -55,7 +51,7 @@
* other users. It's removed right away so it doesn't clutter the DOM.
* @param {string} msg The text to be pronounced.
*/
-/* #export */ function announceAccessibleMessage(msg) {
+function announceAccessibleMessage(msg) {
const element = document.createElement('div');
element.setAttribute('aria-live', 'polite');
element.style.position = 'fixed';
@@ -74,7 +70,7 @@
* @param {string} className A class to search for.
* @return {Element} A node with class of |className| or null if none is found.
*/
-/* #export */ function findAncestorByClass(el, className) {
+function findAncestorByClass(el, className) {
return /** @type {Element} */ (findAncestor(el, function(el) {
return el.classList && el.classList.contains(className);
}));
@@ -87,7 +83,7 @@
* nodes.
* @return {Node} The found ancestor or null if not found.
*/
-/* #export */ function findAncestor(node, predicate) {
+function findAncestor(node, predicate) {
let last = false;
while (node != null && !(last = predicate(node))) {
node = node.parentNode;
@@ -103,7 +99,7 @@
* @param {function(Event):boolean=} opt_allowDragStart Unless this function
* is defined and returns true, the ondragstart event will be surpressed.
*/
-/* #export */ function disableTextSelectAndDrag(
+function disableTextSelectAndDrag(
opt_allowSelectStart, opt_allowDragStart) {
// Disable text selection.
document.onselectstart = function(e) {
@@ -124,7 +120,7 @@
* Check the directionality of the page.
* @return {boolean} True if Chrome is running an RTL UI.
*/
-/* #export */ function isRTL() {
+function isRTL() {
return document.documentElement.dir == 'rtl';
}
@@ -135,7 +131,7 @@
* @param {string} id The identifier name.
* @return {!HTMLElement} the Element.
*/
-/* #export */ function getRequiredElement(id) {
+function getRequiredElement(id) {
return assertInstanceof(
$(id), HTMLElement, 'Missing required element: ' + id);
}
@@ -149,7 +145,7 @@
* context object for querySelector.
* @return {!HTMLElement} the Element.
*/
-/* #export */ function queryRequiredElement(selectors, opt_context) {
+function queryRequiredElement(selectors, opt_context) {
const element = (opt_context || document).querySelector(selectors);
return assertInstanceof(
element, HTMLElement, 'Missing required element: ' + selectors);
@@ -212,7 +208,7 @@
* @param {string} value The value of the param.
* @return {string} The new URL.
*/
-/* #export */ function appendParam(url, key, value) {
+function appendParam(url, key, value) {
const param = encodeURIComponent(key) + '=' + encodeURIComponent(value);
if (url.indexOf('?') == -1) {
@@ -227,7 +223,7 @@
* @param {string} className The class name to use.
* @return {Element} The created element.
*/
-/* #export */ function createElementWithClassName(type, className) {
+function createElementWithClassName(type, className) {
const elm = document.createElement(type);
elm.className = className;
return elm;
@@ -242,7 +238,7 @@
* transitionend to happen. If not specified, it is fetched from |el|
* using the transitionDuration style value.
*/
-/* #export */ function ensureTransitionEndEvent(el, opt_timeOut) {
+function ensureTransitionEndEvent(el, opt_timeOut) {
if (opt_timeOut === undefined) {
const style = getComputedStyle(el);
opt_timeOut = parseFloat(style.transitionDuration) * 1000;
@@ -269,7 +265,7 @@
* queried from.
* @return {number} The Y document scroll offset.
*/
-/* #export */ function scrollTopForDocument(doc) {
+function scrollTopForDocument(doc) {
return doc.documentElement.scrollTop || doc.body.scrollTop;
}
@@ -279,7 +275,7 @@
* queried from.
* @param {number} value The target Y scroll offset.
*/
-/* #export */ function setScrollTopForDocument(doc, value) {
+function setScrollTopForDocument(doc, value) {
doc.documentElement.scrollTop = doc.body.scrollTop = value;
}
@@ -289,7 +285,7 @@
* queried from.
* @return {number} The X document scroll offset.
*/
-/* #export */ function scrollLeftForDocument(doc) {
+function scrollLeftForDocument(doc) {
return doc.documentElement.scrollLeft || doc.body.scrollLeft;
}
@@ -299,7 +295,7 @@
* queried from.
* @param {number} value The target X scroll offset.
*/
-/* #export */ function setScrollLeftForDocument(doc, value) {
+function setScrollLeftForDocument(doc, value) {
doc.documentElement.scrollLeft = doc.body.scrollLeft = value;
}
@@ -308,7 +304,7 @@
* @param {string} original The original string.
* @return {string} The string with all the characters mentioned above replaced.
*/
-/* #export */ function HTMLEscape(original) {
+function HTMLEscape(original) {
return original.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
@@ -325,7 +321,7 @@
* |maxLength|. Otherwise the first |maxLength| - 1 characters with '...'
* appended.
*/
-/* #export */ function elide(original, maxLength) {
+function elide(original, maxLength) {
if (original.length <= maxLength) {
return original;
}
@@ -337,7 +333,7 @@
* @param {string} str The source string.
* @return {string} The escaped string.
*/
-/* #export */ function quoteString(str) {
+function quoteString(str) {
return str.replace(/([\\\.\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g, '\\$1');
}
@@ -350,7 +346,7 @@
* @param {function(!Event)} callback Called at most once. The
* optional return value is passed on by the listener.
*/
-/* #export */ function listenOnce(target, eventNames, callback) {
+function listenOnce(target, eventNames, callback) {
if (!Array.isArray(eventNames)) {
eventNames = eventNames.split(/ +/);
}
@@ -475,7 +471,7 @@ if (!('key' in KeyboardEvent.prototype)) {
* @param {!Event} e
* @return {boolean} Whether a modifier key was down when processing |e|.
*/
-/* #export */ function hasKeyModifiers(e) {
+function hasKeyModifiers(e) {
return !!(e.altKey || e.ctrlKey || e.metaKey || e.shiftKey);
}
diff --git a/ui/webui/resources/js/web_ui_listener_behavior.js b/ui/webui/resources/js/web_ui_listener_behavior.js
--- a/ui/webui/resources/js/web_ui_listener_behavior.js
+++ b/ui/webui/resources/js/web_ui_listener_behavior.js
@@ -7,11 +7,9 @@
* automatically remove WebUI listeners when detached.
*/
-// #import {WebUIListener, addWebUIListener, removeWebUIListener} from './cr.m.js';
-
/** @polymerBehavior */
// eslint-disable-next-line no-var
-/* #export */ var WebUIListenerBehavior = {
+var WebUIListenerBehavior = {
properties: {
/**
* Holds WebUI listeners that need to be removed when this element is

Loading…
Cancel
Save