diff --git a/tools/OWNERS b/tools/OWNERS index ac607d4..f096352 100644 --- a/tools/OWNERS +++ b/tools/OWNERS
@@ -9,6 +9,12 @@ scottmg@chromium.org thakis@chromium.org +# These aren't actually great contact points for this directory, but +# changes in this directory are rare and most changes happen in better-owned +# subdirectories. +# +# TEAM: infra-dev@chromium.org +# COMPONENT: Build per-file bisect*.py=anantha@chromium.org per-file bisect*.py=prasadv@chromium.org
diff --git a/tools/accessibility/rebase_dump_accessibility_tree_test.py b/tools/accessibility/rebase_dump_accessibility_tree_test.py index 837d5b8..ba5162c 100755 --- a/tools/accessibility/rebase_dump_accessibility_tree_test.py +++ b/tools/accessibility/rebase_dump_accessibility_tree_test.py
@@ -22,6 +22,7 @@ import sys import time import urllib +import urlparse # Load BeautifulSoup. It's checked into two places in the Chromium tree. sys.path.append('third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/') @@ -44,11 +45,14 @@ '''Parse given the name of a failing trybot and the url of its build log.''' print print "Checking trybot: %s" % name - url = url.replace('/builders/', '/json/builders/') + parse_result = urlparse.urlsplit(url) + url = "http://chrome-build-extract.appspot.com" + parse_result.path + "?json=1" response = urllib.urlopen(url) - if response.getcode() == 200: - jsondata = response.read() + if response.getcode() != 200: + print 'Error code %d accessing trybot url: %s' % (response.getcode(), url) + return + jsondata = response.read() if not jsondata: print "Failed to fetch from: " + url return @@ -69,15 +73,16 @@ print "Found content_browsertests logs" for log in step["logs"]: (log_name, log_url) = log - if log_name == "stdio": + if log_name == "stdio" or log_name == "swarming.summary" or log_name == "step_metadata": continue log_url += '/text' log_response = urllib.urlopen(log_url) if log_response.getcode() == 200: logdata = log_response.read() + print "Parsing test log: %s" % log_name ParseLog(logdata) else: - print "Failed to fetch test log data from: " + url + print "Error code %d when fetching test log data from url: %s" % (log_response.getcode(), url) def Fix(line): if line[:3] == '@@@':
diff --git a/tools/android/BUILD.gn b/tools/android/BUILD.gn index fc667ef2..23320039 100644 --- a/tools/android/BUILD.gn +++ b/tools/android/BUILD.gn
@@ -5,6 +5,7 @@ # Intermediate target grouping the android tools needed to run native # unittests and instrumentation test apks. group("android_tools") { + testonly = true deps = [ "//build/android:wrapper_scripts", "//build/android/pylib/device/commands",
diff --git a/tools/android/appstats.py b/tools/android/appstats.py index 032e847..305176c 100755 --- a/tools/android/appstats.py +++ b/tools/android/appstats.py
@@ -83,7 +83,8 @@ try: process_name = process_name.split(':')[0] cmd = ['dumpsys', 'package', process_name] - user_id_lines = adb.RunShellCommand(cmd, large_output=True) + user_id_lines = adb.RunShellCommand( + cmd, large_output=True, check_return=True) user_id_lines = Utils.FindLines(user_id_lines, 'userId=') if not user_id_lines: @@ -126,7 +127,9 @@ intersect the two. The returned result is sorted based on userid.""" pids = [] try: - pid_lines = adb.RunShellCommand(['ps'], large_output=True) + # TODO(catapult:#3215): Migrate to adb.GetPids(). + pid_lines = adb.RunShellCommand( + ['ps'], large_output=True, check_return=True) if default_pid: pid_lines = Utils.FindLines(pid_lines, str(default_pid)) if process_filter: @@ -209,7 +212,8 @@ found it will return [ 0, 0, 0 ].""" results = [0, 0, 0] - mem_lines = adb.RunShellCommand(['dumpsys', 'meminfo', pid]) + mem_lines = adb.RunShellCommand( + ['dumpsys', 'meminfo', pid], check_return=True) for line in mem_lines: match = re.split('\s+', line.strip()) @@ -263,7 +267,7 @@ represents the graphics memory usage. Will return this as a single entry array of [ Graphics ]. If not found, will return [ 0 ].""" try: - mem_lines = adb.RunShellCommand(['showmap', '-t', pid]) + mem_lines = adb.RunShellCommand(['showmap', '-t', pid], check_return=True) for line in mem_lines: match = re.split('[ ]+', line.strip()) if match[-1] in GraphicsHelper.__SHOWMAP_KEY_MATCHES: @@ -1009,4 +1013,3 @@ if __name__ == '__main__': sys.exit(main(sys.argv)) -
diff --git a/tools/android/customtabs_benchmark/BUILD.gn b/tools/android/customtabs_benchmark/BUILD.gn index ff365cab..01c5ccf 100644 --- a/tools/android/customtabs_benchmark/BUILD.gn +++ b/tools/android/customtabs_benchmark/BUILD.gn
@@ -4,11 +4,20 @@ import("//build/config/android/rules.gni") +android_resources("customtabs_benchmark_apk_resources") { + resource_dirs = [ "res/" ] + custom_package = "org.chromium.customtabs.test" +} + android_apk("customtabs_benchmark_apk") { - java_files = [ "java/src/org/chromium/customtabs/test/MainActivity.java" ] + java_files = [ + "java/src/org/chromium/customtabs/test/MainActivity.java", + "java/src/org/chromium/customtabs/test/WebViewActivity.java", + ] android_manifest = "java/AndroidManifest.xml" apk_name = "CustomTabsBenchmark" deps = [ + ":customtabs_benchmark_apk_resources", "//third_party/custom_tabs_client:custom_tabs_support_java", ] }
diff --git a/tools/android/customtabs_benchmark/java/AndroidManifest.xml b/tools/android/customtabs_benchmark/java/AndroidManifest.xml index 4dc91492..f0db60e 100644 --- a/tools/android/customtabs_benchmark/java/AndroidManifest.xml +++ b/tools/android/customtabs_benchmark/java/AndroidManifest.xml
@@ -4,18 +4,23 @@ in the LICENSE file. --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="org.chromium.customtabsclient.test" + package="org.chromium.customtabs.test" android:versionCode="1" android:versionName="1.0"> - <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="22" /> + <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="22" /> - <application> + <uses-permission android:name="android.permission.INTERNET" /> + + <application android:label="CustomTabsBenchmark"> <activity android:name="org.chromium.customtabs.test.MainActivity" - android:label="MainActivity"> + android:label="CustomTabsBenchmark"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> + <activity android:name="org.chromium.customtabs.test.WebViewActivity" + android:label="WebViewActivity" + android:exported="false"/> </application> </manifest>
diff --git a/tools/android/customtabs_benchmark/java/src/org/chromium/customtabs/test/MainActivity.java b/tools/android/customtabs_benchmark/java/src/org/chromium/customtabs/test/MainActivity.java index b1b336d4..a816e72 100644 --- a/tools/android/customtabs_benchmark/java/src/org/chromium/customtabs/test/MainActivity.java +++ b/tools/android/customtabs_benchmark/java/src/org/chromium/customtabs/test/MainActivity.java
@@ -18,14 +18,33 @@ import android.support.customtabs.CustomTabsServiceConnection; import android.support.customtabs.CustomTabsSession; import android.util.Log; +import android.view.View; +import android.widget.Button; +import android.widget.CheckBox; +import android.widget.EditText; +import android.widget.RadioButton; /** Activity used to benchmark Custom Tabs PLT. + * + * This activity contains benchmark code for two modes: + * 1. Comparison between a basic use of Custom Tabs and a basic use of WebView. + * 2. Custom Tabs benchmarking under various scenarios. + * + * The two modes are not merged into one as the metrics we can extract in the two cases + * are constrained for the first one by what WebView provides. */ -public class MainActivity extends Activity { - private static final String TAG = "CUSTOMTABSBENCH"; +public class MainActivity extends Activity implements View.OnClickListener { + static final String TAG = "CUSTOMTABSBENCH"; private static final String DEFAULT_URL = "https://www.android.com"; private static final String DEFAULT_PACKAGE = "com.google.android.apps.chrome"; private static final int NONE = -1; + // Common key between the benchmark modes. + private static final String URL_KEY = "url"; + + // Keys for the WebView / Custom Tabs comparison. + static final String INTENT_SENT_EXTRA = "intent_sent_ms"; + private static final String USE_WEBVIEW_KEY = "use_webview"; + private static final String WARMUP_KEY = "warmup"; // Keep in sync with the same constants in CustomTabsConnection. private static final String DEBUG_OVERRIDE_KEY = @@ -36,16 +55,167 @@ // Only for reporting. private static final int NO_STATE_PREFETCH = 3; + private final Handler mHandler = new Handler(Looper.getMainLooper()); + + private EditText mUrlEditText; + private RadioButton mChromeRadioButton; + private RadioButton mWebViewRadioButton; + private CheckBox mWarmupCheckbox; + private long mIntentSentMs; + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - processArguments(getIntent()); + final Intent intent = getIntent(); + + setUpUi(); + + // Automated mode, 1s later to leave time for the app to settle. + if (intent.getStringExtra(URL_KEY) != null) { + mHandler.postDelayed(new Runnable() { + @Override + public void run() { + processArguments(intent); + } + }, 1000); + } } - /** Process the arguments from the Intent extras. - */ + /** Displays the UI and registers the click listeners. */ + private void setUpUi() { + setContentView(R.layout.main); + + mUrlEditText = (EditText) findViewById(R.id.url_text); + mChromeRadioButton = (RadioButton) findViewById(R.id.radio_chrome); + mWebViewRadioButton = (RadioButton) findViewById(R.id.radio_webview); + mWarmupCheckbox = (CheckBox) findViewById(R.id.warmup_checkbox); + Button goButton = (Button) findViewById(R.id.go_button); + + mUrlEditText.setOnClickListener(this); + mChromeRadioButton.setOnClickListener(this); + mWebViewRadioButton.setOnClickListener(this); + mWarmupCheckbox.setOnClickListener(this); + goButton.setOnClickListener(this); + } + + @Override + public void onClick(View v) { + int id = v.getId(); + + boolean warmup = mWarmupCheckbox.isChecked(); + boolean useChrome = mChromeRadioButton.isChecked(); + boolean useWebView = mWebViewRadioButton.isChecked(); + String url = mUrlEditText.getText().toString(); + + if (id == R.id.go_button) { + customTabsWebViewBenchmark(url, useChrome, useWebView, warmup); + } + } + + /** Routes to either of the benchmark modes. */ private void processArguments(Intent intent) { - String url = intent.getStringExtra("url"); + if (intent.hasExtra(USE_WEBVIEW_KEY)) { + startCustomTabsWebViewBenchmark(intent); + } else { + startCustomTabsBenchmark(intent); + } + } + + /** Start the CustomTabs / WebView comparison benchmark. + * + * NOTE: Methods below are for the first benchmark mode. + */ + private void startCustomTabsWebViewBenchmark(Intent intent) { + Bundle extras = intent.getExtras(); + String url = extras.getString(URL_KEY); + boolean useWebView = extras.getBoolean(USE_WEBVIEW_KEY); + boolean useChrome = !useWebView; + boolean warmup = extras.getBoolean(WARMUP_KEY); + customTabsWebViewBenchmark(url, useChrome, useWebView, warmup); + } + + /** Start the CustomTabs / WebView comparison benchmark. */ + private void customTabsWebViewBenchmark( + String url, boolean useChrome, boolean useWebView, boolean warmup) { + if (useChrome) { + launchChrome(url, warmup); + } else { + assert useWebView; + launchWebView(url); + } + } + + private void launchWebView(String url) { + Intent intent = new Intent(); + intent.setData(Uri.parse(url)); + intent.setClass(this, WebViewActivity.class); + intent.putExtra(INTENT_SENT_EXTRA, now()); + startActivity(intent); + } + + private void launchChrome(final String url, final boolean warmup) { + CustomTabsServiceConnection connection = new CustomTabsServiceConnection() { + @Override + public void onCustomTabsServiceConnected(ComponentName name, CustomTabsClient client) { + launchChromeIntent(url, warmup, client); + } + + @Override + public void onServiceDisconnected(ComponentName name) {} + }; + CustomTabsClient.bindCustomTabsService(this, DEFAULT_PACKAGE, connection); + } + + private void launchChromeIntent(String url, boolean warmup, CustomTabsClient client) { + CustomTabsCallback callback = new CustomTabsCallback() { + private long mNavigationStartOffsetMs; + + @Override + public void onNavigationEvent(int navigationEvent, Bundle extras) { + long offsetMs = now() - mIntentSentMs; + switch (navigationEvent) { + case CustomTabsCallback.NAVIGATION_STARTED: + mNavigationStartOffsetMs = offsetMs; + Log.w(TAG, "navigationStarted = " + offsetMs); + break; + case CustomTabsCallback.NAVIGATION_FINISHED: + Log.w(TAG, "navigationFinished = " + offsetMs); + Log.w(TAG, "CHROME," + mNavigationStartOffsetMs + "," + offsetMs); + break; + default: + break; + } + } + }; + CustomTabsSession session = client.newSession(callback); + final CustomTabsIntent customTabsIntent = new CustomTabsIntent.Builder(session).build(); + final Uri uri = Uri.parse(url); + + if (warmup) { + client.warmup(0); + mHandler.postDelayed(new Runnable() { + @Override + public void run() { + mIntentSentMs = now(); + customTabsIntent.launchUrl(MainActivity.this, uri); + } + }, 3000); + } else { + mIntentSentMs = now(); + customTabsIntent.launchUrl(MainActivity.this, uri); + } + } + + static long now() { + return System.currentTimeMillis(); + } + + /** Start the second benchmark mode. + * + * NOTE: Methods below are for the second mode. + */ + private void startCustomTabsBenchmark(Intent intent) { + String url = intent.getStringExtra(URL_KEY); if (url == null) url = DEFAULT_URL; String packageName = intent.getStringExtra("package_name"); if (packageName == null) packageName = DEFAULT_PACKAGE; @@ -146,8 +316,7 @@ /** Same as {@link logMetricsAndFinish()} with a set delay in ms. */ public void logMetricsAndFinishDelayed(int delayMs) { - Handler handler = new Handler(Looper.getMainLooper()); - handler.postDelayed(new Runnable() { + mHandler.postDelayed(new Runnable() { @Override public void run() { logMetricsAndFinish(); @@ -159,7 +328,6 @@ private void onCustomTabsServiceConnected(CustomTabsClient client, final Uri uri, final CustomCallback cb, boolean warmup, final int prerenderMode, int delayToMayLaunchUrl, final int delayToLaunchUrl, final int timeoutSeconds) { - final Handler handler = new Handler(Looper.getMainLooper()); final CustomTabsSession session = client.newSession(cb); final CustomTabsIntent intent = (new CustomTabsIntent.Builder(session)).build(); final Runnable launchRunnable = new Runnable() { @@ -181,15 +349,15 @@ } session.mayLaunchUrl(uri, extras, null); - handler.postDelayed(launchRunnable, delayToLaunchUrl); + mHandler.postDelayed(launchRunnable, delayToLaunchUrl); } }; if (warmup) client.warmup(0); if (delayToMayLaunchUrl != NONE) { - handler.postDelayed(mayLaunchRunnable, delayToMayLaunchUrl); + mHandler.postDelayed(mayLaunchRunnable, delayToMayLaunchUrl); } else { - launchRunnable.run(); + mHandler.postDelayed(launchRunnable, delayToLaunchUrl); } }
diff --git a/tools/android/customtabs_benchmark/java/src/org/chromium/customtabs/test/WebViewActivity.java b/tools/android/customtabs_benchmark/java/src/org/chromium/customtabs/test/WebViewActivity.java new file mode 100644 index 0000000..f54d0f8 --- /dev/null +++ b/tools/android/customtabs_benchmark/java/src/org/chromium/customtabs/test/WebViewActivity.java
@@ -0,0 +1,82 @@ +// Copyright 2017 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. + +package org.chromium.customtabs.test; + +import android.app.Activity; +import android.graphics.Bitmap; +import android.os.Bundle; +import android.os.Handler; +import android.os.Looper; +import android.util.Log; +import android.view.View; +import android.webkit.WebChromeClient; +import android.webkit.WebView; +import android.webkit.WebViewClient; +import android.widget.ProgressBar; + +/** Very basic WebView based activity for benchmarking. */ +public class WebViewActivity extends Activity { + private final Handler mHandler = new Handler(Looper.getMainLooper()); + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_web_view); + + mHandler.post(new Runnable() { + @Override + public void run() { + go(); + } + }); + } + + private void go() { + String url = getIntent().getData().toString(); + final long intentSentMs = getIntent().getLongExtra(MainActivity.INTENT_SENT_EXTRA, -1); + + WebView webView = (WebView) findViewById(R.id.webview); + final ProgressBar progressBar = (ProgressBar) findViewById(R.id.progress_bar); + + setTitle(url); + + webView.setVisibility(View.VISIBLE); + webView.getSettings().setJavaScriptEnabled(true); + webView.setWebViewClient(new WebViewClient() { + private long mPageStartedOffsetMs = -1; + + @Override + public boolean shouldOverrideUrlLoading(WebView view, String url) { + return false; + } + + @Override + public void onPageStarted(WebView view, String url, Bitmap favicon) { + long offsetMs = MainActivity.now() - intentSentMs; + Log.w(MainActivity.TAG, "navigationStarted = " + offsetMs + " url = " + url); + // Can be called several times (redirects). + if (mPageStartedOffsetMs == -1) mPageStartedOffsetMs = offsetMs; + } + + @Override + public void onPageFinished(WebView view, String url) { + long offsetMs = MainActivity.now() - intentSentMs; + Log.w(MainActivity.TAG, "navigationFinished = " + offsetMs); + Log.w(MainActivity.TAG, "WEBVIEW," + mPageStartedOffsetMs + "," + offsetMs); + } + }); + webView.setWebChromeClient(new WebChromeClient() { + @Override + public void onProgressChanged(WebView view, int newProgress) { + if (progressBar.getVisibility() == View.GONE) { + progressBar.setVisibility(View.VISIBLE); + } + progressBar.setProgress(newProgress); + } + }); + + webView.loadUrl(url); + } +}
diff --git a/tools/android/customtabs_benchmark/res/layout/activity_web_view.xml b/tools/android/customtabs_benchmark/res/layout/activity_web_view.xml new file mode 100644 index 0000000..ed13643f --- /dev/null +++ b/tools/android/customtabs_benchmark/res/layout/activity_web_view.xml
@@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (c) 2017 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. --> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/activity_web_view" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context="org.chromium.customtabs.test.WebViewActivity" + android:orientation="vertical"> + + <ProgressBar + style="@android:style/Widget.Material.Light.ProgressBar.Horizontal" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:id="@+id/progress_bar" + android:max="100" /> + + <WebView + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_margin="0dp" + android:padding="0dp" + android:id="@+id/webview" + android:visibility="visible"/> +</LinearLayout>
diff --git a/tools/android/customtabs_benchmark/res/layout/main.xml b/tools/android/customtabs_benchmark/res/layout/main.xml new file mode 100644 index 0000000..6c3a9b0 --- /dev/null +++ b/tools/android/customtabs_benchmark/res/layout/main.xml
@@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (c) 2017 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. --> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/activity_main" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:paddingBottom="16dp" + android:paddingStart="16dp" + android:paddingEnd="16dp" + android:paddingTop="16dp" + tools:context="org.chromium.customtabs.test.MainActivity" + android:orientation="vertical"> + + <TextView + android:text="@string/url_to_load" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:id="@+id/textView3" + android:labelFor="@+id/url_text" /> + + <EditText + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:inputType="textUri" + android:text="@string/default_url" + android:ems="10" + android:id="@+id/url_text" /> + <RadioGroup xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + <RadioButton android:id="@+id/radio_chrome" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/chrome" + android:checked="true" /> + <RadioButton android:id="@+id/radio_webview" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/webview"/> + </RadioGroup> + + <CheckBox + android:text="@string/warmup" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:id="@+id/warmup_checkbox" /> + + <Button + android:text="@string/go" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:id="@+id/go_button" /> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:id="@+id/textView4" /> +</LinearLayout>
diff --git a/tools/android/customtabs_benchmark/res/values/strings.xml b/tools/android/customtabs_benchmark/res/values/strings.xml new file mode 100644 index 0000000..705141c --- /dev/null +++ b/tools/android/customtabs_benchmark/res/values/strings.xml
@@ -0,0 +1,8 @@ +<resources> + <string name="url_to_load">URL to Load:</string> + <string name="default_url">https://www.android.com</string> + <string name="chrome">Chrome</string> + <string name="webview">WebView</string> + <string name="warmup">Call Warmup (3s delay)</string> + <string name="go">Go</string> +</resources>
diff --git a/tools/android/customtabs_benchmark/scripts/customtabs_benchmark.py b/tools/android/customtabs_benchmark/scripts/customtabs_benchmark.py index c4bb1dc..3676ceeb 100755 --- a/tools/android/customtabs_benchmark/scripts/customtabs_benchmark.py +++ b/tools/android/customtabs_benchmark/scripts/customtabs_benchmark.py
@@ -22,6 +22,7 @@ sys.path.append(os.path.join(_SRC_PATH, 'third_party', 'catapult', 'devil')) from devil.android import device_errors from devil.android import device_utils +from devil.android import flag_changer from devil.android.perf import cache_control from devil.android.sdk import intent @@ -36,7 +37,7 @@ # Local build of Chrome (not Chromium). _CHROME_PACKAGE = 'com.google.android.apps.chrome' _COMMAND_LINE_FILE = 'chrome-command-line' -_TEST_APP_PACKAGE_NAME = 'org.chromium.customtabsclient.test' +_TEST_APP_PACKAGE_NAME = 'org.chromium.customtabs.test' _INVALID_VALUE = -1 @@ -70,7 +71,8 @@ logcat_timeout = int(timeout_s + delay_to_may_launch_url / 1000. + delay_to_launch_url / 1000.) + 3; - with device_setup.FlagReplacer(device, _COMMAND_LINE_FILE, chrome_args): + with flag_changer.CustomCommandLineFlags( + device, _COMMAND_LINE_FILE, chrome_args): launch_intent = intent.Intent( action='android.intent.action.MAIN', package=_TEST_APP_PACKAGE_NAME,
diff --git a/tools/android/customtabs_benchmark/scripts/launch.sh b/tools/android/customtabs_benchmark/scripts/launch.sh new file mode 100755 index 0000000..35d4460 --- /dev/null +++ b/tools/android/customtabs_benchmark/scripts/launch.sh
@@ -0,0 +1,25 @@ +#!/bin/sh +# +# Copyright 2017 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. + +set -x + +PACKAGE_NAME="org.chromium.customtabs.test" +URL=$1 +USE_WEBVIEW=$2 +WARMUP=$3 + +adb root + +adb shell am force-stop com.google.android.apps.chrome +adb shell am force-stop $PACKAGE_NAME +adb shell "echo 3 > /proc/sys/vm/drop_caches" + +sleep 3 + +adb shell am start -n ${PACKAGE_NAME}/.MainActivity \ + --es "url" "$URL" \ + --ez "use_webview" "$USE_WEBVIEW" \ + --ez "warmup" "$WARMUP"
diff --git a/tools/android/eclipse/.classpath b/tools/android/eclipse/.classpath index 12e7522a..91700431 100644 --- a/tools/android/eclipse/.classpath +++ b/tools/android/eclipse/.classpath
@@ -56,6 +56,8 @@ <classpathentry kind="src" path="components/location/android/java/src"/> <classpathentry kind="src" path="components/navigation_interception/android/java/src"/> <classpathentry kind="src" path="components/ntp_tiles/android/java/src"/> + <classpathentry kind="src" path="components/offline_items_collection/core/android/java/src"/> + <classpathentry kind="src" path="components/payments/content/android/java/src"/> <classpathentry kind="src" path="components/policy/android/java/src"/> <classpathentry kind="src" path="components/precache/android/java/src"/> <classpathentry kind="src" path="components/precache/android/javatests/src"/> @@ -121,6 +123,7 @@ <classpathentry kind="src" path="third_party/mockito/src/src/main/java"/> <classpathentry kind="src" path="third_party/robolectric/robolectric/robolectric-annotations/src/main/java"/> <classpathentry kind="src" path="third_party/robolectric/robolectric/robolectric-resources/src/main/java"/> + <classpathentry kind="src" path="third_party/robolectric/robolectric/robolectric-shadows/shadows-multidex/src/main/java"/> <classpathentry kind="src" path="tools/android/findbugs_plugin/src"/> <classpathentry kind="src" path="tools/android/findbugs_plugin/test/java/src"/> <classpathentry kind="src" path="tools/android/memconsumer/java/src"/> @@ -216,19 +219,20 @@ <classpathentry kind="src" path="out/Debug/java_proto/test_support_proto_java/src"/> <classpathentry kind="src" path="out/Debug/remoting_apk/gen"/> <classpathentry kind="lib" path="third_party/android_tools/sdk/extras/google/gcm/gcm-client/dist/gcm.jar" sourcepath="third_party/android_tools/sdk/extras/google/gcm/gcm-client/src"/> - <classpathentry kind="lib" path="third_party/android_tools/sdk/platforms/android-24/android.jar" sourcepath="third_party/android_tools/sdk/sources/"> + <classpathentry kind="lib" path="third_party/android_tools/sdk/platforms/android-25/android.jar" sourcepath="third_party/android_tools/sdk/sources/"> <attributes> <attribute name="javadoc_location" value="http://developer.android.com/reference/"/> </attributes> </classpathentry> - <classpathentry kind="lib" path="third_party/android_tools/sdk/platforms/android-24/data/layoutlib.jar" sourcepath="third_party/android_tools/sdk/sources/"/> - <classpathentry kind="lib" path="third_party/android_tools/sdk/platforms/android-24/uiautomator.jar" sourcepath="third_party/android_tools/sdk/sources"/> + <classpathentry kind="lib" path="third_party/android_tools/sdk/platforms/android-25/data/layoutlib.jar" sourcepath="third_party/android_tools/sdk/sources/"/> + <classpathentry kind="lib" path="third_party/android_tools/sdk/platforms/android-25/uiautomator.jar" sourcepath="third_party/android_tools/sdk/sources"/> <classpathentry kind="lib" path="third_party/android_tools/sdk/extras/android/support/design/libs/android-support-design.jar" sourcepath="third_party/android_tools/sdk/sources"/> <classpathentry kind="lib" path="third_party/android_tools/sdk/extras/android/support/v7/mediarouter/libs/android-support-v7-mediarouter.jar" sourcepath="third_party/android_tools/sdk/sources"/> <classpathentry kind="lib" path="third_party/android_tools/sdk/extras/android/support/v7/recyclerview/libs/android-support-v7-recyclerview.jar" sourcepath="third_party/android_tools/sdk/sources"/> <classpathentry kind="lib" path="third_party/android_tools/sdk/extras/android/support/v13/android-support-v13.jar" sourcepath="third_party/android_tools/sdk/sources"/> <classpathentry kind="lib" path="third_party/android_tools/sdk/extras/android/support/v7/appcompat/libs/android-support-v7-appcompat.jar" sourcepath="third_party/android_tools/sdk/sources"/> <classpathentry kind="lib" path="third_party/android_support_test_runner/lib/runner-0.5-release-no-dep.jar"/> + <classpathentry kind="lib" path="third_party/android_support_test_runner/lib/rules-0.5.jar"/> <classpathentry kind="lib" path="third_party/bouncycastle/lib/bcprov-jdk16-1.46.jar"/> <classpathentry kind="lib" path="third_party/byte_buddy/lib/byte-buddy-1.4.17.jar"/> <classpathentry kind="lib" path="third_party/findbugs/lib/findbugs.jar"/>
diff --git a/tools/android/forwarder2/BUILD.gn b/tools/android/forwarder2/BUILD.gn index c225b50..9a28729 100644 --- a/tools/android/forwarder2/BUILD.gn +++ b/tools/android/forwarder2/BUILD.gn
@@ -3,10 +3,13 @@ # found in the LICENSE file. import("//build/symlink.gni") +import("//testing/test.gni") group("forwarder2") { + testonly = true data_deps = [ ":host_forwarder", + ":host_forwarder_unittests", ":device_forwarder_prepare_dist($default_toolchain)", ] } @@ -58,7 +61,7 @@ } if (current_toolchain != default_toolchain) { - executable("host_forwarder") { + source_set("host_forwarder_source_set") { sources = [ "command.cc", "command.h", @@ -72,7 +75,8 @@ "forwarders_manager.h", "host_controller.cc", "host_controller.h", - "host_forwarder_main.cc", + "host_controllers_manager.cc", + "host_controllers_manager.h", "pipe_notifier.cc", "pipe_notifier.h", "self_deleter_helper.h", @@ -86,9 +90,36 @@ "//tools/android/common", ] } + + executable("host_forwarder") { + sources = [ + "host_forwarder_main.cc", + ] + deps = [ + ":host_forwarder_source_set", + "//base", + ] + } + + test("host_forwarder_unittests") { + testonly = true + sources = [ + "host_controllers_manager_unittest.cc", + ] + deps = [ + ":host_forwarder_source_set", + "//base", + "//testing/gtest", + "//testing/gtest:gtest_main", + ] + } } else { # Create a symlink from root_build_dir -> clang_x64/host_forwarder. binary_symlink("host_forwarder") { binary_label = ":$target_name($host_toolchain)" } + binary_symlink("host_forwarder_unittests") { + testonly = true + binary_label = ":$target_name($host_toolchain)" + } }
diff --git a/tools/android/forwarder2/command.cc b/tools/android/forwarder2/command.cc index 8e1dc7b3..e88960b 100644 --- a/tools/android/forwarder2/command.cc +++ b/tools/android/forwarder2/command.cc
@@ -104,7 +104,7 @@ int timeout_secs) { int port; command::Type received_command; - if (!ReadCommand(socket, &port, &received_command)) + if (!ReadCommandWithTimeout(socket, &port, &received_command, timeout_secs)) return false; return received_command == command; }
diff --git a/tools/android/forwarder2/host_controllers_manager.cc b/tools/android/forwarder2/host_controllers_manager.cc new file mode 100644 index 0000000..b4bb458 --- /dev/null +++ b/tools/android/forwarder2/host_controllers_manager.cc
@@ -0,0 +1,318 @@ +// Copyright 2017 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. + +#include "tools/android/forwarder2/host_controllers_manager.h" + +#include "base/process/launch.h" +#include "base/strings/string_split.h" +#include "base/strings/string_util.h" +#include "base/strings/stringprintf.h" +#include "tools/android/forwarder2/util.h" + +namespace forwarder2 { + +HostControllersManager::HostControllersManager( + base::Callback<int()> exit_notifier_fd_callback) + : controllers_(new HostControllerMap()), + exit_notifier_fd_callback_(exit_notifier_fd_callback), + has_failed_(false), + weak_ptr_factory_(this) {} + +HostControllersManager::~HostControllersManager() { + if (!thread_.get()) + return; + // Delete the controllers on the thread they were created on. + thread_->task_runner()->DeleteSoon(FROM_HERE, controllers_.release()); +} + +void HostControllersManager::HandleRequest( + const std::string& adb_path, + const std::string& device_serial, + int command, + int device_port, + int host_port, + std::unique_ptr<Socket> client_socket) { + // Lazy initialize so that the CLI process doesn't get this thread created. + InitOnce(); + thread_->task_runner()->PostTask( + FROM_HERE, + base::Bind(&HostControllersManager::HandleRequestOnInternalThread, + base::Unretained(this), adb_path, device_serial, command, + device_port, host_port, base::Passed(&client_socket))); +} + +// static +std::string HostControllersManager::MakeHostControllerMapKey(int adb_port, + int device_port) { + return base::StringPrintf("%d:%d", adb_port, device_port); +} + +void HostControllersManager::InitOnce() { + if (thread_.get()) + return; + at_exit_manager_.reset(new base::AtExitManager()); + thread_.reset(new base::Thread("HostControllersManagerThread")); + thread_->Start(); +} + +// static +void HostControllersManager::DeleteHostController( + const base::WeakPtr<HostControllersManager>& manager_ptr, + std::unique_ptr<HostController> host_controller) { + HostController* const controller = host_controller.release(); + HostControllersManager* const manager = manager_ptr.get(); + if (!manager) { + // Note that |controller| is not leaked in this case since the host + // controllers manager owns the controllers. If the manager was deleted + // then all the controllers (including |controller|) were also deleted. + return; + } + DCHECK(manager->thread_->task_runner()->RunsTasksOnCurrentThread()); + // Note that this will delete |controller| which is owned by the map. + DeleteRefCountedValueInMap( + MakeHostControllerMapKey(controller->adb_port(), + controller->device_port()), + manager->controllers_.get()); +} + +void HostControllersManager::Map(const std::string& adb_path, + const std::string& device_serial, + int adb_port, + int device_port, + int host_port, + Socket* client_socket) { + if (host_port < 0) { + SendMessage("ERROR: missing host port\n", client_socket); + return; + } + const bool use_dynamic_port_allocation = device_port == 0; + if (!use_dynamic_port_allocation) { + const std::string controller_key = + MakeHostControllerMapKey(adb_port, device_port); + if (controllers_->find(controller_key) != controllers_->end()) { + LOG(INFO) << "Already forwarding device port " << device_port + << " to host port " << host_port; + SendMessage(base::StringPrintf("%d:%d", device_port, host_port), + client_socket); + return; + } + } + // Create a new host controller. + std::unique_ptr<HostController> host_controller(HostController::Create( + device_serial, device_port, host_port, adb_port, + exit_notifier_fd_callback_.Run(), + base::Bind(&HostControllersManager::DeleteHostController, + weak_ptr_factory_.GetWeakPtr()))); + if (!host_controller.get()) { + has_failed_ = true; + SendMessage("ERROR: Connection to device failed.\n", client_socket); + LogExistingControllers(client_socket); + return; + } + // Get the current allocated port. + device_port = host_controller->device_port(); + LOG(INFO) << "Forwarding device port " << device_port << " to host port " + << host_port; + const std::string msg = base::StringPrintf("%d:%d", device_port, host_port); + if (!SendMessage(msg, client_socket)) + return; + host_controller->Start(); + controllers_->insert( + std::make_pair(MakeHostControllerMapKey(adb_port, device_port), + linked_ptr<HostController>(host_controller.release()))); +} + +void HostControllersManager::Unmap(const std::string& adb_path, + const std::string& device_serial, + int adb_port, + int device_port, + Socket* client_socket) { + // Remove the previously created host controller. + const std::string controller_key = + MakeHostControllerMapKey(adb_port, device_port); + const bool controller_did_exist = + DeleteRefCountedValueInMap(controller_key, controllers_.get()); + if (!controller_did_exist) { + SendMessage("ERROR: could not unmap port.\n", client_socket); + LogExistingControllers(client_socket); + } else { + SendMessage("OK", client_socket); + } + + RemoveAdbPortForDeviceIfNeeded(adb_path, device_serial); +} + +void HostControllersManager::UnmapAll(const std::string& adb_path, + const std::string& device_serial, + int adb_port, + Socket* client_socket) { + const std::string adb_port_str = base::StringPrintf("%d", adb_port); + for (HostControllerMap::const_iterator controller_key = + controllers_->cbegin(); + controller_key != controllers_->cend(); ++controller_key) { + std::vector<std::string> pieces = + base::SplitString(controller_key->first, ":", base::KEEP_WHITESPACE, + base::SPLIT_WANT_ALL); + if (pieces.size() == 2) { + if (pieces[0] == adb_port_str) { + DeleteRefCountedValueInMapFromIterator(controller_key, + controllers_.get()); + } + } else { + LOG(ERROR) << "Unexpected controller key: " << controller_key->first; + } + } + + RemoveAdbPortForDeviceIfNeeded(adb_path, device_serial); + SendMessage("OK", client_socket); +} + +void HostControllersManager::HandleRequestOnInternalThread( + const std::string& adb_path, + const std::string& device_serial, + int command, + int device_port, + int host_port, + std::unique_ptr<Socket> client_socket) { + const int adb_port = GetAdbPortForDevice(adb_path, device_serial); + if (adb_port < 0) { + SendMessage( + "ERROR: could not get adb port for device. You might need to add " + "'adb' to your PATH or provide the device serial id.\n", + client_socket.get()); + return; + } + switch (command) { + case MAP: + Map(adb_path, device_serial, adb_port, device_port, host_port, + client_socket.get()); + break; + case UNMAP: + Unmap(adb_path, device_serial, adb_port, device_port, + client_socket.get()); + break; + case UNMAP_ALL: + UnmapAll(adb_path, device_serial, adb_port, client_socket.get()); + break; + default: + SendMessage( + base::StringPrintf("ERROR: unrecognized command %d\n", command), + client_socket.get()); + break; + } +} + +void HostControllersManager::LogExistingControllers(Socket* client_socket) { + SendMessage("ERROR: Existing controllers:\n", client_socket); + for (const auto& controller : *controllers_) { + SendMessage(base::StringPrintf("ERROR: %s\n", controller.first.c_str()), + client_socket); + } +} + +bool HostControllersManager::Adb(const std::string& adb_path, + const std::string& device_serial, + const std::string& command, + std::string* output_and_error) { + // We use the vector version of GetAppOutputAndError rather than the + // more standard base::CommandLine version because base::CommandLine + // reorders the command s.t. switches precede arguments and doing so + // here creates an invalid adb command. + std::vector<std::string> adb_command{adb_path}; + if (!device_serial.empty()) { + adb_command.push_back("-s"); + adb_command.push_back(device_serial); + } + const std::vector<std::string> split_command = base::SplitString( + command, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY); + adb_command.insert(adb_command.end(), split_command.begin(), + split_command.end()); + return GetAppOutputAndError(adb_command, output_and_error); +} + +void HostControllersManager::RemoveAdbPortForDeviceIfNeeded( + const std::string& adb_path, + const std::string& device_serial) { + base::hash_map<std::string, int>::const_iterator it = + device_serial_to_adb_port_map_.find(device_serial); + if (it == device_serial_to_adb_port_map_.end()) + return; + + int port = it->second; + const std::string prefix = base::StringPrintf("%d:", port); + for (HostControllerMap::const_iterator others = controllers_->begin(); + others != controllers_->end(); ++others) { + if (base::StartsWith(others->first, prefix, base::CompareCase::SENSITIVE)) + return; + } + // No other port is being forwarded to this device: + // - Remove it from our internal serial -> adb port map. + // - Remove from "adb forward" command. + LOG(INFO) << "Device " << device_serial << " has no more ports."; + device_serial_to_adb_port_map_.erase(device_serial); + const std::string command = + base::StringPrintf("forward --remove tcp:%d", port); + std::string output; + if (!Adb(adb_path, device_serial, command, &output)) { + LOG(ERROR) << command << " failed. output: \"" << output << "\""; + } else { + LOG(INFO) << command << " (output: \"" << output << "\")"; + } + // Wait for the socket to be fully unmapped. + const std::string port_mapped_cmd = base::StringPrintf("lsof -nPi:%d", port); + const std::vector<std::string> port_mapped_split_cmd = base::SplitString( + port_mapped_cmd, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY); + const int poll_interval_us = 500 * 1000; + int retries = 3; + while (retries) { + // lsof failure means the port was successfully unmapped. + bool port_unmapped = !GetAppOutputAndError(port_mapped_split_cmd, &output); + LOG(INFO) << "Device " << device_serial << " port " << port + << (port_unmapped ? "" : " not") << " unmapped"; + if (port_unmapped) + break; + --retries; + usleep(poll_interval_us); + } +} + +int HostControllersManager::GetAdbPortForDevice( + const std::string adb_path, + const std::string& device_serial) { + base::hash_map<std::string, int>::const_iterator it = + device_serial_to_adb_port_map_.find(device_serial); + if (it != device_serial_to_adb_port_map_.end()) + return it->second; + Socket bind_socket; + CHECK(bind_socket.BindTcp("127.0.0.1", 0)); + const int port = bind_socket.GetPort(); + bind_socket.Close(); + const std::string command = base::StringPrintf( + "forward tcp:%d localabstract:chrome_device_forwarder", port); + std::string output; + if (!Adb(adb_path, device_serial, command, &output)) { + LOG(ERROR) << command << " failed. output: " << output; + return -1; + } + LOG(INFO) << command; + device_serial_to_adb_port_map_[device_serial] = port; + return port; +} + +bool HostControllersManager::SendMessage(const std::string& msg, + Socket* client_socket) { + bool result = client_socket->WriteString(msg); + DCHECK(result); + if (!result) + has_failed_ = true; + return result; +} + +bool HostControllersManager::GetAppOutputAndError( + const std::vector<std::string>& argv, + std::string* output) { + return base::GetAppOutputAndError(argv, output); +} + +} // namespace forwarder2
diff --git a/tools/android/forwarder2/host_controllers_manager.h b/tools/android/forwarder2/host_controllers_manager.h new file mode 100644 index 0000000..ab5869fa --- /dev/null +++ b/tools/android/forwarder2/host_controllers_manager.h
@@ -0,0 +1,118 @@ +// Copyright 2017 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. + +#ifndef TOOLS_ANDROID_FORWARDER2_HOST_CONTROLLERS_MANAGER_H_ +#define TOOLS_ANDROID_FORWARDER2_HOST_CONTROLLERS_MANAGER_H_ + +#include <memory> +#include <string> + +#include "base/at_exit.h" +#include "base/containers/hash_tables.h" +#include "base/gtest_prod_util.h" +#include "base/memory/linked_ptr.h" +#include "base/memory/weak_ptr.h" +#include "tools/android/forwarder2/host_controller.h" +#include "tools/android/forwarder2/socket.h" + +namespace forwarder2 { + +enum : int { + MAP = 0, + UNMAP = 1, + UNMAP_ALL = 2, +}; + +// Manages HostController instances. There is one HostController instance for +// each connection being forwarded. Note that forwarding can happen with many +// devices (identified with a serial id). +class HostControllersManager { + public: + explicit HostControllersManager( + base::Callback<int()> exit_notifier_fd_callback); + ~HostControllersManager(); + void HandleRequest(const std::string& adb_path, + const std::string& device_serial, + int command, + int device_port, + int host_port, + std::unique_ptr<Socket> client_socket); + bool has_failed() const { return has_failed_; } + + private: + FRIEND_TEST_ALL_PREFIXES(HostControllersManagerTest, AdbNoExtraFds); + FRIEND_TEST_ALL_PREFIXES(HostControllersManagerTest, AdbArgumentSequence); + + typedef base::hash_map<std::string, linked_ptr<HostController>> + HostControllerMap; + + static std::string MakeHostControllerMapKey(int adb_port, int device_port); + + void InitOnce(); + + // Invoked when a HostController instance reports an error (e.g. due to a + // device connectivity issue). Note that this could be called after the + // controller manager was destroyed which is why a weak pointer is used. + static void DeleteHostController( + const base::WeakPtr<HostControllersManager>& manager_ptr, + std::unique_ptr<HostController> host_controller); + + void Map(const std::string& adb_path, + const std::string& device_serial, + int adb_port, + int device_port, + int host_port, + Socket* client_socket); + + void Unmap(const std::string& adb_path, + const std::string& device_serial, + int adb_port, + int device_port, + Socket* client_socket); + + void UnmapAll(const std::string& adb_path, + const std::string& device_serial, + int adb_port, + Socket* client_socket); + + bool Adb(const std::string& adb_path, + const std::string& device_serial, + const std::string& command, + std::string* output_and_error); + + void HandleRequestOnInternalThread(const std::string& adb_path, + const std::string& device_serial, + int command, + int device_port, + int host_port, + std::unique_ptr<Socket> client_socket); + + void LogExistingControllers(Socket* client_socket); + + void RemoveAdbPortForDeviceIfNeeded(const std::string& adb_path, + const std::string& device_serial); + + int GetAdbPortForDevice(const std::string adb_path, + const std::string& device_serial); + + bool SendMessage(const std::string& msg, Socket* client_socket); + + // This is a separate virtual method solely for easy mocking. The default + // implementation is a wrapper around base::GetAppOutputAndError. + virtual bool GetAppOutputAndError(const std::vector<std::string>& argv, + std::string* output); + + base::hash_map<std::string, int> device_serial_to_adb_port_map_; + std::unique_ptr<HostControllerMap> controllers_; + std::unique_ptr<base::AtExitManager> + at_exit_manager_; // Needed by base::Thread. + std::unique_ptr<base::Thread> thread_; + base::Callback<int()> exit_notifier_fd_callback_; + bool has_failed_; + base::WeakPtrFactory<HostControllersManager> weak_ptr_factory_; +}; + +} // namespace forwarder2 + +#endif // TOOLS_ANDROID_FORWARDER2_HOST_CONTROLLERS_MANAGER_H_
diff --git a/tools/android/forwarder2/host_controllers_manager_unittest.cc b/tools/android/forwarder2/host_controllers_manager_unittest.cc new file mode 100644 index 0000000..3188780 --- /dev/null +++ b/tools/android/forwarder2/host_controllers_manager_unittest.cc
@@ -0,0 +1,71 @@ +// Copyright 2017 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. + +#include "tools/android/forwarder2/host_controllers_manager.h" + +#include <cstdio> + +#include "base/files/file_util.h" +#include "base/files/scoped_file.h" +#include "base/memory/ref_counted.h" +#include "base/strings/stringprintf.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace forwarder2 { + +namespace { + +int UnusedGetExitNotifierFD() { + return 0; +} + +base::FilePath CreateScript(const std::string script_contents) { + base::FilePath script_file; + FILE* script_file_handle = base::CreateAndOpenTemporaryFile(&script_file); + base::WriteFile(script_file, script_contents.c_str(), + script_contents.length()); + base::CloseFile(script_file_handle); + base::SetPosixFilePermissions(script_file, + base::FILE_PERMISSION_READ_BY_USER | + base::FILE_PERMISSION_EXECUTE_BY_USER); + return script_file; +} + +} // anonymous namespace + +// Ensure that we don't start the adb binary with superfluous file descriptors +// from the parent process. +TEST(HostControllersManagerTest, AdbNoExtraFds) { + HostControllersManager manager(base::Bind(&UnusedGetExitNotifierFD)); + base::FilePath unrelated_file; + base::ScopedFILE open_unrelated_file( + CreateAndOpenTemporaryFile(&unrelated_file)); + const int unrelated_fd = fileno(open_unrelated_file.get()); + base::FilePath adb_script = + CreateScript(base::StringPrintf("#! /bin/sh\n" + "test ! -e /proc/$$/fd/%d\n", + unrelated_fd)); + const std::string serial("0123456789abcdef"); + const std::string map_call( + "forward tcp:12345 localabstract:chrome_device_forwarder"); + std::string unused_output; + ASSERT_TRUE(manager.Adb(adb_script.value(), serial, map_call, &unused_output)) + << "File descriptor " << unrelated_fd << " leaked to child process"; +} + +// Ensure that we don't mangle the argument order. +TEST(HostControllersManagerTest, AdbArgumentSequence) { + HostControllersManager manager(base::Bind(&UnusedGetExitNotifierFD)); + base::FilePath adb_script = + CreateScript(base::StringPrintf("#! /bin/sh\n" + "echo -n \"$@\"\n")); + const std::string serial("0123456789abcdef"); + const std::string unmap_call("forward --remove tcp:12345"); + std::string output; + ASSERT_TRUE(manager.Adb(adb_script.value(), serial, unmap_call, &output)); + ASSERT_STREQ("-s 0123456789abcdef forward --remove tcp:12345", + output.c_str()); +} + +} // namespace forwarder2
diff --git a/tools/android/forwarder2/host_forwarder_main.cc b/tools/android/forwarder2/host_forwarder_main.cc index b335bfc6..0f5417f 100644 --- a/tools/android/forwarder2/host_forwarder_main.cc +++ b/tools/android/forwarder2/host_forwarder_main.cc
@@ -2,49 +2,36 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include <errno.h> #include <signal.h> #include <stddef.h> #include <stdint.h> #include <sys/types.h> -#include <sys/wait.h> -#include <unistd.h> #include <cstdio> #include <iostream> #include <limits> +#include <memory> #include <string> #include <utility> #include <vector> -#include "base/at_exit.h" #include "base/bind.h" #include "base/command_line.h" -#include "base/compiler_specific.h" -#include "base/containers/hash_tables.h" -#include "base/files/file_path.h" -#include "base/files/file_util.h" #include "base/logging.h" #include "base/macros.h" -#include "base/memory/linked_ptr.h" -#include "base/memory/weak_ptr.h" #include "base/pickle.h" -#include "base/process/launch.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_piece.h" -#include "base/strings/string_split.h" -#include "base/strings/string_util.h" -#include "base/strings/stringprintf.h" -#include "base/task_runner.h" -#include "base/threading/thread.h" #include "tools/android/forwarder2/common.h" #include "tools/android/forwarder2/daemon.h" -#include "tools/android/forwarder2/host_controller.h" +#include "tools/android/forwarder2/host_controllers_manager.h" #include "tools/android/forwarder2/pipe_notifier.h" -#include "tools/android/forwarder2/socket.h" -#include "tools/android/forwarder2/util.h" namespace forwarder2 { + +// Needs to be global to be able to be accessed from the signal handler. +PipeNotifier* g_notifier = NULL; + namespace { const char kLogFilePath[] = "/tmp/host_forwarder_log"; @@ -52,15 +39,6 @@ const int kBufSize = 256; -enum : int { - MAP = 0, - UNMAP = 1, - UNMAP_ALL = 2, -}; - -// Needs to be global to be able to be accessed from the signal handler. -PipeNotifier* g_notifier = NULL; - // Lets the daemon fetch the exit notifier file descriptor. int GetExitNotifierFD() { DCHECK(g_notifier); @@ -86,317 +64,12 @@ exit(1); } -// Manages HostController instances. There is one HostController instance for -// each connection being forwarded. Note that forwarding can happen with many -// devices (identified with a serial id). -class HostControllersManager { - public: - HostControllersManager() - : controllers_(new HostControllerMap()), - has_failed_(false), - weak_ptr_factory_(this) { - } - - ~HostControllersManager() { - if (!thread_.get()) - return; - // Delete the controllers on the thread they were created on. - thread_->task_runner()->DeleteSoon( - FROM_HERE, controllers_.release()); - } - - void HandleRequest(const std::string& adb_path, - const std::string& device_serial, - int command, - int device_port, - int host_port, - std::unique_ptr<Socket> client_socket) { - // Lazy initialize so that the CLI process doesn't get this thread created. - InitOnce(); - thread_->task_runner()->PostTask( - FROM_HERE, - base::Bind(&HostControllersManager::HandleRequestOnInternalThread, - base::Unretained(this), adb_path, device_serial, command, - device_port, host_port, base::Passed(&client_socket))); - } - - bool has_failed() const { return has_failed_; } - - private: - typedef base::hash_map< - std::string, linked_ptr<HostController> > HostControllerMap; - - static std::string MakeHostControllerMapKey(int adb_port, int device_port) { - return base::StringPrintf("%d:%d", adb_port, device_port); - } - - void InitOnce() { - if (thread_.get()) - return; - at_exit_manager_.reset(new base::AtExitManager()); - thread_.reset(new base::Thread("HostControllersManagerThread")); - thread_->Start(); - } - - // Invoked when a HostController instance reports an error (e.g. due to a - // device connectivity issue). Note that this could be called after the - // controller manager was destroyed which is why a weak pointer is used. - static void DeleteHostController( - const base::WeakPtr<HostControllersManager>& manager_ptr, - std::unique_ptr<HostController> host_controller) { - HostController* const controller = host_controller.release(); - HostControllersManager* const manager = manager_ptr.get(); - if (!manager) { - // Note that |controller| is not leaked in this case since the host - // controllers manager owns the controllers. If the manager was deleted - // then all the controllers (including |controller|) were also deleted. - return; - } - DCHECK(manager->thread_->task_runner()->RunsTasksOnCurrentThread()); - // Note that this will delete |controller| which is owned by the map. - DeleteRefCountedValueInMap( - MakeHostControllerMapKey( - controller->adb_port(), controller->device_port()), - manager->controllers_.get()); - } - - void Map(const std::string& adb_path, - const std::string& device_serial, - int adb_port, - int device_port, - int host_port, - Socket* client_socket) { - if (host_port < 0) { - SendMessage("ERROR: missing host port\n", client_socket); - return; - } - const bool use_dynamic_port_allocation = device_port == 0; - if (!use_dynamic_port_allocation) { - const std::string controller_key = MakeHostControllerMapKey( - adb_port, device_port); - if (controllers_->find(controller_key) != controllers_->end()) { - LOG(INFO) << "Already forwarding device port " << device_port - << " to host port " << host_port; - SendMessage(base::StringPrintf("%d:%d", device_port, host_port), - client_socket); - return; - } - } - // Create a new host controller. - std::unique_ptr<HostController> host_controller(HostController::Create( - device_serial, device_port, host_port, adb_port, GetExitNotifierFD(), - base::Bind(&HostControllersManager::DeleteHostController, - weak_ptr_factory_.GetWeakPtr()))); - if (!host_controller.get()) { - has_failed_ = true; - SendMessage("ERROR: Connection to device failed.\n", client_socket); - LogExistingControllers(client_socket); - return; - } - // Get the current allocated port. - device_port = host_controller->device_port(); - LOG(INFO) << "Forwarding device port " << device_port << " to host port " - << host_port; - const std::string msg = base::StringPrintf("%d:%d", device_port, host_port); - if (!SendMessage(msg, client_socket)) - return; - host_controller->Start(); - controllers_->insert( - std::make_pair(MakeHostControllerMapKey(adb_port, device_port), - linked_ptr<HostController>(host_controller.release()))); - } - - void Unmap(const std::string& adb_path, - const std::string& device_serial, - int adb_port, - int device_port, - Socket* client_socket) { - // Remove the previously created host controller. - const std::string controller_key = - MakeHostControllerMapKey(adb_port, device_port); - const bool controller_did_exist = - DeleteRefCountedValueInMap(controller_key, controllers_.get()); - if (!controller_did_exist) { - SendMessage("ERROR: could not unmap port.\n", client_socket); - LogExistingControllers(client_socket); - } else { - SendMessage("OK", client_socket); - } - - RemoveAdbPortForDeviceIfNeeded(adb_path, device_serial); - } - - void UnmapAll(const std::string& adb_path, - const std::string& device_serial, - int adb_port, - Socket* client_socket) { - const std::string adb_port_str = base::StringPrintf("%d", adb_port); - for (HostControllerMap::const_iterator controller_key = - controllers_->cbegin(); - controller_key != controllers_->cend(); ++controller_key) { - std::vector<std::string> pieces = - base::SplitString(controller_key->first, ":", base::KEEP_WHITESPACE, - base::SPLIT_WANT_ALL); - if (pieces.size() == 2) { - if (pieces[0] == adb_port_str) { - DeleteRefCountedValueInMapFromIterator(controller_key, - controllers_.get()); - } - } else { - LOG(ERROR) << "Unexpected controller key: " << controller_key->first; - } - } - - RemoveAdbPortForDeviceIfNeeded(adb_path, device_serial); - SendMessage("OK", client_socket); - } - - void HandleRequestOnInternalThread(const std::string& adb_path, - const std::string& device_serial, - int command, - int device_port, - int host_port, - std::unique_ptr<Socket> client_socket) { - const int adb_port = GetAdbPortForDevice(adb_path, device_serial); - if (adb_port < 0) { - SendMessage( - "ERROR: could not get adb port for device. You might need to add " - "'adb' to your PATH or provide the device serial id.\n", - client_socket.get()); - return; - } - switch (command) { - case MAP: - Map(adb_path, device_serial, adb_port, device_port, host_port, - client_socket.get()); - break; - case UNMAP: - Unmap(adb_path, device_serial, adb_port, device_port, - client_socket.get()); - break; - case UNMAP_ALL: - UnmapAll(adb_path, device_serial, adb_port, client_socket.get()); - break; - default: - SendMessage( - base::StringPrintf("ERROR: unrecognized command %d\n", command), - client_socket.get()); - break; - } - } - - void LogExistingControllers(Socket* client_socket) { - SendMessage("ERROR: Existing controllers:\n", client_socket); - for (const auto& controller : *controllers_) { - SendMessage(base::StringPrintf("ERROR: %s\n", controller.first.c_str()), - client_socket); - } - } - - void RemoveAdbPortForDeviceIfNeeded(const std::string& adb_path, - const std::string& device_serial) { - base::hash_map<std::string, int>::const_iterator it = - device_serial_to_adb_port_map_.find(device_serial); - if (it == device_serial_to_adb_port_map_.end()) - return; - - int port = it->second; - const std::string prefix = base::StringPrintf("%d:", port); - for (HostControllerMap::const_iterator others = controllers_->begin(); - others != controllers_->end(); ++others) { - if (base::StartsWith(others->first, prefix, base::CompareCase::SENSITIVE)) - return; - } - // No other port is being forwarded to this device: - // - Remove it from our internal serial -> adb port map. - // - Remove from "adb forward" command. - LOG(INFO) << "Device " << device_serial << " has no more ports."; - device_serial_to_adb_port_map_.erase(device_serial); - const std::string serial_part = device_serial.empty() ? - std::string() : std::string("-s ") + device_serial; - const std::string command = base::StringPrintf( - "%s %s forward --remove tcp:%d", - adb_path.c_str(), - serial_part.c_str(), - port); - const base::CommandLine command_line(base::SplitString( - command, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY)); - int ret; - std::string output; - base::GetAppOutputWithExitCode(command_line, &output, &ret); - LOG(INFO) << command << " ret: " << ret << " output: " << output; - // Wait for the socket to be fully unmapped. - const std::string port_mapped_cmd = base::StringPrintf( - "lsof -nPi:%d", - port); - const base::CommandLine port_mapped_cmd_line( - base::SplitString(port_mapped_cmd, " ", base::TRIM_WHITESPACE, - base::SPLIT_WANT_NONEMPTY)); - const int poll_interval_us = 500 * 1000; - int retries = 3; - while (retries) { - int port_unmapped; - base::GetAppOutputWithExitCode(port_mapped_cmd_line, &output, - &port_unmapped); - LOG(INFO) << "Device " << device_serial << " port " << port << " unmap " - << port_unmapped; - if (port_unmapped) - break; - --retries; - usleep(poll_interval_us); - } - } - - int GetAdbPortForDevice(const std::string adb_path, - const std::string& device_serial) { - base::hash_map<std::string, int>::const_iterator it = - device_serial_to_adb_port_map_.find(device_serial); - if (it != device_serial_to_adb_port_map_.end()) - return it->second; - Socket bind_socket; - CHECK(bind_socket.BindTcp("127.0.0.1", 0)); - const int port = bind_socket.GetPort(); - bind_socket.Close(); - const std::string serial_part = device_serial.empty() ? - std::string() : std::string("-s ") + device_serial; - const std::string command = base::StringPrintf( - "%s %s forward tcp:%d localabstract:chrome_device_forwarder", - adb_path.c_str(), - serial_part.c_str(), - port); - const base::CommandLine command_line(base::SplitString( - command, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY)); - int ret; - std::string output; - base::GetAppOutputWithExitCode(command_line, &output, &ret); - LOG(INFO) << command << " ret: " << ret << " output: " << output; - if (ret < 0 || !WIFEXITED(ret) || WEXITSTATUS(ret) != 0) - return -1; - device_serial_to_adb_port_map_[device_serial] = port; - return port; - } - - bool SendMessage(const std::string& msg, Socket* client_socket) { - bool result = client_socket->WriteString(msg); - DCHECK(result); - if (!result) - has_failed_ = true; - return result; - } - - base::hash_map<std::string, int> device_serial_to_adb_port_map_; - std::unique_ptr<HostControllerMap> controllers_; - bool has_failed_; - std::unique_ptr<base::AtExitManager> - at_exit_manager_; // Needed by base::Thread. - std::unique_ptr<base::Thread> thread_; - base::WeakPtrFactory<HostControllersManager> weak_ptr_factory_; -}; - class ServerDelegate : public Daemon::ServerDelegate { public: explicit ServerDelegate(const std::string& adb_path) - : adb_path_(adb_path), has_failed_(false) {} + : adb_path_(adb_path), + has_failed_(false), + controllers_manager_(base::Bind(&GetExitNotifierFD)) {} bool has_failed() const { return has_failed_ || controllers_manager_.has_failed();
diff --git a/tools/android/loading/activity_lens_unittest.py b/tools/android/loading/activity_lens_unittest.py index 81c5837..cfa4689 100644 --- a/tools/android/loading/activity_lens_unittest.py +++ b/tools/android/loading/activity_lens_unittest.py
@@ -9,20 +9,20 @@ from activity_lens import (ActivityLens, _EventsTree) import clovis_constants import test_utils -import tracing +import tracing_track class ActivityLensTestCase(unittest.TestCase): @classmethod def _EventsFromRawEvents(cls, raw_events): - tracing_track = tracing.TracingTrack(None, + track = tracing_track.TracingTrack(None, clovis_constants.DEFAULT_CATEGORIES) - tracing_track.Handle( + track.Handle( 'Tracing.dataCollected', {'params': {'value': raw_events}}) - return tracing_track.GetEvents() + return track.GetEvents() def setUp(self): - self.tracing_track = tracing.TracingTrack(None, + self.track = tracing_track.TracingTrack(None, clovis_constants.DEFAULT_CATEGORIES) def testGetRendererMainThread(self):
diff --git a/tools/android/loading/controller.py b/tools/android/loading/controller.py index b15b62d..0cad7f15 100644 --- a/tools/android/loading/controller.py +++ b/tools/android/loading/controller.py
@@ -40,6 +40,7 @@ sys.path.append(os.path.join(_CATAPULT_DIR, 'devil')) from devil.android import device_errors +from devil.android import flag_changer from devil.android.sdk import intent sys.path.append( @@ -325,7 +326,7 @@ 'Remote controller doesn\'t support chrome environment variables.' package_info = OPTIONS.ChromePackage() self._device.ForceStop(package_info.package) - with device_setup.FlagReplacer( + with flag_changer.CustomCommandLineFlags( self._device, package_info.cmdline_file, self._GetChromeArguments()): self._DismissCrashDialogIfNeeded() start_intent = intent.Intent(
diff --git a/tools/android/loading/device_setup.py b/tools/android/loading/device_setup.py index e39ab86..06c776d3 100644 --- a/tools/android/loading/device_setup.py +++ b/tools/android/loading/device_setup.py
@@ -18,10 +18,10 @@ _CATAPULT_DIR = os.path.join(_SRC_DIR, 'third_party', 'catapult') sys.path.append(os.path.join(_CATAPULT_DIR, 'devil')) from devil.android import device_utils -from devil.android import flag_changer from devil.android import forwarder from devil.android.sdk import adb_wrapper from devil.android.sdk import intent +from devil.android.sdk import keyevent sys.path.append(os.path.join(_SRC_DIR, 'build', 'android')) from pylib import constants @@ -92,7 +92,7 @@ device.Reboot() # Pass through the lock screen. time.sleep(3) - device.RunShellCommand(['input', 'keyevent', '82']) + device.SendKeyEvent(keyevent.KEYCODE_MENU) def DeviceSubmitShellCommandQueue(device, command_queue): @@ -121,29 +121,6 @@ @contextlib.contextmanager -def FlagReplacer(device, command_line_path, new_flags): - """Replaces chrome flags in a context, restores them afterwards. - - Args: - device: Device to target, from DeviceUtils. Can be None, in which case this - context manager is a no-op. - command_line_path: Full path to the command-line file. - new_flags: Flags to replace. - """ - # If we're logging requests from a local desktop chrome instance there is no - # device. - if not device: - yield - return - changer = flag_changer.FlagChanger(device, command_line_path) - changer.ReplaceFlags(new_flags) - try: - yield - finally: - changer.Restore() - - -@contextlib.contextmanager def ForwardPort(device, local, remote): """Forwards a local port to a remote one on a device in a context.""" # If we're logging requests from a local desktop chrome instance there is no
diff --git a/tools/android/loading/loading_trace.py b/tools/android/loading/loading_trace.py index 8a4b334..cad3f306 100644 --- a/tools/android/loading/loading_trace.py +++ b/tools/android/loading/loading_trace.py
@@ -14,7 +14,7 @@ import devtools_monitor import page_track import request_track -import tracing +import tracing_track class LoadingTrace(object): @@ -25,7 +25,7 @@ _REQUEST_KEY = 'request_track' _TRACING_KEY = 'tracing_track' - def __init__(self, url, metadata, page, request, tracing_track): + def __init__(self, url, metadata, page, request, track): """Initializes a loading trace instance. Args: @@ -33,13 +33,13 @@ metadata: (dict) Metadata associated with the load. page: (PageTrack) instance of PageTrack. request: (RequestTrack) instance of RequestTrack. - tracing_track: (TracingTrack) instance of TracingTrack. + track: (TracingTrack) instance of TracingTrack. """ self.url = url self.metadata = metadata self.page_track = page self.request_track = request - self._tracing_track = tracing_track + self._tracing_track = track self._tracing_json_str = None def ToJsonDict(self): @@ -66,10 +66,10 @@ page = page_track.PageTrack.FromJsonDict(json_dict[cls._PAGE_KEY]) request = request_track.RequestTrack.FromJsonDict( json_dict[cls._REQUEST_KEY]) - tracing_track = tracing.TracingTrack.FromJsonDict( + track = tracing_track.TracingTrack.FromJsonDict( json_dict[cls._TRACING_KEY]) return LoadingTrace(json_dict[cls._URL_KEY], json_dict[cls._METADATA_KEY], - page, request, tracing_track) + page, request, track) @classmethod def FromJsonFile(cls, json_path): @@ -88,7 +88,7 @@ url: (str) url to fetch. connection: An opened devtools connection. chrome_metadata: Dictionary of chrome metadata. - categories: as in tracing.TracingTrack + categories: as in tracing_track.TracingTrack timeout_seconds: monitoring connection timeout in seconds. stop_delay_multiplier: How long to wait after page load completed before tearing down, relative to the time it took to reach the page load to @@ -99,7 +99,7 @@ """ page = page_track.PageTrack(connection) request = request_track.RequestTrack(connection) - trace = tracing.TracingTrack(connection, categories) + trace = tracing_track.TracingTrack(connection, categories) start_date_str = datetime.datetime.utcnow().isoformat() seconds_since_epoch=time.time() connection.MonitorUrl(url, @@ -127,6 +127,6 @@ def _RestoreTracingTrack(self): if not self._tracing_json_str: return None - self._tracing_track = tracing.TracingTrack.FromJsonDict( + self._tracing_track = tracing_track.TracingTrack.FromJsonDict( json.loads(self._tracing_json_str)) self._tracing_json_str = None
diff --git a/tools/android/loading/sandwich_metrics.py b/tools/android/loading/sandwich_metrics.py index 8e5544e..7124a990 100644 --- a/tools/android/loading/sandwich_metrics.py +++ b/tools/android/loading/sandwich_metrics.py
@@ -30,7 +30,7 @@ import common_util import loading_trace as loading_trace_module import sandwich_runner -import tracing +import tracing_track COMMON_CSV_COLUMN_NAMES = [ @@ -70,16 +70,16 @@ ('time', 'frame_completeness')) -def _GetBrowserPID(tracing_track): +def _GetBrowserPID(track): """Get the browser PID from a trace. Args: - tracing_track: The tracing.TracingTrack. + track: The tracing_track.TracingTrack. Returns: The browser's PID as an integer. """ - for event in tracing_track.GetEvents(): + for event in track.GetEvents(): if event.category != '__metadata' or event.name != 'process_name': continue if event.args['name'] == 'Browser': @@ -87,19 +87,19 @@ raise ValueError('couldn\'t find browser\'s PID') -def _GetBrowserDumpEvents(tracing_track): +def _GetBrowserDumpEvents(track): """Get the browser memory dump events from a tracing track. Args: - tracing_track: The tracing.TracingTrack. + track: The tracing_track.TracingTrack. Returns: List of memory dump events. """ - assert sandwich_runner.MEMORY_DUMP_CATEGORY in tracing_track.Categories() - browser_pid = _GetBrowserPID(tracing_track) + assert sandwich_runner.MEMORY_DUMP_CATEGORY in track.Categories() + browser_pid = _GetBrowserPID(track) browser_dumps_events = [] - for event in tracing_track.GetEvents(): + for event in track.GetEvents(): if event.category != 'disabled-by-default-memory-infra': continue if event.type != 'v' or event.name != 'periodic_interval': @@ -113,19 +113,19 @@ return browser_dumps_events -def _GetWebPageTrackedEvents(tracing_track): +def _GetWebPageTrackedEvents(track): """Get the web page's tracked events from a tracing track. Args: - tracing_track: The tracing.TracingTrack. + track: The tracing_track.TracingTrack. Returns: - A dict mapping event.name -> tracing.Event for each first occurrence of a - tracked event. + A dict mapping event.name -> tracing_track.Event for each first occurrence + of a tracked event. """ main_frame_id = None tracked_events = {} - sorted_events = sorted(tracing_track.GetEvents(), + sorted_events = sorted(track.GetEvents(), key=lambda event: event.start_msec) for event in sorted_events: if event.category != 'blink.user_timing':
diff --git a/tools/android/loading/sandwich_metrics_unittest.py b/tools/android/loading/sandwich_metrics_unittest.py index 152e07e..19520b5 100644 --- a/tools/android/loading/sandwich_metrics_unittest.py +++ b/tools/android/loading/sandwich_metrics_unittest.py
@@ -15,7 +15,7 @@ import sandwich_metrics as puller import sandwich_runner import request_track -import tracing +import tracing_track _BLINK_CAT = 'blink.user_timing' @@ -51,7 +51,7 @@ def TracingTrack(events): - return tracing.TracingTrack.FromJsonDict({ + return tracing_track.TracingTrack.FromJsonDict({ 'events': events, 'categories': (sandwich_runner._TRACING_CATEGORIES + [sandwich_runner.MEMORY_DUMP_CATEGORY])})
diff --git a/tools/android/loading/test_utils.py b/tools/android/loading/test_utils.py index 86303f95..2b2479cd 100644 --- a/tools/android/loading/test_utils.py +++ b/tools/android/loading/test_utils.py
@@ -10,7 +10,7 @@ import loading_trace import page_track import request_track -import tracing +import tracing_track import user_satisfied_lens @@ -141,14 +141,14 @@ request = FakeRequestTrack(requests) page_event_track = FakePageTrack(page_events if page_events else []) if trace_events is not None: - tracing_track = tracing.TracingTrack(None, + track = tracing_track.TracingTrack(None, clovis_constants.DEFAULT_CATEGORIES) - tracing_track.Handle('Tracing.dataCollected', - {'params': {'value': [e for e in trace_events]}}) + track.Handle('Tracing.dataCollected', + {'params': {'value': [e for e in trace_events]}}) else: - tracing_track = None + track = None return loading_trace.LoadingTrace( - None, None, page_event_track, request, tracing_track) + None, None, page_event_track, request, track) class SimpleLens(object):
diff --git a/tools/android/loading/tracing.py b/tools/android/loading/tracing_track.py similarity index 100% rename from tools/android/loading/tracing.py rename to tools/android/loading/tracing_track.py
diff --git a/tools/android/loading/tracing_unittest.py b/tools/android/loading/tracing_track_unittest.py similarity index 99% rename from tools/android/loading/tracing_unittest.py rename to tools/android/loading/tracing_track_unittest.py index 6b6cd6c..b10083f 100644 --- a/tools/android/loading/tracing_unittest.py +++ b/tools/android/loading/tracing_track_unittest.py
@@ -10,7 +10,7 @@ import devtools_monitor -from tracing import (Event, TracingTrack, _IntervalTree) +from tracing_track import (Event, TracingTrack, _IntervalTree) class TracingTrackTestCase(unittest.TestCase):
diff --git a/tools/android/loading/wpr_helper.py b/tools/android/loading/wpr_helper.py index ab655a59..b509d117b 100755 --- a/tools/android/loading/wpr_helper.py +++ b/tools/android/loading/wpr_helper.py
@@ -17,6 +17,7 @@ sys.path.append(os.path.join(_SRC_PATH, 'third_party', 'catapult', 'devil')) from devil.android import device_utils +from devil.android import flag_changer from devil.android.constants import chrome from devil.android.perf import cache_control from devil.android.sdk import intent @@ -42,7 +43,7 @@ cmdline_file = package_info.cmdline_file package = package_info.package - with device_setup.FlagReplacer(device, cmdline_file, chrome_args): + with flag_changer.CustomCommandLineFlags(device, cmdline_file, chrome_args): device.ForceStop(package) if cold:
diff --git a/tools/auto_bisect/bisect_perf_regression_test.py b/tools/auto_bisect/bisect_perf_regression_test.py index 30c9b24..209388d09 100644 --- a/tools/auto_bisect/bisect_perf_regression_test.py +++ b/tools/auto_bisect/bisect_perf_regression_test.py
@@ -465,10 +465,10 @@ def testGetCommitPositionForV8(self): bisect_instance = _GetBisectPerformanceMetricsInstance(DEFAULT_OPTIONS) - v8_rev = '21d700eedcdd6570eff22ece724b63a5eefe78cb' + v8_rev = '818769db41cb3e83979aa16cc76c69b66045e369' depot_path = os.path.join(bisect_instance.src_cwd, 'v8') self.assertEqual( - 23634, source_control.GetCommitPosition(v8_rev, depot_path)) + 43769, source_control.GetCommitPosition(v8_rev, depot_path)) def testGetCommitPositionForSkia(self): bisect_instance = _GetBisectPerformanceMetricsInstance(DEFAULT_OPTIONS)
diff --git a/tools/auto_bisect/test_data/closed.json b/tools/auto_bisect/test_data/closed.json index ab87a212..e8a90c81 100644 --- a/tools/auto_bisect/test_data/closed.json +++ b/tools/auto_bisect/test_data/closed.json
@@ -67,7 +67,7 @@ "$t": "2014-10-20T22:13:38.000Z" }, "title": { - "$t": "11.1% regression in indexeddb_perf at 298653:298680" + "$t": "11.1% regression in speedometer at 298653:298680" }, "content": { "$t": "See the link to graphs below.",
diff --git a/tools/battor_agent/BUILD.gn b/tools/battor_agent/BUILD.gn index 065ee03..fe2ce233 100644 --- a/tools/battor_agent/BUILD.gn +++ b/tools/battor_agent/BUILD.gn
@@ -14,6 +14,7 @@ deps = [ ":battor_agent_lib", "//base", + "//build/config/sanitizers:deps", "//build/win:default_exe_manifest", "//device/serial", ]
diff --git a/tools/binary_size/OWNERS b/tools/binary_size/OWNERS index d868228..22475b2b 100644 --- a/tools/binary_size/OWNERS +++ b/tools/binary_size/OWNERS
@@ -1,5 +1,4 @@ -andrewhayden@chromium.org -bratell@opera.com -primiano@chromium.org +agrieve@chromium.org +estevenson@chromium.org # COMPONENT: Tools
diff --git a/tools/binary_size/PRESUBMIT.py b/tools/binary_size/PRESUBMIT.py index 4f7095a..69eafbe 100644 --- a/tools/binary_size/PRESUBMIT.py +++ b/tools/binary_size/PRESUBMIT.py
@@ -11,11 +11,11 @@ def CommonChecks(input_api, output_api): output = [] output.extend(input_api.canned_checks.RunPylint(input_api, output_api)) - output.extend( - input_api.canned_checks.RunUnitTestsInDirectory( - input_api, output_api, - input_api.PresubmitLocalPath(), - whitelist=[r'.+_unittest\.py$'])) + py_tests = input_api.canned_checks.GetUnitTestsRecursively( + input_api, output_api, input_api.PresubmitLocalPath(), + whitelist=[r'.+_test\.py$'], blacklist=[]) + + output.extend(input_api.RunTests(py_tests, False)) if input_api.is_committing: output.extend(input_api.canned_checks.PanProjectChecks(input_api,
diff --git a/tools/binary_size/README.md b/tools/binary_size/README.md new file mode 100644 index 0000000..3925257 --- /dev/null +++ b/tools/binary_size/README.md
@@ -0,0 +1,112 @@ +# Tools for analyzing Chrome's binary size + +# Super Size + +Collect, archive, and analyze Chrome's binary size. + +## "archive" + +Collect size information and dump it into a `.size` file. Mainly consists of +symbol information parsed from a linker .map file. + +### Example Usage: + + # Android: + # Googlers: + gn gen out/Release --args='is_official_build=true symbol_level=1 is_chrome_branded=true target_os="android"' + # Non-Googlers: + gn gen out/Release --args='is_official_build=true symbol_level=1 exclude_unwind_tables=true ffmpeg_branding="Chrome" proprietary_codecs=true target_os="android"' + ninja -C out/Release -j 1000 libchrome.so + tools/binary_size/supersize archive chrome.size --elf-file out/Release/lib.unstripped/libchrome.so -v + + # Linux: + LLVM_DOWNLOAD_GOLD_PLUGIN=1 gclient runhooks # One-time download. + # Googlers: + gn gen out/Release --args='is_official_build=true symbol_level=1 is_chrome_branded=true' + # Non-Googlers: + gn gen out/Release --args='is_official_build=true symbol_level=1 exclude_unwind_tables=true ffmpeg_branding="Chrome" proprietary_codecs=true' + ninja -C out/Release -j 1000 chrome + tools/binary_size/supersize archive chrome.size --elf-file out/Release/chrome -v + +## "html_report" + +Creates an interactive size breakdown (by source path) as a stand-alone html +report. + +### Example Usage: + + tools/binary_size/supersize html_report chrome.size --report-dir size-report -v + xdg-open size-report/index.html + +## "console" + +Starts a Python interpreter where you can run custom queries. + +### Example Usage: + + # Prints size infomation and exits (does not enter interactive mode). + tools/binary_size/supersize console chrome.size --query='Print(size_info)' + + # Enters a Python REPL (it will print more guidance). + tools/binary_size/supersize console chrome.size + +## "diff" + +A convenience command equivalent to: `console before.size after.size --query='Print(Diff(size_info1, size_info2))'` + +### Example Usage: + + tools/binary_size/supersize diff before.size after.size --all + +# diagnose_apk_bloat.py + +Determine the cause of binary size bloat for a patch. + +## Example Usage: + + # Sync, build, and diff for HEAD and HEAD^. + tools/binary_size/diagnose_apk_bloat.py + + # Diff using downloaded build artifacts. + tools/binary_size/diagnose_apk_bloat.py --cloud --rev-with-patch REV + + # Display detailed usage info (there are many options). + tools/binary_size/diagnose_apk_bloat.py -h + +# Roadmap for Super Size: + +Tracked in https://crbug.com/681694 + +1. More `archive` features: + + * Find out more about 0xffffffffffffffff addresses, and why such large + gaps exist after them. + * Use nm to get the full list of symbols that share the same address. + * Collect java symbol information + * Collect .pak file information (using .o.whitelist files) + * Collect .apk entry information + +1. More `console` features: + + * Template Symbols - shows when templates lead to code bloat. + * Duplicate Symbols - shows when statics in headers are an issue. + * Overloaded Symbols - shows when overloads are excessive. + * Per-class / namespace size (no way to distinguish class vs namespace). + * Per-Chrome package (Chrome-specific grouping. e.g. name prefixes). + * CSV output (for pasting into a spreadsheet). + +1. More `html_report` features: + + * Break down by other groupings (e.g. create from nested `SymbolGroups`) + +1. Integrate with `resource_sizes.py` so that it tracks size of major + components separately: chrome vs blink vs skia vs v8. +1. Speed up some steps (like normalizing names) via multiprocessing. +1. Add dependency graph info, perhaps just on a per-file basis. + +# Roadmap for diagnose_apk_bloat.py: +1. More `diagnose_apk_bloat.py` features: + + * Add more diff types (pak files, Java symbols, native symbols). + * Support performing diffs on all revs in a given range. + * Support local builds for revs before supersize existed.
diff --git a/tools/binary_size/README.txt b/tools/binary_size/README.txt deleted file mode 100644 index 8deeb303..0000000 --- a/tools/binary_size/README.txt +++ /dev/null
@@ -1,152 +0,0 @@ -================================================================================ - __________ .__ - \______ \ |__| ____ _____ _______ ___.__. - | | _/ | | / \ \__ \ \_ __ \ < | | - | | \ | | | | \ / __ \_ | | \/ \___ | - |______ / |__| |___| / (____ / |__| / ____| - \/ \/ \/ \/ - _________ .__ ___________ .__ - / _____/ |__| ________ ____ \__ ___/ ____ ____ | | - \_____ \ | | \___ / _/ __ \ | | / _ \ / _ \ | | - / \ | | / / \ ___/ | | ( <_> ) ( <_> ) | |__ - /_______ / |__| /_____ \ \___ > |____| \____/ \____/ |____/ - \/ \/ \/ -================================================================================ - --------------------------------------------------------------------------------- -Introduction --------------------------------------------------------------------------------- -The ever-increasing size of binaries is a problem for everybody. Increased -binary size means longer download times and a bigger on-disk footprint after -installation. Mobile devices suffer the worst, as they frequently have -sub-optimal connectivity and limited storage capacity. Developers currently -have almost no visibility into how the space in the existing binaries is -divided nor how their contributions change the space within those binaries. -The first step to reducing the size of binaries is to make the size information -accessible to everyone so that developers can take action. - -There are two parts to the Binary Size Tool: -1. run_binary_size_analysis.py - This script will produce a detailed breakdown of a binary, including an HTML - report and (optionally) a detailed ""nm"-formatted dump of all the symbols - with their sources resolved by addr2line. This tool is great for finding the - bloat in binaries. - -2. explain_binary_size_delta.py - This script takes the "nm"-formatted input from two runs of the first tool - (run_binary_size_analysis.py) and produces a detailed breakdown of how the - symbols have changed between the two binaries that were originally analyzed. - The breakdown shows the size changes of symbols as well as which symbols have - been added, removed, or changed. This tool is great for thoroughly - characterizing the size change resulting from a code change. - - Because this tool relies solely upon the "nm" output from - run_binary_size_analysis.py, it can be run at any time even if the source - code described by the "nm" output is no longer available. It is also much - faster than run_binary_size_analysis.py, typically completing in a few - seconds for even very large binaries. - --------------------------------------------------------------------------------- -How to Run: run_binary_size_analysis.py --------------------------------------------------------------------------------- -Running the tool is fairly simple. For the sake of this example we will -pretend that you are building the Content Shell APK for Android. - - 1. Build your product as you normally would*, e.g.: - ninja -C out/Release -j 100 content_shell_apk - - * For results that are as spatially accurate as possible, you should always - build with a Release configuration so that the end product is as close to - the real thing as possible. However, it can sometimes be useful to improve - consistency and accuracy of symbol lookup even if it perturbs the overall - accuracy of the tool. Consider adding these GN args: - is_clang = true - Anecdotally produces more stable symbol names over time. - enable_profiling = true - Anecdotally makes symbol lookup more accurate (note that it - doesn't work with clang on ARM/Android builds, see - https://crbug.com/417323 for more information. - enable_full_stack_frames_for_profiling = true - With enable_profiling, further improves symbol lookup accuracy but - will completely disable inlining, decreasing spatial accuracy. - - 2. Run the tool specifying the library and the output report directory. - This command will run the analysis on the Content Shell native library for - Android, producing an HTML report in /tmp/report and saving the NM output - (useful for re-running the tool or analyzing deltas between two builds) - under /tmp/report/nm.out: - tools/binary_size/run_binary_size_analysis.py \ - --library out/Release/lib.unstripped/libcontent_shell_content_view.so \ - --destdir /tmp/report - -Of course, there are additional options that you can see by running the tool -with "--help". - -This whole process takes about an hour on a modern (circa 2014) machine. If you -have LOTS of RAM, you can use the "--jobs" argument to add more addr2line -workers; doing so will *greatly* reduce the processing time but will devour -system memory. If you've got the horsepower, 10 workers can thrash through the -binary in about 5 minutes at a cost of around 60 GB of RAM. The default number -of jobs is 1. Patches to job number auto-selection are welcome! - -When the tool finishes its work you'll find an HTML report in the output -directory that you specified with "--destdir". Open the index.html file in your -*cough* browser of choice *cough* and have a look around. The index.html page -is likely to evolve over time, but will always be your starting point for -investigation. From here you'll find links to various views of the data such -as treemap visualizations, overall statistics and "top n" lists of various -kinds. - -The report is completely standalone. No external resources are required, so the -report may be saved and viewed offline with no problems. - --------------------------------------------------------------------------------- -How to Run: explain_binary_size_delta.py --------------------------------------------------------------------------------- -Continuing the example, assume that run_binary_size_analysis.py has been run -both before and after a code change and that the "nm.out" files have been saved -to "nm.out.before" and "nm.out.after". To generate an explanation of the symbol -differences between the two runs: - - tools/binary_size/explain_binary_size_delta.py \ - --nm1 nm.out.before --nm2 nm.out.after - -This will output a concise summary of the symbol changes between the two -libraries. Much more information is available by specifying flags like -"--showsources" and (for the comprehensive answer) "--showsymbols". Use "--help" -for a full list of options. - -Unlike run_binary_size_analysis.py, this tool doesn't (yet) produce any kind of -HTML report. Contributions are welcome. - --------------------------------------------------------------------------------- -Caveats --------------------------------------------------------------------------------- -The tool is not perfect and has several shortcomings: - - * Not all space in the binary is accounted for. The causes are still under - investigation, but there are of course sections in the binary that do not - contain symbol information, etceteras. The vast majority of the binary is - generally symbols, though, so the discrepancy should be very small. - * When dealing with inlining and such, the size cost is attributed to the - resource in which the code gets inlined. Depending upon your goals for - analysis, this may be either good or bad; fundamentally, the more trickery - that the compiler and/or linker do, the less simple the relationship - between the original source and the resultant binary. - * The Javascript code in the HTML report assumes code lives in Chromium for - generated hyperlinks and will not hyperlink any file that starts with the - substring "out". - * There is as yet no way to configure project-specific bindings for symbols/ - source files to locations on disk. Such configuration would be useful for - manually deduping and disambiguating results. Some day, hopefully, this will - be supported. - --------------------------------------------------------------------------------- -Feature Requests and Bug Reports --------------------------------------------------------------------------------- -Please file bugs and feature requests here, making sure to use the label -"Tools-BinarySize": - https://code.google.com/p/chromium/issues/entry?labels=Tools-BinarySize - -View all open issues here: - https://code.google.com/p/chromium/issues/list?can=2&q=label:Tools-BinarySize
diff --git a/tools/binary_size/binary_size_utils.py b/tools/binary_size/binary_size_utils.py deleted file mode 100644 index 67335c2..0000000 --- a/tools/binary_size/binary_size_utils.py +++ /dev/null
@@ -1,71 +0,0 @@ -# Copyright 2014 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. - -"""Common utilities for tools that deal with binary size information. -""" - -import logging -import re - - -def ParseNm(nm_lines): - """Parse nm output, returning data for all relevant (to binary size) - symbols and ignoring the rest. - - Args: - nm_lines: an iterable over lines of nm output. - - Yields: - (symbol name, symbol type, symbol size, source file path). - - Path may be None if nm couldn't figure out the source file. - """ - - # Match lines with size, symbol, optional location, optional discriminator - sym_re = re.compile(r'^([0-9a-f]{8,}) ' # address (8+ hex digits) - '([0-9a-f]{8,}) ' # size (8+ hex digits) - '(.) ' # symbol type, one character - '([^\t]+)' # symbol name, separated from next by tab - '(?:\t(.*):[\d\?]+)?.*$') # location - # Match lines with addr but no size. - addr_re = re.compile(r'^[0-9a-f]{8,} (.) ([^\t]+)(?:\t.*)?$') - # Match lines that don't have an address at all -- typically external symbols. - noaddr_re = re.compile(r'^ {8,} (.) (.*)$') - # Match lines with no symbol name, only addr and type - addr_only_re = re.compile(r'^[0-9a-f]{8,} (.)$') - - seen_lines = set() - for line in nm_lines: - line = line.rstrip() - if line in seen_lines: - # nm outputs identical lines at times. We don't want to treat - # those as distinct symbols because that would make no sense. - continue - seen_lines.add(line) - match = sym_re.match(line) - if match: - address, size, sym_type, sym = match.groups()[0:4] - size = int(size, 16) - if sym_type in ('B', 'b'): - continue # skip all BSS for now. - path = match.group(5) - yield sym, sym_type, size, path, address - continue - match = addr_re.match(line) - if match: - # sym_type, sym = match.groups()[0:2] - continue # No size == we don't care. - match = noaddr_re.match(line) - if match: - sym_type, sym = match.groups() - if sym_type in ('U', 'w'): - continue # external or weak symbol - match = addr_only_re.match(line) - if match: - continue # Nothing to do. - - - # If we reach this part of the loop, there was something in the - # line that we didn't expect or recognize. - logging.warning('nm output parser failed to parse: %s', repr(line))
diff --git a/tools/binary_size/diagnose_apk_bloat.py b/tools/binary_size/diagnose_apk_bloat.py new file mode 100755 index 0000000..510ee13 --- /dev/null +++ b/tools/binary_size/diagnose_apk_bloat.py
@@ -0,0 +1,498 @@ +#!/usr/bin/env python +# Copyright 2017 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. + +"""Tool for finding the cause of APK bloat. + +Run diagnose_apk_bloat.py -h for detailed usage help. +""" + +import argparse +import collections +import distutils.spawn +import itertools +import json +import multiprocessing +import os +import shutil +import subprocess +import sys +import tempfile +import zipfile + +_BUILDER_URL = \ + 'https://build.chromium.org/p/chromium.perf/builders/Android%20Builder' +_CLOUD_OUT_DIR = os.path.join('out', 'Release') +_SRC_ROOT = os.path.abspath( + os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)) +_DEFAULT_ARCHIVE_DIR = os.path.join(_SRC_ROOT, 'binary-size-bloat') +_DEFAULT_OUT_DIR = os.path.join(_SRC_ROOT, 'out', 'diagnose-apk-bloat') +_DEFAULT_TARGET = 'monochrome_public_apk' + +# Global variable for storing the initial branch before the script was launched +# so that it doesn't need to be passed everywhere in case we fail and exit. +_initial_branch = None + + +class BaseDiff(object): + """Base class capturing binary size diffs.""" + def __init__(self, name): + self.name = name + self.banner = '\n' + '*' * 30 + name + '*' * 30 + self.RunDiff() + + def AppendResults(self, logfile): + """Print and write diff results to an open |logfile|.""" + _PrintAndWriteToFile(logfile, self.banner) + _PrintAndWriteToFile(logfile, 'Summary:') + _PrintAndWriteToFile(logfile, self.Summary()) + _PrintAndWriteToFile(logfile, '\nDetails:') + for l in self.DetailedResults(): + _PrintAndWriteToFile(logfile, l) + + def Summary(self): + """A short description that summarizes the source of binary size bloat.""" + raise NotImplementedError() + + def DetailedResults(self): + """An iterable description of the cause of binary size bloat.""" + raise NotImplementedError() + + def ProduceDiff(self): + """Prepare a binary size diff with ready to print results.""" + raise NotImplementedError() + + def RunDiff(self): + _Print('Creating {}', self.name) + self.ProduceDiff() + + +_ResourceSizesDiffResult = collections.namedtuple( + 'ResourceSizesDiffResult', ['section', 'value', 'units']) + + +class ResourceSizesDiff(BaseDiff): + _RESOURCE_SIZES_PATH = os.path.join( + _SRC_ROOT, 'build', 'android', 'resource_sizes.py') + + def __init__(self, archive_dirs, apk_name, slow_options=False): + self._archive_dirs = archive_dirs + self._apk_name = apk_name + self._slow_options = slow_options + self._diff = None # Set by |ProduceDiff()| + super(ResourceSizesDiff, self).__init__('Resource Sizes Diff') + + def DetailedResults(self): + for section, value, units in self._diff: + yield '{:>+10,} {} {}'.format(value, units, section) + + def Summary(self): + for s in self._diff: + if 'normalized' in s.section: + return 'Normalized APK size: {:+,} {}'.format(s.value, s.units) + return '' + + def ProduceDiff(self): + chartjsons = self._RunResourceSizes() + diff = [] + with_patch = chartjsons[0]['charts'] + without_patch = chartjsons[1]['charts'] + for section, section_dict in with_patch.iteritems(): + for subsection, v in section_dict.iteritems(): + # Ignore entries when resource_sizes.py chartjson format has changed. + if (section not in without_patch or + subsection not in without_patch[section] or + v['units'] != without_patch[section][subsection]['units']): + _Print('Found differing dict structures for resource_sizes.py, ' + 'skipping {} {}', section, subsection) + else: + diff.append( + _ResourceSizesDiffResult( + '%s %s' % (section, subsection), + v['value'] - without_patch[section][subsection]['value'], + v['units'])) + self._diff = sorted(diff, key=lambda x: abs(x.value), reverse=True) + + def _RunResourceSizes(self): + chartjsons = [] + for archive_dir in self._archive_dirs: + apk_path = os.path.join(archive_dir, self._apk_name) + chartjson_file = os.path.join(archive_dir, 'results-chart.json') + cmd = [self._RESOURCE_SIZES_PATH, apk_path,'--output-dir', archive_dir, + '--no-output-dir', '--chartjson'] + if self._slow_options: + cmd += ['--estimate-patch-size'] + else: + cmd += ['--no-static-initializer-check'] + _RunCmd(cmd) + with open(chartjson_file) as f: + chartjsons.append(json.load(f)) + return chartjsons + + +class _BuildHelper(object): + """Helper class for generating and building targets.""" + def __init__(self, args): + self.enable_chrome_android_internal = args.enable_chrome_android_internal + self.extra_gn_args_str = '' + self.max_jobs = args.max_jobs + self.max_load_average = args.max_load_average + self.output_directory = args.output_directory + self.target = args.target + self.target_os = args.target_os + self.use_goma = args.use_goma + self._SetDefaults() + + @property + def abs_apk_path(self): + return os.path.join(self.output_directory, self.apk_path) + + @property + def apk_name(self): + # Only works on apk targets that follow: my_great_apk naming convention. + apk_name = ''.join(s.title() for s in self.target.split('_')[:-1]) + '.apk' + return apk_name.replace('Webview', 'WebView') + + @property + def apk_path(self): + return os.path.join('apks', self.apk_name) + + @property + def main_lib_name(self): + # TODO(estevenson): Get this from GN instead of hardcoding. + if self.IsLinux(): + return 'chrome' + elif 'monochrome' in self.target: + return 'lib.unstripped/libmonochrome.so' + else: + return 'lib.unstripped/libchrome.so' + + @property + def main_lib_path(self): + return os.path.join(self.output_directory, self.main_lib_name) + + @property + def map_file_name(self): + return self.main_lib_name + '.map.gz' + + def _SetDefaults(self): + has_goma_dir = os.path.exists(os.path.join(os.path.expanduser('~'), 'goma')) + self.use_goma = self.use_goma or has_goma_dir + self.max_load_average = (self.max_load_average or + str(multiprocessing.cpu_count())) + if not self.max_jobs: + self.max_jobs = '10000' if self.use_goma else '500' + + if os.path.exists(os.path.join(os.path.dirname(_SRC_ROOT), 'src-internal')): + self.extra_gn_args_str = ' is_chrome_branded=true' + else: + self.extra_gn_args_str = (' exclude_unwind_tables=true ' + 'ffmpeg_branding="Chrome" proprietary_codecs=true') + + def _GenGnCmd(self): + gn_args = 'is_official_build=true symbol_level=1' + gn_args += ' use_goma=%s' % str(self.use_goma).lower() + gn_args += ' target_os="%s"' % self.target_os + gn_args += (' enable_chrome_android_internal=%s' % + str(self.enable_chrome_android_internal).lower()) + gn_args += self.extra_gn_args_str + return ['gn', 'gen', self.output_directory, '--args=%s' % gn_args] + + def _GenNinjaCmd(self): + cmd = ['ninja', '-C', self.output_directory] + cmd += ['-j', self.max_jobs] if self.max_jobs else [] + cmd += ['-l', self.max_load_average] if self.max_load_average else [] + cmd += [self.target] + return cmd + + def Run(self): + _Print('Building: {}.', self.target) + _RunCmd(self._GenGnCmd(), print_stdout=True) + _RunCmd(self._GenNinjaCmd(), print_stdout=True) + + def IsAndroid(self): + return self.target_os == 'android' + + def IsLinux(self): + return self.target_os == 'linux' + + +def _RunCmd(cmd, print_stdout=False): + """Convenience function for running commands. + + Args: + cmd: the command to run. + print_stdout: if this is True, then the stdout of the process will be + printed, otherwise stdout will be returned. + + Returns: + Command stdout if |print_stdout| is False otherwise ''. + """ + cmd_str = ' '.join(c for c in cmd) + _Print('Running: {}', cmd_str) + if print_stdout: + proc_stdout = sys.stdout + else: + proc_stdout = subprocess.PIPE + + proc = subprocess.Popen(cmd, stdout=proc_stdout, stderr=subprocess.PIPE) + stdout, stderr = proc.communicate() + + if proc.returncode: + _Die('command failed: {}\nstderr:\n{}', cmd_str, stderr) + + return stdout.strip() if stdout else '' + + +def _GitCmd(args): + return _RunCmd(['git', '-C', _SRC_ROOT] + args) + + +def _GclientSyncCmd(rev): + cwd = os.getcwd() + os.chdir(_SRC_ROOT) + _RunCmd(['gclient', 'sync', '-r', 'src@' + rev], print_stdout=True) + os.chdir(cwd) + + +def _ArchiveBuildResult(archive_dir, build): + """Save build artifacts necessary for diffing. + + Expects |build.output_directory| to be correct. + """ + _Print('Saving build results to: {}', archive_dir) + if not os.path.exists(archive_dir): + os.makedirs(archive_dir) + + def ArchiveFile(filename): + if not os.path.exists(filename): + _Die('missing expected file: {}', filename) + shutil.copy(filename, archive_dir) + + ArchiveFile(build.main_lib_path) + lib_name_noext = os.path.splitext(os.path.basename(build.main_lib_path))[0] + size_path = os.path.join(archive_dir, lib_name_noext + '.size') + supersize_path = os.path.join(_SRC_ROOT, 'tools/binary_size/supersize') + tool_prefix = _FindToolPrefix(build.output_directory) + supersize_cmd = [supersize_path, 'archive', size_path, '--elf-file', + build.main_lib_path, '--tool-prefix', tool_prefix, + '--output-directory', build.output_directory, + '--no-source-paths'] + if build.IsAndroid(): + supersize_cmd += ['--apk-file', build.abs_apk_path] + ArchiveFile(build.abs_apk_path) + + _RunCmd(supersize_cmd) + + +def _FindToolPrefix(output_directory): + build_vars_path = os.path.join(output_directory, 'build_vars.txt') + if os.path.exists(build_vars_path): + with open(build_vars_path) as f: + build_vars = dict(l.rstrip().split('=', 1) for l in f if '=' in l) + # Tool prefix is relative to output dir, rebase to source root. + tool_prefix = build_vars['android_tool_prefix'] + while os.path.sep in tool_prefix: + rebased_tool_prefix = os.path.join(_SRC_ROOT, tool_prefix) + if os.path.exists(rebased_tool_prefix + 'readelf'): + return rebased_tool_prefix + tool_prefix = tool_prefix[tool_prefix.find(os.path.sep) + 1:] + return '' + + +def _SyncAndBuild(revs, archive_dirs, build): + # Move to a detached state since gclient sync doesn't work with local commits + # on a branch. + _GitCmd(['checkout', '--detach']) + for rev, archive_dir in itertools.izip(revs, archive_dirs): + _GclientSyncCmd(rev) + build.Run() + _ArchiveBuildResult(archive_dir, build) + + +def _NormalizeRev(rev): + """Use actual revs instead of HEAD, HEAD^, etc.""" + return _GitCmd(['rev-parse', rev]) + + +def _EnsureDirectoryClean(): + _Print('Checking source directory') + stdout = _GitCmd(['status', '--porcelain']) + # Ignore untracked files. + if stdout and stdout[:2] != '??': + _Die('please ensure working directory is clean.') + + +def _SetInitialBranch(): + global _initial_branch + _initial_branch = _GitCmd(['rev-parse', '--abbrev-ref', 'HEAD']) + + +def _RestoreInitialBranch(): + if _initial_branch: + _GitCmd(['checkout', _initial_branch]) + + +def _Die(s, *args, **kwargs): + _Print('Failure: ' + s, *args, **kwargs) + _RestoreInitialBranch() + sys.exit(1) + + +def _DownloadBuildArtifacts(revs, archive_dirs, build, depot_tools_path=None): + """Download artifacts from arm32 chromium perf builder.""" + if depot_tools_path: + gsutil_path = os.path.join(depot_tools_path, 'gsutil.py') + else: + gsutil_path = distutils.spawn.find_executable('gsutil.py') + + if not gsutil_path: + _Die('gsutil.py not found, please provide path to depot_tools via ' + '--depot-tools-path or add it to your PATH') + + download_dir = tempfile.mkdtemp(dir=_SRC_ROOT) + try: + for rev, archive_dir in itertools.izip(revs, archive_dirs): + _DownloadAndArchive(gsutil_path, rev, archive_dir, download_dir, build) + finally: + shutil.rmtree(download_dir) + + +def _DownloadAndArchive(gsutil_path, rev, archive_dir, dl_dir, build): + dl_file = 'full-build-linux_%s.zip' % rev + dl_url = 'gs://chrome-perf/Android Builder/%s' % dl_file + dl_dst = os.path.join(dl_dir, dl_file) + _Print('Downloading build artifacts for {}', rev) + # gsutil writes stdout and stderr to stderr, so pipe stdout and stderr to + # sys.stdout. + retcode = subprocess.call([gsutil_path, 'cp', dl_url, dl_dir], + stdout=sys.stdout, stderr=subprocess.STDOUT) + if retcode: + _Die('unexpected error while downloading {}. It may no longer exist on ' + 'the server or it may not have been uploaded yet (check {}). ' + 'Otherwise, you may not have the correct access permissions.', + dl_url, _BUILDER_URL) + + # Files needed for supersize and resource_sizes. Paths relative to out dir. + to_extract = [build.main_lib_name, build.map_file_name, 'args.gn', + 'build_vars.txt', build.apk_path] + extract_dir = os.path.join(os.path.splitext(dl_dst)[0], 'unzipped') + # Storage bucket stores entire output directory including out/Release prefix. + _Print('Extracting build artifacts') + with zipfile.ZipFile(dl_dst, 'r') as z: + _ExtractFiles(to_extract, _CLOUD_OUT_DIR, extract_dir, z) + dl_out = os.path.join(extract_dir, _CLOUD_OUT_DIR) + build.output_directory, output_directory = dl_out, build.output_directory + _ArchiveBuildResult(archive_dir, build) + build.output_directory = output_directory + + +def _ExtractFiles(to_extract, prefix, dst, z): + zip_infos = z.infolist() + assert all(info.filename.startswith(prefix) for info in zip_infos), ( + 'Storage bucket folder structure doesn\'t start with %s' % prefix) + to_extract = [os.path.join(prefix, f) for f in to_extract] + for f in to_extract: + z.extract(f, path=dst) + + +def _Print(s, *args, **kwargs): + print s.format(*args, **kwargs) + + +def _PrintAndWriteToFile(logfile, s): + """Print |s| to |logfile| and stdout.""" + _Print(s) + logfile.write('%s\n' % s) + + +def main(): + parser = argparse.ArgumentParser( + description='Find the cause of APK size bloat.', + formatter_class=argparse.ArgumentDefaultsHelpFormatter) + parser.add_argument('--archive-dir', + default=_DEFAULT_ARCHIVE_DIR, + help='Where results are stored.') + parser.add_argument('--rev-with-patch', + default='HEAD', + help='Commit with patch.') + parser.add_argument('--rev-without-patch', + help='Older patch to diff against. If not supplied, ' + 'the previous commit to rev_with_patch will be used.') + parser.add_argument('--include-slow-options', + action='store_true', + help='Run some extra steps that take longer to complete. ' + 'This includes apk-patch-size estimation and ' + 'static-initializer counting') + parser.add_argument('--cloud', + action='store_true', + help='Download build artifacts from perf builders ' + '(Android only, Googlers only).') + parser.add_argument('--depot-tools-path', + help='Custom path to depot tools. Needed for --cloud if ' + 'depot tools isn\'t in your PATH') + + build_group = parser.add_argument_group('ninja', 'Args to use with ninja/gn') + build_group.add_argument('-j', + dest='max_jobs', + help='Run N jobs in parallel.') + build_group.add_argument('-l', + dest='max_load_average', + help='Do not start new jobs if the load average is ' + 'greater than N.') + build_group.add_argument('--no-goma', + action='store_false', + dest='use_goma', + default=True, + help='Use goma when building with ninja.') + build_group.add_argument('--target-os', + default='android', + choices=['android', 'linux'], + help='target_os gn arg.') + build_group.add_argument('--output-directory', + default=_DEFAULT_OUT_DIR, + help='ninja output directory.') + build_group.add_argument('--enable_chrome_android_internal', + action='store_true', + help='Allow downstream targets to be built.') + build_group.add_argument('--target', + default=_DEFAULT_TARGET, + help='GN APK target to build.') + args = parser.parse_args() + build = _BuildHelper(args) + if args.cloud and build.IsLinux(): + parser.error('--cloud only works for android') + + _EnsureDirectoryClean() + _SetInitialBranch() + revs = [args.rev_with_patch, + args.rev_without_patch or args.rev_with_patch + '^'] + revs = [_NormalizeRev(r) for r in revs] + archive_dirs = [os.path.join(args.archive_dir, '%d-%s' % (len(revs) - i, rev)) + for i, rev in enumerate(revs)] + if args.cloud: + _DownloadBuildArtifacts(revs, archive_dirs, build, + depot_tools_path=args.depot_tools_path) + else: + _SetInitialBranch() + _SyncAndBuild(revs, archive_dirs, build) + _RestoreInitialBranch() + + output_file = os.path.join(args.archive_dir, + 'diff_result_{}_{}.txt'.format(*revs)) + if os.path.exists(output_file): + os.remove(output_file) + diffs = [] + if build.IsAndroid(): + diffs += [ + ResourceSizesDiff(archive_dirs, build.apk_name, + slow_options=args.include_slow_options) + ] + with open(output_file, 'a') as logfile: + for d in diffs: + d.AppendResults(logfile) + +if __name__ == '__main__': + sys.exit(main()) +
diff --git a/tools/binary_size/explain_binary_size_delta.py b/tools/binary_size/explain_binary_size_delta.py deleted file mode 100755 index 45c1236..0000000 --- a/tools/binary_size/explain_binary_size_delta.py +++ /dev/null
@@ -1,484 +0,0 @@ -#!/usr/bin/env python -# Copyright 2014 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. - -"""Describe the size difference of two binaries. - -Generates a description of the size difference of two binaries based -on the difference of the size of various symbols. - -This tool needs "nm" dumps of each binary with full symbol -information. You can obtain the necessary dumps by running the -run_binary_size_analysis.py script upon each binary, with the -"--nm-out" parameter set to the location in which you want to save the -dumps. Example: - - # obtain symbol data from first binary in /tmp/nm1.dump - cd $CHECKOUT1_SRC - ninja -C out/Release binary_size_tool - tools/binary_size/run_binary_size_analysis \ - --library <path_to_library> - --destdir /tmp/throwaway - --nm-out /tmp/nm1.dump - - # obtain symbol data from second binary in /tmp/nm2.dump - cd $CHECKOUT2_SRC - ninja -C out/Release binary_size_tool - tools/binary_size/run_binary_size_analysis \ - --library <path_to_library> - --destdir /tmp/throwaway - --nm-out /tmp/nm2.dump - - # cleanup useless files - rm -r /tmp/throwaway - - # run this tool - explain_binary_size_delta.py --nm1 /tmp/nm1.dump --nm2 /tmp/nm2.dump -""" - -import collections -from collections import Counter -from math import ceil -import operator -import optparse -import os -import sys - -import binary_size_utils - - -def CalculateSharedAddresses(symbols): - """Checks how many symbols share the same memory space. This returns a -Counter result where result[address] will tell you how many times address was -used by symbols.""" - count = Counter() - for _, _, _, _, address in symbols: - count[address] += 1 - - return count - - -def CalculateEffectiveSize(share_count, address, symbol_size): - """Given a raw symbol_size and an address, this method returns the - size we should blame on this symbol considering it might share the - machine code/data with other symbols. Using the raw symbol_size for - each symbol would in those cases over estimate the true cost of that - block. - - """ - shared_count = share_count[address] - if shared_count == 1: - return symbol_size - - assert shared_count > 1 - return int(ceil(symbol_size / float(shared_count))) - -class SymbolDelta(object): - """Stores old size, new size and some metadata.""" - def __init__(self, shared): - self.old_size = None - self.new_size = None - self.shares_space_with_other_symbols = shared - - def __eq__(self, other): - return (self.old_size == other.old_size and - self.new_size == other.new_size and - self.shares_space_with_other_symbols == - other.shares_space_with_other_symbols) - - def __ne__(self, other): - return not self.__eq__(other) - - def copy_symbol_delta(self): - symbol_delta = SymbolDelta(self.shares_space_with_other_symbols) - symbol_delta.old_size = self.old_size - symbol_delta.new_size = self.new_size - return symbol_delta - -class DeltaInfo(SymbolDelta): - """Summary of a the change for one symbol between two instances.""" - def __init__(self, file_path, symbol_type, symbol_name, shared): - SymbolDelta.__init__(self, shared) - self.file_path = file_path - self.symbol_type = symbol_type - self.symbol_name = symbol_name - - def __eq__(self, other): - return (self.file_path == other.file_path and - self.symbol_type == other.symbol_type and - self.symbol_name == other.symbol_name and - SymbolDelta.__eq__(self, other)) - - def __ne__(self, other): - return not self.__eq__(other) - - def ExtractSymbolDelta(self): - """Returns a copy of the SymbolDelta for this DeltaInfo.""" - return SymbolDelta.copy_symbol_delta(self) - -def Compare(symbols1, symbols2): - """Executes a comparison of the symbols in symbols1 and symbols2. - - Returns: - tuple of lists: (added_symbols, removed_symbols, changed_symbols, others) - where each list contains DeltaInfo objects. - """ - added = [] # tuples - removed = [] # tuples - changed = [] # tuples - unchanged = [] # tuples - - cache1 = {} - cache2 = {} - # Make a map of (file, symbol_type) : (symbol_name, effective_symbol_size) - share_count1 = CalculateSharedAddresses(symbols1) - share_count2 = CalculateSharedAddresses(symbols2) - for cache, symbols, share_count in ((cache1, symbols1, share_count1), - (cache2, symbols2, share_count2)): - for symbol_name, symbol_type, symbol_size, file_path, address in symbols: - if 'vtable for ' in symbol_name: - symbol_type = '@' # hack to categorize these separately - if file_path: - file_path = os.path.normpath(file_path) - if sys.platform.startswith('win'): - file_path = file_path.replace('\\', '/') - else: - file_path = '(No Path)' - # Take into consideration that multiple symbols might share the same - # block of code. - effective_symbol_size = CalculateEffectiveSize(share_count, address, - symbol_size) - key = (file_path, symbol_type) - bucket = cache.setdefault(key, {}) - size_list = bucket.setdefault(symbol_name, []) - size_list.append((effective_symbol_size, - effective_symbol_size != symbol_size)) - - # Now diff them. We iterate over the elements in cache1. For each symbol - # that we find in cache2, we record whether it was deleted, changed, or - # unchanged. We then remove it from cache2; all the symbols that remain - # in cache2 at the end of the iteration over cache1 are the 'new' symbols. - for key, bucket1 in cache1.items(): - bucket2 = cache2.get(key) - file_path, symbol_type = key; - if not bucket2: - # A file was removed. Everything in bucket1 is dead. - for symbol_name, symbol_size_list in bucket1.items(): - for (symbol_size, shared) in symbol_size_list: - delta_info = DeltaInfo(file_path, symbol_type, symbol_name, shared) - delta_info.old_size = symbol_size - removed.append(delta_info) - else: - # File still exists, look for changes within. - for symbol_name, symbol_size_list in bucket1.items(): - size_list2 = bucket2.get(symbol_name) - if size_list2 is None: - # Symbol no longer exists in bucket2. - for (symbol_size, shared) in symbol_size_list: - delta_info = DeltaInfo(file_path, symbol_type, symbol_name, shared) - delta_info.old_size = symbol_size - removed.append(delta_info) - else: - del bucket2[symbol_name] # Symbol is not new, delete from cache2. - if len(symbol_size_list) == 1 and len(size_list2) == 1: - symbol_size, shared1 = symbol_size_list[0] - size2, shared2 = size_list2[0] - delta_info = DeltaInfo(file_path, symbol_type, symbol_name, - shared1 or shared2) - delta_info.old_size = symbol_size - delta_info.new_size = size2 - if symbol_size != size2: - # Symbol has change size in bucket. - changed.append(delta_info) - else: - # Symbol is unchanged. - unchanged.append(delta_info) - else: - # Complex comparison for when a symbol exists multiple times - # in the same file (where file can be "unknown file"). - symbol_size_counter = collections.Counter(symbol_size_list) - delta_counter = collections.Counter(symbol_size_list) - delta_counter.subtract(size_list2) - for delta_counter_key in sorted(delta_counter.keys()): - delta = delta_counter[delta_counter_key] - unchanged_count = symbol_size_counter[delta_counter_key] - (symbol_size, shared) = delta_counter_key - if delta > 0: - unchanged_count -= delta - for _ in range(unchanged_count): - delta_info = DeltaInfo(file_path, symbol_type, - symbol_name, shared) - delta_info.old_size = symbol_size - delta_info.new_size = symbol_size - unchanged.append(delta_info) - if delta > 0: # Used to be more of these than there is now. - for _ in range(delta): - delta_info = DeltaInfo(file_path, symbol_type, - symbol_name, shared) - delta_info.old_size = symbol_size - removed.append(delta_info) - elif delta < 0: # More of this (symbol,size) now. - for _ in range(-delta): - delta_info = DeltaInfo(file_path, symbol_type, - symbol_name, shared) - delta_info.new_size = symbol_size - added.append(delta_info) - - if len(bucket2) == 0: - del cache1[key] # Entire bucket is empty, delete from cache2 - - # We have now analyzed all symbols that are in cache1 and removed all of - # the encountered symbols from cache2. What's left in cache2 is the new - # symbols. - for key, bucket2 in cache2.iteritems(): - file_path, symbol_type = key; - for symbol_name, symbol_size_list in bucket2.items(): - for (symbol_size, shared) in symbol_size_list: - delta_info = DeltaInfo(file_path, symbol_type, symbol_name, shared) - delta_info.new_size = symbol_size - added.append(delta_info) - return (added, removed, changed, unchanged) - - -def DeltaStr(number): - """Returns the number as a string with a '+' prefix if it's > 0 and - a '-' prefix if it's < 0.""" - result = str(number) - if number > 0: - result = '+' + result - return result - - -def SharedInfoStr(symbol_info): - """Returns a string (prefixed by space) explaining that numbers are - adjusted because of shared space between symbols, or an empty string - if space had not been shared.""" - - if symbol_info.shares_space_with_other_symbols: - return " (adjusted sizes because of memory sharing)" - - return "" - -class CrunchStatsData(object): - """Stores a summary of data of a certain kind.""" - def __init__(self, symbols): - self.symbols = symbols - self.sources = set() - self.before_size = 0 - self.after_size = 0 - self.symbols_by_path = {} - - -def CrunchStats(added, removed, changed, unchanged, showsources, showsymbols): - """Outputs to stdout a summary of changes based on the symbol lists.""" - # Split changed into grown and shrunk because that is easier to - # discuss. - grown = [] - shrunk = [] - for item in changed: - if item.old_size < item.new_size: - grown.append(item) - else: - shrunk.append(item) - - new_symbols = CrunchStatsData(added) - removed_symbols = CrunchStatsData(removed) - grown_symbols = CrunchStatsData(grown) - shrunk_symbols = CrunchStatsData(shrunk) - sections = [new_symbols, removed_symbols, grown_symbols, shrunk_symbols] - for section in sections: - for item in section.symbols: - section.sources.add(item.file_path) - if item.old_size is not None: - section.before_size += item.old_size - if item.new_size is not None: - section.after_size += item.new_size - bucket = section.symbols_by_path.setdefault(item.file_path, []) - bucket.append((item.symbol_name, item.symbol_type, - item.ExtractSymbolDelta())) - - total_change = sum(s.after_size - s.before_size for s in sections) - summary = 'Total change: %s bytes' % DeltaStr(total_change) - print(summary) - print('=' * len(summary)) - for section in sections: - if not section.symbols: - continue - if section.before_size == 0: - description = ('added, totalling %s bytes' % DeltaStr(section.after_size)) - elif section.after_size == 0: - description = ('removed, totalling %s bytes' % - DeltaStr(-section.before_size)) - else: - if section.after_size > section.before_size: - type_str = 'grown' - else: - type_str = 'shrunk' - description = ('%s, for a net change of %s bytes ' - '(%d bytes before, %d bytes after)' % - (type_str, DeltaStr(section.after_size - section.before_size), - section.before_size, section.after_size)) - print(' %d %s across %d sources' % - (len(section.symbols), description, len(section.sources))) - - maybe_unchanged_sources = set() - unchanged_symbols_size = 0 - for item in unchanged: - maybe_unchanged_sources.add(item.file_path) - unchanged_symbols_size += item.old_size # == item.new_size - print(' %d unchanged, totalling %d bytes' % - (len(unchanged), unchanged_symbols_size)) - - # High level analysis, always output. - unchanged_sources = maybe_unchanged_sources - for section in sections: - unchanged_sources = unchanged_sources - section.sources - new_sources = (new_symbols.sources - - maybe_unchanged_sources - - removed_symbols.sources) - removed_sources = (removed_symbols.sources - - maybe_unchanged_sources - - new_symbols.sources) - partially_changed_sources = (grown_symbols.sources | - shrunk_symbols.sources | new_symbols.sources | - removed_symbols.sources) - removed_sources - new_sources - allFiles = set() - for section in sections: - allFiles = allFiles | section.sources - allFiles = allFiles | maybe_unchanged_sources - print 'Source stats:' - print(' %d sources encountered.' % len(allFiles)) - print(' %d completely new.' % len(new_sources)) - print(' %d removed completely.' % len(removed_sources)) - print(' %d partially changed.' % len(partially_changed_sources)) - print(' %d completely unchanged.' % len(unchanged_sources)) - remainder = (allFiles - new_sources - removed_sources - - partially_changed_sources - unchanged_sources) - assert len(remainder) == 0 - - if not showsources: - return # Per-source analysis, only if requested - print 'Per-source Analysis:' - delta_by_path = {} - for section in sections: - for path in section.symbols_by_path: - entry = delta_by_path.get(path) - if not entry: - entry = {'plus': 0, 'minus': 0} - delta_by_path[path] = entry - for symbol_name, symbol_type, symbol_delta in \ - section.symbols_by_path[path]: - if symbol_delta.old_size is None: - delta = symbol_delta.new_size - elif symbol_delta.new_size is None: - delta = -symbol_delta.old_size - else: - delta = symbol_delta.new_size - symbol_delta.old_size - - if delta > 0: - entry['plus'] += delta - else: - entry['minus'] += (-1 * delta) - - def delta_sort_key(item): - _path, size_data = item - growth = size_data['plus'] - size_data['minus'] - return growth - - for path, size_data in sorted(delta_by_path.iteritems(), key=delta_sort_key, - reverse=True): - gain = size_data['plus'] - loss = size_data['minus'] - delta = size_data['plus'] - size_data['minus'] - header = ' %s - Source: %s - (gained %d, lost %d)' % (DeltaStr(delta), - path, gain, loss) - divider = '-' * len(header) - print '' - print divider - print header - print divider - if showsymbols: - def ExtractNewSize(tup): - symbol_delta = tup[2] - return symbol_delta.new_size - def ExtractOldSize(tup): - symbol_delta = tup[2] - return symbol_delta.old_size - if path in new_symbols.symbols_by_path: - print ' New symbols:' - for symbol_name, symbol_type, symbol_delta in \ - sorted(new_symbols.symbols_by_path[path], - key=ExtractNewSize, - reverse=True): - print (' %8s: %s type=%s, size=%d bytes%s' % - (DeltaStr(symbol_delta.new_size), symbol_name, symbol_type, - symbol_delta.new_size, SharedInfoStr(symbol_delta))) - if path in removed_symbols.symbols_by_path: - print ' Removed symbols:' - for symbol_name, symbol_type, symbol_delta in \ - sorted(removed_symbols.symbols_by_path[path], - key=ExtractOldSize): - print (' %8s: %s type=%s, size=%d bytes%s' % - (DeltaStr(-symbol_delta.old_size), symbol_name, symbol_type, - symbol_delta.old_size, - SharedInfoStr(symbol_delta))) - for (changed_symbols_by_path, type_str) in [ - (grown_symbols.symbols_by_path, "Grown"), - (shrunk_symbols.symbols_by_path, "Shrunk")]: - if path in changed_symbols_by_path: - print ' %s symbols:' % type_str - def changed_symbol_sortkey(item): - symbol_name, _symbol_type, symbol_delta = item - return (symbol_delta.old_size - symbol_delta.new_size, symbol_name) - for symbol_name, symbol_type, symbol_delta in \ - sorted(changed_symbols_by_path[path], key=changed_symbol_sortkey): - print (' %8s: %s type=%s, (was %d bytes, now %d bytes)%s' - % (DeltaStr(symbol_delta.new_size - symbol_delta.old_size), - symbol_name, symbol_type, - symbol_delta.old_size, symbol_delta.new_size, - SharedInfoStr(symbol_delta))) - - -def main(): - usage = """%prog [options] - - Analyzes the symbolic differences between two binary files - (typically, not necessarily, two different builds of the same - library) and produces a detailed description of symbols that have - been added, removed, or whose size has changed. - - Example: - explain_binary_size_delta.py --nm1 /tmp/nm1.dump --nm2 /tmp/nm2.dump - - Options are available via '--help'. - """ - parser = optparse.OptionParser(usage=usage) - parser.add_option('--nm1', metavar='PATH', - help='the nm dump of the first library') - parser.add_option('--nm2', metavar='PATH', - help='the nm dump of the second library') - parser.add_option('--showsources', action='store_true', default=False, - help='show per-source statistics') - parser.add_option('--showsymbols', action='store_true', default=False, - help='show all symbol information; implies --showsources') - parser.add_option('--verbose', action='store_true', default=False, - help='output internal debugging stuff') - opts, _args = parser.parse_args() - - if not opts.nm1: - parser.error('--nm1 is required') - if not opts.nm2: - parser.error('--nm2 is required') - symbols = [] - for path in [opts.nm1, opts.nm2]: - with file(path, 'r') as nm_input: - if opts.verbose: - print 'parsing ' + path + '...' - symbols.append(list(binary_size_utils.ParseNm(nm_input))) - (added, removed, changed, unchanged) = Compare(symbols[0], symbols[1]) - CrunchStats(added, removed, changed, unchanged, - opts.showsources | opts.showsymbols, opts.showsymbols) - -if __name__ == '__main__': - sys.exit(main())
diff --git a/tools/binary_size/explain_binary_size_delta_unittest.py b/tools/binary_size/explain_binary_size_delta_unittest.py deleted file mode 100755 index d818d83..0000000 --- a/tools/binary_size/explain_binary_size_delta_unittest.py +++ /dev/null
@@ -1,621 +0,0 @@ -#!/usr/bin/env python -# Copyright 2014 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. - -"""Check that explain_binary_size_delta seems to work.""" - -import cStringIO -import sys -import unittest - -import explain_binary_size_delta - - -class ExplainBinarySizeDeltaTest(unittest.TestCase): - - def testCompare(self): - # List entries have form: - # symbol_name, symbol_type, symbol_size, file_path, memory_address - symbol_list1 = ( - # File with one symbol, left as-is. - ( 'unchanged', 't', 1000, '/file_unchanged', 0x1 ), - # File with one symbol, changed. - ( 'changed', 't', 1000, '/file_all_changed', 0x2 ), - # File with one symbol, deleted. - ( 'removed', 't', 1000, '/file_all_deleted', 0x3 ), - # File with two symbols, one unchanged, one changed, same bucket - ( 'unchanged', 't', 1000, '/file_pair_unchanged_changed', 0x4 ), - ( 'changed', 't', 1000, '/file_pair_unchanged_changed', 0x5 ), - # File with two symbols, one unchanged, one deleted, same bucket - ( 'unchanged', 't', 1000, '/file_pair_unchanged_removed', 0x6 ), - ( 'removed', 't', 1000, '/file_pair_unchanged_removed', 0x7 ), - # File with two symbols, one unchanged, one added, same bucket - ( 'unchanged', 't', 1000, '/file_pair_unchanged_added', 0x8 ), - # File with two symbols, one unchanged, one changed, different bucket - ( 'unchanged', 't', 1000, '/file_pair_unchanged_diffbuck_changed', 0x9 ), - ( 'changed', '@', 1000, '/file_pair_unchanged_diffbuck_changed', 0xa ), - # File with two symbols, one unchanged, one deleted, different bucket - ( 'unchanged', 't', 1000, '/file_pair_unchanged_diffbuck_removed', 0xb ), - ( 'removed', '@', 1000, '/file_pair_unchanged_diffbuck_removed', 0xc ), - # File with two symbols, one unchanged, one added, different bucket - ( 'unchanged', 't', 1000, '/file_pair_unchanged_diffbuck_added', 0xd ), - # File with four symbols, one added, one removed, - # one changed, one unchanged - ( 'size_changed', 't', 1000, '/file_tetra', 0xe ), - ( 'removed', 't', 1000, '/file_tetra', 0xf ), - ( 'unchanged', 't', 1000, '/file_tetra', 0x10 ), - ) - - symbol_list2 = ( - # File with one symbol, left as-is. - ( 'unchanged', 't', 1000, '/file_unchanged', 0x1 ), - # File with one symbol, changed. - ( 'changed', 't', 2000, '/file_all_changed', 0x2 ), - # File with two symbols, one unchanged, one changed, same bucket - ( 'unchanged', 't', 1000, '/file_pair_unchanged_changed', 0x3 ), - ( 'changed', 't', 2000, '/file_pair_unchanged_changed', 0x4 ), - # File with two symbols, one unchanged, one deleted, same bucket - ( 'unchanged', 't', 1000, '/file_pair_unchanged_removed', 0x5 ), - # File with two symbols, one unchanged, one added, same bucket - ( 'unchanged', 't', 1000, '/file_pair_unchanged_added', 0x6 ), - ( 'added', 't', 1000, '/file_pair_unchanged_added', 0x7 ), - # File with two symbols, one unchanged, one changed, different bucket - ( 'unchanged', 't', 1000, '/file_pair_unchanged_diffbuck_changed', 0x8 ), - ( 'changed', '@', 2000, '/file_pair_unchanged_diffbuck_changed', 0x9 ), - # File with two symbols, one unchanged, one deleted, different bucket - ( 'unchanged', 't', 1000, '/file_pair_unchanged_diffbuck_removed', 0xa ), - # File with two symbols, one unchanged, one added, different bucket - ( 'unchanged', 't', 1000, '/file_pair_unchanged_diffbuck_added', 0xb ), - ( 'added', '@', 1000, '/file_pair_unchanged_diffbuck_added', 0xc ), - # File with four symbols, one added, one removed, - # one changed, one unchanged - ( 'size_changed', 't', 2000, '/file_tetra', 0xd ), - ( 'unchanged', 't', 1000, '/file_tetra', 0xe ), - ( 'added', 't', 1000, '/file_tetra', 0xf ), - # New file with one symbol added - ( 'added', 't', 1000, '/file_new', 0x10 ), - ) - - # Here we go - (added, removed, changed, unchanged) = \ - explain_binary_size_delta.Compare(symbol_list1, symbol_list2) - - def delta(file_path, symbol_type, symbol_name, old_size, new_size): - delta_info = explain_binary_size_delta.DeltaInfo( - file_path, symbol_type, symbol_name, False) - delta_info.old_size = old_size - delta_info.new_size = new_size - return delta_info - - # File with one symbol, left as-is. - assert delta('/file_unchanged', 't', 'unchanged', 1000, 1000) in unchanged - # File with one symbol, changed. - assert delta('/file_all_changed', 't', 'changed', 1000, 2000) in changed - # File with one symbol, deleted. - assert delta('/file_all_deleted', 't', 'removed', 1000, None) in removed - # New file with one symbol added - assert delta('/file_new', 't', 'added', None, 1000) in added - # File with two symbols, one unchanged, one changed, same bucket - assert delta('/file_pair_unchanged_changed', - 't', 'unchanged', 1000, 1000) in unchanged - assert delta('/file_pair_unchanged_changed', - 't', 'changed', 1000, 2000) in changed - # File with two symbols, one unchanged, one removed, same bucket - assert delta('/file_pair_unchanged_removed', - 't', 'unchanged', 1000, 1000) in unchanged - assert delta('/file_pair_unchanged_removed', - 't', 'removed', 1000, None) in removed - # File with two symbols, one unchanged, one added, same bucket - assert delta('/file_pair_unchanged_added', - 't', 'unchanged', 1000, 1000) in unchanged - assert delta('/file_pair_unchanged_added', - 't', 'added', None, 1000) in added - # File with two symbols, one unchanged, one changed, different bucket - assert delta('/file_pair_unchanged_diffbuck_changed', - 't', 'unchanged', 1000, 1000) in unchanged - assert delta('/file_pair_unchanged_diffbuck_changed', - '@', 'changed', 1000, 2000) in changed - # File with two symbols, one unchanged, one removed, different bucket - assert delta('/file_pair_unchanged_diffbuck_removed', - 't', 'unchanged', 1000, 1000) in unchanged - assert delta('/file_pair_unchanged_diffbuck_removed', - '@', 'removed', 1000, None) in removed - # File with two symbols, one unchanged, one added, different bucket - assert delta('/file_pair_unchanged_diffbuck_added', - 't', 'unchanged', 1000, 1000) in unchanged - assert delta('/file_pair_unchanged_diffbuck_added', - '@', 'added', None, 1000) in added - # File with four symbols, one added, one removed, one changed, one unchanged - assert delta('/file_tetra', 't', 'size_changed', 1000, 2000) in changed - assert delta('/file_tetra', 't', 'unchanged', 1000, 1000) in unchanged - assert delta('/file_tetra', 't', 'added', None, 1000) in added - assert delta('/file_tetra', 't', 'removed', 1000, None) in removed - - # Now check final stats. - orig_stdout = sys.stdout - output_collector = cStringIO.StringIO() - sys.stdout = output_collector - try: - explain_binary_size_delta.CrunchStats(added, removed, changed, - unchanged, True, True) - finally: - sys.stdout = orig_stdout - result = output_collector.getvalue() - - expected_output = """\ -Total change: +4000 bytes -========================= - 4 added, totalling +4000 bytes across 4 sources - 4 removed, totalling -4000 bytes across 4 sources - 4 grown, for a net change of +4000 bytes \ -(4000 bytes before, 8000 bytes after) across 4 sources - 8 unchanged, totalling 8000 bytes -Source stats: - 11 sources encountered. - 1 completely new. - 1 removed completely. - 8 partially changed. - 1 completely unchanged. -Per-source Analysis: - --------------------------------------------------- - +1000 - Source: /file_new - (gained 1000, lost 0) --------------------------------------------------- - New symbols: - +1000: added type=t, size=1000 bytes - ---------------------------------------------------------------------- - +1000 - Source: /file_pair_unchanged_changed - (gained 1000, lost 0) ---------------------------------------------------------------------- - Grown symbols: - +1000: changed type=t, (was 1000 bytes, now 2000 bytes) - ----------------------------------------------------------------------------- - +1000 - Source: /file_pair_unchanged_diffbuck_added - (gained 1000, lost 0) ----------------------------------------------------------------------------- - New symbols: - +1000: added type=@, size=1000 bytes - -------------------------------------------------------------------- - +1000 - Source: /file_pair_unchanged_added - (gained 1000, lost 0) -------------------------------------------------------------------- - New symbols: - +1000: added type=t, size=1000 bytes - ------------------------------------------------------------------------------- - +1000 - Source: /file_pair_unchanged_diffbuck_changed - (gained 1000, lost 0) ------------------------------------------------------------------------------- - Grown symbols: - +1000: changed type=@, (was 1000 bytes, now 2000 bytes) - ----------------------------------------------------------- - +1000 - Source: /file_all_changed - (gained 1000, lost 0) ----------------------------------------------------------- - Grown symbols: - +1000: changed type=t, (was 1000 bytes, now 2000 bytes) - -------------------------------------------------------- - +1000 - Source: /file_tetra - (gained 2000, lost 1000) -------------------------------------------------------- - New symbols: - +1000: added type=t, size=1000 bytes - Removed symbols: - -1000: removed type=t, size=1000 bytes - Grown symbols: - +1000: size_changed type=t, (was 1000 bytes, now 2000 bytes) - ------------------------------------------------------------------------------- - -1000 - Source: /file_pair_unchanged_diffbuck_removed - (gained 0, lost 1000) ------------------------------------------------------------------------------- - Removed symbols: - -1000: removed type=@, size=1000 bytes - ----------------------------------------------------------- - -1000 - Source: /file_all_deleted - (gained 0, lost 1000) ----------------------------------------------------------- - Removed symbols: - -1000: removed type=t, size=1000 bytes - ---------------------------------------------------------------------- - -1000 - Source: /file_pair_unchanged_removed - (gained 0, lost 1000) ---------------------------------------------------------------------- - Removed symbols: - -1000: removed type=t, size=1000 bytes -""" - - self.maxDiff = None - self.assertMultiLineEqual(expected_output, result) - - - def testCompareStringEntries(self): - # List entries have form: - # symbol_name, symbol_type, symbol_size, file_path, memory_address - symbol_list1 = ( - # File with one string. - ( '.L.str107', 'r', 8, '/file_with_strs', 0x1 ), - ) - - symbol_list2 = ( - # Two files with one string each, same name. - ( '.L.str107', 'r', 8, '/file_with_strs', 0x1 ), - ( '.L.str107', 'r', 7, '/other_file_with_strs', 0x2 ), - ) - - # Here we go - (added, removed, changed, unchanged) = \ - explain_binary_size_delta.Compare(symbol_list1, symbol_list2) - - - # Now check final stats. - orig_stdout = sys.stdout - output_collector = cStringIO.StringIO() - sys.stdout = output_collector - try: - explain_binary_size_delta.CrunchStats(added, removed, changed, - unchanged, True, True) - finally: - sys.stdout = orig_stdout - result = output_collector.getvalue() - - expected_output = """\ -Total change: +7 bytes -====================== - 1 added, totalling +7 bytes across 1 sources - 1 unchanged, totalling 8 bytes -Source stats: - 2 sources encountered. - 1 completely new. - 0 removed completely. - 0 partially changed. - 1 completely unchanged. -Per-source Analysis: - --------------------------------------------------------- - +7 - Source: /other_file_with_strs - (gained 7, lost 0) --------------------------------------------------------- - New symbols: - +7: .L.str107 type=r, size=7 bytes -""" - - self.maxDiff = None - self.assertMultiLineEqual(expected_output, result) - - def testCompareStringEntriesWithNoFile(self): - # List entries have form: - # symbol_name, symbol_type, symbol_size, file_path, memory_address - symbol_list1 = ( - ( '.L.str104', 'r', 21, '??', 0x1 ), # Will change size. - ( '.L.str105', 'r', 17, '??', 0x2 ), # Same. - ( '.L.str106', 'r', 13, '??', 0x3 ), # Will be removed. - ( '.L.str106', 'r', 3, '??', 0x4 ), # Same. - ( '.L.str106', 'r', 3, '??', 0x5 ), # Will be removed. - ( '.L.str107', 'r', 8, '??', 0x6 ), # Will be removed (other sizes). - ) - - symbol_list2 = ( - # Two files with one string each, same name. - ( '.L.str104', 'r', 19, '??', 0x1 ), # Changed. - ( '.L.str105', 'r', 11, '??', 0x2 ), # New size for multi-symbol. - ( '.L.str105', 'r', 17, '??', 0x3 ), # New of same size for multi-symbol. - ( '.L.str105', 'r', 17, '??', 0x4 ), # Same. - ( '.L.str106', 'r', 3, '??', 0x5 ), # Same. - ( '.L.str107', 'r', 5, '??', 0x6 ), # New size for symbol. - ( '.L.str107', 'r', 7, '??', 0x7 ), # New size for symbol. - ( '.L.str108', 'r', 8, '??', 0x8 ), # New symbol. - ) - - # Here we go - (added, removed, changed, unchanged) = \ - explain_binary_size_delta.Compare(symbol_list1, symbol_list2) - - - # Now check final stats. - orig_stdout = sys.stdout - output_collector = cStringIO.StringIO() - sys.stdout = output_collector - try: - explain_binary_size_delta.CrunchStats(added, removed, changed, - unchanged, True, True) - finally: - sys.stdout = orig_stdout - result = output_collector.getvalue() - - expected_output = """\ -Total change: +22 bytes -======================= - 5 added, totalling +48 bytes across 1 sources - 3 removed, totalling -24 bytes across 1 sources - 1 shrunk, for a net change of -2 bytes (21 bytes before, 19 bytes after) \ -across 1 sources - 2 unchanged, totalling 20 bytes -Source stats: - 1 sources encountered. - 0 completely new. - 0 removed completely. - 1 partially changed. - 0 completely unchanged. -Per-source Analysis: - ----------------------------------------- - +22 - Source: ?? - (gained 48, lost 26) ----------------------------------------- - New symbols: - +17: .L.str105 type=r, size=17 bytes - +11: .L.str105 type=r, size=11 bytes - +8: .L.str108 type=r, size=8 bytes - +7: .L.str107 type=r, size=7 bytes - +5: .L.str107 type=r, size=5 bytes - Removed symbols: - -3: .L.str106 type=r, size=3 bytes - -8: .L.str107 type=r, size=8 bytes - -13: .L.str106 type=r, size=13 bytes - Shrunk symbols: - -2: .L.str104 type=r, (was 21 bytes, now 19 bytes) -""" - - self.maxDiff = None - self.assertMultiLineEqual(expected_output, result) - - def testCompareSharedSpace(self): - # List entries have form: - # symbol_name, symbol_type, symbol_size, file_path, memory_address - symbol_list1 = ( - # File with two symbols, same address. - ( 'sym1', 'r', 8, '/file', 0x1 ), - ( 'sym2', 'r', 8, '/file', 0x1 ), - ) - - symbol_list2 = ( - # File with two symbols, same address. - ( 'sym1', 'r', 4, '/file', 0x1 ), - ( 'sym2', 'r', 4, '/file', 0x1 ), - ) - - # Here we go - (added, removed, changed, unchanged) = \ - explain_binary_size_delta.Compare(symbol_list1, symbol_list2) - - - # Now check final stats. - orig_stdout = sys.stdout - output_collector = cStringIO.StringIO() - sys.stdout = output_collector - try: - explain_binary_size_delta.CrunchStats(added, removed, changed, - unchanged, True, True) - finally: - sys.stdout = orig_stdout - result = output_collector.getvalue() - - expected_output = """\ -Total change: -4 bytes -====================== - 2 shrunk, for a net change of -4 bytes (8 bytes before, 4 bytes after) \ -across 1 sources - 0 unchanged, totalling 0 bytes -Source stats: - 1 sources encountered. - 0 completely new. - 0 removed completely. - 1 partially changed. - 0 completely unchanged. -Per-source Analysis: - ----------------------------------------- - -4 - Source: /file - (gained 0, lost 4) ----------------------------------------- - Shrunk symbols: - -2: sym1 type=r, (was 4 bytes, now 2 bytes) (adjusted sizes because \ -of memory sharing) - -2: sym2 type=r, (was 4 bytes, now 2 bytes) (adjusted sizes because \ -of memory sharing) -""" - - self.maxDiff = None - self.assertMultiLineEqual(expected_output, result) - - - def testCompareSharedSpaceDuplicateSymbols(self): - # List entries have form: - # symbol_name, symbol_type, symbol_size, file_path, memory_address - symbol_list1 = ( - # File with two symbols, same address. - ( 'sym1', 'r', 7, '/file', 0x2 ), - ( 'sym1', 'r', 8, '/file', 0x1 ), - ( 'sym2', 'r', 8, '/file', 0x1 ), - ) - - symbol_list2 = ( - # File with two symbols, same address. - ( 'sym1', 'r', 7, '/file', 0x2 ), - ( 'sym1', 'r', 4, '/file', 0x1 ), - ( 'sym2', 'r', 4, '/file', 0x1 ), - ) - - # Here we go - (added, removed, changed, unchanged) = \ - explain_binary_size_delta.Compare(symbol_list1, symbol_list2) - - - # Now check final stats. - orig_stdout = sys.stdout - output_collector = cStringIO.StringIO() - sys.stdout = output_collector - try: - explain_binary_size_delta.CrunchStats(added, removed, changed, - unchanged, True, True) - finally: - sys.stdout = orig_stdout - result = output_collector.getvalue() - - expected_output = """\ -Total change: -4 bytes -====================== - 1 added, totalling +2 bytes across 1 sources - 1 removed, totalling -4 bytes across 1 sources - 1 shrunk, for a net change of -2 bytes (4 bytes before, 2 bytes after) \ -across 1 sources - 1 unchanged, totalling 7 bytes -Source stats: - 1 sources encountered. - 0 completely new. - 0 removed completely. - 1 partially changed. - 0 completely unchanged. -Per-source Analysis: - ----------------------------------------- - -4 - Source: /file - (gained 2, lost 6) ----------------------------------------- - New symbols: - +2: sym1 type=r, size=2 bytes (adjusted sizes because of memory \ -sharing) - Removed symbols: - -4: sym1 type=r, size=4 bytes (adjusted sizes because of memory \ -sharing) - Shrunk symbols: - -2: sym2 type=r, (was 4 bytes, now 2 bytes) (adjusted sizes because \ -of memory sharing) -""" - - self.maxDiff = None - self.assertMultiLineEqual(expected_output, result) - - def testCompareSharedSpaceBecomingUnshared(self): - # List entries have form: - # symbol_name, symbol_type, symbol_size, file_path, memory_address - symbol_list1 = ( - # File with two symbols, same address. - ( 'sym1', 'r', 8, '/file', 0x1 ), - ( 'sym2', 'r', 8, '/file', 0x1 ), - ) - - symbol_list2 = ( - # File with two symbols, not the same address. - ( 'sym1', 'r', 8, '/file', 0x1 ), - ( 'sym2', 'r', 6, '/file', 0x2 ), - ) - - # Here we go - (added, removed, changed, unchanged) = \ - explain_binary_size_delta.Compare(symbol_list1, symbol_list2) - - - # Now check final stats. - orig_stdout = sys.stdout - output_collector = cStringIO.StringIO() - sys.stdout = output_collector - try: - explain_binary_size_delta.CrunchStats(added, removed, changed, - unchanged, True, True) - finally: - sys.stdout = orig_stdout - result = output_collector.getvalue() - - expected_output = """\ -Total change: +6 bytes -====================== - 2 grown, for a net change of +6 bytes (8 bytes before, 14 bytes after) \ -across 1 sources - 0 unchanged, totalling 0 bytes -Source stats: - 1 sources encountered. - 0 completely new. - 0 removed completely. - 1 partially changed. - 0 completely unchanged. -Per-source Analysis: - ----------------------------------------- - +6 - Source: /file - (gained 6, lost 0) ----------------------------------------- - Grown symbols: - +4: sym1 type=r, (was 4 bytes, now 8 bytes) (adjusted sizes because \ -of memory sharing) - +2: sym2 type=r, (was 4 bytes, now 6 bytes) (adjusted sizes because \ -of memory sharing) -""" - - self.maxDiff = None - self.assertMultiLineEqual(expected_output, result) - - def testCompareSymbolsBecomingUnshared(self): - # List entries have form: - # symbol_name, symbol_type, symbol_size, file_path, memory_address - symbol_list1 = ( - # File with two symbols, not the same address. - ( 'sym1', 'r', 8, '/file', 0x1 ), - ( 'sym2', 'r', 6, '/file', 0x2 ), - ) - - symbol_list2 = ( - # File with two symbols, same address. - ( 'sym1', 'r', 8, '/file', 0x1 ), - ( 'sym2', 'r', 8, '/file', 0x1 ), - ) - - # Here we go - (added, removed, changed, unchanged) = \ - explain_binary_size_delta.Compare(symbol_list1, symbol_list2) - - - # Now check final stats. - orig_stdout = sys.stdout - output_collector = cStringIO.StringIO() - sys.stdout = output_collector - try: - explain_binary_size_delta.CrunchStats(added, removed, changed, - unchanged, True, True) - finally: - sys.stdout = orig_stdout - result = output_collector.getvalue() - - expected_output = """\ -Total change: -6 bytes -====================== - 2 shrunk, for a net change of -6 bytes (14 bytes before, 8 bytes after) \ -across 1 sources - 0 unchanged, totalling 0 bytes -Source stats: - 1 sources encountered. - 0 completely new. - 0 removed completely. - 1 partially changed. - 0 completely unchanged. -Per-source Analysis: - ----------------------------------------- - -6 - Source: /file - (gained 0, lost 6) ----------------------------------------- - Shrunk symbols: - -2: sym2 type=r, (was 6 bytes, now 4 bytes) (adjusted sizes because \ -of memory sharing) - -4: sym1 type=r, (was 8 bytes, now 4 bytes) (adjusted sizes because \ -of memory sharing) -""" - - self.maxDiff = None - self.assertMultiLineEqual(expected_output, result) - - def testDeltaInfo(self): - x = explain_binary_size_delta.DeltaInfo("path", "t", "sym_name", False) - assert x == x - y = explain_binary_size_delta.DeltaInfo("path", "t", "sym_name", False) - assert x == y - - y.new_size = 12 - assert x != y - - x.new_size = 12 - assert x == y - - z = explain_binary_size_delta.DeltaInfo("path", "t", "sym_name", True) - assert not (x == z) - assert x != z - - w = explain_binary_size_delta.DeltaInfo("other_path", "t", "sym_name", True) - assert w != z - -if __name__ == '__main__': - unittest.main()
diff --git a/tools/binary_size/libsupersize/archive.py b/tools/binary_size/libsupersize/archive.py new file mode 100644 index 0000000..97f12f40 --- /dev/null +++ b/tools/binary_size/libsupersize/archive.py
@@ -0,0 +1,559 @@ +# Copyright 2017 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. + +"""Main Python API for analyzing binary size.""" + +import argparse +import calendar +import collections +import datetime +import gzip +import logging +import os +import multiprocessing +import posixpath +import re +import subprocess +import sys +import tempfile +import zipfile + +import describe +import file_format +import function_signature +import helpers +import linker_map_parser +import models +import ninja_parser +import paths + + +def _OpenMaybeGz(path, mode=None): + """Calls `gzip.open()` if |path| ends in ".gz", otherwise calls `open()`.""" + if path.endswith('.gz'): + if mode and 'w' in mode: + return gzip.GzipFile(path, mode, 1) + return gzip.open(path, mode) + return open(path, mode or 'r') + + +def _UnmangleRemainingSymbols(symbols, tool_prefix): + """Uses c++filt to unmangle any symbols that need it.""" + to_process = [s for s in symbols if s.name.startswith('_Z')] + if not to_process: + return + + logging.info('Unmangling %d names', len(to_process)) + proc = subprocess.Popen([tool_prefix + 'c++filt'], stdin=subprocess.PIPE, + stdout=subprocess.PIPE) + stdout = proc.communicate('\n'.join(s.name for s in to_process))[0] + assert proc.returncode == 0 + + for i, line in enumerate(stdout.splitlines()): + to_process[i].name = line + + +def _NormalizeNames(symbols): + """Ensures that all names are formatted in a useful way. + + This includes: + - Assigning of |full_name|. + - Stripping of return types in |full_name| and |name| (for functions). + - Stripping parameters from |name|. + - Moving "vtable for" and the like to be suffixes rather than prefixes. + """ + found_prefixes = set() + for symbol in symbols: + if symbol.name.startswith('*'): + # See comment in _CalculatePadding() about when this + # can happen. + continue + + # E.g.: vtable for FOO + idx = symbol.name.find(' for ', 0, 30) + if idx != -1: + found_prefixes.add(symbol.name[:idx + 4]) + symbol.name = symbol.name[idx + 5:] + ' [' + symbol.name[:idx] + ']' + + # E.g.: virtual thunk to FOO + idx = symbol.name.find(' to ', 0, 30) + if idx != -1: + found_prefixes.add(symbol.name[:idx + 3]) + symbol.name = symbol.name[idx + 4:] + ' [' + symbol.name[:idx] + ']' + + # Strip out return type, and identify where parameter list starts. + if symbol.section == 't': + symbol.full_name, symbol.name = function_signature.Parse(symbol.name) + + # Remove anonymous namespaces (they just harm clustering). + non_anonymous = symbol.name.replace('(anonymous namespace)::', '') + if symbol.name != non_anonymous: + symbol.is_anonymous = True + symbol.name = non_anonymous + symbol.full_name = symbol.full_name.replace( + '(anonymous namespace)::', '') + + if symbol.section != 't' and '(' in symbol.name: + # Pretty rare. Example: + # blink::CSSValueKeywordsHash::findValueImpl(char const*)::value_word_list + symbol.full_name = symbol.name + symbol.name = re.sub(r'\(.*\)', '', symbol.full_name) + + # Don't bother storing both if they are the same. + if symbol.full_name == symbol.name: + symbol.full_name = '' + + logging.debug('Found name prefixes of: %r', found_prefixes) + + +def _NormalizeObjectPaths(symbols): + """Ensures that all paths are formatted in a useful way.""" + for symbol in symbols: + path = symbol.object_path + if path.startswith('obj/'): + # Convert obj/third_party/... -> third_party/... + path = path[4:] + elif path.startswith('../../'): + # Convert ../../third_party/... -> third_party/... + path = path[6:] + if path.endswith(')'): + # Convert foo/bar.a(baz.o) -> foo/bar.a/baz.o + start_idx = path.index('(') + path = os.path.join(path[:start_idx], path[start_idx + 1:-1]) + symbol.object_path = path + + +def _NormalizeSourcePath(path): + if path.startswith('gen/'): + # Convert gen/third_party/... -> third_party/... + return path[4:] + if path.startswith('../../'): + # Convert ../../third_party/... -> third_party/... + return path[6:] + return path + + +def _ExtractSourcePaths(symbols, output_directory): + """Fills in the .source_path attribute of all symbols. + + Returns True if source paths were found. + """ + mapper = ninja_parser.SourceFileMapper(output_directory) + not_found_paths = set() + + for symbol in symbols: + object_path = symbol.object_path + if symbol.source_path or not object_path: + continue + # We don't have source info for prebuilt .a files. + if not os.path.isabs(object_path) and not object_path.startswith('..'): + source_path = mapper.FindSourceForPath(object_path) + if source_path: + symbol.source_path = _NormalizeSourcePath(source_path) + elif object_path not in not_found_paths: + not_found_paths.add(object_path) + logging.warning('Could not find source path for %s', object_path) + logging.debug('Parsed %d .ninja files.', mapper.GetParsedFileCount()) + return len(not_found_paths) == 0 + + +def _CalculatePadding(symbols): + """Populates the |padding| field based on symbol addresses. + + Symbols must already be sorted by |address|. + """ + seen_sections = [] + for i, symbol in enumerate(symbols[1:]): + prev_symbol = symbols[i] + if prev_symbol.section_name != symbol.section_name: + assert symbol.section_name not in seen_sections, ( + 'Input symbols must be sorted by section, then address.') + seen_sections.append(symbol.section_name) + continue + if symbol.address <= 0 or prev_symbol.address <= 0: + continue + # Padding-only symbols happen for ** symbol gaps. + prev_is_padding_only = prev_symbol.size_without_padding == 0 + if symbol.address == prev_symbol.address and not prev_is_padding_only: + assert False, 'Found duplicate symbols:\n%r\n%r' % (prev_symbol, symbol) + # Even with symbols at the same address removed, overlaps can still + # happen. In this case, padding will be negative (and this is fine). + padding = symbol.address - prev_symbol.end_address + # These thresholds were found by manually auditing arm32 Chrome. + # E.g.: Set them to 0 and see what warnings get logged. + # TODO(agrieve): See if these thresholds make sense for architectures + # other than arm32. + if not symbol.name.startswith('*') and ( + symbol.section in 'rd' and padding >= 256 or + symbol.section in 't' and padding >= 64): + # For nm data, this is caused by data that has no associated symbol. + # The linker map file lists them with no name, but with a file. + # Example: + # .data 0x02d42764 0x120 .../V8SharedWorkerGlobalScope.o + # Where as most look like: + # .data.MANGLED_NAME... + logging.debug('Large padding of %d between:\n A) %r\n B) %r' % ( + padding, prev_symbol, symbol)) + continue + symbol.padding = padding + symbol.size += padding + assert symbol.size >= 0, ( + 'Symbol has negative size (likely not sorted propertly): ' + '%r\nprev symbol: %r' % (symbol, prev_symbol)) + + +def _ClusterSymbols(symbols): + """Returns a new list of symbols with some symbols moved into groups. + + Groups include: + * Symbols that have [clone] in their name (created by compiler optimization). + * Star symbols (such as "** merge strings", and "** symbol gap") + + To view created groups: + Print(size_info.symbols.Filter(lambda s: s.IsGroup()), recursive=True) + """ + # http://unix.stackexchange.com/questions/223013/function-symbol-gets-part-suffix-after-compilation + # Example name suffixes: + # [clone .part.322] # GCC + # [clone .isra.322] # GCC + # [clone .constprop.1064] # GCC + # [clone .11064] # clang + + # Step 1: Create name map, find clones, collect star syms into replacements. + logging.debug('Creating name -> symbol map') + clone_indices = [] + indices_by_full_name = {} + # (name, full_name) -> [(index, sym),...] + replacements_by_name = collections.defaultdict(list) + for i, symbol in enumerate(symbols): + if symbol.name.startswith('**'): + # "symbol gap 3" -> "symbol gaps" + name = re.sub(r'\s+\d+$', 's', symbol.name) + replacements_by_name[(name, None)].append((i, symbol)) + elif symbol.full_name: + if symbol.full_name.endswith(']') and ' [clone ' in symbol.full_name: + clone_indices.append(i) + else: + indices_by_full_name[symbol.full_name] = i + + # Step 2: Collect same-named clone symbols. + logging.debug('Grouping all clones') + group_names_by_index = {} + for i in clone_indices: + symbol = symbols[i] + # Multiple attributes could exist, so search from left-to-right. + stripped_name = symbol.name[:symbol.name.index(' [clone ')] + stripped_full_name = symbol.full_name[:symbol.full_name.index(' [clone ')] + name_tup = (stripped_name, stripped_full_name) + replacement_list = replacements_by_name[name_tup] + + if not replacement_list: + # First occurance, check for non-clone symbol. + non_clone_idx = indices_by_full_name.get(stripped_name) + if non_clone_idx is not None: + non_clone_symbol = symbols[non_clone_idx] + replacement_list.append((non_clone_idx, non_clone_symbol)) + group_names_by_index[non_clone_idx] = stripped_name + + replacement_list.append((i, symbol)) + group_names_by_index[i] = stripped_name + + # Step 3: Undo clustering when length=1. + # Removing these groups means Diff() logic must know about [clone] suffix. + to_clear = [] + for name_tup, replacement_list in replacements_by_name.iteritems(): + if len(replacement_list) == 1: + to_clear.append(name_tup) + for name_tup in to_clear: + del replacements_by_name[name_tup] + + # Step 4: Replace first symbol from each cluster with a SymbolGroup. + before_symbol_count = sum(len(x) for x in replacements_by_name.itervalues()) + logging.debug('Creating %d symbol groups from %d symbols. %d clones had only ' + 'one symbol.', len(replacements_by_name), before_symbol_count, + len(to_clear)) + + len_delta = len(replacements_by_name) - before_symbol_count + grouped_symbols = [None] * (len(symbols) + len_delta) + dest_index = 0 + src_index = 0 + seen_names = set() + replacement_names_by_index = {} + for name_tup, replacement_list in replacements_by_name.iteritems(): + for tup in replacement_list: + replacement_names_by_index[tup[0]] = name_tup + + sorted_items = replacement_names_by_index.items() + sorted_items.sort(key=lambda tup: tup[0]) + for index, name_tup in sorted_items: + count = index - src_index + grouped_symbols[dest_index:dest_index + count] = ( + symbols[src_index:src_index + count]) + src_index = index + 1 + dest_index += count + if name_tup not in seen_names: + seen_names.add(name_tup) + group_symbols = [tup[1] for tup in replacements_by_name[name_tup]] + grouped_symbols[dest_index] = models.SymbolGroup( + group_symbols, name=name_tup[0], full_name=name_tup[1], + section_name=group_symbols[0].section_name) + dest_index += 1 + + assert len(grouped_symbols[dest_index:None]) == len(symbols[src_index:None]) + grouped_symbols[dest_index:None] = symbols[src_index:None] + logging.debug('Finished making groups.') + return grouped_symbols + + +def LoadAndPostProcessSizeInfo(path): + """Returns a SizeInfo for the given |path|.""" + logging.debug('Loading results from: %s', path) + size_info = file_format.LoadSizeInfo(path) + _PostProcessSizeInfo(size_info) + return size_info + + +def _PostProcessSizeInfo(size_info): + logging.info('Normalizing symbol names') + _NormalizeNames(size_info.raw_symbols) + logging.info('Calculating padding') + _CalculatePadding(size_info.raw_symbols) + logging.info('Grouping decomposed functions') + size_info.symbols = models.SymbolGroup( + _ClusterSymbols(size_info.raw_symbols)) + logging.info('Processed %d symbols', len(size_info.raw_symbols)) + + +def CreateSizeInfo(map_path, lazy_paths=None, no_source_paths=False, + raw_only=False): + """Creates a SizeInfo from the given map file.""" + if not no_source_paths: + # output_directory needed for source file information. + lazy_paths.VerifyOutputDirectory() + # tool_prefix needed for c++filt. + lazy_paths.VerifyToolPrefix() + + with _OpenMaybeGz(map_path) as map_file: + section_sizes, raw_symbols = ( + linker_map_parser.MapFileParser().Parse(map_file)) + + if not no_source_paths: + logging.info('Extracting source paths from .ninja files') + all_found = _ExtractSourcePaths(raw_symbols, lazy_paths.output_directory) + assert all_found, ( + 'One or more source file paths could not be found. Likely caused by ' + '.ninja files being generated at a different time than the .map file.') + # Map file for some reason doesn't unmangle all names. + # Unmangle prints its own log statement. + _UnmangleRemainingSymbols(raw_symbols, lazy_paths.tool_prefix) + logging.info('Normalizing object paths') + _NormalizeObjectPaths(raw_symbols) + size_info = models.SizeInfo(section_sizes, raw_symbols) + + # Name normalization not strictly required, but makes for smaller files. + if raw_only: + logging.info('Normalizing symbol names') + _NormalizeNames(size_info.raw_symbols) + else: + _PostProcessSizeInfo(size_info) + + if logging.getLogger().isEnabledFor(logging.DEBUG): + # Padding is reported in size coverage logs. + if raw_only: + _CalculatePadding(size_info.raw_symbols) + for line in describe.DescribeSizeInfoCoverage(size_info): + logging.info(line) + logging.info('Recorded info for %d symbols', len(size_info.raw_symbols)) + return size_info + + +def _DetectGitRevision(directory): + try: + git_rev = subprocess.check_output( + ['git', '-C', directory, 'rev-parse', 'HEAD']) + return git_rev.rstrip() + except Exception: + logging.warning('Failed to detect git revision for file metadata.') + return None + + +def BuildIdFromElf(elf_path, tool_prefix): + args = [tool_prefix + 'readelf', '-n', elf_path] + stdout = subprocess.check_output(args) + match = re.search(r'Build ID: (\w+)', stdout) + assert match, 'Build ID not found from running: ' + ' '.join(args) + return match.group(1) + + +def _SectionSizesFromElf(elf_path, tool_prefix): + args = [tool_prefix + 'readelf', '-S', '--wide', elf_path] + stdout = subprocess.check_output(args) + section_sizes = {} + # Matches [ 2] .hash HASH 00000000006681f0 0001f0 003154 04 A 3 0 8 + for match in re.finditer(r'\[[\s\d]+\] (\..*)$', stdout, re.MULTILINE): + items = match.group(1).split() + section_sizes[items[0]] = int(items[4], 16) + return section_sizes + + +def _ArchFromElf(elf_path, tool_prefix): + args = [tool_prefix + 'readelf', '-h', elf_path] + stdout = subprocess.check_output(args) + return re.search('Machine:\s*(\S+)', stdout).group(1) + + +def _ParseGnArgs(args_path): + """Returns a list of normalized "key=value" strings.""" + args = {} + with open(args_path) as f: + for l in f: + # Strips #s even if within string literal. Not a problem in practice. + parts = l.split('#')[0].split('=') + if len(parts) != 2: + continue + args[parts[0].strip()] = parts[1].strip() + return ["%s=%s" % x for x in sorted(args.iteritems())] + + +def _ElfInfoFromApk(apk_path, apk_so_path, tool_prefix): + """Returns a tuple of (build_id, section_sizes).""" + with zipfile.ZipFile(apk_path) as apk, \ + tempfile.NamedTemporaryFile() as f: + f.write(apk.read(apk_so_path)) + f.flush() + build_id = BuildIdFromElf(f.name, tool_prefix) + section_sizes = _SectionSizesFromElf(f.name, tool_prefix) + return build_id, section_sizes + + +def AddArguments(parser): + parser.add_argument('size_file', help='Path to output .size file.') + parser.add_argument('--apk-file', + help='.apk file to measure. When set, --elf-file will be ' + 'derived (if unset). Providing the .apk allows ' + 'for the size of packed relocations to be recorded') + parser.add_argument('--elf-file', + help='Path to input ELF file. Currently used for ' + 'capturing metadata.') + parser.add_argument('--map-file', + help='Path to input .map(.gz) file. Defaults to ' + '{{elf_file}}.map(.gz)?. If given without ' + '--elf-file, no size metadata will be recorded.') + parser.add_argument('--no-source-paths', action='store_true', + help='Do not use .ninja files to map ' + 'object_path -> source_path') + parser.add_argument('--tool-prefix', default='', + help='Path prefix for c++filt.') + parser.add_argument('--output-directory', + help='Path to the root build directory.') + + +def Run(args, parser): + if not args.size_file.endswith('.size'): + parser.error('size_file must end with .size') + + elf_path = args.elf_file + map_path = args.map_file + apk_path = args.apk_file + any_input = apk_path or elf_path or map_path + if not any_input: + parser.error('Most pass at least one of --apk-file, --elf-file, --map-file') + lazy_paths = paths.LazyPaths(tool_prefix=args.tool_prefix, + output_directory=args.output_directory, + any_path_within_output_directory=any_input) + if apk_path: + with zipfile.ZipFile(apk_path) as z: + lib_infos = [f for f in z.infolist() + if f.filename.endswith('.so') and f.file_size > 0] + assert lib_infos, 'APK has no .so files.' + # TODO(agrieve): Add support for multiple .so files, and take into account + # secondary architectures. + apk_so_path = max(lib_infos, key=lambda x:x.file_size).filename + logging.debug('Sub-apk path=%s', apk_so_path) + if not elf_path: + elf_path = os.path.join( + lazy_paths.output_directory, 'lib.unstripped', + os.path.basename(apk_so_path.replace('crazy.', ''))) + logging.debug('Detected --elf-file=%s', elf_path) + + if map_path: + if not map_path.endswith('.map') and not map_path.endswith('.map.gz'): + parser.error('Expected --map-file to end with .map or .map.gz') + else: + map_path = elf_path + '.map' + if not os.path.exists(map_path): + map_path += '.gz' + if not os.path.exists(map_path): + parser.error('Could not find .map(.gz)? file. Use --map-file.') + + metadata = None + if elf_path: + logging.debug('Constructing metadata') + git_rev = _DetectGitRevision(os.path.dirname(elf_path)) + architecture = _ArchFromElf(elf_path, lazy_paths.tool_prefix) + build_id = BuildIdFromElf(elf_path, lazy_paths.tool_prefix) + timestamp_obj = datetime.datetime.utcfromtimestamp(os.path.getmtime( + elf_path)) + timestamp = calendar.timegm(timestamp_obj.timetuple()) + gn_args = _ParseGnArgs(os.path.join(lazy_paths.output_directory, 'args.gn')) + + def relative_to_out(path): + return os.path.relpath(path, lazy_paths.VerifyOutputDirectory()) + + metadata = { + models.METADATA_GIT_REVISION: git_rev, + models.METADATA_MAP_FILENAME: relative_to_out(map_path), + models.METADATA_ELF_ARCHITECTURE: architecture, + models.METADATA_ELF_FILENAME: relative_to_out(elf_path), + models.METADATA_ELF_MTIME: timestamp, + models.METADATA_ELF_BUILD_ID: build_id, + models.METADATA_GN_ARGS: gn_args, + } + + if apk_path: + metadata[models.METADATA_APK_FILENAME] = relative_to_out(apk_path) + # Extraction takes around 1 second, so do it in parallel. + pool_of_one = multiprocessing.Pool(1) + apk_elf_result = pool_of_one.apply_async( + _ElfInfoFromApk, (apk_path, apk_so_path, lazy_paths.tool_prefix)) + pool_of_one.close() + + size_info = CreateSizeInfo( + map_path, lazy_paths, no_source_paths=args.no_source_paths, raw_only=True) + + if metadata: + size_info.metadata = metadata + logging.debug('Validating section sizes') + elf_section_sizes = _SectionSizesFromElf(elf_path, lazy_paths.tool_prefix) + for k, v in elf_section_sizes.iteritems(): + assert v == size_info.section_sizes.get(k), ( + 'ELF file and .map file do not match.') + + if apk_path: + logging.debug('Extracting section sizes from .so within .apk') + unstripped_section_sizes = size_info.section_sizes + apk_build_id, size_info.section_sizes = apk_elf_result.get() + assert apk_build_id == build_id, ( + 'BuildID for %s within %s did not match the one at %s' % + (apk_so_path, apk_path, elf_path)) + + packed_section_name = None + if architecture == 'ARM': + packed_section_name = '.rel.dyn' + elif architecture == 'AArch64': + packed_section_name = '.rela.dyn' + + if packed_section_name: + logging.debug('Recording size of unpacked relocations') + if packed_section_name not in size_info.section_sizes: + logging.warning('Packed section not present: %s', packed_section_name) + else: + size_info.section_sizes['%s (unpacked)' % packed_section_name] = ( + unstripped_section_sizes.get(packed_section_name)) + + logging.info('Recording metadata: \n %s', + '\n '.join(describe.DescribeMetadata(size_info.metadata))) + logging.info('Saving result to %s', args.size_file) + file_format.SaveSizeInfo(size_info, args.size_file) + logging.info('Done')
diff --git a/tools/binary_size/libsupersize/console.py b/tools/binary_size/libsupersize/console.py new file mode 100644 index 0000000..e350f817 --- /dev/null +++ b/tools/binary_size/libsupersize/console.py
@@ -0,0 +1,249 @@ +# Copyright 2017 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. + +"""An interactive console for looking analyzing .size files.""" + +import argparse +import atexit +import code +import contextlib +import itertools +import logging +import os +import readline +import subprocess +import sys + +import archive +import describe +import file_format +import match_util +import models +import paths + + +# Number of lines before using less for Print(). +_THRESHOLD_FOR_PAGER = 30 + + +@contextlib.contextmanager +def _LessPipe(): + """Output to `less`. Yields a file object to write to.""" + try: + proc = subprocess.Popen(['less'], stdin=subprocess.PIPE, stdout=sys.stdout) + yield proc.stdin + proc.stdin.close() + proc.wait() + except IOError: + pass # Happens when less is quit before all data is written. + except KeyboardInterrupt: + pass # Assume used to break out of less. + + +def _WriteToStream(lines, use_pager=None, to_file=None): + if to_file: + use_pager = False + if use_pager is None and sys.stdout.isatty(): + # Does not take into account line-wrapping... Oh well. + first_lines = list(itertools.islice(lines, _THRESHOLD_FOR_PAGER)) + if len(first_lines) == _THRESHOLD_FOR_PAGER: + use_pager = True + lines = itertools.chain(first_lines, lines) + + if use_pager: + with _LessPipe() as stdin: + describe.WriteLines(lines, stdin.write) + elif to_file: + with open(to_file, 'w') as file_obj: + describe.WriteLines(lines, file_obj.write) + else: + describe.WriteLines(lines, sys.stdout.write) + + +class _Session(object): + _readline_initialized = False + + def __init__(self, size_infos, lazy_paths): + self._variables = { + 'Print': self._PrintFunc, + 'Diff': models.Diff, + 'Disassemble': self._DisassembleFunc, + 'ExpandRegex': match_util.ExpandRegexIdentifierPlaceholder, + 'ShowExamples': self._ShowExamplesFunc, + } + self._lazy_paths = lazy_paths + self._size_infos = size_infos + + if len(size_infos) == 1: + self._variables['size_info'] = size_infos[0] + else: + for i, size_info in enumerate(size_infos): + self._variables['size_info%d' % (i + 1)] = size_info + + def _PrintFunc(self, obj, verbose=False, recursive=False, use_pager=None, + to_file=None): + """Prints out the given Symbol / SymbolGroup / SymbolDiff / SizeInfo. + + Args: + obj: The object to be printed. + verbose: Show more detailed output. + recursive: Print children of nested SymbolGroups. + use_pager: Pipe output through `less`. Ignored when |obj| is a Symbol. + default is to automatically pipe when output is long. + to_file: Rather than print to stdio, write to the given file. + """ + lines = describe.GenerateLines(obj, verbose=verbose, recursive=recursive) + _WriteToStream(lines, use_pager=use_pager, to_file=to_file) + + def _ElfPathForSymbol(self, symbol): + size_info = None + for size_info in self._size_infos: + if symbol in size_info.symbols: + break + else: + assert False, 'Symbol does not belong to a size_info.' + + filename = size_info.metadata.get(models.METADATA_ELF_FILENAME) + output_dir = self._lazy_paths.output_directory or '' + path = os.path.normpath(os.path.join(output_dir, filename)) + + found_build_id = archive.BuildIdFromElf(path, self._lazy_paths.tool_prefix) + expected_build_id = size_info.metadata.get(models.METADATA_ELF_BUILD_ID) + assert found_build_id == expected_build_id, ( + 'Build ID does not match for %s' % path) + return path + + def _DisassembleFunc(self, symbol, elf_path=None, use_pager=None, + to_file=None): + """Shows objdump disassembly for the given symbol. + + Args: + symbol: Must be a .text symbol and not a SymbolGroup. + elf_path: Path to the executable containing the symbol. Required only + when auto-detection fails. + """ + assert symbol.address and symbol.section_name == '.text' + if not elf_path: + elf_path = self._ElfPathForSymbol(symbol) + tool_prefix = self._lazy_paths.tool_prefix + args = [tool_prefix + 'objdump', '--disassemble', '--source', + '--line-numbers', '--demangle', + '--start-address=0x%x' % symbol.address, + '--stop-address=0x%x' % symbol.end_address, elf_path] + proc = subprocess.Popen(args, stdout=subprocess.PIPE) + lines = itertools.chain(('Showing disassembly for %r' % symbol, + 'Command: %s' % ' '.join(args)), + (l.rstrip() for l in proc.stdout)) + _WriteToStream(lines, use_pager=use_pager, to_file=to_file) + proc.kill() + + def _ShowExamplesFunc(self): + print '\n'.join([ + '# Show pydoc for main types:', + 'import models', + 'help(models)', + '', + '# Show all attributes of all symbols & per-section totals:', + 'Print(size_info, verbose=True)', + '', + '# Show two levels of .text, grouped by first two subdirectories', + 'text_syms = size_info.symbols.WhereInSection("t")', + 'by_path = text_syms.GroupBySourcePath(depth=2)', + 'Print(by_path.WhereBiggerThan(1024))', + '', + '# Show all non-vtable generated symbols', + 'generated_syms = size_info.symbols.WhereIsGenerated()', + 'Print(generated_syms.WhereNameMatches(r"vtable").Inverted())', + '', + '# Show all symbols that have "print" in their name or path, except', + '# those within components/.', + '# Note: Could have also used Inverted(), as above.', + '# Note: Use "help(ExpandRegex)" for more about what {{_print_}} does.', + 'print_syms = size_info.symbols.WhereMatches(r"{{_print_}}")', + 'Print(print_syms - print_syms.WherePathMatches(r"^components/"))', + '', + '# Diff two .size files and save result to a file:', + 'Print(Diff(size_info1, size_info2), to_file="output.txt")', + '', + ]) + + def _CreateBanner(self): + symbol_info_keys = sorted(m for m in dir(models.SizeInfo) if m[0] != '_') + symbol_keys = sorted(m for m in dir(models.Symbol) if m[0] != '_') + symbol_group_keys = [m for m in dir(models.SymbolGroup) if m[0] != '_'] + symbol_diff_keys = sorted(m for m in dir(models.SymbolDiff) + if m[0] != '_' and m not in symbol_group_keys) + symbol_group_keys = sorted(m for m in symbol_group_keys + if m not in symbol_keys) + functions = sorted(k for k in self._variables if k[0].isupper()) + variables = sorted(k for k in self._variables if k[0].islower()) + return '\n'.join([ + '*' * 80, + 'Entering interactive Python shell. Quick reference:', + '', + 'SizeInfo: %s' % ', '.join(symbol_info_keys), + 'Symbol: %s' % ', '.join(symbol_keys), + 'SymbolGroup (extends Symbol): %s' % ', '.join(symbol_group_keys), + 'SymbolDiff (extends SymbolGroup): %s' % ', '.join(symbol_diff_keys), + '', + 'Functions: %s' % ', '.join('%s()' % f for f in functions), + 'Variables: %s' % ', '.join(variables), + '*' * 80, + ]) + + @classmethod + def _InitReadline(cls): + if cls._readline_initialized: + return + cls._readline_initialized = True + # Without initializing readline, arrow keys don't even work! + readline.parse_and_bind('tab: complete') + history_file = os.path.join(os.path.expanduser('~'), + '.binary_size_query_history') + if os.path.exists(history_file): + readline.read_history_file(history_file) + atexit.register(lambda: readline.write_history_file(history_file)) + + def Eval(self, query): + exec query in self._variables + + def GoInteractive(self): + _Session._InitReadline() + code.InteractiveConsole(self._variables).interact(self._CreateBanner()) + + +def AddArguments(parser): + parser.add_argument( + 'inputs', nargs='+', + help='Input .size files to load. For a single file, it will be mapped to ' + 'the variable "size_info". For multiple inputs, the names will be ' + 'size_info1, size_info2, etc.') + parser.add_argument('--query', + help='Execute the given snippet. ' + 'Example: Print(size_info)') + parser.add_argument('--tool-prefix', default='', + help='Path prefix for objdump. Required only for ' + 'Disassemble().') + parser.add_argument('--output-directory', + help='Path to the root build directory. Used only for ' + 'Disassemble().') + + +def Run(args, parser): + for path in args.inputs: + if not path.endswith('.size'): + parser.error('All inputs must end with ".size"') + + size_infos = [archive.LoadAndPostProcessSizeInfo(p) for p in args.inputs] + lazy_paths = paths.LazyPaths(tool_prefix=args.tool_prefix, + output_directory=args.output_directory, + any_path_within_output_directory=args.inputs[0]) + session = _Session(size_infos, lazy_paths) + + if args.query: + logging.info('Running query from command-line.') + session.Eval(args.query) + else: + logging.info('Entering interactive console.') + session.GoInteractive()
diff --git a/tools/binary_size/libsupersize/describe.py b/tools/binary_size/libsupersize/describe.py new file mode 100644 index 0000000..bf689d57 --- /dev/null +++ b/tools/binary_size/libsupersize/describe.py
@@ -0,0 +1,286 @@ +# Copyright 2017 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. +"""Methods for converting model objects to human-readable formats.""" + +import datetime +import itertools +import time + +import models + + +def _PrettySize(size): + # Arbitrarily chosen cut-off. + if abs(size) < 2000: + return '%d bytes' % size + # Always show 3 digits. + size /= 1024.0 + if abs(size) < 10: + return '%.2fkb' % size + elif abs(size) < 100: + return '%.1fkb' % size + elif abs(size) < 1024: + return '%dkb' % size + size /= 1024.0 + if abs(size) < 10: + return '%.2fmb' % size + # We shouldn't be seeing sizes > 100mb. + return '%.1fmb' % size + + +def _DiffPrefix(diff, sym): + if diff.IsAdded(sym): + return '+ ' + if diff.IsRemoved(sym): + return '- ' + if sym.size: + return '~ ' + return '= ' + + +class Describer(object): + def __init__(self, verbose=False, recursive=False): + self.verbose = verbose + self.recursive = recursive + + def _DescribeSectionSizes(self, section_sizes): + relevant_names = models.SECTION_TO_SECTION_NAME.values() + section_names = sorted(k for k in section_sizes.iterkeys() + if k in relevant_names or k.startswith('.data')) + total_bytes = sum(v for k, v in section_sizes.iteritems() + if k in section_names and k != '.bss') + yield '' + yield 'Section Sizes (Total={:,} bytes):'.format(total_bytes) + for name in section_names: + size = section_sizes[name] + if name == '.bss': + yield ' {}: {:,} bytes (not included in totals)'.format(name, size) + else: + percent = float(size) / total_bytes if total_bytes else 0 + yield ' {}: {:,} bytes ({:.1%})'.format(name, size, percent) + + if self.verbose: + yield '' + yield 'Other section sizes:' + section_names = sorted(k for k in section_sizes.iterkeys() + if k not in section_names) + for name in section_names: + yield ' {}: {:,} bytes'.format(name, section_sizes[name]) + + def _DescribeSymbol(self, sym): + if sym.IsGroup(): + address = 'Group' + else: + address = hex(sym.address) + if self.verbose: + count_part = ' count=%d' % len(sym) if sym.IsGroup() else '' + yield '{}@{:<9s} size={} padding={} size_without_padding={}{}'.format( + sym.section, address, sym.size, sym.padding, sym.size_without_padding, + count_part) + yield ' source_path={} \tobject_path={}'.format( + sym.source_path, sym.object_path) + if sym.name: + yield ' is_anonymous={} name={}'.format( + int(sym.is_anonymous), sym.name) + if sym.full_name: + yield ' full_name={}'.format(sym.full_name) + elif sym.full_name: + yield ' is_anonymous={} full_name={}'.format( + int(sym.is_anonymous), sym.full_name) + else: + yield '{}@{:<9s} {:<7} {}'.format( + sym.section, address, sym.size, + sym.source_path or sym.object_path or '{no path}') + if sym.name: + count_part = ' (count=%d)' % len(sym) if sym.IsGroup() else '' + yield ' {}{}'.format(sym.name, count_part) + + def _DescribeSymbolGroupChildren(self, group, indent=0): + running_total = 0 + sorted_syms = group if group.is_sorted else group.Sorted() + is_diff = isinstance(group, models.SymbolDiff) + + indent_prefix = '> ' * indent + diff_prefix = '' + for s in sorted_syms: + if group.IsBss() or not s.IsBss(): + running_total += s.size + for l in self._DescribeSymbol(s): + if l[:4].isspace(): + indent_size = 8 + len(indent_prefix) + len(diff_prefix) + yield '{} {}'.format(' ' * indent_size, l) + else: + if is_diff: + diff_prefix = _DiffPrefix(group, s) + yield '{}{}{:8} {}'.format(indent_prefix, diff_prefix, + running_total, l) + + if self.recursive and s.IsGroup(): + for l in self._DescribeSymbolGroupChildren(s, indent=indent + 1): + yield l + + def _DescribeSymbolGroup(self, group): + total_size = group.size + code_syms = group.WhereInSection('t') + code_size = code_syms.size + ro_size = code_syms.Inverted().WhereInSection('r').size + unique_paths = set(s.object_path for s in group) + header_desc = [ + 'Showing {:,} symbols with total size: {} bytes'.format( + len(group), total_size), + '.text={:<10} .rodata={:<10} other={:<10} total={}'.format( + _PrettySize(code_size), _PrettySize(ro_size), + _PrettySize(total_size - code_size - ro_size), + _PrettySize(total_size)), + 'Number of object files: {}'.format(len(unique_paths)), + '', + 'First columns are: running total, type, size', + ] + children_desc = self._DescribeSymbolGroupChildren(group) + return itertools.chain(header_desc, children_desc) + + def _DescribeSymbolDiff(self, diff): + header_template = ('{} symbols added (+), {} changed (~), {} removed (-), ' + '{} unchanged ({})') + unchanged_msg = '=' if self.verbose else 'not shown' + symbol_delta_desc = [header_template.format( + diff.added_count, diff.changed_count, diff.removed_count, + diff.unchanged_count, unchanged_msg)] + + similar_paths = set() + added_paths = set() + removed_paths = set() + for s in diff: + if diff.IsAdded(s): + added_paths.add(s.object_path) + elif diff.IsRemoved(s): + removed_paths.add(s.object_path) + else: + similar_paths.add(s.object_path) + added_paths.difference_update(similar_paths) + removed_paths.difference_update(similar_paths) + path_delta_desc = ['{} object files added, {} removed'.format( + len(added_paths), len(removed_paths))] + if self.verbose and len(added_paths): + path_delta_desc.append('Added files:') + path_delta_desc.extend(' ' + p for p in sorted(added_paths)) + if self.verbose and len(removed_paths): + path_delta_desc.append('Removed files:') + path_delta_desc.extend(' ' + p for p in sorted(removed_paths)) + + diff = diff if self.verbose else diff.WhereNotUnchanged() + group_desc = self._DescribeSymbolGroup(diff) + return itertools.chain(symbol_delta_desc, path_delta_desc, ('',), + group_desc) + + def _DescribeSizeInfoDiff(self, diff): + common_metadata = {k: v for k, v in diff.before_metadata.iteritems() + if diff.after_metadata[k] == v} + before_metadata = {k: v for k, v in diff.before_metadata.iteritems() + if k not in common_metadata} + after_metadata = {k: v for k, v in diff.after_metadata.iteritems() + if k not in common_metadata} + metadata_desc = itertools.chain( + ('Common Metadata:',), + (' %s' % line for line in DescribeMetadata(common_metadata)), + ('Old Metadata:',), + (' %s' % line for line in DescribeMetadata(before_metadata)), + ('New Metadata:',), + (' %s' % line for line in DescribeMetadata(after_metadata))) + section_desc = self._DescribeSectionSizes(diff.section_sizes) + group_desc = self.GenerateLines(diff.symbols) + return itertools.chain(metadata_desc, section_desc, ('',), group_desc) + + def _DescribeSizeInfo(self, size_info): + metadata_desc = itertools.chain( + ('Metadata:',), + (' %s' % line for line in DescribeMetadata(size_info.metadata))) + section_desc = self._DescribeSectionSizes(size_info.section_sizes) + coverage_desc = () + if self.verbose: + coverage_desc = itertools.chain( + ('',), DescribeSizeInfoCoverage(size_info)) + group_desc = self.GenerateLines(size_info.symbols) + return itertools.chain(metadata_desc, section_desc, coverage_desc, ('',), + group_desc) + + def GenerateLines(self, obj): + if isinstance(obj, models.SizeInfoDiff): + return self._DescribeSizeInfoDiff(obj) + if isinstance(obj, models.SizeInfo): + return self._DescribeSizeInfo(obj) + if isinstance(obj, models.SymbolDiff): + return self._DescribeSymbolDiff(obj) + if isinstance(obj, models.SymbolGroup): + return self._DescribeSymbolGroup(obj) + if isinstance(obj, models.Symbol): + return self._DescribeSymbol(obj) + return (repr(obj),) + + +def DescribeSizeInfoCoverage(size_info): + """Yields lines describing how accurate |size_info| is.""" + symbols = models.SymbolGroup(size_info.raw_symbols) + for section in models.SECTION_TO_SECTION_NAME: + if section == 'd': + expected_size = sum(v for k, v in size_info.section_sizes.iteritems() + if k.startswith('.data')) + else: + expected_size = size_info.section_sizes[ + models.SECTION_TO_SECTION_NAME[section]] + + def one_stat(group): + template = ('Section %s has %.1f%% of %d bytes accounted for from ' + '%d symbols. %d bytes are unaccounted for. Padding ' + 'accounts for %d bytes') + actual_size = group.size + count = len(group) + padding = group.padding + size_percent = 100.0 * actual_size / expected_size + return (template % (section, size_percent, actual_size, count, + expected_size - actual_size, padding)) + + in_section = symbols.WhereInSection(section) + yield one_stat(in_section) + + star_syms = in_section.WhereNameMatches(r'^\*') + attributed_syms = star_syms.Inverted().WhereHasAnyAttribution() + anonymous_syms = attributed_syms.Inverted() + if star_syms or anonymous_syms: + missing_size = star_syms.size + anonymous_syms.size + yield ('+ Without %d merge sections and %d anonymous entries (' + 'accounting for %d bytes):') % ( + len(star_syms), len(anonymous_syms), missing_size) + yield '+ ' + one_stat(attributed_syms) + + +def _UtcToLocal(utc): + epoch = time.mktime(utc.timetuple()) + offset = (datetime.datetime.fromtimestamp(epoch) - + datetime.datetime.utcfromtimestamp(epoch)) + return utc + offset + + +def DescribeMetadata(metadata): + display_dict = metadata.copy() + timestamp = display_dict.get(models.METADATA_ELF_MTIME) + if timestamp: + timestamp_obj = datetime.datetime.utcfromtimestamp(timestamp) + display_dict[models.METADATA_ELF_MTIME] = ( + _UtcToLocal(timestamp_obj).strftime('%Y-%m-%d %H:%M:%S')) + gn_args = display_dict.get(models.METADATA_GN_ARGS) + if gn_args: + display_dict[models.METADATA_GN_ARGS] = '; '.join(gn_args) + return sorted('%s=%s' % t for t in display_dict.iteritems()) + + +def GenerateLines(obj, verbose=False, recursive=False): + """Returns an iterable of lines (without \n) that describes |obj|.""" + return Describer(verbose=verbose, recursive=recursive).GenerateLines(obj) + + +def WriteLines(lines, func): + for l in lines: + func(l) + func('\n')
diff --git a/tools/binary_size/libsupersize/file_format.py b/tools/binary_size/libsupersize/file_format.py new file mode 100644 index 0000000..3e8baaf2 --- /dev/null +++ b/tools/binary_size/libsupersize/file_format.py
@@ -0,0 +1,176 @@ +# Copyright 2017 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. + +"""Deals with loading & saving .size files.""" + +import cStringIO +import calendar +import collections +import datetime +import gzip +import json +import logging +import os +import shutil + +import models + + +# File format version for .size files. +_SERIALIZATION_VERSION = 'Size File Format v1' + + +def _LogSize(file_obj, desc): + if not hasattr(file_obj, 'fileno'): + return + file_obj.flush() + size = os.fstat(file_obj.fileno()).st_size + logging.debug('File size with %s: %d' % (desc, size)) + + +def _SaveSizeInfoToFile(size_info, file_obj): + file_obj.write('# Created by //tools/binary_size\n') + file_obj.write('%s\n' % _SERIALIZATION_VERSION) + headers = { + 'metadata': size_info.metadata, + 'section_sizes': size_info.section_sizes, + } + metadata_str = json.dumps(headers, file_obj, indent=2, sort_keys=True) + file_obj.write('%d\n' % len(metadata_str)) + file_obj.write(metadata_str) + file_obj.write('\n') + _LogSize(file_obj, 'header') # For libchrome: 570 bytes. + + # Store a single copy of all paths and have them referenced by index. + # Using an OrderedDict makes the indices more repetitive (better compression). + path_tuples = collections.OrderedDict.fromkeys( + (s.object_path, s.source_path) for s in size_info.raw_symbols) + for i, key in enumerate(path_tuples): + path_tuples[key] = i + file_obj.write('%d\n' % len(path_tuples)) + file_obj.writelines('%s\t%s\n' % pair for pair in path_tuples) + _LogSize(file_obj, 'paths') # For libchrome, adds 200kb. + + # Symbol counts by section. + by_section = models.SymbolGroup(size_info.raw_symbols) + by_section = by_section.GroupBySectionName().SortedByName() + file_obj.write('%s\n' % '\t'.join(g.name for g in by_section)) + file_obj.write('%s\n' % '\t'.join(str(len(g)) for g in by_section)) + + def write_numeric(func, delta=False): + for group in by_section: + prev_value = 0 + last_sym = group[-1] + for symbol in group: + value = func(symbol) + if delta: + value, prev_value = value - prev_value, value + file_obj.write(str(value)) + if symbol is not last_sym: + file_obj.write(' ') + file_obj.write('\n') + + write_numeric(lambda s: s.address, delta=True) + _LogSize(file_obj, 'addresses') # For libchrome, adds 300kb. + # Do not write padding, it will be recalcualted from addresses on load. + write_numeric(lambda s: s.size_without_padding) + _LogSize(file_obj, 'sizes') # For libchrome, adds 300kb + write_numeric(lambda s: path_tuples[(s.object_path, s.source_path)], + delta=True) + _LogSize(file_obj, 'path indices') # For libchrome: adds 125kb. + + for group in by_section: + for symbol in group: + # Do not write name when full_name exists. It will be derived on load. + file_obj.write(symbol.full_name or symbol.name) + if symbol.is_anonymous: + file_obj.write('\t1') + file_obj.write('\n') + _LogSize(file_obj, 'names (final)') # For libchrome: adds 3.5mb. + + +def _LoadSizeInfoFromFile(file_obj): + """Loads a size_info from the given file.""" + lines = iter(file_obj) + next(lines) # Comment line. + actual_version = next(lines)[:-1] + assert actual_version == _SERIALIZATION_VERSION, ( + 'Version mismatch. Need to write some upgrade code.') + json_len = int(next(lines)) + json_str = file_obj.read(json_len) + headers = json.loads(json_str) + section_sizes = headers['section_sizes'] + metadata = headers.get('metadata') + lines = iter(file_obj) + next(lines) # newline after closing } of json. + + num_path_tuples = int(next(lines)) + path_tuples = [None] * num_path_tuples + for i in xrange(num_path_tuples): + path_tuples[i] = next(lines)[:-1].split('\t') + + section_names = next(lines)[:-1].split('\t') + section_counts = [int(c) for c in next(lines)[:-1].split('\t')] + + def read_numeric(delta=False): + ret = [] + delta_multiplier = int(delta) + for _ in section_counts: + value = 0 + fields = next(lines).split(' ') + for i, f in enumerate(fields): + value = value * delta_multiplier + int(f) + fields[i] = value + ret.append(fields) + return ret + + addresses = read_numeric(delta=True) + sizes = read_numeric(delta=False) + path_indices = read_numeric(delta=True) + + raw_symbols = [None] * sum(section_counts) + symbol_idx = 0 + for section_index, cur_section_name in enumerate(section_names): + for i in xrange(section_counts[section_index]): + line = next(lines)[:-1] + is_anonymous = line.endswith('\t1') + name = line[:-2] if is_anonymous else line + + new_sym = models.Symbol.__new__(models.Symbol) + new_sym.section_name = cur_section_name + new_sym.address = addresses[section_index][i] + new_sym.size = sizes[section_index][i] + new_sym.name = name + paths = path_tuples[path_indices[section_index][i]] + new_sym.object_path = paths[0] + new_sym.source_path = paths[1] + new_sym.is_anonymous = is_anonymous + new_sym.padding = 0 # Derived + new_sym.full_name = None # Derived + raw_symbols[symbol_idx] = new_sym + symbol_idx += 1 + + return models.SizeInfo(section_sizes, raw_symbols, metadata=metadata) + + +def SaveSizeInfo(size_info, path): + """Saves |size_info| to |path}.""" + if os.environ.get('MEASURE_GZIP') == '1': + with gzip.open(path, 'wb') as f: + _SaveSizeInfoToFile(size_info, f) + else: + # It is seconds faster to do gzip in a separate step. 6s -> 3.5s. + stringio = cStringIO.StringIO() + _SaveSizeInfoToFile(size_info, stringio) + + logging.debug('Serialization complete. Gzipping...') + stringio.seek(0) + with gzip.open(path, 'wb') as f: + shutil.copyfileobj(stringio, f) + + +def LoadSizeInfo(path): + """Returns a SizeInfo loaded from |path|.""" + with gzip.open(path) as f: + return _LoadSizeInfoFromFile(f)
diff --git a/tools/binary_size/libsupersize/function_signature.py b/tools/binary_size/libsupersize/function_signature.py new file mode 100644 index 0000000..b267fc5 --- /dev/null +++ b/tools/binary_size/libsupersize/function_signature.py
@@ -0,0 +1,104 @@ +# Copyright 2017 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. + +"""Logic for parsing a C/C++ function signature.""" + + +def _FindParameterListParen(name): + """Finds index of the "(" that denotes the start of a paremeter list.""" + # This loops from left-to-right, but the only reason (I think) that this + # is necessary (rather than reusing _FindLastCharOutsideOfBrackets), is + # to capture the outer-most function in the case where classes are nested. + start_idx = 0 + while True: + template_balance_count = 0 + paren_balance_count = 0 + while True: + idx = name.find('(', start_idx) + if idx == -1: + return -1 + template_balance_count += ( + name.count('<', start_idx, idx) - name.count('>', start_idx, idx)) + # Special: operators with angle brackets. + operator_idx = name.find('operator<', start_idx, idx) + if operator_idx != -1: + if name[operator_idx + 9] == '<': + template_balance_count -= 2 + else: + template_balance_count -= 1 + else: + operator_idx = name.find('operator>', start_idx, idx) + if operator_idx != -1: + if name[operator_idx + 9] == '>': + template_balance_count += 2 + else: + template_balance_count += 1 + + paren_balance_count += ( + name.count('(', start_idx, idx) - name.count(')', start_idx, idx)) + if template_balance_count == 0 and paren_balance_count == 0: + # Special case: skip "(anonymous namespace)". + if -1 != name.find('(anonymous namespace)', idx, idx + 21): + start_idx = idx + 21 + continue + # Special case: skip "decltype (...)" + if name[idx - 1] != ' ': + return idx + start_idx = idx + 1 + paren_balance_count += 1 + + +def _FindLastCharOutsideOfBrackets(name, target_char, prev_idx=None): + """Returns the last index of |target_char| that is not within ()s nor <>s.""" + paren_balance_count = 0 + template_balance_count = 0 + while True: + idx = name.rfind(target_char, 0, prev_idx) + if idx == -1: + return -1 + # It is much faster to use.find() and.count() than to loop over each + # character. + template_balance_count += ( + name.count('<', idx, prev_idx) - name.count('>', idx, prev_idx)) + paren_balance_count += ( + name.count('(', idx, prev_idx) - name.count(')', idx, prev_idx)) + if template_balance_count == 0 and paren_balance_count == 0: + return idx + prev_idx = idx + + +def _FindReturnValueSpace(name, paren_idx): + """Returns the index of the space that comes after the return type.""" + space_idx = paren_idx + # Special case: const cast operators (see tests). + if -1 != name.find(' const', paren_idx - 6, paren_idx): + space_idx = paren_idx - 6 + while True: + space_idx = _FindLastCharOutsideOfBrackets(name, ' ', space_idx) + # Special case: "operator new", and "operator<< <template>". + if -1 == space_idx or ( + -1 == name.find('operator', space_idx - 8, space_idx) and + -1 == name.find('operator<<', space_idx - 10, space_idx)): + break + space_idx -= 8 + return space_idx + + +def Parse(name): + """Extracts a function name from a function signature. + + See unit tests for example signatures. + + Returns: + A tuple of (name_without_return_type, name_without_return_type_and_params). + """ + left_paren_idx = _FindParameterListParen(name) + + if left_paren_idx > 0: + right_paren_idx = name.rindex(')') + assert right_paren_idx > left_paren_idx + space_idx = _FindReturnValueSpace(name, left_paren_idx) + return (name[space_idx + 1:], + name[space_idx + 1:left_paren_idx] + name[right_paren_idx + 1:]) + return name, name
diff --git a/tools/binary_size/libsupersize/function_signature_test.py b/tools/binary_size/libsupersize/function_signature_test.py new file mode 100755 index 0000000..ca61338 --- /dev/null +++ b/tools/binary_size/libsupersize/function_signature_test.py
@@ -0,0 +1,89 @@ +#!/usr/bin/env python +# Copyright 2017 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. + +import logging +import unittest + +import function_signature + + +class AnalyzeTest(unittest.TestCase): + + def testParseFunctionSignature(self): + def check(ret_part, name_part, params_part, after_part=''): + signature = ''.join((name_part, params_part, after_part)) + got_full, got_name = function_signature.Parse(signature) + self.assertEqual(name_part + after_part, got_name) + self.assertEqual(name_part + params_part + after_part, got_full) + if ret_part: + signature = ''.join((ret_part, name_part, params_part, after_part)) + got_full, got_name = function_signature.Parse(signature) + self.assertEqual(name_part + after_part, got_name) + self.assertEqual(name_part + params_part + after_part, got_full) + + check('bool ', + 'foo::Bar<unsigned int, int>::Do<unsigned int>', + '(unsigned int)') + check('base::internal::CheckedNumeric<int>& ', + 'base::internal::CheckedNumeric<int>::operator+=<int>', + '(int)') + check('base::internal::CheckedNumeric<int>& ', + 'b::i::CheckedNumeric<int>::MathOp<b::i::CheckedAddOp, int>', + '(int)') + check('', '(anonymous namespace)::GetBridge', '(long long)') + check('', 'operator delete', '(void*)') + check('', 'b::i::DstRangeRelationToSrcRangeImpl<long long, long long, ' + 'std::__ndk1::numeric_limits, (b::i::Integer)1>::Check', + '(long long)') + check('', 'cc::LayerIterator::operator cc::LayerIteratorPosition const', + '()', + ' const') + check('decltype ({parm#1}((SkRecords::NoOp)())) ', + 'SkRecord::Record::visit<SkRecords::Draw&>', + '(SkRecords::Draw&)', + ' const') + check('', 'base::internal::BindStateBase::BindStateBase', + '(void (*)(), void (*)(base::internal::BindStateBase const*))') + check('int ', 'std::__ndk1::__c11_atomic_load<int>', + '(std::__ndk1::<int> volatile*, std::__ndk1::memory_order)') + check('std::basic_ostream<char, std::char_traits<char> >& ', + 'std::operator<< <std::char_traits<char> >', + '(std::basic_ostream<char, std::char_traits<char> >&, char)') + check('v8::internal::SlotCallbackResult ', + 'v8::internal::UpdateTypedSlotHelper::UpdateCodeTarget' + '<v8::PointerUpdateJobTraits<(v8::Direction)1>::Foo(v8::Heap*, ' + 'v8::MemoryChunk*)::{lambda(v8::SlotType, unsigned char*)#2}::' + 'operator()(v8::SlotType, unsigned char*, unsigned char*) ' + 'const::{lambda(v8::Object**)#1}>', + '(v8::RelocInfo, v8::Foo<(v8::PointerDirection)1>::Bar(v8::Heap*)::' + '{lambda(v8::SlotType)#2}::operator()(v8::SlotType) const::' + '{lambda(v8::Object**)#1})') + check('', + 'WTF::StringAppend<WTF::String, WTF::String>::operator WTF::String', + '()', + ' const') + # Make sure []s are not removed from the name part. + check('', 'Foo', '()', ' [virtual thunk]') + + # SkArithmeticImageFilter.cpp has class within function body. e.g.: + # ArithmeticFP::onCreateGLSLInstance() looks like: + # class ArithmeticFP { + # GrGLSLFragmentProcessor* onCreateGLSLInstance() const { + # class GLSLFP { + # void emitCode(EmitArgs& args) { ... } + # }; + # ... + # } + # }; + SIG = '(anonymous namespace)::Foo::Baz() const::GLSLFP::onData(Foo, Bar)' + got_full, got_name = function_signature.Parse(SIG) + self.assertEqual('(anonymous namespace)::Foo::Baz', got_name) + self.assertEqual(SIG, got_full) + + +if __name__ == '__main__': + logging.basicConfig(level=logging.DEBUG, + format='%(levelname).1s %(relativeCreated)6d %(message)s') + unittest.main()
diff --git a/tools/binary_size/libsupersize/helpers.py b/tools/binary_size/libsupersize/helpers.py new file mode 100644 index 0000000..bddcd764 --- /dev/null +++ b/tools/binary_size/libsupersize/helpers.py
@@ -0,0 +1,11 @@ +# Copyright 2017 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. + +"""Utility methods.""" + +import os + + +SRC_ROOT = os.path.dirname( + os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
diff --git a/tools/binary_size/libsupersize/html_report.py b/tools/binary_size/libsupersize/html_report.py new file mode 100644 index 0000000..ac21349 --- /dev/null +++ b/tools/binary_size/libsupersize/html_report.py
@@ -0,0 +1,204 @@ +# Copyright 2014 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. + +"""Creates an html report that allows you to view binary size by component.""" + +import argparse +import json +import logging +import os +import shutil +import sys + +import archive +import helpers + + +# Node dictionary keys. These are output in json read by the webapp so +# keep them short to save file size. +# Note: If these change, the webapp must also change. +_NODE_TYPE_KEY = 'k' +_NODE_TYPE_BUCKET = 'b' +_NODE_TYPE_PATH = 'p' +_NODE_TYPE_SYMBOL = 's' +_NODE_NAME_KEY = 'n' +_NODE_CHILDREN_KEY = 'children' +_NODE_SYMBOL_TYPE_KEY = 't' +_NODE_SYMBOL_TYPE_VTABLE = 'v' +_NODE_SYMBOL_TYPE_GENERATED = '*' +_NODE_SYMBOL_SIZE_KEY = 'value' +_NODE_MAX_DEPTH_KEY = 'maxDepth' +_NODE_LAST_PATH_ELEMENT_KEY = 'lastPathElement' + +# The display name of the bucket where we put symbols without path. +_NAME_NO_PATH_BUCKET = '(No Path)' + +# Try to keep data buckets smaller than this to avoid killing the +# graphing lib. +_BIG_BUCKET_LIMIT = 3000 + + +def _GetOrMakeChildNode(node, node_type, name): + child = node[_NODE_CHILDREN_KEY].get(name) + if child is None: + child = { + _NODE_TYPE_KEY: node_type, + _NODE_NAME_KEY: name, + } + if node_type != _NODE_TYPE_SYMBOL: + child[_NODE_CHILDREN_KEY] = {} + node[_NODE_CHILDREN_KEY][name] = child + else: + assert child[_NODE_TYPE_KEY] == node_type + return child + + +def _SplitLargeBucket(bucket): + """Split the given node into sub-buckets when it's too big.""" + old_children = bucket[_NODE_CHILDREN_KEY] + count = 0 + for symbol_type, symbol_bucket in old_children.iteritems(): + count += len(symbol_bucket[_NODE_CHILDREN_KEY]) + if count > _BIG_BUCKET_LIMIT: + new_children = {} + bucket[_NODE_CHILDREN_KEY] = new_children + current_bucket = None + index = 0 + for symbol_type, symbol_bucket in old_children.iteritems(): + for symbol_name, value in symbol_bucket[_NODE_CHILDREN_KEY].iteritems(): + if index % _BIG_BUCKET_LIMIT == 0: + group_no = (index / _BIG_BUCKET_LIMIT) + 1 + node_name = '%s subgroup %d' % (_NAME_NO_PATH_BUCKET, group_no) + current_bucket = _GetOrMakeChildNode( + bucket, _NODE_TYPE_PATH, node_name) + index += 1 + symbol_size = value[_NODE_SYMBOL_SIZE_KEY] + _AddSymbolIntoFileNode(current_bucket, symbol_type, symbol_name, + symbol_size, True) + + +def _MakeChildrenDictsIntoLists(node): + """Recursively converts all children from dicts -> lists.""" + children = node.get(_NODE_CHILDREN_KEY) + if children: + children = children.values() # Convert dict -> list. + node[_NODE_CHILDREN_KEY] = children + for child in children: + _MakeChildrenDictsIntoLists(child) + if len(children) > _BIG_BUCKET_LIMIT: + logging.warning('Bucket found with %d entries. Might be unusable.', + len(children)) + + +def _AddSymbolIntoFileNode(node, symbol_type, symbol_name, symbol_size, + include_symbols): + """Puts symbol into the file path node |node|.""" + node[_NODE_LAST_PATH_ELEMENT_KEY] = True + # Don't bother with buckets when not including symbols. + if include_symbols: + node = _GetOrMakeChildNode(node, _NODE_TYPE_BUCKET, symbol_type) + node[_NODE_SYMBOL_TYPE_KEY] = symbol_type + + # 'node' is now the symbol-type bucket. Make the child entry. + if include_symbols or not symbol_name: + node_name = symbol_name or '[Anonymous]' + elif symbol_name.startswith('*'): + node_name = symbol_name + else: + node_name = symbol_type + node = _GetOrMakeChildNode(node, _NODE_TYPE_SYMBOL, node_name) + node[_NODE_SYMBOL_SIZE_KEY] = node.get(_NODE_SYMBOL_SIZE_KEY, 0) + symbol_size + node[_NODE_SYMBOL_TYPE_KEY] = symbol_type + + +def _MakeCompactTree(symbols, include_symbols): + result = { + _NODE_NAME_KEY: '/', + _NODE_CHILDREN_KEY: {}, + _NODE_TYPE_KEY: 'p', + _NODE_MAX_DEPTH_KEY: 0, + } + for symbol in symbols: + file_path = symbol.source_path or symbol.object_path or _NAME_NO_PATH_BUCKET + node = result + depth = 0 + for path_part in file_path.split(os.path.sep): + if not path_part: + continue + depth += 1 + node = _GetOrMakeChildNode(node, _NODE_TYPE_PATH, path_part) + + symbol_type = symbol.section + if symbol.name.endswith('[vtable]'): + symbol_type = _NODE_SYMBOL_TYPE_VTABLE + elif symbol.name.endswith(']'): + symbol_type = _NODE_SYMBOL_TYPE_GENERATED + _AddSymbolIntoFileNode(node, symbol_type, symbol.name, symbol.size, + include_symbols) + depth += 2 + result[_NODE_MAX_DEPTH_KEY] = max(result[_NODE_MAX_DEPTH_KEY], depth) + + # The (no path) bucket can be extremely large if we failed to get + # path information. Split it into subgroups if needed. + no_path_bucket = result[_NODE_CHILDREN_KEY].get(_NAME_NO_PATH_BUCKET) + if no_path_bucket and include_symbols: + _SplitLargeBucket(no_path_bucket) + + _MakeChildrenDictsIntoLists(result) + + return result + + +def _CopyTemplateFiles(dest_dir): + d3_out = os.path.join(dest_dir, 'd3') + if not os.path.exists(d3_out): + os.makedirs(d3_out, 0755) + d3_src = os.path.join(helpers.SRC_ROOT, 'third_party', 'd3', 'src') + template_src = os.path.join(os.path.dirname(__file__), 'template') + shutil.copy(os.path.join(d3_src, 'LICENSE'), d3_out) + shutil.copy(os.path.join(d3_src, 'd3.js'), d3_out) + shutil.copy(os.path.join(template_src, 'index.html'), dest_dir) + shutil.copy(os.path.join(template_src, 'D3SymbolTreeMap.js'), dest_dir) + + +def AddArguments(parser): + parser.add_argument('input_file', + help='Path to input .size file.') + parser.add_argument('--report-dir', metavar='PATH', required=True, + help='Write output to the specified directory. An HTML ' + 'report is generated here.') + parser.add_argument('--include-bss', action='store_true', + help='Include symbols from .bss (which consume no real ' + 'space)') + parser.add_argument('--include-symbols', action='store_true', + help='Use per-symbol granularity rather than per-file.') + + +def Run(args, parser): + if not args.input_file.endswith('.size'): + parser.error('Input must end with ".size"') + + logging.info('Reading .size file') + size_info = archive.LoadAndPostProcessSizeInfo(args.input_file) + symbols = size_info.symbols + if not args.include_bss: + symbols = symbols.WhereInSection('b').Inverted() + symbols = symbols.WhereBiggerThan(0) + + # Copy report boilerplate into output directory. This also proves that the + # output directory is safe for writing, so there should be no problems writing + # the nm.out file later. + _CopyTemplateFiles(args.report_dir) + + logging.info('Creating JSON objects') + tree_root = _MakeCompactTree(symbols, args.include_symbols) + + logging.info('Serializing JSON') + with open(os.path.join(args.report_dir, 'data.js'), 'w') as out_file: + out_file.write('var tree_data=') + # Use separators without whitespace to get a smaller file. + json.dump(tree_root, out_file, ensure_ascii=False, check_circular=False, + separators=(',', ':')) + + logging.warning('Report saved to %s/index.html', args.report_dir)
diff --git a/tools/binary_size/libsupersize/integration_test.py b/tools/binary_size/libsupersize/integration_test.py new file mode 100755 index 0000000..e9ad925 --- /dev/null +++ b/tools/binary_size/libsupersize/integration_test.py
@@ -0,0 +1,171 @@ +#!/usr/bin/env python +# Copyright 2017 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. + +import copy +import difflib +import glob +import itertools +import logging +import os +import unittest +import subprocess +import sys +import tempfile + +import archive +import describe +import file_format +import models +import paths + + +_SCRIPT_DIR = os.path.dirname(__file__) +_TEST_DATA_DIR = os.path.join(_SCRIPT_DIR, 'testdata') +_TEST_MAP_PATH = os.path.join(_TEST_DATA_DIR, 'test.map') + +update_goldens = False + + +def _AssertGolden(expected_lines, actual_lines): + expected = list(expected_lines) + actual = list(l + '\n' for l in actual_lines) + assert actual == expected, ('Did not match .golden.\n' + + ''.join(difflib.unified_diff(expected, actual, 'expected', 'actual'))) + + +def _CompareWithGolden(func): + name = func.__name__.replace('test_', '') + golden_path = os.path.join(_TEST_DATA_DIR, name + '.golden') + + def inner(self): + actual_lines = func(self) + + if update_goldens: + with open(golden_path, 'w') as file_obj: + describe.WriteLines(actual_lines, file_obj.write) + logging.info('Wrote %s', golden_path) + else: + with open(golden_path) as file_obj: + _AssertGolden(file_obj, actual_lines) + return inner + + +def _RunApp(name, *args): + argv = [os.path.join(_SCRIPT_DIR, 'main.py'), name, '--no-pypy'] + argv.extend(args) + return subprocess.check_output(argv).splitlines() + + +class IntegrationTest(unittest.TestCase): + size_info = None + + def _CloneSizeInfo(self): + if not IntegrationTest.size_info: + lazy_paths = paths.LazyPaths(output_directory=_TEST_DATA_DIR) + IntegrationTest.size_info = ( + archive.CreateSizeInfo(_TEST_MAP_PATH, lazy_paths)) + return copy.deepcopy(IntegrationTest.size_info) + + @_CompareWithGolden + def test_Archive(self): + with tempfile.NamedTemporaryFile(suffix='.size') as temp_file: + _RunApp('archive', temp_file.name, '--output-directory', _TEST_DATA_DIR, + '--map-file', _TEST_MAP_PATH) + size_info = archive.LoadAndPostProcessSizeInfo(temp_file.name) + # Check that saving & loading is the same as directly parsing the .map. + expected_size_info = self._CloneSizeInfo() + self.assertEquals(expected_size_info.metadata, size_info.metadata) + expected = '\n'.join(describe.GenerateLines( + expected_size_info, verbose=True, recursive=True)), + actual = '\n'.join(describe.GenerateLines( + size_info, verbose=True, recursive=True)), + self.assertEquals(expected, actual) + + sym_strs = (repr(sym) for sym in size_info.symbols) + stats = describe.DescribeSizeInfoCoverage(size_info) + return itertools.chain(stats, sym_strs) + + def test_Archive_NoSourcePaths(self): + # Just tests that it doesn't crash. + with tempfile.NamedTemporaryFile(suffix='.size') as temp_file: + _RunApp('archive', temp_file.name, '--no-source-paths', + '--map-file', _TEST_MAP_PATH) + archive.LoadAndPostProcessSizeInfo(temp_file.name) + + @_CompareWithGolden + def test_Console(self): + with tempfile.NamedTemporaryFile(suffix='.size') as size_file, \ + tempfile.NamedTemporaryFile(suffix='.txt') as output_file: + file_format.SaveSizeInfo(self._CloneSizeInfo(), size_file.name) + query = [ + 'ShowExamples()', + 'ExpandRegex("_foo_")', + 'Print(size_info, to_file=%r)' % output_file.name, + ] + ret = _RunApp('console', size_file.name, '--query', '; '.join(query)) + with open(output_file.name) as f: + ret.extend(l.rstrip() for l in f) + return ret + + @_CompareWithGolden + def test_Diff_NullDiff(self): + with tempfile.NamedTemporaryFile(suffix='.size') as temp_file: + file_format.SaveSizeInfo(self._CloneSizeInfo(), temp_file.name) + return _RunApp('diff', temp_file.name, temp_file.name) + + @_CompareWithGolden + def test_ActualDiff(self): + size_info1 = self._CloneSizeInfo() + size_info2 = self._CloneSizeInfo() + size_info1.metadata = {"foo": 1, "bar": [1,2,3], "baz": "yes"} + size_info2.metadata = {"foo": 1, "bar": [1,3], "baz": "yes"} + size_info1.symbols -= size_info1.symbols[:2] + size_info2.symbols -= size_info2.symbols[-3:] + size_info1.symbols[1].size -= 10 + diff = models.Diff(size_info1, size_info2) + return describe.GenerateLines(diff, verbose=True) + + @_CompareWithGolden + def test_FullDescription(self): + return describe.GenerateLines(self._CloneSizeInfo()) + + @_CompareWithGolden + def test_SymbolGroupMethods(self): + all_syms = self._CloneSizeInfo().symbols + global_syms = all_syms.WhereNameMatches('GLOBAL') + # Tests Filter(), Inverted(), and __sub__(). + non_global_syms = global_syms.Inverted() + self.assertEqual(non_global_syms, (all_syms - global_syms)) + # Tests Sorted() and __add__(). + self.assertEqual(all_syms.Sorted(), + (global_syms + non_global_syms).Sorted()) + # Tests GroupByNamespace() and __len__(). + return itertools.chain( + ['GroupByNamespace()'], + describe.GenerateLines(all_syms.GroupByNamespace()), + ['GroupByNamespace(depth=1)'], + describe.GenerateLines(all_syms.GroupByNamespace(depth=1)), + ['GroupByNamespace(depth=1, fallback=None)'], + describe.GenerateLines(all_syms.GroupByNamespace(depth=1, + fallback=None)), + ['GroupByNamespace(depth=1, min_count=2)'], + describe.GenerateLines(all_syms.GroupByNamespace(depth=1, min_count=2)), + ) + + +def main(): + argv = sys.argv + if len(argv) > 1 and argv[1] == '--update': + argv.pop(0) + global update_goldens + update_goldens = True + for f in glob.glob(os.path.join(_TEST_DATA_DIR, '*.golden')): + os.unlink(f) + + unittest.main(argv=argv, verbosity=2) + + +if __name__ == '__main__': + main()
diff --git a/tools/binary_size/libsupersize/linker_map_parser.py b/tools/binary_size/libsupersize/linker_map_parser.py new file mode 100644 index 0000000..5c6eca40 --- /dev/null +++ b/tools/binary_size/libsupersize/linker_map_parser.py
@@ -0,0 +1,213 @@ +# Copyright 2017 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. + +import logging + +import models + + +class MapFileParser(object): + """Parses a linker map file (tested only on files from gold linker).""" + # Map file writer for gold linker: + # https://github.com/gittup/binutils/blob/HEAD/gold/mapfile.cc + + def __init__(self): + self._symbols = [] + self._section_sizes = {} + self._lines = None + + def Parse(self, lines): + """Parses a linker map file. + + Args: + lines: Iterable of lines. + + Returns: + A tuple of (section_sizes, symbols). + """ + self._lines = iter(lines) + logging.info('Parsing common symbols') + self._ParseCommonSymbols() + logging.debug('.bss common entries: %d', len(self._symbols)) + logging.info('Parsing section symbols') + self._ParseSections() + return self._section_sizes, self._symbols + + def _SkipToLineWithPrefix(self, prefix): + for l in self._lines: + if l.startswith(prefix): + return l + + def _ParsePossiblyWrappedParts(self, line, count): + parts = line.split(None, count - 1) + if not parts: + return None + if len(parts) != count: + line = next(self._lines) + parts.extend(line.split(None, count - len(parts) - 1)) + assert len(parts) == count, 'parts: ' + ' '.join(parts) + parts[-1] = parts[-1].rstrip() + return parts + + def _ParseCommonSymbols(self): +# Common symbol size file +# +# ff_cos_131072 0x40000 obj/third_party/<snip> +# ff_cos_131072_fixed +# 0x20000 obj/third_party/<snip> + self._SkipToLineWithPrefix('Common symbol') + next(self._lines) # Skip past blank line + + name, size_str, path = None, None, None + for l in self._lines: + parts = self._ParsePossiblyWrappedParts(l, 3) + if not parts: + break + name, size_str, path = parts + self._symbols.append( + models.Symbol('.bss', int(size_str[2:], 16), name=name, + object_path=path)) + + def _ParseSections(self): +# .text 0x0028c600 0x22d3468 +# .text.startup._GLOBAL__sub_I_bbr_sender.cc +# 0x0028c600 0x38 obj/net/net/bbr_sender.o +# .text._reset 0x00339d00 0xf0 obj/third_party/icu/icuuc/ucnv.o +# ** fill 0x0255fb00 0x02 +# .text._ZN4base8AutoLockD2Ev +# 0x00290710 0xe obj/net/net/file_name.o +# 0x00290711 base::AutoLock::~AutoLock() +# 0x00290711 base::AutoLock::~AutoLock() +# .text._ZNK5blink15LayoutBlockFlow31mustSeparateMarginAfterForChildERK... +# 0xffffffffffffffff 0x46 obj/... +# 0x006808e1 blink::LayoutBlockFlow::... +# .bss +# .bss._ZGVZN11GrProcessor11initClassIDI10LightingFPEEvvE8kClassID +# 0x02d4b294 0x4 obj/skia/skia/SkLightingShader.o +# 0x02d4b294 guard variable for void GrProcessor::initClassID +# .data 0x0028c600 0x22d3468 +# .data.rel.ro._ZTVN3gvr7android19ScopedJavaGlobalRefIP12_jfloatArrayEE +# 0x02d1e668 0x10 ../../third_party/.../libfoo.a(bar.o) +# 0x02d1e668 vtable for gvr::android::GlobalRef<_jfloatArray*> +# ** merge strings +# 0x0255fb00 0x1f2424 +# ** merge constants +# 0x0255fb00 0x8 +# ** common 0x02db5700 0x13ab48 + self._SkipToLineWithPrefix('Memory map') + syms = self._symbols + symbol_gap_count = 0 + while True: + line = self._SkipToLineWithPrefix('.') + if not line: + break + section_name = None + try: + # Parse section name and size. + parts = self._ParsePossiblyWrappedParts(line, 3) + if not parts: + break + section_name, address, size_str = parts + self._section_sizes[section_name] = int(size_str[2:], 16) + if (section_name in ('.bss', '.rodata', '.text') or + section_name.startswith('.data')): + logging.info('Parsing %s', section_name) + prefix_len = len(section_name) + 1 # + 1 for the trailing . + merge_symbol_start_address = 0 + sym_count_at_start = len(syms) + line = next(self._lines) + # Parse section symbols. + while True: + if not line or line.isspace(): + break + if line.startswith(' **'): + zero_index = line.find('0') + if zero_index == -1: + # Line wraps. + name = line.strip() + line = next(self._lines) + else: + # Line does not wrap. + name = line[:zero_index].strip() + line = line[zero_index:] + address_str, size_str = self._ParsePossiblyWrappedParts(line, 2) + line = next(self._lines) + # These bytes are already accounted for. + if name == '** common': + continue + address = int(address_str[2:], 16) + size = int(size_str[2:], 16) + path = None + syms.append( + models.Symbol(section_name, size, address=address, name=name, + object_path=path)) + else: + # A normal symbol entry. + subsection_name, address_str, size_str, path = ( + self._ParsePossiblyWrappedParts(line, 4)) + size = int(size_str[2:], 16) + assert subsection_name.startswith(section_name), ( + 'subsection name was: ' + subsection_name) + mangled_name = subsection_name[prefix_len:] + name = None + address_str2 = None + while True: + line = next(self._lines).rstrip() + if not line or line.startswith(' .'): + break + # clang includes ** fill, but gcc does not. + if line.startswith(' ** fill'): + # Alignment explicitly recorded in map file. Rather than + # record padding based on these entries, we calculate it + # using addresses. We do this because fill lines are not + # present when compiling with gcc (only for clang). + continue + elif line.startswith(' **'): + break + elif name is None: + address_str2, name = self._ParsePossiblyWrappedParts(line, 2) + + if address_str == '0xffffffffffffffff': + # The section needs special handling (e.g., a merge section) + # It also generally has a large offset after it, so don't + # penalize the subsequent symbol for this gap (e.g. a 50kb gap). + # There seems to be no corelation between where these gaps occur + # and the symbols they come in-between. + # TODO(agrieve): Learn more about why this happens. + if address_str2: + address = int(address_str2[2:], 16) - 1 + elif syms and syms[-1].address > 0: + # Merge sym with no second line showing real address. + address = syms[-1].end_address + else: + logging.warning('First symbol of section had address -1') + address = 0 + + merge_symbol_start_address = address + size + else: + address = int(address_str[2:], 16) + # Finish off active address gap / merge section. + if merge_symbol_start_address: + merge_size = address - merge_symbol_start_address + logging.debug('Merge symbol of size %d found at:\n %r', + merge_size, syms[-1]) + # Set size=0 so that it will show up as padding. + sym = models.Symbol( + section_name, 0, + address=address, + name='** symbol gap %d' % symbol_gap_count, + object_path=path) + symbol_gap_count += 1 + syms.append(sym) + merge_symbol_start_address = 0 + + syms.append(models.Symbol(section_name, size, address=address, + name=name or mangled_name, + object_path=path)) + logging.debug('Symbol count for %s: %d', section_name, + len(syms) - sym_count_at_start) + except: + logging.error('Problem line: %r', line) + logging.error('In section: %r', section_name) + raise
diff --git a/tools/binary_size/libsupersize/main.py b/tools/binary_size/libsupersize/main.py new file mode 100755 index 0000000..33b82f0 --- /dev/null +++ b/tools/binary_size/libsupersize/main.py
@@ -0,0 +1,103 @@ +#!/usr/bin/env python +# Copyright 2017 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. + +"""Collect, archive, and analyze Chrome's binary size.""" + +import argparse +import atexit +import collections +import distutils.spawn +import logging +import os +import platform +import resource +import sys + +import archive +import console +import html_report + + +def _LogPeakRamUsage(): + peak_ram_usage = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss + peak_ram_usage += resource.getrusage(resource.RUSAGE_CHILDREN).ru_maxrss + logging.info('Peak RAM usage was %d MB.', peak_ram_usage / 1024) + + +def _AddCommonArguments(parser): + parser.add_argument('--no-pypy', action='store_true', + help='Do not automatically switch to pypy when available') + parser.add_argument('-v', + '--verbose', + default=0, + action='count', + help='Verbose level (multiple times for more)') + + +class _DiffAction(object): + @staticmethod + def AddArguments(parser): + parser.add_argument('before', help='Before-patch .size file.') + parser.add_argument('after', help='After-patch .size file.') + parser.add_argument('--all', action='store_true', help='Verbose diff') + + @staticmethod + def Run(args, parser): + args.output_directory = None + args.tool_prefix = None + args.inputs = [args.before, args.after] + args.query = ('Print(Diff(size_info1, size_info2), verbose=%s)' % + bool(args.all)) + console.Run(args, parser) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + sub_parsers = parser.add_subparsers() + actions = collections.OrderedDict() + actions['archive'] = (archive, 'Create a .size file') + actions['html_report'] = ( + html_report, 'Create a stand-alone html report from a .size file.') + actions['console'] = ( + console, + 'Starts an interactive Python console for analyzing .size files.') + actions['diff'] = ( + _DiffAction(), + 'Shorthand for console --query "Print(Diff(size_info1, size_info2))"') + + for name, tup in actions.iteritems(): + sub_parser = sub_parsers.add_parser(name, help=tup[1]) + _AddCommonArguments(sub_parser) + tup[0].AddArguments(sub_parser) + sub_parser.set_defaults(func=tup[0].Run) + + if len(sys.argv) == 1: + parser.print_help() + sys.exit(1) + elif len(sys.argv) == 2 and sys.argv[1] in actions: + parser.parse_args(sys.argv[1:] + ['-h']) + sys.exit(1) + + args = parser.parse_args() + logging.basicConfig(level=logging.WARNING - args.verbose * 10, + format='%(levelname).1s %(relativeCreated)6d %(message)s') + + if not args.no_pypy and platform.python_implementation() == 'CPython': + # Switch to pypy if it's available. + pypy_path = distutils.spawn.find_executable('pypy') + if pypy_path: + logging.debug('Switching to pypy.') + os.execv(pypy_path, [pypy_path] + sys.argv) + # Running with python: 6s. Running with pypy: 3s + logging.warning('This script runs more than 2x faster if you install pypy.') + + if logging.getLogger().isEnabledFor(logging.DEBUG): + atexit.register(_LogPeakRamUsage) + + args.func(args, parser) + + +if __name__ == '__main__': + sys.exit(main())
diff --git a/tools/binary_size/libsupersize/match_util.py b/tools/binary_size/libsupersize/match_util.py new file mode 100644 index 0000000..67840a1 --- /dev/null +++ b/tools/binary_size/libsupersize/match_util.py
@@ -0,0 +1,58 @@ +# Copyright 2017 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. + +"""Regular expression helpers.""" + +import re + + +def _CreateIdentifierRegex(parts): + assert parts + if parts[0]: + # Allow word boundary or a _ prefix. + prefix_pattern = r'\b_?' + else: + # Allow word boundary, _, or a case transition. + prefix_pattern = r'(?:\b|(?<=_)|(?<=[a-z])(?=[A-Z]))' + parts = parts[1:] + assert parts + + if parts[-1]: + # Allow word boundary, trailing _, or single trailing digit. + suffix_pattern = r'\d?_?\b' + else: + # Allow word boundary, _, or a case transition. + suffix_pattern = r'(?:\b|(?=_|\d)|(?<=[a-z])(?=[A-Z]))' + parts = parts[:-1] + assert parts + + shouty_pattern = '_'.join(a.upper() for a in parts) + snake_pattern = '_'.join(a.lower() for a in parts) + camel_remainder = parts[0][1:] + for token in parts[1:]: + camel_remainder += token.title() + first_letter = parts[0][0] + prefixed_pattern = '[a-z]' + first_letter.upper() + camel_remainder + camel_pattern = '[%s%s]%s' % (first_letter.lower(), first_letter.upper(), + camel_remainder) + middle_patterns = '|'.join( + (shouty_pattern, snake_pattern, prefixed_pattern, camel_pattern)) + return r'(?:%s(?:%s)%s)' % (prefix_pattern, middle_patterns, suffix_pattern) + + +def ExpandRegexIdentifierPlaceholder(pattern): + """Expands {{identifier}} within a given regular expression. + + Returns |pattern|, with the addition that {{some_name}} is expanded to match: + SomeName, kSomeName, SOME_NAME, etc. + + To match part of a name, use {{_some_name_}}. This will additionally match: + kPrefixSomeNameSuffix, PREFIX_SOME_NAME_SUFFIX, etc. + + Note: SymbolGroup.Where* methods call this function already, so there is + generally no need to call it directly. + """ + return re.sub(r'\{\{(.*?)\}\}', + lambda m: _CreateIdentifierRegex(m.group(1).split('_')), + pattern)
diff --git a/tools/binary_size/libsupersize/match_util_test.py b/tools/binary_size/libsupersize/match_util_test.py new file mode 100755 index 0000000..eb5349a --- /dev/null +++ b/tools/binary_size/libsupersize/match_util_test.py
@@ -0,0 +1,69 @@ +#!/usr/bin/env python +# Copyright 2017 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. + +import re +import unittest + +import match_util + + +class MatchHelperTest(unittest.TestCase): + + def testExpandRegexIdentifierPlaceholder(self): + def matches(pattern, target): + regex = re.compile(match_util.ExpandRegexIdentifierPlaceholder(pattern)) + return bool(regex.search(target) and regex.search(' %s ' % target)) + + self.assertTrue(matches(r'{{hello_world}}', 'helloWorld')) + self.assertTrue(matches(r'{{hello_world}}', 'HelloWorld')) + self.assertTrue(matches(r'{{hello_world}}', 'kHelloWorld')) + self.assertTrue(matches(r'{{hello_world}}', 'hello_world')) + self.assertTrue(matches(r'{{hello_world}}', '_hello_world')) + self.assertTrue(matches(r'{{hello_world}}', 'hello_world_}}')) + self.assertTrue(matches(r'{{hello_world}}', 'HELLO_WORLD')) + self.assertTrue(matches(r'{{hello_world}}', 'HELLO_WORLD1')) + self.assertTrue(matches(r'{{hello_world}}', 'kHelloWorld1')) + self.assertFalse(matches(r'{{hello_world}}', 'hello world')) + self.assertFalse(matches(r'{{hello_world}}', 'helloworld')) + self.assertFalse(matches(r'{{hello_world}}', 'f_hello_world')) + self.assertFalse(matches(r'{{hello_world}}', 'hello_world_f')) + self.assertFalse(matches(r'{{hello_world}}', 'hello/world')) + self.assertFalse(matches(r'{{hello_world}}', 'helloWORLD')) + self.assertFalse(matches(r'{{hello_world}}', 'HELLOworld')) + self.assertFalse(matches(r'{{hello_world}}', 'HELLOWORLD')) + self.assertFalse(matches(r'{{hello_world}}', 'FOO_HELLO_WORLD')) + self.assertFalse(matches(r'{{hello_world}}', 'HELLO_WORLD_BAR')) + self.assertFalse(matches(r'{{hello_world}}', 'FooHelloWorld')) + self.assertFalse(matches(r'{{hello_world}}', 'HelloWorldBar')) + self.assertFalse(matches(r'{{hello_world}}', 'foohello/world')) + self.assertFalse(matches(r'{{hello_world}}', '1HELLO_WORLD')) + + self.assertTrue(matches(r'{{_hello_world_}}', 'helloWorld')) + self.assertTrue(matches(r'{{_hello_world_}}', 'HelloWorld')) + self.assertTrue(matches(r'{{_hello_world_}}', 'kHelloWorld')) + self.assertTrue(matches(r'{{_hello_world_}}', 'hello_world')) + self.assertTrue(matches(r'{{_hello_world_}}', '_hello_world')) + self.assertTrue(matches(r'{{_hello_world_}}', 'hello_world_')) + self.assertTrue(matches(r'{{_hello_world_}}', 'HELLO_WORLD')) + self.assertTrue(matches(r'{{_hello_world_}}', 'HELLO_WORLD1')) + self.assertTrue(matches(r'{{_hello_world_}}', 'kHelloWorld1')) + self.assertFalse(matches(r'{{_hello_world_}}', 'hello world')) + self.assertFalse(matches(r'{{_hello_world_}}', 'helloworld')) + self.assertTrue(matches(r'{{_hello_world_}}', 'f_hello_world')) + self.assertTrue(matches(r'{{_hello_world_}}', 'hello_world_f')) + self.assertFalse(matches(r'{{_hello_world_}}', 'hello/world')) + self.assertFalse(matches(r'{{_hello_world_}}', 'helloWORLD')) + self.assertFalse(matches(r'{{_hello_world_}}', 'HELLOworld')) + self.assertFalse(matches(r'{{_hello_world_}}', 'HELLOWORLD')) + self.assertTrue(matches(r'{{_hello_world_}}', 'FOO_HELLO_WORLD')) + self.assertTrue(matches(r'{{_hello_world_}}', 'HELLO_WORLD_BAR')) + self.assertTrue(matches(r'{{_hello_world_}}', 'FooHelloWorld')) + self.assertTrue(matches(r'{{_hello_world_}}', 'HelloWorldBar')) + self.assertFalse(matches(r'{{_hello_world_}}', 'foohello/world')) + self.assertFalse(matches(r'{{_hello_world_}}', '1HELLO_WORLD')) + + +if __name__ == '__main__': + unittest.main()
diff --git a/tools/binary_size/libsupersize/models.py b/tools/binary_size/libsupersize/models.py new file mode 100644 index 0000000..7e2ceb1 --- /dev/null +++ b/tools/binary_size/libsupersize/models.py
@@ -0,0 +1,690 @@ +# Copyright 2017 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. +"""Classes that comprise the data model for binary size analysis. + +The primary classes are Symbol, and SymbolGroup. + +Description of common properties: + * address: The start address of the symbol. + May be 0 (e.g. for .bss or for SymbolGroups). + * size: The number of bytes this symbol takes up, including padding that comes + before |address|. + * padding: The number of bytes of padding before |address| due to this symbol. + * name: Symbol names with parameter list removed. + Never None, but will be '' for anonymous symbols. + * full_name: Symbols names with parameter list left in. + Never None, but will be '' for anonymous symbols, and for symbols that do + not contain a parameter list. + * is_anonymous: True when the symbol exists in an anonymous namespace (which + are removed from both full_name and name during normalization). + * section_name: E.g. ".text", ".rodata", ".data.rel.local" + * section: The second character of |section_name|. E.g. "t", "r", "d". +""" + +import collections +import copy +import os +import re + +import match_util + + +METADATA_GIT_REVISION = 'git_revision' +METADATA_APK_FILENAME = 'apk_file_name' # Path relative to output_directory. +METADATA_MAP_FILENAME = 'map_file_name' # Path relative to output_directory. +METADATA_ELF_ARCHITECTURE = 'elf_arch' # "Machine" field from readelf -h +METADATA_ELF_FILENAME = 'elf_file_name' # Path relative to output_directory. +METADATA_ELF_MTIME = 'elf_mtime' # int timestamp in utc. +METADATA_ELF_BUILD_ID = 'elf_build_id' +METADATA_GN_ARGS = 'gn_args' + + +SECTION_TO_SECTION_NAME = { + 'b': '.bss', + 'd': '.data', + 'r': '.rodata', + 't': '.text', +} + + +class SizeInfo(object): + """Represents all size information for a single binary. + + Fields: + section_sizes: A dict of section_name -> size. + raw_symbols: A flat list of all symbols. + symbols: A SymbolGroup containing raw_symbols, but with some Symbols grouped + into sub-SymbolGroups. + metadata: A dict. + """ + __slots__ = ( + 'section_sizes', + 'raw_symbols', + 'symbols', + 'metadata', + ) + + """Root size information.""" + def __init__(self, section_sizes, raw_symbols, grouped_symbols=None, + metadata=None): + self.section_sizes = section_sizes # E.g. {'.text': 0} + # List of symbols sorted by address per-section. + self.raw_symbols = raw_symbols + # Root SymbolGroup. Cloned symbols grouped together within sub-SymbolGroups. + self.symbols = grouped_symbols + self.metadata = metadata or {} + + +class SizeInfoDiff(object): + """What you get when you Diff() two SizeInfo objects. + + Fields: + section_sizes: A dict of section_name -> size delta. + symbols: A SymbolDiff with all symbols in it. + before_metadata: metadata of the "before" SizeInfo. + after_metadata: metadata of the "after" SizeInfo. + """ + __slots__ = ( + 'section_sizes', + 'symbols', + 'before_metadata', + 'after_metadata', + ) + + def __init__(self, section_sizes, symbols, before_metadata, after_metadata): + self.section_sizes = section_sizes + self.symbols = symbols + self.before_metadata = before_metadata + self.after_metadata = after_metadata + + +class BaseSymbol(object): + """Base class for Symbol and SymbolGroup. + + Refer to module docs for field descriptions. + """ + __slots__ = () + + @property + def section(self): + """Returns the one-letter section. + + E.g. If section_name == '.rodata', then section == 'r'. + """ + return self.section_name[1] + + @property + def size_without_padding(self): + return self.size - self.padding + + @property + def end_address(self): + return self.address + self.size_without_padding + + def IsBss(self): + return self.section_name == '.bss' + + def IsGroup(self): + return False + + def IsGenerated(self): + # TODO(agrieve): Also match generated functions such as: + # startup._GLOBAL__sub_I_page_allocator.cc + return self.name.endswith(']') and not self.name.endswith('[]') + + def _Key(self): + """Returns a tuple that can be used to see if two Symbol are the same. + + Keys are not guaranteed to be unique within a SymbolGroup. For example, it + is common to have multiple "** merge strings" symbols, which will have a + common key.""" + stripped_full_name = self.full_name + if stripped_full_name: + clone_idx = stripped_full_name.find(' [clone ') + if clone_idx != -1: + stripped_full_name = stripped_full_name[:clone_idx] + return (self.section_name, stripped_full_name or self.name) + + +class Symbol(BaseSymbol): + """Represents a single symbol within a binary. + + Refer to module docs for field descriptions. + """ + + __slots__ = ( + 'address', + 'full_name', + 'is_anonymous', + 'object_path', + 'name', + 'padding', + 'section_name', + 'source_path', + 'size', + ) + + def __init__(self, section_name, size_without_padding, address=None, + name=None, source_path=None, object_path=None, + full_name=None, is_anonymous=False): + self.section_name = section_name + self.address = address or 0 + self.name = name or '' + self.full_name = full_name or '' + self.source_path = source_path or '' + self.object_path = object_path or '' + self.size = size_without_padding + # Change this to be a bitfield of flags if ever there is a need to add + # another similar thing. + self.is_anonymous = is_anonymous + self.padding = 0 + + def __repr__(self): + return ('%s@%x(size_without_padding=%d,padding=%d,name=%s,path=%s,anon=%d)' + % (self.section_name, self.address, self.size_without_padding, + self.padding, self.name, self.source_path or self.object_path, + int(self.is_anonymous))) + + +class SymbolGroup(BaseSymbol): + """Represents a group of symbols using the same interface as Symbol. + + SymbolGroups are immutable. All filtering / sorting will return new + SymbolGroups objects. + + Overrides many __functions__. E.g. the following are all valid: + * len(group) + * iter(group) + * group[0] + * group['0x1234'] # By symbol address + * without_group2 = group1 - group2 + * unioned = group1 + group2 + """ + + __slots__ = ( + '_padding', + '_size', + '_symbols', + '_filtered_symbols', + 'full_name', + 'name', + 'section_name', + 'is_sorted', + ) + + def __init__(self, symbols, filtered_symbols=None, name=None, + full_name=None, section_name=None, is_sorted=False): + self._padding = None + self._size = None + self._symbols = symbols + self._filtered_symbols = filtered_symbols or [] + self.name = name or '' + self.full_name = full_name + self.section_name = section_name or '.*' + self.is_sorted = is_sorted + + def __repr__(self): + return 'Group(name=%s,count=%d,size=%d)' % ( + self.name, len(self), self.size) + + def __iter__(self): + return iter(self._symbols) + + def __len__(self): + return len(self._symbols) + + def __eq__(self, other): + return self._symbols == other._symbols + + def __getitem__(self, key): + """|key| can be an index or an address. + + Raises if multiple symbols map to the address. + """ + if isinstance(key, slice): + return self._symbols.__getitem__(key) + if isinstance(key, basestring) or key > len(self._symbols): + found = self.WhereAddressInRange(key) + if len(found) != 1: + raise KeyError('%d symbols found at address %s.' % (len(found), key)) + return found[0] + return self._symbols[key] + + def __sub__(self, other): + other_ids = set(id(s) for s in other) + after_symbols = [s for s in self if id(s) not in other_ids] + return self._CreateTransformed(after_symbols, + section_name=self.section_name) + + def __add__(self, other): + self_ids = set(id(s) for s in self) + after_symbols = self._symbols + [s for s in other if id(s) not in self_ids] + return self._CreateTransformed( + after_symbols, section_name=self.section_name, is_sorted=False) + + @property + def address(self): + first = self._symbols[0].address + return first if all(s.address == first for s in self._symbols) else 0 + + @property + def is_anonymous(self): + first = self._symbols[0].is_anonymous + return first if all( + s.is_anonymous == first for s in self._symbols) else False + + @property + def object_path(self): + first = self._symbols[0].object_path + return first if all(s.object_path == first for s in self._symbols) else None + + @property + def source_path(self): + first = self._symbols[0].source_path + return first if all(s.source_path == first for s in self._symbols) else None + + @property + def size(self): + if self._size is None: + if self.IsBss(): + self._size = sum(s.size for s in self) + self._size = sum(s.size for s in self if not s.IsBss()) + return self._size + + @property + def padding(self): + if self._padding is None: + self._padding = sum(s.padding for s in self) + return self._padding + + def IsGroup(self): + return True + + def _CreateTransformed(self, symbols, filtered_symbols=None, name=None, + section_name=None, is_sorted=None): + if is_sorted is None: + is_sorted = self.is_sorted + return SymbolGroup(symbols, filtered_symbols=filtered_symbols, name=name, + section_name=section_name, is_sorted=is_sorted) + + def Sorted(self, cmp_func=None, key=None, reverse=False): + # Default to sorting by abs(size) then name. + if cmp_func is None and key is None: + cmp_func = lambda a, b: cmp((a.IsBss(), abs(b.size), a.name), + (b.IsBss(), abs(a.size), b.name)) + + after_symbols = sorted(self._symbols, cmp_func, key, reverse) + return self._CreateTransformed( + after_symbols, filtered_symbols=self._filtered_symbols, + section_name=self.section_name, is_sorted=True) + + def SortedByName(self, reverse=False): + return self.Sorted(key=(lambda s:s.name), reverse=reverse) + + def SortedByAddress(self, reverse=False): + return self.Sorted(key=(lambda s:s.address), reverse=reverse) + + def SortedByCount(self, reverse=False): + return self.Sorted(key=(lambda s:len(s) if s.IsGroup() else 1), + reverse=not reverse) + + def Filter(self, func): + filtered_and_kept = ([], []) + for symbol in self: + filtered_and_kept[int(bool(func(symbol)))].append(symbol) + return self._CreateTransformed(filtered_and_kept[1], + filtered_symbols=filtered_and_kept[0], + section_name=self.section_name) + + def WhereBiggerThan(self, min_size): + return self.Filter(lambda s: s.size >= min_size) + + def WhereInSection(self, section): + if len(section) == 1: + ret = self.Filter(lambda s: s.section == section) + ret.section_name = SECTION_TO_SECTION_NAME[section] + else: + ret = self.Filter(lambda s: s.section_name == section) + ret.section_name = section + return ret + + def WhereIsGenerated(self): + return self.Filter(lambda s: s.IsGenerated()) + + def WhereNameMatches(self, pattern): + regex = re.compile(match_util.ExpandRegexIdentifierPlaceholder(pattern)) + return self.Filter(lambda s: regex.search(s.name)) + + def WhereObjectPathMatches(self, pattern): + regex = re.compile(match_util.ExpandRegexIdentifierPlaceholder(pattern)) + return self.Filter(lambda s: regex.search(s.object_path)) + + def WhereSourcePathMatches(self, pattern): + regex = re.compile(match_util.ExpandRegexIdentifierPlaceholder(pattern)) + return self.Filter(lambda s: regex.search(s.source_path)) + + def WherePathMatches(self, pattern): + regex = re.compile(match_util.ExpandRegexIdentifierPlaceholder(pattern)) + return self.Filter(lambda s: (regex.search(s.source_path) or + regex.search(s.object_path))) + + def WhereMatches(self, pattern): + """Looks for |pattern| within all paths & names.""" + regex = re.compile(match_util.ExpandRegexIdentifierPlaceholder(pattern)) + return self.Filter(lambda s: (regex.search(s.source_path) or + regex.search(s.object_path) or + regex.search(s.full_name or '') or + regex.search(s.name))) + + def WhereAddressInRange(self, start, end=None): + """Searches for addesses within [start, end). + + Args may be ints or hex strings. Default value for |end| is |start| + 1. + """ + if isinstance(start, basestring): + start = int(start, 16) + if end is None: + end = start + 1 + return self.Filter(lambda s: s.address >= start and s.address < end) + + def WhereHasAnyAttribution(self): + return self.Filter(lambda s: s.name or s.source_path or s.object_path) + + def Inverted(self): + """Returns the symbols that were filtered out by the previous filter. + + Applies only when the previous call was a filter. + + Example: + # Symbols that do not have "third_party" in their path. + symbols.WherePathMatches(r'third_party').Inverted() + # Symbols within third_party that do not contain the string "foo". + symbols.WherePathMatches(r'third_party').WhereMatches('foo').Inverted() + """ + return self._CreateTransformed( + self._filtered_symbols, filtered_symbols=self._symbols, is_sorted=False) + + def GroupBy(self, func, min_count=0): + """Returns a SymbolGroup of SymbolGroups, indexed by |func|. + + Args: + func: Grouping function. Passed a symbol and returns a string for the + name of the subgroup to put the symbol in. If None is returned, the + symbol is omitted. + min_count: Miniumum number of symbols for a group. If fewer than this many + symbols end up in a group, they will not be put within a group. + Use a negative value to omit symbols entirely rather than + include them outside of a group. + """ + after_syms = [] + filtered_symbols = [] + symbols_by_token = collections.defaultdict(list) + # Index symbols by |func|. + for symbol in self: + token = func(symbol) + if token is None: + filtered_symbols.append(symbol) + symbols_by_token[token].append(symbol) + # Create the subgroups. + include_singles = min_count >= 0 + min_count = abs(min_count) + for token, symbols in symbols_by_token.iteritems(): + if len(symbols) >= min_count: + after_syms.append(self._CreateTransformed( + symbols, name=token, section_name=self.section_name, + is_sorted=False)) + elif include_singles: + after_syms.extend(symbols) + else: + filtered_symbols.extend(symbols) + return self._CreateTransformed( + after_syms, filtered_symbols=filtered_symbols, + section_name=self.section_name, is_sorted=False) + + def GroupBySectionName(self): + return self.GroupBy(lambda s: s.section_name) + + def GroupByNamespace(self, depth=0, fallback='{global}', min_count=0): + """Groups by symbol namespace (as denoted by ::s). + + Does not differentiate between C++ namespaces and C++ classes. + + Args: + depth: When 0 (default), groups by entire namespace. When 1, groups by + top-level name, when 2, groups by top 2 names, etc. + fallback: Use this value when no namespace exists. + min_count: Miniumum number of symbols for a group. If fewer than this many + symbols end up in a group, they will not be put within a group. + Use a negative value to omit symbols entirely rather than + include them outside of a group. + """ + def extract_namespace(symbol): + # Remove template params. + name = symbol.name + template_idx = name.find('<') + if template_idx: + name = name[:template_idx] + + # Remove after the final :: (not part of the namespace). + colon_idx = name.rfind('::') + if colon_idx == -1: + return fallback + name = name[:colon_idx] + + return _ExtractPrefixBeforeSeparator(name, '::', depth) + return self.GroupBy(extract_namespace, min_count=min_count) + + def GroupBySourcePath(self, depth=0, fallback='{no path}', + fallback_to_object_path=True, min_count=0): + """Groups by source_path. + + Args: + depth: When 0 (default), groups by entire path. When 1, groups by + top-level directory, when 2, groups by top 2 directories, etc. + fallback: Use this value when no namespace exists. + fallback_to_object_path: When True (default), uses object_path when + source_path is missing. + min_count: Miniumum number of symbols for a group. If fewer than this many + symbols end up in a group, they will not be put within a group. + Use a negative value to omit symbols entirely rather than + include them outside of a group. + """ + def extract_path(symbol): + path = symbol.source_path + if fallback_to_object_path and not path: + path = symbol.object_path + path = path or fallback + return _ExtractPrefixBeforeSeparator(path, os.path.sep, depth) + return self.GroupBy(extract_path, min_count=min_count) + + def GroupByObjectPath(self, depth=0, fallback='{no path}', min_count=0): + """Groups by object_path. + + Args: + depth: When 0 (default), groups by entire path. When 1, groups by + top-level directory, when 2, groups by top 2 directories, etc. + fallback: Use this value when no namespace exists. + min_count: Miniumum number of symbols for a group. If fewer than this many + symbols end up in a group, they will not be put within a group. + Use a negative value to omit symbols entirely rather than + include them outside of a group. + """ + def extract_path(symbol): + path = symbol.object_path or fallback + return _ExtractPrefixBeforeSeparator(path, os.path.sep, depth) + return self.GroupBy(extract_path, min_count=min_count) + + +class SymbolDiff(SymbolGroup): + """A SymbolGroup subclass representing a diff of two other SymbolGroups. + + All Symbols contained within have a |size| which is actually the size delta. + Additionally, metadata is kept about which symbols were added / removed / + changed. + """ + __slots__ = ( + '_added_ids', + '_removed_ids', + ) + + def __init__(self, added, removed, similar, name=None, full_name=None, + section_name=None): + self._added_ids = set(id(s) for s in added) + self._removed_ids = set(id(s) for s in removed) + symbols = [] + symbols.extend(added) + symbols.extend(removed) + symbols.extend(similar) + super(SymbolDiff, self).__init__(symbols, name=name, full_name=full_name, + section_name=section_name) + + def __repr__(self): + return '%s(%d added, %d removed, %d changed, %d unchanged, size=%d)' % ( + 'SymbolGroup', self.added_count, self.removed_count, self.changed_count, + self.unchanged_count, self.size) + + def _CreateTransformed(self, symbols, filtered_symbols=None, name=None, + section_name=None, is_sorted=None): + ret = SymbolDiff.__new__(SymbolDiff) + # Printing sorts, so fast-path the same symbols case. + if len(symbols) == len(self._symbols): + ret._added_ids = self._added_ids + ret._removed_ids = self._removed_ids + else: + ret._added_ids = set(id(s) for s in symbols if self.IsAdded(s)) + ret._removed_ids = set(id(s) for s in symbols if self.IsRemoved(s)) + super(SymbolDiff, ret).__init__( + symbols, filtered_symbols=filtered_symbols, name=name, + section_name=section_name, is_sorted=is_sorted) + return ret + + @property + def added_count(self): + return len(self._added_ids) + + @property + def removed_count(self): + return len(self._removed_ids) + + @property + def changed_count(self): + not_changed = self.unchanged_count + self.added_count + self.removed_count + return len(self) - not_changed + + @property + def unchanged_count(self): + return sum(1 for s in self if self.IsSimilar(s) and s.size == 0) + + def IsAdded(self, sym): + return id(sym) in self._added_ids + + def IsSimilar(self, sym): + key = id(sym) + return key not in self._added_ids and key not in self._removed_ids + + def IsRemoved(self, sym): + return id(sym) in self._removed_ids + + def WhereNotUnchanged(self): + return self.Filter(lambda s: not self.IsSimilar(s) or s.size) + + +def Diff(before, after): + """Diffs two SizeInfo or SymbolGroup objects. + + When diffing SizeInfos, a SizeInfoDiff is returned. + When diffing SymbolGroups, a SymbolDiff is returned. + + Returns: + Returns a SizeInfo when args are of type SizeInfo. + Returns a SymbolDiff when args are of type SymbolGroup. + """ + if isinstance(after, SizeInfo): + assert isinstance(before, SizeInfo) + section_sizes = {k: after.section_sizes[k] - v + for k, v in before.section_sizes.iteritems()} + symbol_diff = _DiffSymbols(before.symbols, after.symbols) + return SizeInfoDiff(section_sizes, symbol_diff, before.metadata, + after.metadata) + + assert isinstance(after, SymbolGroup) and isinstance(before, SymbolGroup) + return _DiffSymbols(before, after) + + +def _NegateAll(symbols): + ret = [] + for symbol in symbols: + if symbol.IsGroup(): + duped = SymbolDiff([], _NegateAll(symbol), [], name=symbol.name, + full_name=symbol.full_name, + section_name=symbol.section_name) + else: + duped = copy.copy(symbol) + duped.size = -duped.size + duped.padding = -duped.padding + ret.append(duped) + return ret + + +def _DiffSymbols(before, after): + symbols_by_key = collections.defaultdict(list) + for s in before: + symbols_by_key[s._Key()].append(s) + + added = [] + similar = [] + # For similar symbols, padding is zeroed out. In order to not lose the + # information entirely, store it in aggregate. + padding_by_section_name = collections.defaultdict(int) + for after_sym in after: + matching_syms = symbols_by_key.get(after_sym._Key()) + if matching_syms: + before_sym = matching_syms.pop(0) + if before_sym.IsGroup() and after_sym.IsGroup(): + merged_sym = _DiffSymbols(before_sym, after_sym) + else: + size_diff = (after_sym.size_without_padding - + before_sym.size_without_padding) + merged_sym = Symbol(after_sym.section_name, size_diff, + address=after_sym.address, name=after_sym.name, + source_path=after_sym.source_path, + object_path=after_sym.object_path, + full_name=after_sym.full_name, + is_anonymous=after_sym.is_anonymous) + + # Diffs are more stable when comparing size without padding, except when + # the symbol is a padding-only symbol. + if after_sym.size_without_padding == 0 and size_diff == 0: + merged_sym.padding = after_sym.padding - before_sym.padding + else: + padding_by_section_name[after_sym.section_name] += ( + after_sym.padding - before_sym.padding) + + similar.append(merged_sym) + else: + added.append(after_sym) + + removed = [] + for remaining_syms in symbols_by_key.itervalues(): + if remaining_syms: + removed.extend(_NegateAll(remaining_syms)) + + for section_name, padding in padding_by_section_name.iteritems(): + if padding != 0: + similar.append(Symbol(section_name, padding, + name="** aggregate padding of diff'ed symbols")) + return SymbolDiff(added, removed, similar, name=after.name, + full_name=after.full_name, + section_name=after.section_name) + + +def _ExtractPrefixBeforeSeparator(string, separator, count=1): + idx = -len(separator) + prev_idx = None + for _ in xrange(count): + idx = string.find(separator, idx + len(separator)) + if idx < 0: + break + prev_idx = idx + return string[:prev_idx]
diff --git a/tools/binary_size/libsupersize/ninja_parser.py b/tools/binary_size/libsupersize/ninja_parser.py new file mode 100644 index 0000000..6486c5e --- /dev/null +++ b/tools/binary_size/libsupersize/ninja_parser.py
@@ -0,0 +1,89 @@ +# Copyright 2017 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. +"""Extract source file information from .ninja files.""" + +import logging +import os +import re + + +# E.g.: +# build obj/.../foo.o: cxx gen/.../foo.cc || obj/.../foo.inputdeps.stamp +# build obj/.../libfoo.a: alink obj/.../a.o obj/.../b.o | +_REGEX = re.compile(r'build ([^:]+?\.[ao]): \w+ (.*?)(?: \||\n|$)') + + +class SourceFileMapper(object): + def __init__(self, output_directory): + self._output_directory = output_directory + self._ninja_files_to_parse = ['build.ninja'] + self._seen_ninja_files = set(('build.ninja',)) + self._dep_map = {} + + def _ParseNinja(self, path): + with open(os.path.join(self._output_directory, path)) as obj: + self._ParseNinjaLines(obj) + + def _ParseNinjaLines(self, lines): + dep_map = self._dep_map + sub_ninjas = [] + for line in lines: + if line.startswith('subninja '): + subpath = line[9:-1] + assert subpath not in self._seen_ninja_files, ( + 'Double include of ' + subpath) + self._seen_ninja_files.add(subpath) + sub_ninjas.append(subpath) + continue + m = _REGEX.match(line) + if m: + output, srcs = m.groups() + output = output.replace('\\ ', ' ') + assert output not in dep_map, 'Duplicate output: ' + output + if output[-1] == 'o': + dep_map[output] = srcs.replace('\\ ', ' ') + else: + srcs = srcs.replace('\\ ', '\b') + obj_paths = (s.replace('\b', ' ') for s in srcs.split(' ')) + dep_map[output] = {os.path.basename(p): p for p in obj_paths} + + # Add reversed so that the first on encoundered is at the top of the stack. + self._ninja_files_to_parse.extend(reversed(sub_ninjas)) + + def _Lookup(self, path): + """Looks for |path| within self._dep_map. + + If not found, continues to parse subninjas until it is found or there are no + more subninjas. + """ + ret = self._dep_map.get(path) + while not ret and self._ninja_files_to_parse: + self._ParseNinja(self._ninja_files_to_parse.pop()) + ret = self._dep_map.get(path) + return ret + + def FindSourceForPath(self, path): + """Returns the source path for the given object path (or None if not found). + + Paths for objects within archives should be in the format: foo/bar.a(baz.o) + """ + if not path.endswith(')'): + return self._Lookup(path) + + # foo/bar.a(baz.o) + start_idx = path.index('(') + lib_name = path[:start_idx] + obj_name = path[start_idx + 1:-1] + by_basename = self._Lookup(lib_name) + if not by_basename: + return None + obj_path = by_basename.get(obj_name) + if not obj_path: + # Found the library, but it doesn't list the .o file. + logging.warning('no obj basename for %s', path) + return None + return self._Lookup(obj_path) + + def GetParsedFileCount(self): + return len(self._seen_ninja_files)
diff --git a/tools/binary_size/libsupersize/paths.py b/tools/binary_size/libsupersize/paths.py new file mode 100644 index 0000000..dcb7c72 --- /dev/null +++ b/tools/binary_size/libsupersize/paths.py
@@ -0,0 +1,90 @@ +# Copyright 2017 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. + +"""Functions for dealing with determining --tool-prefix.""" + +import distutils.spawn +import logging +import os + +_STATUS_DETECTED = 1 +_STATUS_VERIFIED = 2 + + +class LazyPaths(object): + def __init__(self, tool_prefix=None, output_directory=None, + any_path_within_output_directory=None): + self._tool_prefix = tool_prefix + self._output_directory = output_directory + self._any_path_within_output_directory = any_path_within_output_directory + self._output_directory_status = _STATUS_DETECTED if output_directory else 0 + self._tool_prefix_status = _STATUS_DETECTED if tool_prefix else 0 + + @property + def tool_prefix(self): + if self._tool_prefix_status < _STATUS_DETECTED: + self._tool_prefix_status = _STATUS_DETECTED + self._tool_prefix = self._DetectToolPrefix() or '' + logging.debug('Detected --tool-prefix=%s', self._tool_prefix) + return self._tool_prefix + + @property + def output_directory(self): + if self._output_directory_status < _STATUS_DETECTED: + self._output_directory_status = _STATUS_DETECTED + self._output_directory = self._DetectOutputDirectory() + logging.debug('Detected --output-directory=%s', self._output_directory) + return self._output_directory + + def VerifyOutputDirectory(self): + output_directory = self.output_directory + if self._output_directory_status < _STATUS_VERIFIED: + self._output_directory_status = _STATUS_VERIFIED + if not output_directory or not os.path.isdir(output_directory): + raise Exception('Bad --output-directory. Path not found: %s' % + output_directory) + logging.info('Using --output-directory=%s', output_directory) + return output_directory + + def VerifyToolPrefix(self): + tool_prefix = self.tool_prefix + if self._tool_prefix_status < _STATUS_VERIFIED: + self._tool_prefix_status = _STATUS_VERIFIED + if os.path.sep not in tool_prefix: + full_path = distutils.spawn.find_executable(tool_prefix + 'c++filt') + else: + full_path = tool_prefix + 'c++filt' + + if not full_path or not os.path.isfile(full_path): + raise Exception('Bad --tool-prefix. Path not found: %s' % full_path) + logging.info('Using --tool-prefix=%s', self._tool_prefix) + return tool_prefix + + def _DetectOutputDirectory(self): + # Try and find build.ninja. + abs_path = os.path.abspath(self._any_path_within_output_directory) + while True: + if os.path.exists(os.path.join(abs_path, 'build.ninja')): + return os.path.relpath(abs_path) + parent_dir = os.path.dirname(abs_path) + if parent_dir == abs_path: + break + abs_path = abs_path = parent_dir + + # See if CWD=output directory. + if os.path.exists('build.ninja'): + return '.' + return None + + def _DetectToolPrefix(self): + output_directory = self.output_directory + if output_directory: + # Auto-detect from build_vars.txt + build_vars_path = os.path.join(output_directory, 'build_vars.txt') + if os.path.exists(build_vars_path): + with open(build_vars_path) as f: + build_vars = dict(l.rstrip().split('=', 1) for l in f if '=' in l) + return os.path.normpath( + os.path.join(output_directory, build_vars['android_tool_prefix'])) + return None
diff --git a/tools/binary_size/template/D3SymbolTreeMap.js b/tools/binary_size/libsupersize/template/D3SymbolTreeMap.js similarity index 96% rename from tools/binary_size/template/D3SymbolTreeMap.js rename to tools/binary_size/libsupersize/template/D3SymbolTreeMap.js index 4bbe82f1..2c3bab6e 100644 --- a/tools/binary_size/template/D3SymbolTreeMap.js +++ b/tools/binary_size/libsupersize/template/D3SymbolTreeMap.js
@@ -71,33 +71,12 @@ } D3SymbolTreeMap._NM_SYMBOL_TYPE_DESCRIPTIONS = { - // Definitions concisely derived from the nm 'man' page - 'A': 'Global absolute (A)', - 'B': 'Global uninitialized data (B)', - 'b': 'Local uninitialized data (b)', - 'C': 'Global uninitialized common (C)', - 'D': 'Global initialized data (D)', - 'd': 'Local initialized data (d)', - 'G': 'Global small initialized data (G)', - 'g': 'Local small initialized data (g)', - 'i': 'Indirect function (i)', - 'N': 'Debugging (N)', - 'p': 'Stack unwind (p)', - 'R': 'Global read-only data (R)', - 'r': 'Local read-only data (r)', - 'S': 'Global small uninitialized data (S)', - 's': 'Local small uninitialized data (s)', - 'T': 'Global code (T)', - 't': 'Local code (t)', - 'U': 'Undefined (U)', - 'u': 'Unique (u)', - 'V': 'Global weak object (V)', - 'v': 'Local weak object (v)', - 'W': 'Global weak symbol (W)', - 'w': 'Local weak symbol (w)', - '@': 'Vtable entry (@)', // non-standard, hack. - '-': 'STABS debugging (-)', - '?': 'Unrecognized (?)', + 'b': '.bss', + 'd': '.data and .data.*', + 'r': '.rodata', + 't': '.text', + 'v': 'Vtable entry', + '!': 'Generated Symbols (typeinfo, thunks, etc)', }; D3SymbolTreeMap._NM_SYMBOL_TYPES = ''; for (var symbol_type in D3SymbolTreeMap._NM_SYMBOL_TYPE_DESCRIPTIONS) { @@ -118,20 +97,14 @@ return result; } -// Qualitative 12-value pastel Brewer palette. D3SymbolTreeMap._colorArray = [ - 'rgb(141,211,199)', - 'rgb(255,255,179)', 'rgb(190,186,218)', - 'rgb(251,128,114)', - 'rgb(128,177,211)', 'rgb(253,180,98)', - 'rgb(179,222,105)', - 'rgb(252,205,229)', - 'rgb(217,217,217)', - 'rgb(188,128,189)', + 'rgb(141,211,199)', + 'rgb(128,177,211)', + 'rgb(255,237,111)', 'rgb(204,235,197)', - 'rgb(255,237,111)']; +] D3SymbolTreeMap._initColorMap = function() { var map = {};
diff --git a/tools/binary_size/template/index.html b/tools/binary_size/libsupersize/template/index.html similarity index 83% rename from tools/binary_size/template/index.html rename to tools/binary_size/libsupersize/template/index.html index 7e1a1fca..0d41597 100644 --- a/tools/binary_size/template/index.html +++ b/tools/binary_size/libsupersize/template/index.html
@@ -24,6 +24,7 @@ var treemap; var filterChanging = false; var savedSettings = {}; +var NUM_SYMBOL_TYPES = 6 function init() { if (window.metadata !== undefined && window.metadata.subtitle) { @@ -186,7 +187,7 @@ if (filterChanging) return true; filterChanging = true; var enabled = document.getElementById('symbol_types_filter').value; - for (var x=0; x<=25; x++) { + for (var x=0; x<NUM_SYMBOL_TYPES; x++) { var checkBox = document.getElementById('check_' + x); checkBox.checked = (enabled.indexOf(checkBox.value) != -1); } @@ -197,7 +198,7 @@ if (filterChanging) return true; filterChanging = true; var text = ''; - for (var x=0; x<=25; x++) { + for (var x=0; x<NUM_SYMBOL_TYPES; x++) { var checkBox = document.getElementById('check_' + x); if (checkBox.checked) { text += checkBox.value; @@ -209,7 +210,7 @@ function initFilterOptions() { updateFilterText(); - for (var x=0; x<=25; x++) { + for (var x=0; x<NUM_SYMBOL_TYPES; x++) { var checkBox = document.getElementById('check_' + x); checkBox.onchange=updateFilterText; var swatch = document.getElementById('swatch_' + x); @@ -234,7 +235,7 @@ } function filterSetAll(enabled) { - for (var x=0; x<=25; x++) { + for (var x=0; x<NUM_SYMBOL_TYPES; x++) { var checkBox = document.getElementById('check_' + x); checkBox.checked = enabled; } @@ -423,42 +424,18 @@ </div> <table id='options_container' style='visibility: hidden; border: 3px ridge grey; padding: 0px; top: 50%; left: 50%; position: fixed; z-index: 2147483646; overflow: auto; background-color: rgba(255,255,255,0.9); border-radius: 10px; box-shadow: 10px 10px 5px rgba(80,80,80,0.7);'><tr><td style='vertical-align: top'> <table cellspacing=0 cellborder=0 style='width:100%'> - <tr><th colspan=3 style='padding-bottom: .25em; text-decoration: underline;'>Symbol Types To Show</th></tr> + <tr><th style='padding-bottom: .25em; text-decoration: underline;'>Symbol Types To Show</th></tr> <tr> - <td style='width: 33%; white-space: nowrap; vertical-align: top;'> - <span class='swatch' id='swatch_0'> </span><input checked type='checkbox' id='check_0' value='A'>Global absolute (A) - <br><span class='swatch' id='swatch_1'> </span><input checked type='checkbox' id='check_1' value='B'>Global uninitialized data (B) - <br><span class='swatch' id='swatch_2'> </span><input checked type='checkbox' id='check_2' value='b'>Local uninitialized data (b) - <br><span class='swatch' id='swatch_3'> </span><input checked type='checkbox' id='check_3' value='C'>Global uninitialized common (C) - <br><span class='swatch' id='swatch_4'> </span><input checked type='checkbox' id='check_4' value='D'>Global initialized data (D) - <br><span class='swatch' id='swatch_5'> </span><input checked type='checkbox' id='check_5' value='d'>Local initialized data (d) - <br><span class='swatch' id='swatch_6'> </span><input checked type='checkbox' id='check_6' value='G'>Global small initialized data (G) - <br><span class='swatch' id='swatch_7'> </span><input checked type='checkbox' id='check_7' value='g'>Local small initialized data (g) - <br><span class='swatch' id='swatch_8'> </span><input checked type='checkbox' id='check_8' value='i'>Indirect function (i) - </td> - <td style='width: 33%; white-space: nowrap; vertical-align: top;'> - <span class='swatch' id='swatch_9'> </span><input checked type='checkbox' id='check_9' value='N'>Debugging (N) - <br><span class='swatch' id='swatch_10'> </span><input checked type='checkbox' id='check_10' value='p'>Stack unwind (p) - <br><span class='swatch' id='swatch_11'> </span><input checked type='checkbox' id='check_11' value='R'>Global read-only data (R) - <br><span class='swatch' id='swatch_12'> </span><input checked type='checkbox' id='check_12' value='r'>Local read-only data (r) - <br><span class='swatch' id='swatch_13'> </span><input checked type='checkbox' id='check_13' value='S'>Global small uninitialized data (S) - <br><span class='swatch' id='swatch_14'> </span><input checked type='checkbox' id='check_14' value='s'>Local small uninitialized data (s) - <br><span class='swatch' id='swatch_15'> </span><input checked type='checkbox' id='check_15' value='T'>Global code (T) - <br><span class='swatch' id='swatch_16'> </span><input checked type='checkbox' id='check_16' value='t'>Local code (t) - <br><span class='swatch' id='swatch_17'> </span><input checked type='checkbox' id='check_17' value='U'>Undefined (U) - </td> - <td style='width: 33%; white-space: nowrap; vertical-align: top;'> - <span class='swatch' id='swatch_18'> </span><input checked type='checkbox' id='check_18' value='u'>Unique (u) - <br><span class='swatch' id='swatch_19'> </span><input checked type='checkbox' id='check_19' value='V'>Global weak object (V) - <br><span class='swatch' id='swatch_20'> </span><input checked type='checkbox' id='check_20' value='v'>Local weak object (v) - <br><span class='swatch' id='swatch_21'> </span><input checked type='checkbox' id='check_21' value='W'>Global weak symbol (W) - <br><span class='swatch' id='swatch_22'> </span><input checked type='checkbox' id='check_22' value='w'>Local weak symbol (w) - <br><span class='swatch' id='swatch_23'> </span><input checked type='checkbox' id='check_23' value='@'>Vtable entry (@) - <br><span class='swatch' id='swatch_24'> </span><input checked type='checkbox' id='check_24' value='-'>STABS debugging (-) - <br><span class='swatch' id='swatch_25'> </span><input checked type='checkbox' id='check_25' value='?'>Unrecognized (?) + <td style='white-space: nowrap; vertical-align: top;'> + <br><span class='swatch' id='swatch_0'> </span><input checked type='checkbox' id='check_0' value='b'>Uninitialized data (.bss) + <br><span class='swatch' id='swatch_1'> </span><input checked type='checkbox' id='check_1' value='d'>Initialized data (.data) + <br><span class='swatch' id='swatch_2'> </span><input checked type='checkbox' id='check_2' value='r'>Read-only data (.rodata) + <br><span class='swatch' id='swatch_3'> </span><input checked type='checkbox' id='check_3' value='t'>Code (.text) + <br><span class='swatch' id='swatch_4'> </span><input checked type='checkbox' id='check_4' value='v'>Vtable entries + <br><span class='swatch' id='swatch_5'> </span><input checked type='checkbox' id='check_5' value='!'>Generated Symbols (typeinfo, thunks, etc) </td> </tr> - <tr><td colspan=3 style='text-align: center; white-space: nowrap; padding-top: 1em;'> + <tr><td style='text-align: center; white-space: nowrap; padding-top: 1em;'> Select <input type='button' onclick='filterSetAll(true)' value='All'>, <input type='button' onclick='filterSetAll(false)' value='None'>, or type a string: <input id='symbol_types_filter' size=30 value='' onkeyup='symbolFilterTextChanged()' onblur='updateFilterText()'>
diff --git a/tools/binary_size/template/test-data-generator.html b/tools/binary_size/libsupersize/template/test-data-generator.html similarity index 100% rename from tools/binary_size/template/test-data-generator.html rename to tools/binary_size/libsupersize/template/test-data-generator.html
diff --git a/tools/binary_size/libsupersize/testdata/ActualDiff.golden b/tools/binary_size/libsupersize/testdata/ActualDiff.golden new file mode 100644 index 0000000..13dc194 --- /dev/null +++ b/tools/binary_size/libsupersize/testdata/ActualDiff.golden
@@ -0,0 +1,183 @@ +Common Metadata: + baz=yes + foo=1 +Old Metadata: + bar=[1, 2, 3] +New Metadata: + bar=[1, 3] + +Section Sizes (Total=0 bytes): + .bss: 0 bytes (not included in totals) + .data: 0 bytes (0.0%) + .data.rel.ro: 0 bytes (0.0%) + .data.rel.ro.local: 0 bytes (0.0%) + .rodata: 0 bytes (0.0%) + .text: 0 bytes (0.0%) + +Other section sizes: + .ARM.attributes: 0 bytes + .ARM.exidx: 0 bytes + .ARM.extab: 0 bytes + .comment: 0 bytes + .debug_abbrev: 0 bytes + .debug_aranges: 0 bytes + .debug_frame: 0 bytes + .debug_info: 0 bytes + .debug_line: 0 bytes + .debug_loc: 0 bytes + .debug_pubnames: 0 bytes + .debug_pubtypes: 0 bytes + .debug_ranges: 0 bytes + .debug_str: 0 bytes + .dynamic: 0 bytes + .dynstr: 0 bytes + .dynsym: 0 bytes + .fini_array: 0 bytes + .gnu.version: 0 bytes + .gnu.version_d: 0 bytes + .gnu.version_r: 0 bytes + .got: 0 bytes + .hash: 0 bytes + .init_array: 0 bytes + .interp: 0 bytes + .note.gnu.build-id: 0 bytes + .note.gnu.gold-version: 0 bytes + .plt: 0 bytes + .rel.dyn: 0 bytes + .rel.plt: 0 bytes + .shstrtab: 0 bytes + .strtab: 0 bytes + .symtab: 0 bytes + +2 symbols added (+), 1 changed (~), 3 removed (-), 32 unchanged (=) +1 object files added, 0 removed +Added files: + third_party/ffmpeg/libffmpeg_internal.a/fft_fixed.o + +Showing 38 symbols with total size: 10 bytes +.text=10 bytes .rodata=0 bytes other=0 bytes total=10 bytes +Number of object files: 10 + +First columns are: running total, type, size +~ 10 t@0x28d900 size=10 padding=0 size_without_padding=10 + source_path=base/page_allocator.cc object_path=base/base/page_allocator.o + is_anonymous=0 name=startup._GLOBAL__sub_I_page_allocator.cc += 10 r@0x284e364 size=0 padding=0 size_without_padding=0 + source_path=base/page_allocator.cc object_path=base/base/page_allocator.o += 10 r@Group size=0 padding=0 size_without_padding=0 count=2 + source_path= object_path= + is_anonymous=0 name=** merge strings += 10 t@Group size=0 padding=0 size_without_padding=0 count=2 + source_path=None object_path=None + is_anonymous=0 name=** symbol gaps += 10 d@0x2cd84e0 size=0 padding=0 size_without_padding=0 + source_path= object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o + is_anonymous=0 name=.Lswitch.table.45 += 10 d@0x2c176f0 size=0 padding=0 size_without_padding=0 + source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o + is_anonymous=0 name=ChromeMainDelegate [vtable] += 10 d@0x2cd8500 size=0 padding=0 size_without_padding=0 + source_path=third_party/paint.cc object_path=third_party/WebKit.a/PaintChunker.o + is_anonymous=0 name=ChromeMainDelegateAndroid [vtable] += 10 r@0x284e370 size=0 padding=0 size_without_padding=0 + source_path=base/page_allocator.cc object_path=base/base/page_allocator.o + is_anonymous=0 name=Name += 10 d@0x2de70a0 size=0 padding=0 size_without_padding=0 + source_path=third_party/container.c object_path=third_party/WebKit.a/ContiguousContainer.o + is_anonymous=1 name=base::android::g_renderer_histogram_code += 10 r@0x28f3480 size=0 padding=0 size_without_padding=0 + source_path=third_party/paint.cc object_path=third_party/WebKit.a/PaintChunker.o + is_anonymous=1 name=blink::CSSValueKeywordsHash::findValueImpl::value_word_list + full_name=blink::CSSValueKeywordsHash::findValueImpl(char const*, unsigned int)::value_word_list += 10 t@0x2a0020 size=0 padding=0 size_without_padding=0 + source_path=third_party/container.c object_path=third_party/WebKit.a/ContiguousContainer.o + is_anonymous=0 name=blink::ContiguousContainerBase::ContiguousContainerBase + full_name=blink::ContiguousContainerBase::ContiguousContainerBase(blink::ContiguousContainerBase&&) += 10 t@0x2a0000 size=0 padding=0 size_without_padding=0 + source_path=third_party/paint.cc object_path=third_party/WebKit.a/PaintChunker.o + is_anonymous=0 name=blink::ContiguousContainerBase::shrinkToFit + full_name=blink::ContiguousContainerBase::shrinkToFit() += 10 t@0x2a0010 size=0 padding=0 size_without_padding=0 + source_path=third_party/paint.cc object_path=third_party/WebKit.a/PaintChunker.o + is_anonymous=0 name=blink::ContiguousContainerBase::shrinkToFit [clone .part.1234] [clone .isra.2] + full_name=blink::ContiguousContainerBase::shrinkToFit() [clone .part.1234] [clone .isra.2] += 10 t@0x2a1000 size=0 padding=0 size_without_padding=0 + source_path=third_party/container.c object_path=third_party/WebKit.a/ContiguousContainer.o + is_anonymous=1 name=blink::PaintChunker::releasePaintChunks [clone .part.1] + full_name=blink::PaintChunker::releasePaintChunks() [clone .part.1] += 10 d@0x2c17740 size=0 padding=0 size_without_padding=0 + source_path=third_party/container.c object_path=third_party/WebKit.a/ContiguousContainer.o + is_anonymous=0 name=chrome::mojom::FieldTrialRecorderProxy [vtable] += 10 d@0x2c17728 size=0 padding=0 size_without_padding=0 + source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o + is_anonymous=0 name=chrome::mojom::FieldTrialRecorderRequestValidator [vtable] += 10 r@0x284e398 size=0 padding=0 size_without_padding=0 + source_path=third_party/container.c object_path=third_party/WebKit.a/ContiguousContainer.o + is_anonymous=0 name=chrome::mojom::FilePatcher::Name_ += 10 t@0x28d964 size=0 padding=0 size_without_padding=0 + source_path=base/page_allocator.cc object_path=base/base/page_allocator.o + is_anonymous=0 name=extFromUUseMapping + full_name=extFromUUseMapping(signed char, unsigned int, int) += 10 t@0x28d98a size=0 padding=0 size_without_padding=0 + source_path=base/page_allocator.cc object_path=base/base/page_allocator.o + is_anonymous=0 name=extFromUUseMapping + full_name=extFromUUseMapping(aj, int) += 10 d@0x2de7000 size=0 padding=0 size_without_padding=0 + source_path=base/page_allocator.cc object_path=base/base/page_allocator.o + is_anonymous=0 name=google::protobuf::internal::pLinuxKernelCmpxchg += 10 d@0x2de7004 size=0 padding=0 size_without_padding=0 + source_path=third_party/container.c object_path=third_party/WebKit.a/ContiguousContainer.o + is_anonymous=0 name=google::protobuf::internal::pLinuxKernelMemoryBarrier += 10 r@0x28f3450 size=0 padding=0 size_without_padding=0 + source_path=third_party/paint.cc object_path=third_party/WebKit.a/PaintChunker.o + is_anonymous=1 name=kAnimationFrameTimeHistogramClassPath += 10 d@0x2cd8550 size=0 padding=0 size_without_padding=0 + source_path=base/page_allocator.cc object_path=base/base/page_allocator.o + is_anonymous=0 name=kMethodsAnimationFrameTimeHistogram += 10 d@0x2cd84f0 size=0 padding=0 size_without_padding=0 + source_path= object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o + is_anonymous=1 name=kSystemClassPrefixes += 10 d@0x2cd8538 size=0 padding=0 size_without_padding=0 + source_path=base/page_allocator.cc object_path=base/base/page_allocator.o + is_anonymous=0 name=mojo::MessageReceiver [vtable] += 10 d@0x2de7008 size=0 padding=0 size_without_padding=0 + source_path=third_party/container.c object_path=third_party/WebKit.a/ContiguousContainer.o + is_anonymous=0 name=rel._ZN4base7androidL22kBaseRegisteredMethodsE += 10 d@0x2de70a4 size=0 padding=0 size_without_padding=0 + source_path=third_party/container.c object_path=third_party/WebKit.a/ContiguousContainer.o + is_anonymous=0 name=rel.local._ZN4base7android12_GLOBAL__N_124g_library_version_numberE += 10 t@0x28f1c8 size=0 padding=0 size_without_padding=0 + source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o + is_anonymous=0 name=startup._GLOBAL__sub_I_SkDeviceProfile.cpp += 10 t@0x28f1e0 size=0 padding=0 size_without_padding=0 + source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o + is_anonymous=0 name=startup._GLOBAL__sub_I_SkDiscardableMemoryPool.cpp += 10 t@0x28d910 size=0 padding=0 size_without_padding=0 + source_path=base/page_allocator.cc object_path=base/base/page_allocator.o + is_anonymous=0 name=startup._GLOBAL__sub_I_bbr_sender.cc += 10 t@0x28d948 size=0 padding=0 size_without_padding=0 + source_path=base/page_allocator.cc object_path=base/base/page_allocator.o + is_anonymous=0 name=startup._GLOBAL__sub_I_pacing_sender.cc += 10 t@0x28f000 size=0 padding=0 size_without_padding=0 + source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o + is_anonymous=0 name=ucnv_extMatchFromU + full_name=ucnv_extMatchFromU(int const*, int, unsigned short const*, int, unsigned short const*, int, unsigned int*, signed char, signed char) ++ 10 b@0x0 size=262144 padding=0 size_without_padding=262144 + source_path=third_party/fft_float.cc object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o + is_anonymous=0 name=ff_cos_131072 ++ 10 b@0x0 size=131072 padding=0 size_without_padding=131072 + source_path=third_party/fft_fixed.cc object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_fixed.o + is_anonymous=0 name=ff_cos_131072_fixed +- 10 b@0x2dffe80 size=-200 padding=-196 size_without_padding=-4 + source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o + is_anonymous=0 name=SaveHistogram::atomic_histogram_pointer + full_name=SaveHistogram(_JNIEnv*, base::android::JavaParamRef<_jobject*> const&, base::android::JavaParamRef<_jstring*> const&, base::android::JavaParamRef<_jlongArray*> const&, int)::atomic_histogram_pointer +- 10 b@0x2dffda0 size=-28 padding=0 size_without_padding=-28 + source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o + is_anonymous=0 name=g_chrome_content_browser_client +- 10 b@0x2dffe84 size=-4 padding=0 size_without_padding=-4 + source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o + is_anonymous=1 name=g_AnimationFrameTimeHistogram_clazz += 10 b@0x0 size=0 padding=0 size_without_padding=0 + source_path=third_party/fft_float.cc object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o + is_anonymous=0 name=ff_cos_65536
diff --git a/tools/binary_size/libsupersize/testdata/Archive.golden b/tools/binary_size/libsupersize/testdata/Archive.golden new file mode 100644 index 0000000..e44faea --- /dev/null +++ b/tools/binary_size/libsupersize/testdata/Archive.golden
@@ -0,0 +1,46 @@ +Section r has 44.6% of 2641540 bytes accounted for from 7 symbols. 3286112 bytes are unaccounted for. Padding accounts for 366 bytes ++ Without 2 merge sections and 0 anonymous entries (accounting for 2641394 bytes): ++ Section r has 0.0% of 146 bytes accounted for from 5 symbols. 5927506 bytes are unaccounted for. Padding accounts for 14 bytes +Section b has 0.0% of 0 bytes accounted for from 6 symbols. 1300456 bytes are unaccounted for. Padding accounts for 196 bytes +Section d has 0.0% of 388 bytes accounted for from 13 symbols. 1956628 bytes are unaccounted for. Padding accounts for 0 bytes +Section t has 0.0% of 10578 bytes accounted for from 14 symbols. 35890134 bytes are unaccounted for. Padding accounts for 9774 bytes ++ Without 2 merge sections and 0 anonymous entries (accounting for 9758 bytes): ++ Section t has 0.0% of 820 bytes accounted for from 12 symbols. 35899892 bytes are unaccounted for. Padding accounts for 16 bytes +.bss@0(size_without_padding=262144,padding=0,name=ff_cos_131072,path=third_party/fft_float.cc,anon=0) +.bss@0(size_without_padding=131072,padding=0,name=ff_cos_131072_fixed,path=third_party/fft_fixed.cc,anon=0) +.bss@0(size_without_padding=131072,padding=0,name=ff_cos_65536,path=third_party/fft_float.cc,anon=0) +.bss@2dffda0(size_without_padding=28,padding=0,name=g_chrome_content_browser_client,path=third_party/icu/ucnv_ext.c,anon=0) +.bss@2dffe80(size_without_padding=4,padding=196,name=SaveHistogram::atomic_histogram_pointer,path=third_party/icu/ucnv_ext.c,anon=0) +.bss@2dffe84(size_without_padding=4,padding=0,name=g_AnimationFrameTimeHistogram_clazz,path=third_party/icu/ucnv_ext.c,anon=1) +.data@2de7000(size_without_padding=4,padding=0,name=google::protobuf::internal::pLinuxKernelCmpxchg,path=base/page_allocator.cc,anon=0) +.data@2de7004(size_without_padding=4,padding=0,name=google::protobuf::internal::pLinuxKernelMemoryBarrier,path=third_party/container.c,anon=0) +.data@2de7008(size_without_padding=152,padding=0,name=rel._ZN4base7androidL22kBaseRegisteredMethodsE,path=third_party/container.c,anon=0) +.data@2de70a0(size_without_padding=4,padding=0,name=base::android::g_renderer_histogram_code,path=third_party/container.c,anon=1) +.data@2de70a4(size_without_padding=4,padding=0,name=rel.local._ZN4base7android12_GLOBAL__N_124g_library_version_numberE,path=third_party/container.c,anon=0) +.data.rel.ro@2cd8500(size_without_padding=56,padding=0,name=ChromeMainDelegateAndroid [vtable],path=third_party/paint.cc,anon=0) +.data.rel.ro@2cd8538(size_without_padding=24,padding=0,name=mojo::MessageReceiver [vtable],path=base/page_allocator.cc,anon=0) +.data.rel.ro@2cd8550(size_without_padding=12,padding=0,name=kMethodsAnimationFrameTimeHistogram,path=base/page_allocator.cc,anon=0) +.data.rel.ro.local@2c176f0(size_without_padding=56,padding=0,name=ChromeMainDelegate [vtable],path=third_party/icu/ucnv_ext.c,anon=0) +.data.rel.ro.local@2c17728(size_without_padding=24,padding=0,name=chrome::mojom::FieldTrialRecorderRequestValidator [vtable],path=third_party/icu/ucnv_ext.c,anon=0) +.data.rel.ro.local@2c17740(size_without_padding=24,padding=0,name=chrome::mojom::FieldTrialRecorderProxy [vtable],path=third_party/container.c,anon=0) +.data.rel.ro.local@2cd84e0(size_without_padding=16,padding=0,name=.Lswitch.table.45,path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o,anon=0) +.data.rel.ro.local@2cd84f0(size_without_padding=8,padding=0,name=kSystemClassPrefixes,path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o,anon=1) +Group(name=** merge strings,count=2,size=2641394) +.rodata@284e364(size_without_padding=8,padding=3,name=,path=base/page_allocator.cc,anon=0) +.rodata@284e370(size_without_padding=40,padding=4,name=Name,path=base/page_allocator.cc,anon=0) +.rodata@284e398(size_without_padding=32,padding=0,name=chrome::mojom::FilePatcher::Name_,path=third_party/container.c,anon=0) +.rodata@28f3450(size_without_padding=48,padding=7,name=kAnimationFrameTimeHistogramClassPath,path=third_party/paint.cc,anon=1) +.rodata@28f3480(size_without_padding=4,padding=0,name=blink::CSSValueKeywordsHash::findValueImpl::value_word_list,path=third_party/paint.cc,anon=1) +.text@28d900(size_without_padding=16,padding=0,name=startup._GLOBAL__sub_I_page_allocator.cc,path=base/page_allocator.cc,anon=0) +.text@28d910(size_without_padding=56,padding=0,name=startup._GLOBAL__sub_I_bbr_sender.cc,path=base/page_allocator.cc,anon=0) +.text@28d948(size_without_padding=28,padding=0,name=startup._GLOBAL__sub_I_pacing_sender.cc,path=base/page_allocator.cc,anon=0) +.text@28d964(size_without_padding=38,padding=0,name=extFromUUseMapping,path=base/page_allocator.cc,anon=0) +.text@28d98a(size_without_padding=32,padding=0,name=extFromUUseMapping,path=base/page_allocator.cc,anon=0) +Group(name=** symbol gaps,count=2,size=9758) +.text@28f000(size_without_padding=448,padding=0,name=ucnv_extMatchFromU,path=third_party/icu/ucnv_ext.c,anon=0) +.text@28f1c8(size_without_padding=20,padding=8,name=startup._GLOBAL__sub_I_SkDeviceProfile.cpp,path=third_party/icu/ucnv_ext.c,anon=0) +.text@28f1e0(size_without_padding=20,padding=4,name=startup._GLOBAL__sub_I_SkDiscardableMemoryPool.cpp,path=third_party/icu/ucnv_ext.c,anon=0) +.text@2a0000(size_without_padding=16,padding=0,name=blink::ContiguousContainerBase::shrinkToFit,path=third_party/paint.cc,anon=0) +.text@2a0010(size_without_padding=12,padding=0,name=blink::ContiguousContainerBase::shrinkToFit [clone .part.1234] [clone .isra.2],path=third_party/paint.cc,anon=0) +.text@2a0020(size_without_padding=24,padding=4,name=blink::ContiguousContainerBase::ContiguousContainerBase,path=third_party/container.c,anon=0) +.text@2a1000(size_without_padding=94,padding=0,name=blink::PaintChunker::releasePaintChunks [clone .part.1],path=third_party/container.c,anon=1)
diff --git a/tools/binary_size/libsupersize/testdata/Console.golden b/tools/binary_size/libsupersize/testdata/Console.golden new file mode 100644 index 0000000..1fd39ebd --- /dev/null +++ b/tools/binary_size/libsupersize/testdata/Console.golden
@@ -0,0 +1,116 @@ +# Show pydoc for main types: +import models +help(models) + +# Show all attributes of all symbols & per-section totals: +Print(size_info, verbose=True) + +# Show two levels of .text, grouped by first two subdirectories +text_syms = size_info.symbols.WhereInSection("t") +by_path = text_syms.GroupBySourcePath(depth=2) +Print(by_path.WhereBiggerThan(1024)) + +# Show all non-vtable generated symbols +generated_syms = size_info.symbols.WhereIsGenerated() +Print(generated_syms.WhereNameMatches(r"vtable").Inverted()) + +# Show all symbols that have "print" in their name or path, except +# those within components/. +# Note: Could have also used Inverted(), as above. +# Note: Use "help(ExpandRegex)" for more about what {{_print_}} does. +print_syms = size_info.symbols.WhereMatches(r"{{_print_}}") +Print(print_syms - print_syms.WherePathMatches(r"^components/")) + +# Diff two .size files and save result to a file: +Print(Diff(size_info1, size_info2), to_file="output.txt") + +Metadata: + +Section Sizes (Total=43,785,380 bytes): + .bss: 1,300,456 bytes (not included in totals) + .data: 101,768 bytes (0.2%) + .data.rel.ro: 1,065,224 bytes (2.4%) + .data.rel.ro.local: 790,024 bytes (1.8%) + .rodata: 5,927,652 bytes (13.5%) + .text: 35,900,712 bytes (82.0%) + +Showing 38 symbols with total size: 2652506 bytes +.text=10.3kb .rodata=2.52mb other=388 bytes total=2.53mb +Number of object files: 10 + +First columns are: running total, type, size + 2641394 r@Group 2641394 {no path} + ** merge strings (count=2) + 2651152 t@Group 9758 {no path} + ** symbol gaps (count=2) + 2651600 t@0x28f000 448 third_party/icu/ucnv_ext.c + ucnv_extMatchFromU + 2651752 d@0x2de7008 152 third_party/container.c + rel._ZN4base7androidL22kBaseRegisteredMethodsE + 2651846 t@0x2a1000 94 third_party/container.c + blink::PaintChunker::releasePaintChunks [clone .part.1] + 2651902 d@0x2c176f0 56 third_party/icu/ucnv_ext.c + ChromeMainDelegate [vtable] + 2651958 d@0x2cd8500 56 third_party/paint.cc + ChromeMainDelegateAndroid [vtable] + 2652014 t@0x28d910 56 base/page_allocator.cc + startup._GLOBAL__sub_I_bbr_sender.cc + 2652069 r@0x28f3450 55 third_party/paint.cc + kAnimationFrameTimeHistogramClassPath + 2652113 r@0x284e370 44 base/page_allocator.cc + Name + 2652151 t@0x28d964 38 base/page_allocator.cc + extFromUUseMapping + 2652183 r@0x284e398 32 third_party/container.c + chrome::mojom::FilePatcher::Name_ + 2652215 t@0x28d98a 32 base/page_allocator.cc + extFromUUseMapping + 2652243 t@0x2a0020 28 third_party/container.c + blink::ContiguousContainerBase::ContiguousContainerBase + 2652271 t@0x28f1c8 28 third_party/icu/ucnv_ext.c + startup._GLOBAL__sub_I_SkDeviceProfile.cpp + 2652299 t@0x28d948 28 base/page_allocator.cc + startup._GLOBAL__sub_I_pacing_sender.cc + 2652323 d@0x2c17740 24 third_party/container.c + chrome::mojom::FieldTrialRecorderProxy [vtable] + 2652347 d@0x2c17728 24 third_party/icu/ucnv_ext.c + chrome::mojom::FieldTrialRecorderRequestValidator [vtable] + 2652371 d@0x2cd8538 24 base/page_allocator.cc + mojo::MessageReceiver [vtable] + 2652395 t@0x28f1e0 24 third_party/icu/ucnv_ext.c + startup._GLOBAL__sub_I_SkDiscardableMemoryPool.cpp + 2652411 d@0x2cd84e0 16 third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o + .Lswitch.table.45 + 2652427 t@0x2a0000 16 third_party/paint.cc + blink::ContiguousContainerBase::shrinkToFit + 2652443 t@0x28d900 16 base/page_allocator.cc + startup._GLOBAL__sub_I_page_allocator.cc + 2652455 t@0x2a0010 12 third_party/paint.cc + blink::ContiguousContainerBase::shrinkToFit [clone .part.1234] [clone .isra.2] + 2652467 d@0x2cd8550 12 base/page_allocator.cc + kMethodsAnimationFrameTimeHistogram + 2652478 r@0x284e364 11 base/page_allocator.cc + 2652486 d@0x2cd84f0 8 third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o + kSystemClassPrefixes + 2652490 d@0x2de70a0 4 third_party/container.c + base::android::g_renderer_histogram_code + 2652494 r@0x28f3480 4 third_party/paint.cc + blink::CSSValueKeywordsHash::findValueImpl::value_word_list + 2652498 d@0x2de7000 4 base/page_allocator.cc + google::protobuf::internal::pLinuxKernelCmpxchg + 2652502 d@0x2de7004 4 third_party/container.c + google::protobuf::internal::pLinuxKernelMemoryBarrier + 2652506 d@0x2de70a4 4 third_party/container.c + rel.local._ZN4base7android12_GLOBAL__N_124g_library_version_numberE + 2652506 b@0x0 262144 third_party/fft_float.cc + ff_cos_131072 + 2652506 b@0x0 131072 third_party/fft_fixed.cc + ff_cos_131072_fixed + 2652506 b@0x0 131072 third_party/fft_float.cc + ff_cos_65536 + 2652506 b@0x2dffe80 200 third_party/icu/ucnv_ext.c + SaveHistogram::atomic_histogram_pointer + 2652506 b@0x2dffda0 28 third_party/icu/ucnv_ext.c + g_chrome_content_browser_client + 2652506 b@0x2dffe84 4 third_party/icu/ucnv_ext.c + g_AnimationFrameTimeHistogram_clazz
diff --git a/tools/binary_size/libsupersize/testdata/Diff_NullDiff.golden b/tools/binary_size/libsupersize/testdata/Diff_NullDiff.golden new file mode 100644 index 0000000..4e420427 --- /dev/null +++ b/tools/binary_size/libsupersize/testdata/Diff_NullDiff.golden
@@ -0,0 +1,20 @@ +Common Metadata: +Old Metadata: +New Metadata: + +Section Sizes (Total=0 bytes): + .bss: 0 bytes (not included in totals) + .data: 0 bytes (0.0%) + .data.rel.ro: 0 bytes (0.0%) + .data.rel.ro.local: 0 bytes (0.0%) + .rodata: 0 bytes (0.0%) + .text: 0 bytes (0.0%) + +0 symbols added (+), 0 changed (~), 0 removed (-), 38 unchanged (not shown) +0 object files added, 0 removed + +Showing 0 symbols with total size: 0 bytes +.text=0 bytes .rodata=0 bytes other=0 bytes total=0 bytes +Number of object files: 0 + +First columns are: running total, type, size
diff --git a/tools/binary_size/libsupersize/testdata/FullDescription.golden b/tools/binary_size/libsupersize/testdata/FullDescription.golden new file mode 100644 index 0000000..1b61c38b4 --- /dev/null +++ b/tools/binary_size/libsupersize/testdata/FullDescription.golden
@@ -0,0 +1,90 @@ +Metadata: + +Section Sizes (Total=43,785,380 bytes): + .bss: 1,300,456 bytes (not included in totals) + .data: 101,768 bytes (0.2%) + .data.rel.ro: 1,065,224 bytes (2.4%) + .data.rel.ro.local: 790,024 bytes (1.8%) + .rodata: 5,927,652 bytes (13.5%) + .text: 35,900,712 bytes (82.0%) + +Showing 38 symbols with total size: 2652506 bytes +.text=10.3kb .rodata=2.52mb other=388 bytes total=2.53mb +Number of object files: 10 + +First columns are: running total, type, size + 2641394 r@Group 2641394 {no path} + ** merge strings (count=2) + 2651152 t@Group 9758 {no path} + ** symbol gaps (count=2) + 2651600 t@0x28f000 448 third_party/icu/ucnv_ext.c + ucnv_extMatchFromU + 2651752 d@0x2de7008 152 third_party/container.c + rel._ZN4base7androidL22kBaseRegisteredMethodsE + 2651846 t@0x2a1000 94 third_party/container.c + blink::PaintChunker::releasePaintChunks [clone .part.1] + 2651902 d@0x2c176f0 56 third_party/icu/ucnv_ext.c + ChromeMainDelegate [vtable] + 2651958 d@0x2cd8500 56 third_party/paint.cc + ChromeMainDelegateAndroid [vtable] + 2652014 t@0x28d910 56 base/page_allocator.cc + startup._GLOBAL__sub_I_bbr_sender.cc + 2652069 r@0x28f3450 55 third_party/paint.cc + kAnimationFrameTimeHistogramClassPath + 2652113 r@0x284e370 44 base/page_allocator.cc + Name + 2652151 t@0x28d964 38 base/page_allocator.cc + extFromUUseMapping + 2652183 r@0x284e398 32 third_party/container.c + chrome::mojom::FilePatcher::Name_ + 2652215 t@0x28d98a 32 base/page_allocator.cc + extFromUUseMapping + 2652243 t@0x2a0020 28 third_party/container.c + blink::ContiguousContainerBase::ContiguousContainerBase + 2652271 t@0x28f1c8 28 third_party/icu/ucnv_ext.c + startup._GLOBAL__sub_I_SkDeviceProfile.cpp + 2652299 t@0x28d948 28 base/page_allocator.cc + startup._GLOBAL__sub_I_pacing_sender.cc + 2652323 d@0x2c17740 24 third_party/container.c + chrome::mojom::FieldTrialRecorderProxy [vtable] + 2652347 d@0x2c17728 24 third_party/icu/ucnv_ext.c + chrome::mojom::FieldTrialRecorderRequestValidator [vtable] + 2652371 d@0x2cd8538 24 base/page_allocator.cc + mojo::MessageReceiver [vtable] + 2652395 t@0x28f1e0 24 third_party/icu/ucnv_ext.c + startup._GLOBAL__sub_I_SkDiscardableMemoryPool.cpp + 2652411 d@0x2cd84e0 16 third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o + .Lswitch.table.45 + 2652427 t@0x2a0000 16 third_party/paint.cc + blink::ContiguousContainerBase::shrinkToFit + 2652443 t@0x28d900 16 base/page_allocator.cc + startup._GLOBAL__sub_I_page_allocator.cc + 2652455 t@0x2a0010 12 third_party/paint.cc + blink::ContiguousContainerBase::shrinkToFit [clone .part.1234] [clone .isra.2] + 2652467 d@0x2cd8550 12 base/page_allocator.cc + kMethodsAnimationFrameTimeHistogram + 2652478 r@0x284e364 11 base/page_allocator.cc + 2652486 d@0x2cd84f0 8 third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o + kSystemClassPrefixes + 2652490 d@0x2de70a0 4 third_party/container.c + base::android::g_renderer_histogram_code + 2652494 r@0x28f3480 4 third_party/paint.cc + blink::CSSValueKeywordsHash::findValueImpl::value_word_list + 2652498 d@0x2de7000 4 base/page_allocator.cc + google::protobuf::internal::pLinuxKernelCmpxchg + 2652502 d@0x2de7004 4 third_party/container.c + google::protobuf::internal::pLinuxKernelMemoryBarrier + 2652506 d@0x2de70a4 4 third_party/container.c + rel.local._ZN4base7android12_GLOBAL__N_124g_library_version_numberE + 2652506 b@0x0 262144 third_party/fft_float.cc + ff_cos_131072 + 2652506 b@0x0 131072 third_party/fft_fixed.cc + ff_cos_131072_fixed + 2652506 b@0x0 131072 third_party/fft_float.cc + ff_cos_65536 + 2652506 b@0x2dffe80 200 third_party/icu/ucnv_ext.c + SaveHistogram::atomic_histogram_pointer + 2652506 b@0x2dffda0 28 third_party/icu/ucnv_ext.c + g_chrome_content_browser_client + 2652506 b@0x2dffe84 4 third_party/icu/ucnv_ext.c + g_AnimationFrameTimeHistogram_clazz
diff --git a/tools/binary_size/libsupersize/testdata/SymbolGroupMethods.golden b/tools/binary_size/libsupersize/testdata/SymbolGroupMethods.golden new file mode 100644 index 0000000..1ec51c4 --- /dev/null +++ b/tools/binary_size/libsupersize/testdata/SymbolGroupMethods.golden
@@ -0,0 +1,85 @@ +GroupByNamespace() +Showing 10 symbols with total size: 2652506 bytes +.text=0 bytes .rodata=0 bytes other=2.53mb total=2.53mb +Number of object files: 5 + +First columns are: running total, type, size + 2652236 *@Group 2652236 {no path} + {global} (count=25) + 2652330 *@Group 94 third_party/container.c + blink::PaintChunker (count=1) + 2652386 *@Group 56 {no path} + blink::ContiguousContainerBase (count=3) + 2652434 *@Group 48 {no path} + chrome::mojom (count=2) + 2652466 *@Group 32 third_party/container.c + chrome::mojom::FilePatcher (count=1) + 2652490 *@Group 24 base/page_allocator.cc + mojo (count=1) + 2652498 *@Group 8 {no path} + google::protobuf::internal (count=2) + 2652502 *@Group 4 third_party/container.c + base::android (count=1) + 2652506 *@Group 4 third_party/paint.cc + blink::CSSValueKeywordsHash::findValueImpl (count=1) + 2652506 *@Group 0 third_party/icu/ucnv_ext.c + SaveHistogram (count=1) +GroupByNamespace(depth=1) +Showing 7 symbols with total size: 2652506 bytes +.text=0 bytes .rodata=0 bytes other=2.53mb total=2.53mb +Number of object files: 4 + +First columns are: running total, type, size + 2652236 *@Group 2652236 {no path} + {global} (count=25) + 2652390 *@Group 154 {no path} + blink (count=5) + 2652470 *@Group 80 {no path} + chrome (count=3) + 2652494 *@Group 24 base/page_allocator.cc + mojo (count=1) + 2652502 *@Group 8 {no path} + google (count=2) + 2652506 *@Group 4 third_party/container.c + base (count=1) + 2652506 *@Group 0 third_party/icu/ucnv_ext.c + SaveHistogram (count=1) +GroupByNamespace(depth=1, fallback=None) +Showing 7 symbols with total size: 2652506 bytes +.text=0 bytes .rodata=0 bytes other=2.53mb total=2.53mb +Number of object files: 4 + +First columns are: running total, type, size + 2652236 *@Group 2652236 {no path} + 2652390 *@Group 154 {no path} + blink (count=5) + 2652470 *@Group 80 {no path} + chrome (count=3) + 2652494 *@Group 24 base/page_allocator.cc + mojo (count=1) + 2652502 *@Group 8 {no path} + google (count=2) + 2652506 *@Group 4 third_party/container.c + base (count=1) + 2652506 *@Group 0 third_party/icu/ucnv_ext.c + SaveHistogram (count=1) +GroupByNamespace(depth=1, min_count=2) +Showing 7 symbols with total size: 2652506 bytes +.text=0 bytes .rodata=0 bytes other=2.53mb total=2.53mb +Number of object files: 4 + +First columns are: running total, type, size + 2652236 *@Group 2652236 {no path} + {global} (count=25) + 2652390 *@Group 154 {no path} + blink (count=5) + 2652470 *@Group 80 {no path} + chrome (count=3) + 2652494 d@0x2cd8538 24 base/page_allocator.cc + mojo::MessageReceiver [vtable] + 2652502 *@Group 8 {no path} + google (count=2) + 2652506 d@0x2de70a0 4 third_party/container.c + base::android::g_renderer_histogram_code + 2652506 b@0x2dffe80 200 third_party/icu/ucnv_ext.c + SaveHistogram::atomic_histogram_pointer
diff --git a/tools/binary_size/libsupersize/testdata/build.ninja b/tools/binary_size/libsupersize/testdata/build.ninja new file mode 100644 index 0000000..db874a49 --- /dev/null +++ b/tools/binary_size/libsupersize/testdata/build.ninja
@@ -0,0 +1,8 @@ +subninja sub.ninja + +build obj/third_party/icu/icuuc/ucnv_ext.o: cxx gen/third_party/icu/ucnv_ext.c || obj/foo.inputdeps.stamp +build obj/base/base/page_allocator.o: rule ../../base/page_allocator.cc +build obj/third_party/sub/fft_float.o: rule ../../third_party/fft_float.cc +build obj/third_party/sub/fft_fixed.o: rule ../../third_party/fft_fixed.cc +build obj/third_party/sub/ContiguousContainer.o: rule ../../third_party/container.c +build obj/third_party/sub/PaintChunker.o: rule ../../third_party/paint.cc
diff --git a/tools/binary_size/libsupersize/testdata/sub.ninja b/tools/binary_size/libsupersize/testdata/sub.ninja new file mode 100644 index 0000000..ea672e5 --- /dev/null +++ b/tools/binary_size/libsupersize/testdata/sub.ninja
@@ -0,0 +1,2 @@ +build obj/third_party/ffmpeg/libffmpeg_internal.a: alink obj/third_party/sub/fft_fixed.o obj/third_party/sub/fft_float.o | bar +build obj/third_party/WebKit.a: alink obj/third_party/sub/PaintChunker.o obj/third_party/sub/ContiguousContainer.o
diff --git a/tools/binary_size/libsupersize/testdata/test.map b/tools/binary_size/libsupersize/testdata/test.map new file mode 100644 index 0000000..13c5e11 --- /dev/null +++ b/tools/binary_size/libsupersize/testdata/test.map
@@ -0,0 +1,259 @@ +Archive member included because of file (symbol) + +obj/chrome/browser/libbrowser.a(about_flags.o) + --whole-archive + +Allocating common symbols +Common symbol size file + +ff_cos_131072 0x40000 obj/third_party/ffmpeg/libffmpeg_internal.a(fft_float.o) +ff_cos_131072_fixed + 0x20000 obj/third_party/ffmpeg/libffmpeg_internal.a(fft_fixed.o) +ff_cos_65536 0x20000 obj/third_party/ffmpeg/libffmpeg_internal.a(fft_float.o) + +Discarded input sections + + .text 0x00000000 0x0 obj/chrome/android/chrome/chrome_main_delegate_android_initializer.o + .data 0x00000000 0x0 obj/chrome/android/chrome/chrome_main_delegate_android_initializer.o + .bss 0x00000000 0x0 obj/chrome/android/chrome/chrome_main_delegate_android_initializer.o + .ARM.extab.text._ZN25ChromeMainDelegateAndroid6CreateEv + 0x00000000 0x0 obj/chrome/android/chrome/chrome_main_delegate_android_initializer.o + .note.GNU-stack + 0x00000000 0x0 obj/chrome/android/chrome/chrome_main_delegate_android_initializer.o + +Memory map + + ** file header + 0x00000000 0x34 + ** segment headers + 0x00000034 0x120 + +.interp 0x00000154 0x13 + ** fill 0x00000154 0x13 + +.note.gnu.build-id + 0x00000168 0x24 + ** note header + 0x00000168 0x10 + ** zero fill 0x00000178 0x14 + +.dynsym 0x0000018c 0x1960 + ** dynsym 0x0000018c 0x1960 + +.dynstr 0x00001aec 0xfb9 + ** string table + 0x00001aec 0xfb9 + +.hash 0x00002aa8 0xa7c + ** hash 0x00002aa8 0xa7c + +.gnu.version 0x00003524 0x32c + ** versions 0x00003524 0x32c + +.gnu.version_d 0x00003850 0x1c + ** version defs + 0x00003850 0x1c + +.gnu.version_r 0x0000386c 0x60 + ** version refs + 0x0000386c 0x60 + +.rel.dyn 0x000038cc 0x288498 + ** dynamic relocs + 0x000038cc 0x288498 + ** dynamic relocs + 0x0028bd64 0x0 + +.rel.plt 0x0028bd64 0xb00 + ** dynamic relocs + 0x0028bd64 0xb00 + +.plt 0x0028c864 0x1094 + ** PLT 0x0028c864 0x1094 + +.text 0x0028d900 0x223cd28 + .text.startup._GLOBAL__sub_I_page_allocator.cc + 0x0028d900 0x10 obj/base/base/page_allocator.o + .text.startup._GLOBAL__sub_I_bbr_sender.cc + 0x0028d910 0x38 obj/base/base/page_allocator.o + ** fill 0x0028d948 0xa + .text.startup._GLOBAL__sub_I_pacing_sender.cc + 0x0028d948 0x1c obj/base/base/page_allocator.o + .text._ZL18extFromUUseMappingaji + 0xffffffffffffffff 0x26 obj/base/base/page_allocator.o + .text._ZL18extFromUUseMapping2aji + 0xffffffffffffffff 0x20 obj/base/base/page_allocator.o + .text._ZL18ucnv_extMatchFromUPKiiPKtiS2_iPjaa + 0x0028f000 0x1c0 obj/third_party/icu/icuuc/ucnv_ext.o + .text.startup._GLOBAL__sub_I_SkDeviceProfile.cpp + 0x0028f1c8 0x14 obj/third_party/icu/icuuc/ucnv_ext.o + .text.startup._GLOBAL__sub_I_SkDiscardableMemoryPool.cpp + 0x0028f1e0 0x14 obj/third_party/icu/icuuc/ucnv_ext.o + .text._ZN5blink23ContiguousContainerBase11shrinkToFitEv + 0x002a0000 0x10 obj/third_party/WebKit.a(PaintChunker.o) + 0x002a0001 blink::ContiguousContainerBase::shrinkToFit() + .text._ZN5blink23ContiguousContainerBase11shrinkToFitEv2 + 0x002a0010 0xc obj/third_party/WebKit.a(PaintChunker.o) + 0x002a0011 blink::ContiguousContainerBase::shrinkToFit() [clone .part.1234] [clone .isra.2] + .text._ZN5blink23ContiguousContainerBaseC2EOS0_ + 0xffffffffffffffff 0x18 obj/third_party/WebKit.a(ContiguousContainer.o) + 0x002a0021 blink::ContiguousContainerBase::ContiguousContainerBase(blink::ContiguousContainerBase&&) + 0x002a0021 blink::ContiguousContainerBase::ContiguousContainerBase(blink::ContiguousContainerBase&&) + .text._ZN5blink12PaintChunker18releasePaintChunksEv + 0x002a1000 0x5e obj/third_party/WebKit.a(ContiguousContainer.o) + 0x002a1001 (anonymous namespace)::blink::PaintChunker::releasePaintChunks() [clone .part.1] + +.ARM.exidx 0x024ca628 0x1771c8 + .ARM.exidx.text.startup._GLOBAL__sub_I_page_allocator.cc + 0x024ca628 0x8 obj/base/base/page_allocator.o + +.ARM.extab 0x026417f0 0x2cd50 + .ARM.extab.text._ZN7android15OnJNIOnLoadInitEv + 0x026417f0 0xc obj/chrome/chrome_android_core/chrome_jni_onload.o + +.rodata 0x0266e600 0x5a72e4 + ** merge strings + 0x0266e600 0x1dfd61 + .rodata 0x0284e364 0x8 obj/base/base/page_allocator.o + .rodata.Name + 0x0284e370 0x28 obj/base/base/page_allocator.o + 0x0284e370 Name + .rodata._ZN6chrome5mojom11FilePatcher5Name_E + 0x0284e398 0x20 obj/third_party/WebKit.a(ContiguousContainer.o) + 0x0284e398 chrome::mojom::FilePatcher::Name_ + ** merge strings + 0x0284e518 0xa4f31 + .rodata._ZN12_GLOBAL__N_1L37kAnimationFrameTimeHistogramClassPathE + 0x028f3450 0x30 obj/third_party/WebKit.a(PaintChunker.o) + .rodata._ZZN5blink20CSSValueKeywordsHash13findValueImplEPKcjE15value_word_list + 0x028f3480 0x4 obj/third_party/WebKit.a(PaintChunker.o) + 0x028f3480 blink::(anonymous namespace)::CSSValueKeywordsHash::findValueImpl(char const*, unsigned int)::value_word_list + +.data.rel.ro.local + 0x02c176f0 0xc0e08 + .data.rel.ro.local._ZTV18ChromeMainDelegate + 0x02c176f0 0x38 obj/third_party/icu/icuuc/ucnv_ext.o + 0x02c176f0 vtable for ChromeMainDelegate + .data.rel.ro.local._ZTVN6chrome5mojom34FieldTrialRecorderRequestValidatorE + 0x02c17728 0x18 obj/third_party/icu/icuuc/ucnv_ext.o + 0x02c17728 vtable for chrome::mojom::FieldTrialRecorderRequestValidator + .data.rel.ro.local._ZTVN6chrome5mojom23FieldTrialRecorderProxyE + 0x02c17740 0x18 obj/third_party/WebKit.a(ContiguousContainer.o) + 0x02c17740 vtable for chrome::mojom::FieldTrialRecorderProxy + .data.rel.ro.local..Lswitch.table.45 + 0x02cd84e0 0x10 ../../third_party/gvr-android-sdk/libgvr_shim_static_arm.a(libcontroller_api_impl.a_controller_api_impl.o) + .data.rel.ro.local._ZN12_GLOBAL__N_1L20kSystemClassPrefixesE + 0x02cd84f0 0x8 ../../third_party/gvr-android-sdk/libgvr_shim_static_arm.a(libport_android_jni.a_jni_utils.o) + +.data.rel.ro 0x02cd8500 0x104108 + .data.rel.ro._ZTV25ChromeMainDelegateAndroid + 0x02cd8500 0x38 obj/third_party/WebKit.a(PaintChunker.o) + 0x02cd8500 vtable for ChromeMainDelegateAndroid + .data.rel.ro._ZTVN4mojo15MessageReceiverE + 0x02cd8538 0x18 obj/base/base/page_allocator.o + 0x02cd8538 vtable for mojo::MessageReceiver + .data.rel.ro._ZL35kMethodsAnimationFrameTimeHistogram + 0x02cd8550 0xc obj/base/base/page_allocator.o + +.init_array 0x02ddc608 0x8 + .init_array 0x02ddc608 0x4 obj/base/base/library_prefetcher.o + .init_array 0x02ddc60c 0x4 obj/base/base/page_allocator.o + +.fini_array 0x02ddc6f4 0x8 + .fini_array 0x02ddc6f4 0x4 ../../third_party/android_tools/ndk/platforms/android-16/arch-arm/usr/lib/crtbegin_so.o + .fini_array 0x02ddc6f8 0x4 ../../third_party/android_tools/ndk/platforms/android-16/arch-arm/usr/lib/crtend_so.o + +.dynamic 0x02ddc6fc 0x130 + ** dynamic 0x02ddc6fc 0x130 + +.got 0x02ddc834 0xa7cc + ** GOT 0x02ddc834 0xa240 + ** GOT PLT 0x02de6a74 0x58c + ** GOT IRELATIVE PLT + 0x02de7000 0x0 + +.data 0x02de7000 0x18d88 + .data._ZN6google8protobuf8internal19pLinuxKernelCmpxchgE + 0x02de7000 0x4 obj/base/base/page_allocator.o + 0x02de7000 google::protobuf::internal::pLinuxKernelCmpxchg + .data._ZN6google8protobuf8internal25pLinuxKernelMemoryBarrierE + 0x02de7004 0x4 obj/third_party/WebKit.a(ContiguousContainer.o) + 0x02de7004 google::protobuf::internal::pLinuxKernelMemoryBarrier + .data.rel._ZN4base7androidL22kBaseRegisteredMethodsE + 0x02de7008 0x98 obj/third_party/WebKit.a(ContiguousContainer.o) + .data._ZN4base7android12_GLOBAL__N_125g_renderer_histogram_codeE + 0x02de70a0 0x4 obj/third_party/WebKit.a(ContiguousContainer.o) + .data.rel.local._ZN4base7android12_GLOBAL__N_124g_library_version_numberE + 0x02de70a4 0x4 obj/third_party/WebKit.a(ContiguousContainer.o) + +.bss 0x02dffda0 0x13d7e8 + .bss.g_chrome_content_browser_client + 0x02dffda0 0x1c obj/third_party/icu/icuuc/ucnv_ext.o + 0x02dffda0 g_chrome_content_browser_client + .bss._ZZL13SaveHistogramP7_JNIEnvRKN4base7android12JavaParamRefIP8_jobjectEERKNS3_IP8_jstringEERKNS3_IP11_jlongArrayEEiE24atomic_histogram_pointer + 0x02dffe80 0x4 obj/third_party/icu/icuuc/ucnv_ext.o + .bss._ZN12_GLOBAL__N_135g_AnimationFrameTimeHistogram_clazzE + 0x02dffe84 0x4 obj/third_party/icu/icuuc/ucnv_ext.o + ** common 0x02e2fca0 0x10d8e8 + +.debug_info 0x00000000 0x81aee3a + .debug_info 0x00000000 0x41 obj/chrome/android/chrome/chrome_main_delegate_android_initializer.o + +.debug_abbrev 0x00000000 0xa79307 + .debug_abbrev 0x00000000 0x2f obj/chrome/android/chrome/chrome_main_delegate_android_initializer.o + +.debug_aranges 0x00000000 0x4a2a18 + .debug_aranges + 0x00000000 0x20 obj/chrome/android/chrome/chrome_main_delegate_android_initializer.o + +.debug_ranges 0x00000000 0x1dd3880 + .debug_ranges 0x00000000 0x10 obj/chrome/android/chrome/chrome_main_delegate_android_initializer.o + +.debug_line 0x00000000 0x37976e9 + .debug_line 0x00000000 0x7b obj/chrome/android/chrome/chrome_main_delegate_android_initializer.o + +.debug_str 0x00000000 0xf73136b + ** merge strings + 0x00000000 0xf73136b + +.debug_frame 0x00000000 0xfa0610 + .debug_frame 0x00000000 0x28 obj/chrome/android/chrome/chrome_main_delegate_android_initializer.o + +.comment 0x00000000 0x7f + ** merge strings + 0x00000000 0x7f + +.debug_loc 0x00000000 0x4fdb6 + .debug_loc 0x00000000 0x85 ../../third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_static.a(chrono.o) + +.debug_pubnames + 0x00000000 0x4165f + .debug_pubnames + 0x00000000 0xc42 ../../third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_static.a(chrono.o) + +.debug_pubtypes + 0x00000000 0x184f4 + .debug_pubtypes + 0x00000000 0xc74 ../../third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_static.a(chrono.o) + +.note.gnu.gold-version + 0x00000000 0x1c + ** note header + 0x00000000 0x10 + ** fill 0x00000010 0x9 + ** zero fill 0x00000019 0x3 + +.ARM.attributes + 0x00000000 0x3c + ** attributes 0x00000000 0x3c + +.symtab 0x00000000 0x105ef20 + ** symtab 0x00000000 0x105ef20 + +.strtab 0x00000000 0x213a4fe + ** string table + 0x00000000 0x213a4fe + +.shstrtab 0x00000000 0x1b4 + ** string table + 0x00000000 0x1b4
diff --git a/tools/binary_size/run_binary_size_analysis.py b/tools/binary_size/run_binary_size_analysis.py deleted file mode 100755 index 6bd111b..0000000 --- a/tools/binary_size/run_binary_size_analysis.py +++ /dev/null
@@ -1,679 +0,0 @@ -#!/usr/bin/env python -# Copyright 2014 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. - -"""Generate a spatial analysis against an arbitrary library. - -To use, build the 'binary_size_tool' target. Then run this tool, passing -in the location of the library to be analyzed along with any other options -you desire. -""" - -import collections -import json -import logging -import multiprocessing -import optparse -import os -import re -import shutil -import struct -import subprocess -import sys -import tempfile -import time - -import binary_size_utils - -# This path change is not beautiful. Temporary (I hope) measure until -# the chromium project has figured out a proper way to organize the -# library of python tools. http://crbug.com/375725 -elf_symbolizer_path = os.path.abspath(os.path.join( - os.path.dirname(__file__), - '..', - '..', - 'build', - 'android', - 'pylib')) -sys.path.append(elf_symbolizer_path) -import symbols.elf_symbolizer as elf_symbolizer # pylint: disable=F0401 - - -# Node dictionary keys. These are output in json read by the webapp so -# keep them short to save file size. -# Note: If these change, the webapp must also change. -NODE_TYPE_KEY = 'k' -NODE_NAME_KEY = 'n' -NODE_CHILDREN_KEY = 'children' -NODE_SYMBOL_TYPE_KEY = 't' -NODE_SYMBOL_SIZE_KEY = 'value' -NODE_MAX_DEPTH_KEY = 'maxDepth' -NODE_LAST_PATH_ELEMENT_KEY = 'lastPathElement' - -# The display name of the bucket where we put symbols without path. -NAME_NO_PATH_BUCKET = '(No Path)' - -# Try to keep data buckets smaller than this to avoid killing the -# graphing lib. -BIG_BUCKET_LIMIT = 3000 - - -def _MkChild(node, name): - child = node[NODE_CHILDREN_KEY].get(name) - if child is None: - child = {NODE_NAME_KEY: name, - NODE_CHILDREN_KEY: {}} - node[NODE_CHILDREN_KEY][name] = child - return child - - - -def SplitNoPathBucket(node): - """NAME_NO_PATH_BUCKET can be too large for the graphing lib to - handle. Split it into sub-buckets in that case.""" - root_children = node[NODE_CHILDREN_KEY] - if NAME_NO_PATH_BUCKET in root_children: - no_path_bucket = root_children[NAME_NO_PATH_BUCKET] - old_children = no_path_bucket[NODE_CHILDREN_KEY] - count = 0 - for symbol_type, symbol_bucket in old_children.iteritems(): - count += len(symbol_bucket[NODE_CHILDREN_KEY]) - if count > BIG_BUCKET_LIMIT: - new_children = {} - no_path_bucket[NODE_CHILDREN_KEY] = new_children - current_bucket = None - index = 0 - for symbol_type, symbol_bucket in old_children.iteritems(): - for symbol_name, value in symbol_bucket[NODE_CHILDREN_KEY].iteritems(): - if index % BIG_BUCKET_LIMIT == 0: - group_no = (index / BIG_BUCKET_LIMIT) + 1 - current_bucket = _MkChild(no_path_bucket, - '%s subgroup %d' % (NAME_NO_PATH_BUCKET, - group_no)) - assert not NODE_TYPE_KEY in node or node[NODE_TYPE_KEY] == 'p' - node[NODE_TYPE_KEY] = 'p' # p for path - index += 1 - symbol_size = value[NODE_SYMBOL_SIZE_KEY] - AddSymbolIntoFileNode(current_bucket, symbol_type, - symbol_name, symbol_size) - - -def MakeChildrenDictsIntoLists(node): - largest_list_len = 0 - if NODE_CHILDREN_KEY in node: - largest_list_len = len(node[NODE_CHILDREN_KEY]) - child_list = [] - for child in node[NODE_CHILDREN_KEY].itervalues(): - child_largest_list_len = MakeChildrenDictsIntoLists(child) - if child_largest_list_len > largest_list_len: - largest_list_len = child_largest_list_len - child_list.append(child) - node[NODE_CHILDREN_KEY] = child_list - - return largest_list_len - - -def AddSymbolIntoFileNode(node, symbol_type, symbol_name, symbol_size): - """Puts symbol into the file path node |node|. - Returns the number of added levels in tree. I.e. returns 2.""" - - # 'node' is the file node and first step is to find its symbol-type bucket. - node[NODE_LAST_PATH_ELEMENT_KEY] = True - node = _MkChild(node, symbol_type) - assert not NODE_TYPE_KEY in node or node[NODE_TYPE_KEY] == 'b' - node[NODE_SYMBOL_TYPE_KEY] = symbol_type - node[NODE_TYPE_KEY] = 'b' # b for bucket - - # 'node' is now the symbol-type bucket. Make the child entry. - node = _MkChild(node, symbol_name) - if NODE_CHILDREN_KEY in node: - if node[NODE_CHILDREN_KEY]: - logging.warning('A container node used as symbol for %s.' % symbol_name) - # This is going to be used as a leaf so no use for child list. - del node[NODE_CHILDREN_KEY] - node[NODE_SYMBOL_SIZE_KEY] = symbol_size - node[NODE_SYMBOL_TYPE_KEY] = symbol_type - node[NODE_TYPE_KEY] = 's' # s for symbol - - return 2 # Depth of the added subtree. - - -def MakeCompactTree(symbols, symbol_path_origin_dir): - result = {NODE_NAME_KEY: '/', - NODE_CHILDREN_KEY: {}, - NODE_TYPE_KEY: 'p', - NODE_MAX_DEPTH_KEY: 0} - seen_symbol_with_path = False - cwd = os.path.abspath(os.getcwd()) - for symbol_name, symbol_type, symbol_size, file_path, _address in symbols: - - if 'vtable for ' in symbol_name: - symbol_type = '@' # hack to categorize these separately - # Take path like '/foo/bar/baz', convert to ['foo', 'bar', 'baz'] - if file_path and file_path != "??": - file_path = os.path.abspath(os.path.join(symbol_path_origin_dir, - file_path)) - # Let the output structure be relative to $CWD if inside $CWD, - # otherwise relative to the disk root. This is to avoid - # unnecessary click-through levels in the output. - if file_path.startswith(cwd + os.sep): - file_path = file_path[len(cwd):] - if file_path.startswith('/'): - file_path = file_path[1:] - seen_symbol_with_path = True - else: - file_path = NAME_NO_PATH_BUCKET - - path_parts = file_path.split('/') - - # Find pre-existing node in tree, or update if it already exists - node = result - depth = 0 - while len(path_parts) > 0: - path_part = path_parts.pop(0) - if len(path_part) == 0: - continue - depth += 1 - node = _MkChild(node, path_part) - assert not NODE_TYPE_KEY in node or node[NODE_TYPE_KEY] == 'p' - node[NODE_TYPE_KEY] = 'p' # p for path - - depth += AddSymbolIntoFileNode(node, symbol_type, symbol_name, symbol_size) - result[NODE_MAX_DEPTH_KEY] = max(result[NODE_MAX_DEPTH_KEY], depth) - - if not seen_symbol_with_path: - logging.warning('Symbols lack paths. Data will not be structured.') - - # The (no path) bucket can be extremely large if we failed to get - # path information. Split it into subgroups if needed. - SplitNoPathBucket(result) - - largest_list_len = MakeChildrenDictsIntoLists(result) - - if largest_list_len > BIG_BUCKET_LIMIT: - logging.warning('There are sections with %d nodes. ' - 'Results might be unusable.' % largest_list_len) - return result - - -def DumpCompactTree(symbols, symbol_path_origin_dir, outfile): - tree_root = MakeCompactTree(symbols, symbol_path_origin_dir) - with open(outfile, 'w') as out: - out.write('var tree_data=') - # Use separators without whitespace to get a smaller file. - json.dump(tree_root, out, separators=(',', ':')) - print('Writing %d bytes json' % os.path.getsize(outfile)) - - -def MakeSourceMap(symbols): - sources = {} - for _sym, _symbol_type, size, path, _address in symbols: - key = None - if path: - key = os.path.normpath(path) - else: - key = '[no path]' - if key not in sources: - sources[key] = {'path': path, 'symbol_count': 0, 'size': 0} - record = sources[key] - record['size'] += size - record['symbol_count'] += 1 - return sources - - -# Regex for parsing "nm" output. A sample line looks like this: -# 0167b39c 00000018 t ACCESS_DESCRIPTION_free /path/file.c:95 -# -# The fields are: address, size, type, name, source location -# Regular expression explained ( see also: https://xkcd.com/208 ): -# ([0-9a-f]{8,}+) The address -# [\s]+ Whitespace separator -# ([0-9a-f]{8,}+) The size. From here on out it's all optional. -# [\s]+ Whitespace separator -# (\S?) The symbol type, which is any non-whitespace char -# [\s*] Whitespace separator -# ([^\t]*) Symbol name, any non-tab character (spaces ok!) -# [\t]? Tab separator -# (.*) The location (filename[:linennum|?][ (discriminator n)] -sNmPattern = re.compile( - r'([0-9a-f]{8,})[\s]+([0-9a-f]{8,})[\s]*(\S?)[\s*]([^\t]*)[\t]?(.*)') - -class Progress(): - def __init__(self): - self.count = 0 - self.skip_count = 0 - self.collisions = 0 - self.time_last_output = time.time() - self.count_last_output = 0 - self.disambiguations = 0 - self.was_ambiguous = 0 - - -def RunElfSymbolizer(outfile, library, addr2line_binary, nm_binary, jobs, - disambiguate, src_path): - nm_output = RunNm(library, nm_binary) - nm_output_lines = nm_output.splitlines() - nm_output_lines_len = len(nm_output_lines) - address_symbol = {} - progress = Progress() - def map_address_symbol(symbol, addr): - progress.count += 1 - if addr in address_symbol: - # 'Collision between %s and %s.' % (str(symbol.name), - # str(address_symbol[addr].name)) - progress.collisions += 1 - else: - if symbol.disambiguated: - progress.disambiguations += 1 - if symbol.was_ambiguous: - progress.was_ambiguous += 1 - - address_symbol[addr] = symbol - - progress_output() - - def progress_output(): - progress_chunk = 100 - if progress.count % progress_chunk == 0: - time_now = time.time() - time_spent = time_now - progress.time_last_output - if time_spent > 1.0: - # Only output at most once per second. - progress.time_last_output = time_now - chunk_size = progress.count - progress.count_last_output - progress.count_last_output = progress.count - if time_spent > 0: - speed = chunk_size / time_spent - else: - speed = 0 - progress_percent = (100.0 * (progress.count + progress.skip_count) / - nm_output_lines_len) - disambiguation_percent = 0 - if progress.disambiguations != 0: - disambiguation_percent = (100.0 * progress.disambiguations / - progress.was_ambiguous) - - sys.stdout.write('\r%.1f%%: Looked up %d symbols (%d collisions, ' - '%d disambiguations where %.1f%% succeeded)' - ' - %.1f lookups/s.' % - (progress_percent, progress.count, progress.collisions, - progress.disambiguations, disambiguation_percent, speed)) - - # In case disambiguation was disabled, we remove the source path (which upon - # being set signals the symbolizer to enable disambiguation) - if not disambiguate: - src_path = None - symbolizer = elf_symbolizer.ELFSymbolizer(library, addr2line_binary, - map_address_symbol, - max_concurrent_jobs=jobs, - source_root_path=src_path) - user_interrupted = False - try: - for line in nm_output_lines: - match = sNmPattern.match(line) - if match: - location = match.group(5) - if not location: - addr = int(match.group(1), 16) - size = int(match.group(2), 16) - if addr in address_symbol: # Already looked up, shortcut - # ELFSymbolizer. - map_address_symbol(address_symbol[addr], addr) - continue - elif size == 0: - # Save time by not looking up empty symbols (do they even exist?) - print('Empty symbol: ' + line) - else: - symbolizer.SymbolizeAsync(addr, addr) - continue - - progress.skip_count += 1 - except KeyboardInterrupt: - user_interrupted = True - print('Interrupting - killing subprocesses. Please wait.') - - try: - symbolizer.Join() - except KeyboardInterrupt: - # Don't want to abort here since we will be finished in a few seconds. - user_interrupted = True - print('Patience you must have my young padawan.') - - print '' - - if user_interrupted: - print('Skipping the rest of the file mapping. ' - 'Output will not be fully classified.') - - symbol_path_origin_dir = os.path.dirname(os.path.abspath(library)) - - with open(outfile, 'w') as out: - for line in nm_output_lines: - match = sNmPattern.match(line) - if match: - location = match.group(5) - if not location: - addr = int(match.group(1), 16) - symbol = address_symbol.get(addr) - if symbol is not None: - path = '??' - if symbol.source_path is not None: - path = os.path.abspath(os.path.join(symbol_path_origin_dir, - symbol.source_path)) - line_number = 0 - if symbol.source_line is not None: - line_number = symbol.source_line - out.write('%s\t%s:%d\n' % (line, path, line_number)) - continue - - out.write('%s\n' % line) - - print('%d symbols in the results.' % len(address_symbol)) - - -def RunNm(binary, nm_binary): - cmd = [nm_binary, '-C', '--print-size', '--size-sort', '--reverse-sort', - binary] - nm_process = subprocess.Popen(cmd, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - (process_output, err_output) = nm_process.communicate() - - if nm_process.returncode != 0: - if err_output: - raise Exception, err_output - else: - raise Exception, process_output - - return process_output - - -def GetNmSymbols(nm_infile, outfile, library, jobs, verbose, - addr2line_binary, nm_binary, disambiguate, src_path): - if nm_infile is None: - if outfile is None: - outfile = tempfile.NamedTemporaryFile(delete=False).name - - if verbose: - print 'Running parallel addr2line, dumping symbols to ' + outfile - RunElfSymbolizer(outfile, library, addr2line_binary, nm_binary, jobs, - disambiguate, src_path) - - nm_infile = outfile - - elif verbose: - print 'Using nm input from ' + nm_infile - with file(nm_infile, 'r') as infile: - return list(binary_size_utils.ParseNm(infile)) - - -PAK_RESOURCE_ID_TO_STRING = { "inited": False } - -def LoadPakIdsFromResourceFile(filename): - """Given a file name, it loads everything that looks like a resource id - into PAK_RESOURCE_ID_TO_STRING.""" - with open(filename) as resource_header: - for line in resource_header: - if line.startswith("#define "): - line_data = line.split() - if len(line_data) == 3: - try: - resource_number = int(line_data[2]) - resource_name = line_data[1] - PAK_RESOURCE_ID_TO_STRING[resource_number] = resource_name - except ValueError: - pass - -def GetReadablePakResourceName(pak_file, resource_id): - """Pak resources have a numeric identifier. It is not helpful when - trying to locate where footprint is generated. This does its best to - map the number to a usable string.""" - if not PAK_RESOURCE_ID_TO_STRING['inited']: - # Try to find resource header files generated by grit when - # building the pak file. We'll look for files named *resources.h" - # and lines of the type: - # #define MY_RESOURCE_JS 1234 - PAK_RESOURCE_ID_TO_STRING['inited'] = True - gen_dir = os.path.join(os.path.dirname(pak_file), 'gen') - if os.path.isdir(gen_dir): - for dirname, _dirs, files in os.walk(gen_dir): - for filename in files: - if filename.endswith('resources.h'): - LoadPakIdsFromResourceFile(os.path.join(dirname, filename)) - return PAK_RESOURCE_ID_TO_STRING.get(resource_id, - 'Pak Resource %d' % resource_id) - -def AddPakData(symbols, pak_file): - """Adds pseudo-symbols from a pak file.""" - pak_file = os.path.abspath(pak_file) - with open(pak_file, 'rb') as pak: - data = pak.read() - - PAK_FILE_VERSION = 4 - HEADER_LENGTH = 2 * 4 + 1 # Two uint32s. (file version, number of entries) - # and one uint8 (encoding of text resources) - INDEX_ENTRY_SIZE = 2 + 4 # Each entry is a uint16 and a uint32. - version, num_entries, _encoding = struct.unpack('<IIB', data[:HEADER_LENGTH]) - assert version == PAK_FILE_VERSION, ('Unsupported pak file ' - 'version (%d) in %s. Only ' - 'support version %d' % - (version, pak_file, PAK_FILE_VERSION)) - if num_entries > 0: - # Read the index and data. - data = data[HEADER_LENGTH:] - for _ in range(num_entries): - resource_id, offset = struct.unpack('<HI', data[:INDEX_ENTRY_SIZE]) - data = data[INDEX_ENTRY_SIZE:] - _next_id, next_offset = struct.unpack('<HI', data[:INDEX_ENTRY_SIZE]) - resource_size = next_offset - offset - - symbol_name = GetReadablePakResourceName(pak_file, resource_id) - symbol_path = pak_file - symbol_type = 'd' # Data. Approximation. - symbol_size = resource_size - symbols.append((symbol_name, symbol_type, symbol_size, symbol_path)) - -def _find_in_system_path(binary): - """Locate the full path to binary in the system path or return None - if not found.""" - system_path = os.environ["PATH"].split(os.pathsep) - for path in system_path: - binary_path = os.path.join(path, binary) - if os.path.isfile(binary_path): - return binary_path - return None - -def CheckDebugFormatSupport(library, addr2line_binary): - """Kills the program if debug data is in an unsupported format. - - There are two common versions of the DWARF debug formats and - since we are right now transitioning from DWARF2 to newer formats, - it's possible to have a mix of tools that are not compatible. Detect - that and abort rather than produce meaningless output.""" - tool_output = subprocess.check_output([addr2line_binary, '--version']) - version_re = re.compile(r'^GNU [^ ]+ .* (\d+).(\d+).*?$', re.M) - parsed_output = version_re.match(tool_output) - major = int(parsed_output.group(1)) - minor = int(parsed_output.group(2)) - supports_dwarf4 = major > 2 or major == 2 and minor > 22 - - if supports_dwarf4: - return - - print('Checking version of debug information in %s.' % library) - debug_info = subprocess.check_output(['readelf', '--debug-dump=info', - '--dwarf-depth=1', library]) - dwarf_version_re = re.compile(r'^\s+Version:\s+(\d+)$', re.M) - parsed_dwarf_format_output = dwarf_version_re.search(debug_info) - version = int(parsed_dwarf_format_output.group(1)) - if version > 2: - print('The supplied tools only support DWARF2 debug data but the binary\n' + - 'uses DWARF%d. Update the tools or compile the binary\n' % version + - 'with -gdwarf-2.') - sys.exit(1) - - -def main(): - usage = """%prog [options] - - Runs a spatial analysis on a given library, looking up the source locations - of its symbols and calculating how much space each directory, source file, - and so on is taking. The result is a report that can be used to pinpoint - sources of large portions of the binary, etceteras. - - Under normal circumstances, you only need to pass two arguments, thusly: - - %prog --library /path/to/library --destdir /path/to/output - - In this mode, the program will dump the symbols from the specified library - and map those symbols back to source locations, producing a web-based - report in the specified output directory. - - Other options are available via '--help'. - """ - parser = optparse.OptionParser(usage=usage) - parser.add_option('--nm-in', metavar='PATH', - help='if specified, use nm input from <path> instead of ' - 'generating it. Note that source locations should be ' - 'present in the file; i.e., no addr2line symbol lookups ' - 'will be performed when this option is specified. ' - 'Mutually exclusive with --library.') - parser.add_option('--destdir', metavar='PATH', - help='write output to the specified directory. An HTML ' - 'report is generated here along with supporting files; ' - 'any existing report will be overwritten.') - parser.add_option('--library', metavar='PATH', - help='if specified, process symbols in the library at ' - 'the specified path. Mutually exclusive with --nm-in.') - parser.add_option('--pak', metavar='PATH', - help='if specified, includes the contents of the ' - 'specified *.pak file in the output.') - parser.add_option('--nm-binary', - help='use the specified nm binary to analyze library. ' - 'This is to be used when the nm in the path is not for ' - 'the right architecture or of the right version.') - parser.add_option('--addr2line-binary', - help='use the specified addr2line binary to analyze ' - 'library. This is to be used when the addr2line in ' - 'the path is not for the right architecture or ' - 'of the right version.') - parser.add_option('--jobs', type='int', - help='number of jobs to use for the parallel ' - 'addr2line processing pool; defaults to 1. More ' - 'jobs greatly improve throughput but eat RAM like ' - 'popcorn, and take several gigabytes each. Start low ' - 'and ramp this number up until your machine begins to ' - 'struggle with RAM. ' - 'This argument is only valid when using --library.') - parser.add_option('-v', '--verbose', dest='verbose', action='store_true', - help='be verbose, printing lots of status information.') - parser.add_option('--nm-out', metavar='PATH', - help='(deprecated) No-op. nm.out is stored in --destdir.') - parser.add_option('--no-nm-out', action='store_true', - help='do not keep the nm output file. This file is useful ' - 'if you want to see the fully processed nm output after ' - 'the symbols have been mapped to source locations, or if ' - 'you plan to run explain_binary_size_delta.py. By default ' - 'the file \'nm.out\' is placed alongside the generated ' - 'report. The nm.out file is only created when using ' - '--library.') - parser.add_option('--disable-disambiguation', action='store_true', - help='disables the disambiguation process altogether,' - ' NOTE: this may, depending on your toolchain, produce' - ' output with some symbols at the top layer if addr2line' - ' could not get the entire source path.') - parser.add_option('--source-path', default='./', - help='the path to the source code of the output binary, ' - 'default set to current directory. Used in the' - ' disambiguation process.') - opts, _args = parser.parse_args() - - if ((not opts.library) and (not opts.nm_in)) or (opts.library and opts.nm_in): - parser.error('exactly one of --library or --nm-in is required') - if opts.nm_out: - print >> sys.stderr, ('WARNING: --nm-out is deprecated and has no effect.') - if (opts.nm_in): - if opts.jobs: - print >> sys.stderr, ('WARNING: --jobs has no effect ' - 'when used with --nm-in') - if not opts.destdir: - parser.error('--destdir is a required argument') - if not opts.jobs: - # Use the number of processors but cap between 2 and 4 since raw - # CPU power isn't the limiting factor. It's I/O limited, memory - # bus limited and available-memory-limited. Too many processes and - # the computer will run out of memory and it will be slow. - opts.jobs = max(2, min(4, str(multiprocessing.cpu_count()))) - - if opts.addr2line_binary: - assert os.path.isfile(opts.addr2line_binary) - addr2line_binary = opts.addr2line_binary - else: - addr2line_binary = _find_in_system_path('addr2line') - assert addr2line_binary, 'Unable to find addr2line in the path. '\ - 'Use --addr2line-binary to specify location.' - - if opts.nm_binary: - assert os.path.isfile(opts.nm_binary) - nm_binary = opts.nm_binary - else: - nm_binary = _find_in_system_path('nm') - assert nm_binary, 'Unable to find nm in the path. Use --nm-binary '\ - 'to specify location.' - - if opts.pak: - assert os.path.isfile(opts.pak), 'Could not find ' % opts.pak - - print('addr2line: %s' % addr2line_binary) - print('nm: %s' % nm_binary) - - if opts.library: - CheckDebugFormatSupport(opts.library, addr2line_binary) - - # Prepare output directory and report guts - if not os.path.exists(opts.destdir): - os.makedirs(opts.destdir, 0755) - nm_out = os.path.join(opts.destdir, 'nm.out') - if opts.no_nm_out: - nm_out = None - - # Copy report boilerplate into output directory. This also proves that the - # output directory is safe for writing, so there should be no problems writing - # the nm.out file later. - data_js_file_name = os.path.join(opts.destdir, 'data.js') - d3_out = os.path.join(opts.destdir, 'd3') - if not os.path.exists(d3_out): - os.makedirs(d3_out, 0755) - d3_src = os.path.join(os.path.dirname(__file__), - '..', - '..', - 'third_party', 'd3', 'src') - template_src = os.path.join(os.path.dirname(__file__), - 'template') - shutil.copy(os.path.join(d3_src, 'LICENSE'), d3_out) - shutil.copy(os.path.join(d3_src, 'd3.js'), d3_out) - shutil.copy(os.path.join(template_src, 'index.html'), opts.destdir) - shutil.copy(os.path.join(template_src, 'D3SymbolTreeMap.js'), opts.destdir) - - # Run nm and/or addr2line to gather the data - symbols = GetNmSymbols(opts.nm_in, nm_out, opts.library, - opts.jobs, opts.verbose is True, - addr2line_binary, nm_binary, - opts.disable_disambiguation is None, - opts.source_path) - - # Post-processing - if opts.pak: - AddPakData(symbols, opts.pak) - if opts.library: - symbol_path_origin_dir = os.path.dirname(os.path.abspath(opts.library)) - else: - # Just a guess. Hopefully all paths in the input file are absolute. - symbol_path_origin_dir = os.path.abspath(os.getcwd()) - # Dump JSON for the HTML report. - DumpCompactTree(symbols, symbol_path_origin_dir, data_js_file_name) - print 'Report saved to ' + opts.destdir + '/index.html' - -if __name__ == '__main__': - sys.exit(main())
diff --git a/tools/binary_size/supersize b/tools/binary_size/supersize new file mode 100755 index 0000000..87a5630 --- /dev/null +++ b/tools/binary_size/supersize
@@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# Copyright 2017 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. + +base_dir=$(dirname "$0") + +exec python "$base_dir/libsupersize/main.py" "$@"
diff --git a/tools/bisect-builds.py b/tools/bisect-builds.py index 6d0830f8..2586814 100755 --- a/tools/bisect-builds.py +++ b/tools/bisect-builds.py
@@ -452,16 +452,32 @@ self.bad_revision) return revlist + +def IsMac(): + return sys.platform.startswith('darwin') + + def UnzipFilenameToDir(filename, directory): """Unzip |filename| to |directory|.""" cwd = os.getcwd() if not os.path.isabs(filename): filename = os.path.join(cwd, filename) - zf = zipfile.ZipFile(filename) # Make base. if not os.path.isdir(directory): os.mkdir(directory) os.chdir(directory) + + # The Python ZipFile does not support symbolic links, which makes it + # unsuitable for Mac builds. so use ditto instead. + if IsMac(): + unzip_cmd = ['ditto', '-x', '-k', filename, '.'] + proc = subprocess.Popen(unzip_cmd, bufsize=0, stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + proc.communicate() + os.chdir(cwd) + return + + zf = zipfile.ZipFile(filename) # Extract files. for info in zf.infolist(): name = info.filename @@ -779,8 +795,11 @@ min_str, max_str = 'bad', 'good' else: min_str, max_str = 'good', 'bad' - print 'Bisecting range [%s (%s), %s (%s)].' % (revlist[minrev], min_str, - revlist[maxrev], max_str) + print ('Bisecting range [%s (%s), %s (%s)], ' + 'roughly %d steps left.') % (revlist[minrev], min_str, + revlist[maxrev], max_str, + int(maxrev - minrev) + .bit_length()) # Pre-fetch next two possible pivots # - down_pivot is the next revision to check if the current revision turns @@ -982,6 +1001,11 @@ print (' ' + CHANGELOG_URL % (GetGitHashFromSVNRevision(min_chromium_rev), GetGitHashFromSVNRevision(max_chromium_rev))) +def error_internal_option(option, opt, value, parser): + raise optparse.OptionValueError( + 'The -o and -r options are only\navailable in the internal version of ' + 'this script. Google\nemployees should visit http://go/bisect-builds ' + 'for\nconfiguration instructions.') def main(): usage = ('%prog [options] [-- chromium-options]\n' @@ -1067,6 +1091,8 @@ default=False, help='Test the first and last revisions in the range ' + 'before proceeding with the bisect.') + parser.add_option("-r", action="callback", callback=error_internal_option) + parser.add_option("-o", action="callback", callback=error_internal_option) (opts, args) = parser.parse_args()
diff --git a/tools/blink_rename_merge_helper/.gitignore b/tools/blink_rename_merge_helper/.gitignore new file mode 100644 index 0000000..dcd5906e --- /dev/null +++ b/tools/blink_rename_merge_helper/.gitignore
@@ -0,0 +1 @@ +staging
diff --git a/tools/blink_rename_merge_helper/COMPONENTS b/tools/blink_rename_merge_helper/COMPONENTS new file mode 100644 index 0000000..3737ba94 --- /dev/null +++ b/tools/blink_rename_merge_helper/COMPONENTS
@@ -0,0 +1,11 @@ +{ + "pylib": "374e8c010eb86beb9c97d4179c5b1f1cc8c1d999", + "data": "3a2675b967f26b2d2aabe3d903824ebfeed1af64", + "bin-darwin": "f45f58ccbf42a26b0704f63d8740cf008b84afcc", + "include-darwin": "7f1790ea6a3257dda2035fe885a33fbfe4078fed", + "lib-darwin": "29baf57b55dd0ab060baf0cd6461a7e0fa0105f4", + "bin-linux*": "b8f4be9eeb5ca49059f4d46ae5a1dedfb41e9acb", + "lib-linux*": "508b0ba0de0b4191a54360330f74cea8afd5ee93", + "bin-win32": "f8ff17a5f080cef7639140b057a0f61b4d1a4f8f", + "lib-win32": "afb47503a4fd442c353ddaba6f17a81e6aa5a20f" +}
diff --git a/tools/blink_rename_merge_helper/OWNERS b/tools/blink_rename_merge_helper/OWNERS new file mode 100644 index 0000000..a4eaaa59 --- /dev/null +++ b/tools/blink_rename_merge_helper/OWNERS
@@ -0,0 +1,6 @@ +danakj@chromium.org +dcheng@chromium.org +lukasza@chromium.org +nasko@chromium.org + +# COMPONENT: Tools
diff --git a/tools/blink_rename_merge_helper/README.md b/tools/blink_rename_merge_helper/README.md new file mode 100644 index 0000000..d9bc67e --- /dev/null +++ b/tools/blink_rename_merge_helper/README.md
@@ -0,0 +1,14 @@ +Tool to help manage merge conflicts from the Blink rename. The tool is committed +into the Chromium repository. However, with the exception of the `run.py` loader +stub, everything else is fetched from the chromium-blink-rename Google Storage +bucket at runtime. + +COMPONENTS is a list of component names and hashes; the tool always fetches the +latest COMPONENTS manifest from Google Storage. The checked-in copy exists as a +reference, so that changes can be reviewed and tracked. In addition, if the +component name is of the form `name-platform`, `name` is used as the actual +component name, while `platform` is passed to `download_from_google_storage.py` +as the platform argument. This is used to version per-platform binaries. + +Use `upload_to_google_storage.py -b chromium-blink-rename -a pylib` to upload +new versions of the pylib.
diff --git a/tools/blink_rename_merge_helper/data/idl_blocklist.txt b/tools/blink_rename_merge_helper/data/idl_blocklist.txt new file mode 100644 index 0000000..613ddfd --- /dev/null +++ b/tools/blink_rename_merge_helper/data/idl_blocklist.txt
@@ -0,0 +1,6419 @@ +AbstractWorker:::onerror:::1 +AbstractWorker:::setOnerror:::2 +Accelerometer:::x:::1 +Accelerometer:::y:::1 +Accelerometer:::z:::1 +AccessibleNode:::autocomplete:::0 +AccessibleNode:::checked:::0 +AccessibleNode:::current:::0 +AccessibleNode:::invalid:::0 +AccessibleNode:::keyShortcuts:::0 +AccessibleNode:::label:::0 +AccessibleNode:::live:::0 +AccessibleNode:::orientation:::0 +AccessibleNode:::placeholder:::0 +AccessibleNode:::relevant:::0 +AccessibleNode:::role:::0 +AccessibleNode:::roleDescription:::0 +AccessibleNode:::setAutocomplete:::1 +AccessibleNode:::setChecked:::1 +AccessibleNode:::setCurrent:::1 +AccessibleNode:::setInvalid:::1 +AccessibleNode:::setKeyShortcuts:::1 +AccessibleNode:::setLabel:::1 +AccessibleNode:::setLive:::1 +AccessibleNode:::setOrientation:::1 +AccessibleNode:::setPlaceholder:::1 +AccessibleNode:::setRelevant:::1 +AccessibleNode:::setRole:::1 +AccessibleNode:::setRoleDescription:::1 +AccessibleNode:::setSort:::1 +AccessibleNode:::setValueText:::1 +AccessibleNode:::sort:::0 +AccessibleNode:::valueText:::0 +AmbientLightSensor:::illuminance:::1 +AnalyserNode:::fftSize:::0 +AnalyserNode:::frequencyBinCount:::0 +AnalyserNode:::getByteFrequencyData:::1 +AnalyserNode:::getByteTimeDomainData:::1 +AnalyserNode:::getFloatFrequencyData:::1 +AnalyserNode:::getFloatTimeDomainData:::1 +AnalyserNode:::maxDecibels:::0 +AnalyserNode:::minDecibels:::0 +AnalyserNode:::setFftSize:::2 +AnalyserNode:::setMaxDecibels:::2 +AnalyserNode:::setMinDecibels:::2 +AnalyserNode:::setSmoothingTimeConstant:::2 +AnalyserNode:::smoothingTimeConstant:::0 +ANGLEInstancedArrays:::drawArraysInstancedANGLE:::4 +ANGLEInstancedArrays:::drawElementsInstancedANGLE:::5 +ANGLEInstancedArrays:::vertexAttribDivisorANGLE:::2 +Animation:::cancel:::0 +Animation:::currentTime:::1 +Animation:::effect:::0 +AnimationEffectReadOnly:::getComputedTiming:::0 +AnimationEffectReadOnly:::getComputedTiming:::1 +AnimationEffectReadOnly:::timing:::0 +AnimationEffectTiming:::delay:::0 +AnimationEffectTiming:::direction:::0 +AnimationEffectTiming:::duration:::1 +AnimationEffectTiming:::easing:::0 +AnimationEffectTiming:::endDelay:::0 +AnimationEffectTiming:::fill:::0 +AnimationEffectTiming:::iterations:::0 +AnimationEffectTiming:::iterationStart:::0 +AnimationEffectTimingReadOnly:::delay:::0 +AnimationEffectTimingReadOnly:::direction:::0 +AnimationEffectTimingReadOnly:::duration:::1 +AnimationEffectTimingReadOnly:::easing:::0 +AnimationEffectTimingReadOnly:::endDelay:::0 +AnimationEffectTimingReadOnly:::fill:::0 +AnimationEffectTimingReadOnly:::iterations:::0 +AnimationEffectTimingReadOnly:::iterationStart:::0 +AnimationEffectTiming:::setDelay:::1 +AnimationEffectTiming:::setDirection:::1 +AnimationEffectTiming:::setDuration:::2 +AnimationEffectTiming:::setEasing:::2 +AnimationEffectTiming:::setEndDelay:::1 +AnimationEffectTiming:::setFill:::1 +AnimationEffectTiming:::setIterations:::2 +AnimationEffectTiming:::setIterationStart:::2 +AnimationEvent:::animationName:::0 +AnimationEvent:::elapsedTime:::0 +Animation:::finish:::1 +Animation:::finished:::1 +Animation:::id:::0 +Animation:::oncancel:::0 +Animation:::onfinish:::0 +Animation:::pause:::1 +Animation:::play:::1 +AnimationPlaybackEvent:::currentTime:::1 +AnimationPlaybackEvent:::timelineTime:::1 +Animation:::playbackRate:::0 +Animation:::playState:::0 +Animation:::ready:::1 +Animation:::reverse:::1 +Animation:::setCurrentTime:::1 +Animation:::setEffect:::1 +Animation:::setId:::1 +Animation:::setOncancel:::1 +Animation:::setOnfinish:::1 +Animation:::setPlaybackRate:::1 +Animation:::setStartTime:::1 +Animation:::startTime:::1 +Animation:::timeline:::0 +AnimationTimeline:::currentTime:::1 +AnimationTimeline:::getAnimations:::0 +AnimationTimeline:::setCurrentTime:::1 +AppBannerPromptResult:::outcome:::0 +AppBannerPromptResult:::platform:::0 +ApplicationCache:::abort:::0 +ApplicationCacheErrorEvent:::message:::0 +ApplicationCacheErrorEvent:::reason:::0 +ApplicationCacheErrorEvent:::status:::0 +ApplicationCacheErrorEvent:::url:::0 +ApplicationCache:::oncached:::0 +ApplicationCache:::onchecking:::0 +ApplicationCache:::ondownloading:::0 +ApplicationCache:::onerror:::0 +ApplicationCache:::onnoupdate:::0 +ApplicationCache:::onobsolete:::0 +ApplicationCache:::onprogress:::0 +ApplicationCache:::onupdateready:::0 +ApplicationCache:::setOncached:::1 +ApplicationCache:::setOnchecking:::1 +ApplicationCache:::setOndownloading:::1 +ApplicationCache:::setOnerror:::1 +ApplicationCache:::setOnnoupdate:::1 +ApplicationCache:::setOnobsolete:::1 +ApplicationCache:::setOnprogress:::1 +ApplicationCache:::setOnupdateready:::1 +ApplicationCache:::status:::0 +ApplicationCache:::swapCache:::1 +ApplicationCache:::update:::1 +Attr:::localName:::0 +Attr:::name:::0 +Attr:::namespaceURI:::0 +Attr:::ownerElement:::0 +Attr:::prefix:::0 +Attr:::setValue:::1 +Attr:::specified:::0 +Attr:::value:::0 +AudioBufferCallback:::handleEvent:::1 +AudioBuffer:::copyFromChannel:::3 +AudioBuffer:::copyFromChannel:::4 +AudioBuffer:::copyToChannel:::3 +AudioBuffer:::copyToChannel:::4 +AudioBuffer:::duration:::0 +AudioBuffer:::getChannelData:::2 +AudioBuffer:::length:::0 +AudioBuffer:::numberOfChannels:::0 +AudioBuffer:::sampleRate:::0 +AudioBufferSourceNode:::buffer:::0 +AudioBufferSourceNode:::detune:::0 +AudioBufferSourceNode:::loop:::0 +AudioBufferSourceNode:::loopEnd:::0 +AudioBufferSourceNode:::loopStart:::0 +AudioBufferSourceNode:::playbackRate:::0 +AudioBufferSourceNode:::setBuffer:::2 +AudioBufferSourceNode:::setLoop:::1 +AudioBufferSourceNode:::setLoopEnd:::1 +AudioBufferSourceNode:::setLoopStart:::1 +AudioBufferSourceNode:::start:::1 +AudioBufferSourceNode:::start:::2 +AudioBufferSourceNode:::start:::3 +AudioBufferSourceNode:::start:::4 +AudioContext:::baseLatency:::0 +AudioContext:::closeContext:::1 +AudioContext:::getOutputTimestamp:::1 +AudioContext:::suspendContext:::1 +AudioDestinationNode:::maxChannelCount:::0 +AudioListener:::forwardX:::0 +AudioListener:::forwardY:::0 +AudioListener:::forwardZ:::0 +AudioListener:::positionX:::0 +AudioListener:::positionY:::0 +AudioListener:::positionZ:::0 +AudioListener:::setOrientation:::6 +AudioListener:::setPosition:::3 +AudioListener:::upX:::0 +AudioListener:::upY:::0 +AudioListener:::upZ:::0 +AudioNode:::channelCount:::0 +AudioNode:::channelCountMode:::0 +AudioNode:::channelInterpretation:::0 +AudioNode:::connect:::2 +AudioNode:::connect:::3 +AudioNode:::connect:::4 +AudioNode:::context:::0 +AudioNode:::disconnect:::0 +AudioNode:::disconnect:::2 +AudioNode:::disconnect:::3 +AudioNode:::disconnect:::4 +AudioNode:::numberOfInputs:::0 +AudioNode:::numberOfOutputs:::0 +AudioNode:::setChannelCount:::2 +AudioNode:::setChannelCountMode:::2 +AudioNode:::setChannelInterpretation:::2 +AudioParam:::cancelAndHoldAtTime:::2 +AudioParam:::cancelScheduledValues:::2 +AudioParam:::defaultValue:::0 +AudioParam:::exponentialRampToValueAtTime:::3 +AudioParam:::linearRampToValueAtTime:::3 +AudioParam:::maxValue:::0 +AudioParam:::minValue:::0 +AudioParam:::setTargetAtTime:::4 +AudioParam:::setValue:::1 +AudioParam:::setValueAtTime:::3 +AudioParam:::setValueCurveAtTime:::4 +AudioParam:::value:::0 +AudioProcessingEvent:::inputBuffer:::0 +AudioProcessingEvent:::outputBuffer:::0 +AudioProcessingEvent:::playbackTime:::0 +AudioScheduledSourceNode:::onended:::0 +AudioScheduledSourceNode:::setOnended:::1 +AudioScheduledSourceNode:::start:::1 +AudioScheduledSourceNode:::start:::2 +AudioScheduledSourceNode:::stop:::1 +AudioScheduledSourceNode:::stop:::2 +AudioTrack:::enabled:::0 +AudioTrack:::id:::0 +AudioTrack:::kind:::0 +AudioTrack:::label:::0 +AudioTrack:::language:::0 +AudioTrackList::::::1 +AudioTrackList:::getTrackById:::1 +AudioTrackList:::length:::0 +AudioTrackList:::onaddtrack:::0 +AudioTrackList:::onchange:::0 +AudioTrackList:::onremovetrack:::0 +AudioTrackList:::setOnaddtrack:::1 +AudioTrackList:::setOnchange:::1 +AudioTrackList:::setOnremovetrack:::1 +AudioTrack:::setEnabled:::1 +AudioWorkletGlobalScope:::registerProcessor:::3 +AuthenticationAssertion:::authenticatorData:::0 +AuthenticationAssertion:::clientData:::0 +AuthenticationAssertion:::credential:::0 +AuthenticationAssertion:::signature:::0 +BackgroundFetchClickEvent:::state:::0 +BackgroundFetchedEvent:::fetches:::0 +BackgroundFetchedEvent:::updateUI:::2 +BackgroundFetchEvent:::tag:::0 +BackgroundFetchFailEvent:::fetches:::0 +BackgroundFetchFetch:::request:::0 +BackgroundFetchManager:::fetch:::4 +BackgroundFetchManager:::fetch:::5 +BackgroundFetchManager:::get:::2 +BackgroundFetchManager:::getTags:::1 +BackgroundFetchRegistration:::abort:::1 +BackgroundFetchRegistration:::icons:::0 +BackgroundFetchRegistration:::tag:::0 +BackgroundFetchRegistration:::title:::0 +BackgroundFetchRegistration:::totalDownloadSize:::0 +BackgroundFetchSettledFetch:::response:::0 +BarcodeDetector:::detect:::2 +BarProp:::visible:::0 +BaseAudioContext:::createAnalyser:::1 +BaseAudioContext:::createBiquadFilter:::1 +BaseAudioContext:::createBuffer:::4 +BaseAudioContext:::createBufferSource:::1 +BaseAudioContext:::createChannelMerger:::1 +BaseAudioContext:::createChannelMerger:::2 +BaseAudioContext:::createChannelSplitter:::1 +BaseAudioContext:::createChannelSplitter:::2 +BaseAudioContext:::createConstantSource:::1 +BaseAudioContext:::createConvolver:::1 +BaseAudioContext:::createDelay:::1 +BaseAudioContext:::createDelay:::2 +BaseAudioContext:::createDynamicsCompressor:::1 +BaseAudioContext:::createGain:::1 +BaseAudioContext:::createIIRFilter:::3 +BaseAudioContext:::createMediaElementSource:::2 +BaseAudioContext:::createMediaStreamDestination:::1 +BaseAudioContext:::createMediaStreamSource:::2 +BaseAudioContext:::createOscillator:::1 +BaseAudioContext:::createPanner:::1 +BaseAudioContext:::createPeriodicWave:::3 +BaseAudioContext:::createPeriodicWave:::4 +BaseAudioContext:::createScriptProcessor:::1 +BaseAudioContext:::createScriptProcessor:::2 +BaseAudioContext:::createScriptProcessor:::3 +BaseAudioContext:::createScriptProcessor:::4 +BaseAudioContext:::createStereoPanner:::1 +BaseAudioContext:::createWaveShaper:::1 +BaseAudioContext:::currentTime:::0 +BaseAudioContext:::decodeAudioData:::3 +BaseAudioContext:::decodeAudioData:::4 +BaseAudioContext:::decodeAudioData:::5 +BaseAudioContext:::destination:::0 +BaseAudioContext:::getOutputTimestamp:::1 +BaseAudioContext:::listener:::0 +BaseAudioContext:::onstatechange:::0 +BaseAudioContext:::resumeContext:::1 +BaseAudioContext:::sampleRate:::0 +BaseAudioContext:::setOnstatechange:::1 +BaseAudioContext:::state:::0 +BaseAudioContext:::suspendContext:::1 +BaseRenderingContext2D:::beginPath:::0 +BaseRenderingContext2D:::clearRect:::4 +BaseRenderingContext2D:::clip:::1 +BaseRenderingContext2D:::clip:::2 +BaseRenderingContext2D:::createImageData:::2 +BaseRenderingContext2D:::createImageData:::3 +BaseRenderingContext2D:::createLinearGradient:::4 +BaseRenderingContext2D:::createPattern:::4 +BaseRenderingContext2D:::createRadialGradient:::7 +BaseRenderingContext2D:::currentTransform:::0 +BaseRenderingContext2D:::drawImage:::11 +BaseRenderingContext2D:::drawImage:::5 +BaseRenderingContext2D:::drawImage:::7 +BaseRenderingContext2D:::fill:::1 +BaseRenderingContext2D:::fill:::2 +BaseRenderingContext2D:::fillRect:::4 +BaseRenderingContext2D:::fillStyle:::1 +BaseRenderingContext2D:::filter:::0 +BaseRenderingContext2D:::getImageData:::5 +BaseRenderingContext2D:::getLineDash:::0 +BaseRenderingContext2D:::globalAlpha:::0 +BaseRenderingContext2D:::globalCompositeOperation:::0 +BaseRenderingContext2D:::imageSmoothingEnabled:::0 +BaseRenderingContext2D:::imageSmoothingQuality:::0 +BaseRenderingContext2D:::isContextLost:::0 +BaseRenderingContext2D:::isPointInPath:::3 +BaseRenderingContext2D:::isPointInPath:::4 +BaseRenderingContext2D:::isPointInStroke:::2 +BaseRenderingContext2D:::isPointInStroke:::3 +BaseRenderingContext2D:::lineCap:::0 +BaseRenderingContext2D:::lineDashOffset:::0 +BaseRenderingContext2D:::lineJoin:::0 +BaseRenderingContext2D:::lineWidth:::0 +BaseRenderingContext2D:::miterLimit:::0 +BaseRenderingContext2D:::putImageData:::4 +BaseRenderingContext2D:::putImageData:::8 +BaseRenderingContext2D:::resetTransform:::0 +BaseRenderingContext2D:::restore:::0 +BaseRenderingContext2D:::rotate:::1 +BaseRenderingContext2D:::save:::0 +BaseRenderingContext2D:::scale:::2 +BaseRenderingContext2D:::setCurrentTransform:::1 +BaseRenderingContext2D:::setFillStyle:::1 +BaseRenderingContext2D:::setFilter:::1 +BaseRenderingContext2D:::setGlobalAlpha:::1 +BaseRenderingContext2D:::setGlobalCompositeOperation:::1 +BaseRenderingContext2D:::setImageSmoothingEnabled:::1 +BaseRenderingContext2D:::setImageSmoothingQuality:::1 +BaseRenderingContext2D:::setLineCap:::1 +BaseRenderingContext2D:::setLineDash:::1 +BaseRenderingContext2D:::setLineDashOffset:::1 +BaseRenderingContext2D:::setLineJoin:::1 +BaseRenderingContext2D:::setLineWidth:::1 +BaseRenderingContext2D:::setMiterLimit:::1 +BaseRenderingContext2D:::setShadowBlur:::1 +BaseRenderingContext2D:::setShadowColor:::1 +BaseRenderingContext2D:::setShadowOffsetX:::1 +BaseRenderingContext2D:::setShadowOffsetY:::1 +BaseRenderingContext2D:::setStrokeStyle:::1 +BaseRenderingContext2D:::setTransform:::6 +BaseRenderingContext2D:::shadowBlur:::0 +BaseRenderingContext2D:::shadowColor:::0 +BaseRenderingContext2D:::shadowOffsetX:::0 +BaseRenderingContext2D:::shadowOffsetY:::0 +BaseRenderingContext2D:::stroke:::0 +BaseRenderingContext2D:::stroke:::1 +BaseRenderingContext2D:::strokeRect:::4 +BaseRenderingContext2D:::strokeStyle:::1 +BaseRenderingContext2D:::transform:::6 +BaseRenderingContext2D:::translate:::2 +BatteryManager:::charging:::0 +BatteryManager:::chargingTime:::0 +BatteryManager:::dischargingTime:::0 +BatteryManager:::level:::0 +BatteryManager:::onchargingchange:::0 +BatteryManager:::onchargingtimechange:::0 +BatteryManager:::ondischargingtimechange:::0 +BatteryManager:::onlevelchange:::0 +BatteryManager:::setOnchargingchange:::1 +BatteryManager:::setOnchargingtimechange:::1 +BatteryManager:::setOndischargingtimechange:::1 +BatteryManager:::setOnlevelchange:::1 +BeforeInstallPromptEvent:::platforms:::0 +BeforeInstallPromptEvent:::prompt:::1 +BeforeInstallPromptEvent:::userChoice:::1 +BeforeUnloadEvent:::returnValue:::0 +BeforeUnloadEvent:::setReturnValue:::1 +BiquadFilterNode:::detune:::0 +BiquadFilterNode:::frequency:::0 +BiquadFilterNode:::gain:::0 +BiquadFilterNode:::getFrequencyResponse:::3 +BiquadFilterNode:::q:::0 +BiquadFilterNode:::setType:::1 +BiquadFilterNode:::type:::0 +BlobCallback:::handleEvent:::1 +Blob:::close:::2 +BlobEvent:::data:::0 +BlobEvent:::timecode:::0 +Blob:::isClosed:::0 +Blob:::size:::0 +Blob:::slice:::1 +Blob:::slice:::2 +Blob:::slice:::3 +Blob:::slice:::4 +Blob:::type:::0 +BluetoothCharacteristicProperties:::authenticatedSignedWrites:::0 +BluetoothCharacteristicProperties:::broadcast:::0 +BluetoothCharacteristicProperties:::indicate:::0 +BluetoothCharacteristicProperties:::notify:::0 +BluetoothCharacteristicProperties:::read:::0 +BluetoothCharacteristicProperties:::reliableWrite:::0 +BluetoothCharacteristicProperties:::writableAuxiliaries:::0 +BluetoothCharacteristicProperties:::write:::0 +BluetoothCharacteristicProperties:::writeWithoutResponse:::0 +BluetoothDevice:::gatt:::0 +BluetoothDevice:::id:::0 +BluetoothDevice:::name:::0 +BluetoothDevice:::ongattserverdisconnected:::0 +BluetoothDevice:::setOngattserverdisconnected:::1 +BluetoothRemoteGATTCharacteristic:::getDescriptor:::3 +BluetoothRemoteGATTCharacteristic:::getDescriptors:::2 +BluetoothRemoteGATTCharacteristic:::getDescriptors:::3 +BluetoothRemoteGATTCharacteristic:::oncharacteristicvaluechanged:::0 +BluetoothRemoteGATTCharacteristic:::properties:::0 +BluetoothRemoteGATTCharacteristic:::readValue:::1 +BluetoothRemoteGATTCharacteristic:::service:::0 +BluetoothRemoteGATTCharacteristic:::setOncharacteristicvaluechanged:::1 +BluetoothRemoteGATTCharacteristic:::startNotifications:::1 +BluetoothRemoteGATTCharacteristic:::stopNotifications:::1 +BluetoothRemoteGATTCharacteristic:::uuid:::0 +BluetoothRemoteGATTCharacteristic:::value:::0 +BluetoothRemoteGATTCharacteristic:::writeValue:::2 +BluetoothRemoteGATTDescriptor:::characteristic:::0 +BluetoothRemoteGATTDescriptor:::readValue:::1 +BluetoothRemoteGATTDescriptor:::uuid:::0 +BluetoothRemoteGATTDescriptor:::value:::0 +BluetoothRemoteGATTDescriptor:::writeValue:::2 +BluetoothRemoteGATTServer:::connect:::1 +BluetoothRemoteGATTServer:::connected:::0 +BluetoothRemoteGATTServer:::device:::0 +BluetoothRemoteGATTServer:::disconnect:::1 +BluetoothRemoteGATTServer:::getPrimaryService:::3 +BluetoothRemoteGATTServer:::getPrimaryServices:::2 +BluetoothRemoteGATTServer:::getPrimaryServices:::3 +BluetoothRemoteGATTService:::device:::0 +BluetoothRemoteGATTService:::getCharacteristic:::3 +BluetoothRemoteGATTService:::getCharacteristics:::2 +BluetoothRemoteGATTService:::getCharacteristics:::3 +BluetoothRemoteGATTService:::isPrimary:::0 +BluetoothRemoteGATTService:::uuid:::0 +Bluetooth:::requestDevice:::2 +Bluetooth:::requestDevice:::3 +BluetoothUUID:::canonicalUUID:::1 +BluetoothUUID:::getCharacteristic:::2 +BluetoothUUID:::getDescriptor:::2 +BluetoothUUID:::getService:::2 +Body:::arrayBuffer:::1 +Body:::blob:::1 +Body:::body:::1 +Body:::bodyUsed:::0 +Body:::bodyWithUseCounter:::1 +Body:::json:::1 +Body:::text:::1 +BroadcastChannel:::close:::0 +BroadcastChannel:::name:::0 +BroadcastChannel:::onmessage:::0 +BroadcastChannel:::postMessage:::2 +BroadcastChannel:::setOnmessage:::1 +BudgetService:::getBudget:::1 +BudgetService:::getCost:::2 +BudgetService:::reserve:::2 +BudgetState:::budgetAt:::0 +BudgetState:::time:::0 +Cache:::add:::3 +Cache:::addAll:::3 +Cache:::deleteFunction:::3 +Cache:::deleteFunction:::4 +Cache:::keys:::2 +Cache:::keys:::3 +Cache:::keys:::4 +Cache:::match:::3 +Cache:::match:::4 +Cache:::matchAll:::2 +Cache:::matchAll:::3 +Cache:::matchAll:::4 +Cache:::put:::4 +CacheStorage:::deleteFunction:::3 +CacheStorage:::has:::3 +CacheStorage:::keys:::2 +CacheStorage:::match:::3 +CacheStorage:::match:::4 +CacheStorage:::open:::3 +CallbackFunctionTest:::testCallback:::4 +CallbackFunctionTest:::testInterfaceCallback:::3 +CallbackFunctionTest:::testNullableCallback:::4 +CallbackFunctionTest:::testReceiverObjectCallback:::2 +CallbackFunctionTest:::testSequenceCallback:::3 +CanvasCaptureMediaStreamTrack:::canvas:::0 +CanvasCaptureMediaStreamTrack:::requestFrame:::0 +CanvasGradient:::addColorStop:::3 +CanvasPathMethods:::arc:::6 +CanvasPathMethods:::arc:::7 +CanvasPathMethods:::arcTo:::6 +CanvasPathMethods:::bezierCurveTo:::6 +CanvasPathMethods:::closePath:::0 +CanvasPathMethods:::ellipse:::8 +CanvasPathMethods:::ellipse:::9 +CanvasPathMethods:::lineTo:::2 +CanvasPathMethods:::moveTo:::2 +CanvasPathMethods:::quadraticCurveTo:::4 +CanvasPathMethods:::rect:::4 +CanvasPattern:::setTransform:::1 +CanvasRenderingContext2D:::addHitRegion:::1 +CanvasRenderingContext2D:::addHitRegion:::2 +CanvasRenderingContext2D:::beginPath:::0 +CanvasRenderingContext2D:::canvas:::0 +CanvasRenderingContext2D:::clearHitRegions:::0 +CanvasRenderingContext2D:::clearRect:::4 +CanvasRenderingContext2D:::clip:::0 +CanvasRenderingContext2D:::clip:::1 +CanvasRenderingContext2D:::clip:::2 +CanvasRenderingContext2D:::createImageData:::2 +CanvasRenderingContext2D:::createImageData:::3 +CanvasRenderingContext2D:::createLinearGradient:::4 +CanvasRenderingContext2D:::createPattern:::4 +CanvasRenderingContext2D:::createRadialGradient:::7 +CanvasRenderingContext2D:::currentTransform:::0 +CanvasRenderingContext2D:::direction:::0 +CanvasRenderingContext2D:::drawFocusIfNeeded:::1 +CanvasRenderingContext2D:::drawFocusIfNeeded:::2 +CanvasRenderingContext2D:::drawImage:::11 +CanvasRenderingContext2D:::drawImage:::5 +CanvasRenderingContext2D:::drawImage:::7 +CanvasRenderingContext2D:::fill:::0 +CanvasRenderingContext2D:::fill:::1 +CanvasRenderingContext2D:::fill:::2 +CanvasRenderingContext2D:::fillRect:::4 +CanvasRenderingContext2D:::fillStyle:::1 +CanvasRenderingContext2D:::fillText:::3 +CanvasRenderingContext2D:::fillText:::4 +CanvasRenderingContext2D:::filter:::0 +CanvasRenderingContext2D:::font:::0 +CanvasRenderingContext2D:::getContextAttributes:::0 +CanvasRenderingContext2D:::getImageData:::5 +CanvasRenderingContext2D:::getLineDash:::0 +CanvasRenderingContext2D:::globalAlpha:::0 +CanvasRenderingContext2D:::globalCompositeOperation:::0 +CanvasRenderingContext2D:::imageSmoothingEnabled:::0 +CanvasRenderingContext2D:::imageSmoothingQuality:::0 +CanvasRenderingContext2D:::isContextLost:::0 +CanvasRenderingContext2D:::isPointInPath:::2 +CanvasRenderingContext2D:::isPointInPath:::3 +CanvasRenderingContext2D:::isPointInPath:::4 +CanvasRenderingContext2D:::isPointInStroke:::2 +CanvasRenderingContext2D:::isPointInStroke:::3 +CanvasRenderingContext2D:::lineCap:::0 +CanvasRenderingContext2D:::lineDashOffset:::0 +CanvasRenderingContext2D:::lineJoin:::0 +CanvasRenderingContext2D:::lineWidth:::0 +CanvasRenderingContext2D:::measureText:::1 +CanvasRenderingContext2D:::miterLimit:::0 +CanvasRenderingContext2D:::putImageData:::4 +CanvasRenderingContext2D:::putImageData:::8 +CanvasRenderingContext2D:::removeHitRegion:::1 +CanvasRenderingContext2D:::resetTransform:::0 +CanvasRenderingContext2D:::restore:::0 +CanvasRenderingContext2D:::rotate:::1 +CanvasRenderingContext2D:::save:::0 +CanvasRenderingContext2D:::scale:::2 +CanvasRenderingContext2D:::scrollPathIntoView:::0 +CanvasRenderingContext2D:::scrollPathIntoView:::1 +CanvasRenderingContext2D:::setCurrentTransform:::1 +CanvasRenderingContext2D:::setDirection:::1 +CanvasRenderingContext2D:::setFillStyle:::1 +CanvasRenderingContext2D:::setFilter:::1 +CanvasRenderingContext2D:::setFont:::1 +CanvasRenderingContext2D:::setGlobalAlpha:::1 +CanvasRenderingContext2D:::setGlobalCompositeOperation:::1 +CanvasRenderingContext2D:::setImageSmoothingEnabled:::1 +CanvasRenderingContext2D:::setImageSmoothingQuality:::1 +CanvasRenderingContext2D:::setLineCap:::1 +CanvasRenderingContext2D:::setLineDash:::1 +CanvasRenderingContext2D:::setLineDashOffset:::1 +CanvasRenderingContext2D:::setLineJoin:::1 +CanvasRenderingContext2D:::setLineWidth:::1 +CanvasRenderingContext2D:::setMiterLimit:::1 +CanvasRenderingContext2D:::setShadowBlur:::1 +CanvasRenderingContext2D:::setShadowColor:::1 +CanvasRenderingContext2D:::setShadowOffsetX:::1 +CanvasRenderingContext2D:::setShadowOffsetY:::1 +CanvasRenderingContext2D:::setStrokeStyle:::1 +CanvasRenderingContext2D:::setTextAlign:::1 +CanvasRenderingContext2D:::setTextBaseline:::1 +CanvasRenderingContext2D:::setTransform:::6 +CanvasRenderingContext2D:::shadowBlur:::0 +CanvasRenderingContext2D:::shadowColor:::0 +CanvasRenderingContext2D:::shadowOffsetX:::0 +CanvasRenderingContext2D:::shadowOffsetY:::0 +CanvasRenderingContext2D:::stroke:::0 +CanvasRenderingContext2D:::stroke:::1 +CanvasRenderingContext2D:::strokeRect:::4 +CanvasRenderingContext2D:::strokeStyle:::1 +CanvasRenderingContext2D:::strokeText:::3 +CanvasRenderingContext2D:::strokeText:::4 +CanvasRenderingContext2D:::textAlign:::0 +CanvasRenderingContext2D:::textBaseline:::0 +CanvasRenderingContext2D:::transform:::6 +CanvasRenderingContext2D:::translate:::2 +CanvasRenderingContext:::canvas:::0 +CanvasRenderingContext:::clearRect:::4 +CanvasRenderingContext:::isContextLost:::0 +CanvasRenderingContext:::offscreenCanvas:::0 +CanvasRenderingContext:::setFont:::1 +# C++ class - via blink::Navigator. +CharacterData:::appendData:::1 +CharacterData:::data:::0 +CharacterData:::deleteData:::3 +CharacterData:::insertData:::3 +CharacterData:::length:::0 +CharacterData:::replaceData:::4 +CharacterData:::setData:::1 +CharacterData:::substringData:::3 +ChildNode:::after:::3 +ChildNode:::before:::3 +ChildNode:::remove:::2 +ChildNode:::replaceWith:::3 +ClientRect:::bottom:::0 +ClientRect:::height:::0 +ClientRect:::left:::0 +ClientRectList::::::1 +ClientRectList:::item:::1 +ClientRectList:::length:::0 +ClientRect:::right:::0 +ClientRect:::top:::0 +ClientRect:::width:::0 +ClipboardEvent:::clipboardData:::0 +CloseEvent:::code:::0 +CloseEvent:::reason:::0 +CloseEvent:::wasClean:::0 +CompositionEvent:::data:::0 +CompositionEvent:::initCompositionEvent:::0 +CompositionEvent:::initCompositionEvent:::1 +CompositionEvent:::initCompositionEvent:::2 +CompositionEvent:::initCompositionEvent:::3 +CompositionEvent:::initCompositionEvent:::4 +CompositionEvent:::initCompositionEvent:::5 +CompositorProxy:::disconnect:::0 +CompositorProxy:::initialized:::0 +CompositorProxy:::opacity:::1 +CompositorProxy:::scrollLeft:::1 +CompositorProxy:::scrollTop:::1 +CompositorProxy:::setOpacity:::2 +CompositorProxy:::setScrollLeft:::2 +CompositorProxy:::setScrollTop:::2 +CompositorProxy:::setTransform:::2 +CompositorProxy:::supports:::1 +CompositorProxy:::transform:::1 +CompositorWorkerGlobalScope:::cancelAnimationFrame:::1 +CompositorWorkerGlobalScope:::onmessage:::0 +CompositorWorkerGlobalScope:::postMessage:::3 +CompositorWorkerGlobalScope:::postMessage:::4 +CompositorWorkerGlobalScope:::requestAnimationFrame:::1 +CompositorWorkerGlobalScope:::setOnmessage:::1 +CompositorWorker:::onmessage:::0 +CompositorWorker:::postMessage:::3 +CompositorWorker:::postMessage:::4 +CompositorWorker:::setOnmessage:::1 +CompositorWorker:::terminate:::0 +ConstantSourceNode:::offset:::0 +ContainerNode:::getElementById:::1 +ContainerNode:::getElementsByClassName:::1 +ContainerNode:::getElementsByName:::1 +ContainerNode:::getElementsByTagName:::1 +ContainerNode:::getElementsByTagNameNS:::2 +ConvolverNode:::buffer:::0 +ConvolverNode:::normalize:::0 +ConvolverNode:::setBuffer:::2 +ConvolverNode:::setNormalize:::1 +Coordinates:::accuracy:::0 +Coordinates:::altitude:::1 +Coordinates:::altitudeAccuracy:::1 +Coordinates:::heading:::1 +Coordinates:::latitude:::0 +Coordinates:::longitude:::0 +Coordinates:::speed:::1 +Credential:::id:::0 +CredentialsContainer:::get:::1 +CredentialsContainer:::get:::2 +CredentialsContainer:::requireUserMediation:::1 +CredentialsContainer:::store:::2 +Credential:::type:::0 +Crypto:::getRandomValues:::2 +CryptoKey:::algorithm:::1 +CryptoKey:::extractable:::0 +CryptoKey:::type:::0 +CryptoKey:::usages:::0 +Crypto:::subtle:::0 +CSSAngleValue:::degrees:::0 +CSSAngleValue:::gradians:::0 +CSSAngleValue:::radians:::0 +CSSAngleValue:::turns:::0 +CSSCalcLength:::ch:::1 +CSSCalcLength:::cm:::1 +CSSCalcLength:::em:::1 +CSSCalcLength:::ex:::1 +CSSCalcLength:::in:::1 +CSSCalcLength:::mm:::1 +CSSCalcLength:::pc:::1 +CSSCalcLength:::percent:::1 +CSSCalcLength:::pt:::1 +CSSCalcLength:::px:::1 +CSSCalcLength:::rem:::1 +CSSCalcLength:::vh:::1 +CSSCalcLength:::vmax:::1 +CSSCalcLength:::vmin:::1 +CSSCalcLength:::vw:::1 +CSSConditionRule:::conditionText:::0 +CSSFontFaceRule:::style:::0 +CSSGroupingRule:::cssRules:::0 +CSSGroupingRule:::deleteRule:::2 +CSSGroupingRule:::insertRule:::3 +CSSImportRule:::href:::0 +CSSImportRule:::media:::0 +CSSImportRule:::styleSheet:::0 +CSSKeyframeRule:::keyText:::0 +CSSKeyframeRule:::setKeyText:::2 +CSSKeyframeRule:::style:::0 +CSSKeyframesRule::::::1 +CSSKeyframesRule:::appendRule:::1 +CSSKeyframesRule:::cssRules:::0 +CSSKeyframesRule:::deleteRule:::1 +CSSKeyframesRule:::findRule:::1 +CSSKeyframesRule:::length:::0 +CSSKeyframesRule:::name:::0 +CSSKeyframesRule:::setName:::1 +CSSKeywordValue:::keywordValue:::0 +CSSLengthValue:::add:::1 +CSSLengthValue:::divide:::2 +CSSLengthValue:::from:::2 +CSSLengthValue:::from:::3 +CSSLengthValue:::multiply:::1 +CSSLengthValue:::subtract:::1 +CSSMatrix:::a:::0 +CSSMatrix:::b:::0 +CSSMatrix:::c:::0 +CSSMatrixComponent:::a:::0 +CSSMatrixComponent:::b:::0 +CSSMatrixComponent:::c:::0 +CSSMatrixComponent:::d:::0 +CSSMatrixComponent:::e:::0 +CSSMatrixComponent:::f:::0 +CSSMatrixComponent:::m11:::0 +CSSMatrixComponent:::m12:::0 +CSSMatrixComponent:::m13:::0 +CSSMatrixComponent:::m14:::0 +CSSMatrixComponent:::m21:::0 +CSSMatrixComponent:::m22:::0 +CSSMatrixComponent:::m23:::0 +CSSMatrixComponent:::m24:::0 +CSSMatrixComponent:::m31:::0 +CSSMatrixComponent:::m32:::0 +CSSMatrixComponent:::m33:::0 +CSSMatrixComponent:::m34:::0 +CSSMatrixComponent:::m41:::0 +CSSMatrixComponent:::m42:::0 +CSSMatrixComponent:::m43:::0 +CSSMatrixComponent:::m44:::0 +CSSMatrix:::d:::0 +CSSMatrix:::e:::0 +CSSMatrix:::f:::0 +CSSMatrix:::inverse:::1 +CSSMatrix:::m11:::0 +CSSMatrix:::m12:::0 +CSSMatrix:::m13:::0 +CSSMatrix:::m14:::0 +CSSMatrix:::m21:::0 +CSSMatrix:::m22:::0 +CSSMatrix:::m23:::0 +CSSMatrix:::m24:::0 +CSSMatrix:::m31:::0 +CSSMatrix:::m32:::0 +CSSMatrix:::m33:::0 +CSSMatrix:::m34:::0 +CSSMatrix:::m41:::0 +CSSMatrix:::m42:::0 +CSSMatrix:::m43:::0 +CSSMatrix:::m44:::0 +CSSMatrix:::multiply:::0 +CSSMatrix:::multiply:::1 +CSSMatrix:::rotate:::0 +CSSMatrix:::rotate:::1 +CSSMatrix:::rotate:::2 +CSSMatrix:::rotate:::3 +CSSMatrix:::rotateAxisAngle:::0 +CSSMatrix:::rotateAxisAngle:::1 +CSSMatrix:::rotateAxisAngle:::2 +CSSMatrix:::rotateAxisAngle:::3 +CSSMatrix:::rotateAxisAngle:::4 +CSSMatrix:::scale:::0 +CSSMatrix:::scale:::1 +CSSMatrix:::scale:::2 +CSSMatrix:::scale:::3 +CSSMatrix:::setA:::1 +CSSMatrix:::setB:::1 +CSSMatrix:::setC:::1 +CSSMatrix:::setD:::1 +CSSMatrix:::setE:::1 +CSSMatrix:::setF:::1 +CSSMatrix:::setM11:::1 +CSSMatrix:::setM12:::1 +CSSMatrix:::setM13:::1 +CSSMatrix:::setM14:::1 +CSSMatrix:::setM21:::1 +CSSMatrix:::setM22:::1 +CSSMatrix:::setM23:::1 +CSSMatrix:::setM24:::1 +CSSMatrix:::setM31:::1 +CSSMatrix:::setM32:::1 +CSSMatrix:::setM33:::1 +CSSMatrix:::setM34:::1 +CSSMatrix:::setM41:::1 +CSSMatrix:::setM42:::1 +CSSMatrix:::setM43:::1 +CSSMatrix:::setM44:::1 +CSSMatrix:::setMatrixValue:::1 +CSSMatrix:::setMatrixValue:::2 +CSSMatrix:::skewX:::0 +CSSMatrix:::skewX:::1 +CSSMatrix:::skewY:::0 +CSSMatrix:::skewY:::1 +CSSMatrix:::toString:::0 +CSSMatrix:::translate:::0 +CSSMatrix:::translate:::1 +CSSMatrix:::translate:::2 +CSSMatrix:::translate:::3 +CSSMediaRule:::media:::0 +CSSNamespaceRule:::namespaceURI:::0 +CSSNamespaceRule:::prefix:::0 +CSSNumberValue:::value:::0 +CSSNumericValue:::add:::2 +CSSNumericValue:::div:::2 +CSSNumericValue:::mul:::2 +CSSNumericValue:::parse:::2 +CSSNumericValue:::sub:::2 +CSSNumericValue:::to:::2 +CSSPageRule:::selectorText:::0 +CSSPageRule:::setSelectorText:::1 +CSSPageRule:::style:::0 +CSSPerspective:::length:::0 +CSSPositionValue:::x:::0 +CSSPositionValue:::y:::0 +CSSResourceValue:::state:::0 +CSSRotation:::angle:::0 +CSSRotation:::x:::0 +CSSRotation:::y:::0 +CSSRotation:::z:::0 +CSSRule:::cssRules:::0 +CSSRule:::cssText:::0 +CSSRuleList:::item:::1 +CSSRuleList:::length:::0 +CSSRule:::parentRule:::0 +CSSRule:::parentStyleSheet:::0 +CSSRule:::setCSSText:::1 +CSSRule:::type:::0 +CSSScale:::x:::0 +CSSScale:::y:::0 +CSSScale:::z:::0 +CSSSimpleLength:::unit:::0 +CSSSimpleLength:::value:::0 +CSSSkew:::ax:::0 +CSSSkew:::ay:::0 +CSSStyleDeclaration::::::2 +CSSStyleDeclaration:::cssFloat:::0 +CSSStyleDeclaration:::cssText:::0 +CSSStyleDeclaration:::getPropertyPriority:::1 +CSSStyleDeclaration:::getPropertyValue:::1 +CSSStyleDeclaration:::item:::1 +CSSStyleDeclaration:::length:::0 +CSSStyleDeclaration:::parentRule:::0 +CSSStyleDeclaration:::removeProperty:::2 +CSSStyleDeclaration:::setCSSFloat:::2 +CSSStyleDeclaration:::setCSSText:::2 +CSSStyleDeclaration:::setProperty:::3 +CSSStyleDeclaration:::setProperty:::4 +CSSStyleImageValue:::intrinsicHeight:::1 +CSSStyleImageValue:::intrinsicRatio:::1 +CSSStyleImageValue:::intrinsicWidth:::1 +CSSStyleRule:::selectorText:::0 +CSSStyleRule:::setSelectorText:::1 +CSSStyleRule:::style:::0 +CSSStyleSheet:::addRule:::1 +CSSStyleSheet:::addRule:::2 +CSSStyleSheet:::addRule:::3 +CSSStyleSheet:::addRule:::4 +CSSStyleSheet:::cssRules:::0 +CSSStyleSheet:::deleteRule:::2 +CSSStyleSheet:::insertRule:::2 +CSSStyleSheet:::insertRule:::3 +CSSStyleSheet:::item:::1 +CSSStyleSheet:::ownerRule:::0 +CSSStyleSheet:::removeRule:::1 +CSSStyleSheet:::removeRule:::2 +CSSStyleSheet:::rules:::0 +CSSStyleValue:::cssText:::0 +CSSStyleValue:::parse:::4 +CSSStyleVariableReferenceValue:::fallback:::0 +CSSStyleVariableReferenceValue:::variable:::0 +CSSTransformComponent:::asMatrix:::0 +CSSTransformComponent:::cssText:::0 +CSSTransformComponent:::is2D:::0 +CSSTransformValue:::componentAtIndex:::1 +CSSTransformValue:::is2D:::0 +CSSTransformValue:::length:::0 +CSSTranslation:::x:::0 +CSSTranslation:::y:::0 +CSSTranslation:::z:::0 +CSSUnitValue:::cssType:::0 +CSSUnitValue:::setUnit:::2 +CSSUnitValue:::setValue:::1 +CSSUnitValue:::unit:::0 +CSSUnitValue:::value:::0 +CSSUnparsedValue:::fragmentAtIndex:::2 +CSSUnparsedValue:::length:::0 +CSSURLImageValue:::url:::0 +CSSViewportRule:::style:::0 +CustomElementRegistry:::define:::4 +CustomElementRegistry:::define:::5 +CustomElementRegistry:::get:::1 +CustomElementRegistry:::whenDefined:::3 +CustomEvent:::detail:::0 +CustomEvent:::initCustomEvent:::1 +CustomEvent:::initCustomEvent:::2 +CustomEvent:::initCustomEvent:::3 +CustomEvent:::initCustomEvent:::4 +DatabaseCallback:::handleEvent:::1 +Database:::changeVersion:::2 +Database:::changeVersion:::3 +Database:::changeVersion:::4 +Database:::changeVersion:::5 +Database:::readTransaction:::1 +Database:::readTransaction:::2 +Database:::readTransaction:::3 +Database:::transaction:::1 +Database:::transaction:::2 +Database:::transaction:::3 +Database:::version:::0 +DataTransfer:::clearData:::0 +DataTransfer:::clearData:::1 +DataTransfer:::dropEffect:::0 +DataTransfer:::effectAllowed:::0 +DataTransfer:::files:::0 +DataTransfer:::getData:::1 +DataTransferItemFileSystem:::webkitGetAsEntry:::2 +DataTransferItem:::getAsFile:::0 +DataTransferItem:::getAsString:::2 +DataTransferItem:::kind:::0 +DataTransferItemList:::add:::1 +DataTransferItemList:::add:::3 +DataTransferItemList:::clear:::0 +DataTransferItemList:::deleteItem:::2 +DataTransferItemList:::item:::1 +DataTransferItemList:::length:::0 +DataTransfer:::items:::0 +DataTransferItem:::type:::0 +DataTransfer:::setData:::2 +DataTransfer:::setDragImage:::3 +DataTransfer:::setDropEffect:::1 +DataTransfer:::setEffectAllowed:::1 +DataTransfer:::types:::0 +DedicatedWorkerGlobalScope:::close:::0 +DedicatedWorkerGlobalScope:::onmessage:::0 +DedicatedWorkerGlobalScope:::postMessage:::3 +DedicatedWorkerGlobalScope:::postMessage:::4 +DedicatedWorkerGlobalScope:::setOnmessage:::1 +DelayNode:::delayTime:::0 +DeprecatedStorageInfo:::queryUsageAndQuota:::2 +DeprecatedStorageInfo:::queryUsageAndQuota:::3 +DeprecatedStorageInfo:::queryUsageAndQuota:::4 +DeprecatedStorageInfo:::requestQuota:::3 +DeprecatedStorageInfo:::requestQuota:::4 +DeprecatedStorageInfo:::requestQuota:::5 +DeprecatedStorageQuota:::queryUsageAndQuota:::2 +DeprecatedStorageQuota:::queryUsageAndQuota:::3 +DeprecatedStorageQuota:::requestQuota:::2 +DeprecatedStorageQuota:::requestQuota:::3 +DeprecatedStorageQuota:::requestQuota:::4 +DetectedBarcode:::boundingBox:::0 +DetectedBarcode:::cornerPoints:::0 +DetectedBarcode:::rawValue:::0 +DetectedFace:::boundingBox:::0 +DetectedText:::boundingBox:::0 +DetectedText:::rawValue:::0 +DeviceAcceleration:::x:::1 +DeviceAcceleration:::y:::1 +DeviceAcceleration:::z:::1 +DeviceLightEvent:::value:::0 +DeviceMotionEvent:::acceleration:::0 +DeviceMotionEvent:::accelerationIncludingGravity:::0 +DeviceMotionEvent:::interval:::0 +DeviceMotionEvent:::rotationRate:::0 +DeviceOrientationEvent:::absolute:::0 +DeviceOrientationEvent:::alpha:::1 +DeviceOrientationEvent:::beta:::1 +DeviceOrientationEvent:::gamma:::1 +DeviceRotationRate:::alpha:::1 +DeviceRotationRate:::beta:::1 +DeviceRotationRate:::gamma:::1 +DevToolsHost:::copyText:::1 +DevToolsHostFileSystem:::isolatedFileSystem:::3 +DevToolsHostFileSystem:::upgradeDraggedFileSystemPermissions:::2 +DevToolsHost:::getSelectionBackgroundColor:::0 +DevToolsHost:::getSelectionForegroundColor:::0 +DevToolsHost:::isHostedMode:::0 +DevToolsHost:::isUnderTest:::0 +DevToolsHost:::platform:::0 +DevToolsHost:::sendMessageToEmbedder:::1 +DevToolsHost:::setInjectedScriptForOrigin:::2 +DevToolsHost:::showContextMenuAtPoint:::3 +DevToolsHost:::showContextMenuAtPoint:::4 +DevToolsHost:::zoomFactor:::0 +DictionaryTest:::get:::0 +DictionaryTest:::getDerived:::0 +DictionaryTest:::getDerivedDerived:::0 +DictionaryTest:::getDictionaryMemberProperties:::1 +DictionaryTest:::set:::0 +DictionaryTest:::set:::1 +DictionaryTest:::setDerived:::1 +DictionaryTest:::setDerivedDerived:::1 +DictionaryTest:::stringFromIterable:::3 +DirectoryEntry:::createReader:::0 +DirectoryEntry:::getDirectory:::1 +DirectoryEntry:::getDirectory:::2 +DirectoryEntry:::getDirectory:::3 +DirectoryEntry:::getDirectory:::4 +DirectoryEntry:::getFile:::1 +DirectoryEntry:::getFile:::2 +DirectoryEntry:::getFile:::3 +DirectoryEntry:::getFile:::4 +DirectoryEntry:::removeRecursively:::1 +DirectoryEntry:::removeRecursively:::2 +DirectoryEntrySync:::createReader:::0 +DirectoryEntrySync:::getDirectory:::3 +DirectoryEntrySync:::getFile:::3 +DirectoryEntrySync:::removeRecursively:::1 +DirectoryReader:::readEntries:::1 +DirectoryReader:::readEntries:::2 +DirectoryReaderSync:::readEntries:::1 +Document:::addressSpaceForBindings:::0 +Document:::adoptNode:::2 +Document:::all:::0 +Document:::anchors:::0 +DocumentAnimation:::timeline:::1 +Document:::applets:::0 +Document:::body:::0 +Document:::caretRangeFromPoint:::0 +Document:::caretRangeFromPoint:::1 +Document:::caretRangeFromPoint:::2 +Document:::characterSet:::0 +Document:::close:::1 +Document:::compatMode:::0 +Document:::contentType:::0 +Document:::cookie:::1 +Document:::createAttribute:::2 +Document:::createAttributeNS:::3 +Document:::createCDATASection:::2 +Document:::createComment:::1 +Document:::createDocumentFragment:::0 +Document:::createElement:::2 +Document:::createElement:::3 +Document:::createElementNS:::3 +Document:::createElementNS:::4 +Document:::createEvent:::3 +Document:::createNodeIterator:::1 +Document:::createNodeIterator:::2 +Document:::createNodeIterator:::3 +Document:::createProcessingInstruction:::3 +Document:::createRange:::0 +Document:::createTextNode:::1 +Document:::createTouch:::10 +Document:::createTouch:::11 +Document:::createTouch:::7 +Document:::createTouch:::8 +Document:::createTouch:::9 +Document:::createTouchList:::1 +Document:::createTreeWalker:::1 +Document:::createTreeWalker:::2 +Document:::createTreeWalker:::3 +Document:::currentScriptForBinding:::0 +Document:::currentScriptForBinding:::1 +Document:::designMode:::0 +Document:::dir:::0 +Document:::doctype:::0 +Document:::documentElement:::0 +Document:::domain:::0 +Document:::domWindow:::0 +Document:::embeds:::0 +Document:::execCommand:::2 +Document:::execCommand:::3 +Document:::execCommand:::4 +Document:::exitPointerLock:::0 +DocumentFontFaceSet:::fonts:::1 +Document:::forms:::0 +DocumentFullscreen:::currentFullScreenElement:::1 +DocumentFullscreen:::exitFullscreen:::1 +DocumentFullscreen:::fullscreenElement:::1 +DocumentFullscreen:::fullscreenEnabled:::1 +DocumentFullscreen:::onfullscreenchange:::1 +DocumentFullscreen:::onfullscreenerror:::1 +DocumentFullscreen:::onwebkitfullscreenchange:::1 +DocumentFullscreen:::onwebkitfullscreenerror:::1 +DocumentFullscreen:::setOnfullscreenchange:::2 +DocumentFullscreen:::setOnfullscreenerror:::2 +DocumentFullscreen:::setOnwebkitfullscreenchange:::2 +DocumentFullscreen:::setOnwebkitfullscreenerror:::2 +Document:::getElementsByClassName:::1 +Document:::getElementsByName:::1 +Document:::getElementsByTagName:::1 +Document:::getElementsByTagNameNS:::2 +Document:::hasFocus:::0 +Document:::head:::0 +Document:::hidden:::0 +Document:::images:::0 +Document:::implementation:::0 +Document:::importNode:::2 +Document:::importNode:::3 +Document:::lastModified:::0 +Document:::links:::0 +Document:::location:::0 +Document:::onbeforecopy:::0 +Document:::onbeforecut:::0 +Document:::onbeforepaste:::0 +Document:::oncopy:::0 +Document:::oncut:::0 +Document:::onpaste:::0 +Document:::onpointerlockchange:::0 +Document:::onpointerlockerror:::0 +Document:::onreadystatechange:::0 +Document:::onsearch:::0 +Document:::onsecuritypolicyviolation:::0 +Document:::onselectionchange:::0 +Document:::onselectstart:::0 +Document:::onwheel:::0 +Document:::open:::1 +Document:::origin:::0 +DocumentOrShadowRoot:::activeElement:::1 +DocumentOrShadowRoot:::elementFromPoint:::3 +DocumentOrShadowRoot:::elementsFromPoint:::3 +DocumentOrShadowRoot:::fullscreenElement:::1 +DocumentOrShadowRoot:::getSelection:::1 +DocumentOrShadowRoot:::pointerLockElement:::1 +DocumentOrShadowRoot:::styleSheets:::1 +Document:::preferredStylesheetSet:::0 +Document:::queryCommandEnabled:::2 +Document:::queryCommandIndeterm:::2 +Document:::queryCommandState:::2 +Document:::queryCommandSupported:::2 +Document:::queryCommandValue:::2 +Document:::readyState:::0 +Document:::referrer:::0 +Document:::registerElement:::3 +Document:::registerElement:::4 +Document:::rootScroller:::0 +Document:::scripts:::0 +Document:::scrollingElement:::0 +Document:::selectedStylesheetSet:::0 +Document:::setBody:::2 +Document:::setCookie:::2 +Document:::setDesignMode:::1 +Document:::setDir:::1 +Document:::setDomain:::2 +Document:::setOnbeforecopy:::1 +Document:::setOnbeforecut:::1 +Document:::setOnbeforepaste:::1 +Document:::setOncopy:::1 +Document:::setOncut:::1 +Document:::setOnpaste:::1 +Document:::setOnpointerlockchange:::1 +Document:::setOnpointerlockerror:::1 +Document:::setOnreadystatechange:::1 +Document:::setOnsearch:::1 +Document:::setOnsecuritypolicyviolation:::1 +Document:::setOnselectionchange:::1 +Document:::setOnselectstart:::1 +Document:::setOnwheel:::1 +Document:::setRootScroller:::2 +Document:::setSelectedStylesheetSet:::1 +Document:::setTitle:::1 +Document:::setXMLStandalone:::2 +Document:::setXMLVersion:::2 +Document:::suborigin:::0 +Document:::title:::0 +DocumentType:::name:::0 +DocumentType:::publicId:::0 +DocumentType:::systemId:::0 +Document:::urlForBinding:::0 +Document:::visibilityState:::0 +Document:::write:::3 +Document:::writeln:::3 +Document:::xmlEncoding:::0 +Document:::xmlStandalone:::0 +Document:::xmlVersion:::0 +DocumentXPathEvaluator:::createExpression:::3 +DocumentXPathEvaluator:::createExpression:::4 +DocumentXPathEvaluator:::createNSResolver:::2 +DocumentXPathEvaluator:::evaluate:::4 +DocumentXPathEvaluator:::evaluate:::5 +DocumentXPathEvaluator:::evaluate:::6 +DocumentXPathEvaluator:::evaluate:::7 +DOMArrayBuffer:::byteLength:::0 +DOMArrayBufferView:::buffer:::0 +DOMArrayBufferView:::byteLength:::0 +DOMArrayBufferView:::byteOffset:::0 +DOMError:::message:::0 +DOMError:::name:::0 +DOMException:::code:::0 +DOMException:::message:::0 +DOMException:::name:::0 +DOMException:::toString:::0 +DOMFileSystemBase:::name:::0 +DOMFileSystem:::name:::0 +DOMFileSystem:::root:::0 +DOMFileSystemSync:::name:::0 +DOMFileSystemSync:::root:::0 +DOMImplementation:::createDocument:::3 +DOMImplementation:::createDocument:::4 +DOMImplementation:::createDocumentType:::4 +DOMImplementation:::createHTMLDocument:::0 +DOMImplementation:::createHTMLDocument:::1 +DOMImplementation:::hasFeature:::0 +DOMMatrix:::a:::0 +DOMMatrix:::b:::0 +DOMMatrix:::c:::0 +DOMMatrix:::d:::0 +DOMMatrix:::e:::0 +DOMMatrix:::f:::0 +DOMMatrix:::fromFloat32Array:::2 +DOMMatrix:::fromFloat64Array:::2 +DOMMatrix:::fromMatrix:::1 +DOMMatrix:::fromMatrix:::2 +DOMMatrix:::invertSelf:::0 +DOMMatrix:::m11:::0 +DOMMatrix:::m12:::0 +DOMMatrix:::m13:::0 +DOMMatrix:::m14:::0 +DOMMatrix:::m21:::0 +DOMMatrix:::m22:::0 +DOMMatrix:::m23:::0 +DOMMatrix:::m24:::0 +DOMMatrix:::m31:::0 +DOMMatrix:::m32:::0 +DOMMatrix:::m33:::0 +DOMMatrix:::m34:::0 +DOMMatrix:::m41:::0 +DOMMatrix:::m42:::0 +DOMMatrix:::m43:::0 +DOMMatrix:::m44:::0 +DOMMatrix:::multiplySelf:::1 +DOMMatrix:::multiplySelf:::2 +DOMMatrix:::preMultiplySelf:::1 +DOMMatrix:::preMultiplySelf:::2 +DOMMatrixReadOnly:::a:::0 +DOMMatrixReadOnly:::b:::0 +DOMMatrixReadOnly:::c:::0 +DOMMatrixReadOnly:::d:::0 +DOMMatrixReadOnly:::e:::0 +DOMMatrixReadOnly:::f:::0 +DOMMatrixReadOnly:::flipX:::0 +DOMMatrixReadOnly:::flipY:::0 +DOMMatrixReadOnly:::fromFloat32Array:::2 +DOMMatrixReadOnly:::fromFloat64Array:::2 +DOMMatrixReadOnly:::fromMatrix:::1 +DOMMatrixReadOnly:::fromMatrix:::2 +DOMMatrixReadOnly:::inverse:::0 +DOMMatrixReadOnly:::is2D:::0 +DOMMatrixReadOnly:::isIdentity:::0 +DOMMatrixReadOnly:::m11:::0 +DOMMatrixReadOnly:::m12:::0 +DOMMatrixReadOnly:::m13:::0 +DOMMatrixReadOnly:::m14:::0 +DOMMatrixReadOnly:::m21:::0 +DOMMatrixReadOnly:::m22:::0 +DOMMatrixReadOnly:::m23:::0 +DOMMatrixReadOnly:::m24:::0 +DOMMatrixReadOnly:::m31:::0 +DOMMatrixReadOnly:::m32:::0 +DOMMatrixReadOnly:::m33:::0 +DOMMatrixReadOnly:::m34:::0 +DOMMatrixReadOnly:::m41:::0 +DOMMatrixReadOnly:::m42:::0 +DOMMatrixReadOnly:::m43:::0 +DOMMatrixReadOnly:::m44:::0 +DOMMatrixReadOnly:::multiply:::1 +DOMMatrixReadOnly:::multiply:::2 +DOMMatrixReadOnly:::rotate:::0 +DOMMatrixReadOnly:::rotate:::1 +DOMMatrixReadOnly:::rotate:::2 +DOMMatrixReadOnly:::rotate:::3 +DOMMatrixReadOnly:::rotateAxisAngle:::0 +DOMMatrixReadOnly:::rotateAxisAngle:::1 +DOMMatrixReadOnly:::rotateAxisAngle:::2 +DOMMatrixReadOnly:::rotateAxisAngle:::3 +DOMMatrixReadOnly:::rotateAxisAngle:::4 +DOMMatrixReadOnly:::rotateFromVector:::0 +DOMMatrixReadOnly:::rotateFromVector:::1 +DOMMatrixReadOnly:::rotateFromVector:::2 +DOMMatrixReadOnly:::scale:::0 +DOMMatrixReadOnly:::scale:::1 +DOMMatrixReadOnly:::scale:::2 +DOMMatrixReadOnly:::scale:::3 +DOMMatrixReadOnly:::scale3d:::0 +DOMMatrixReadOnly:::scale3d:::1 +DOMMatrixReadOnly:::scale3d:::2 +DOMMatrixReadOnly:::scale3d:::3 +DOMMatrixReadOnly:::scale3d:::4 +DOMMatrixReadOnly:::scale:::4 +DOMMatrixReadOnly:::scale:::5 +DOMMatrixReadOnly:::scale:::6 +DOMMatrixReadOnly:::skewX:::0 +DOMMatrixReadOnly:::skewX:::1 +DOMMatrixReadOnly:::skewY:::0 +DOMMatrixReadOnly:::skewY:::1 +DOMMatrixReadOnly:::toFloat32Array:::0 +DOMMatrixReadOnly:::toFloat64Array:::0 +DOMMatrixReadOnly:::toJSONForBinding:::0 +DOMMatrixReadOnly:::toString:::0 +DOMMatrixReadOnly:::transformPoint:::0 +DOMMatrixReadOnly:::transformPoint:::1 +DOMMatrixReadOnly:::translate:::0 +DOMMatrixReadOnly:::translate:::1 +DOMMatrixReadOnly:::translate:::2 +DOMMatrixReadOnly:::translate:::3 +DOMMatrix:::rotateAxisAngleSelf:::0 +DOMMatrix:::rotateAxisAngleSelf:::1 +DOMMatrix:::rotateAxisAngleSelf:::2 +DOMMatrix:::rotateAxisAngleSelf:::3 +DOMMatrix:::rotateAxisAngleSelf:::4 +DOMMatrix:::rotateFromVectorSelf:::0 +DOMMatrix:::rotateFromVectorSelf:::1 +DOMMatrix:::rotateFromVectorSelf:::2 +DOMMatrix:::rotateSelf:::0 +DOMMatrix:::rotateSelf:::1 +DOMMatrix:::rotateSelf:::2 +DOMMatrix:::rotateSelf:::3 +DOMMatrix:::scale3dSelf:::0 +DOMMatrix:::scale3dSelf:::1 +DOMMatrix:::scale3dSelf:::2 +DOMMatrix:::scale3dSelf:::3 +DOMMatrix:::scale3dSelf:::4 +DOMMatrix:::scaleSelf:::0 +DOMMatrix:::scaleSelf:::1 +DOMMatrix:::scaleSelf:::2 +DOMMatrix:::scaleSelf:::3 +DOMMatrix:::scaleSelf:::4 +DOMMatrix:::scaleSelf:::5 +DOMMatrix:::scaleSelf:::6 +DOMMatrix:::setA:::1 +DOMMatrix:::setB:::1 +DOMMatrix:::setC:::1 +DOMMatrix:::setD:::1 +DOMMatrix:::setE:::1 +DOMMatrix:::setF:::1 +DOMMatrix:::setM11:::1 +DOMMatrix:::setM12:::1 +DOMMatrix:::setM13:::1 +DOMMatrix:::setM14:::1 +DOMMatrix:::setM21:::1 +DOMMatrix:::setM22:::1 +DOMMatrix:::setM23:::1 +DOMMatrix:::setM24:::1 +DOMMatrix:::setM31:::1 +DOMMatrix:::setM32:::1 +DOMMatrix:::setM33:::1 +DOMMatrix:::setM34:::1 +DOMMatrix:::setM41:::1 +DOMMatrix:::setM42:::1 +DOMMatrix:::setM43:::1 +DOMMatrix:::setM44:::1 +DOMMatrix:::setMatrixValue:::2 +DOMMatrix:::skewXSelf:::0 +DOMMatrix:::skewXSelf:::1 +DOMMatrix:::skewYSelf:::0 +DOMMatrix:::skewYSelf:::1 +DOMMatrix:::translateSelf:::0 +DOMMatrix:::translateSelf:::1 +DOMMatrix:::translateSelf:::2 +DOMMatrix:::translateSelf:::3 +DOMMimeTypeArray:::item:::1 +DOMMimeTypeArray:::length:::0 +DOMMimeTypeArray:::namedItem:::1 +DOMMimeType:::description:::0 +DOMMimeType:::enabledPlugin:::0 +DOMMimeType:::suffixes:::0 +DOMMimeType:::type:::0 +DOMParser:::parseFromString:::2 +DOMPluginArray:::item:::1 +DOMPluginArray:::length:::0 +DOMPluginArray:::namedItem:::1 +DOMPluginArray:::refresh:::0 +DOMPluginArray:::refresh:::1 +DOMPlugin:::description:::0 +DOMPlugin:::filename:::0 +DOMPlugin:::item:::1 +DOMPlugin:::length:::0 +DOMPlugin:::name:::0 +DOMPlugin:::namedItem:::1 +DOMPoint:::fromPoint:::0 +DOMPoint:::fromPoint:::1 +DOMPointReadOnly:::fromPoint:::0 +DOMPointReadOnly:::fromPoint:::1 +DOMPointReadOnly:::matrixTransform:::1 +DOMPointReadOnly:::matrixTransform:::2 +DOMPointReadOnly:::toJSONForBinding:::0 +DOMPointReadOnly:::w:::0 +DOMPointReadOnly:::x:::0 +DOMPointReadOnly:::y:::0 +DOMPointReadOnly:::z:::0 +DOMPoint:::setW:::1 +DOMPoint:::setX:::1 +DOMPoint:::setY:::1 +DOMPoint:::setZ:::1 +DOMPoint:::w:::0 +DOMPoint:::x:::0 +DOMPoint:::y:::0 +DOMPoint:::z:::0 +DOMQuad:::fromQuad:::0 +DOMQuad:::fromQuad:::1 +DOMQuad:::fromRect:::0 +DOMQuad:::fromRect:::1 +DOMQuad:::getBounds:::0 +DOMQuad:::p1:::0 +DOMQuad:::p2:::0 +DOMQuad:::p3:::0 +DOMQuad:::p4:::0 +DOMQuad:::toJSONForBinding:::0 +DOMRect:::fromRect:::0 +DOMRect:::fromRect:::1 +DOMRect:::height:::0 +DOMRectReadOnly:::bottom:::0 +DOMRectReadOnly:::fromRect:::0 +DOMRectReadOnly:::fromRect:::1 +DOMRectReadOnly:::height:::0 +DOMRectReadOnly:::left:::0 +DOMRectReadOnly:::right:::0 +DOMRectReadOnly:::toJSONForBinding:::0 +DOMRectReadOnly:::top:::0 +DOMRectReadOnly:::width:::0 +DOMRectReadOnly:::x:::0 +DOMRectReadOnly:::y:::0 +DOMRect:::setHeight:::1 +DOMRect:::setWidth:::1 +DOMRect:::setX:::1 +DOMRect:::setY:::1 +DOMRect:::width:::0 +DOMRect:::x:::0 +DOMRect:::y:::0 +DOMSelection:::addRange:::1 +DOMSelection:::anchorNode:::0 +DOMSelection:::anchorOffset:::0 +DOMSelection:::baseNode:::0 +DOMSelection:::baseOffset:::0 +DOMSelection:::collapse:::2 +DOMSelection:::collapse:::3 +DOMSelection:::collapseToEnd:::1 +DOMSelection:::collapseToStart:::1 +DOMSelection:::containsNode:::1 +DOMSelection:::containsNode:::2 +DOMSelection:::deleteFromDocument:::0 +DOMSelection:::empty:::0 +DOMSelection:::extend:::2 +DOMSelection:::extend:::3 +DOMSelection:::extentNode:::0 +DOMSelection:::extentOffset:::0 +DOMSelection:::focusNode:::0 +DOMSelection:::focusOffset:::0 +DOMSelection:::getRangeAt:::2 +DOMSelection:::isCollapsed:::0 +DOMSelection:::modify:::0 +DOMSelection:::modify:::1 +DOMSelection:::modify:::2 +DOMSelection:::modify:::3 +DOMSelection:::rangeCount:::0 +DOMSelection:::removeAllRanges:::0 +DOMSelection:::removeRange:::1 +DOMSelection:::selectAllChildren:::2 +DOMSelection:::setBaseAndExtent:::5 +DOMSelection:::toString:::0 +DOMSelection:::type:::0 +DOMSharedArrayBuffer:::byteLength:::0 +DOMStringList:::contains:::1 +DOMStringList:::item:::1 +DOMStringList:::length:::0 +DOMStringMap::::::1 +DOMStringMap::::::3 +DOMStringMap:::item:::1 +DOMTokenList:::add:::2 +DOMTokenList:::contains:::2 +DOMTokenList:::item:::1 +DOMTokenList:::length:::0 +DOMTokenList:::remove:::2 +DOMTokenList:::setValue:::1 +DOMTokenList:::supports:::2 +DOMTokenList:::toggle:::2 +DOMTokenList:::toggle:::3 +DOMTokenList:::toString:::0 +DOMTokenList:::value:::0 +DOMURL:::hash:::0 +DOMURL:::host:::0 +DOMURL:::hostname:::0 +DOMURL:::href:::0 +DOMURL:::origin:::0 +DOMURL:::password:::0 +DOMURL:::pathname:::0 +DOMURL:::port:::0 +DOMURL:::protocol:::0 +DOMURL:::search:::0 +DOMURL:::searchParams:::0 +DOMURL:::setHash:::1 +DOMURL:::setHost:::1 +DOMURL:::setHostname:::1 +DOMURL:::setHref:::1 +DOMURL:::setPassword:::1 +DOMURL:::setPathname:::1 +DOMURL:::setPort:::1 +DOMURL:::setProtocol:::1 +DOMURL:::setSearch:::1 +DOMURL:::setUsername:::1 +DOMURL:::username:::0 +DOMURLUtilsReadOnly:::hash:::0 +DOMURLUtilsReadOnly:::host:::0 +DOMURLUtilsReadOnly:::hostname:::0 +DOMURLUtilsReadOnly:::href:::0 +DOMURLUtilsReadOnly:::origin:::0 +DOMURLUtilsReadOnly:::password:::0 +DOMURLUtilsReadOnly:::pathname:::0 +DOMURLUtilsReadOnly:::port:::0 +DOMURLUtilsReadOnly:::protocol:::0 +DOMURLUtilsReadOnly:::search:::0 +DOMURLUtilsReadOnly:::username:::0 +DOMURLUtils:::setHash:::1 +DOMURLUtils:::setHost:::1 +DOMURLUtils:::setHostname:::1 +DOMURLUtils:::setHref:::1 +DOMURLUtils:::setPassword:::1 +DOMURLUtils:::setPathname:::1 +DOMURLUtils:::setPort:::1 +DOMURLUtils:::setProtocol:::1 +DOMURLUtils:::setSearch:::1 +DOMURLUtils:::setUsername:::1 +DOMVisualViewport:::clientHeight:::0 +DOMVisualViewport:::clientWidth:::0 +DOMVisualViewport:::pageX:::0 +DOMVisualViewport:::pageY:::0 +DOMVisualViewport:::scale:::0 +DOMVisualViewport:::scrollLeft:::0 +DOMVisualViewport:::scrollTop:::0 +DOMWebSocket:::binaryType:::0 +DOMWebSocket:::bufferedAmount:::0 +DOMWebSocket:::close:::1 +DOMWebSocket:::close:::2 +DOMWebSocket:::close:::3 +DOMWebSocket:::extensions:::0 +DOMWebSocket:::onclose:::0 +DOMWebSocket:::onerror:::0 +DOMWebSocket:::onmessage:::0 +DOMWebSocket:::onopen:::0 +DOMWebSocket:::protocol:::0 +DOMWebSocket:::readyState:::0 +DOMWebSocket:::send:::2 +DOMWebSocket:::setBinaryType:::1 +DOMWebSocket:::setOnclose:::1 +DOMWebSocket:::setOnerror:::1 +DOMWebSocket:::setOnmessage:::1 +DOMWebSocket:::setOnopen:::1 +DOMWebSocket:::url:::0 +DOMWindow::::::1 +DOMWindow:::alert:::1 +DOMWindow:::alert:::2 +DOMWindow:::applicationCache:::0 +DOMWindowBase64:::atob:::2 +DOMWindowBase64:::btoa:::2 +DOMWindow:::blur:::0 +DOMWindow:::cancelAnimationFrame:::1 +DOMWindow:::cancelIdleCallback:::1 +DOMWindow:::captureEvents:::0 +DOMWindow:::clientInformation:::0 +DOMWindow:::close:::1 +DOMWindow:::closed:::0 +DOMWindow:::confirm:::1 +DOMWindow:::confirm:::2 +DOMWindowCrypto:::crypto:::1 +DOMWindowCSS:::escape:::1 +DOMWindowCSS:::supports:::1 +DOMWindowCSS:::supports:::2 +DOMWindow:::customElements:::1 +DOMWindow:::defaultStatus:::0 +DOMWindowDeviceLight:::ondevicelight:::1 +DOMWindowDeviceLight:::setOndevicelight:::2 +DOMWindowDeviceMotion:::ondevicemotion:::1 +DOMWindowDeviceMotion:::setOndevicemotion:::2 +DOMWindowDeviceOrientation:::ondeviceorientation:::1 +DOMWindowDeviceOrientation:::ondeviceorientationabsolute:::1 +DOMWindowDeviceOrientation:::setOndeviceorientation:::2 +DOMWindowDeviceOrientation:::setOndeviceorientationabsolute:::2 +DOMWindow:::devicePixelRatio:::0 +DOMWindow:::document:::0 +DOMWindow:::event:::0 +DOMWindowEventHandlers:::onbeforeunload:::1 +DOMWindowEventHandlers:::onhashchange:::1 +DOMWindowEventHandlers:::onlanguagechange:::1 +DOMWindowEventHandlers:::onmessage:::1 +DOMWindowEventHandlers:::onoffline:::1 +DOMWindowEventHandlers:::ononline:::1 +DOMWindowEventHandlers:::onpagehide:::1 +DOMWindowEventHandlers:::onpageshow:::1 +DOMWindowEventHandlers:::onpopstate:::1 +DOMWindowEventHandlers:::onrejectionhandled:::1 +DOMWindowEventHandlers:::onstorage:::1 +DOMWindowEventHandlers:::onunhandledrejection:::1 +DOMWindowEventHandlers:::onunload:::1 +DOMWindowEventHandlers:::setOnbeforeunload:::2 +DOMWindowEventHandlers:::setOnhashchange:::2 +DOMWindowEventHandlers:::setOnlanguagechange:::2 +DOMWindowEventHandlers:::setOnmessage:::2 +DOMWindowEventHandlers:::setOnoffline:::2 +DOMWindowEventHandlers:::setOnonline:::2 +DOMWindowEventHandlers:::setOnpagehide:::2 +DOMWindowEventHandlers:::setOnpageshow:::2 +DOMWindowEventHandlers:::setOnpopstate:::2 +DOMWindowEventHandlers:::setOnrejectionhandled:::2 +DOMWindowEventHandlers:::setOnstorage:::2 +DOMWindowEventHandlers:::setOnunhandledrejection:::2 +DOMWindowEventHandlers:::setOnunload:::2 +DOMWindow:::external:::0 +DOMWindowFileSystem:::webkitRequestFileSystem:::4 +DOMWindowFileSystem:::webkitRequestFileSystem:::5 +DOMWindowFileSystem:::webkitResolveLocalFileSystemURL:::3 +DOMWindowFileSystem:::webkitResolveLocalFileSystemURL:::4 +DOMWindow:::find:::0 +DOMWindow:::find:::1 +DOMWindow:::find:::2 +DOMWindow:::find:::3 +DOMWindow:::find:::4 +DOMWindow:::find:::5 +DOMWindow:::find:::6 +DOMWindow:::find:::7 +DOMWindow:::focus:::1 +DOMWindow:::frameElement:::0 +DOMWindow:::frames:::0 +DOMWindow:::getComputedStyle:::1 +DOMWindow:::getComputedStyle:::2 +DOMWindow:::getMatchedCSSRules:::0 +DOMWindow:::getMatchedCSSRules:::1 +DOMWindow:::getMatchedCSSRules:::2 +DOMWindow:::getSelection:::0 +DOMWindow:::history:::0 +DOMWindow:::innerHeight:::0 +DOMWindow:::innerWidth:::0 +DOMWindow:::isSecureContext:::0 +DOMWindow:::length:::0 +DOMWindow:::location:::0 +DOMWindow:::locationbar:::0 +DOMWindow:::matchMedia:::1 +DOMWindowMediaStream:::setWebkitMediaStream:::2 +DOMWindowMediaStream:::setWebkitRTCPeerConnection:::2 +DOMWindowMediaStream:::webkitMediaStream:::1 +DOMWindowMediaStream:::webkitRTCPeerConnection:::1 +DOMWindow:::menubar:::0 +DOMWindow:::moveBy:::2 +DOMWindow:::moveTo:::2 +DOMWindow:::name:::0 +DOMWindow:::navigator:::0 +DOMWindow:::offscreenBuffering:::0 +DOMWindow:::onanimationend:::0 +DOMWindow:::onanimationiteration:::0 +DOMWindow:::onanimationstart:::0 +DOMWindow:::onorientationchange:::0 +DOMWindow:::onsearch:::0 +DOMWindow:::ontransitionend:::0 +DOMWindow:::onwebkitanimationend:::0 +DOMWindow:::onwebkitanimationiteration:::0 +DOMWindow:::onwebkitanimationstart:::0 +DOMWindow:::onwebkittransitionend:::0 +DOMWindow:::onwheel:::0 +DOMWindow:::open:::2 +DOMWindow:::open:::3 +DOMWindow:::opener:::0 +DOMWindow:::orientation:::0 +DOMWindow:::origin:::0 +DOMWindow:::outerHeight:::0 +DOMWindow:::outerWidth:::0 +DOMWindow:::pageXOffset:::0 +DOMWindow:::pageYOffset:::0 +DOMWindow:::parent:::0 +DOMWindowPerformance:::performance:::1 +DOMWindow:::personalbar:::0 +DOMWindow:::postMessage:::3 +DOMWindow:::postMessage:::4 +DOMWindow:::print:::1 +DOMWindow:::prompt:::1 +DOMWindow:::prompt:::2 +DOMWindow:::prompt:::3 +DOMWindowQuota:::webkitStorageInfo:::1 +DOMWindow:::releaseEvents:::0 +DOMWindow:::requestAnimationFrame:::1 +DOMWindow:::requestIdleCallback:::1 +DOMWindow:::requestIdleCallback:::2 +DOMWindow:::resizeBy:::2 +DOMWindow:::resizeTo:::2 +DOMWindow:::screen:::0 +DOMWindow:::screenLeft:::0 +DOMWindow:::screenTop:::0 +DOMWindow:::screenX:::0 +DOMWindow:::screenY:::0 +DOMWindow:::scroll:::0 +DOMWindow:::scroll:::1 +DOMWindow:::scroll:::2 +DOMWindow:::scrollbars:::0 +DOMWindow:::scrollBy:::0 +DOMWindow:::scrollBy:::1 +DOMWindow:::scrollBy:::2 +DOMWindow:::scrollTo:::0 +DOMWindow:::scrollTo:::1 +DOMWindow:::scrollTo:::2 +DOMWindow:::scrollX:::0 +DOMWindow:::scrollY:::0 +DOMWindow:::self:::0 +DOMWindow:::setDefaultStatus:::1 +DOMWindow:::setEvent:::1 +DOMWindow:::setName:::1 +DOMWindow:::setOnanimationend:::1 +DOMWindow:::setOnanimationiteration:::1 +DOMWindow:::setOnanimationstart:::1 +DOMWindow:::setOnorientationchange:::1 +DOMWindow:::setOnsearch:::1 +DOMWindow:::setOntransitionend:::1 +DOMWindow:::setOnwebkitanimationend:::1 +DOMWindow:::setOnwebkitanimationiteration:::1 +DOMWindow:::setOnwebkitanimationstart:::1 +DOMWindow:::setOnwebkittransitionend:::1 +DOMWindow:::setOnwheel:::1 +DOMWindow:::setOpener:::1 +DOMWindow:::setStatus:::1 +DOMWindow:::setWebKitAnimationEvent:::1 +DOMWindow:::setWebKitMutationObserver:::1 +DOMWindow:::setWebKitTransitionEvent:::1 +DOMWindow:::setWebkitURL:::1 +DOMWindowSpeech:::setWebkitSpeechGrammar:::2 +DOMWindowSpeech:::setWebkitSpeechGrammarList:::2 +DOMWindowSpeech:::setWebkitSpeechRecognition:::2 +DOMWindowSpeech:::setWebkitSpeechRecognitionError:::2 +DOMWindowSpeech:::setWebkitSpeechRecognitionEvent:::2 +DOMWindowSpeechSynthesis:::speechSynthesis:::2 +DOMWindowSpeech:::webkitSpeechGrammar:::1 +DOMWindowSpeech:::webkitSpeechGrammarList:::1 +DOMWindowSpeech:::webkitSpeechRecognition:::1 +DOMWindowSpeech:::webkitSpeechRecognitionError:::1 +DOMWindowSpeech:::webkitSpeechRecognitionEvent:::1 +DOMWindow:::status:::0 +DOMWindow:::statusbar:::0 +DOMWindow:::stop:::0 +DOMWindowStorage:::localStorage:::2 +DOMWindowStorage:::sessionStorage:::2 +DOMWindow:::styleMedia:::0 +DOMWindowTimers:::clearInterval:::1 +DOMWindowTimers:::clearInterval:::2 +DOMWindowTimers:::clearTimeout:::1 +DOMWindowTimers:::clearTimeout:::2 +DOMWindowTimers:::setInterval:::4 +DOMWindowTimers:::setInterval:::5 +DOMWindowTimers:::setTimeout:::4 +DOMWindowTimers:::setTimeout:::5 +DOMWindow:::toolbar:::0 +DOMWindow:::top:::0 +DOMWindow:::visualViewport:::0 +DOMWindowWebDatabase:::openDatabase:::6 +DOMWindowWebDatabase:::openDatabase:::7 +DOMWindow:::webKitAnimationEvent:::0 +DOMWindow:::webKitMutationObserver:::0 +DOMWindow:::webkitRequestAnimationFrame:::1 +DOMWindow:::webKitTransitionEvent:::0 +DOMWindow:::webkitURL:::0 +DOMWindow:::window:::0 +DragEvent:::getDataTransfer:::0 +DynamicsCompressorNode:::attack:::0 +DynamicsCompressorNode:::knee:::0 +DynamicsCompressorNode:::ratio:::0 +DynamicsCompressorNode:::reduction:::0 +DynamicsCompressorNode:::release:::0 +DynamicsCompressorNode:::threshold:::0 +Element:::accessibleNode:::0 +ElementAnimation:::animate:::4 +ElementAnimation:::animate:::5 +ElementAnimation:::getAnimations:::1 +Element:::assignedSlotForBinding:::0 +Element:::attachShadow:::3 +Element:::attributesForBindings:::0 +Element:::blur:::0 +Element:::classList:::0 +Element:::clientHeight:::0 +Element:::clientLeft:::0 +Element:::clientTop:::0 +Element:::clientWidth:::0 +Element:::closest:::2 +Element:::computedName:::0 +Element:::computedRole:::0 +Element:::createShadowRoot:::2 +Element:::dataset:::0 +Element:::focus:::1 +ElementFullscreen:::onwebkitfullscreenchange:::1 +ElementFullscreen:::onwebkitfullscreenerror:::1 +ElementFullscreen:::requestFullscreen:::1 +ElementFullscreen:::setOnwebkitfullscreenchange:::2 +ElementFullscreen:::setOnwebkitfullscreenerror:::2 +ElementFullscreen:::webkitRequestFullscreen:::1 +Element:::getAttribute:::1 +Element:::getAttributeNode:::1 +Element:::getAttributeNodeNS:::2 +Element:::getAttributeNS:::2 +Element:::getBoundingClientRect:::0 +Element:::getClientRects:::0 +Element:::getDestinationInsertionPoints:::0 +Element:::getElementsByClassName:::1 +Element:::getElementsByTagName:::1 +Element:::getElementsByTagNameNS:::2 +Element:::hasAttribute:::1 +Element:::hasAttributeNS:::2 +Element:::hasAttributes:::0 +Element:::hasPointerCapture:::1 +Element:::innerHTML:::0 +Element:::innerText:::0 +Element:::insertAdjacentElement:::3 +Element:::insertAdjacentHTML:::3 +Element:::insertAdjacentText:::3 +Element:::localName:::0 +Element:::matches:::2 +Element:::namespaceURI:::0 +Element:::onbeforecopy:::0 +Element:::onbeforecut:::0 +Element:::onbeforepaste:::0 +Element:::oncopy:::0 +Element:::oncut:::0 +Element:::onpaste:::0 +Element:::onsearch:::0 +Element:::onselectstart:::0 +Element:::onwheel:::0 +Element:::openShadowRoot:::0 +Element:::outerHTML:::0 +Element:::outerText:::0 +Element:::prefix:::0 +Element:::releasePointerCapture:::2 +Element:::removeAttribute:::1 +Element:::removeAttributeNode:::2 +Element:::removeAttributeNS:::2 +Element:::requestPointerLock:::0 +Element:::scrollBy:::0 +Element:::scrollBy:::1 +Element:::scrollBy:::2 +Element:::scrollHeight:::0 +Element:::scrollIntoView:::0 +Element:::scrollIntoView:::1 +Element:::scrollIntoViewIfNeeded:::0 +Element:::scrollIntoViewIfNeeded:::1 +Element:::scrollLeft:::0 +Element:::scrollTo:::0 +Element:::scrollTo:::1 +Element:::scrollTo:::2 +Element:::scrollTop:::0 +Element:::scrollWidth:::0 +Element:::setApplyScroll:::2 +Element:::setAttribute:::3 +Element:::setAttributeNode:::2 +Element:::setAttributeNodeNS:::2 +Element:::setAttributeNS:::4 +Element:::setDistributeScroll:::2 +Element:::setInnerHTML:::2 +Element:::setOnbeforecopy:::1 +Element:::setOnbeforecut:::1 +Element:::setOnbeforepaste:::1 +Element:::setOncopy:::1 +Element:::setOncut:::1 +Element:::setOnpaste:::1 +Element:::setOnsearch:::1 +Element:::setOnselectstart:::1 +Element:::setOnwheel:::1 +Element:::setOuterHTML:::2 +Element:::setPointerCapture:::2 +Element:::setScrollLeft:::1 +Element:::setScrollTop:::1 +Element:::setTabIndex:::1 +Element:::style:::0 +Element:::styleMap:::0 +Element:::tagName:::0 +Element:::title:::0 +Element:::willValidate:::0 +EntriesCallback:::handleEvent:::1 +EntryBase:::filesystem:::0 +EntryBase:::fullPath:::0 +EntryBase:::isDirectory:::0 +EntryBase:::isFile:::0 +EntryBase:::name:::0 +EntryBase:::toURL:::0 +EntryCallback:::handleEvent:::1 +Entry:::copyTo:::2 +Entry:::copyTo:::3 +Entry:::copyTo:::4 +Entry:::copyTo:::5 +Entry:::filesystem:::1 +Entry:::fullPath:::0 +Entry:::getMetadata:::2 +Entry:::getMetadata:::3 +Entry:::getParent:::1 +Entry:::getParent:::2 +Entry:::getParent:::3 +Entry:::isDirectory:::0 +Entry:::isFile:::0 +Entry:::moveTo:::2 +Entry:::moveTo:::3 +Entry:::moveTo:::4 +Entry:::moveTo:::5 +Entry:::name:::0 +Entry:::remove:::2 +Entry:::remove:::3 +EntrySync:::copyTo:::3 +EntrySync:::filesystem:::0 +EntrySync:::fullPath:::0 +EntrySync:::getMetadata:::1 +EntrySync:::getParent:::0 +EntrySync:::isDirectory:::0 +EntrySync:::isFile:::0 +EntrySync:::moveTo:::3 +EntrySync:::name:::0 +EntrySync:::remove:::1 +EntrySync:::toURL:::0 +Entry:::toURL:::1 +ErrorCallback:::handleEvent:::1 +ErrorEvent:::colno:::0 +ErrorEvent:::error:::0 +ErrorEvent:::filename:::0 +ErrorEvent:::lineno:::0 +ErrorEvent:::message:::0 +Event:::bubbles:::0 +Event:::cancelable:::0 +Event:::cancelBubble:::1 +Event:::composed:::0 +Event:::composedPath:::1 +Event:::currentTarget:::0 +Event:::defaultPrevented:::0 +Event:::eventPhase:::0 +Event:::initEvent:::1 +Event:::initEvent:::2 +Event:::initEvent:::3 +Event:::isTrusted:::0 +Event:::legacyReturnValue:::1 +EventListener:::handleEvent:::1 +Event:::path:::1 +Event:::preventDefault:::0 +Event:::setCancelBubble:::2 +Event:::setLegacyReturnValue:::2 +EventSource:::close:::0 +EventSource:::onerror:::0 +EventSource:::onmessage:::0 +EventSource:::onopen:::0 +EventSource:::readyState:::0 +EventSource:::setOnerror:::1 +EventSource:::setOnmessage:::1 +EventSource:::setOnopen:::1 +EventSource:::url:::0 +EventSource:::withCredentials:::0 +Event:::srcElement:::0 +Event:::stopImmediatePropagation:::0 +Event:::stopPropagation:::0 +Event:::target:::0 +EventTarget:::addEventListener:::2 +EventTarget:::addEventListener:::3 +EventTarget:::dispatchEventForBindings:::2 +EventTarget:::removeEventListener:::2 +EventTarget:::removeEventListener:::3 +Event:::timeStamp:::1 +Event:::type:::0 +EXTDisjointTimerQuery:::beginQueryEXT:::2 +EXTDisjointTimerQuery:::createQueryEXT:::0 +EXTDisjointTimerQuery:::deleteQueryEXT:::1 +EXTDisjointTimerQuery:::endQueryEXT:::1 +EXTDisjointTimerQuery:::getQueryEXT:::3 +EXTDisjointTimerQuery:::getQueryObjectEXT:::3 +EXTDisjointTimerQuery:::isQueryEXT:::1 +EXTDisjointTimerQuery:::queryCounterEXT:::2 +EXTDisjointTimerQueryWebGL2:::queryCounterEXT:::2 +ExtendableEvent:::waitUntil:::3 +ExtendableMessageEvent:::data:::0 +ExtendableMessageEvent:::lastEventId:::0 +ExtendableMessageEvent:::origin:::0 +ExtendableMessageEvent:::ports:::1 +ExtendableMessageEvent:::source:::1 +External:::AddSearchProvider:::0 +External:::IsSearchProviderInstalled:::0 +FaceDetector:::detect:::2 +# False for operations below (i.e. why it doesn't see that the IDL interface +FederatedCredential:::protocol:::0 +FederatedCredential:::provider:::0 +FetchEvent:::clientId:::0 +FetchEvent:::isReload:::0 +FetchEvent:::preloadResponse:::1 +FetchEvent:::request:::0 +FetchEvent:::respondWith:::3 +FileEntry:::createWriter:::1 +FileEntry:::createWriter:::2 +FileEntry:::file:::1 +FileEntry:::file:::2 +FileEntrySync:::createWriter:::1 +FileEntrySync:::file:::1 +File:::lastModified:::0 +File:::lastModifiedDate:::0 +FileList:::item:::1 +FileList:::length:::0 +File:::name:::0 +FileReader:::abort:::0 +FileReader:::error:::0 +FileReader:::getReadyState:::0 +FileReader:::onabort:::0 +FileReader:::onerror:::0 +FileReader:::onload:::0 +FileReader:::onloadend:::0 +FileReader:::onloadstart:::0 +FileReader:::onprogress:::0 +FileReader:::readAsArrayBuffer:::2 +FileReader:::readAsBinaryString:::2 +FileReader:::readAsDataURL:::2 +FileReader:::readAsText:::2 +FileReader:::readAsText:::3 +FileReader:::result:::1 +FileReader:::setOnabort:::1 +FileReader:::setOnerror:::1 +FileReader:::setOnload:::1 +FileReader:::setOnloadend:::1 +FileReader:::setOnloadstart:::1 +FileReader:::setOnprogress:::1 +FileReaderSync:::readAsArrayBuffer:::3 +FileReaderSync:::readAsBinaryString:::3 +FileReaderSync:::readAsDataURL:::3 +FileReaderSync:::readAsText:::3 +FileReaderSync:::readAsText:::4 +FileSystemCallback:::handleEvent:::1 +File:::webkitRelativePath:::0 +FileWriter:::abort:::1 +FileWriterBaseCallback:::handleEvent:::1 +FileWriterBase:::length:::0 +FileWriterBase:::position:::0 +FileWriterCallback:::handleEvent:::1 +FileWriter:::error:::0 +FileWriter:::getReadyState:::0 +FileWriter:::length:::0 +FileWriter:::onabort:::0 +FileWriter:::onerror:::0 +FileWriter:::onprogress:::0 +FileWriter:::onwrite:::0 +FileWriter:::onwriteend:::0 +FileWriter:::onwritestart:::0 +FileWriter:::position:::0 +FileWriter:::seek:::2 +FileWriter:::setOnabort:::1 +FileWriter:::setOnerror:::1 +FileWriter:::setOnprogress:::1 +FileWriter:::setOnwrite:::1 +FileWriter:::setOnwriteend:::1 +FileWriter:::setOnwritestart:::1 +FileWriterSync:::length:::0 +FileWriterSync:::position:::0 +FileWriterSync:::seek:::2 +FileWriterSync:::truncate:::2 +FileWriterSync:::write:::2 +FileWriter:::truncate:::2 +FileWriter:::write:::2 +FocusEvent:::relatedTarget:::0 +FontFace:::display:::0 +FontFace:::family:::0 +FontFace:::featureSettings:::0 +FontFace:::load:::1 +FontFace:::loaded:::1 +FontFaceSet:::check:::2 +FontFaceSet:::check:::3 +FontFace:::setDisplay:::3 +FontFace:::setFamily:::3 +FontFace:::setFeatureSettings:::3 +FontFaceSet:::load:::2 +FontFaceSet:::load:::3 +FontFaceSetLoadEvent:::fontfaces:::0 +FontFaceSet:::onloading:::0 +FontFaceSet:::onloadingdone:::0 +FontFaceSet:::onloadingerror:::0 +FontFaceSet:::ready:::1 +FontFaceSet:::setOnloading:::1 +FontFaceSet:::setOnloadingdone:::1 +FontFaceSet:::setOnloadingerror:::1 +FontFaceSet:::size:::0 +FontFaceSet:::status:::0 +FontFace:::setStretch:::3 +FontFace:::setStyle:::3 +FontFace:::setUnicodeRange:::3 +FontFace:::setVariant:::3 +FontFace:::setWeight:::3 +FontFace:::status:::0 +FontFace:::stretch:::0 +FontFace:::style:::0 +FontFace:::unicodeRange:::0 +FontFace:::variant:::0 +FontFace:::weight:::0 +ForeignFetchEvent:::origin:::0 +ForeignFetchEvent:::request:::0 +ForeignFetchEvent:::respondWith:::3 +FormData:::append:::2 +FormData:::append:::3 +FormData:::append:::4 +FormData:::deleteEntry:::1 +FormData:::get:::1 +FormData:::get:::2 +FormData:::getAll:::1 +FormData:::has:::1 +FormData:::set:::2 +FormData:::set:::3 +FrameRequestCallback:::handleEvent:::1 +GainNode:::gain:::0 +Gamepad:::axes:::0 +GamepadButton:::pressed:::0 +Gamepad:::buttons:::0 +GamepadButton:::touched:::0 +GamepadButton:::value:::0 +Gamepad:::connected:::0 +Gamepad:::displayId:::0 +GamepadEvent:::getGamepad:::0 +Gamepad:::hand:::0 +Gamepad:::id:::0 +Gamepad:::index:::0 +GamepadList:::item:::0 +GamepadList:::item:::1 +GamepadList:::length:::0 +Gamepad:::mapping:::0 +Gamepad:::pose:::0 +GamepadPose:::angularAcceleration:::0 +GamepadPose:::angularVelocity:::0 +GamepadPose:::hasOrientation:::0 +GamepadPose:::hasPosition:::0 +GamepadPose:::linearAcceleration:::0 +GamepadPose:::linearVelocity:::0 +GamepadPose:::orientation:::0 +GamepadPose:::position:::0 +Gamepad:::timestamp:::0 +GarbageCollectedScriptWrappable:::toString:::0 +GCObservation:::wasCollected:::0 +Geolocation:::clearWatch:::1 +Geolocation:::getCurrentPosition:::1 +Geolocation:::getCurrentPosition:::2 +Geolocation:::getCurrentPosition:::3 +Geolocation:::watchPosition:::1 +Geolocation:::watchPosition:::2 +Geolocation:::watchPosition:::3 +Geoposition:::coords:::0 +Geoposition:::timestamp:::0 +GlobalCacheStorage:::caches:::2 +GlobalEventHandlers:::onabort:::1 +GlobalEventHandlers:::onauxclick:::1 +GlobalEventHandlers:::onblur:::1 +GlobalEventHandlers:::oncancel:::1 +GlobalEventHandlers:::oncanplay:::1 +GlobalEventHandlers:::oncanplaythrough:::1 +GlobalEventHandlers:::onchange:::1 +GlobalEventHandlers:::onclick:::1 +GlobalEventHandlers:::onclose:::1 +GlobalEventHandlers:::oncontextmenu:::1 +GlobalEventHandlers:::oncuechange:::1 +GlobalEventHandlers:::ondblclick:::1 +GlobalEventHandlers:::ondrag:::1 +GlobalEventHandlers:::ondragend:::1 +GlobalEventHandlers:::ondragenter:::1 +GlobalEventHandlers:::ondragleave:::1 +GlobalEventHandlers:::ondragover:::1 +GlobalEventHandlers:::ondragstart:::1 +GlobalEventHandlers:::ondrop:::1 +GlobalEventHandlers:::ondurationchange:::1 +GlobalEventHandlers:::onemptied:::1 +GlobalEventHandlers:::onended:::1 +GlobalEventHandlers:::onerror:::1 +GlobalEventHandlers:::onfocus:::1 +GlobalEventHandlers:::ongotpointercapture:::1 +GlobalEventHandlers:::oninput:::1 +GlobalEventHandlers:::oninvalid:::1 +GlobalEventHandlers:::onkeydown:::1 +GlobalEventHandlers:::onkeypress:::1 +GlobalEventHandlers:::onkeyup:::1 +GlobalEventHandlers:::onload:::1 +GlobalEventHandlers:::onloadeddata:::1 +GlobalEventHandlers:::onloadedmetadata:::1 +GlobalEventHandlers:::onloadstart:::1 +GlobalEventHandlers:::onlostpointercapture:::1 +GlobalEventHandlers:::onmousedown:::1 +GlobalEventHandlers:::onmouseenter:::1 +GlobalEventHandlers:::onmouseleave:::1 +GlobalEventHandlers:::onmousemove:::1 +GlobalEventHandlers:::onmouseout:::1 +GlobalEventHandlers:::onmouseover:::1 +GlobalEventHandlers:::onmouseup:::1 +GlobalEventHandlers:::onmousewheel:::1 +GlobalEventHandlers:::onpause:::1 +GlobalEventHandlers:::onplay:::1 +GlobalEventHandlers:::onplaying:::1 +GlobalEventHandlers:::onpointercancel:::1 +GlobalEventHandlers:::onpointerdown:::1 +GlobalEventHandlers:::onpointerenter:::1 +GlobalEventHandlers:::onpointerleave:::1 +GlobalEventHandlers:::onpointermove:::1 +GlobalEventHandlers:::onpointerout:::1 +GlobalEventHandlers:::onpointerover:::1 +GlobalEventHandlers:::onpointerup:::1 +GlobalEventHandlers:::onprogress:::1 +GlobalEventHandlers:::onratechange:::1 +GlobalEventHandlers:::onreset:::1 +GlobalEventHandlers:::onresize:::1 +GlobalEventHandlers:::onscroll:::1 +GlobalEventHandlers:::onseeked:::1 +GlobalEventHandlers:::onseeking:::1 +GlobalEventHandlers:::onselect:::1 +GlobalEventHandlers:::onshow:::1 +GlobalEventHandlers:::onstalled:::1 +GlobalEventHandlers:::onsubmit:::1 +GlobalEventHandlers:::onsuspend:::1 +GlobalEventHandlers:::ontimeupdate:::1 +GlobalEventHandlers:::ontoggle:::1 +GlobalEventHandlers:::ontouchcancel:::1 +GlobalEventHandlers:::ontouchend:::1 +GlobalEventHandlers:::ontouchmove:::1 +GlobalEventHandlers:::ontouchstart:::1 +GlobalEventHandlers:::onvolumechange:::1 +GlobalEventHandlers:::onwaiting:::1 +GlobalEventHandlers:::setOnabort:::2 +GlobalEventHandlers:::setOnauxclick:::2 +GlobalEventHandlers:::setOnblur:::2 +GlobalEventHandlers:::setOncancel:::2 +GlobalEventHandlers:::setOncanplay:::2 +GlobalEventHandlers:::setOncanplaythrough:::2 +GlobalEventHandlers:::setOnchange:::2 +GlobalEventHandlers:::setOnclick:::2 +GlobalEventHandlers:::setOnclose:::2 +GlobalEventHandlers:::setOncontextmenu:::2 +GlobalEventHandlers:::setOncuechange:::2 +GlobalEventHandlers:::setOndblclick:::2 +GlobalEventHandlers:::setOndrag:::2 +GlobalEventHandlers:::setOndragend:::2 +GlobalEventHandlers:::setOndragenter:::2 +GlobalEventHandlers:::setOndragleave:::2 +GlobalEventHandlers:::setOndragover:::2 +GlobalEventHandlers:::setOndragstart:::2 +GlobalEventHandlers:::setOndrop:::2 +GlobalEventHandlers:::setOndurationchange:::2 +GlobalEventHandlers:::setOnemptied:::2 +GlobalEventHandlers:::setOnended:::2 +GlobalEventHandlers:::setOnerror:::2 +GlobalEventHandlers:::setOnfocus:::2 +GlobalEventHandlers:::setOngotpointercapture:::2 +GlobalEventHandlers:::setOninput:::2 +GlobalEventHandlers:::setOninvalid:::2 +GlobalEventHandlers:::setOnkeydown:::2 +GlobalEventHandlers:::setOnkeypress:::2 +GlobalEventHandlers:::setOnkeyup:::2 +GlobalEventHandlers:::setOnload:::2 +GlobalEventHandlers:::setOnloadeddata:::2 +GlobalEventHandlers:::setOnloadedmetadata:::2 +GlobalEventHandlers:::setOnloadstart:::2 +GlobalEventHandlers:::setOnlostpointercapture:::2 +GlobalEventHandlers:::setOnmousedown:::2 +GlobalEventHandlers:::setOnmouseenter:::2 +GlobalEventHandlers:::setOnmouseleave:::2 +GlobalEventHandlers:::setOnmousemove:::2 +GlobalEventHandlers:::setOnmouseout:::2 +GlobalEventHandlers:::setOnmouseover:::2 +GlobalEventHandlers:::setOnmouseup:::2 +GlobalEventHandlers:::setOnmousewheel:::2 +GlobalEventHandlers:::setOnpause:::2 +GlobalEventHandlers:::setOnplay:::2 +GlobalEventHandlers:::setOnplaying:::2 +GlobalEventHandlers:::setOnpointercancel:::2 +GlobalEventHandlers:::setOnpointerdown:::2 +GlobalEventHandlers:::setOnpointerenter:::2 +GlobalEventHandlers:::setOnpointerleave:::2 +GlobalEventHandlers:::setOnpointermove:::2 +GlobalEventHandlers:::setOnpointerout:::2 +GlobalEventHandlers:::setOnpointerover:::2 +GlobalEventHandlers:::setOnpointerup:::2 +GlobalEventHandlers:::setOnprogress:::2 +GlobalEventHandlers:::setOnratechange:::2 +GlobalEventHandlers:::setOnreset:::2 +GlobalEventHandlers:::setOnresize:::2 +GlobalEventHandlers:::setOnscroll:::2 +GlobalEventHandlers:::setOnseeked:::2 +GlobalEventHandlers:::setOnseeking:::2 +GlobalEventHandlers:::setOnselect:::2 +GlobalEventHandlers:::setOnshow:::2 +GlobalEventHandlers:::setOnstalled:::2 +GlobalEventHandlers:::setOnsubmit:::2 +GlobalEventHandlers:::setOnsuspend:::2 +GlobalEventHandlers:::setOntimeupdate:::2 +GlobalEventHandlers:::setOntoggle:::2 +GlobalEventHandlers:::setOntouchcancel:::2 +GlobalEventHandlers:::setOntouchend:::2 +GlobalEventHandlers:::setOntouchmove:::2 +GlobalEventHandlers:::setOntouchstart:::2 +GlobalEventHandlers:::setOnvolumechange:::2 +GlobalEventHandlers:::setOnwaiting:::2 +GlobalFetch:::fetch:::4 +GlobalFetch:::fetch:::5 +GlobalIndexedDB:::indexedDB:::1 +Gyroscope:::x:::1 +Gyroscope:::y:::1 +Gyroscope:::z:::1 +HashChangeEvent:::newURL:::0 +HashChangeEvent:::oldURL:::0 +Headers:::append:::3 +Headers:::get:::2 +Headers:::getAll:::2 +Headers:::has:::2 +Headers:::remove:::2 +Headers:::set:::3 +History:::back:::1 +History:::forward:::1 +History:::go:::1 +History:::go:::2 +History:::length:::0 +History:::pushState:::3 +History:::pushState:::4 +History:::replaceState:::3 +History:::replaceState:::4 +History:::scrollRestoration:::0 +History:::setScrollRestoration:::1 +History:::state:::0 +History:::stateChanged:::0 +HTMLAllCollection:::item:::0 +HTMLAllCollection:::item:::1 +HTMLAllCollection:::length:::0 +HTMLAllCollection:::namedGetter:::2 +HTMLAnchorElement:::setTextContent:::1 +HTMLAnchorElement:::textContent:::0 +HTMLBaseElement:::href:::0 +HTMLBaseElement:::setHref:::1 +HTMLBodyElement:::onblur:::0 +HTMLBodyElement:::onerror:::0 +HTMLBodyElement:::onfocus:::0 +HTMLBodyElement:::onload:::0 +HTMLBodyElement:::onorientationchange:::0 +HTMLBodyElement:::onresize:::0 +HTMLBodyElement:::onscroll:::0 +HTMLBodyElement:::setOnblur:::1 +HTMLBodyElement:::setOnerror:::1 +HTMLBodyElement:::setOnfocus:::1 +HTMLBodyElement:::setOnload:::1 +HTMLBodyElement:::setOnorientationchange:::1 +HTMLBodyElement:::setOnresize:::1 +HTMLBodyElement:::setOnscroll:::1 +HTMLButtonElement:::checkValidity:::0 +HTMLButtonElement:::formAction:::0 +HTMLButtonElement:::formEnctype:::0 +HTMLButtonElement:::formMethod:::0 +HTMLButtonElement:::formOwner:::0 +HTMLButtonElement:::labels:::0 +HTMLButtonElement:::reportValidity:::0 +HTMLButtonElement:::setCustomValidity:::1 +HTMLButtonElement:::setFormAction:::1 +HTMLButtonElement:::setFormEnctype:::1 +HTMLButtonElement:::setFormMethod:::1 +HTMLButtonElement:::setType:::1 +HTMLButtonElement:::type:::0 +HTMLButtonElement:::validationMessage:::0 +HTMLButtonElement:::validity:::0 +HTMLButtonElement:::willValidate:::0 +HTMLCanvasElementCapture:::captureStream:::2 +HTMLCanvasElementCapture:::captureStream:::3 +HTMLCanvasElement:::height:::0 +HTMLCanvasElementModule:::getContext:::3 +HTMLCanvasElementModule:::getContext:::4 +HTMLCanvasElementModule:::transferControlToOffscreen:::2 +HTMLCanvasElement:::setHeight:::2 +HTMLCanvasElement:::setWidth:::2 +HTMLCanvasElement:::toBlob:::2 +HTMLCanvasElement:::toBlob:::3 +HTMLCanvasElement:::toBlob:::4 +HTMLCanvasElement:::toDataURL:::1 +HTMLCanvasElement:::toDataURL:::2 +HTMLCanvasElement:::toDataURL:::3 +HTMLCanvasElement:::width:::0 +HTMLCollection:::item:::1 +HTMLCollection:::length:::0 +HTMLCollection:::namedItem:::1 +HTMLContentElement:::getDistributedNodes:::0 +HTMLDataListElement:::options:::0 +HTMLDialogElement:::close:::1 +HTMLDialogElement:::close:::2 +HTMLDialogElement:::returnValue:::0 +HTMLDialogElement:::setReturnValue:::1 +HTMLDialogElement:::show:::0 +HTMLDialogElement:::showModal:::1 +HTMLDocument:::alinkColor:::0 +HTMLDocument:::all:::0 +HTMLDocument:::bgColor:::0 +HTMLDocument:::captureEvents:::0 +HTMLDocument:::clear:::0 +HTMLDocument:::fgColor:::0 +HTMLDocument:::linkColor:::0 +HTMLDocument:::releaseEvents:::0 +HTMLDocument:::setAlinkColor:::1 +HTMLDocument:::setBgColor:::1 +HTMLDocument:::setFgColor:::1 +HTMLDocument:::setLinkColor:::1 +HTMLDocument:::setVlinkColor:::1 +HTMLDocument:::vlinkColor:::0 +HTMLElement:::blur:::0 +HTMLElement:::click:::0 +HTMLElement:::contentEditable:::0 +HTMLElement:::contextMenu:::0 +HTMLElement:::dataset:::0 +HTMLElement:::dir:::0 +HTMLElement:::draggable:::0 +HTMLElement:::focus:::0 +HTMLElement:::formOwner:::0 +HTMLElement:::innerText:::0 +HTMLElement:::isContentEditableForBinding:::0 +HTMLElement:::offsetHeightForBinding:::0 +HTMLElement:::offsetLeftForBinding:::0 +HTMLElement:::offsetTopForBinding:::0 +HTMLElement:::offsetWidthForBinding:::0 +HTMLElement:::outerText:::0 +HTMLElement:::setContentEditable:::2 +HTMLElement:::setContextMenu:::1 +HTMLElement:::setDir:::1 +HTMLElement:::setDraggable:::1 +HTMLElement:::setInnerText:::2 +HTMLElement:::setOuterText:::2 +HTMLElement:::setSpellcheck:::1 +HTMLElement:::setTabIndex:::1 +HTMLElement:::setTranslate:::1 +HTMLElement:::spellcheck:::0 +HTMLElement:::style:::0 +HTMLElement:::tabIndex:::0 +HTMLElement:::translate:::0 +HTMLElement:::unclosedOffsetParent:::0 +HTMLEmbedElement::::::1 +HTMLEmbedElement::::::2 +HTMLEmbedElement:::getSVGDocument:::1 +HTMLFieldSetElement:::checkValidity:::0 +HTMLFieldSetElement:::elements:::0 +HTMLFieldSetElement:::formOwner:::0 +HTMLFieldSetElement:::reportValidity:::0 +HTMLFieldSetElement:::setCustomValidity:::1 +HTMLFieldSetElement:::type:::0 +HTMLFieldSetElement:::validationMessage:::0 +HTMLFieldSetElement:::validity:::0 +HTMLFieldSetElement:::willValidate:::0 +HTMLFormControlElement:::checkValidity:::2 +HTMLFormControlElement:::formAction:::0 +HTMLFormControlElement:::formEnctype:::0 +HTMLFormControlElement:::formMethod:::0 +HTMLFormControlElement:::formOwner:::0 +HTMLFormControlElement:::reportValidity:::0 +HTMLFormControlElement:::setCustomValidity:::1 +HTMLFormControlElement:::setFormAction:::1 +HTMLFormControlElement:::setFormEnctype:::1 +HTMLFormControlElement:::setFormMethod:::1 +HTMLFormControlElement:::type:::0 +HTMLFormControlsCollection:::item:::1 +HTMLFormControlsCollection:::length:::0 +HTMLFormControlsCollection:::namedGetter:::2 +HTMLFormElement::::::2 +HTMLFormElement:::checkValidity:::0 +HTMLFormElement:::elements:::0 +HTMLFormElement:::encoding:::0 +HTMLFormElement:::enctype:::0 +HTMLFormElement:::item:::1 +HTMLFormElement:::length:::0 +HTMLFormElement:::method:::0 +HTMLFormElement:::reportValidity:::0 +HTMLFormElement:::reset:::0 +HTMLFormElement:::setEncoding:::1 +HTMLFormElement:::setEnctype:::1 +HTMLFormElement:::setMethod:::1 +HTMLFormElement:::submitFromJavaScript:::0 +HTMLFrameElement:::contentDocument:::0 +HTMLFrameElement:::contentWindow:::0 +HTMLFrameOwnerElement:::contentDocument:::0 +HTMLFrameOwnerElement:::contentWindow:::0 +HTMLFrameOwnerElement:::getSVGDocument:::1 +HTMLFrameSetElement::::::1 +HTMLFrameSetElement:::onblur:::0 +HTMLFrameSetElement:::onerror:::0 +HTMLFrameSetElement:::onfocus:::0 +HTMLFrameSetElement:::onload:::0 +HTMLFrameSetElement:::onorientationchange:::0 +HTMLFrameSetElement:::onresize:::0 +HTMLFrameSetElement:::onscroll:::0 +HTMLFrameSetElement:::setOnblur:::1 +HTMLFrameSetElement:::setOnerror:::1 +HTMLFrameSetElement:::setOnfocus:::1 +HTMLFrameSetElement:::setOnload:::1 +HTMLFrameSetElement:::setOnorientationchange:::1 +HTMLFrameSetElement:::setOnresize:::1 +HTMLFrameSetElement:::setOnscroll:::1 +HTMLHyperlinkElementUtils:::hash:::0 +HTMLHyperlinkElementUtils:::host:::0 +HTMLHyperlinkElementUtils:::hostname:::0 +HTMLHyperlinkElementUtils:::href:::0 +HTMLHyperlinkElementUtils:::origin:::0 +HTMLHyperlinkElementUtils:::password:::0 +HTMLHyperlinkElementUtils:::pathname:::0 +HTMLHyperlinkElementUtils:::port:::0 +HTMLHyperlinkElementUtils:::protocol:::0 +HTMLHyperlinkElementUtils:::search:::0 +HTMLHyperlinkElementUtils:::setHash:::1 +HTMLHyperlinkElementUtils:::setHost:::1 +HTMLHyperlinkElementUtils:::setHostname:::1 +HTMLHyperlinkElementUtils:::setHref:::1 +HTMLHyperlinkElementUtils:::setPassword:::1 +HTMLHyperlinkElementUtils:::setPathname:::1 +HTMLHyperlinkElementUtils:::setPort:::1 +HTMLHyperlinkElementUtils:::setProtocol:::1 +HTMLHyperlinkElementUtils:::setSearch:::1 +HTMLHyperlinkElementUtils:::setUsername:::1 +HTMLHyperlinkElementUtils:::username:::0 +HTMLIFrameElement:::allow:::0 +HTMLIFrameElement:::contentDocument:::0 +HTMLIFrameElement:::contentWindow:::0 +HTMLIFrameElement:::getSVGDocument:::1 +HTMLIFrameElement:::sandbox:::0 +HTMLImageElement:::complete:::0 +HTMLImageElement:::currentSrc:::0 +HTMLImageElement:::height:::0 +HTMLImageElement:::naturalHeight:::0 +HTMLImageElement:::naturalWidth:::0 +HTMLImageElement:::setHeight:::1 +HTMLImageElement:::setWidth:::1 +HTMLImageElement:::width:::0 +HTMLImageElement:::x:::0 +HTMLImageElement:::y:::0 +HTMLInputElement:::autocapitalize:::0 +HTMLInputElement:::checked:::0 +HTMLInputElement:::checkValidity:::0 +HTMLInputElement:::files:::0 +HTMLInputElementFileSystem:::webkitEntries:::2 +HTMLInputElement:::formAction:::0 +HTMLInputElement:::formEnctype:::0 +HTMLInputElement:::formMethod:::0 +HTMLInputElement:::formOwner:::0 +HTMLInputElement:::height:::0 +HTMLInputElement:::indeterminate:::0 +HTMLInputElement:::labels:::0 +HTMLInputElement:::list:::0 +HTMLInputElement:::maxLength:::0 +HTMLInputElement:::minLength:::0 +HTMLInputElement:::reportValidity:::0 +HTMLInputElement:::select:::0 +HTMLInputElement:::selectionDirectionForBinding:::1 +HTMLInputElement:::selectionEndForBinding:::2 +HTMLInputElement:::selectionStartForBinding:::2 +HTMLInputElement:::setAutocapitalize:::1 +HTMLInputElement:::setChecked:::1 +HTMLInputElement:::setCustomValidity:::1 +HTMLInputElement:::setFiles:::1 +HTMLInputElement:::setFormAction:::1 +HTMLInputElement:::setFormEnctype:::1 +HTMLInputElement:::setFormMethod:::1 +HTMLInputElement:::setHeight:::1 +HTMLInputElement:::setIndeterminate:::1 +HTMLInputElement:::setMaxLength:::2 +HTMLInputElement:::setMinLength:::2 +HTMLInputElement:::setRangeText:::2 +HTMLInputElement:::setRangeText:::4 +HTMLInputElement:::setRangeText:::5 +HTMLInputElement:::setSelectionDirectionForBinding:::2 +HTMLInputElement:::setSelectionEndForBinding:::2 +HTMLInputElement:::setSelectionRangeForBinding:::3 +HTMLInputElement:::setSelectionRangeForBinding:::4 +HTMLInputElement:::setSelectionStartForBinding:::2 +HTMLInputElement:::setSize:::2 +HTMLInputElement:::setType:::1 +HTMLInputElement:::setValue:::2 +HTMLInputElement:::setValueAsDate:::2 +HTMLInputElement:::setValueAsNumber:::2 +HTMLInputElement:::setWidth:::1 +HTMLInputElement:::size:::0 +HTMLInputElement:::stepDown:::1 +HTMLInputElement:::stepDown:::2 +HTMLInputElement:::stepUp:::1 +HTMLInputElement:::stepUp:::2 +HTMLInputElement:::type:::0 +HTMLInputElement:::validationMessage:::0 +HTMLInputElement:::validity:::0 +HTMLInputElement:::value:::0 +HTMLInputElement:::valueAsDate:::1 +HTMLInputElement:::valueAsNumber:::0 +HTMLInputElement:::width:::0 +HTMLInputElement:::willValidate:::0 +HTMLLabelElement:::control:::0 +HTMLLabelElement:::form:::0 +HTMLLegendElement:::form:::0 +HTMLLinkElement:::import:::0 +HTMLLinkElement:::relList:::0 +HTMLLinkElement:::sheet:::0 +HTMLLinkElement:::sizes:::0 +HTMLMapElement:::areas:::0 +HTMLMarqueeElement:::loop:::0 +HTMLMarqueeElement:::scrollAmount:::0 +HTMLMarqueeElement:::scrollDelay:::0 +HTMLMarqueeElement:::setLoop:::2 +HTMLMarqueeElement:::setScrollAmount:::2 +HTMLMarqueeElement:::setScrollDelay:::2 +HTMLMarqueeElement:::start:::0 +HTMLMarqueeElement:::stop:::0 +HTMLMediaElement:::addTextTrack:::2 +HTMLMediaElement:::addTextTrack:::3 +HTMLMediaElement:::addTextTrack:::4 +HTMLMediaElementAudioOutputDevice:::setSinkId:::3 +HTMLMediaElementAudioOutputDevice:::sinkId:::1 +HTMLMediaElement:::audioTracks:::0 +HTMLMediaElement:::buffered:::0 +HTMLMediaElement:::canPlayType:::1 +HTMLMediaElementCapture:::captureStream:::2 +HTMLMediaElement:::controlsList:::0 +HTMLMediaElement:::currentSrc:::0 +HTMLMediaElement:::currentTime:::0 +HTMLMediaElement:::defaultPlaybackRate:::0 +HTMLMediaElement:::duration:::0 +HTMLMediaElementEncryptedMedia:::mediaKeys:::1 +HTMLMediaElementEncryptedMedia:::onencrypted:::1 +HTMLMediaElementEncryptedMedia:::onwaitingforkey:::1 +HTMLMediaElementEncryptedMedia:::setMediaKeys:::3 +HTMLMediaElementEncryptedMedia:::setOnencrypted:::2 +HTMLMediaElementEncryptedMedia:::setOnwaitingforkey:::2 +HTMLMediaElement:::ended:::0 +HTMLMediaElement:::error:::0 +HTMLMediaElement:::getNetworkState:::0 +HTMLMediaElement:::getReadyState:::0 +HTMLMediaElement:::load:::0 +HTMLMediaElement:::muted:::0 +HTMLMediaElement:::pause:::0 +HTMLMediaElement:::paused:::0 +HTMLMediaElement:::playbackRate:::0 +HTMLMediaElement:::played:::0 +HTMLMediaElement:::playForBindings:::1 +HTMLMediaElement:::preload:::0 +HTMLMediaElementRemotePlayback:::remote:::1 +HTMLMediaElement:::seekable:::0 +HTMLMediaElement:::seeking:::0 +HTMLMediaElement:::setCurrentTime:::1 +HTMLMediaElement:::setDefaultPlaybackRate:::1 +HTMLMediaElement:::setMuted:::1 +HTMLMediaElement:::setPlaybackRate:::1 +HTMLMediaElement:::setPreload:::1 +HTMLMediaElement:::setVolume:::2 +HTMLMediaElementSrcObject:::setSrcObject:::2 +HTMLMediaElementSrcObject:::srcObject:::1 +HTMLMediaElement:::textTracks:::0 +HTMLMediaElement:::videoTracks:::0 +HTMLMediaElement:::volume:::0 +HTMLMediaElement:::webkitAudioDecodedByteCount:::0 +HTMLMediaElement:::webkitVideoDecodedByteCount:::0 +HTMLMediaSource:::duration:::0 +HTMLMeterElement:::high:::0 +HTMLMeterElement:::labels:::0 +HTMLMeterElement:::low:::0 +HTMLMeterElement:::max:::0 +HTMLMeterElement:::min:::0 +HTMLMeterElement:::optimum:::0 +HTMLMeterElement:::setHigh:::1 +HTMLMeterElement:::setLow:::1 +HTMLMeterElement:::setMax:::1 +HTMLMeterElement:::setMin:::1 +HTMLMeterElement:::setOptimum:::1 +HTMLMeterElement:::setValue:::1 +HTMLMeterElement:::value:::0 +HTMLObjectElement::::::1 +HTMLObjectElement::::::2 +HTMLObjectElement:::checkValidity:::0 +HTMLObjectElement:::contentDocument:::0 +HTMLObjectElement:::contentWindow:::0 +HTMLObjectElement:::formOwner:::0 +HTMLObjectElement:::getSVGDocument:::1 +HTMLObjectElement:::reportValidity:::0 +HTMLObjectElement:::setCustomValidity:::1 +HTMLObjectElement:::validationMessage:::0 +HTMLObjectElement:::validity:::0 +HTMLObjectElement:::willValidate:::0 +HTMLOListElement:::setStart:::1 +HTMLOListElement:::start:::0 +HTMLOptionElement:::form:::0 +HTMLOptionElement:::index:::0 +HTMLOptionElement:::label:::0 +HTMLOptionElement:::selectedForBinding:::0 +HTMLOptionElement:::setLabel:::1 +HTMLOptionElement:::setSelectedForBinding:::1 +HTMLOptionElement:::setText:::2 +HTMLOptionElement:::setValue:::1 +HTMLOptionElement:::text:::0 +HTMLOptionElement:::value:::0 +HTMLOptionsCollection::::::3 +HTMLOptionsCollection:::add:::2 +HTMLOptionsCollection:::add:::3 +HTMLOptionsCollection:::item:::1 +HTMLOptionsCollection:::length:::0 +HTMLOptionsCollection:::namedGetter:::2 +HTMLOptionsCollection:::remove:::1 +HTMLOptionsCollection:::selectedIndex:::0 +HTMLOptionsCollection:::setLength:::2 +HTMLOptionsCollection:::setSelectedIndex:::1 +HTMLOutputElement:::checkValidity:::0 +HTMLOutputElement:::defaultValue:::0 +HTMLOutputElement:::formOwner:::0 +HTMLOutputElement:::htmlFor:::0 +HTMLOutputElement:::labels:::0 +HTMLOutputElement:::reportValidity:::0 +HTMLOutputElement:::setCustomValidity:::1 +HTMLOutputElement:::setDefaultValue:::1 +HTMLOutputElement:::setValue:::1 +HTMLOutputElement:::type:::0 +HTMLOutputElement:::validationMessage:::0 +HTMLOutputElement:::validity:::0 +HTMLOutputElement:::value:::0 +HTMLOutputElement:::willValidate:::0 +HTMLProgressElement:::labels:::0 +HTMLProgressElement:::max:::0 +HTMLProgressElement:::position:::0 +HTMLProgressElement:::setMax:::1 +HTMLProgressElement:::setValue:::1 +HTMLProgressElement:::value:::0 +HTMLScriptElement:::async:::0 +HTMLScriptElement:::nonce:::0 +HTMLScriptElement:::setAsync:::1 +HTMLScriptElement:::setNonce:::1 +HTMLScriptElement:::setText:::1 +HTMLScriptElement:::text:::0 +HTMLSelectElement::::::3 +HTMLSelectElement:::add:::2 +HTMLSelectElement:::add:::3 +HTMLSelectElement:::checkValidity:::0 +HTMLSelectElement:::formOwner:::0 +HTMLSelectElement:::item:::1 +HTMLSelectElement:::labels:::0 +HTMLSelectElement:::length:::0 +HTMLSelectElement:::namedItem:::1 +HTMLSelectElement:::options:::0 +HTMLSelectElement:::remove:::1 +HTMLSelectElement:::reportValidity:::0 +HTMLSelectElement:::selectedIndex:::0 +HTMLSelectElement:::selectedOptions:::0 +HTMLSelectElement:::setCustomValidity:::1 +HTMLSelectElement:::setLength:::2 +HTMLSelectElement:::setSelectedIndex:::1 +HTMLSelectElement:::setSize:::1 +HTMLSelectElement:::setValue:::1 +HTMLSelectElement:::size:::0 +HTMLSelectElement:::type:::0 +HTMLSelectElement:::validationMessage:::0 +HTMLSelectElement:::validity:::0 +HTMLSelectElement:::value:::0 +HTMLSelectElement:::willValidate:::0 +HTMLShadowElement:::getDistributedNodes:::0 +HTMLSlotElement:::assignedNodesForBinding:::0 +HTMLSlotElement:::assignedNodesForBinding:::1 +HTMLSourceElement:::setType:::1 +HTMLSourceElement:::type:::0 +HTMLStyleElement:::disabled:::0 +HTMLStyleElement:::setDisabled:::1 +HTMLStyleElement:::sheet:::0 +HTMLTableCellElement:::cellIndex:::0 +HTMLTableCellElement:::colSpan:::0 +HTMLTableCellElement:::rowSpan:::0 +HTMLTableCellElement:::setColSpan:::1 +HTMLTableCellElement:::setRowSpan:::1 +HTMLTableColElement:::setSpan:::1 +HTMLTableColElement:::span:::0 +HTMLTableElement:::caption:::0 +HTMLTableElement:::createCaption:::0 +HTMLTableElement:::createTBody:::0 +HTMLTableElement:::createTFoot:::0 +HTMLTableElement:::createTHead:::0 +HTMLTableElement:::deleteCaption:::0 +HTMLTableElement:::deleteRow:::2 +HTMLTableElement:::deleteTFoot:::0 +HTMLTableElement:::deleteTHead:::0 +HTMLTableElement:::insertRow:::1 +HTMLTableElement:::insertRow:::2 +HTMLTableElement:::rows:::0 +HTMLTableElement:::setCaption:::2 +HTMLTableElement:::setTFoot:::2 +HTMLTableElement:::setTHead:::2 +HTMLTableElement:::tBodies:::0 +HTMLTableElement:::tFoot:::0 +HTMLTableElement:::tHead:::0 +HTMLTableRowElement:::cells:::0 +HTMLTableRowElement:::deleteCell:::2 +HTMLTableRowElement:::insertCell:::1 +HTMLTableRowElement:::insertCell:::2 +HTMLTableRowElement:::rowIndex:::0 +HTMLTableRowElement:::sectionRowIndex:::0 +HTMLTableSectionElement:::deleteRow:::2 +HTMLTableSectionElement:::insertRow:::1 +HTMLTableSectionElement:::insertRow:::2 +HTMLTableSectionElement:::rows:::0 +HTMLTemplateElement:::content:::0 +HTMLTextAreaElement:::autocapitalize:::0 +HTMLTextAreaElement:::checkValidity:::0 +HTMLTextAreaElement:::cols:::0 +HTMLTextAreaElement:::defaultValue:::0 +HTMLTextAreaElement:::formOwner:::0 +HTMLTextAreaElement:::labels:::0 +HTMLTextAreaElement:::maxLength:::0 +HTMLTextAreaElement:::minLength:::0 +HTMLTextAreaElement:::reportValidity:::0 +HTMLTextAreaElement:::rows:::0 +HTMLTextAreaElement:::select:::0 +HTMLTextAreaElement:::selectionDirection:::0 +HTMLTextAreaElement:::selectionEnd:::0 +HTMLTextAreaElement:::selectionStart:::0 +HTMLTextAreaElement:::setAutocapitalize:::1 +HTMLTextAreaElement:::setCols:::1 +HTMLTextAreaElement:::setCustomValidity:::1 +HTMLTextAreaElement:::setDefaultValue:::1 +HTMLTextAreaElement:::setMaxLength:::2 +HTMLTextAreaElement:::setMinLength:::2 +HTMLTextAreaElement:::setRangeText:::2 +HTMLTextAreaElement:::setRangeText:::4 +HTMLTextAreaElement:::setRangeText:::5 +HTMLTextAreaElement:::setRows:::1 +HTMLTextAreaElement:::setSelectionDirection:::1 +HTMLTextAreaElement:::setSelectionEnd:::1 +HTMLTextAreaElement:::setSelectionRangeForBinding:::2 +HTMLTextAreaElement:::setSelectionRangeForBinding:::3 +HTMLTextAreaElement:::setSelectionStart:::1 +HTMLTextAreaElement:::setValue:::1 +HTMLTextAreaElement:::textLength:::0 +HTMLTextAreaElement:::type:::0 +HTMLTextAreaElement:::validationMessage:::0 +HTMLTextAreaElement:::validity:::0 +HTMLTextAreaElement:::value:::0 +HTMLTextAreaElement:::willValidate:::0 +HTMLTitleElement:::setText:::1 +HTMLTitleElement:::text:::0 +HTMLTrackElement:::getReadyState:::0 +HTMLTrackElement:::kind:::0 +HTMLTrackElement:::setKind:::1 +HTMLTrackElement:::track:::0 +HTMLVideoElementMediaSource:::getVideoPlaybackQuality:::1 +HTMLVideoElement:::videoHeight:::0 +HTMLVideoElement:::videoWidth:::0 +HTMLVideoElement:::webkitDecodedFrameCount:::0 +HTMLVideoElement:::webkitDisplayingFullscreen:::0 +HTMLVideoElement:::webkitDroppedFrameCount:::0 +HTMLVideoElement:::webkitEnterFullscreen:::0 +HTMLVideoElement:::webkitExitFullscreen:::0 +HTMLVideoElement:::webkitSupportsFullscreen:::0 +IDBCursor:::advance:::2 +IDBCursor:::continueFunction:::2 +IDBCursor:::continueFunction:::3 +IDBCursor:::continuePrimaryKey:::4 +IDBCursor:::deleteFunction:::2 +IDBCursor:::direction:::0 +IDBCursor:::isKeyDirty:::0 +IDBCursor:::isPrimaryKeyDirty:::0 +IDBCursor:::isValueDirty:::0 +IDBCursor:::key:::1 +IDBCursor:::primaryKey:::1 +IDBCursor:::source:::1 +IDBCursor:::update:::3 +IDBCursor:::value:::1 +IDBCursorWithValue:::isValueDirty:::0 +IDBCursorWithValue:::value:::1 +IDBDatabase:::close:::0 +IDBDatabase:::createObjectStore:::2 +IDBDatabase:::createObjectStore:::3 +IDBDatabase:::deleteObjectStore:::2 +IDBDatabase:::name:::0 +IDBDatabase:::objectStoreNames:::0 +IDBDatabase:::onabort:::0 +IDBDatabase:::onclose:::0 +IDBDatabase:::onerror:::0 +IDBDatabase:::onversionchange:::0 +IDBDatabase:::setOnabort:::1 +IDBDatabase:::setOnclose:::1 +IDBDatabase:::setOnerror:::1 +IDBDatabase:::setOnversionchange:::1 +IDBDatabase:::transaction:::3 +IDBDatabase:::transaction:::4 +IDBDatabase:::version:::0 +IDBFactory:::cmp:::4 +IDBFactory:::deleteDatabase:::3 +IDBFactory:::getDatabaseNames:::2 +IDBFactory:::open:::3 +IDBFactory:::open:::4 +IDBIndex:::count:::2 +IDBIndex:::count:::3 +IDBIndex:::get:::3 +IDBIndex:::getAll:::2 +IDBIndex:::getAll:::3 +IDBIndex:::getAll:::4 +IDBIndex:::getAllKeys:::2 +IDBIndex:::getAllKeys:::3 +IDBIndex:::getAllKeys:::4 +IDBIndex:::getKey:::3 +IDBIndex:::keyPath:::1 +IDBIndex:::multiEntry:::0 +IDBIndex:::name:::0 +IDBIndex:::objectStore:::0 +IDBIndex:::openCursor:::2 +IDBIndex:::openCursor:::3 +IDBIndex:::openCursor:::4 +IDBIndex:::openKeyCursor:::2 +IDBIndex:::openKeyCursor:::3 +IDBIndex:::openKeyCursor:::4 +IDBIndex:::setName:::2 +IDBIndex:::unique:::0 +IDBKeyRange:::bound:::4 +IDBKeyRange:::bound:::5 +IDBKeyRange:::bound:::6 +IDBKeyRange:::includes:::3 +IDBKeyRange:::lowerBound:::3 +IDBKeyRange:::lowerBound:::4 +IDBKeyRange:::lowerOpen:::0 +IDBKeyRange:::lowerValue:::1 +IDBKeyRange:::only:::3 +IDBKeyRange:::upperBound:::3 +IDBKeyRange:::upperBound:::4 +IDBKeyRange:::upperOpen:::0 +IDBKeyRange:::upperValue:::1 +IDBObjectStore:::add:::3 +IDBObjectStore:::add:::4 +IDBObjectStore:::autoIncrement:::0 +IDBObjectStore:::clear:::2 +IDBObjectStore:::count:::2 +IDBObjectStore:::count:::3 +IDBObjectStore:::createIndex:::4 +IDBObjectStore:::createIndex:::5 +IDBObjectStore:::deleteFunction:::3 +IDBObjectStore:::deleteIndex:::2 +IDBObjectStore:::get:::3 +IDBObjectStore:::getAll:::2 +IDBObjectStore:::getAll:::3 +IDBObjectStore:::getAll:::4 +IDBObjectStore:::getAllKeys:::2 +IDBObjectStore:::getAllKeys:::3 +IDBObjectStore:::getAllKeys:::4 +IDBObjectStore:::getKey:::3 +IDBObjectStore:::index:::2 +IDBObjectStore:::indexNames:::0 +IDBObjectStore:::keyPath:::1 +IDBObjectStore:::name:::0 +IDBObjectStore:::openCursor:::2 +IDBObjectStore:::openCursor:::3 +IDBObjectStore:::openCursor:::4 +IDBObjectStore:::openKeyCursor:::2 +IDBObjectStore:::openKeyCursor:::3 +IDBObjectStore:::openKeyCursor:::4 +IDBObjectStore:::put:::3 +IDBObjectStore:::put:::4 +IDBObjectStore:::setName:::2 +IDBObjectStore:::transaction:::0 +IDBObservation:::key:::1 +IDBObservation:::type:::0 +IDBObservation:::value:::1 +IDBObserverChanges:::database:::0 +IDBObserverChanges:::records:::1 +IDBObserverChanges:::transaction:::0 +IDBObserver:::observe:::4 +IDBObserver:::unobserve:::2 +IDBOpenDBRequest:::onblocked:::0 +IDBOpenDBRequest:::onupgradeneeded:::0 +IDBOpenDBRequest:::setOnblocked:::1 +IDBOpenDBRequest:::setOnupgradeneeded:::1 +IDBRequest:::error:::1 +IDBRequest:::isResultDirty:::0 +IDBRequest:::onerror:::0 +IDBRequest:::onsuccess:::0 +IDBRequest:::readyState:::0 +IDBRequest:::result:::2 +IDBRequest:::setOnerror:::1 +IDBRequest:::setOnsuccess:::1 +IDBRequest:::source:::1 +IDBRequest:::transaction:::0 +IDBTransaction:::abort:::1 +IDBTransaction:::db:::0 +IDBTransaction:::error:::0 +IDBTransaction:::mode:::0 +IDBTransaction:::objectStore:::2 +IDBTransaction:::objectStoreNames:::0 +IDBTransaction:::onabort:::0 +IDBTransaction:::oncomplete:::0 +IDBTransaction:::onerror:::0 +IDBTransaction:::setOnabort:::1 +IDBTransaction:::setOncomplete:::1 +IDBTransaction:::setOnerror:::1 +IDBVersionChangeEvent:::dataLoss:::0 +IDBVersionChangeEvent:::dataLossMessage:::0 +IDBVersionChangeEvent:::newVersion:::1 +IDBVersionChangeEvent:::oldVersion:::0 +IdleDeadline:::didTimeout:::0 +IdleDeadline:::timeRemaining:::0 +IdleRequestCallback:::handleEvent:::1 +IIRFilterNode:::getFrequencyResponse:::4 +ImageBitmap:::close:::0 +ImageBitmapFactories:::createImageBitmap:::4 +ImageBitmapFactories:::createImageBitmap:::5 +ImageBitmapFactories:::createImageBitmap:::8 +ImageBitmapFactories:::createImageBitmap:::9 +ImageBitmap:::height:::0 +ImageBitmapRenderingContext:::canvas:::0 +ImageBitmapRenderingContext:::transferFromImageBitmap:::2 +ImageBitmap:::width:::0 +ImageCapture:::getPhotoCapabilities:::1 +ImageCapture:::grabFrame:::1 +ImageCapture:::setOptions:::2 +ImageCapture:::takePhoto:::1 +ImageCapture:::videoStreamTrack:::0 +ImageData:::createImageData:::4 +ImageData:::createImageData:::5 +ImageData:::data:::0 +ImageData:::dataUnion:::0 +ImageData:::getColorSettings:::0 +ImageData:::height:::0 +ImageData:::width:::0 +Image:::height:::0 +Image:::width:::0 +# ImplementedAs extended attribute), the method below is exposed via a different +InProcessWorkerBase:::postMessage:::4 +InProcessWorkerBase:::terminate:::0 +InputDeviceCapabilities:::firesTouchEvents:::0 +InputEvent:::data:::0 +InputEvent:::dataTransfer:::0 +InputEvent:::getTargetRanges:::0 +InputEvent:::inputType:::0 +InputEvent:::isComposing:::0 +InsertionPoint:::getDistributedNodes:::0 +InspectorOverlayHost:::resume:::0 +InspectorOverlayHost:::stepOver:::0 +InstallEvent:::registerForeignFetch:::3 +Internals::::::1 +Internals:::absoluteCaretBounds:::1 +InternalsAccessibility:::numberOfLiveAXObjects:::1 +Internals:::activeMarkerCountForNode:::1 +Internals:::addCompositionMarker:::5 +Internals:::addOneToPromise:::2 +Internals:::addTextMatchMarker:::3 +Internals:::advanceImageAnimation:::2 +Internals:::advanceTimeForImage:::3 +Internals:::allIconURLs:::1 +Internals:::bestZoomableAreaForTouchPoint:::6 +Internals:::boundingBox:::1 +Internals:::callbackFunctionTest:::0 +Internals:::canHyphenate:::1 +Internals:::canvasFontCacheMaxFonts:::0 +Internals:::clearHitTestCache:::2 +Internals:::clearNetworkConnectionInfoOverride:::0 +Internals:::compareTreeScopePosition:::3 +Internals:::computedStyleIncludingVisitedInfo:::1 +Internals:::countElementShadow:::2 +Internals:::counterValue:::1 +Internals:::countHitRegions:::1 +Internals:::crash:::0 +Internals:::createRejectedPromise:::2 +Internals:::createResolvedPromise:::2 +Internals:::createUserAgentShadowRoot:::1 +Internals:::cursorUpdatePending:::0 +Internals:::deserializeBuffer:::1 +Internals:::deserializeBufferContainingWasm:::2 +Internals:::dictionaryTest:::0 +Internals:::disableCompositedAnimation:::1 +Internals:::disableCSSAdditiveAnimations:::0 +Internals:::draggableRegions:::2 +Internals:::dumpRefCountedInstanceCounts:::0 +Internals:::effectivePreload:::1 +Internals:::elementFromPoint:::6 +Internals:::elementLayerTreeAsText:::2 +Internals:::elementLayerTreeAsText:::3 +Internals:::elementLayoutTreeAsText:::2 +Internals:::elementShouldAutoComplete:::2 +Internals:::endColorChooser:::1 +InternalSettings:::setAccessibilityFontScaleFactor:::2 +InternalSettings:::setAvailableHoverTypes:::2 +InternalSettings:::setAvailablePointerTypes:::2 +InternalSettings:::setCompositorWorkerEnabled:::2 +InternalSettings:::setCSSStickyPositionEnabled:::1 +InternalSettings:::setCursiveFontFamily:::3 +InternalSettings:::setDefaultVideoPosterURL:::2 +InternalSettings:::setDisplayModeOverride:::2 +InternalSettings:::setEditingBehavior:::2 +InternalSettings:::setExperimentalContentSecurityPolicyFeaturesEnabled:::1 +InternalSettings:::setFantasyFontFamily:::3 +InternalSettings:::setFixedFontFamily:::3 +InternalSettings:::setHideScrollbars:::2 +InternalSettings:::setImageAnimationPolicy:::2 +InternalSettings:::setImagesEnabled:::2 +InternalSettings:::setLangAttributeAwareFormControlUIEnabled:::1 +InternalSettings:::setMediaTypeOverride:::2 +InternalSettings:::setMockGestureTapHighlightsEnabled:::2 +InternalSettings:::setMockScrollbarsEnabled:::2 +InternalSettings:::setOverlayScrollbarsEnabled:::1 +InternalSettings:::setPictographFontFamily:::3 +InternalSettings:::setPresentationReceiver:::2 +InternalSettings:::setPrimaryHoverType:::2 +InternalSettings:::setPrimaryPointerType:::2 +InternalSettings:::setSansSerifFontFamily:::3 +InternalSettings:::setScrollTopLeftInteropEnabled:::1 +InternalSettings:::setSerifFontFamily:::3 +InternalSettings:::setStandardFontFamily:::3 +InternalSettings:::setTextAutosizingEnabled:::2 +InternalSettings:::setTextAutosizingWindowSizeOverride:::3 +InternalSettings:::setTextTrackKindUserPreference:::2 +InternalSettings:::setViewportEnabled:::2 +InternalSettings:::setViewportMetaEnabled:::2 +InternalSettings:::setViewportStyle:::2 +Internals:::evictAllResources:::0 +Internals:::executeCommand:::4 +InternalsFetch:::getInternalResponseURLList:::2 +Internals:::firstChildInFlatTree:::2 +Internals:::focusRingRects:::1 +Internals:::forceBlinkGCWithoutV8GC:::0 +Internals:::forceCompositingUpdate:::2 +Internals:::forceFullRepaint:::2 +Internals:::forceReload:::1 +Internals:::formControlStateOfHistoryItem:::1 +Internals:::getCurrentCursorInfo:::0 +Internals:::getImageSourceURL:::1 +Internals:::getProgrammaticScrollAnimationState:::1 +Internals:::getReferencedFilePaths:::0 +Internals:::getResourceHeader:::3 +Internals:::getResourcePriority:::2 +Internals:::getScrollAnimationState:::1 +Internals:::hasAutofocusRequest:::0 +Internals:::hasAutofocusRequest:::1 +Internals:::hasContentElement:::2 +Internals:::hasGrammarMarker:::4 +Internals:::hasShadowInsertionPoint:::2 +Internals:::hasSpellingMarker:::4 +Internals:::hitTestCacheHits:::2 +Internals:::hitTestCount:::2 +Internals:::htmlNamespace:::0 +Internals:::htmlTags:::0 +Internals:::idleTimeSpellCheckerState:::2 +Internals:::ignoreLayoutWithPendingStylesheets:::1 +Internals:::isAnimatedCSSPropertyUseCounted:::2 +Internals:::isCompositedAnimation:::1 +Internals:::isCSSPropertyUseCounted:::2 +Internals:::isInCanvasFontCache:::2 +Internals:::isLoading:::1 +Internals:::isLoadingFromMemoryCache:::1 +Internals:::isOverwriteModeEnabled:::1 +Internals:::isPageBoxVisible:::2 +Internals:::isPreloaded:::1 +Internals:::isPreloadedBy:::2 +Internals:::isSelectPopupVisible:::1 +Internals:::isSharingStyle:::2 +Internals:::isUseCounted:::2 +Internals:::isValidContentSelect:::2 +Internals:::lastChildInFlatTree:::2 +Internals:::lastSpellCheckProcessedSequence:::2 +Internals:::lastSpellCheckRequestSequence:::2 +Internals:::layerTreeAsText:::2 +Internals:::layerTreeAsText:::3 +Internals:::length:::0 +Internals:::lengthFromRange:::2 +Internals:::locationFromRange:::2 +Internals:::loseSharedGraphicsContext3D:::0 +Internals:::magnifyScaleAroundAnchor:::3 +Internals:::mainThreadScrollingReasons:::2 +Internals:::markerCountForNode:::3 +Internals:::markerDescriptionForNode:::4 +Internals:::markerRangeForNode:::4 +Internals:::markerTextForListItem:::1 +Internals:::mediaKeysCount:::0 +Internals:::mediaKeySessionCount:::0 +Internals:::mediaPlayerPlayingRemotelyChanged:::2 +Internals:::mediaPlayerRemoteRouteAvailabilityChanged:::2 +InternalsMediaStream:::addFakeDevice:::5 +Internals:::monotonicTimeToZeroBasedDocumentTime:::2 +InternalsNavigatorContentUtils:::setNavigatorContentUtilsClientMock:::2 +Internals:::needsLayoutCount:::1 +Internals:::nextInFlatTree:::2 +Internals:::nextSiblingInFlatTree:::2 +Internals:::nodesFromRect:::10 +Internals:::nonDraggableRegions:::2 +Internals:::nonFastScrollableRects:::2 +Internals:::numberOfLiveDocuments:::0 +Internals:::numberOfLiveNodes:::0 +Internals:::numberOfPages:::1 +Internals:::numberOfPages:::2 +Internals:::numberOfPages:::3 +Internals:::numberOfScrollableAreas:::1 +Internals:::observeGC:::1 +Internals:::observeUseCounter:::3 +Internals:::oldestShadowRoot:::1 +Internals:::originTrialsTest:::0 +Internals:::outlineRects:::1 +Internals:::pageNumber:::2 +Internals:::pageNumber:::3 +Internals:::pageNumber:::4 +Internals:::pagePopupWindow:::0 +Internals:::pageProperty:::3 +Internals:::pageScaleFactor:::1 +Internals:::pageSizeAndMarginsInPixels:::8 +Internals:::parentTreeScope:::1 +Internals:::pauseAnimations:::2 +Internals:::previousInFlatTree:::2 +Internals:::promiseCheck:::7 +Internals:::promiseCheckOverload:::2 +Internals:::promiseCheckOverload:::4 +Internals:::promiseCheckRange:::2 +Internals:::promiseCheckWithoutExceptionState:::4 +Internals:::rangeAsText:::1 +Internals:::rangeFromLocationAndLength:::3 +Internals:::recordTest:::0 +Internals:::registerURLSchemeAsBypassingContentSecurityPolicy:::1 +Internals:::registerURLSchemeAsBypassingContentSecurityPolicy:::2 +Internals:::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy:::1 +Internals:::replaceMisspelled:::3 +Internals:::resetTypeAheadSession:::1 +InternalsRTCCertificate:::rtcCertificateEquals:::3 +Internals:::runIdleTimeSpellChecker:::2 +Internals:::runtimeFlags:::0 +Internals:::scrollEventHandlerCount:::1 +Internals:::scrollingStateTreeAsText:::1 +Internals:::scrollsWithRespectTo:::3 +Internals:::selectColorInColorChooser:::2 +Internals:::selectedHTMLForClipboard:::0 +Internals:::selectedTextForClipboard:::0 +Internals:::selectionBounds:::1 +Internals:::selectMenuListText:::1 +Internals:::selectPopupItemStyleFontHeight:::2 +Internals:::selectPopupItemStyleIsRtl:::2 +Internals:::serializeObject:::1 +Internals:::serializeWithInlineWasm:::1 +InternalsServiceWorker:::terminateServiceWorker:::2 +Internals:::setAutofilled:::3 +Internals:::setCapsLockState:::1 +Internals:::setEditingValue:::3 +Internals:::setFocused:::1 +Internals:::setFormControlStateOfHistoryItem:::2 +Internals:::setFrameViewPosition:::4 +Internals:::setInitialFocus:::1 +Internals:::setIsCursorVisible:::3 +Internals:::setIsLowEndDevice:::1 +Internals:::setMarkedTextMatchesAreHighlighted:::2 +Internals:::setMarker:::4 +Internals:::setMarkersActive:::4 +Internals:::setMediaElementNetworkState:::2 +Internals:::setMockHyphenation:::1 +Internals:::setNetworkConnectionInfoOverride:::4 +Internals:::setPageScaleFactor:::2 +Internals:::setPageScaleFactorLimits:::3 +Internals:::setPersistent:::2 +Internals:::setScrollbarVisibilityInScrollableArea:::2 +Internals:::setScrollChain:::3 +Internals:::setShouldRevealPassword:::3 +Internals:::setSpellCheckingEnabled:::2 +Internals:::setSuggestedValue:::3 +Internals:::settings:::0 +Internals:::setUserPreferredLanguages:::1 +Internals:::setValueForUser:::2 +Internals:::setVisualViewportOffset:::2 +Internals:::setZoomFactor:::1 +Internals:::shadowPseudoId:::1 +Internals:::shadowRoot:::1 +Internals:::shadowRootType:::2 +Internals:::shortcutIconURLs:::1 +InternalsSpeechSynthesis:::enableMockSpeechSynthesizer:::3 +Internals:::startStoringCompositedLayerDebugInfo:::2 +Internals:::startTrackingRepaints:::2 +Internals:::stopStoringCompositedLayerDebugInfo:::2 +Internals:::stopTrackingRepaints:::2 +Internals:::suggestedValue:::2 +Internals:::suspendableObjectCount:::1 +Internals:::svgNamespace:::0 +Internals:::svgTags:::0 +Internals:::textAffinity:::0 +Internals:::textSurroundingNode:::4 +Internals:::toggleOverwriteModeEnabled:::1 +Internals:::touchEndOrCancelEventHandlerCount:::1 +Internals:::touchEventTargetLayerRects:::2 +Internals:::touchNodeAdjustedToBestClickableNode:::6 +Internals:::touchNodeAdjustedToBestContextMenuNode:::6 +Internals:::touchPositionAdjustedToBestClickableNode:::6 +Internals:::touchPositionAdjustedToBestContextMenuNode:::6 +Internals:::touchStartOrMoveEventHandlerCount:::1 +Internals:::treeScopeRootNode:::1 +Internals:::typeConversions:::0 +Internals:::unionTypesTest:::0 +Internals:::unscopableAttribute:::0 +Internals:::unscopableMethod:::0 +Internals:::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks:::1 +Internals:::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks:::2 +Internals:::updateStyleAndReturnAffectedElementCount:::1 +Internals:::userPreferredLanguages:::0 +InternalsVibration:::isVibrating:::2 +InternalsVibration:::pendingVibrationPattern:::2 +Internals:::viewportAsText:::5 +Internals:::visiblePlaceholder:::1 +Internals:::visibleSelectionAnchorNode:::0 +Internals:::visibleSelectionAnchorOffset:::0 +Internals:::visibleSelectionFocusNode:::0 +Internals:::visibleSelectionFocusOffset:::0 +Internals:::visualRect:::1 +Internals:::visualViewportHeight:::0 +Internals:::visualViewportScrollX:::0 +Internals:::visualViewportScrollY:::0 +Internals:::visualViewportWidth:::0 +InternalsWebAudio:::audioHandlerCount:::1 +Internals:::wheelEventHandlerCount:::1 +Internals:::workerThreadCount:::0 +Internals:::youngerShadowRoot:::2 +Internals:::youngestShadowRoot:::1 +IntersectionObserver:::disconnect:::1 +IntersectionObserverEntry:::boundingClientRect:::0 +IntersectionObserverEntry:::intersectionRatio:::0 +IntersectionObserverEntry:::intersectionRect:::0 +IntersectionObserverEntry:::isIntersecting:::0 +IntersectionObserverEntry:::rootBounds:::0 +IntersectionObserverEntry:::target:::0 +IntersectionObserverEntry:::time:::0 +IntersectionObserver:::observe:::2 +IntersectionObserver:::root:::0 +IntersectionObserver:::rootMargin:::0 +IntersectionObserver:::takeRecords:::1 +IntersectionObserver:::thresholds:::0 +IntersectionObserver:::unobserve:::2 +Iterator:::next:::2 +Iterator:::next:::3 +KeyboardEvent:::altKey:::0 +KeyboardEvent:::charCode:::0 +KeyboardEvent:::code:::0 +KeyboardEvent:::ctrlKey:::0 +KeyboardEvent:::getModifierState:::1 +KeyboardEvent:::initKeyboardEvent:::1 +KeyboardEvent:::initKeyboardEvent:::10 +KeyboardEvent:::initKeyboardEvent:::11 +KeyboardEvent:::initKeyboardEvent:::2 +KeyboardEvent:::initKeyboardEvent:::3 +KeyboardEvent:::initKeyboardEvent:::4 +KeyboardEvent:::initKeyboardEvent:::5 +KeyboardEvent:::initKeyboardEvent:::6 +KeyboardEvent:::initKeyboardEvent:::7 +KeyboardEvent:::initKeyboardEvent:::8 +KeyboardEvent:::initKeyboardEvent:::9 +KeyboardEvent:::isComposing:::0 +KeyboardEvent:::key:::0 +KeyboardEvent:::keyCode:::0 +KeyboardEvent:::location:::0 +KeyboardEvent:::metaKey:::0 +KeyboardEvent:::repeat:::0 +KeyboardEvent:::shiftKey:::0 +KeyboardEvent:::which:::0 +LabelableElement:::labels:::0 +LayerRect:::associatedNodeOffsetX:::0 +LayerRect:::associatedNodeOffsetY:::0 +LayerRect:::layerAssociatedNode:::0 +LayerRect:::layerRelativeRect:::0 +LayerRect:::layerType:::0 +LayerRectList:::item:::1 +LayerRectList:::length:::0 +ListedElement:::setCustomValidity:::1 +ListedElement:::validationMessage:::0 +ListedElement:::validity:::0 +LiveNodeListBase:::ownerNode:::0 +LiveNodeList:::item:::1 +LocalDOMWindow::::::1 +LocalDOMWindow:::alert:::1 +LocalDOMWindow:::alert:::2 +LocalDOMWindow:::animationWorklet:::1 +LocalDOMWindow:::applicationCache:::0 +LocalDOMWindow:::audioWorklet:::1 +LocalDOMWindow:::blur:::0 +LocalDOMWindow:::caches:::2 +LocalDOMWindow:::cancelAnimationFrame:::1 +LocalDOMWindow:::cancelIdleCallback:::1 +LocalDOMWindow:::captureEvents:::0 +LocalDOMWindow:::clientInformation:::0 +LocalDOMWindow:::close:::1 +LocalDOMWindow:::closed:::0 +LocalDOMWindow:::confirm:::1 +LocalDOMWindow:::confirm:::2 +LocalDOMWindow:::crypto:::1 +LocalDOMWindow:::customElements:::1 +LocalDOMWindow:::defaultStatus:::0 +LocalDOMWindow:::devicePixelRatio:::0 +LocalDOMWindow:::document:::0 +LocalDOMWindow:::event:::0 +LocalDOMWindow:::external:::0 +LocalDOMWindow:::fetch:::4 +LocalDOMWindow:::fetch:::5 +LocalDOMWindow:::find:::0 +LocalDOMWindow:::find:::1 +LocalDOMWindow:::find:::2 +LocalDOMWindow:::find:::3 +LocalDOMWindow:::find:::4 +LocalDOMWindow:::find:::5 +LocalDOMWindow:::find:::6 +LocalDOMWindow:::find:::7 +LocalDOMWindow:::focus:::1 +LocalDOMWindow:::frameElement:::0 +LocalDOMWindow:::frames:::0 +LocalDOMWindow:::getComputedStyle:::1 +LocalDOMWindow:::getComputedStyle:::2 +LocalDOMWindow:::getComputedStyleMap:::2 +LocalDOMWindow:::getComputedStyleMap:::3 +LocalDOMWindow:::getMatchedCSSRules:::0 +LocalDOMWindow:::getMatchedCSSRules:::1 +LocalDOMWindow:::getMatchedCSSRules:::2 +LocalDOMWindow:::getSelection:::0 +LocalDOMWindow:::history:::0 +LocalDOMWindow:::indexedDB:::1 +LocalDOMWindow:::innerHeight:::0 +LocalDOMWindow:::innerWidth:::0 +LocalDOMWindow:::isSecureContext:::0 +LocalDOMWindow:::length:::0 +LocalDOMWindow:::localStorage:::2 +LocalDOMWindow:::location:::0 +LocalDOMWindow:::locationbar:::0 +LocalDOMWindow:::matchMedia:::1 +LocalDOMWindow:::menubar:::0 +LocalDOMWindow:::moveBy:::2 +LocalDOMWindow:::moveTo:::2 +LocalDOMWindow:::name:::0 +LocalDOMWindow:::navigator:::0 +LocalDOMWindow:::offscreenBuffering:::0 +LocalDOMWindow:::onanimationend:::0 +LocalDOMWindow:::onanimationiteration:::0 +LocalDOMWindow:::onanimationstart:::0 +LocalDOMWindow:::ondevicelight:::1 +LocalDOMWindow:::ondevicemotion:::1 +LocalDOMWindow:::ondeviceorientation:::1 +LocalDOMWindow:::ondeviceorientationabsolute:::1 +LocalDOMWindow:::onorientationchange:::0 +LocalDOMWindow:::onsearch:::0 +LocalDOMWindow:::ontransitionend:::0 +LocalDOMWindow:::onwebkitanimationend:::0 +LocalDOMWindow:::onwebkitanimationiteration:::0 +LocalDOMWindow:::onwebkitanimationstart:::0 +LocalDOMWindow:::onwebkittransitionend:::0 +LocalDOMWindow:::onwheel:::0 +LocalDOMWindow:::open:::2 +LocalDOMWindow:::open:::3 +LocalDOMWindow:::openDatabase:::6 +LocalDOMWindow:::openDatabase:::7 +LocalDOMWindow:::opener:::0 +LocalDOMWindow:::orientation:::0 +LocalDOMWindow:::origin:::0 +LocalDOMWindow:::outerHeight:::0 +LocalDOMWindow:::outerWidth:::0 +LocalDOMWindow:::pageXOffset:::0 +LocalDOMWindow:::pageYOffset:::0 +LocalDOMWindow:::paintWorklet:::1 +LocalDOMWindow:::parent:::0 +LocalDOMWindow:::performance:::1 +LocalDOMWindow:::personalbar:::0 +LocalDOMWindow:::postMessage:::3 +LocalDOMWindow:::postMessage:::4 +LocalDOMWindow:::print:::1 +LocalDOMWindow:::prompt:::1 +LocalDOMWindow:::prompt:::2 +LocalDOMWindow:::prompt:::3 +LocalDOMWindow:::releaseEvents:::0 +LocalDOMWindow:::requestAnimationFrame:::1 +LocalDOMWindow:::requestIdleCallback:::1 +LocalDOMWindow:::requestIdleCallback:::2 +LocalDOMWindow:::resizeBy:::2 +LocalDOMWindow:::resizeTo:::2 +LocalDOMWindow:::screen:::0 +LocalDOMWindow:::screenLeft:::0 +LocalDOMWindow:::screenTop:::0 +LocalDOMWindow:::screenX:::0 +LocalDOMWindow:::screenY:::0 +LocalDOMWindow:::scroll:::0 +LocalDOMWindow:::scroll:::1 +LocalDOMWindow:::scroll:::2 +LocalDOMWindow:::scrollbars:::0 +LocalDOMWindow:::scrollBy:::0 +LocalDOMWindow:::scrollBy:::1 +LocalDOMWindow:::scrollBy:::2 +LocalDOMWindow:::scrollTo:::0 +LocalDOMWindow:::scrollTo:::1 +LocalDOMWindow:::scrollTo:::2 +LocalDOMWindow:::scrollX:::0 +LocalDOMWindow:::scrollY:::0 +LocalDOMWindow:::self:::0 +LocalDOMWindow:::sessionStorage:::2 +LocalDOMWindow:::setDefaultStatus:::1 +LocalDOMWindow:::setEvent:::1 +LocalDOMWindow:::setName:::1 +LocalDOMWindow:::setOnanimationend:::1 +LocalDOMWindow:::setOnanimationiteration:::1 +LocalDOMWindow:::setOnanimationstart:::1 +LocalDOMWindow:::setOndevicelight:::2 +LocalDOMWindow:::setOndevicemotion:::2 +LocalDOMWindow:::setOndeviceorientation:::2 +LocalDOMWindow:::setOndeviceorientationabsolute:::2 +LocalDOMWindow:::setOnorientationchange:::1 +LocalDOMWindow:::setOnsearch:::1 +LocalDOMWindow:::setOntransitionend:::1 +LocalDOMWindow:::setOnwebkitanimationend:::1 +LocalDOMWindow:::setOnwebkitanimationiteration:::1 +LocalDOMWindow:::setOnwebkitanimationstart:::1 +LocalDOMWindow:::setOnwebkittransitionend:::1 +LocalDOMWindow:::setOnwheel:::1 +LocalDOMWindow:::setOpener:::1 +LocalDOMWindow:::setStatus:::1 +LocalDOMWindow:::setWebKitAnimationEvent:::1 +LocalDOMWindow:::setWebkitMediaStream:::2 +LocalDOMWindow:::setWebKitMutationObserver:::1 +LocalDOMWindow:::setWebkitRTCPeerConnection:::2 +LocalDOMWindow:::setWebkitSpeechGrammar:::2 +LocalDOMWindow:::setWebkitSpeechGrammarList:::2 +LocalDOMWindow:::setWebkitSpeechRecognition:::2 +LocalDOMWindow:::setWebkitSpeechRecognitionError:::2 +LocalDOMWindow:::setWebkitSpeechRecognitionEvent:::2 +LocalDOMWindow:::setWebKitTransitionEvent:::1 +LocalDOMWindow:::setWebkitURL:::1 +LocalDOMWindow:::speechSynthesis:::2 +LocalDOMWindow:::status:::0 +LocalDOMWindow:::statusbar:::0 +LocalDOMWindow:::stop:::0 +LocalDOMWindow:::styleMedia:::0 +LocalDOMWindow:::toolbar:::0 +LocalDOMWindow:::top:::0 +LocalDOMWindow:::visualViewport:::0 +LocalDOMWindow:::webKitAnimationEvent:::0 +LocalDOMWindow:::webkitMediaStream:::1 +LocalDOMWindow:::webKitMutationObserver:::0 +LocalDOMWindow:::webkitRequestAnimationFrame:::1 +LocalDOMWindow:::webkitRequestFileSystem:::4 +LocalDOMWindow:::webkitRequestFileSystem:::5 +LocalDOMWindow:::webkitResolveLocalFileSystemURL:::3 +LocalDOMWindow:::webkitResolveLocalFileSystemURL:::4 +LocalDOMWindow:::webkitRTCPeerConnection:::1 +LocalDOMWindow:::webkitSpeechGrammar:::1 +LocalDOMWindow:::webkitSpeechGrammarList:::1 +LocalDOMWindow:::webkitSpeechRecognition:::1 +LocalDOMWindow:::webkitSpeechRecognitionError:::1 +LocalDOMWindow:::webkitSpeechRecognitionEvent:::1 +LocalDOMWindow:::webkitStorageInfo:::1 +LocalDOMWindow:::webKitTransitionEvent:::0 +LocalDOMWindow:::webkitURL:::0 +LocalDOMWindow:::window:::0 +Location:::ancestorOrigins:::0 +Location:::assign:::4 +Location:::hash:::0 +Location:::host:::0 +Location:::hostname:::0 +Location:::href:::0 +Location:::origin:::0 +Location:::pathname:::0 +Location:::port:::0 +Location:::protocol:::0 +Location:::reload:::1 +Location:::replace:::4 +Location:::search:::0 +Location:::setHash:::4 +Location:::setHost:::4 +Location:::setHostname:::4 +Location:::setHref:::4 +Location:::setPathname:::4 +Location:::setPort:::4 +Location:::setProtocol:::4 +Location:::setSearch:::4 +Location:::valueOf:::1 +Magnetometer:::x:::1 +Magnetometer:::y:::1 +Magnetometer:::z:::1 +MediaCapabilities:::query:::2 +MediaDecodingAbility:::powerEfficient:::0 +MediaDecodingAbility:::smooth:::0 +MediaDecodingAbility:::supported:::0 +MediaDeviceInfo:::deviceId:::0 +MediaDeviceInfo:::groupId:::0 +MediaDeviceInfo:::kind:::0 +MediaDeviceInfo:::label:::0 +MediaDeviceInfo:::toJSONForBinding:::0 +MediaDevices:::enumerateDevices:::1 +MediaDevices:::getSupportedConstraints:::0 +MediaDevices:::getUserMedia:::2 +MediaDevices:::getUserMedia:::3 +MediaDevices:::ondevicechange:::0 +MediaDevices:::setOndevicechange:::1 +MediaElementAudioSourceNode:::mediaElement:::0 +MediaEncryptedEvent:::initData:::0 +MediaEncryptedEvent:::initDataType:::0 +MediaError:::code:::0 +MediaKeyMessageEvent:::message:::0 +MediaKeyMessageEvent:::messageType:::0 +MediaKeys:::createSession:::2 +MediaKeys:::createSession:::3 +MediaKeySession:::close:::1 +MediaKeySession:::closed:::1 +MediaKeySession:::expiration:::0 +MediaKeySession:::generateRequest:::3 +MediaKeySession:::keyStatuses:::0 +MediaKeySession:::load:::2 +MediaKeySession:::onkeystatuseschange:::0 +MediaKeySession:::onmessage:::0 +MediaKeySession:::remove:::1 +MediaKeySession:::sessionId:::0 +MediaKeySession:::setOnkeystatuseschange:::1 +MediaKeySession:::setOnmessage:::1 +MediaKeySession:::update:::2 +MediaKeys:::setServerCertificate:::2 +MediaKeyStatusMap:::get:::2 +MediaKeyStatusMap:::has:::1 +MediaKeyStatusMap:::size:::0 +MediaKeySystemAccess:::createMediaKeys:::1 +MediaKeySystemAccess:::getConfiguration:::0 +MediaKeySystemAccess:::keySystem:::0 +MediaList:::appendMedium:::2 +MediaList:::deleteMedium:::2 +MediaList:::item:::1 +MediaList:::length:::0 +MediaList:::mediaText:::0 +MediaList:::setMediaText:::1 +MediaMetadata:::album:::0 +MediaMetadata:::artist:::0 +MediaMetadata:::artwork:::1 +MediaMetadata:::setAlbum:::1 +MediaMetadata:::setArtist:::1 +MediaMetadata:::setArtwork:::3 +MediaMetadata:::setTitle:::1 +MediaMetadata:::title:::0 +MediaQueryList:::addDeprecatedListener:::1 +MediaQueryListEvent:::matches:::0 +MediaQueryListEvent:::media:::0 +MediaQueryList:::matches:::0 +MediaQueryList:::media:::0 +MediaQueryList:::onchange:::0 +MediaQueryList:::removeDeprecatedListener:::1 +MediaQueryList:::setOnchange:::1 +MediaRecorder:::audioBitsPerSecond:::0 +MediaRecorder:::isTypeSupported:::1 +MediaRecorder:::mimeType:::0 +MediaRecorder:::ondataavailable:::0 +MediaRecorder:::onerror:::0 +MediaRecorder:::onpause:::0 +MediaRecorder:::onresume:::0 +MediaRecorder:::onstart:::0 +MediaRecorder:::onstop:::0 +MediaRecorder:::pause:::1 +MediaRecorder:::requestData:::1 +MediaRecorder:::resume:::1 +MediaRecorder:::setOndataavailable:::1 +MediaRecorder:::setOnerror:::1 +MediaRecorder:::setOnpause:::1 +MediaRecorder:::setOnresume:::1 +MediaRecorder:::setOnstart:::1 +MediaRecorder:::setOnstop:::1 +MediaRecorder:::start:::1 +MediaRecorder:::start:::2 +MediaRecorder:::state:::0 +MediaRecorder:::stop:::1 +MediaRecorder:::stream:::0 +MediaRecorder:::videoBitsPerSecond:::0 +MediaSession:::metadata:::0 +MediaSession:::playbackState:::0 +MediaSession:::setActionHandler:::2 +MediaSession:::setMetadata:::1 +MediaSession:::setPlaybackState:::1 +MediaSettingsRange:::max:::0 +MediaSettingsRange:::min:::0 +MediaSettingsRange:::step:::0 +MediaSource:::activeSourceBuffers:::0 +MediaSource:::addSourceBuffer:::2 +MediaSource:::clearLiveSeekableRange:::1 +MediaSource:::duration:::0 +MediaSource:::endOfStream:::1 +MediaSource:::endOfStream:::2 +MediaSource:::isTypeSupported:::1 +MediaSource:::onsourceclose:::0 +MediaSource:::onsourceended:::0 +MediaSource:::onsourceopen:::0 +MediaSource:::readyState:::0 +MediaSource:::removeSourceBuffer:::2 +MediaSource:::setDuration:::2 +MediaSource:::setLiveSeekableRange:::3 +MediaSource:::setOnsourceclose:::1 +MediaSource:::setOnsourceended:::1 +MediaSource:::setOnsourceopen:::1 +MediaSource:::sourceBuffers:::0 +MediaStream:::active:::0 +MediaStream:::addTrack:::2 +MediaStreamAudioDestinationNode:::stream:::0 +MediaStreamAudioSourceNode:::getMediaStream:::0 +MediaStream:::clone:::1 +MediaStreamEvent:::stream:::0 +MediaStream:::getAudioTracks:::0 +MediaStream:::getTrackById:::1 +MediaStream:::getTracks:::0 +MediaStream:::getVideoTracks:::0 +MediaStream:::id:::0 +MediaStream:::onactive:::0 +MediaStream:::onaddtrack:::0 +MediaStream:::oninactive:::0 +MediaStream:::onremovetrack:::0 +MediaStream:::removeTrack:::2 +MediaStream:::setOnactive:::1 +MediaStream:::setOnaddtrack:::1 +MediaStream:::setOninactive:::1 +MediaStream:::setOnremovetrack:::1 +MediaStreamTrack:::applyConstraints:::1 +MediaStreamTrack:::applyConstraints:::2 +MediaStreamTrack:::clone:::1 +MediaStreamTrackContentHint:::contentHint:::1 +MediaStreamTrackContentHint:::setContentHint:::2 +MediaStreamTrack:::enabled:::0 +MediaStreamTrackEvent:::track:::0 +MediaStreamTrack:::getCapabilities:::0 +MediaStreamTrack:::getConstraints:::0 +MediaStreamTrack:::getSettings:::0 +MediaStreamTrack:::id:::0 +MediaStreamTrack:::kind:::0 +MediaStreamTrack:::label:::0 +MediaStreamTrack:::muted:::0 +MediaStreamTrack:::onended:::0 +MediaStreamTrack:::onmute:::0 +MediaStreamTrack:::onunmute:::0 +MediaStreamTrack:::readyState:::0 +MediaStreamTrack:::setEnabled:::1 +MediaStreamTrack:::setOnended:::1 +MediaStreamTrack:::setOnmute:::1 +MediaStreamTrack:::setOnunmute:::1 +MediaStreamTrack:::stopTrack:::1 +MemoryInfo:::jsHeapSizeLimit:::0 +MemoryInfo:::totalJSHeapSize:::0 +MemoryInfo:::usedJSHeapSize:::0 +MessageCallback:::handleMessage:::1 +MessageChannel:::port1:::0 +MessageChannel:::port2:::0 +MessageEvent:::data:::0 +MessageEvent:::initMessageEvent:::0 +MessageEvent:::initMessageEvent:::1 +MessageEvent:::initMessageEvent:::2 +MessageEvent:::initMessageEvent:::3 +MessageEvent:::initMessageEvent:::4 +MessageEvent:::initMessageEvent:::5 +MessageEvent:::initMessageEvent:::6 +MessageEvent:::initMessageEvent:::7 +MessageEvent:::initMessageEvent:::8 +MessageEvent:::lastEventId:::0 +MessageEvent:::origin:::0 +MessageEvent:::ports:::1 +MessageEvent:::source:::0 +MessageEvent:::suborigin:::0 +MessagePort:::close:::0 +MessagePort:::onmessage:::0 +MessagePort:::postMessage:::3 +MessagePort:::postMessage:::4 +MessagePort:::setOnmessage:::1 +MessagePort:::start:::0 +MetadataCallback:::handleEvent:::1 +Metadata:::modificationTime:::0 +Metadata:::size:::0 +# Methods declared in a base class: +MIDIAccess:::inputs:::0 +MIDIAccess:::onstatechange:::0 +MIDIAccess:::outputs:::0 +MIDIAccess:::setOnstatechange:::1 +MIDIAccess:::sysexEnabled:::0 +MIDIConnectionEvent:::port:::0 +MIDIInputMap:::size:::0 +MIDIInput:::onmidimessage:::0 +MIDIInput:::setOnmidimessage:::1 +MIDIMessageEvent:::data:::0 +MIDIOutputMap:::size:::0 +MIDIOutput:::send:::2 +MIDIOutput:::send:::3 +MIDIPort:::close:::1 +MIDIPort:::connection:::0 +MIDIPort:::id:::0 +MIDIPort:::manufacturer:::0 +MIDIPortMap:::size:::0 +MIDIPort:::midiAccess:::0 +MIDIPort:::name:::0 +MIDIPort:::onstatechange:::0 +MIDIPort:::open:::1 +MIDIPort:::setOnstatechange:::1 +MIDIPort:::state:::0 +MIDIPort:::type:::0 +MIDIPort:::version:::0 +Mojo:::createDataPipe:::1 +Mojo:::createMessagePipe:::0 +Mojo:::createSharedBuffer:::1 +MojoHandle:::close:::0 +MojoHandle:::discardData:::1 +MojoHandle:::discardData:::2 +MojoHandle:::duplicateBufferHandle:::0 +MojoHandle:::duplicateBufferHandle:::1 +MojoHandle:::mapBuffer:::2 +MojoHandle:::queryData:::0 +MojoHandle:::readData:::1 +MojoHandle:::readData:::2 +MojoHandle:::readMessage:::0 +MojoHandle:::readMessage:::1 +MojoHandle:::watch:::3 +MojoHandle:::writeData:::1 +MojoHandle:::writeData:::2 +MojoHandle:::writeMessage:::2 +MojoWatcher:::cancel:::0 +MouseEvent:::altKey:::0 +MouseEvent:::button:::0 +MouseEvent:::buttons:::0 +MouseEvent:::clientX:::0 +MouseEvent:::clientY:::0 +MouseEvent:::ctrlKey:::0 +MouseEvent:::fromElement:::0 +MouseEvent:::getDataTransfer:::0 +MouseEvent:::getModifierState:::1 +MouseEvent:::initMouseEvent:::1 +MouseEvent:::initMouseEvent:::10 +MouseEvent:::initMouseEvent:::11 +MouseEvent:::initMouseEvent:::12 +MouseEvent:::initMouseEvent:::13 +MouseEvent:::initMouseEvent:::14 +MouseEvent:::initMouseEvent:::15 +MouseEvent:::initMouseEvent:::16 +MouseEvent:::initMouseEvent:::2 +MouseEvent:::initMouseEvent:::3 +MouseEvent:::initMouseEvent:::4 +MouseEvent:::initMouseEvent:::5 +MouseEvent:::initMouseEvent:::6 +MouseEvent:::initMouseEvent:::7 +MouseEvent:::initMouseEvent:::8 +MouseEvent:::initMouseEvent:::9 +MouseEvent:::layerX:::0 +MouseEvent:::layerY:::0 +MouseEvent:::metaKey:::0 +MouseEvent:::movementX:::0 +MouseEvent:::movementY:::0 +MouseEvent:::offsetX:::0 +MouseEvent:::offsetY:::0 +MouseEvent:::pageX:::0 +MouseEvent:::pageY:::0 +MouseEvent:::region:::0 +MouseEvent:::relatedTarget:::0 +MouseEvent:::screenX:::0 +MouseEvent:::screenY:::0 +MouseEvent:::shiftKey:::0 +MouseEvent:::toElement:::0 +MouseEvent:::which:::0 +MouseEvent:::x:::0 +MouseEvent:::y:::0 +MutationEvent:::attrChange:::0 +MutationEvent:::attrName:::0 +MutationEvent:::initMutationEvent:::0 +MutationEvent:::initMutationEvent:::1 +MutationEvent:::initMutationEvent:::2 +MutationEvent:::initMutationEvent:::3 +MutationEvent:::initMutationEvent:::4 +MutationEvent:::initMutationEvent:::5 +MutationEvent:::initMutationEvent:::6 +MutationEvent:::initMutationEvent:::7 +MutationEvent:::initMutationEvent:::8 +MutationEvent:::newValue:::0 +MutationEvent:::prevValue:::0 +MutationEvent:::relatedNode:::0 +MutationObserver:::disconnect:::0 +MutationObserver:::observe:::2 +MutationObserver:::observe:::3 +MutationObserver:::takeRecords:::0 +MutationRecord:::addedNodes:::0 +MutationRecord:::attributeName:::0 +MutationRecord:::attributeNamespace:::0 +MutationRecord:::nextSibling:::0 +MutationRecord:::oldValue:::0 +MutationRecord:::previousSibling:::0 +MutationRecord:::removedNodes:::0 +MutationRecord:::target:::0 +MutationRecord:::type:::0 +NamedNodeMap:::getNamedItem:::1 +NamedNodeMap:::getNamedItemNS:::2 +NamedNodeMap:::item:::1 +NamedNodeMap:::length:::0 +NamedNodeMap:::removeNamedItem:::2 +NamedNodeMap:::removeNamedItemNS:::3 +NamedNodeMap:::setNamedItem:::2 +NamedNodeMap:::setNamedItemNS:::2 +NavigationPreloadManager:::disable:::1 +NavigationPreloadManager:::enable:::1 +NavigationPreloadManager:::getState:::1 +NavigationPreloadManager:::setHeaderValue:::2 +NavigatorAuth:::authentication:::1 +NavigatorBattery:::getBattery:::2 +NavigatorBeacon:::sendBeacon:::4 +NavigatorBeacon:::sendBeacon:::5 +NavigatorBluetooth:::bluetooth:::1 +NavigatorBudget:::budget:::1 +NavigatorContentUtils:::isProtocolHandlerRegistered:::4 +NavigatorContentUtils:::registerProtocolHandler:::5 +NavigatorContentUtils:::unregisterProtocolHandler:::4 +Navigator:::cookieEnabled:::0 +NavigatorCookies:::cookieEnabled:::0 +NavigatorCPU:::hardwareConcurrency:::0 +NavigatorCredentials:::credentials:::1 +NavigatorDoNotTrack:::doNotTrack:::1 +NavigatorEvents:::maxTouchPoints:::1 +NavigatorGamepad:::getGamepads:::1 +NavigatorGeolocation:::geolocation:::1 +NavigatorID:::appCodeName:::0 +NavigatorID:::appName:::0 +NavigatorID:::appVersion:::0 +NavigatorID:::platform:::0 +NavigatorID:::product:::0 +NavigatorID:::userAgent:::0 +NavigatorInstalledApp:::getInstalledRelatedApps:::2 +NavigatorLanguage:::hasLanguagesChanged:::0 +NavigatorLanguage:::language:::0 +NavigatorLanguage:::languages:::0 +NavigatorMediaCapabilities:::mediaCapabilities:::1 +NavigatorMediaSession:::mediaSession:::2 +NavigatorMediaStream:::getUserMedia:::5 +NavigatorNetworkInformation:::connection:::1 +NavigatorNFC:::nfc:::1 +NavigatorOnLine:::onLine:::0 +NavigatorPermissions:::permissions:::1 +NavigatorPlugins:::javaEnabled:::1 +NavigatorPlugins:::mimeTypes:::1 +NavigatorPlugins:::plugins:::1 +NavigatorPresentation:::presentation:::1 +Navigator:::productSub:::0 +NavigatorRequestMediaKeySystemAccess:::requestMediaKeySystemAccess:::4 +NavigatorServiceWorker:::serviceWorker:::3 +NavigatorShare:::share:::3 +NavigatorStorageQuota:::storage:::1 +NavigatorStorageQuota:::webkitPersistentStorage:::1 +NavigatorStorageQuota:::webkitTemporaryStorage:::1 +NavigatorUSB:::usb:::1 +NavigatorUserMediaErrorCallback:::handleEvent:::1 +NavigatorUserMediaError:::constraintName:::0 +NavigatorUserMediaError:::message:::0 +NavigatorUserMediaError:::name:::0 +NavigatorUserMedia:::mediaDevices:::1 +NavigatorUserMediaSuccessCallback:::handleEvent:::1 +Navigator:::vendor:::0 +Navigator:::vendorSub:::0 +NavigatorVibration:::vibrate:::2 +NavigatorVR:::getVRDisplays:::2 +NavigatorWebMIDI:::requestMIDIAccess:::2 +NavigatorWebMIDI:::requestMIDIAccess:::3 +NetworkInformation:::downlinkMax:::0 +NetworkInformation:::onchange:::0 +NetworkInformation:::ontypechange:::0 +NetworkInformation:::setOnchange:::1 +NetworkInformation:::setOntypechange:::1 +NetworkInformation:::type:::0 +NFC:::cancelPush:::1 +NFC:::cancelPush:::2 +NFC:::cancelWatch:::1 +NFC:::cancelWatch:::2 +NFC:::push:::2 +NFC:::push:::3 +NFC:::watch:::2 +NFC:::watch:::3 +Node:::appendChild:::2 +Node:::assignedSlotForBinding:::0 +Node:::baseURI:::0 +Node:::childNodes:::0 +Node:::cloneNode:::1 +Node:::cloneNode:::2 +Node:::compareDocumentPosition:::1 +Node:::contains:::1 +NodeFilter:::acceptNode:::1 +NodeFilter:::acceptNode:::2 +Node:::firstChild:::0 +Node:::getDestinationInsertionPoints:::0 +Node:::getNodeType:::0 +Node:::getRootNode:::0 +Node:::getRootNode:::1 +Node:::hasChildren:::0 +Node:::insertBefore:::3 +Node:::isConnected:::0 +Node:::isDefaultNamespace:::1 +Node:::isEqualNode:::1 +Node:::isSameNode:::1 +NodeIteratorBase:::filter:::0 +NodeIteratorBase:::root:::0 +NodeIteratorBase:::whatToShow:::0 +NodeIterator:::detach:::0 +NodeIterator:::filter:::0 +NodeIterator:::nextNode:::1 +NodeIterator:::pointerBeforeReferenceNode:::0 +NodeIterator:::previousNode:::1 +NodeIterator:::referenceNode:::0 +NodeIterator:::root:::0 +NodeIterator:::whatToShow:::0 +Node:::lastChild:::0 +NodeList:::item:::1 +NodeList:::length:::0 +Node:::lookupNamespaceURI:::1 +Node:::lookupPrefix:::1 +Node:::nextSibling:::0 +Node:::nodeName:::0 +Node:::nodeValue:::0 +Node:::normalize:::0 +Node:::ownerDocument:::0 +Node:::parentElement:::0 +Node:::parentNode:::0 +Node:::previousSibling:::0 +Node:::remove:::1 +Node:::removeChild:::2 +Node:::replaceChild:::3 +Node:::setNodeValue:::1 +Node:::setTextContent:::1 +Node:::tabIndex:::0 +Node:::textContent:::0 +NonDocumentTypeChildNode:::nextElementSibling:::1 +NonDocumentTypeChildNode:::previousElementSibling:::1 +NonElementParentNode:::getElementById:::2 +Notification:::actions:::1 +Notification:::badge:::0 +Notification:::body:::0 +Notification:::close:::0 +Notification:::data:::1 +Notification:::dir:::0 +NotificationEvent:::action:::0 +NotificationEvent:::getNotification:::0 +NotificationEvent:::reply:::0 +Notification:::icon:::0 +Notification:::image:::0 +Notification:::lang:::0 +Notification:::maxActions:::0 +Notification:::onclick:::0 +Notification:::onclose:::0 +Notification:::onerror:::0 +Notification:::onshow:::0 +Notification:::permission:::1 +NotificationPermissionCallback:::handleEvent:::1 +Notification:::renotify:::0 +Notification:::requestPermission:::1 +Notification:::requestPermission:::2 +Notification:::requireInteraction:::0 +Notification:::setOnclick:::1 +Notification:::setOnclose:::1 +Notification:::setOnerror:::1 +Notification:::setOnshow:::1 +Notification:::silent:::0 +Notification:::tag:::0 +Notification:::timestamp:::0 +Notification:::title:::0 +Notification:::vibrate:::0 +OESVertexArrayObject:::bindVertexArrayOES:::0 +OESVertexArrayObject:::bindVertexArrayOES:::1 +OESVertexArrayObject:::createVertexArrayOES:::0 +OESVertexArrayObject:::deleteVertexArrayOES:::0 +OESVertexArrayObject:::deleteVertexArrayOES:::1 +OESVertexArrayObject:::isVertexArrayOES:::0 +OESVertexArrayObject:::isVertexArrayOES:::1 +OfflineAudioCompletionEvent:::renderedBuffer:::0 +OfflineAudioContext:::length:::0 +OfflineAudioContext:::oncomplete:::0 +OfflineAudioContext:::setOncomplete:::1 +OfflineAudioContext:::startOfflineRendering:::1 +OfflineAudioContext:::suspendContext:::2 +OffscreenCanvas:::convertToBlob:::2 +OffscreenCanvas:::convertToBlob:::3 +OffscreenCanvas:::height:::0 +OffscreenCanvasModules:::getContext:::4 +OffscreenCanvasModules:::getContext:::5 +OffscreenCanvasRenderingContext2D:::beginPath:::0 +OffscreenCanvasRenderingContext2D:::clearRect:::4 +OffscreenCanvasRenderingContext2D:::clip:::0 +OffscreenCanvasRenderingContext2D:::clip:::1 +OffscreenCanvasRenderingContext2D:::commit:::2 +OffscreenCanvasRenderingContext2D:::createImageData:::2 +OffscreenCanvasRenderingContext2D:::createImageData:::3 +OffscreenCanvasRenderingContext2D:::createLinearGradient:::4 +OffscreenCanvasRenderingContext2D:::createPattern:::4 +OffscreenCanvasRenderingContext2D:::createRadialGradient:::7 +OffscreenCanvasRenderingContext2D:::drawImage:::11 +OffscreenCanvasRenderingContext2D:::drawImage:::5 +OffscreenCanvasRenderingContext2D:::drawImage:::7 +OffscreenCanvasRenderingContext2D:::fill:::0 +OffscreenCanvasRenderingContext2D:::fill:::1 +OffscreenCanvasRenderingContext2D:::fill:::2 +OffscreenCanvasRenderingContext2D:::fillRect:::4 +OffscreenCanvasRenderingContext2D:::fillStyle:::1 +OffscreenCanvasRenderingContext2D:::filter:::0 +OffscreenCanvasRenderingContext2D:::getImageData:::5 +OffscreenCanvasRenderingContext2D:::getLineDash:::0 +OffscreenCanvasRenderingContext2D:::globalAlpha:::0 +OffscreenCanvasRenderingContext2D:::globalCompositeOperation:::0 +OffscreenCanvasRenderingContext2D:::imageSmoothingEnabled:::0 +OffscreenCanvasRenderingContext2D:::imageSmoothingQuality:::0 +OffscreenCanvasRenderingContext2D:::isPointInPath:::2 +OffscreenCanvasRenderingContext2D:::isPointInPath:::3 +OffscreenCanvasRenderingContext2D:::isPointInPath:::4 +OffscreenCanvasRenderingContext2D:::isPointInStroke:::2 +OffscreenCanvasRenderingContext2D:::isPointInStroke:::3 +OffscreenCanvasRenderingContext2D:::lineCap:::0 +OffscreenCanvasRenderingContext2D:::lineDashOffset:::0 +OffscreenCanvasRenderingContext2D:::lineJoin:::0 +OffscreenCanvasRenderingContext2D:::lineWidth:::0 +OffscreenCanvasRenderingContext2D:::miterLimit:::0 +OffscreenCanvasRenderingContext2D:::offscreenCanvas:::0 +OffscreenCanvasRenderingContext2D:::putImageData:::4 +OffscreenCanvasRenderingContext2D:::putImageData:::8 +OffscreenCanvasRenderingContext2D:::resetTransform:::0 +OffscreenCanvasRenderingContext2D:::restore:::0 +OffscreenCanvasRenderingContext2D:::rotate:::1 +OffscreenCanvasRenderingContext2D:::save:::0 +OffscreenCanvasRenderingContext2D:::scale:::2 +OffscreenCanvasRenderingContext2D:::setFillStyle:::1 +OffscreenCanvasRenderingContext2D:::setFilter:::1 +OffscreenCanvasRenderingContext2D:::setGlobalAlpha:::1 +OffscreenCanvasRenderingContext2D:::setGlobalCompositeOperation:::1 +OffscreenCanvasRenderingContext2D:::setImageSmoothingEnabled:::1 +OffscreenCanvasRenderingContext2D:::setImageSmoothingQuality:::1 +OffscreenCanvasRenderingContext2D:::setLineCap:::1 +OffscreenCanvasRenderingContext2D:::setLineDash:::1 +OffscreenCanvasRenderingContext2D:::setLineDashOffset:::1 +OffscreenCanvasRenderingContext2D:::setLineJoin:::1 +OffscreenCanvasRenderingContext2D:::setLineWidth:::1 +OffscreenCanvasRenderingContext2D:::setMiterLimit:::1 +OffscreenCanvasRenderingContext2D:::setShadowBlur:::1 +OffscreenCanvasRenderingContext2D:::setShadowColor:::1 +OffscreenCanvasRenderingContext2D:::setShadowOffsetX:::1 +OffscreenCanvasRenderingContext2D:::setShadowOffsetY:::1 +OffscreenCanvasRenderingContext2D:::setStrokeStyle:::1 +OffscreenCanvasRenderingContext2D:::setTransform:::6 +OffscreenCanvasRenderingContext2D:::shadowBlur:::0 +OffscreenCanvasRenderingContext2D:::shadowColor:::0 +OffscreenCanvasRenderingContext2D:::shadowOffsetX:::0 +OffscreenCanvasRenderingContext2D:::shadowOffsetY:::0 +OffscreenCanvasRenderingContext2D:::stroke:::0 +OffscreenCanvasRenderingContext2D:::stroke:::1 +OffscreenCanvasRenderingContext2D:::strokeRect:::4 +OffscreenCanvasRenderingContext2D:::strokeStyle:::1 +OffscreenCanvasRenderingContext2D:::transform:::6 +OffscreenCanvasRenderingContext2D:::translate:::2 +OffscreenCanvas:::setHeight:::1 +OffscreenCanvas:::setWidth:::1 +OffscreenCanvas:::transferToImageBitmap:::2 +OffscreenCanvas:::width:::0 +OrientationSensor:::isReadingDirty:::0 +OrientationSensor:::populateMatrix:::2 +OrientationSensor:::quaternion:::1 +OriginTrialsTest:::normalAttribute:::0 +OriginTrialsTestPartial:::methodPartial:::1 +OriginTrialsTestPartial:::normalAttributePartial:::1 +OriginTrialsTestPartial:::staticAttributePartial:::0 +OriginTrialsTestPartial:::staticMethodPartial:::0 +OriginTrialsTest:::staticAttribute:::0 +OriginTrialsTest:::throwingAttribute:::2 +OriginTrialsTest:::unconditionalAttribute:::0 +OscillatorNode:::detune:::0 +OscillatorNode:::frequency:::0 +OscillatorNode:::setPeriodicWave:::1 +OscillatorNode:::setType:::2 +OscillatorNode:::type:::0 +PagePopupController:::closePopup:::0 +PagePopupController:::formatMonth:::2 +PagePopupController:::formatShortMonth:::2 +PagePopupController:::formatWeek:::3 +PagePopupController:::localizeNumberString:::1 +PagePopupController:::selectFontsFromOwnerDocument:::1 +PagePopupController:::setValue:::1 +PagePopupController:::setValueAndClosePopup:::2 +PagePopupController:::setWindowRect:::4 +PageTransitionEvent:::persisted:::0 +PaintRenderingContext2D:::beginPath:::0 +PaintRenderingContext2D:::clearRect:::4 +PaintRenderingContext2D:::clip:::0 +PaintRenderingContext2D:::clip:::1 +PaintRenderingContext2D:::clip:::2 +PaintRenderingContext2D:::createLinearGradient:::4 +PaintRenderingContext2D:::createPattern:::4 +PaintRenderingContext2D:::createRadialGradient:::7 +PaintRenderingContext2D:::currentTransform:::0 +PaintRenderingContext2D:::drawImage:::11 +PaintRenderingContext2D:::drawImage:::5 +PaintRenderingContext2D:::drawImage:::7 +PaintRenderingContext2D:::fill:::0 +PaintRenderingContext2D:::fill:::1 +PaintRenderingContext2D:::fill:::2 +PaintRenderingContext2D:::fillRect:::4 +PaintRenderingContext2D:::fillStyle:::1 +PaintRenderingContext2D:::getLineDash:::0 +PaintRenderingContext2D:::globalAlpha:::0 +PaintRenderingContext2D:::globalCompositeOperation:::0 +PaintRenderingContext2D:::imageSmoothingEnabled:::0 +PaintRenderingContext2D:::imageSmoothingQuality:::0 +PaintRenderingContext2D:::isPointInPath:::2 +PaintRenderingContext2D:::isPointInPath:::3 +PaintRenderingContext2D:::isPointInPath:::4 +PaintRenderingContext2D:::isPointInStroke:::2 +PaintRenderingContext2D:::isPointInStroke:::3 +PaintRenderingContext2D:::lineCap:::0 +PaintRenderingContext2D:::lineDashOffset:::0 +PaintRenderingContext2D:::lineJoin:::0 +PaintRenderingContext2D:::lineWidth:::0 +PaintRenderingContext2D:::miterLimit:::0 +PaintRenderingContext2D:::resetTransform:::0 +PaintRenderingContext2D:::restore:::0 +PaintRenderingContext2D:::rotate:::1 +PaintRenderingContext2D:::save:::0 +PaintRenderingContext2D:::scale:::2 +PaintRenderingContext2D:::setCurrentTransform:::1 +PaintRenderingContext2D:::setFillStyle:::1 +PaintRenderingContext2D:::setGlobalAlpha:::1 +PaintRenderingContext2D:::setGlobalCompositeOperation:::1 +PaintRenderingContext2D:::setImageSmoothingEnabled:::1 +PaintRenderingContext2D:::setImageSmoothingQuality:::1 +PaintRenderingContext2D:::setLineCap:::1 +PaintRenderingContext2D:::setLineDash:::1 +PaintRenderingContext2D:::setLineDashOffset:::1 +PaintRenderingContext2D:::setLineJoin:::1 +PaintRenderingContext2D:::setLineWidth:::1 +PaintRenderingContext2D:::setMiterLimit:::1 +PaintRenderingContext2D:::setShadowBlur:::1 +PaintRenderingContext2D:::setShadowColor:::1 +PaintRenderingContext2D:::setShadowOffsetX:::1 +PaintRenderingContext2D:::setShadowOffsetY:::1 +PaintRenderingContext2D:::setStrokeStyle:::1 +PaintRenderingContext2D:::setTransform:::6 +PaintRenderingContext2D:::shadowBlur:::0 +PaintRenderingContext2D:::shadowColor:::0 +PaintRenderingContext2D:::shadowOffsetX:::0 +PaintRenderingContext2D:::shadowOffsetY:::0 +PaintRenderingContext2D:::stroke:::0 +PaintRenderingContext2D:::stroke:::1 +PaintRenderingContext2D:::strokeRect:::4 +PaintRenderingContext2D:::strokeStyle:::1 +PaintRenderingContext2D:::transform:::6 +PaintRenderingContext2D:::translate:::2 +PaintSize:::height:::0 +PaintSize:::width:::0 +PaintWorkletGlobalScope:::registerPaint:::3 +PannerNode:::coneInnerAngle:::0 +PannerNode:::coneOuterAngle:::0 +PannerNode:::coneOuterGain:::0 +PannerNode:::distanceModel:::0 +PannerNode:::maxDistance:::0 +PannerNode:::orientationX:::0 +PannerNode:::orientationY:::0 +PannerNode:::orientationZ:::0 +PannerNode:::panningModel:::0 +PannerNode:::positionX:::0 +PannerNode:::positionY:::0 +PannerNode:::positionZ:::0 +PannerNode:::refDistance:::0 +PannerNode:::rolloffFactor:::0 +PannerNode:::setConeInnerAngle:::1 +PannerNode:::setConeOuterAngle:::1 +PannerNode:::setConeOuterGain:::1 +PannerNode:::setDistanceModel:::1 +PannerNode:::setMaxDistance:::2 +PannerNode:::setOrientation:::3 +PannerNode:::setPanningModel:::1 +PannerNode:::setPosition:::3 +PannerNode:::setRefDistance:::2 +PannerNode:::setRolloffFactor:::1 +ParentNode:::append:::3 +ParentNode:::childElementCount:::1 +ParentNode:::children:::1 +ParentNode:::firstElementChild:::1 +ParentNode:::lastElementChild:::1 +ParentNode:::prepend:::3 +ParentNode:::querySelector:::3 +ParentNode:::querySelectorAll:::3 +PasswordCredential:::additionalData:::0 +PasswordCredential:::idName:::0 +PasswordCredential:::passwordName:::0 +PasswordCredential:::setAdditionalData:::1 +PasswordCredential:::setIdName:::1 +PasswordCredential:::setPasswordName:::1 +Path2D:::addPath:::1 +Path2D:::addPath:::2 +PaymentAddress:::addressLine:::0 +PaymentAddress:::city:::0 +PaymentAddress:::country:::0 +PaymentAddress:::dependentLocality:::0 +PaymentAddress:::languageCode:::0 +PaymentAddress:::organization:::0 +PaymentAddress:::phone:::0 +PaymentAddress:::postalCode:::0 +PaymentAddress:::recipient:::0 +PaymentAddress:::region:::0 +PaymentAddress:::sortingCode:::0 +PaymentAddress:::toJSONForBinding:::0 +PaymentAppServiceWorkerGlobalScope:::onpaymentrequest:::1 +PaymentAppServiceWorkerGlobalScope:::setOnpaymentrequest:::2 +PaymentAppServiceWorkerRegistration:::paymentManager:::2 +PaymentInstruments:::deleteInstrument:::1 +PaymentInstruments:::get:::1 +PaymentInstruments:::has:::1 +PaymentInstruments:::keys:::0 +PaymentInstruments:::set:::2 +PaymentManager:::getManifest:::1 +PaymentManager:::instruments:::0 +PaymentManager:::setManifest:::2 +PaymentRequest:::abort:::1 +PaymentRequest:::canMakePayment:::1 +PaymentRequestEvent:::appRequest:::0 +PaymentRequestEvent:::respondWith:::3 +PaymentRequest:::getShippingAddress:::0 +PaymentRequest:::onshippingaddresschange:::0 +PaymentRequest:::onshippingoptionchange:::0 +PaymentRequest:::setOnshippingaddresschange:::1 +PaymentRequest:::setOnshippingoptionchange:::1 +PaymentRequest:::shippingOption:::0 +PaymentRequest:::shippingType:::0 +PaymentRequest:::show:::1 +PaymentRequestUpdateEvent:::updateWith:::3 +PaymentResponse:::complete:::1 +PaymentResponse:::complete:::2 +PaymentResponse:::details:::2 +PaymentResponse:::methodName:::0 +PaymentResponse:::payerEmail:::0 +PaymentResponse:::payerName:::0 +PaymentResponse:::payerPhone:::0 +PaymentResponse:::shippingAddress:::0 +PaymentResponse:::shippingOption:::0 +PaymentResponse:::toJSONForBinding:::0 +PerformanceBase:::clearFrameTimings:::0 +PerformanceBase:::clearMarks:::1 +PerformanceBase:::clearMeasures:::1 +PerformanceBase:::clearResourceTimings:::0 +PerformanceBase:::getEntries:::0 +PerformanceBase:::getEntriesByName:::2 +PerformanceBase:::getEntriesByType:::1 +PerformanceBase:::mark:::2 +PerformanceBase:::measure:::4 +PerformanceBase:::now:::0 +PerformanceBase:::setFrameTimingBufferSize:::1 +PerformanceBase:::setResourceTimingBufferSize:::1 +PerformanceBase:::timing:::0 +Performance:::clearFrameTimings:::0 +Performance:::clearMarks:::0 +Performance:::clearMarks:::1 +Performance:::clearMeasures:::0 +Performance:::clearMeasures:::1 +Performance:::clearResourceTimings:::0 +PerformanceEntry:::duration:::0 +PerformanceEntry:::entryType:::0 +PerformanceEntry:::name:::0 +PerformanceEntry:::startTime:::0 +PerformanceEntry:::toJSONForBinding:::0 +Performance:::getEntries:::0 +Performance:::getEntriesByName:::1 +Performance:::getEntriesByName:::2 +Performance:::getEntriesByType:::1 +PerformanceLongTaskTiming:::attribution:::0 +Performance:::mark:::2 +Performance:::measure:::2 +Performance:::measure:::3 +Performance:::measure:::4 +Performance:::memory:::0 +Performance:::navigation:::0 +PerformanceNavigation:::redirectCount:::0 +PerformanceNavigationTiming:::domComplete:::0 +PerformanceNavigationTiming:::domContentLoadedEventEnd:::0 +PerformanceNavigationTiming:::domContentLoadedEventStart:::0 +PerformanceNavigationTiming:::domInteractive:::0 +PerformanceNavigationTiming:::loadEventEnd:::0 +PerformanceNavigationTiming:::loadEventStart:::0 +PerformanceNavigationTiming:::redirectCount:::0 +PerformanceNavigationTiming:::toJSONForBinding:::0 +PerformanceNavigationTiming:::type:::0 +PerformanceNavigationTiming:::unloadEventEnd:::0 +PerformanceNavigationTiming:::unloadEventStart:::0 +PerformanceNavigation:::toJSONForBinding:::0 +PerformanceNavigation:::type:::0 +Performance:::now:::0 +PerformanceObserver:::disconnect:::0 +PerformanceObserverEntryList:::getEntries:::0 +PerformanceObserverEntryList:::getEntriesByName:::1 +PerformanceObserverEntryList:::getEntriesByName:::2 +PerformanceObserverEntryList:::getEntriesByType:::1 +PerformanceObserver:::observe:::2 +Performance:::onframetimingbufferfull:::0 +Performance:::onresourcetimingbufferfull:::0 +PerformanceResourceTiming:::connectEnd:::0 +PerformanceResourceTiming:::connectStart:::0 +PerformanceResourceTiming:::decodedBodySize:::0 +PerformanceResourceTiming:::domainLookupEnd:::0 +PerformanceResourceTiming:::domainLookupStart:::0 +PerformanceResourceTiming:::encodedBodySize:::0 +PerformanceResourceTiming:::fetchStart:::0 +PerformanceResourceTiming:::initiatorType:::0 +PerformanceResourceTiming:::redirectEnd:::0 +PerformanceResourceTiming:::redirectStart:::0 +PerformanceResourceTiming:::requestStart:::0 +PerformanceResourceTiming:::responseEnd:::0 +PerformanceResourceTiming:::responseStart:::0 +PerformanceResourceTiming:::secureConnectionStart:::0 +PerformanceResourceTiming:::transferSize:::0 +PerformanceResourceTiming:::workerStart:::0 +Performance:::setFrameTimingBufferSize:::1 +Performance:::setOnframetimingbufferfull:::1 +Performance:::setOnresourcetimingbufferfull:::1 +Performance:::setResourceTimingBufferSize:::1 +Performance:::timing:::0 +PerformanceTiming:::connectEnd:::0 +PerformanceTiming:::connectStart:::0 +PerformanceTiming:::domainLookupEnd:::0 +PerformanceTiming:::domainLookupStart:::0 +PerformanceTiming:::domComplete:::0 +PerformanceTiming:::domContentLoadedEventEnd:::0 +PerformanceTiming:::domContentLoadedEventStart:::0 +PerformanceTiming:::domInteractive:::0 +PerformanceTiming:::domLoading:::0 +PerformanceTiming:::fetchStart:::0 +PerformanceTiming:::loadEventEnd:::0 +PerformanceTiming:::loadEventStart:::0 +PerformanceTiming:::navigationStart:::0 +PerformanceTiming:::redirectEnd:::0 +PerformanceTiming:::redirectStart:::0 +PerformanceTiming:::requestStart:::0 +PerformanceTiming:::responseEnd:::0 +PerformanceTiming:::responseStart:::0 +PerformanceTiming:::secureConnectionStart:::0 +PerformanceTiming:::toJSONForBinding:::0 +PerformanceTiming:::unloadEventEnd:::0 +PerformanceTiming:::unloadEventStart:::0 +Performance:::toJSONForBinding:::0 +Permissions:::query:::2 +Permissions:::request:::2 +Permissions:::requestAll:::2 +Permissions:::revoke:::2 +PermissionStatus:::onchange:::0 +PermissionStatus:::setOnchange:::1 +PermissionStatus:::state:::0 +PhotoCapabilities:::fillLightMode:::0 +PhotoCapabilities:::imageHeight:::0 +PhotoCapabilities:::imageWidth:::0 +PhotoCapabilities:::redEyeReduction:::0 +PointerEvent:::getCoalescedEvents:::0 +PointerEvent:::height:::0 +PointerEvent:::isPrimary:::0 +PointerEvent:::pointerId:::0 +PointerEvent:::pointerType:::0 +PointerEvent:::pressure:::0 +PointerEvent:::tangentialPressure:::0 +PointerEvent:::tiltX:::0 +PointerEvent:::tiltY:::0 +PointerEvent:::twist:::0 +PointerEvent:::width:::0 +PopStateEvent:::state:::0 +PositionCallback:::handleEvent:::1 +PositionErrorCallback:::handleEvent:::1 +PositionError:::code:::0 +PositionError:::message:::0 +PresentationAvailability:::onchange:::0 +PresentationAvailability:::setOnchange:::1 +PresentationAvailability:::value:::0 +PresentationConnectionAvailableEvent:::connection:::0 +PresentationConnection:::binaryType:::0 +PresentationConnection:::close:::0 +PresentationConnectionCloseEvent:::message:::0 +PresentationConnectionCloseEvent:::reason:::0 +PresentationConnection:::id:::0 +PresentationConnectionList:::connections:::0 +PresentationConnectionList:::onconnectionavailable:::0 +PresentationConnectionList:::setOnconnectionavailable:::1 +PresentationConnection:::onclose:::0 +PresentationConnection:::onconnect:::0 +PresentationConnection:::onmessage:::0 +PresentationConnection:::onterminate:::0 +PresentationConnection:::send:::2 +PresentationConnection:::setBinaryType:::1 +PresentationConnection:::setOnclose:::1 +PresentationConnection:::setOnconnect:::1 +PresentationConnection:::setOnmessage:::1 +PresentationConnection:::setOnterminate:::1 +PresentationConnection:::state:::0 +PresentationConnection:::terminate:::0 +PresentationConnection:::url:::0 +Presentation:::defaultRequest:::0 +Presentation:::receiver:::0 +PresentationReceiver:::connectionList:::1 +PresentationRequest:::getAvailability:::1 +PresentationRequest:::onconnectionavailable:::0 +PresentationRequest:::reconnect:::2 +PresentationRequest:::setOnconnectionavailable:::1 +PresentationRequest:::start:::1 +Presentation:::setDefaultRequest:::1 +ProcessingInstruction:::sheet:::0 +ProcessingInstruction:::target:::0 +ProgressEvent:::lengthComputable:::0 +ProgressEvent:::loaded:::0 +ProgressEvent:::total:::0 +PromiseRejectionEvent:::promise:::0 +PromiseRejectionEvent:::reason:::1 +PropertyRegistration:::registerProperty:::3 +PushEvent:::data:::0 +PushManager:::getSubscription:::1 +PushManager:::permissionState:::2 +PushManager:::permissionState:::3 +PushManager:::subscribe:::2 +PushManager:::subscribe:::3 +PushMessageData:::arrayBuffer:::0 +PushMessageData:::blob:::0 +PushMessageData:::json:::2 +PushMessageData:::text:::0 +PushSubscription:::endpoint:::0 +PushSubscription:::getKey:::1 +PushSubscription:::options:::0 +PushSubscriptionOptions:::applicationServerKey:::0 +PushSubscriptionOptions:::userVisibleOnly:::0 +PushSubscription:::toJSONForBinding:::0 +PushSubscription:::unsubscribe:::1 +RadioNodeList:::item:::1 +RadioNodeList:::length:::0 +RadioNodeList:::setValue:::1 +RadioNodeList:::value:::0 +Range:::cloneContents:::1 +Range:::cloneRange:::0 +Range:::collapse:::0 +Range:::collapse:::1 +Range:::collapsed:::0 +Range:::commonAncestorContainer:::0 +Range:::compareBoundaryPoints:::3 +Range:::comparePoint:::3 +Range:::createContextualFragment:::2 +Range:::deleteContents:::1 +Range:::detach:::0 +Range:::endContainer:::0 +Range:::endOffset:::0 +Range:::expand:::1 +Range:::expand:::2 +Range:::extractContents:::1 +Range:::getBoundingClientRect:::0 +Range:::getClientRects:::0 +Range:::insertNode:::2 +Range:::intersectsNode:::2 +Range:::isPointInRange:::3 +Range:::selectNode:::2 +Range:::selectNodeContents:::2 +Range:::setEnd:::3 +Range:::setEndAfter:::2 +Range:::setEndBefore:::2 +Range:::setStart:::3 +Range:::setStartAfter:::2 +Range:::setStartBefore:::2 +Range:::startContainer:::0 +Range:::startOffset:::0 +Range:::surroundContents:::2 +Range:::toString:::0 +RecordTest:::getNullableStringLongRecord:::0 +RecordTest:::getStringElementRecord:::0 +RecordTest:::getStringLongRecord:::0 +RecordTest:::getUSVStringUSVStringBooleanRecordRecord:::0 +RecordTest:::returnStringByteStringSequenceRecord:::0 +RecordTest:::setByteStringByteStringRecord:::1 +RecordTest:::setFloatOrStringElementRecord:::1 +RecordTest:::setNullableStringLongRecord:::1 +RecordTest:::setStringElementRecord:::1 +RecordTest:::setStringLongRecord:::1 +RecordTest:::setUSVStringUSVStringBooleanRecordRecord:::1 +RecordTest:::unionReceivedARecord:::1 +RelatedApplication:::id:::0 +RelatedApplication:::platform:::0 +RelatedApplication:::url:::0 +RelatedEvent:::relatedTarget:::0 +RemotePlayback:::cancelWatchAvailability:::1 +RemotePlayback:::cancelWatchAvailability:::2 +RemotePlayback:::onconnect:::0 +RemotePlayback:::onconnecting:::0 +RemotePlayback:::ondisconnect:::0 +RemotePlayback:::prompt:::1 +RemotePlayback:::setOnconnect:::1 +RemotePlayback:::setOnconnecting:::1 +RemotePlayback:::setOndisconnect:::1 +RemotePlayback:::state:::0 +RemotePlayback:::watchAvailability:::2 +Request:::clone:::2 +Request:::credentials:::0 +Request:::getHeaders:::0 +Request:::getReferrerPolicy:::0 +Request:::integrity:::0 +Request:::method:::0 +Request:::mode:::0 +Request:::redirect:::0 +Request:::referrer:::0 +Request:::url:::0 +ResizeObserverCallback:::handleEvent:::2 +ResizeObserver:::disconnect:::0 +ResizeObserverEntry:::contentRect:::0 +ResizeObserverEntry:::target:::0 +ResizeObserver:::observe:::1 +ResizeObserver:::unobserve:::1 +ResourceProgressEvent:::url:::0 +Response:::body:::1 +Response:::clone:::2 +Response:::error:::1 +Response:::headers:::0 +Response:::ok:::0 +Response:::redirect:::3 +Response:::redirect:::4 +Response:::redirected:::0 +Response:::status:::0 +Response:::statusText:::0 +Response:::type:::0 +Response:::url:::0 +RTCCertificate:::expires:::0 +RTCDataChannel:::binaryType:::0 +RTCDataChannel:::bufferedAmount:::0 +RTCDataChannel:::bufferedAmountLowThreshold:::0 +RTCDataChannel:::close:::0 +RTCDataChannelEvent:::channel:::0 +RTCDataChannel:::id:::0 +RTCDataChannel:::label:::0 +RTCDataChannel:::maxRetransmits:::0 +RTCDataChannel:::maxRetransmitTime:::0 +RTCDataChannel:::negotiated:::0 +RTCDataChannel:::onbufferedamountlow:::0 +RTCDataChannel:::onclose:::0 +RTCDataChannel:::onerror:::0 +RTCDataChannel:::onmessage:::0 +RTCDataChannel:::onopen:::0 +RTCDataChannel:::ordered:::0 +RTCDataChannel:::protocol:::0 +RTCDataChannel:::readyState:::0 +RTCDataChannel:::reliable:::0 +RTCDataChannel:::send:::2 +RTCDataChannel:::setBinaryType:::2 +RTCDataChannel:::setBufferedAmountLowThreshold:::1 +RTCDataChannel:::setOnbufferedamountlow:::1 +RTCDataChannel:::setOnclose:::1 +RTCDataChannel:::setOnerror:::1 +RTCDataChannel:::setOnmessage:::1 +RTCDataChannel:::setOnopen:::1 +RTCDTMFSender:::canInsertDTMF:::0 +RTCDTMFSender:::duration:::0 +RTCDTMFSender:::insertDTMF:::2 +RTCDTMFSender:::insertDTMF:::3 +RTCDTMFSender:::insertDTMF:::4 +RTCDTMFSender:::interToneGap:::0 +RTCDTMFSender:::ontonechange:::0 +RTCDTMFSender:::setOntonechange:::1 +RTCDTMFSender:::toneBuffer:::0 +RTCDTMFSender:::track:::0 +RTCDTMFToneChangeEvent:::tone:::0 +RTCIceCandidate:::candidate:::0 +RTCIceCandidate:::sdpMid:::0 +RTCIceCandidate:::sdpMLineIndex:::0 +RTCIceCandidate:::setCandidate:::1 +RTCIceCandidate:::setSdpMid:::1 +RTCIceCandidate:::setSdpMLineIndex:::1 +RTCIceCandidate:::toJSONForBinding:::0 +RTCLegacyStatsReport:::id:::0 +RTCLegacyStatsReport:::names:::0 +RTCLegacyStatsReport:::stat:::1 +RTCLegacyStatsReport:::timestamp:::0 +RTCLegacyStatsReport:::type:::0 +RTCPeerConnection:::addIceCandidate:::2 +RTCPeerConnection:::addIceCandidate:::4 +RTCPeerConnection:::addStream:::3 +RTCPeerConnection:::addStream:::4 +RTCPeerConnection:::close:::1 +RTCPeerConnection:::createAnswer:::1 +RTCPeerConnection:::createAnswer:::2 +RTCPeerConnection:::createAnswer:::3 +RTCPeerConnection:::createAnswer:::4 +RTCPeerConnection:::createDataChannel:::3 +RTCPeerConnection:::createDataChannel:::4 +RTCPeerConnection:::createDTMFSender:::2 +RTCPeerConnection:::createOffer:::1 +RTCPeerConnection:::createOffer:::2 +RTCPeerConnection:::createOffer:::4 +RTCPeerConnection:::createOffer:::5 +RTCPeerConnectionErrorCallback:::handleEvent:::1 +RTCPeerConnection:::generateCertificate:::3 +RTCPeerConnection:::getLocalStreams:::0 +RTCPeerConnection:::getReceivers:::0 +RTCPeerConnection:::getRemoteStreams:::0 +RTCPeerConnection:::getStats:::1 +RTCPeerConnection:::getStats:::2 +RTCPeerConnection:::getStats:::3 +RTCPeerConnection:::getStreamById:::1 +RTCPeerConnection:::iceConnectionState:::0 +RTCPeerConnectionIceEvent:::candidate:::0 +RTCPeerConnection:::iceGatheringState:::0 +RTCPeerConnection:::localDescription:::0 +RTCPeerConnection:::onaddstream:::0 +RTCPeerConnection:::ondatachannel:::0 +RTCPeerConnection:::onicecandidate:::0 +RTCPeerConnection:::oniceconnectionstatechange:::0 +RTCPeerConnection:::onicegatheringstatechange:::0 +RTCPeerConnection:::onnegotiationneeded:::0 +RTCPeerConnection:::onremovestream:::0 +RTCPeerConnection:::onsignalingstatechange:::0 +RTCPeerConnection:::remoteDescription:::0 +RTCPeerConnection:::removeStream:::2 +RTCPeerConnection:::setConfiguration:::3 +RTCPeerConnection:::setLocalDescription:::2 +RTCPeerConnection:::setLocalDescription:::3 +RTCPeerConnection:::setLocalDescription:::4 +RTCPeerConnection:::setOnaddstream:::1 +RTCPeerConnection:::setOndatachannel:::1 +RTCPeerConnection:::setOnicecandidate:::1 +RTCPeerConnection:::setOniceconnectionstatechange:::1 +RTCPeerConnection:::setOnicegatheringstatechange:::1 +RTCPeerConnection:::setOnnegotiationneeded:::1 +RTCPeerConnection:::setOnremovestream:::1 +RTCPeerConnection:::setOnsignalingstatechange:::1 +RTCPeerConnection:::setRemoteDescription:::2 +RTCPeerConnection:::setRemoteDescription:::3 +RTCPeerConnection:::setRemoteDescription:::4 +RTCPeerConnection:::signalingState:::0 +RTCRtpReceiver:::track:::0 +RTCSessionDescriptionCallback:::handleEvent:::1 +RTCSessionDescription:::sdp:::0 +RTCSessionDescription:::setSdp:::1 +RTCSessionDescription:::setType:::1 +RTCSessionDescription:::toJSONForBinding:::0 +RTCSessionDescription:::type:::0 +RTCStatsCallback:::handleEvent:::1 +RTCStatsResponse:::namedItem:::0 +RTCStatsResponse:::namedItem:::1 +RTCStatsResponse:::result:::0 +ScopedCredential:::id:::0 +ScopedCredentialInfo:::attestation:::0 +ScopedCredentialInfo:::clientData:::0 +ScopedCredential:::type:::0 +Screen:::availHeight:::0 +Screen:::availLeft:::0 +Screen:::availTop:::0 +Screen:::availWidth:::0 +Screen:::colorDepth:::0 +Screen:::height:::0 +ScreenOrientation:::angle:::0 +ScreenOrientation:::lock:::2 +ScreenOrientation:::onchange:::0 +ScreenOrientation:::setOnchange:::1 +ScreenOrientation:::type:::0 +ScreenOrientation:::unlock:::0 +Screen:::pixelDepth:::0 +ScreenScreenOrientation:::orientation:::2 +ScreenWakeLock:::keepAwake:::1 +ScreenWakeLock:::setKeepAwake:::2 +Screen:::width:::0 +ScriptElementBase:::nonce:::0 +ScriptElementBase:::setNonce:::1 +ScriptLoaderClient:::nonce:::0 +ScriptLoaderClient:::setNonce:::1 +ScriptProcessorNode:::bufferSize:::0 +ScriptProcessorNode:::onaudioprocess:::0 +ScriptProcessorNode:::setOnaudioprocess:::1 +ScrollStateCallback:::handleEvent:::1 +ScrollState:::consumeDelta:::3 +ScrollState:::deltaGranularity:::0 +ScrollState:::deltaX:::0 +ScrollState:::deltaY:::0 +ScrollState:::distributeToScrollChainDescendant:::0 +ScrollState:::fromUserInput:::0 +ScrollState:::inInertialPhase:::0 +ScrollState:::isBeginning:::0 +ScrollState:::isDirectManipulation:::0 +ScrollState:::isEnding:::0 +ScrollState:::positionX:::0 +ScrollState:::positionY:::0 +ScrollState:::shouldPropagate:::0 +ScrollState:::velocityX:::0 +ScrollState:::velocityY:::0 +SecurityContext:::addressSpaceForBindings:::0 +SecurityPolicyViolationEvent:::blockedURI:::0 +SecurityPolicyViolationEvent:::columnNumber:::0 +SecurityPolicyViolationEvent:::disposition:::0 +SecurityPolicyViolationEvent:::documentURI:::0 +SecurityPolicyViolationEvent:::effectiveDirective:::0 +SecurityPolicyViolationEvent:::lineNumber:::0 +SecurityPolicyViolationEvent:::originalPolicy:::0 +SecurityPolicyViolationEvent:::referrer:::0 +SecurityPolicyViolationEvent:::sample:::0 +SecurityPolicyViolationEvent:::sourceFile:::0 +SecurityPolicyViolationEvent:::statusCode:::0 +SecurityPolicyViolationEvent:::violatedDirective:::0 +Sensor:::activated:::0 +SensorErrorEvent:::error:::0 +Sensor:::onactivate:::0 +Sensor:::onchange:::0 +Sensor:::onerror:::0 +Sensor:::setOnactivate:::1 +Sensor:::setOnchange:::1 +Sensor:::setOnerror:::1 +Sensor:::start:::0 +Sensor:::stop:::0 +Sensor:::timestamp:::1 +ServiceWorkerClient:::frameType:::0 +ServiceWorkerClient:::id:::0 +ServiceWorkerClient:::postMessage:::4 +ServiceWorkerClient:::postMessage:::5 +ServiceWorkerClients:::claim:::1 +ServiceWorkerClients:::get:::2 +ServiceWorkerClients:::matchAll:::1 +ServiceWorkerClients:::matchAll:::2 +ServiceWorkerClients:::openWindow:::2 +ServiceWorkerClient:::url:::0 +ServiceWorkerContainer:::controller:::0 +ServiceWorkerContainer:::getRegistration:::1 +ServiceWorkerContainer:::getRegistration:::2 +ServiceWorkerContainer:::getRegistrations:::1 +ServiceWorkerContainer:::oncontrollerchange:::0 +ServiceWorkerContainer:::onmessage:::0 +ServiceWorkerContainer:::ready:::1 +ServiceWorkerContainer:::registerServiceWorker:::2 +ServiceWorkerContainer:::registerServiceWorker:::3 +ServiceWorkerContainer:::setOncontrollerchange:::1 +ServiceWorkerContainer:::setOnmessage:::1 +ServiceWorkerGlobalScopeBackgroundFetch:::onbackgroundfetchabort:::1 +ServiceWorkerGlobalScopeBackgroundFetch:::onbackgroundfetchclick:::1 +ServiceWorkerGlobalScopeBackgroundFetch:::onbackgroundfetched:::1 +ServiceWorkerGlobalScopeBackgroundFetch:::onbackgroundfetchfail:::1 +ServiceWorkerGlobalScopeBackgroundFetch:::setOnbackgroundfetchabort:::2 +ServiceWorkerGlobalScopeBackgroundFetch:::setOnbackgroundfetchclick:::2 +ServiceWorkerGlobalScopeBackgroundFetch:::setOnbackgroundfetched:::2 +ServiceWorkerGlobalScopeBackgroundFetch:::setOnbackgroundfetchfail:::2 +ServiceWorkerGlobalScope:::clients:::0 +ServiceWorkerGlobalScope:::fetch:::3 +ServiceWorkerGlobalScope:::fetch:::4 +ServiceWorkerGlobalScopeNotifications:::onnotificationclick:::1 +ServiceWorkerGlobalScopeNotifications:::onnotificationclose:::1 +ServiceWorkerGlobalScopeNotifications:::setOnnotificationclick:::2 +ServiceWorkerGlobalScopeNotifications:::setOnnotificationclose:::2 +ServiceWorkerGlobalScope:::onactivate:::0 +ServiceWorkerGlobalScope:::onfetch:::0 +ServiceWorkerGlobalScope:::onforeignfetch:::0 +ServiceWorkerGlobalScope:::oninstall:::0 +ServiceWorkerGlobalScope:::onmessage:::0 +ServiceWorkerGlobalScopePush:::onpush:::1 +ServiceWorkerGlobalScopePush:::setOnpush:::2 +ServiceWorkerGlobalScope:::registration:::0 +ServiceWorkerGlobalScope:::setOnactivate:::1 +ServiceWorkerGlobalScope:::setOnfetch:::1 +ServiceWorkerGlobalScope:::setOnforeignfetch:::1 +ServiceWorkerGlobalScope:::setOninstall:::1 +ServiceWorkerGlobalScope:::setOnmessage:::1 +ServiceWorkerGlobalScope:::skipWaiting:::1 +ServiceWorkerGlobalScopeSync:::onsync:::1 +ServiceWorkerGlobalScopeSync:::setOnsync:::2 +ServiceWorkerMessageEvent:::data:::0 +ServiceWorkerMessageEvent:::lastEventId:::0 +ServiceWorkerMessageEvent:::origin:::0 +ServiceWorkerMessageEvent:::ports:::1 +ServiceWorkerMessageEvent:::source:::1 +ServiceWorker:::onstatechange:::0 +ServiceWorker:::postMessage:::3 +ServiceWorker:::postMessage:::4 +ServiceWorkerRegistration:::active:::0 +ServiceWorkerRegistrationBackgroundFetch:::backgroundFetch:::1 +ServiceWorkerRegistration:::installing:::0 +ServiceWorkerRegistration:::navigationPreload:::0 +ServiceWorkerRegistrationNotifications:::getNotifications:::2 +ServiceWorkerRegistrationNotifications:::getNotifications:::3 +ServiceWorkerRegistrationNotifications:::showNotification:::4 +ServiceWorkerRegistrationNotifications:::showNotification:::5 +ServiceWorkerRegistration:::onupdatefound:::0 +ServiceWorkerRegistrationPush:::pushManager:::1 +ServiceWorkerRegistration:::scope:::0 +ServiceWorkerRegistration:::setOnupdatefound:::1 +ServiceWorkerRegistrationSync:::sync:::1 +ServiceWorkerRegistration:::unregister:::1 +ServiceWorkerRegistration:::update:::1 +ServiceWorkerRegistration:::waiting:::0 +ServiceWorker:::scriptURL:::0 +ServiceWorker:::setOnstatechange:::1 +ServiceWorker:::state:::0 +ServiceWorkerWindowClient:::focus:::1 +ServiceWorkerWindowClient:::focused:::0 +ServiceWorkerWindowClient:::navigate:::2 +ServiceWorkerWindowClient:::visibilityState:::0 +ShadowRoot:::delegatesFocus:::0 +ShadowRoot:::host:::0 +ShadowRoot:::innerHTML:::0 +ShadowRoot:::mode:::0 +ShadowRoot:::olderShadowRootForBindings:::0 +ShadowRoot:::setInnerHTML:::2 +ShapeDetector:::detect:::2 +SharedWorkerGlobalScope:::close:::0 +SharedWorkerGlobalScope:::name:::0 +SharedWorkerGlobalScope:::onconnect:::0 +SharedWorkerGlobalScope:::setOnconnect:::1 +SharedWorkerPerformance:::workerStart:::2 +SharedWorker:::port:::0 +SiteBoundCredential:::iconURL:::0 +SiteBoundCredential:::name:::0 +SourceBuffer:::abort:::1 +SourceBuffer:::appendBuffer:::2 +SourceBuffer:::appendWindowEnd:::0 +SourceBuffer:::appendWindowStart:::0 +SourceBuffer:::audioTracks:::0 +SourceBuffer:::buffered:::1 +SourceBufferList:::item:::1 +SourceBufferList:::length:::0 +SourceBufferList:::onaddsourcebuffer:::0 +SourceBufferList:::onremovesourcebuffer:::0 +SourceBufferList:::setOnaddsourcebuffer:::1 +SourceBufferList:::setOnremovesourcebuffer:::1 +SourceBuffer:::mode:::0 +SourceBuffer:::onabort:::0 +SourceBuffer:::onerror:::0 +SourceBuffer:::onupdate:::0 +SourceBuffer:::onupdateend:::0 +SourceBuffer:::onupdatestart:::0 +SourceBuffer:::remove:::3 +SourceBuffer:::setAppendWindowEnd:::2 +SourceBuffer:::setAppendWindowStart:::2 +SourceBuffer:::setMode:::2 +SourceBuffer:::setOnabort:::1 +SourceBuffer:::setOnerror:::1 +SourceBuffer:::setOnupdate:::1 +SourceBuffer:::setOnupdateend:::1 +SourceBuffer:::setOnupdatestart:::1 +SourceBuffer:::setTimestampOffset:::2 +SourceBuffer:::setTrackDefaults:::2 +SourceBuffer:::timestampOffset:::0 +SourceBufferTrackBaseSupplement:::sourceBuffer:::1 +SourceBuffer:::trackDefaults:::0 +SourceBuffer:::updating:::0 +SourceBuffer:::videoTracks:::0 +SpeechGrammarList:::addFromString:::1 +SpeechGrammarList:::addFromString:::2 +SpeechGrammarList:::addFromUri:::2 +SpeechGrammarList:::addFromUri:::3 +SpeechGrammarList:::item:::1 +SpeechGrammarList:::length:::0 +SpeechGrammar:::setSrc:::2 +SpeechGrammar:::setWeight:::1 +SpeechGrammar:::src:::1 +SpeechGrammar:::weight:::0 +SpeechRecognition:::abort:::0 +SpeechRecognitionAlternative:::confidence:::0 +SpeechRecognitionAlternative:::transcript:::0 +SpeechRecognition:::audioTrack:::0 +SpeechRecognition:::continuous:::0 +SpeechRecognitionError:::error:::0 +SpeechRecognitionError:::message:::0 +SpeechRecognitionEvent:::emma:::0 +SpeechRecognitionEvent:::interpretation:::0 +SpeechRecognitionEvent:::resultIndex:::0 +SpeechRecognitionEvent:::results:::0 +SpeechRecognition:::grammars:::0 +SpeechRecognition:::interimResults:::0 +SpeechRecognition:::lang:::0 +SpeechRecognition:::maxAlternatives:::0 +SpeechRecognition:::onaudioend:::0 +SpeechRecognition:::onaudiostart:::0 +SpeechRecognition:::onend:::0 +SpeechRecognition:::onerror:::0 +SpeechRecognition:::onnomatch:::0 +SpeechRecognition:::onresult:::0 +SpeechRecognition:::onsoundend:::0 +SpeechRecognition:::onsoundstart:::0 +SpeechRecognition:::onspeechend:::0 +SpeechRecognition:::onspeechstart:::0 +SpeechRecognition:::onstart:::0 +SpeechRecognitionResult:::isFinal:::0 +SpeechRecognitionResult:::item:::1 +SpeechRecognitionResult:::length:::0 +SpeechRecognitionResultList:::item:::1 +SpeechRecognitionResultList:::length:::0 +SpeechRecognition:::setAudioTrack:::1 +SpeechRecognition:::setContinuous:::1 +SpeechRecognition:::setGrammars:::1 +SpeechRecognition:::setInterimResults:::1 +SpeechRecognition:::setLang:::1 +SpeechRecognition:::setMaxAlternatives:::1 +SpeechRecognition:::setOnaudioend:::1 +SpeechRecognition:::setOnaudiostart:::1 +SpeechRecognition:::setOnend:::1 +SpeechRecognition:::setOnerror:::1 +SpeechRecognition:::setOnnomatch:::1 +SpeechRecognition:::setOnresult:::1 +SpeechRecognition:::setOnsoundend:::1 +SpeechRecognition:::setOnsoundstart:::1 +SpeechRecognition:::setOnspeechend:::1 +SpeechRecognition:::setOnspeechstart:::1 +SpeechRecognition:::setOnstart:::1 +SpeechRecognition:::start:::1 +SpeechRecognition:::stopFunction:::0 +SpeechSynthesis:::cancel:::0 +SpeechSynthesisEvent:::charIndex:::0 +SpeechSynthesisEvent:::elapsedTime:::0 +SpeechSynthesisEvent:::name:::0 +SpeechSynthesisEvent:::utterance:::0 +SpeechSynthesis:::getVoices:::0 +SpeechSynthesis:::onvoiceschanged:::0 +SpeechSynthesis:::pause:::0 +SpeechSynthesis:::paused:::0 +SpeechSynthesis:::pending:::0 +SpeechSynthesis:::resume:::0 +SpeechSynthesis:::setOnvoiceschanged:::1 +SpeechSynthesis:::speak:::1 +SpeechSynthesis:::speaking:::0 +SpeechSynthesisUtterance:::lang:::0 +SpeechSynthesisUtterance:::onboundary:::0 +SpeechSynthesisUtterance:::onend:::0 +SpeechSynthesisUtterance:::onerror:::0 +SpeechSynthesisUtterance:::onmark:::0 +SpeechSynthesisUtterance:::onpause:::0 +SpeechSynthesisUtterance:::onresume:::0 +SpeechSynthesisUtterance:::onstart:::0 +SpeechSynthesisUtterance:::pitch:::0 +SpeechSynthesisUtterance:::rate:::0 +SpeechSynthesisUtterance:::setLang:::1 +SpeechSynthesisUtterance:::setOnboundary:::1 +SpeechSynthesisUtterance:::setOnend:::1 +SpeechSynthesisUtterance:::setOnerror:::1 +SpeechSynthesisUtterance:::setOnmark:::1 +SpeechSynthesisUtterance:::setOnpause:::1 +SpeechSynthesisUtterance:::setOnresume:::1 +SpeechSynthesisUtterance:::setOnstart:::1 +SpeechSynthesisUtterance:::setPitch:::1 +SpeechSynthesisUtterance:::setRate:::1 +SpeechSynthesisUtterance:::setText:::1 +SpeechSynthesisUtterance:::setVoice:::1 +SpeechSynthesisUtterance:::setVolume:::1 +SpeechSynthesisUtterance:::text:::0 +SpeechSynthesisUtterance:::voice:::0 +SpeechSynthesisUtterance:::volume:::0 +SpeechSynthesisVoice:::isDefault:::0 +SpeechSynthesisVoice:::lang:::0 +SpeechSynthesisVoice:::localService:::0 +SpeechSynthesisVoice:::name:::0 +SpeechSynthesisVoice:::voiceURI:::0 +SQLError:::code:::0 +SQLError:::message:::0 +SQLResultSet:::insertId:::1 +SQLResultSetRowList:::item:::3 +SQLResultSetRowList:::length:::0 +SQLResultSet:::rows:::0 +SQLResultSet:::rowsAffected:::0 +SQLStatementCallback:::handleEvent:::2 +SQLStatementErrorCallback:::handleEvent:::2 +SQLTransactionCallback:::handleEvent:::1 +SQLTransactionErrorCallback:::handleEvent:::1 +SQLTransaction:::executeSql:::3 +SQLTransaction:::executeSql:::4 +SQLTransaction:::executeSql:::5 +SQLTransaction:::executeSql:::6 +StaticRange:::collapsed:::0 +StaticRange:::endContainer:::0 +StaticRange:::endOffset:::0 +StaticRange:::setEnd:::2 +StaticRange:::setEndContainer:::1 +StaticRange:::setEndOffset:::1 +StaticRange:::setStart:::2 +StaticRange:::setStartContainer:::1 +StaticRange:::setStartOffset:::1 +StaticRange:::startContainer:::0 +StaticRange:::startOffset:::0 +StaticRange:::toRange:::1 +StereoPannerNode:::pan:::0 +Storage::::::2 +Storage::::::3 +Storage:::clear:::1 +StorageErrorCallback:::handleEvent:::1 +StorageEvent:::initStorageEvent:::0 +StorageEvent:::initStorageEvent:::1 +StorageEvent:::initStorageEvent:::2 +StorageEvent:::initStorageEvent:::3 +StorageEvent:::initStorageEvent:::4 +StorageEvent:::initStorageEvent:::5 +StorageEvent:::initStorageEvent:::6 +StorageEvent:::initStorageEvent:::7 +StorageEvent:::initStorageEvent:::8 +StorageEvent:::key:::0 +StorageEvent:::newValue:::0 +StorageEvent:::oldValue:::0 +StorageEvent:::storageArea:::0 +StorageEvent:::url:::0 +Storage:::getItem:::2 +Storage:::key:::2 +Storage:::length:::1 +StorageManager:::estimate:::1 +StorageManager:::persist:::1 +StorageManager:::persisted:::1 +StorageQuotaCallback:::handleEvent:::1 +Storage:::removeItem:::2 +Storage:::setItem:::3 +StorageUsageCallback:::handleEvent:::2 +StringCallback:::handleEvent:::1 +StyleElement:::media:::0 +StyleElement:::sheet:::0 +StyleElement:::type:::0 +StyleMedia:::matchMedium:::0 +StyleMedia:::matchMedium:::1 +StyleMedia:::type:::0 +StylePropertyMap:::append:::3 +StylePropertyMapReadonly:::get:::2 +StylePropertyMapReadonly:::getAll:::2 +StylePropertyMapReadonly:::getProperties:::0 +StylePropertyMapReadonly:::has:::2 +StylePropertyMap:::remove:::2 +StylePropertyMap:::set:::3 +StyleSheet:::disabled:::0 +StyleSheet:::href:::0 +StyleSheetList::::::1 +StyleSheetList:::item:::1 +StyleSheetList:::length:::0 +StyleSheet:::media:::0 +StyleSheet:::ownerNode:::0 +StyleSheet:::ownerRule:::0 +StyleSheet:::parentStyleSheet:::0 +StyleSheet:::setDisabled:::1 +StyleSheet:::title:::0 +StyleSheet:::type:::0 +SubtleCrypto:::decrypt:::4 +SubtleCrypto:::deriveBits:::4 +SubtleCrypto:::deriveKey:::6 +SubtleCrypto:::digest:::3 +SubtleCrypto:::encrypt:::4 +SubtleCrypto:::exportKey:::3 +SubtleCrypto:::generateKey:::4 +SubtleCrypto:::importKey:::6 +SubtleCrypto:::sign:::4 +SubtleCrypto:::unwrapKey:::8 +SubtleCrypto:::verifySignature:::5 +SubtleCrypto:::wrapKey:::5 +SVGAElement:::svgTarget:::0 +SVGAngleTearOff:::convertToSpecifiedUnits:::2 +SVGAngleTearOff:::newValueSpecifiedUnits:::3 +SVGAngleTearOff:::setValue:::2 +SVGAngleTearOff:::setValueAsString:::2 +SVGAngleTearOff:::setValueInSpecifiedUnits:::2 +SVGAngleTearOff:::unitType:::0 +SVGAngleTearOff:::value:::0 +SVGAngleTearOff:::valueAsString:::0 +SVGAngleTearOff:::valueInSpecifiedUnits:::0 +SVGAnimatedAngle:::animVal:::0 +SVGAnimatedAngle:::baseVal:::0 +SVGAnimatedBoolean:::animVal:::0 +SVGAnimatedBoolean:::baseVal:::0 +SVGAnimatedBoolean:::setBaseVal:::2 +SVGAnimatedEnumerationBase:::animVal:::0 +SVGAnimatedEnumerationBase:::baseVal:::0 +SVGAnimatedEnumerationBase:::setBaseVal:::2 +SVGAnimatedInteger:::animVal:::0 +SVGAnimatedInteger:::baseVal:::0 +SVGAnimatedInteger:::setBaseVal:::2 +SVGAnimatedLength:::animVal:::0 +SVGAnimatedLength:::baseVal:::0 +SVGAnimatedLengthList:::animVal:::0 +SVGAnimatedLengthList:::baseVal:::0 +SVGAnimatedNumber:::animVal:::0 +SVGAnimatedNumber:::baseVal:::0 +SVGAnimatedNumberList:::animVal:::0 +SVGAnimatedNumberList:::baseVal:::0 +SVGAnimatedNumber:::setBaseVal:::2 +SVGAnimatedPreserveAspectRatio:::animVal:::0 +SVGAnimatedPreserveAspectRatio:::baseVal:::0 +SVGAnimatedProperty:::animVal:::0 +SVGAnimatedPropertyBase:::contextElement:::0 +SVGAnimatedProperty:::baseVal:::0 +SVGAnimatedProperty:::setBaseVal:::2 +SVGAnimatedRect:::animVal:::0 +SVGAnimatedRect:::baseVal:::0 +SVGAnimatedString:::animVal:::0 +SVGAnimatedString:::baseVal:::0 +SVGAnimatedString:::setBaseVal:::2 +SVGAnimatedTransformList:::animVal:::0 +SVGAnimatedTransformList:::baseVal:::0 +SVGAnimationElement:::beginElement:::0 +SVGAnimationElement:::beginElementAt:::1 +SVGAnimationElement:::endElement:::0 +SVGAnimationElement:::endElementAt:::1 +SVGAnimationElement:::getCurrentTime:::0 +SVGAnimationElement:::getSimpleDuration:::1 +SVGAnimationElement:::getStartTime:::1 +SVGAnimationElement:::onbegin:::0 +SVGAnimationElement:::onend:::0 +SVGAnimationElement:::onrepeat:::0 +SVGAnimationElement:::setOnbegin:::1 +SVGAnimationElement:::setOnend:::1 +SVGAnimationElement:::setOnrepeat:::1 +SVGAnimationElement:::targetElement:::0 +SVGCircleElement:::cx:::0 +SVGCircleElement:::cy:::0 +SVGCircleElement:::r:::0 +SVGClipPathElement:::clipPathUnits:::0 +SVGComponentTransferFunctionElement:::amplitude:::0 +SVGComponentTransferFunctionElement:::exponent:::0 +SVGComponentTransferFunctionElement:::intercept:::0 +SVGComponentTransferFunctionElement:::offset:::0 +SVGComponentTransferFunctionElement:::slope:::0 +SVGComponentTransferFunctionElement:::tableValues:::0 +SVGComponentTransferFunctionElement:::type:::0 +SVGDocumentExtensions:::rootElement:::1 +SVGElement:::blur:::0 +SVGElement:::className:::0 +SVGElement:::dataset:::0 +SVGElement:::focus:::0 +SVGElement:::ownerSVGElement:::0 +SVGElement:::setTabIndex:::1 +SVGElement:::style:::0 +SVGElement:::tabIndex:::0 +SVGElement:::viewportElement:::0 +SVGEllipseElement:::cx:::0 +SVGEllipseElement:::cy:::0 +SVGEllipseElement:::rx:::0 +SVGEllipseElement:::ry:::0 +SVGFEBlendElement:::in1:::0 +SVGFEBlendElement:::in2:::0 +SVGFEBlendElement:::mode:::0 +SVGFEColorMatrixElement:::in1:::0 +SVGFEColorMatrixElement:::type:::0 +SVGFEColorMatrixElement:::values:::0 +SVGFEComponentTransferElement:::in1:::0 +SVGFECompositeElement:::in1:::0 +SVGFECompositeElement:::in2:::0 +SVGFECompositeElement:::k1:::0 +SVGFECompositeElement:::k2:::0 +SVGFECompositeElement:::k3:::0 +SVGFECompositeElement:::k4:::0 +SVGFECompositeElement:::svgOperator:::0 +SVGFEConvolveMatrixElement:::bias:::0 +SVGFEConvolveMatrixElement:::divisor:::0 +SVGFEConvolveMatrixElement:::edgeMode:::0 +SVGFEConvolveMatrixElement:::in1:::0 +SVGFEConvolveMatrixElement:::kernelMatrix:::0 +SVGFEConvolveMatrixElement:::kernelUnitLengthX:::0 +SVGFEConvolveMatrixElement:::kernelUnitLengthY:::0 +SVGFEConvolveMatrixElement:::orderX:::0 +SVGFEConvolveMatrixElement:::orderY:::0 +SVGFEConvolveMatrixElement:::preserveAlpha:::0 +SVGFEConvolveMatrixElement:::targetX:::0 +SVGFEConvolveMatrixElement:::targetY:::0 +SVGFEDiffuseLightingElement:::diffuseConstant:::0 +SVGFEDiffuseLightingElement:::in1:::0 +SVGFEDiffuseLightingElement:::kernelUnitLengthX:::0 +SVGFEDiffuseLightingElement:::kernelUnitLengthY:::0 +SVGFEDiffuseLightingElement:::surfaceScale:::0 +SVGFEDisplacementMapElement:::in1:::0 +SVGFEDisplacementMapElement:::in2:::0 +SVGFEDisplacementMapElement:::scale:::0 +SVGFEDisplacementMapElement:::xChannelSelector:::0 +SVGFEDisplacementMapElement:::yChannelSelector:::0 +SVGFEDistantLightElement:::azimuth:::0 +SVGFEDistantLightElement:::elevation:::0 +SVGFEDropShadowElement:::dx:::0 +SVGFEDropShadowElement:::dy:::0 +SVGFEDropShadowElement:::in1:::0 +SVGFEDropShadowElement:::setStdDeviation:::2 +SVGFEDropShadowElement:::stdDeviationX:::0 +SVGFEDropShadowElement:::stdDeviationY:::0 +SVGFEGaussianBlurElement:::in1:::0 +SVGFEGaussianBlurElement:::setStdDeviation:::2 +SVGFEGaussianBlurElement:::stdDeviationX:::0 +SVGFEGaussianBlurElement:::stdDeviationY:::0 +SVGFEImageElement:::preserveAspectRatio:::0 +SVGFELightElement:::azimuth:::0 +SVGFELightElement:::elevation:::0 +SVGFELightElement:::limitingConeAngle:::0 +SVGFELightElement:::pointsAtX:::0 +SVGFELightElement:::pointsAtY:::0 +SVGFELightElement:::pointsAtZ:::0 +SVGFELightElement:::specularExponent:::0 +SVGFELightElement:::x:::0 +SVGFELightElement:::y:::0 +SVGFELightElement:::z:::0 +SVGFEMergeNodeElement:::in1:::0 +SVGFEMorphologyElement:::in1:::0 +SVGFEMorphologyElement:::radiusX:::0 +SVGFEMorphologyElement:::radiusY:::0 +SVGFEMorphologyElement:::svgOperator:::0 +SVGFEOffsetElement:::dx:::0 +SVGFEOffsetElement:::dy:::0 +SVGFEOffsetElement:::in1:::0 +SVGFEPointLightElement:::x:::0 +SVGFEPointLightElement:::y:::0 +SVGFEPointLightElement:::z:::0 +SVGFESpecularLightingElement:::in1:::0 +SVGFESpecularLightingElement:::kernelUnitLengthX:::0 +SVGFESpecularLightingElement:::kernelUnitLengthY:::0 +SVGFESpecularLightingElement:::specularConstant:::0 +SVGFESpecularLightingElement:::specularExponent:::0 +SVGFESpecularLightingElement:::surfaceScale:::0 +SVGFESpotLightElement:::limitingConeAngle:::0 +SVGFESpotLightElement:::pointsAtX:::0 +SVGFESpotLightElement:::pointsAtY:::0 +SVGFESpotLightElement:::pointsAtZ:::0 +SVGFESpotLightElement:::specularExponent:::0 +SVGFESpotLightElement:::x:::0 +SVGFESpotLightElement:::y:::0 +SVGFESpotLightElement:::z:::0 +SVGFETileElement:::in1:::0 +SVGFETurbulenceElement:::baseFrequencyX:::0 +SVGFETurbulenceElement:::baseFrequencyY:::0 +SVGFETurbulenceElement:::numOctaves:::0 +SVGFETurbulenceElement:::seed:::0 +SVGFETurbulenceElement:::stitchTiles:::0 +SVGFETurbulenceElement:::type:::0 +SVGFilterElement:::filterUnits:::0 +SVGFilterElement:::height:::0 +SVGFilterElement:::primitiveUnits:::0 +SVGFilterElement:::width:::0 +SVGFilterElement:::x:::0 +SVGFilterElement:::y:::0 +SVGFilterPrimitiveStandardAttributes:::height:::0 +SVGFilterPrimitiveStandardAttributes:::result:::0 +SVGFilterPrimitiveStandardAttributes:::width:::0 +SVGFilterPrimitiveStandardAttributes:::x:::0 +SVGFilterPrimitiveStandardAttributes:::y:::0 +SVGFitToViewBox:::preserveAspectRatio:::0 +SVGFitToViewBox:::viewBox:::0 +SVGForeignObjectElement:::height:::0 +SVGForeignObjectElement:::width:::0 +SVGForeignObjectElement:::x:::0 +SVGForeignObjectElement:::y:::0 +SVGGeometryElement:::getPointAtLength:::1 +SVGGeometryElement:::getTotalLength:::0 +SVGGeometryElement:::isPointInFill:::1 +SVGGeometryElement:::isPointInStroke:::1 +SVGGeometryElement:::pathLength:::0 +SVGGradientElement:::gradientTransform:::0 +SVGGradientElement:::gradientUnits:::0 +SVGGradientElement:::spreadMethod:::0 +SVGGraphicsElement:::farthestViewportElement:::0 +SVGGraphicsElement:::getBBoxFromJavascript:::0 +SVGGraphicsElement:::getCTMFromJavascript:::0 +SVGGraphicsElement:::getScreenCTMFromJavascript:::0 +SVGGraphicsElement:::nearestViewportElement:::0 +SVGGraphicsElement:::transform:::0 +SVGImageElement:::height:::0 +SVGImageElement:::preserveAspectRatio:::0 +SVGImageElement:::width:::0 +SVGImageElement:::x:::0 +SVGImageElement:::y:::0 +SVGLengthListTearOff::::::3 +SVGLengthListTearOff:::appendItem:::2 +SVGLengthListTearOff:::clear:::1 +SVGLengthListTearOff:::getItem:::2 +SVGLengthListTearOff:::initialize:::2 +SVGLengthListTearOff:::insertItemBefore:::3 +SVGLengthListTearOff:::length:::0 +SVGLengthListTearOff:::removeItem:::2 +SVGLengthListTearOff:::replaceItem:::3 +SVGLengthTearOff:::convertToSpecifiedUnits:::2 +SVGLengthTearOff:::newValueSpecifiedUnits:::3 +SVGLengthTearOff:::setValue:::2 +SVGLengthTearOff:::setValueAsString:::2 +SVGLengthTearOff:::setValueInSpecifiedUnits:::2 +SVGLengthTearOff:::unitType:::0 +SVGLengthTearOff:::value:::1 +SVGLengthTearOff:::valueAsString:::0 +SVGLengthTearOff:::valueInSpecifiedUnits:::0 +SVGLinearGradientElement:::x1:::0 +SVGLinearGradientElement:::x2:::0 +SVGLinearGradientElement:::y1:::0 +SVGLinearGradientElement:::y2:::0 +SVGLineElement:::x1:::0 +SVGLineElement:::x2:::0 +SVGLineElement:::y1:::0 +SVGLineElement:::y2:::0 +SVGListPropertyTearOffHelper:::appendItem:::2 +SVGListPropertyTearOffHelper:::clear:::1 +SVGListPropertyTearOffHelper:::getItem:::2 +SVGListPropertyTearOffHelper:::initialize:::2 +SVGListPropertyTearOffHelper:::insertItemBefore:::3 +SVGListPropertyTearOffHelper:::length:::0 +SVGListPropertyTearOffHelper:::removeItem:::2 +SVGListPropertyTearOffHelper:::replaceItem:::3 +SVGMarkerElement:::markerHeight:::0 +SVGMarkerElement:::markerUnits:::0 +SVGMarkerElement:::markerWidth:::0 +SVGMarkerElement:::orientAngle:::0 +SVGMarkerElement:::orientType:::0 +SVGMarkerElement:::refX:::0 +SVGMarkerElement:::refY:::0 +SVGMarkerElement:::setOrientToAngle:::1 +SVGMarkerElement:::setOrientToAuto:::0 +SVGMaskElement:::height:::0 +SVGMaskElement:::maskContentUnits:::0 +SVGMaskElement:::maskUnits:::0 +SVGMaskElement:::width:::0 +SVGMaskElement:::x:::0 +SVGMaskElement:::y:::0 +SVGMatrixTearOff:::a:::0 +SVGMatrixTearOff:::b:::0 +SVGMatrixTearOff:::c:::0 +SVGMatrixTearOff:::d:::0 +SVGMatrixTearOff:::e:::0 +SVGMatrixTearOff:::f:::0 +SVGMatrixTearOff:::flipX:::0 +SVGMatrixTearOff:::flipY:::0 +SVGMatrixTearOff:::inverse:::1 +SVGMatrixTearOff:::multiply:::1 +SVGMatrixTearOff:::rotate:::1 +SVGMatrixTearOff:::rotateFromVector:::3 +SVGMatrixTearOff:::scale:::1 +SVGMatrixTearOff:::scaleNonUniform:::2 +SVGMatrixTearOff:::setA:::2 +SVGMatrixTearOff:::setB:::2 +SVGMatrixTearOff:::setC:::2 +SVGMatrixTearOff:::setD:::2 +SVGMatrixTearOff:::setE:::2 +SVGMatrixTearOff:::setF:::2 +SVGMatrixTearOff:::skewX:::1 +SVGMatrixTearOff:::skewY:::1 +SVGMatrixTearOff:::translate:::2 +SVGNumberListTearOff::::::3 +SVGNumberListTearOff:::appendItem:::2 +SVGNumberListTearOff:::clear:::1 +SVGNumberListTearOff:::getItem:::2 +SVGNumberListTearOff:::initialize:::2 +SVGNumberListTearOff:::insertItemBefore:::3 +SVGNumberListTearOff:::length:::0 +SVGNumberListTearOff:::removeItem:::2 +SVGNumberListTearOff:::replaceItem:::3 +SVGNumberTearOff:::setValue:::2 +SVGNumberTearOff:::value:::0 +SVGPathElement:::getPathSegAtLength:::1 +SVGPatternElement:::height:::0 +SVGPatternElement:::patternContentUnits:::0 +SVGPatternElement:::patternTransform:::0 +SVGPatternElement:::patternUnits:::0 +SVGPatternElement:::width:::0 +SVGPatternElement:::x:::0 +SVGPatternElement:::y:::0 +SVGPointListTearOff::::::3 +SVGPointListTearOff:::appendItem:::2 +SVGPointListTearOff:::clear:::1 +SVGPointListTearOff:::getItem:::2 +SVGPointListTearOff:::initialize:::2 +SVGPointListTearOff:::insertItemBefore:::3 +SVGPointListTearOff:::length:::0 +SVGPointListTearOff:::removeItem:::2 +SVGPointListTearOff:::replaceItem:::3 +SVGPointTearOff:::matrixTransform:::1 +SVGPointTearOff:::setX:::2 +SVGPointTearOff:::setY:::2 +SVGPointTearOff:::x:::0 +SVGPointTearOff:::y:::0 +SVGPolyElement:::animatedPoints:::0 +SVGPolyElement:::pointsFromJavascript:::0 +SVGPolygonElement:::animatedPoints:::0 +SVGPolygonElement:::pointsFromJavascript:::0 +SVGPolylineElement:::animatedPoints:::0 +SVGPolylineElement:::pointsFromJavascript:::0 +SVGPreserveAspectRatioTearOff:::align:::0 +SVGPreserveAspectRatioTearOff:::meetOrSlice:::0 +SVGPreserveAspectRatioTearOff:::setAlign:::2 +SVGPreserveAspectRatioTearOff:::setMeetOrSlice:::2 +SVGPropertyTearOffBase:::contextElement:::0 +SVGRadialGradientElement:::cx:::0 +SVGRadialGradientElement:::cy:::0 +SVGRadialGradientElement:::fr:::0 +SVGRadialGradientElement:::fx:::0 +SVGRadialGradientElement:::fy:::0 +SVGRadialGradientElement:::r:::0 +SVGRectElement:::height:::0 +SVGRectElement:::rx:::0 +SVGRectElement:::ry:::0 +SVGRectElement:::width:::0 +SVGRectElement:::x:::0 +SVGRectElement:::y:::0 +SVGRectTearOff:::height:::0 +SVGRectTearOff:::setHeight:::2 +SVGRectTearOff:::setWidth:::2 +SVGRectTearOff:::setX:::2 +SVGRectTearOff:::setY:::2 +SVGRectTearOff:::width:::0 +SVGRectTearOff:::x:::0 +SVGRectTearOff:::y:::0 +SVGScriptElement:::nonce:::0 +SVGScriptElement:::setNonce:::1 +SVGSMILElement:::targetElement:::0 +SVGStopElement:::offset:::0 +SVGStringListTearOff::::::3 +SVGStringListTearOff:::appendItem:::2 +SVGStringListTearOff:::clear:::1 +SVGStringListTearOff:::getItem:::2 +SVGStringListTearOff:::initialize:::2 +SVGStringListTearOff:::insertItemBefore:::3 +SVGStringListTearOff:::length:::0 +SVGStringListTearOff:::removeItem:::2 +SVGStringListTearOff:::replaceItem:::3 +SVGStyleElement:::disabled:::0 +SVGStyleElement:::media:::0 +SVGStyleElement:::setDisabled:::1 +SVGStyleElement:::setMedia:::1 +SVGStyleElement:::setTitle:::1 +SVGStyleElement:::setType:::1 +SVGStyleElement:::sheet:::0 +SVGStyleElement:::title:::0 +SVGStyleElement:::type:::0 +SVGSVGElement:::animationsPaused:::0 +SVGSVGElement:::checkEnclosure:::2 +SVGSVGElement:::checkIntersection:::2 +SVGSVGElement:::createSVGAngle:::0 +SVGSVGElement:::createSVGLength:::0 +SVGSVGElement:::createSVGMatrix:::0 +SVGSVGElement:::createSVGNumber:::0 +SVGSVGElement:::createSVGPoint:::0 +SVGSVGElement:::createSVGRect:::0 +SVGSVGElement:::createSVGTransform:::0 +SVGSVGElement:::createSVGTransformFromMatrix:::1 +SVGSVGElement:::currentScale:::0 +SVGSVGElement:::currentTranslateFromJavascript:::0 +SVGSVGElement:::deselectAll:::0 +SVGSVGElement:::forceRedraw:::0 +SVGSVGElement:::getCurrentTime:::0 +SVGSVGElement:::getElementById:::1 +SVGSVGElement:::getEnclosureList:::2 +SVGSVGElement:::getIntersectionList:::2 +SVGSVGElement:::height:::0 +SVGSVGElement:::pauseAnimations:::0 +SVGSVGElement:::setCurrentScale:::1 +SVGSVGElement:::setCurrentTime:::1 +SVGSVGElement:::suspendRedraw:::1 +SVGSVGElement:::unpauseAnimations:::0 +SVGSVGElement:::unsuspendRedraw:::1 +SVGSVGElement:::unsuspendRedrawAll:::0 +SVGSVGElement:::width:::0 +SVGSVGElement:::x:::0 +SVGSVGElement:::y:::0 +SVGTests:::requiredExtensions:::0 +SVGTests:::systemLanguage:::0 +SVGTextContentElement:::getCharNumAtPosition:::2 +SVGTextContentElement:::getComputedTextLength:::0 +SVGTextContentElement:::getEndPositionOfChar:::2 +SVGTextContentElement:::getExtentOfChar:::2 +SVGTextContentElement:::getNumberOfChars:::0 +SVGTextContentElement:::getRotationOfChar:::2 +SVGTextContentElement:::getStartPositionOfChar:::2 +SVGTextContentElement:::getSubStringLength:::3 +SVGTextContentElement:::lengthAdjust:::0 +SVGTextContentElement:::selectSubString:::3 +SVGTextContentElement:::textLength:::0 +SVGTextPathElement:::method:::0 +SVGTextPathElement:::spacing:::0 +SVGTextPathElement:::startOffset:::0 +SVGTextPositioningElement:::dx:::0 +SVGTextPositioningElement:::dy:::0 +SVGTextPositioningElement:::rotate:::0 +SVGTextPositioningElement:::x:::0 +SVGTextPositioningElement:::y:::0 +SVGTransformListTearOff::::::3 +SVGTransformListTearOff:::appendItem:::2 +SVGTransformListTearOff:::clear:::1 +SVGTransformListTearOff:::consolidate:::1 +SVGTransformListTearOff:::createSVGTransformFromMatrix:::1 +SVGTransformListTearOff:::getItem:::2 +SVGTransformListTearOff:::initialize:::2 +SVGTransformListTearOff:::insertItemBefore:::3 +SVGTransformListTearOff:::length:::0 +SVGTransformListTearOff:::removeItem:::2 +SVGTransformListTearOff:::replaceItem:::3 +SVGTransformTearOff:::angle:::0 +SVGTransformTearOff:::matrix:::0 +SVGTransformTearOff:::setMatrix:::2 +SVGTransformTearOff:::setRotate:::4 +SVGTransformTearOff:::setScale:::3 +SVGTransformTearOff:::setSkewX:::2 +SVGTransformTearOff:::setSkewY:::2 +SVGTransformTearOff:::setTranslate:::3 +SVGTransformTearOff:::transformType:::0 +SVGURIReference:::href:::0 +SVGUseElement:::height:::0 +SVGUseElement:::width:::0 +SVGUseElement:::x:::0 +SVGUseElement:::y:::0 +SVGZoomAndPan:::setZoomAndPan:::2 +SVGZoomAndPan:::zoomAndPan:::0 +SyncEvent:::lastChance:::0 +SyncEvent:::tag:::0 +SyncManager:::getTags:::1 +SyncManager:::registerFunction:::2 +TaskAttributionTiming:::containerId:::0 +TaskAttributionTiming:::containerName:::0 +TaskAttributionTiming:::containerSrc:::0 +TaskAttributionTiming:::containerType:::0 +Text:::assignedSlotForBinding:::0 +TextControlElement:::autocapitalize:::0 +TextControlElement:::maxLength:::0 +TextControlElement:::minLength:::0 +TextControlElement:::select:::0 +TextControlElement:::selectionDirection:::0 +TextControlElement:::selectionEnd:::0 +TextControlElement:::selectionStart:::0 +TextControlElement:::setAutocapitalize:::1 +TextControlElement:::setMaxLength:::2 +TextControlElement:::setMinLength:::2 +TextControlElement:::setRangeText:::2 +TextControlElement:::setRangeText:::5 +TextControlElement:::setSelectionDirection:::1 +TextControlElement:::setSelectionEnd:::1 +TextControlElement:::setSelectionRangeForBinding:::3 +TextControlElement:::setSelectionStart:::1 +TextControlElement:::setValue:::2 +TextControlElement:::value:::0 +TextDecoder:::decode:::1 +TextDecoder:::decode:::2 +TextDecoder:::decode:::3 +TextDecoder:::encoding:::0 +TextDecoder:::fatal:::0 +TextDecoder:::ignoreBOM:::0 +TextDetector:::detect:::2 +TextEncoder:::encode:::0 +TextEncoder:::encode:::1 +TextEncoder:::encoding:::0 +TextEvent:::data:::0 +TextEvent:::initTextEvent:::0 +TextEvent:::initTextEvent:::1 +TextEvent:::initTextEvent:::2 +TextEvent:::initTextEvent:::3 +TextEvent:::initTextEvent:::4 +TextEvent:::initTextEvent:::5 +Text:::getDestinationInsertionPoints:::0 +TextMetrics:::actualBoundingBoxAscent:::0 +TextMetrics:::actualBoundingBoxDescent:::0 +TextMetrics:::actualBoundingBoxLeft:::0 +TextMetrics:::actualBoundingBoxRight:::0 +TextMetrics:::alphabeticBaseline:::0 +TextMetrics:::emHeightAscent:::0 +TextMetrics:::emHeightDescent:::0 +TextMetrics:::fontBoundingBoxAscent:::0 +TextMetrics:::fontBoundingBoxDescent:::0 +TextMetrics:::hangingBaseline:::0 +TextMetrics:::ideographicBaseline:::0 +TextMetrics:::width:::0 +Text:::splitText:::2 +TextTrack:::activeCues:::0 +TextTrack:::addCue:::1 +TextTrackCue:::endTime:::0 +TextTrackCue:::id:::0 +TextTrackCueList::::::1 +TextTrackCueList:::getCueById:::1 +TextTrackCueList:::length:::0 +TextTrackCue:::onenter:::0 +TextTrackCue:::onexit:::0 +TextTrackCue:::pauseOnExit:::0 +TextTrack:::cues:::0 +TextTrackCue:::setEndTime:::1 +TextTrackCue:::setId:::1 +TextTrackCue:::setOnenter:::1 +TextTrackCue:::setOnexit:::1 +TextTrackCue:::setPauseOnExit:::1 +TextTrackCue:::setStartTime:::1 +TextTrackCue:::startTime:::0 +TextTrackCue:::track:::0 +TextTrack:::id:::0 +TextTrack:::kind:::0 +TextTrack:::label:::0 +TextTrack:::language:::0 +TextTrackList::::::1 +TextTrackList:::getTrackById:::1 +TextTrackList:::length:::0 +TextTrackList:::onaddtrack:::0 +TextTrackList:::onchange:::0 +TextTrackList:::onremovetrack:::0 +TextTrackList:::setOnaddtrack:::1 +TextTrackList:::setOnchange:::1 +TextTrackList:::setOnremovetrack:::1 +TextTrack:::mode:::0 +TextTrack:::oncuechange:::0 +TextTrack:::removeCue:::2 +TextTrack:::setMode:::1 +TextTrack:::setOncuechange:::1 +Text:::wholeText:::0 +# Things straddling gen and non-gn code: +TimeRanges:::end:::2 +TimeRanges:::length:::0 +TimeRanges:::start:::2 +# TODO(lukasza): Despite being defined in NavigatorStorageUtils.idl (without +# TODO(lukasza): No idea why use_output_parameter_for_result incorrectly returns +Touch:::clientX:::0 +Touch:::clientY:::0 +TouchEvent:::altKey:::0 +TouchEvent:::changedTouches:::0 +TouchEvent:::ctrlKey:::0 +TouchEvent:::metaKey:::0 +TouchEvent:::shiftKey:::0 +TouchEvent:::targetTouches:::0 +TouchEvent:::touches:::0 +Touch:::force:::0 +Touch:::identifier:::0 +TouchList:::item:::1 +TouchList:::length:::0 +Touch:::pageX:::0 +Touch:::pageY:::0 +Touch:::radiusX:::0 +Touch:::radiusY:::0 +Touch:::region:::0 +Touch:::rotationAngle:::0 +Touch:::screenX:::0 +Touch:::screenY:::0 +Touch:::target:::0 +TrackBase:::id:::0 +TrackBase:::kind:::0 +TrackBase:::label:::0 +TrackBase:::language:::0 +TrackBase:::owner:::0 +TrackDefault:::byteStreamTrackID:::0 +TrackDefault:::kinds:::0 +TrackDefault:::label:::0 +TrackDefault:::language:::0 +TrackDefaultList:::item:::1 +TrackDefaultList:::length:::0 +TrackDefault:::type:::0 +TrackEvent:::track:::1 +TrackListBase:::getTrackById:::1 +TrackListBase:::length:::0 +TrackListBase:::owner:::0 +TransitionEvent:::elapsedTime:::0 +TransitionEvent:::propertyName:::0 +TransitionEvent:::pseudoElement:::0 +TreeWalker:::currentNode:::0 +TreeWalker:::filter:::0 +TreeWalker:::firstChild:::1 +TreeWalker:::lastChild:::1 +TreeWalker:::nextNode:::1 +TreeWalker:::nextSibling:::1 +TreeWalker:::parentNode:::1 +TreeWalker:::previousNode:::1 +TreeWalker:::previousSibling:::1 +TreeWalker:::root:::0 +TreeWalker:::setCurrentNode:::1 +TreeWalker:::whatToShow:::0 +TypeConversions:::setTestByte:::1 +TypeConversions:::setTestByteString:::0 +TypeConversions:::setTestByteString:::1 +TypeConversions:::setTestLong:::1 +TypeConversions:::setTestLongLong:::1 +TypeConversions:::setTestOctet:::1 +TypeConversions:::setTestShort:::1 +TypeConversions:::setTestUnsignedLong:::1 +TypeConversions:::setTestUnsignedLongLong:::1 +TypeConversions:::setTestUnsignedShort:::1 +TypeConversions:::setTestUSVString:::0 +TypeConversions:::setTestUSVString:::1 +TypeConversions:::testByte:::0 +TypeConversions:::testByteString:::0 +TypeConversions:::testLong:::0 +TypeConversions:::testLongLong:::0 +TypeConversions:::testOctet:::0 +TypeConversions:::testShort:::0 +TypeConversions:::testUnsignedLong:::0 +TypeConversions:::testUnsignedLongLong:::0 +TypeConversions:::testUnsignedShort:::0 +TypeConversions:::testUSVString:::0 +# types involved are unions and/or dictionaries): +UIEvent:::detail:::0 +UIEvent:::initUIEvent:::0 +UIEvent:::initUIEvent:::1 +UIEvent:::initUIEvent:::2 +UIEvent:::initUIEvent:::3 +UIEvent:::initUIEvent:::4 +UIEvent:::initUIEvent:::5 +UIEvent:::sourceCapabilities:::0 +UIEvent:::view:::0 +UIEvent:::which:::0 +UIEventWithKeyState:::altKey:::0 +UIEventWithKeyState:::ctrlKey:::0 +UIEventWithKeyState:::getModifierState:::1 +UIEventWithKeyState:::metaKey:::0 +UIEventWithKeyState:::shiftKey:::0 +UnderlyingSourceBase:::cancelWrapper:::1 +UnderlyingSourceBase:::cancelWrapper:::2 +UnderlyingSourceBase:::notifyLockAcquired:::0 +UnderlyingSourceBase:::notifyLockReleased:::0 +UnderlyingSourceBase:::pull:::1 +UnderlyingSourceBase:::startWrapper:::2 +UnionTypesTest:::doubleOrInternalEnumArg:::1 +UnionTypesTest:::doubleOrStringArg:::0 +UnionTypesTest:::doubleOrStringArg:::1 +UnionTypesTest:::doubleOrStringArrayArg:::1 +UnionTypesTest:::doubleOrStringOrStringArrayArg:::1 +UnionTypesTest:::doubleOrStringOrStringArrayAttribute:::1 +UnionTypesTest:::doubleOrStringOrStringSequenceArg:::1 +UnionTypesTest:::doubleOrStringSequenceArg:::1 +UnionTypesTest:::nodeListOrElementArg:::1 +UnionTypesTest:::nodeListOrElementOrNullArg:::1 +UnionTypesTest:::setDoubleOrStringOrStringArrayAttribute:::1 +URLFileAPI:::createObjectURL:::3 +URLFileAPI:::revokeObjectURL:::2 +URLMediaSource:::createObjectURL:::2 +URLMediaStream:::createObjectURL:::2 +URLSearchParams:::append:::2 +URLSearchParams:::deleteAllWithName:::1 +URLSearchParams:::get:::1 +URLSearchParams:::getAll:::1 +URLSearchParams:::has:::1 +URLSearchParams:::set:::2 +URLSearchParams:::toString:::0 +URLUtilsReadOnly:::hash:::0 +URLUtilsReadOnly:::host:::0 +URLUtilsReadOnly:::hostname:::0 +URLUtilsReadOnly:::href:::0 +URLUtilsReadOnly:::origin:::0 +URLUtilsReadOnly:::pathname:::0 +URLUtilsReadOnly:::port:::0 +URLUtilsReadOnly:::protocol:::0 +URLUtilsReadOnly:::search:::0 +USBAlternateInterface:::alternateSetting:::0 +USBAlternateInterface:::endpoints:::0 +USBAlternateInterface:::interfaceClass:::0 +USBAlternateInterface:::interfaceName:::0 +USBAlternateInterface:::interfaceProtocol:::0 +USBAlternateInterface:::interfaceSubclass:::0 +USBConfiguration:::configurationName:::0 +USBConfiguration:::configurationValue:::0 +USBConfiguration:::interfaces:::0 +USBConnectionEvent:::device:::0 +USBDevice:::claimInterface:::2 +USBDevice:::clearHalt:::3 +USBDevice:::close:::1 +USBDevice:::configuration:::0 +USBDevice:::configurations:::0 +USBDevice:::controlTransferIn:::3 +USBDevice:::controlTransferOut:::2 +USBDevice:::controlTransferOut:::3 +USBDevice:::deviceClass:::0 +USBDevice:::deviceProtocol:::0 +USBDevice:::deviceSubclass:::0 +USBDevice:::deviceVersionMajor:::0 +USBDevice:::deviceVersionMinor:::0 +USBDevice:::deviceVersionSubminor:::0 +USBDevice:::isochronousTransferIn:::3 +USBDevice:::isochronousTransferOut:::4 +USBDevice:::manufacturerName:::0 +USBDevice:::open:::1 +USBDevice:::opened:::0 +USBDevice:::productId:::0 +USBDevice:::productName:::0 +USBDevice:::releaseInterface:::2 +USBDevice:::reset:::1 +USBDevice:::selectAlternateInterface:::3 +USBDevice:::selectConfiguration:::2 +USBDevice:::serialNumber:::0 +USBDevice:::transferIn:::3 +USBDevice:::transferOut:::3 +USBDevice:::usbVersionMajor:::0 +USBDevice:::usbVersionMinor:::0 +USBDevice:::usbVersionSubminor:::0 +USBDevice:::vendorId:::0 +USBEndpoint:::direction:::0 +USBEndpoint:::endpointNumber:::0 +USBEndpoint:::packetSize:::0 +USBEndpoint:::type:::0 +USB:::getDevices:::1 +USBInterface:::alternate:::0 +USBInterface:::alternates:::0 +USBInterface:::claimed:::0 +USBInterface:::interfaceNumber:::0 +USBInTransferResult:::data:::0 +USBInTransferResult:::status:::0 +USBIsochronousInTransferPacket:::data:::0 +USBIsochronousInTransferPacket:::status:::0 +USBIsochronousInTransferResult:::data:::0 +USBIsochronousInTransferResult:::packets:::0 +USBIsochronousOutTransferPacket:::bytesWritten:::0 +USBIsochronousOutTransferPacket:::status:::0 +USBIsochronousOutTransferResult:::packets:::0 +USB:::onconnect:::0 +USB:::ondisconnect:::0 +USBOutTransferResult:::bytesWritten:::0 +USBOutTransferResult:::status:::0 +USB:::requestDevice:::2 +USB:::setOnconnect:::1 +USB:::setOndisconnect:::1 +ValidityState:::badInput:::0 +ValidityState:::customError:::0 +ValidityState:::patternMismatch:::0 +ValidityState:::rangeOverflow:::0 +ValidityState:::rangeUnderflow:::0 +ValidityState:::stepMismatch:::0 +ValidityState:::tooLong:::0 +ValidityState:::tooShort:::0 +ValidityState:::typeMismatch:::0 +ValidityState:::valid:::0 +ValidityState:::valueMissing:::0 +VideoPlaybackQuality:::corruptedVideoFrames:::0 +VideoPlaybackQuality:::creationTime:::0 +VideoPlaybackQuality:::droppedVideoFrames:::0 +VideoPlaybackQuality:::totalVideoFrames:::0 +VideoTrack:::id:::0 +VideoTrack:::kind:::0 +VideoTrack:::label:::0 +VideoTrack:::language:::0 +VideoTrackList::::::1 +VideoTrackList:::getTrackById:::1 +VideoTrackList:::length:::0 +VideoTrackList:::onaddtrack:::0 +VideoTrackList:::onchange:::0 +VideoTrackList:::onremovetrack:::0 +VideoTrackList:::selectedIndex:::0 +VideoTrackList:::setOnaddtrack:::1 +VideoTrackList:::setOnchange:::1 +VideoTrackList:::setOnremovetrack:::1 +VideoTrack:::selected:::0 +VideoTrack:::setSelected:::1 +VoidCallback:::handleEvent:::0 +VRDisplay:::cancelAnimationFrame:::1 +VRDisplay:::capabilities:::0 +VRDisplayCapabilities:::canPresent:::0 +VRDisplayCapabilities:::hasExternalDisplay:::0 +VRDisplayCapabilities:::hasPosition:::0 +VRDisplayCapabilities:::maxLayers:::0 +VRDisplay:::depthFar:::0 +VRDisplay:::depthNear:::0 +VRDisplay:::displayId:::0 +VRDisplay:::displayName:::0 +VRDisplayEvent:::display:::0 +VRDisplayEvent:::reason:::0 +VRDisplay:::exitPresent:::1 +VRDisplay:::getEyeParameters:::1 +VRDisplay:::getFrameData:::1 +VRDisplay:::getLayers:::0 +VRDisplay:::isPresenting:::0 +VRDisplay:::requestAnimationFrame:::1 +VRDisplay:::requestPresent:::2 +VRDisplay:::setDepthFar:::1 +VRDisplay:::setDepthNear:::1 +VRDisplay:::stageParameters:::0 +VRDisplay:::submitFrame:::0 +VREyeParameters:::offset:::0 +VREyeParameters:::renderHeight:::0 +VREyeParameters:::renderWidth:::0 +VRFrameData:::leftProjectionMatrix:::0 +VRFrameData:::leftViewMatrix:::0 +VRFrameData:::pose:::0 +VRFrameData:::rightProjectionMatrix:::0 +VRFrameData:::rightViewMatrix:::0 +VRPose:::angularAcceleration:::0 +VRPose:::angularVelocity:::0 +VRPose:::linearAcceleration:::0 +VRPose:::linearVelocity:::0 +VRPose:::orientation:::0 +VRPose:::position:::0 +VRStageParameters:::sittingToStandingTransform:::0 +VRStageParameters:::sizeX:::0 +VRStageParameters:::sizeZ:::0 +VTTCue:::align:::0 +VTTCue:::getCueAsHTML:::0 +VTTCue:::line:::1 +VTTCue:::position:::1 +VTTCue:::region:::0 +VTTCue:::setAlign:::1 +VTTCue:::setLine:::1 +VTTCue:::setPosition:::2 +VTTCue:::setRegion:::1 +VTTCue:::setSize:::2 +VTTCue:::setSnapToLines:::1 +VTTCue:::setText:::1 +VTTCue:::setVertical:::1 +VTTCue:::size:::0 +VTTCue:::snapToLines:::0 +VTTCue:::text:::0 +VTTCue:::vertical:::0 +VTTRegion:::lines:::0 +VTTRegion:::regionAnchorX:::0 +VTTRegion:::regionAnchorY:::0 +VTTRegion:::scroll:::0 +VTTRegion:::setLines:::2 +VTTRegion:::setRegionAnchorX:::2 +VTTRegion:::setRegionAnchorY:::2 +VTTRegion:::setScroll:::1 +VTTRegion:::setViewportAnchorX:::2 +VTTRegion:::setViewportAnchorY:::2 +VTTRegion:::setWidth:::2 +VTTRegion:::viewportAnchorX:::0 +VTTRegion:::viewportAnchorY:::0 +VTTRegion:::width:::0 +WaveShaperNode:::curve:::0 +WaveShaperNode:::oversample:::0 +WaveShaperNode:::setCurve:::2 +WaveShaperNode:::setOversample:::1 +WebAuthentication:::getAssertion:::2 +WebAuthentication:::getAssertion:::3 +WebAuthentication:::makeCredential:::4 +WebAuthentication:::makeCredential:::5 +WebGL2RenderingContextBase:::beginQuery:::2 +WebGL2RenderingContextBase:::beginTransformFeedback:::1 +WebGL2RenderingContextBase:::bindBufferBase:::3 +WebGL2RenderingContextBase:::bindBufferRange:::5 +WebGL2RenderingContextBase:::bindSampler:::2 +WebGL2RenderingContextBase:::bindTransformFeedback:::2 +WebGL2RenderingContextBase:::bindVertexArray:::1 +WebGL2RenderingContextBase:::blitFramebuffer:::10 +WebGL2RenderingContextBase:::bufferData:::3 +WebGL2RenderingContextBase:::bufferData:::4 +WebGL2RenderingContextBase:::bufferData:::5 +WebGL2RenderingContextBase:::bufferSubData:::4 +WebGL2RenderingContextBase:::bufferSubData:::5 +WebGL2RenderingContextBase:::clearBufferfi:::4 +WebGL2RenderingContextBase:::clearBufferfv:::3 +WebGL2RenderingContextBase:::clearBufferiv:::3 +WebGL2RenderingContextBase:::clearBufferuiv:::3 +WebGL2RenderingContextBase:::clientWaitSync:::3 +WebGL2RenderingContextBase:::compressedTexImage2D:::8 +WebGL2RenderingContextBase:::compressedTexImage2D:::9 +WebGL2RenderingContextBase:::compressedTexImage3D:::10 +WebGL2RenderingContextBase:::compressedTexImage3D:::8 +WebGL2RenderingContextBase:::compressedTexImage3D:::9 +WebGL2RenderingContextBase:::compressedTexSubImage2D:::10 +WebGL2RenderingContextBase:::compressedTexSubImage2D:::9 +WebGL2RenderingContextBase:::compressedTexSubImage3D:::10 +WebGL2RenderingContextBase:::compressedTexSubImage3D:::11 +WebGL2RenderingContextBase:::compressedTexSubImage3D:::12 +WebGL2RenderingContextBase:::copyBufferSubData:::5 +WebGL2RenderingContextBase:::copyTexSubImage3D:::9 +WebGL2RenderingContextBase:::createQuery:::0 +WebGL2RenderingContextBase:::createSampler:::0 +WebGL2RenderingContextBase:::createTransformFeedback:::0 +WebGL2RenderingContextBase:::createVertexArray:::0 +WebGL2RenderingContextBase:::deleteQuery:::1 +WebGL2RenderingContextBase:::deleteSampler:::1 +WebGL2RenderingContextBase:::deleteSync:::1 +WebGL2RenderingContextBase:::deleteTransformFeedback:::1 +WebGL2RenderingContextBase:::deleteVertexArray:::1 +WebGL2RenderingContextBase:::drawArraysInstanced:::4 +WebGL2RenderingContextBase:::drawBuffers:::1 +WebGL2RenderingContextBase:::drawElementsInstanced:::5 +WebGL2RenderingContextBase:::drawRangeElements:::6 +WebGL2RenderingContextBase:::endQuery:::1 +WebGL2RenderingContextBase:::endTransformFeedback:::0 +WebGL2RenderingContextBase:::fenceSync:::2 +WebGL2RenderingContextBase:::framebufferTextureLayer:::5 +WebGL2RenderingContextBase:::getActiveUniformBlockName:::2 +WebGL2RenderingContextBase:::getActiveUniformBlockParameter:::4 +WebGL2RenderingContextBase:::getActiveUniforms:::4 +WebGL2RenderingContextBase:::getBufferSubData:::3 +WebGL2RenderingContextBase:::getBufferSubData:::4 +WebGL2RenderingContextBase:::getBufferSubData:::5 +WebGL2RenderingContextBase:::getFragDataLocation:::2 +WebGL2RenderingContextBase:::getIndexedParameter:::3 +WebGL2RenderingContextBase:::getInternalformatParameter:::4 +WebGL2RenderingContextBase:::getQuery:::3 +WebGL2RenderingContextBase:::getQueryParameter:::3 +WebGL2RenderingContextBase:::getSamplerParameter:::3 +WebGL2RenderingContextBase:::getSyncParameter:::3 +WebGL2RenderingContextBase:::getTransformFeedbackVarying:::2 +WebGL2RenderingContextBase:::getUniformBlockIndex:::2 +WebGL2RenderingContextBase:::getUniformIndices:::3 +WebGL2RenderingContextBase:::invalidateFramebuffer:::2 +WebGL2RenderingContextBase:::invalidateSubFramebuffer:::6 +WebGL2RenderingContextBase:::isQuery:::1 +WebGL2RenderingContextBase:::isSampler:::1 +WebGL2RenderingContextBase:::isSync:::1 +WebGL2RenderingContextBase:::isTransformFeedback:::1 +WebGL2RenderingContextBase:::isVertexArray:::1 +WebGL2RenderingContextBase:::pauseTransformFeedback:::0 +WebGL2RenderingContextBase:::readBuffer:::1 +WebGL2RenderingContextBase:::readPixels:::7 +WebGL2RenderingContextBase:::readPixels:::8 +WebGL2RenderingContextBase:::renderbufferStorageMultisample:::5 +WebGL2RenderingContextBase:::resumeTransformFeedback:::0 +WebGL2RenderingContextBase:::samplerParameterf:::3 +WebGL2RenderingContextBase:::samplerParameteri:::3 +WebGL2RenderingContextBase:::texImage2D:::10 +WebGL2RenderingContextBase:::texImage2D:::9 +WebGL2RenderingContextBase:::texImage3D:::10 +WebGL2RenderingContextBase:::texImage3D:::11 +WebGL2RenderingContextBase:::texStorage2D:::5 +WebGL2RenderingContextBase:::texStorage3D:::6 +WebGL2RenderingContextBase:::texSubImage2D:::10 +WebGL2RenderingContextBase:::texSubImage2D:::9 +WebGL2RenderingContextBase:::texSubImage3D:::11 +WebGL2RenderingContextBase:::texSubImage3D:::12 +WebGL2RenderingContextBase:::transformFeedbackVaryings:::3 +WebGL2RenderingContextBase:::uniform1fv:::3 +WebGL2RenderingContextBase:::uniform1fv:::4 +WebGL2RenderingContextBase:::uniform1iv:::3 +WebGL2RenderingContextBase:::uniform1iv:::4 +WebGL2RenderingContextBase:::uniform1ui:::2 +WebGL2RenderingContextBase:::uniform1uiv:::2 +WebGL2RenderingContextBase:::uniform1uiv:::3 +WebGL2RenderingContextBase:::uniform1uiv:::4 +WebGL2RenderingContextBase:::uniform2fv:::3 +WebGL2RenderingContextBase:::uniform2fv:::4 +WebGL2RenderingContextBase:::uniform2iv:::3 +WebGL2RenderingContextBase:::uniform2iv:::4 +WebGL2RenderingContextBase:::uniform2ui:::3 +WebGL2RenderingContextBase:::uniform2uiv:::2 +WebGL2RenderingContextBase:::uniform2uiv:::3 +WebGL2RenderingContextBase:::uniform2uiv:::4 +WebGL2RenderingContextBase:::uniform3fv:::3 +WebGL2RenderingContextBase:::uniform3fv:::4 +WebGL2RenderingContextBase:::uniform3iv:::3 +WebGL2RenderingContextBase:::uniform3iv:::4 +WebGL2RenderingContextBase:::uniform3ui:::4 +WebGL2RenderingContextBase:::uniform3uiv:::2 +WebGL2RenderingContextBase:::uniform3uiv:::3 +WebGL2RenderingContextBase:::uniform3uiv:::4 +WebGL2RenderingContextBase:::uniform4fv:::3 +WebGL2RenderingContextBase:::uniform4fv:::4 +WebGL2RenderingContextBase:::uniform4iv:::3 +WebGL2RenderingContextBase:::uniform4iv:::4 +WebGL2RenderingContextBase:::uniform4ui:::5 +WebGL2RenderingContextBase:::uniform4uiv:::2 +WebGL2RenderingContextBase:::uniform4uiv:::3 +WebGL2RenderingContextBase:::uniform4uiv:::4 +WebGL2RenderingContextBase:::uniformBlockBinding:::3 +WebGL2RenderingContextBase:::uniformMatrix2fv:::4 +WebGL2RenderingContextBase:::uniformMatrix2fv:::5 +WebGL2RenderingContextBase:::uniformMatrix2x3fv:::3 +WebGL2RenderingContextBase:::uniformMatrix2x3fv:::4 +WebGL2RenderingContextBase:::uniformMatrix2x3fv:::5 +WebGL2RenderingContextBase:::uniformMatrix2x4fv:::3 +WebGL2RenderingContextBase:::uniformMatrix2x4fv:::4 +WebGL2RenderingContextBase:::uniformMatrix2x4fv:::5 +WebGL2RenderingContextBase:::uniformMatrix3fv:::4 +WebGL2RenderingContextBase:::uniformMatrix3fv:::5 +WebGL2RenderingContextBase:::uniformMatrix3x2fv:::3 +WebGL2RenderingContextBase:::uniformMatrix3x2fv:::4 +WebGL2RenderingContextBase:::uniformMatrix3x2fv:::5 +WebGL2RenderingContextBase:::uniformMatrix3x4fv:::3 +WebGL2RenderingContextBase:::uniformMatrix3x4fv:::4 +WebGL2RenderingContextBase:::uniformMatrix3x4fv:::5 +WebGL2RenderingContextBase:::uniformMatrix4fv:::4 +WebGL2RenderingContextBase:::uniformMatrix4fv:::5 +WebGL2RenderingContextBase:::uniformMatrix4x2fv:::3 +WebGL2RenderingContextBase:::uniformMatrix4x2fv:::4 +WebGL2RenderingContextBase:::uniformMatrix4x2fv:::5 +WebGL2RenderingContextBase:::uniformMatrix4x3fv:::3 +WebGL2RenderingContextBase:::uniformMatrix4x3fv:::4 +WebGL2RenderingContextBase:::uniformMatrix4x3fv:::5 +WebGL2RenderingContextBase:::vertexAttribDivisor:::2 +WebGL2RenderingContextBase:::vertexAttribI4i:::5 +WebGL2RenderingContextBase:::vertexAttribI4iv:::2 +WebGL2RenderingContextBase:::vertexAttribI4ui:::5 +WebGL2RenderingContextBase:::vertexAttribI4uiv:::2 +WebGL2RenderingContextBase:::vertexAttribIPointer:::5 +WebGL2RenderingContextBase:::waitSync:::3 +WebGLActiveInfo:::name:::0 +WebGLActiveInfo:::size:::0 +WebGLActiveInfo:::type:::0 +WebGLContextEvent:::statusMessage:::0 +WebGLDebugShaders:::getTranslatedShaderSource:::1 +WebGLDrawBuffers:::drawBuffersWEBGL:::1 +WebGLExtension:::canvas:::0 +WebGLGetBufferSubDataAsync:::getBufferSubDataAsync:::4 +WebGLGetBufferSubDataAsync:::getBufferSubDataAsync:::5 +WebGLGetBufferSubDataAsync:::getBufferSubDataAsync:::6 +WebGLLoseContext:::loseContext:::0 +WebGLLoseContext:::restoreContext:::0 +WebGLRenderingContextBase:::activeTexture:::1 +WebGLRenderingContextBase:::attachShader:::2 +WebGLRenderingContextBase:::bindAttribLocation:::3 +WebGLRenderingContextBase:::bindBuffer:::2 +WebGLRenderingContextBase:::bindFramebuffer:::2 +WebGLRenderingContextBase:::bindRenderbuffer:::2 +WebGLRenderingContextBase:::bindTexture:::2 +WebGLRenderingContextBase:::blendColor:::4 +WebGLRenderingContextBase:::blendEquation:::1 +WebGLRenderingContextBase:::blendEquationSeparate:::2 +WebGLRenderingContextBase:::blendFunc:::2 +WebGLRenderingContextBase:::blendFuncSeparate:::4 +WebGLRenderingContextBase:::bufferData:::3 +WebGLRenderingContextBase:::bufferSubData:::3 +WebGLRenderingContextBase:::checkFramebufferStatus:::1 +WebGLRenderingContextBase:::clear:::1 +WebGLRenderingContextBase:::clearColor:::4 +WebGLRenderingContextBase:::clearDepth:::1 +WebGLRenderingContextBase:::clearStencil:::1 +WebGLRenderingContextBase:::colorMask:::4 +WebGLRenderingContextBase:::commit:::2 +WebGLRenderingContextBase:::compileShader:::1 +WebGLRenderingContextBase:::compressedTexImage2D:::7 +WebGLRenderingContextBase:::compressedTexSubImage2D:::8 +WebGLRenderingContextBase:::copyTexImage2D:::8 +WebGLRenderingContextBase:::copyTexSubImage2D:::8 +WebGLRenderingContextBase:::createBuffer:::0 +WebGLRenderingContextBase:::createFramebuffer:::0 +WebGLRenderingContextBase:::createProgram:::0 +WebGLRenderingContextBase:::createRenderbuffer:::0 +WebGLRenderingContextBase:::createShader:::1 +WebGLRenderingContextBase:::createTexture:::0 +WebGLRenderingContextBase:::cullFace:::1 +WebGLRenderingContextBase:::deleteBuffer:::1 +WebGLRenderingContextBase:::deleteFramebuffer:::1 +WebGLRenderingContextBase:::deleteProgram:::1 +WebGLRenderingContextBase:::deleteRenderbuffer:::1 +WebGLRenderingContextBase:::deleteShader:::1 +WebGLRenderingContextBase:::deleteTexture:::1 +WebGLRenderingContextBase:::depthFunc:::1 +WebGLRenderingContextBase:::depthMask:::1 +WebGLRenderingContextBase:::depthRange:::2 +WebGLRenderingContextBase:::detachShader:::2 +WebGLRenderingContextBase:::disable:::1 +WebGLRenderingContextBase:::disableVertexAttribArray:::1 +WebGLRenderingContextBase:::drawArrays:::3 +WebGLRenderingContextBase:::drawElements:::4 +WebGLRenderingContextBase:::drawingBufferHeight:::0 +WebGLRenderingContextBase:::drawingBufferWidth:::0 +WebGLRenderingContextBase:::enable:::1 +WebGLRenderingContextBase:::enableVertexAttribArray:::1 +WebGLRenderingContextBase:::finish:::0 +WebGLRenderingContextBase:::flush:::0 +WebGLRenderingContextBase:::framebufferRenderbuffer:::4 +WebGLRenderingContextBase:::framebufferTexture2D:::5 +WebGLRenderingContextBase:::frontFace:::1 +WebGLRenderingContextBase:::generateMipmap:::1 +WebGLRenderingContextBase:::getActiveAttrib:::2 +WebGLRenderingContextBase:::getActiveUniform:::2 +WebGLRenderingContextBase:::getAttachedShaders:::2 +WebGLRenderingContextBase:::getAttribLocation:::2 +WebGLRenderingContextBase:::getBufferParameter:::3 +WebGLRenderingContextBase:::getContextAttributes:::0 +WebGLRenderingContextBase:::getError:::0 +WebGLRenderingContextBase:::getExtension:::2 +WebGLRenderingContextBase:::getFramebufferAttachmentParameter:::4 +WebGLRenderingContextBase:::getHTMLOrOffscreenCanvas:::1 +WebGLRenderingContextBase:::getParameter:::2 +WebGLRenderingContextBase:::getProgramInfoLog:::1 +WebGLRenderingContextBase:::getProgramParameter:::3 +WebGLRenderingContextBase:::getRenderbufferParameter:::3 +WebGLRenderingContextBase:::getShaderInfoLog:::1 +WebGLRenderingContextBase:::getShaderParameter:::3 +WebGLRenderingContextBase:::getShaderPrecisionFormat:::2 +WebGLRenderingContextBase:::getShaderSource:::1 +WebGLRenderingContextBase:::getSupportedExtensions:::1 +WebGLRenderingContextBase:::getTexParameter:::3 +WebGLRenderingContextBase:::getUniform:::3 +WebGLRenderingContextBase:::getUniformLocation:::2 +WebGLRenderingContextBase:::getVertexAttrib:::3 +WebGLRenderingContextBase:::getVertexAttribOffset:::2 +WebGLRenderingContextBase:::hint:::2 +WebGLRenderingContextBase:::isBuffer:::1 +WebGLRenderingContextBase:::isContextLost:::0 +WebGLRenderingContextBase:::isEnabled:::1 +WebGLRenderingContextBase:::isFramebuffer:::1 +WebGLRenderingContextBase:::isProgram:::1 +WebGLRenderingContextBase:::isRenderbuffer:::1 +WebGLRenderingContextBase:::isShader:::1 +WebGLRenderingContextBase:::isTexture:::1 +WebGLRenderingContextBase:::lineWidth:::1 +WebGLRenderingContextBase:::linkProgram:::1 +WebGLRenderingContextBase:::pixelStorei:::2 +WebGLRenderingContextBase:::polygonOffset:::2 +WebGLRenderingContextBase:::readPixels:::7 +WebGLRenderingContextBase:::renderbufferStorage:::4 +WebGLRenderingContextBase:::sampleCoverage:::2 +WebGLRenderingContextBase:::scissor:::4 +WebGLRenderingContextBase:::shaderSource:::2 +WebGLRenderingContextBase:::stencilFunc:::3 +WebGLRenderingContextBase:::stencilFuncSeparate:::4 +WebGLRenderingContextBase:::stencilMask:::1 +WebGLRenderingContextBase:::stencilMaskSeparate:::2 +WebGLRenderingContextBase:::stencilOp:::3 +WebGLRenderingContextBase:::stencilOpSeparate:::4 +WebGLRenderingContextBase:::texImage2D:::6 +WebGLRenderingContextBase:::texImage2D:::7 +WebGLRenderingContextBase:::texImage2D:::9 +WebGLRenderingContextBase:::texParameterf:::3 +WebGLRenderingContextBase:::texParameteri:::3 +WebGLRenderingContextBase:::texSubImage2D:::7 +WebGLRenderingContextBase:::texSubImage2D:::8 +WebGLRenderingContextBase:::texSubImage2D:::9 +WebGLRenderingContextBase:::uniform1f:::2 +WebGLRenderingContextBase:::uniform1fv:::2 +WebGLRenderingContextBase:::uniform1i:::2 +WebGLRenderingContextBase:::uniform1iv:::2 +WebGLRenderingContextBase:::uniform2f:::3 +WebGLRenderingContextBase:::uniform2fv:::2 +WebGLRenderingContextBase:::uniform2i:::3 +WebGLRenderingContextBase:::uniform2iv:::2 +WebGLRenderingContextBase:::uniform3f:::4 +WebGLRenderingContextBase:::uniform3fv:::2 +WebGLRenderingContextBase:::uniform3i:::4 +WebGLRenderingContextBase:::uniform3iv:::2 +WebGLRenderingContextBase:::uniform4f:::5 +WebGLRenderingContextBase:::uniform4fv:::2 +WebGLRenderingContextBase:::uniform4i:::5 +WebGLRenderingContextBase:::uniform4iv:::2 +WebGLRenderingContextBase:::uniformMatrix2fv:::3 +WebGLRenderingContextBase:::uniformMatrix3fv:::3 +WebGLRenderingContextBase:::uniformMatrix4fv:::3 +WebGLRenderingContextBase:::useProgram:::1 +WebGLRenderingContextBase:::validateProgram:::1 +WebGLRenderingContextBase:::vertexAttrib1f:::2 +WebGLRenderingContextBase:::vertexAttrib1fv:::2 +WebGLRenderingContextBase:::vertexAttrib2f:::3 +WebGLRenderingContextBase:::vertexAttrib2fv:::2 +WebGLRenderingContextBase:::vertexAttrib3f:::4 +WebGLRenderingContextBase:::vertexAttrib3fv:::2 +WebGLRenderingContextBase:::vertexAttrib4f:::5 +WebGLRenderingContextBase:::vertexAttrib4fv:::2 +WebGLRenderingContextBase:::vertexAttribPointer:::6 +WebGLRenderingContextBase:::viewport:::4 +WebGLShaderPrecisionFormat:::precision:::0 +WebGLShaderPrecisionFormat:::rangeMax:::0 +WebGLShaderPrecisionFormat:::rangeMin:::0 +WebGLTexture:::lastUploadedVideoHeight:::0 +WebGLTexture:::lastUploadedVideoTimestamp:::0 +WebGLTexture:::lastUploadedVideoWidth:::0 +WheelEvent:::deltaMode:::0 +WheelEvent:::deltaX:::0 +WheelEvent:::deltaY:::0 +WheelEvent:::deltaZ:::0 +WheelEvent:::wheelDelta:::0 +WheelEvent:::wheelDeltaX:::0 +WheelEvent:::wheelDeltaY:::0 +WindowAnimationWorklet:::animationWorklet:::1 +WindowAudioWorklet:::audioWorklet:::1 +WindowBase64:::atob:::2 +WindowBase64:::btoa:::2 +WindowGetComputedStyle:::getComputedStyleMap:::2 +WindowGetComputedStyle:::getComputedStyleMap:::3 +WindowPaintWorklet:::paintWorklet:::1 +WorkerGlobalScope:::addressSpaceForBindings:::0 +WorkerGlobalScope:::close:::0 +WorkerGlobalScopeCrypto:::crypto:::1 +WorkerGlobalScopeFileSystem:::webkitRequestFileSystem:::3 +WorkerGlobalScopeFileSystem:::webkitRequestFileSystem:::4 +WorkerGlobalScopeFileSystem:::webkitRequestFileSystem:::5 +WorkerGlobalScopeFileSystem:::webkitRequestFileSystemSync:::4 +WorkerGlobalScopeFileSystem:::webkitResolveLocalFileSystemSyncURL:::3 +WorkerGlobalScopeFileSystem:::webkitResolveLocalFileSystemURL:::3 +WorkerGlobalScopeFileSystem:::webkitResolveLocalFileSystemURL:::4 +WorkerGlobalScope:::importScripts:::2 +WorkerGlobalScope:::isSecureContextForBindings:::0 +WorkerGlobalScope:::location:::0 +WorkerGlobalScope:::navigator:::0 +WorkerGlobalScope:::onerror:::0 +WorkerGlobalScope:::onrejectionhandled:::0 +WorkerGlobalScope:::onunhandledrejection:::0 +WorkerGlobalScope:::origin:::0 +WorkerGlobalScopePerformance:::performance:::1 +WorkerGlobalScope:::self:::0 +WorkerGlobalScope:::setOnerror:::1 +WorkerGlobalScope:::setOnrejectionhandled:::1 +WorkerGlobalScope:::setOnunhandledrejection:::1 +WorkerInternals:::collectGarbage:::1 +WorkerInternals:::countDeprecation:::2 +WorkerInternals:::countFeature:::2 +WorkerInternalsFetch:::getInternalResponseURLList:::2 +WorkerInternals:::originTrialsTest:::0 +WorkerNavigatorBudget:::budget:::1 +WorkerNavigatorNetworkInformation:::connection:::2 +WorkerNavigatorPermissions:::permissions:::1 +WorkerNavigatorStorageQuota:::storage:::1 +Worker:::onmessage:::0 +WorkerPerformance:::clearMarks:::0 +WorkerPerformance:::clearMarks:::1 +WorkerPerformance:::clearMeasures:::0 +WorkerPerformance:::clearMeasures:::1 +WorkerPerformance:::clearResourceTimings:::0 +WorkerPerformance:::getEntries:::0 +WorkerPerformance:::getEntriesByName:::1 +WorkerPerformance:::getEntriesByName:::2 +WorkerPerformance:::getEntriesByType:::1 +WorkerPerformance:::mark:::2 +WorkerPerformance:::measure:::2 +WorkerPerformance:::measure:::3 +WorkerPerformance:::measure:::4 +WorkerPerformance:::memory:::0 +WorkerPerformance:::now:::0 +WorkerPerformance:::onresourcetimingbufferfull:::0 +WorkerPerformance:::setOnresourcetimingbufferfull:::1 +WorkerPerformance:::setResourceTimingBufferSize:::1 +Worker:::postMessage:::3 +Worker:::postMessage:::4 +Worker:::setOnmessage:::1 +Worker:::terminate:::0 +Worklet:::import:::2 +WrapperTypeInfo:::domTemplate:::2 +XMLHttpRequest:::abort:::0 +XMLHttpRequestEventTarget:::onabort:::0 +XMLHttpRequestEventTarget:::onerror:::0 +XMLHttpRequestEventTarget:::onload:::0 +XMLHttpRequestEventTarget:::onloadend:::0 +XMLHttpRequestEventTarget:::onloadstart:::0 +XMLHttpRequestEventTarget:::onprogress:::0 +XMLHttpRequestEventTarget:::ontimeout:::0 +XMLHttpRequestEventTarget:::setOnabort:::1 +XMLHttpRequestEventTarget:::setOnerror:::1 +XMLHttpRequestEventTarget:::setOnload:::1 +XMLHttpRequestEventTarget:::setOnloadend:::1 +XMLHttpRequestEventTarget:::setOnloadstart:::1 +XMLHttpRequestEventTarget:::setOnprogress:::1 +XMLHttpRequestEventTarget:::setOntimeout:::1 +XMLHttpRequest:::getAllResponseHeaders:::0 +XMLHttpRequest:::getResponseHeader:::1 +XMLHttpRequest:::onreadystatechange:::0 +XMLHttpRequest:::open:::3 +XMLHttpRequest:::open:::4 +XMLHttpRequest:::open:::5 +XMLHttpRequest:::open:::6 +XMLHttpRequest:::overrideMimeType:::2 +XMLHttpRequest:::readyState:::0 +XMLHttpRequest:::response:::1 +XMLHttpRequest:::responseText:::1 +XMLHttpRequest:::responseType:::0 +XMLHttpRequest:::responseURL:::0 +XMLHttpRequest:::responseXML:::1 +XMLHttpRequest:::send:::1 +XMLHttpRequest:::send:::2 +XMLHttpRequest:::setOnreadystatechange:::1 +XMLHttpRequest:::setRequestHeader:::3 +XMLHttpRequest:::setResponseType:::2 +XMLHttpRequest:::setTimeout:::2 +XMLHttpRequest:::setWithCredentials:::2 +XMLHttpRequest:::status:::0 +XMLHttpRequest:::statusText:::0 +XMLHttpRequest:::timeout:::0 +XMLHttpRequest:::upload:::0 +XMLHttpRequest:::withCredentials:::0 +XMLSerializer:::serializeToString:::1 +XPathEvaluator:::createExpression:::2 +XPathEvaluator:::createExpression:::3 +XPathEvaluator:::createNSResolver:::1 +XPathEvaluator:::evaluate:::3 +XPathEvaluator:::evaluate:::4 +XPathEvaluator:::evaluate:::5 +XPathEvaluator:::evaluate:::6 +XPathExpression:::evaluate:::2 +XPathExpression:::evaluate:::3 +XPathExpression:::evaluate:::4 +XPathNSResolver:::lookupNamespaceURI:::0 +XPathNSResolver:::lookupNamespaceURI:::1 +XPathResult:::booleanValue:::1 +XPathResult:::invalidIteratorState:::0 +XPathResult:::iterateNext:::1 +XPathResult:::numberValue:::1 +XPathResult:::resultType:::0 +XPathResult:::singleNodeValue:::1 +XPathResult:::snapshotItem:::2 +XPathResult:::snapshotLength:::1 +XPathResult:::stringValue:::1 +XSLTProcessor:::clearParameters:::0 +XSLTProcessor:::getParameter:::2 +XSLTProcessor:::importStylesheet:::1 +XSLTProcessor:::removeParameter:::2 +XSLTProcessor:::reset:::0 +XSLTProcessor:::setParameter:::3 +XSLTProcessor:::transformToDocument:::1 +XSLTProcessor:::transformToFragment:::2
diff --git a/tools/blink_rename_merge_helper/data/manual.patch b/tools/blink_rename_merge_helper/data/manual.patch new file mode 100644 index 0000000..af3bd94 --- /dev/null +++ b/tools/blink_rename_merge_helper/data/manual.patch
@@ -0,0 +1,10498 @@ +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java +index c2bd1b22ea50..102447ddc935 100644 +--- a/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java +@@ -347,7 +347,7 @@ public class ShortcutHelper { + public static Intent createWebappShortcutIntentForTesting(String id, String url) { + assert !ThreadUtils.runningOnUiThread(); + return createWebappShortcutIntent(id, null, url, getScopeFromUrl(url), null, null, null, +- WEBAPP_SHORTCUT_VERSION, WebDisplayMode.Standalone, 0, 0, 0, false); ++ WEBAPP_SHORTCUT_VERSION, WebDisplayMode.kStandalone, 0, 0, 0, false); + } + + /** +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteMediaPlayerBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteMediaPlayerBridge.java +index 86f7d30baa9c..3bdab611244f 100644 +--- a/chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteMediaPlayerBridge.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteMediaPlayerBridge.java +@@ -322,14 +322,14 @@ public class RemoteMediaPlayerBridge { + Log.d(TAG, "onRouteAvailabilityChange: " + mRouteIsAvailable + ", " + mIsPlayable); + if (mNativeRemoteMediaPlayerBridge == 0) return; + +- int availability = WebRemotePlaybackAvailability.DeviceNotAvailable; ++ int availability = WebRemotePlaybackAvailability.kDeviceNotAvailable; + if (!mRouteIsAvailable && !mIsPlayable) { +- availability = WebRemotePlaybackAvailability.SourceNotSupported; ++ availability = WebRemotePlaybackAvailability.kSourceNotSupported; + } else if (mRouteIsAvailable && mIsPlayable) { +- availability = WebRemotePlaybackAvailability.DeviceAvailable; ++ availability = WebRemotePlaybackAvailability.kDeviceAvailable; + } else if (mRouteIsAvailable) { + // mIsPlayable is false here. +- availability = WebRemotePlaybackAvailability.SourceNotCompatible; ++ availability = WebRemotePlaybackAvailability.kSourceNotCompatible; + } + nativeOnRouteAvailabilityChanged(mNativeRemoteMediaPlayerBridge, availability); + } +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsDelegateAndroid.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsDelegateAndroid.java +index 713931b2b5b2..6c6188991500 100644 +--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsDelegateAndroid.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsDelegateAndroid.java +@@ -76,7 +76,7 @@ public class TabWebContentsDelegateAndroid extends WebContentsDelegateAndroid { + + private FindMatchRectsListener mFindMatchRectsListener; + +- private int mDisplayMode = WebDisplayMode.Browser; ++ private int mDisplayMode = WebDisplayMode.kBrowser; + + protected Handler mHandler; + +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInfo.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInfo.java +index 41bbb50df489..b05dda7d5c6f 100644 +--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInfo.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInfo.java +@@ -331,19 +331,19 @@ public class WebApkInfo extends WebappInfo { + */ + private static int displayModeFromString(String displayMode) { + if (displayMode == null) { +- return WebDisplayMode.Undefined; ++ return WebDisplayMode.kUndefined; + } + + if (displayMode.equals("fullscreen")) { +- return WebDisplayMode.Fullscreen; ++ return WebDisplayMode.kFullscreen; + } else if (displayMode.equals("standalone")) { +- return WebDisplayMode.Standalone; ++ return WebDisplayMode.kStandalone; + } else if (displayMode.equals("minimal-ui")) { +- return WebDisplayMode.MinimalUi; ++ return WebDisplayMode.kMinimalUi; + } else if (displayMode.equals("browser")) { +- return WebDisplayMode.Browser; ++ return WebDisplayMode.kBrowser; + } else { +- return WebDisplayMode.Undefined; ++ return WebDisplayMode.kUndefined; + } + } + +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java +index 87214d24d97f..33c6e5f2c5b3 100644 +--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java +@@ -132,7 +132,7 @@ public class WebappActivity extends FullScreenActivity { + getActivityTab().addObserver(createTabObserver()); + getActivityTab().getTabWebContentsDelegateAndroid().setDisplayMode( + mWebappInfo.displayMode()); +- if (mWebappInfo.displayMode() == WebDisplayMode.Fullscreen) { ++ if (mWebappInfo.displayMode() == WebDisplayMode.kFullscreen) { + enterImmersiveMode(); + } + } +@@ -473,13 +473,13 @@ public class WebappActivity extends FullScreenActivity { + return new ChromeFullscreenManager(this, false) { + @Override + public void setPersistentFullscreenMode(boolean enabled) { +- if (mWebappInfo.displayMode() == WebDisplayMode.Fullscreen) return; ++ if (mWebappInfo.displayMode() == WebDisplayMode.kFullscreen) return; + super.setPersistentFullscreenMode(enabled); + } + + @Override + public boolean getPersistentFullscreenMode() { +- if (mWebappInfo.displayMode() == WebDisplayMode.Fullscreen) return false; ++ if (mWebappInfo.displayMode() == WebDisplayMode.kFullscreen) return false; + return super.getPersistentFullscreenMode(); + } + }; +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java +index 3aafbd3bec43..cbcc62bb7996 100644 +--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java +@@ -206,7 +206,7 @@ public class WebappDataStorage { + mPreferences.getString(KEY_SHORT_NAME, null), + ShortcutHelper.decodeBitmapFromString( + mPreferences.getString(KEY_ICON, null)), version, +- mPreferences.getInt(KEY_DISPLAY_MODE, WebDisplayMode.Standalone), ++ mPreferences.getInt(KEY_DISPLAY_MODE, WebDisplayMode.kStandalone), + mPreferences.getInt(KEY_ORIENTATION, ScreenOrientationValues.DEFAULT), + mPreferences.getLong(KEY_THEME_COLOR, + ShortcutHelper.MANIFEST_COLOR_INVALID_OR_MISSING), +@@ -261,7 +261,7 @@ public class WebappDataStorage { + // "Standalone" was the original assumed default for all web apps. + editor.putInt(KEY_DISPLAY_MODE, IntentUtils.safeGetIntExtra( + shortcutIntent, ShortcutHelper.EXTRA_DISPLAY_MODE, +- WebDisplayMode.Standalone)); ++ WebDisplayMode.kStandalone)); + editor.putInt(KEY_ORIENTATION, IntentUtils.safeGetIntExtra( + shortcutIntent, ShortcutHelper.EXTRA_ORIENTATION, + ScreenOrientationValues.DEFAULT)); +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java +index a48690831de6..2e8f8bfaa098 100644 +--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java +@@ -108,7 +108,7 @@ public class WebappInfo { + String url = urlFromIntent(intent); + String scope = IntentUtils.safeGetStringExtra(intent, ShortcutHelper.EXTRA_SCOPE); + int displayMode = IntentUtils.safeGetIntExtra( +- intent, ShortcutHelper.EXTRA_DISPLAY_MODE, WebDisplayMode.Standalone); ++ intent, ShortcutHelper.EXTRA_DISPLAY_MODE, WebDisplayMode.kStandalone); + int orientation = IntentUtils.safeGetIntExtra( + intent, ShortcutHelper.EXTRA_ORIENTATION, ScreenOrientationValues.DEFAULT); + int source = sourceFromIntent(intent); +diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebApkUpdateManagerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebApkUpdateManagerTest.java +index d8ae60845cac..cecc3c8e107d 100644 +--- a/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebApkUpdateManagerTest.java ++++ b/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebApkUpdateManagerTest.java +@@ -43,7 +43,7 @@ public class WebApkUpdateManagerTest extends ChromeTabbedActivityTestBase { + private static final String WEBAPK_SHORT_NAME = "Manifest test app"; + private static final String WEBAPK_ICON_URL = "/chrome/test/data/banners/image-512px.png"; + private static final String WEBAPK_ICON_MURMUR2_HASH = "7742433188808797392"; +- private static final int WEBAPK_DISPLAY_MODE = WebDisplayMode.Standalone; ++ private static final int WEBAPK_DISPLAY_MODE = WebDisplayMode.kStandalone; + private static final int WEBAPK_ORIENTATION = ScreenOrientationValues.LANDSCAPE; + private static final long WEBAPK_THEME_COLOR = 2147483648L; + private static final long WEBAPK_BACKGROUND_COLOR = 2147483648L; +diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappInfoTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappInfoTest.java +index 3cb4531e5c35..914478019354 100644 +--- a/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappInfoTest.java ++++ b/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappInfoTest.java +@@ -33,7 +33,7 @@ public class WebappInfoTest { + String url = "about:blank"; + + WebappInfo info = WebappInfo.create(id, url, null, null, name, shortName, +- WebDisplayMode.Standalone, ScreenOrientationValues.DEFAULT, ShortcutSource.UNKNOWN, ++ WebDisplayMode.kStandalone, ScreenOrientationValues.DEFAULT, ShortcutSource.UNKNOWN, + ShortcutHelper.MANIFEST_COLOR_INVALID_OR_MISSING, + ShortcutHelper.MANIFEST_COLOR_INVALID_OR_MISSING, false); + Assert.assertNotNull(info); +@@ -49,7 +49,7 @@ public class WebappInfoTest { + String url = "http://google.com"; + + WebappInfo info = WebappInfo.create(id, url, null, null, name, shortName, +- WebDisplayMode.Standalone, ScreenOrientationValues.DEFAULT, ShortcutSource.UNKNOWN, ++ WebDisplayMode.kStandalone, ScreenOrientationValues.DEFAULT, ShortcutSource.UNKNOWN, + ShortcutHelper.MANIFEST_COLOR_INVALID_OR_MISSING, + ShortcutHelper.MANIFEST_COLOR_INVALID_OR_MISSING, false); + Assert.assertNotNull(info); +@@ -144,10 +144,10 @@ public class WebappInfoTest { + String url = "http://money.cnn.com"; + + WebappInfo info = WebappInfo.create(id, url, null, null, name, shortName, +- WebDisplayMode.Fullscreen, ScreenOrientationValues.DEFAULT, ShortcutSource.UNKNOWN, ++ WebDisplayMode.kFullscreen, ScreenOrientationValues.DEFAULT, ShortcutSource.UNKNOWN, + ShortcutHelper.MANIFEST_COLOR_INVALID_OR_MISSING, + ShortcutHelper.MANIFEST_COLOR_INVALID_OR_MISSING, false); +- Assert.assertEquals(WebDisplayMode.Fullscreen, info.displayMode()); ++ Assert.assertEquals(WebDisplayMode.kFullscreen, info.displayMode()); + Assert.assertEquals(ScreenOrientationValues.DEFAULT, info.orientation()); + Assert.assertEquals(ShortcutSource.UNKNOWN, info.source()); + } +@@ -164,7 +164,7 @@ public class WebappInfoTest { + long backgroundColor = 0xFF0000FFL; + + WebappInfo info = WebappInfo.create(id, url, null, null, name, shortName, +- WebDisplayMode.Standalone, ScreenOrientationValues.DEFAULT, ++ WebDisplayMode.kStandalone, ScreenOrientationValues.DEFAULT, + ShortcutSource.UNKNOWN, themeColor, backgroundColor, false); + Assert.assertEquals(themeColor, info.themeColor()); + Assert.assertEquals(backgroundColor, info.backgroundColor()); +@@ -180,7 +180,7 @@ public class WebappInfoTest { + String url = "http://money.cnn.com"; + + WebappInfo info = WebappInfo.create(id, url, null, null, name, shortName, +- WebDisplayMode.Standalone, ScreenOrientationValues.DEFAULT, ShortcutSource.UNKNOWN, ++ WebDisplayMode.kStandalone, ScreenOrientationValues.DEFAULT, ShortcutSource.UNKNOWN, + ShortcutHelper.MANIFEST_COLOR_INVALID_OR_MISSING, + ShortcutHelper.MANIFEST_COLOR_INVALID_OR_MISSING, false); + Assert.assertEquals(ShortcutHelper.MANIFEST_COLOR_INVALID_OR_MISSING, info.themeColor()); +@@ -231,9 +231,9 @@ public class WebappInfoTest { + @Feature({"Webapps"}) + public void testIntentDisplayMode() { + Intent intent = createIntentWithUrlAndId(); +- intent.putExtra(ShortcutHelper.EXTRA_DISPLAY_MODE, WebDisplayMode.MinimalUi); ++ intent.putExtra(ShortcutHelper.EXTRA_DISPLAY_MODE, WebDisplayMode.kMinimalUi); + WebappInfo info = WebappInfo.create(intent); +- Assert.assertEquals(WebDisplayMode.MinimalUi, info.displayMode()); ++ Assert.assertEquals(WebDisplayMode.kMinimalUi, info.displayMode()); + } + + @Test +diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappModeTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappModeTest.java +index c1e05f901d56..e316e4e44393 100644 +--- a/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappModeTest.java ++++ b/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappModeTest.java +@@ -74,7 +74,7 @@ public class WebappModeTest extends MultiActivityTestBase { + } + + WebappInfo webappInfo = WebappInfo.create(id, url, null, new WebappInfo.Icon(icon), title, +- null, WebDisplayMode.Standalone, ScreenOrientationValues.PORTRAIT, ++ null, WebDisplayMode.kStandalone, ScreenOrientationValues.PORTRAIT, + ShortcutSource.UNKNOWN, ShortcutHelper.MANIFEST_COLOR_INVALID_OR_MISSING, + ShortcutHelper.MANIFEST_COLOR_INVALID_OR_MISSING, false); + webappInfo.setWebappIntentExtras(intent); +diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkInfoTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkInfoTest.java +index 34a80cee3114..5fbf4dbce9df 100644 +--- a/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkInfoTest.java ++++ b/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkInfoTest.java +@@ -86,7 +86,7 @@ public class WebApkInfoTest { + Assert.assertEquals(SCOPE, info.scopeUri().toString()); + Assert.assertEquals(NAME, info.name()); + Assert.assertEquals(SHORT_NAME, info.shortName()); +- Assert.assertEquals(WebDisplayMode.MinimalUi, info.displayMode()); ++ Assert.assertEquals(WebDisplayMode.kMinimalUi, info.displayMode()); + Assert.assertEquals(ScreenOrientationValues.PORTRAIT, info.orientation()); + Assert.assertTrue(info.hasValidThemeColor()); + Assert.assertEquals(1L, info.themeColor()); +diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkUpdateManagerTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkUpdateManagerTest.java +index b74e80d32fa6..204ceb8f989b 100644 +--- a/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkUpdateManagerTest.java ++++ b/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkUpdateManagerTest.java +@@ -61,7 +61,7 @@ public class WebApkUpdateManagerTest { + private static final String SHORT_NAME = "Short Name"; + private static final String ICON_URL = "/icon.png"; + private static final String ICON_MURMUR2_HASH = "3"; +- private static final int DISPLAY_MODE = WebDisplayMode.Undefined; ++ private static final int DISPLAY_MODE = WebDisplayMode.kUndefined; + private static final int ORIENTATION = ScreenOrientationValues.DEFAULT; + private static final long THEME_COLOR = 1L; + private static final long BACKGROUND_COLOR = 2L; +diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappDataStorageTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappDataStorageTest.java +index c0b6fbca4602..cf3f252a067c 100644 +--- a/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappDataStorageTest.java ++++ b/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappDataStorageTest.java +@@ -239,7 +239,7 @@ public class WebappDataStorageTest { + final String name = "name"; + final String shortName = "shortName"; + final Bitmap icon = createBitmap(); +- final int displayMode = WebDisplayMode.Standalone; ++ final int displayMode = WebDisplayMode.kStandalone; + final int orientation = 1; + final long themeColor = 2; + final long backgroundColor = 3; +diff --git a/content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc b/content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc +index 290e258dbdeb..472a1a771761 100644 +--- a/content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc ++++ b/content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc +@@ -82,7 +82,7 @@ TEST_F(PepperGamepadHostTest, ValidateGamepadsMatch) { + size_t ppapi_items_length_cap = ppapi::WebKitGamepads::kItemsLengthCap; + EXPECT_EQ(webkit_items_length_cap, ppapi_items_length_cap); + +- for (size_t i = 0; i < web_gamepads.itemsLengthCap; i++) { ++ for (size_t i = 0; i < webkit_items_length_cap; i++) { + EXPECT_EQ(AddressDiff(&web_gamepads.items[0], &web_gamepads), + AddressDiff(&ppapi_gamepads.items[0], &ppapi_gamepads)); + } +diff --git a/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java +index 912e9b6dfac0..73c07186b53d 100644 +--- a/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java ++++ b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java +@@ -252,19 +252,19 @@ public class ImeAdapter { + private static int getModifiers(int metaState) { + int modifiers = 0; + if ((metaState & KeyEvent.META_SHIFT_ON) != 0) { +- modifiers |= WebInputEventModifier.ShiftKey; ++ modifiers |= WebInputEventModifier.kShiftKey; + } + if ((metaState & KeyEvent.META_ALT_ON) != 0) { +- modifiers |= WebInputEventModifier.AltKey; ++ modifiers |= WebInputEventModifier.kAltKey; + } + if ((metaState & KeyEvent.META_CTRL_ON) != 0) { +- modifiers |= WebInputEventModifier.ControlKey; ++ modifiers |= WebInputEventModifier.kControlKey; + } + if ((metaState & KeyEvent.META_CAPS_LOCK_ON) != 0) { +- modifiers |= WebInputEventModifier.CapsLockOn; ++ modifiers |= WebInputEventModifier.kCapsLockOn; + } + if ((metaState & KeyEvent.META_NUM_LOCK_ON) != 0) { +- modifiers |= WebInputEventModifier.NumLockOn; ++ modifiers |= WebInputEventModifier.kNumLockOn; + } + return modifiers; + } +@@ -563,7 +563,7 @@ public class ImeAdapter { + + mViewEmbedder.onImeEvent(); + long timestampMs = SystemClock.uptimeMillis(); +- nativeSendKeyEvent(mNativeImeAdapterAndroid, null, WebInputEventType.RawKeyDown, 0, ++ nativeSendKeyEvent(mNativeImeAdapterAndroid, null, WebInputEventType.kRawKeyDown, 0, + timestampMs, COMPOSITION_KEY_CODE, 0, false, unicodeFromKeyEvent); + + if (isCommit) { +@@ -573,7 +573,7 @@ public class ImeAdapter { + mNativeImeAdapterAndroid, text, text.toString(), newCursorPosition); + } + +- nativeSendKeyEvent(mNativeImeAdapterAndroid, null, WebInputEventType.KeyUp, 0, timestampMs, ++ nativeSendKeyEvent(mNativeImeAdapterAndroid, null, WebInputEventType.kKeyUp, 0, timestampMs, + COMPOSITION_KEY_CODE, 0, false, unicodeFromKeyEvent); + return true; + } +@@ -591,9 +591,9 @@ public class ImeAdapter { + int action = event.getAction(); + int type; + if (action == KeyEvent.ACTION_DOWN) { +- type = WebInputEventType.KeyDown; ++ type = WebInputEventType.kKeyDown; + } else if (action == KeyEvent.ACTION_UP) { +- type = WebInputEventType.KeyUp; ++ type = WebInputEventType.kKeyUp; + } else { + // In theory, KeyEvent.ACTION_MULTIPLE is a valid value, but in practice + // this seems to have been quietly deprecated and we've never observed +@@ -619,10 +619,10 @@ public class ImeAdapter { + boolean deleteSurroundingText(int beforeLength, int afterLength) { + mViewEmbedder.onImeEvent(); + if (!isValid()) return false; +- nativeSendKeyEvent(mNativeImeAdapterAndroid, null, WebInputEventType.RawKeyDown, 0, ++ nativeSendKeyEvent(mNativeImeAdapterAndroid, null, WebInputEventType.kRawKeyDown, 0, + SystemClock.uptimeMillis(), COMPOSITION_KEY_CODE, 0, false, 0); + nativeDeleteSurroundingText(mNativeImeAdapterAndroid, beforeLength, afterLength); +- nativeSendKeyEvent(mNativeImeAdapterAndroid, null, WebInputEventType.KeyUp, 0, ++ nativeSendKeyEvent(mNativeImeAdapterAndroid, null, WebInputEventType.kKeyUp, 0, + SystemClock.uptimeMillis(), COMPOSITION_KEY_CODE, 0, false, 0); + return true; + } +@@ -638,11 +638,11 @@ public class ImeAdapter { + boolean deleteSurroundingTextInCodePoints(int beforeLength, int afterLength) { + mViewEmbedder.onImeEvent(); + if (!isValid()) return false; +- nativeSendKeyEvent(mNativeImeAdapterAndroid, null, WebInputEventType.RawKeyDown, 0, ++ nativeSendKeyEvent(mNativeImeAdapterAndroid, null, WebInputEventType.kRawKeyDown, 0, + SystemClock.uptimeMillis(), COMPOSITION_KEY_CODE, 0, false, 0); + nativeDeleteSurroundingTextInCodePoints( + mNativeImeAdapterAndroid, beforeLength, afterLength); +- nativeSendKeyEvent(mNativeImeAdapterAndroid, null, WebInputEventType.KeyUp, 0, ++ nativeSendKeyEvent(mNativeImeAdapterAndroid, null, WebInputEventType.kKeyUp, 0, + SystemClock.uptimeMillis(), COMPOSITION_KEY_CODE, 0, false, 0); + return true; + } +diff --git a/content/public/android/java/src/org/chromium/content/browser/input/ImeUtils.java b/content/public/android/java/src/org/chromium/content/browser/input/ImeUtils.java +index 8d44066f49df..f6957c54f7bd 100644 +--- a/content/public/android/java/src/org/chromium/content/browser/input/ImeUtils.java ++++ b/content/public/android/java/src/org/chromium/content/browser/input/ImeUtils.java +@@ -41,7 +41,7 @@ public class ImeUtils { + outAttrs.inputType = + EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT; + +- if ((inputFlags & WebTextInputFlags.AutocompleteOff) != 0) { ++ if ((inputFlags & WebTextInputFlags.kAutocompleteOff) != 0) { + outAttrs.inputType |= EditorInfo.TYPE_TEXT_FLAG_NO_SUGGESTIONS; + } + +@@ -50,13 +50,13 @@ public class ImeUtils { + if (inputType == TextInputType.TEXT) { + // Normal text field + imeAction = EditorInfo.IME_ACTION_GO; +- if ((inputFlags & WebTextInputFlags.AutocorrectOff) == 0) { ++ if ((inputFlags & WebTextInputFlags.kAutocorrectOff) == 0) { + outAttrs.inputType |= EditorInfo.TYPE_TEXT_FLAG_AUTO_CORRECT; + } + } else if (inputType == TextInputType.TEXT_AREA + || inputType == TextInputType.CONTENT_EDITABLE) { + outAttrs.inputType |= EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE; +- if ((inputFlags & WebTextInputFlags.AutocorrectOff) == 0) { ++ if ((inputFlags & WebTextInputFlags.kAutocorrectOff) == 0) { + outAttrs.inputType |= EditorInfo.TYPE_TEXT_FLAG_AUTO_CORRECT; + } + imeAction = EditorInfo.IME_ACTION_NONE; +@@ -100,7 +100,7 @@ public class ImeUtils { + case WebTextInputMode.kKanaName: + case WebTextInputMode.kKataKana: + outAttrs.inputType |= EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE; +- if ((inputFlags & WebTextInputFlags.AutocorrectOff) == 0) { ++ if ((inputFlags & WebTextInputFlags.kAutocorrectOff) == 0) { + outAttrs.inputType |= EditorInfo.TYPE_TEXT_FLAG_AUTO_CORRECT; + } + imeAction = EditorInfo.IME_ACTION_NONE; +@@ -132,11 +132,11 @@ public class ImeUtils { + // type. This is not using AutocapitalizeNone because Android does not autocapitalize by + // default and there is no way to express no capitalization. + // Autocapitalize is meant as a hint to the virtual keyboard. +- if ((inputFlags & WebTextInputFlags.AutocapitalizeCharacters) != 0) { ++ if ((inputFlags & WebTextInputFlags.kAutocapitalizeCharacters) != 0) { + outAttrs.inputType |= InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS; +- } else if ((inputFlags & WebTextInputFlags.AutocapitalizeWords) != 0) { ++ } else if ((inputFlags & WebTextInputFlags.kAutocapitalizeWords) != 0) { + outAttrs.inputType |= InputType.TYPE_TEXT_FLAG_CAP_WORDS; +- } else if ((inputFlags & WebTextInputFlags.AutocapitalizeSentences) != 0) { ++ } else if ((inputFlags & WebTextInputFlags.kAutocapitalizeSentences) != 0) { + outAttrs.inputType |= InputType.TYPE_TEXT_FLAG_CAP_SENTENCES; + } + // Content editable doesn't use autocapitalize so we need to set it manually. +diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc +index b0b4185d8f1a..4b04fe960c61 100644 +--- a/content/renderer/renderer_blink_platform_impl.cc ++++ b/content/renderer/renderer_blink_platform_impl.cc +@@ -568,7 +568,8 @@ void RendererBlinkPlatformImpl::SandboxSupport::GetFallbackFontForCharacter( + return; + } + +- GetFallbackFontForCharacter(character, preferred_locale, fallbackFont); ++ content::GetFallbackFontForCharacter(character, preferred_locale, ++ fallbackFont); + unicode_font_families_.insert(std::make_pair(character, *fallbackFont)); + } + +diff --git a/mojo/public/cpp/bindings/lib/wtf_hash_util.h b/mojo/public/cpp/bindings/lib/wtf_hash_util.h +index 0125e8951016..d4cd505c713d 100644 +--- a/mojo/public/cpp/bindings/lib/wtf_hash_util.h ++++ b/mojo/public/cpp/bindings/lib/wtf_hash_util.h +@@ -59,10 +59,10 @@ size_t WTFHash(size_t seed, const T& value) { + + template <typename T> + struct StructPtrHashFn { +- static unsigned hash(const StructPtr<T>& value) { ++ static unsigned GetHash(const StructPtr<T>& value) { + return value.Hash(kHashSeed); + } +- static bool equal(const StructPtr<T>& left, const StructPtr<T>& right) { ++ static bool Equal(const StructPtr<T>& left, const StructPtr<T>& right) { + return left.Equals(right); + } + static const bool safe_to_compare_to_empty_or_deleted = false; +@@ -70,10 +70,10 @@ struct StructPtrHashFn { + + template <typename T> + struct InlinedStructPtrHashFn { +- static unsigned hash(const InlinedStructPtr<T>& value) { ++ static unsigned GetHash(const InlinedStructPtr<T>& value) { + return value.Hash(kHashSeed); + } +- static bool equal(const InlinedStructPtr<T>& left, ++ static bool Equal(const InlinedStructPtr<T>& left, + const InlinedStructPtr<T>& right) { + return left.Equals(right); + } +diff --git a/mojo/public/cpp/bindings/tests/wtf_hash_unittest.cc b/mojo/public/cpp/bindings/tests/wtf_hash_unittest.cc +index 959d25b36853..04f14b5cef7d 100644 +--- a/mojo/public/cpp/bindings/tests/wtf_hash_unittest.cc ++++ b/mojo/public/cpp/bindings/tests/wtf_hash_unittest.cc +@@ -37,21 +37,21 @@ TEST_F(WTFHashTest, Enum) { + // Just check that this template instantiation compiles. + + // Top-level. +- ASSERT_EQ(WTF::DefaultHash<blink::TopLevelEnum>::Hash().hash( ++ ASSERT_EQ(WTF::DefaultHash<blink::TopLevelEnum>::Hash().GetHash( + blink::TopLevelEnum::E0), +- WTF::DefaultHash<blink::TopLevelEnum>::Hash().hash( ++ WTF::DefaultHash<blink::TopLevelEnum>::Hash().GetHash( + blink::TopLevelEnum::E0)); + + // Nested in struct. +- ASSERT_EQ(WTF::DefaultHash<blink::TestWTFStruct::NestedEnum>::Hash().hash( ++ ASSERT_EQ(WTF::DefaultHash<blink::TestWTFStruct::NestedEnum>::Hash().GetHash( + blink::TestWTFStruct::NestedEnum::E0), +- WTF::DefaultHash<blink::TestWTFStruct::NestedEnum>::Hash().hash( ++ WTF::DefaultHash<blink::TestWTFStruct::NestedEnum>::Hash().GetHash( + blink::TestWTFStruct::NestedEnum::E0)); + + // Nested in interface. +- ASSERT_EQ(WTF::DefaultHash<blink::TestWTF::NestedEnum>::Hash().hash( ++ ASSERT_EQ(WTF::DefaultHash<blink::TestWTF::NestedEnum>::Hash().GetHash( + blink::TestWTF::NestedEnum::E0), +- WTF::DefaultHash<blink::TestWTF::NestedEnum>::Hash().hash( ++ WTF::DefaultHash<blink::TestWTF::NestedEnum>::Hash().GetHash( + blink::TestWTF::NestedEnum::E0)); + } + +diff --git a/mojo/public/tools/bindings/generators/cpp_templates/enum_macros.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/enum_macros.tmpl +index aecb32e10b5a..c334a52f9833 100644 +--- a/mojo/public/tools/bindings/generators/cpp_templates/enum_macros.tmpl ++++ b/mojo/public/tools/bindings/generators/cpp_templates/enum_macros.tmpl +@@ -94,14 +94,14 @@ struct hash<{{enum_name}}> + {%- set deleted_value_unused = "false" if empty_value in enum|all_enum_values else "true" %} + namespace WTF { + struct {{hash_fn_name}} { +- static unsigned hash(const {{enum_name}}& value) { ++ static unsigned GetHash(const {{enum_name}}& value) { + using utype = std::underlying_type<{{enum_name}}>::type; +- return DefaultHash<utype>::Hash().hash(static_cast<utype>(value)); ++ return DefaultHash<utype>::Hash().GetHash(static_cast<utype>(value)); + } +- static bool equal(const {{enum_name}}& left, const {{enum_name}}& right) { ++ static bool Equal(const {{enum_name}}& left, const {{enum_name}}& right) { + return left == right; + } +- static const bool safeToCompareToEmptyOrDeleted = true; ++ static const bool safe_to_compare_to_empty_or_deleted = true; + }; + + template <> +@@ -117,13 +117,13 @@ struct HashTraits<{{enum_name}}> + static_assert({{deleted_value_unused}}, + "{{deleted_value}} is a reserved enum value"); + static const bool hasIsEmptyValueFunction = true; +- static bool isEmptyValue(const {{enum_name}}& value) { ++ static bool IsEmptyValue(const {{enum_name}}& value) { + return value == static_cast<{{enum_name}}>({{empty_value}}); + } +- static void constructDeletedValue({{enum_name}}& slot, bool) { ++ static void ConstructDeletedValue({{enum_name}}& slot, bool) { + slot = static_cast<{{enum_name}}>({{deleted_value}}); + } +- static bool isDeletedValue(const {{enum_name}}& value) { ++ static bool IsDeletedValue(const {{enum_name}}& value) { + return value == static_cast<{{enum_name}}>({{deleted_value}}); + } + }; +diff --git a/third_party/WebKit/Source/BUILD.gn b/third_party/WebKit/Source/BUILD.gn +index 25832deae572..7edbabc456c8 100644 +--- a/third_party/WebKit/Source/BUILD.gn ++++ b/third_party/WebKit/Source/BUILD.gn +@@ -28,7 +28,7 @@ declare_args() { + # Set to true to have the clang Blink GC plugin use Chromium-style naming + # rather than legacy Blink name. + # TODO(https://crbug.com/675879): Remove this option after the Blink rename. +- blink_gc_plugin_option_use_chromium_style_naming = false ++ blink_gc_plugin_option_use_chromium_style_naming = true + } + + # features --------------------------------------------------------------------- +diff --git a/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp b/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp +index 2794c9c6b805..e135329d746a 100644 +--- a/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp ++++ b/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp +@@ -278,7 +278,7 @@ void DOMWrapperWorld::RegisterDOMObjectHolder(v8::Isolate* isolate, + DOMObjectHolder<T>::Create(isolate, object, wrapper)); + } + +-template void DOMWrapperWorld::registerDOMObjectHolder(v8::Isolate*, ++template void DOMWrapperWorld::RegisterDOMObjectHolder(v8::Isolate*, + ScriptFunction*, + v8::Local<v8::Value>); + +diff --git a/third_party/WebKit/Source/bindings/core/v8/Iterable.h b/third_party/WebKit/Source/bindings/core/v8/Iterable.h +index 02edb4b07616..ab0d76dd1030 100644 +--- a/third_party/WebKit/Source/bindings/core/v8/Iterable.h ++++ b/third_party/WebKit/Source/bindings/core/v8/Iterable.h +@@ -17,7 +17,7 @@ namespace blink { + template <typename KeyType, typename ValueType> + class Iterable { + public: +- Iterator* KeysForBinding(ScriptState* script_state, ++ Iterator* keysForBinding(ScriptState* script_state, + ExceptionState& exception_state) { + IterationSource* source = this->StartIteration(script_state, exception_state); + if (!source) +@@ -25,7 +25,7 @@ class Iterable { + return new IterableIterator<KeySelector>(source); + } + +- Iterator* ValuesForBinding(ScriptState* script_state, ++ Iterator* valuesForBinding(ScriptState* script_state, + ExceptionState& exception_state) { + IterationSource* source = this->StartIteration(script_state, exception_state); + if (!source) +@@ -33,7 +33,7 @@ class Iterable { + return new IterableIterator<ValueSelector>(source); + } + +- Iterator* EntriesForBinding(ScriptState* script_state, ++ Iterator* entriesForBinding(ScriptState* script_state, + ExceptionState& exception_state) { + IterationSource* source = this->StartIteration(script_state, exception_state); + if (!source) +@@ -41,7 +41,7 @@ class Iterable { + return new IterableIterator<EntrySelector>(source); + } + +- void ForEachForBinding(ScriptState* script_state, ++ void forEachForBinding(ScriptState* script_state, + const ScriptValue& this_value, + const ScriptValue& callback, + const ScriptValue& this_arg, +@@ -172,7 +172,7 @@ template <typename KeyType, typename ValueType> + class PairIterable : public Iterable<KeyType, ValueType> { + public: + Iterator* GetIterator(ScriptState* script_state, ExceptionState& exception_state) { +- return this->EntriesForBinding(script_state, exception_state); ++ return this->entriesForBinding(script_state, exception_state); + } + }; + +diff --git a/third_party/WebKit/Source/bindings/core/v8/Maplike.h b/third_party/WebKit/Source/bindings/core/v8/Maplike.h +index 7bbcd9160370..62f1d1ff21d9 100644 +--- a/third_party/WebKit/Source/bindings/core/v8/Maplike.h ++++ b/third_party/WebKit/Source/bindings/core/v8/Maplike.h +@@ -14,14 +14,14 @@ namespace blink { + template <typename KeyType, typename ValueType> + class Maplike : public PairIterable<KeyType, ValueType> { + public: +- bool HasForBinding(ScriptState* script_state, ++ bool hasForBinding(ScriptState* script_state, + const KeyType& key, + ExceptionState& exception_state) { + ValueType value; + return GetMapEntry(script_state, key, value, exception_state); + } + +- ScriptValue GetForBinding(ScriptState* script_state, ++ ScriptValue getForBinding(ScriptState* script_state, + const KeyType& key, + ExceptionState& exception_state) { + ValueType value; +diff --git a/third_party/WebKit/Source/bindings/core/v8/NativeValueTraitsImplTest.cpp b/third_party/WebKit/Source/bindings/core/v8/NativeValueTraitsImplTest.cpp +index bb7e95832076..33c07976b1cd 100644 +--- a/third_party/WebKit/Source/bindings/core/v8/NativeValueTraitsImplTest.cpp ++++ b/third_party/WebKit/Source/bindings/core/v8/NativeValueTraitsImplTest.cpp +@@ -27,7 +27,7 @@ TEST(NativeValueTraitsImplTest, IDLInterface) { + V8TestingScope scope; + { + DummyExceptionStateForTesting exception_state; +- Internals* internals = NativeValueTraits<Internals>::nativeValue( ++ Internals* internals = NativeValueTraits<Internals>::NativeValue( + scope.GetIsolate(), v8::Number::New(scope.GetIsolate(), 42), exception_state); + EXPECT_TRUE(exception_state.HadException()); + EXPECT_EQ("Unable to convert value to Internals.", +@@ -37,7 +37,7 @@ TEST(NativeValueTraitsImplTest, IDLInterface) { + { + DummyExceptionStateForTesting exception_state; + TestSequenceCallback* callback_function = +- NativeValueTraits<TestSequenceCallback>::nativeValue( ++ NativeValueTraits<TestSequenceCallback>::NativeValue( + scope.GetIsolate(), v8::Undefined(scope.GetIsolate()), exception_state); + EXPECT_TRUE(exception_state.HadException()); + EXPECT_EQ("Unable to convert value to TestSequenceCallback.", +diff --git a/third_party/WebKit/Source/bindings/core/v8/V8StringResource.cpp b/third_party/WebKit/Source/bindings/core/v8/V8StringResource.cpp +index e5348575de05..ec5b68f1870a 100644 +--- a/third_party/WebKit/Source/bindings/core/v8/V8StringResource.cpp ++++ b/third_party/WebKit/Source/bindings/core/v8/V8StringResource.cpp +@@ -148,9 +148,9 @@ StringType V8StringToWebCoreString(v8::Local<v8::String> v8_string, + // Explicitly instantiate the above template with the expected + // parameterizations, to ensure the compiler generates the code; otherwise link + // errors can result in GCC 4.4. +-template String v8StringToWebCoreString<String>(v8::Local<v8::String>, ++template String V8StringToWebCoreString<String>(v8::Local<v8::String>, + ExternalMode); +-template AtomicString v8StringToWebCoreString<AtomicString>( ++template AtomicString V8StringToWebCoreString<AtomicString>( + v8::Local<v8::String>, + ExternalMode); + +diff --git a/third_party/WebKit/Source/bindings/core/v8/V8V0CustomElementLifecycleCallbacks.cpp b/third_party/WebKit/Source/bindings/core/v8/V8V0CustomElementLifecycleCallbacks.cpp +index 70d45aba5db4..0620f20e2d72 100644 +--- a/third_party/WebKit/Source/bindings/core/v8/V8V0CustomElementLifecycleCallbacks.cpp ++++ b/third_party/WebKit/Source/bindings/core/v8/V8V0CustomElementLifecycleCallbacks.cpp +@@ -113,9 +113,9 @@ V8V0CustomElementLifecycleCallbacks::V8V0CustomElementLifecycleCallbacks( + attribute_changed_(script_state->GetIsolate(), attribute_changed) { + prototype_.SetPhantom(); + +-#define MAKE_WEAK(Var, _) \ +- if (!m_##Var.IsEmpty()) \ +- m_##Var.SetPhantom(); ++#define MAKE_WEAK(Var, Ignored) \ ++ if (!Var##_.IsEmpty()) \ ++ Var##_.SetPhantom(); + + CALLBACK_LIST(MAKE_WEAK) + #undef MAKE_WEAK +diff --git a/third_party/WebKit/Source/bindings/core/v8/WrapperTypeInfo.cpp b/third_party/WebKit/Source/bindings/core/v8/WrapperTypeInfo.cpp +index 805cc73ce41a..8d755cc37182 100644 +--- a/third_party/WebKit/Source/bindings/core/v8/WrapperTypeInfo.cpp ++++ b/third_party/WebKit/Source/bindings/core/v8/WrapperTypeInfo.cpp +@@ -6,7 +6,7 @@ + + namespace blink { + +-static_assert(offsetof(struct WrapperTypeInfo, ginEmbedder) == ++static_assert(offsetof(struct WrapperTypeInfo, gin_embedder) == + offsetof(struct gin::WrapperInfo, embedder), + "offset of WrapperTypeInfo.ginEmbedder must be the same as " + "gin::WrapperInfo.embedder"); +diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp +index c9a5c5213ec4..353883b7e95d 100644 +--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp ++++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp +@@ -46,7 +46,7 @@ template <typename ElementType> + void GetScriptableObjectProperty( + const AtomicString& name, + const v8::PropertyCallbackInfo<v8::Value>& info) { +- HTMLPlugInElement* impl = ElementType::ToImpl(info.Holder()); ++ HTMLPlugInElement* impl = ElementType::toImpl(info.Holder()); + RefPtr<SharedPersistent<v8::Object>> wrapper = impl->PluginWrapper(); + if (!wrapper) + return; +@@ -75,7 +75,7 @@ void SetScriptableObjectProperty( + const v8::PropertyCallbackInfo<v8::Value>& info) { + ASSERT(!value.IsEmpty()); + +- HTMLPlugInElement* impl = ElementType::ToImpl(info.Holder()); ++ HTMLPlugInElement* impl = ElementType::toImpl(info.Holder()); + RefPtr<SharedPersistent<v8::Object>> wrapper = impl->PluginWrapper(); + if (!wrapper) + return; +diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8PerformanceObserverCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8PerformanceObserverCustom.cpp +index cf6e7736f300..ed610fbdf46a 100644 +--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8PerformanceObserverCustom.cpp ++++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8PerformanceObserverCustom.cpp +@@ -53,7 +53,7 @@ void V8PerformanceObserver::constructorCustom( + ScriptState* script_state = ScriptState::ForReceiverObject(info); + v8::Local<v8::Function> v8_callback = v8::Local<v8::Function>::Cast(info[0]); + PerformanceObserverCallback* callback = +- PerformanceObserverCallback::create(script_state, v8_callback); ++ PerformanceObserverCallback::Create(script_state, v8_callback); + + PerformanceObserver* observer = PerformanceObserver::Create( + CurrentExecutionContext(isolate), performance, callback); +diff --git a/third_party/WebKit/Source/bindings/modules/v8/DictionaryHelperForModules.cpp b/third_party/WebKit/Source/bindings/modules/v8/DictionaryHelperForModules.cpp +index 5ea221df963e..a183941442b4 100644 +--- a/third_party/WebKit/Source/bindings/modules/v8/DictionaryHelperForModules.cpp ++++ b/third_party/WebKit/Source/bindings/modules/v8/DictionaryHelperForModules.cpp +@@ -29,10 +29,10 @@ + + namespace blink { + +-template bool DictionaryHelper::get(const Dictionary&, ++template bool DictionaryHelper::Get(const Dictionary&, + const StringView& key, + Member<Headers>& value); +-template bool DictionaryHelper::get(const Dictionary&, ++template bool DictionaryHelper::Get(const Dictionary&, + const StringView& key, + Member<PasswordCredential>& value); + +diff --git a/third_party/WebKit/Source/bindings/modules/v8/V8ServiceWorkerMessageEventInternal.h b/third_party/WebKit/Source/bindings/modules/v8/V8ServiceWorkerMessageEventInternal.h +index 5ee1b78459f2..64caee6b9bbc 100644 +--- a/third_party/WebKit/Source/bindings/modules/v8/V8ServiceWorkerMessageEventInternal.h ++++ b/third_party/WebKit/Source/bindings/modules/v8/V8ServiceWorkerMessageEventInternal.h +@@ -58,8 +58,8 @@ void V8ServiceWorkerMessageEventInternal::ConstructorCustom( + + // TODO(bashi): Workaround for http://crbug.com/529941. We need to store + // |data| as a private value to avoid cyclic references. +- if (event_init_dict.HasData()) { +- v8::Local<v8::Value> v8_data = event_init_dict.Data().V8Value(); ++ if (event_init_dict.hasData()) { ++ v8::Local<v8::Value> v8_data = event_init_dict.data().V8Value(); + V8PrivateProperty::GetMessageEventCachedData(isolate).Set(wrapper, v8_data); + if (DOMWrapperWorld::Current(isolate).IsIsolatedWorld()) { + impl->SetSerializedData( +@@ -85,7 +85,7 @@ void V8ServiceWorkerMessageEventInternal::DataAttributeGetterCustom( + + v8::Local<v8::Value> data; + if (SerializedScriptValue* serialized_value = event->SerializedData()) { +- MessagePortArray ports = event->Ports(); ++ MessagePortArray ports = event->ports(); + SerializedScriptValue::DeserializeOptions options; + options.message_ports = &ports; + data = serialized_value->Deserialize(isolate, options); +diff --git a/third_party/WebKit/Source/bindings/modules/v8/custom/V8IDBObserverCustom.cpp b/third_party/WebKit/Source/bindings/modules/v8/custom/V8IDBObserverCustom.cpp +index 129b2ee75f1b..259c13851f9b 100644 +--- a/third_party/WebKit/Source/bindings/modules/v8/custom/V8IDBObserverCustom.cpp ++++ b/third_party/WebKit/Source/bindings/modules/v8/custom/V8IDBObserverCustom.cpp +@@ -45,7 +45,7 @@ void V8IDBObserver::constructorCustom( + ScriptState* script_state = ScriptState::ForReceiverObject(info); + v8::Local<v8::Function> v8_callback = v8::Local<v8::Function>::Cast(info[0]); + IDBObserverCallback* callback = +- IDBObserverCallback::create(script_state, v8_callback); ++ IDBObserverCallback::Create(script_state, v8_callback); + IDBObserver* observer = IDBObserver::Create(callback); + if (exception_state.HadException()) + return; +diff --git a/third_party/WebKit/Source/bindings/scripts/generate_init_partial_interfaces.py b/third_party/WebKit/Source/bindings/scripts/generate_init_partial_interfaces.py +index ab5bbe6336fe..fd548e39bac1 100755 +--- a/third_party/WebKit/Source/bindings/scripts/generate_init_partial_interfaces.py ++++ b/third_party/WebKit/Source/bindings/scripts/generate_init_partial_interfaces.py +@@ -29,7 +29,7 @@ _INIT_PARTIAL_INTERFACE = """%s + + namespace blink { + +-void initPartialInterfacesInModules() { ++void InitPartialInterfacesInModules() { + %s + } + +diff --git a/third_party/WebKit/Source/bindings/scripts/idl_definitions.py b/third_party/WebKit/Source/bindings/scripts/idl_definitions.py +index c8b592fba81f..16824c5c7ae4 100644 +--- a/third_party/WebKit/Source/bindings/scripts/idl_definitions.py ++++ b/third_party/WebKit/Source/bindings/scripts/idl_definitions.py +@@ -528,7 +528,7 @@ class IdlLiteral(object): + if self.value: + return '"%s"' % self.value + else: +- return 'WTF::emptyString' ++ return 'WTF::g_empty_string' + if self.idl_type == 'integer': + return '%d' % self.value + if self.idl_type == 'float': +diff --git a/third_party/WebKit/Source/bindings/scripts/v8_attributes.py b/third_party/WebKit/Source/bindings/scripts/v8_attributes.py +index da3f3371db5b..e3eb374a3031 100644 +--- a/third_party/WebKit/Source/bindings/scripts/v8_attributes.py ++++ b/third_party/WebKit/Source/bindings/scripts/v8_attributes.py +@@ -281,7 +281,7 @@ def getter_context(interface, attribute, context): + + def v8_set_return_value_statement(for_main_world=False): + if context['is_keep_alive_for_gc'] or 'CachedAttribute' in extended_attributes: +- return 'v8SetReturnValue(info, v8Value)' ++ return 'V8SetReturnValue(info, v8Value)' + return idl_type.v8_set_return_value( + cpp_value, extended_attributes=extended_attributes, script_wrappable='impl', + for_main_world=for_main_world, is_static=attribute.is_static) +@@ -319,14 +319,14 @@ def getter_expression(interface, attribute, context): + # Needed to handle getter expressions returning Type& as the + # use site for |expression| expects Type*. + if attribute.idl_type.is_interface_type and len(arguments) == 0: +- return 'WTF::getPtr(%s)' % expression ++ return 'WTF::GetPtr(%s)' % expression + return expression + + + CONTENT_ATTRIBUTE_GETTER_NAMES = { +- 'boolean': 'fastHasAttribute', +- 'long': 'getIntegralAttribute', +- 'unsigned long': 'getUnsignedIntegralAttribute', ++ 'boolean': 'FastHasAttribute', ++ 'long': 'GetIntegralAttribute', ++ 'unsigned long': 'GetUnsignedIntegralAttribute', + } + + +@@ -339,7 +339,7 @@ def getter_base_name(interface, attribute, arguments): + content_attribute_name = extended_attributes['Reflect'] or attribute.name.lower() + if content_attribute_name in ['class', 'id', 'name']: + # Special-case for performance optimization. +- return 'get%sAttribute' % content_attribute_name.capitalize() ++ return 'Get%sAttribute' % content_attribute_name.capitalize() + + arguments.append(scoped_content_attribute_name(interface, attribute)) + +@@ -347,8 +347,8 @@ def getter_base_name(interface, attribute, arguments): + if base_idl_type in CONTENT_ATTRIBUTE_GETTER_NAMES: + return CONTENT_ATTRIBUTE_GETTER_NAMES[base_idl_type] + if 'URL' in attribute.extended_attributes: +- return 'getURLAttribute' +- return 'fastGetAttribute' ++ return 'GetURLAttribute' ++ return 'FastGetAttribute' + + + def is_keep_alive_for_gc(interface, attribute): +@@ -394,7 +394,9 @@ def setter_context(interface, attribute, interfaces, context): + (target_attribute_name, target_interface_name)) + + if ('Replaceable' in attribute.extended_attributes): +- context['cpp_setter'] = 'v8CallBoolean(info.Holder()->CreateDataProperty(info.GetIsolate()->GetCurrentContext(), propertyName, v8Value))' ++ context['cpp_setter'] = ( ++ 'V8CallBoolean(info.Holder()->CreateDataProperty(' + ++ 'info.GetIsolate()->GetCurrentContext(), propertyName, v8Value))') + return + + extended_attributes = attribute.extended_attributes +@@ -449,13 +451,13 @@ def setter_expression(interface, attribute, context): + attribute.name == 'onerror'): + includes.add('bindings/core/v8/V8ErrorHandler.h') + arguments.append( +- 'V8EventListenerHelper::ensureEventListener<V8ErrorHandler>(' + +- 'v8Value, true, ScriptState::forReceiverObject(info))') ++ 'V8EventListenerHelper::EnsureEventListener<V8ErrorHandler>(' + ++ 'v8Value, true, ScriptState::ForReceiverObject(info))') + else: + arguments.append( +- 'V8EventListenerHelper::getEventListener(' + +- 'ScriptState::forReceiverObject(info), v8Value, true, ' + +- 'ListenerFindOrCreate)') ++ 'V8EventListenerHelper::GetEventListener(' + ++ 'ScriptState::ForReceiverObject(info), v8Value, true, ' + ++ 'kListenerFindOrCreate)') + else: + arguments.append('cppValue') + if context['is_setter_raises_exception']: +@@ -465,9 +467,9 @@ def setter_expression(interface, attribute, context): + + + CONTENT_ATTRIBUTE_SETTER_NAMES = { +- 'boolean': 'setBooleanAttribute', +- 'long': 'setIntegralAttribute', +- 'unsigned long': 'setUnsignedIntegralAttribute', ++ 'boolean': 'SetBooleanAttribute', ++ 'long': 'SetIntegralAttribute', ++ 'unsigned long': 'SetUnsignedIntegralAttribute', + } + + +diff --git a/third_party/WebKit/Source/bindings/scripts/v8_callback_function.py b/third_party/WebKit/Source/bindings/scripts/v8_callback_function.py +index 37be007b8e64..b1589544c0f6 100644 +--- a/third_party/WebKit/Source/bindings/scripts/v8_callback_function.py ++++ b/third_party/WebKit/Source/bindings/scripts/v8_callback_function.py +@@ -57,7 +57,7 @@ def callback_function_context(callback_function): + 'return_value': idl_type.v8_value_to_local_cpp_value( + callback_function.extended_attributes, + 'v8ReturnValue', 'cppValue', +- isolate='m_scriptState->isolate()', ++ isolate='m_scriptState->GetIsolate()', + bailout_return_value='false'), + }) + +@@ -70,8 +70,8 @@ def arguments_context(arguments, return_cpp_type): + return { + 'argument_name': '%sArgument' % argument.name, + 'cpp_value_to_v8_value': argument.idl_type.cpp_value_to_v8_value( +- argument.name, isolate='m_scriptState->isolate()', +- creation_context='m_scriptState->context()->Global()'), ++ argument.name, isolate='m_scriptState->GetIsolate()', ++ creation_context='m_scriptState->GetContext()->Global()'), + } + + argument_declarations = [ +diff --git a/third_party/WebKit/Source/bindings/scripts/v8_callback_interface.py b/third_party/WebKit/Source/bindings/scripts/v8_callback_interface.py +index 524972196b19..a3f97e73a56f 100644 +--- a/third_party/WebKit/Source/bindings/scripts/v8_callback_interface.py ++++ b/third_party/WebKit/Source/bindings/scripts/v8_callback_interface.py +@@ -116,8 +116,8 @@ def arguments_context(arguments, call_with_this_handle): + return { + 'handle': '%sHandle' % argument.name, + 'cpp_value_to_v8_value': argument.idl_type.cpp_value_to_v8_value( +- argument.name, isolate='m_scriptState->isolate()', +- creation_context='m_scriptState->context()->Global()'), ++ argument.name, isolate='m_scriptState->GetIsolate()', ++ creation_context='m_scriptState->GetContext()->Global()'), + } + + argument_declarations = ['ScriptValue thisValue'] if call_with_this_handle else [] +diff --git a/third_party/WebKit/Source/bindings/scripts/v8_dictionary.py b/third_party/WebKit/Source/bindings/scripts/v8_dictionary.py +index 14af42f00089..66fd18f16b8a 100644 +--- a/third_party/WebKit/Source/bindings/scripts/v8_dictionary.py ++++ b/third_party/WebKit/Source/bindings/scripts/v8_dictionary.py +@@ -209,12 +209,14 @@ def member_impl_context(member, interfaces_info, header_includes, + def has_method_expression(): + if nullable_indicator_name: + return nullable_indicator_name +- elif idl_type.is_enum or idl_type.is_string_type or idl_type.is_union_type: ++ elif idl_type.is_union_type: + return '!m_%s.isNull()' % cpp_name ++ elif idl_type.is_enum or idl_type.is_string_type: ++ return '!m_%s.IsNull()' % cpp_name + elif idl_type.name in ['Any', 'Object']: +- return '!(m_{0}.isEmpty() || m_{0}.isNull() || m_{0}.isUndefined())'.format(cpp_name) ++ return '!(m_{0}.IsEmpty() || m_{0}.IsNull() || m_{0}.IsUndefined())'.format(cpp_name) + elif idl_type.name == 'Dictionary': +- return '!m_%s.isUndefinedOrNull()' % cpp_name ++ return '!m_%s.IsUndefinedOrNull()' % cpp_name + else: + return 'm_%s' % cpp_name + +diff --git a/third_party/WebKit/Source/bindings/scripts/v8_interface.py b/third_party/WebKit/Source/bindings/scripts/v8_interface.py +index 623d03d975e0..ec4dfe7974b1 100644 +--- a/third_party/WebKit/Source/bindings/scripts/v8_interface.py ++++ b/third_party/WebKit/Source/bindings/scripts/v8_interface.py +@@ -214,7 +214,7 @@ def interface_context(interface, interfaces): + # as in the WebIDL spec? + is_immutable_prototype = is_global or 'ImmutablePrototype' in extended_attributes + +- wrapper_class_id = ('NodeClassId' if inherits_interface(interface.name, 'Node') else 'ObjectClassId') ++ wrapper_class_id = ('kNodeClassId' if inherits_interface(interface.name, 'Node') else 'kObjectClassId') + + # [ActiveScriptWrappable] must be accompanied with [DependentLifetime]. + if active_scriptwrappable and not is_dependent_lifetime: +@@ -250,7 +250,7 @@ def interface_context(interface, interfaces): + 'is_node': inherits_interface(interface.name, 'Node'), + 'is_partial': interface.is_partial, + 'is_typed_array_type': is_typed_array_type, +- 'lifetime': 'Dependent' if is_dependent_lifetime else 'Independent', ++ 'lifetime': 'kDependent' if is_dependent_lifetime else 'kIndependent', + 'measure_as': v8_utilities.measure_as(interface, None), # [MeasureAs] + 'needs_runtime_enabled_installer': needs_runtime_enabled_installer, + 'origin_trial_enabled_function': v8_utilities.origin_trial_enabled_function_name(interface), +@@ -551,7 +551,7 @@ def methods_context(interface): + implemented_as=implemented_as) + + if not interface.has_indexed_elements: +- iterator_method = generated_iterator_method('iterator', implemented_as='iterator') ++ iterator_method = generated_iterator_method('iterator', implemented_as='GetIterator') + + if interface.iterable or interface.maplike or interface.setlike: + non_overridable_methods = [] +@@ -1037,7 +1037,7 @@ def resolution_tests_methods(effective_overloads): + try: + method = next(method for idl_type, method in idl_types_methods + if idl_type.is_nullable) +- test = 'isUndefinedOrNull(%s)' % cpp_value ++ test = 'IsUndefinedOrNull(%s)' % cpp_value + yield test, method + except StopIteration: + pass +@@ -1286,11 +1286,11 @@ def property_getter(getter, cpp_arguments): + if idl_type.use_output_parameter_for_result: + return 'result.isNull()' + if idl_type.is_string_type: +- return 'result.isNull()' ++ return 'result.IsNull()' + if idl_type.is_interface_type: + return '!result' + if idl_type.base_type in ('any', 'object'): +- return 'result.isEmpty()' ++ return 'result.IsEmpty()' + return '' + + extended_attributes = getter.extended_attributes +diff --git a/third_party/WebKit/Source/bindings/scripts/v8_methods.py b/third_party/WebKit/Source/bindings/scripts/v8_methods.py +index 81263b8df8ab..97f74ac844e0 100644 +--- a/third_party/WebKit/Source/bindings/scripts/v8_methods.py ++++ b/third_party/WebKit/Source/bindings/scripts/v8_methods.py +@@ -322,9 +322,9 @@ def cpp_value(interface, method, number_of_arguments): + cpp_arguments.append('result') + + if method.name == 'Constructor': +- base_name = 'create' ++ base_name = 'Create' + elif method.name == 'NamedConstructor': +- base_name = 'createForJSConstructor' ++ base_name = 'CreateForJSConstructor' + else: + base_name = v8_utilities.cpp_name(method) + +@@ -343,7 +343,7 @@ def v8_set_return_value(interface_name, method, cpp_value, for_main_world=False) + if use_local_result(method): + if idl_type.is_explicit_nullable: + # result is of type Nullable<T> +- cpp_value = 'result.get()' ++ cpp_value = 'result.Get()' + else: + cpp_value = 'result' + +@@ -362,8 +362,8 @@ def v8_value_to_local_cpp_variadic_value(method, argument, index, return_promise + vector_type = 'Vector' + + return { +- 'assign_expression': 'toImplArguments<%s<%s>>(info, %s, exceptionState)' % (vector_type, this_cpp_type, index), +- 'check_expression': 'exceptionState.hadException()', ++ 'assign_expression': 'ToImplArguments<%s<%s>>(info, %s, exceptionState)' % (vector_type, this_cpp_type, index), ++ 'check_expression': 'exceptionState.HadException()', + 'cpp_type': this_cpp_type, + 'cpp_name': argument.name, + 'declare_variable': False, +diff --git a/third_party/WebKit/Source/bindings/scripts/v8_types.py b/third_party/WebKit/Source/bindings/scripts/v8_types.py +index 8bbe2763d317..6c14c4bbfa97 100644 +--- a/third_party/WebKit/Source/bindings/scripts/v8_types.py ++++ b/third_party/WebKit/Source/bindings/scripts/v8_types.py +@@ -149,11 +149,11 @@ def cpp_type(idl_type, extended_attributes=None, raw_type=False, used_as_rvalue_ + """ + def string_mode(): + if idl_type.is_nullable: +- return 'TreatNullAndUndefinedAsNullString' ++ return 'kTreatNullAndUndefinedAsNullString' + if extended_attributes.get('TreatNullAs') == 'EmptyString': +- return 'TreatNullAsEmptyString' ++ return 'kTreatNullAsEmptyString' + if extended_attributes.get('TreatNullAs') == 'NullString': +- return 'TreatNullAsNullString' ++ return 'kTreatNullAsNullString' + return '' + + extended_attributes = extended_attributes or {} +@@ -506,12 +506,12 @@ V8_VALUE_TO_CPP_VALUE = { + # Basic + 'DOMString': '{v8_value}', + # Interface types +- 'FlexibleArrayBufferView': 'toFlexibleArrayBufferView({isolate}, {v8_value}, {variable_name}, allocateFlexibleArrayBufferViewStorage({v8_value}))', +- 'NodeFilter': 'toNodeFilter({v8_value}, info.Holder(), ScriptState::current({isolate}))', +- 'Promise': 'ScriptPromise::cast(ScriptState::current({isolate}), {v8_value})', +- 'ScriptValue': 'ScriptValue(ScriptState::current({isolate}), {v8_value})', +- 'Window': 'toDOMWindow({isolate}, {v8_value})', +- 'XPathNSResolver': 'toXPathNSResolver(ScriptState::current({isolate}), {v8_value})', ++ 'FlexibleArrayBufferView': 'ToFlexibleArrayBufferView({isolate}, {v8_value}, {variable_name}, allocateFlexibleArrayBufferViewStorage({v8_value}))', ++ 'NodeFilter': 'ToNodeFilter({v8_value}, info.Holder(), ScriptState::Current({isolate}))', ++ 'Promise': 'ScriptPromise::Cast(ScriptState::Current({isolate}), {v8_value})', ++ 'ScriptValue': 'ScriptValue(ScriptState::Current({isolate}), {v8_value})', ++ 'Window': 'ToDOMWindow({isolate}, {v8_value})', ++ 'XPathNSResolver': 'ToXPathNSResolver(ScriptState::Current({isolate}), {v8_value})', + } + + +@@ -584,11 +584,11 @@ def v8_value_to_cpp_value(idl_type, extended_attributes, v8_value, variable_name + base_idl_type = 'FlexibleArrayBufferView' + + if idl_type.is_integer_type: +- configuration = 'NormalConversion' ++ configuration = 'kNormalConversion' + if 'EnforceRange' in extended_attributes: +- configuration = 'EnforceRange' ++ configuration = 'kEnforceRange' + elif 'Clamp' in extended_attributes: +- configuration = 'Clamp' ++ configuration = 'kClamp' + arguments = ', '.join([v8_value, 'exceptionState', configuration]) + elif idl_type.v8_conversion_needs_exception_state: + arguments = ', '.join([v8_value, 'exceptionState']) +@@ -602,19 +602,20 @@ def v8_value_to_cpp_value(idl_type, extended_attributes, v8_value, variable_name + '{v8_value}->Is{idl_type}() ? ' + 'V8{idl_type}::toImpl(v8::Local<v8::{idl_type}>::Cast({v8_value})) : 0') + elif idl_type.is_union_type: +- nullable = 'UnionTypeConversionMode::Nullable' if idl_type.includes_nullable_type else 'UnionTypeConversionMode::NotNullable' ++ nullable = 'UnionTypeConversionMode::kNullable' if idl_type.includes_nullable_type \ ++ else 'UnionTypeConversionMode::kNotNullable' + cpp_expression_format = 'V8{idl_type}::toImpl({isolate}, {v8_value}, {variable_name}, %s, exceptionState)' % nullable + elif idl_type.use_output_parameter_for_result: + cpp_expression_format = 'V8{idl_type}::toImpl({isolate}, {v8_value}, {variable_name}, exceptionState)' + elif idl_type.is_callback_function: + cpp_expression_format = ( +- '{idl_type}::create(ScriptState::current({isolate}), {v8_value})') ++ '{idl_type}::Create(ScriptState::Current({isolate}), {v8_value})') + elif idl_type.v8_conversion_needs_exception_state: + # Effectively, this if branch means everything with v8_conversion_needs_exception_state == True + # except for unions, sequences and dictionary interfaces. + base_idl_type = native_value_traits_type_name(idl_type) + cpp_expression_format = ( +- 'NativeValueTraits<{idl_type}>::nativeValue({isolate}, {arguments})') ++ 'NativeValueTraits<{idl_type}>::NativeValue({isolate}, {arguments})') + else: + cpp_expression_format = ( + 'V8{idl_type}::toImplWithTypeCheck({isolate}, {v8_value})') +@@ -632,7 +633,7 @@ def v8_value_to_cpp_value_array_or_sequence(native_array_element_type, v8_value, + if (native_array_element_type.is_interface_type and + native_array_element_type.name != 'Dictionary'): + this_cpp_type = None +- expression_format = 'toMemberNativeArray<{native_array_element_type}>({v8_value}, {index}, {isolate}, exceptionState)' ++ expression_format = 'ToMemberNativeArray<{native_array_element_type}>({v8_value}, {index}, {isolate}, exceptionState)' + else: + this_cpp_type = native_array_element_type.cpp_type + if native_array_element_type.is_dictionary or native_array_element_type.is_union_type: +@@ -641,11 +642,11 @@ def v8_value_to_cpp_value_array_or_sequence(native_array_element_type, v8_value, + vector_type = 'Vector' + if native_array_element_type.is_primitive_type: + value_type = native_value_traits_type_name(native_array_element_type) +- expression_format = ('toImplArray<%s<{cpp_type}>, %s>' ++ expression_format = ('ToImplArray<%s<{cpp_type}>, %s>' + '({v8_value}, {index}, {isolate}, ' + 'exceptionState)' % (vector_type, value_type)) + else: +- expression_format = ('toImplArray<%s<{cpp_type}>>' ++ expression_format = ('ToImplArray<%s<{cpp_type}>>' + '({v8_value}, {index}, {isolate}, ' + 'exceptionState)' % vector_type) + +@@ -677,7 +678,7 @@ def v8_value_to_local_cpp_value(idl_type, extended_attributes, v8_value, variabl + if idl_type.is_string_type or idl_type.v8_conversion_needs_exception_state: + # Types for which conversion can fail and that need error handling. + +- check_expression = 'exceptionState.hadException()' ++ check_expression = 'exceptionState.HadException()' + + if idl_type.is_dictionary or idl_type.is_union_type: + set_expression = cpp_value +@@ -689,9 +690,9 @@ def v8_value_to_local_cpp_value(idl_type, extended_attributes, v8_value, variabl + # as the condition here would be wrong. + if not idl_type.v8_conversion_needs_exception_state: + if use_exception_state: +- check_expression = '!%s.prepare(exceptionState)' % variable_name ++ check_expression = '!%s.Prepare(exceptionState)' % variable_name + else: +- check_expression = '!%s.prepare()' % variable_name ++ check_expression = '!%s.Prepare()' % variable_name + elif not idl_type.v8_conversion_is_trivial and not idl_type.is_callback_function: + return { + 'error_message': 'no V8 -> C++ conversion for IDL type: %s' % idl_type.name +@@ -767,8 +768,8 @@ def preprocess_idl_type_and_value(idl_type, cpp_value, extended_attributes): + extended_attributes = extended_attributes or {} + if ('Reflect' in extended_attributes and + idl_type.base_type in ['unsigned long', 'unsigned short']): +- cpp_value = cpp_value.replace('getUnsignedIntegralAttribute', +- 'getIntegralAttribute') ++ cpp_value = cpp_value.replace('GetUnsignedIntegralAttribute', ++ 'GetIntegralAttribute') + cpp_value = 'std::max(0, static_cast<int>(%s))' % cpp_value + return idl_type, cpp_value + +@@ -777,7 +778,7 @@ def v8_conversion_type(idl_type, extended_attributes): + """Returns V8 conversion type, adding any additional includes. + + The V8 conversion type is used to select the C++ -> V8 conversion function +- or v8SetReturnValue* function; it can be an idl_type, a cpp_type, or a ++ or V8SetReturnValue* function; it can be an idl_type, a cpp_type, or a + separate name for the type of conversion (e.g., 'DOMWrapper'). + """ + extended_attributes = extended_attributes or {} +@@ -815,7 +816,7 @@ def v8_conversion_type(idl_type, extended_attributes): + return 'Dictionary' + + # Data type with potential additional includes +- if base_idl_type in V8_SET_RETURN_VALUE: # Special v8SetReturnValue treatment ++ if base_idl_type in V8_SET_RETURN_VALUE: # Special V8SetReturnValue treatment + return base_idl_type + + # Pointer type +@@ -825,40 +826,40 @@ IdlTypeBase.v8_conversion_type = v8_conversion_type + + + V8_SET_RETURN_VALUE = { +- 'boolean': 'v8SetReturnValueBool(info, {cpp_value})', +- 'DOMString': 'v8SetReturnValueString(info, {cpp_value}, info.GetIsolate())', +- 'ByteString': 'v8SetReturnValueString(info, {cpp_value}, info.GetIsolate())', +- 'USVString': 'v8SetReturnValueString(info, {cpp_value}, info.GetIsolate())', +- 'StringOrNull': 'v8SetReturnValueStringOrNull(info, {cpp_value}, info.GetIsolate())', ++ 'boolean': 'V8SetReturnValueBool(info, {cpp_value})', ++ 'DOMString': 'V8SetReturnValueString(info, {cpp_value}, info.GetIsolate())', ++ 'ByteString': 'V8SetReturnValueString(info, {cpp_value}, info.GetIsolate())', ++ 'USVString': 'V8SetReturnValueString(info, {cpp_value}, info.GetIsolate())', ++ 'StringOrNull': 'V8SetReturnValueStringOrNull(info, {cpp_value}, info.GetIsolate())', + 'void': '', +- # All the int types below are converted to (u)int32_t in the v8SetReturnValue{Int,Unsigned}() calls. ++ # All the int types below are converted to (u)int32_t in the V8SetReturnValue{Int,Unsigned}() calls. + # The 64-bit int types have already been converted to double when V8_SET_RETURN_VALUE is used, so they are not + # listed here. +- 'int8_t': 'v8SetReturnValueInt(info, {cpp_value})', +- 'int16_t': 'v8SetReturnValueInt(info, {cpp_value})', +- 'int32_t': 'v8SetReturnValueInt(info, {cpp_value})', +- 'uint8_t': 'v8SetReturnValueUnsigned(info, {cpp_value})', +- 'uint16_t': 'v8SetReturnValueUnsigned(info, {cpp_value})', +- 'uint32_t': 'v8SetReturnValueUnsigned(info, {cpp_value})', +- # No special v8SetReturnValue* function (set value directly) +- 'float': 'v8SetReturnValue(info, {cpp_value})', +- 'unrestricted float': 'v8SetReturnValue(info, {cpp_value})', +- 'double': 'v8SetReturnValue(info, {cpp_value})', +- 'unrestricted double': 'v8SetReturnValue(info, {cpp_value})', +- # No special v8SetReturnValue* function, but instead convert value to V8 +- # and then use general v8SetReturnValue. +- 'array': 'v8SetReturnValue(info, {cpp_value})', +- 'FrozenArray': 'v8SetReturnValue(info, {cpp_value})', +- 'Date': 'v8SetReturnValue(info, {cpp_value})', +- 'EventHandler': 'v8SetReturnValue(info, {cpp_value})', +- 'ScriptValue': 'v8SetReturnValue(info, {cpp_value})', +- 'SerializedScriptValue': 'v8SetReturnValue(info, {cpp_value})', ++ 'int8_t': 'V8SetReturnValueInt(info, {cpp_value})', ++ 'int16_t': 'V8SetReturnValueInt(info, {cpp_value})', ++ 'int32_t': 'V8SetReturnValueInt(info, {cpp_value})', ++ 'uint8_t': 'V8SetReturnValueUnsigned(info, {cpp_value})', ++ 'uint16_t': 'V8SetReturnValueUnsigned(info, {cpp_value})', ++ 'uint32_t': 'V8SetReturnValueUnsigned(info, {cpp_value})', ++ # No special V8SetReturnValue* function (set value directly) ++ 'float': 'V8SetReturnValue(info, {cpp_value})', ++ 'unrestricted float': 'V8SetReturnValue(info, {cpp_value})', ++ 'double': 'V8SetReturnValue(info, {cpp_value})', ++ 'unrestricted double': 'V8SetReturnValue(info, {cpp_value})', ++ # No special V8SetReturnValue* function, but instead convert value to V8 ++ # and then use general V8SetReturnValue. ++ 'array': 'V8SetReturnValue(info, {cpp_value})', ++ 'FrozenArray': 'V8SetReturnValue(info, {cpp_value})', ++ 'Date': 'V8SetReturnValue(info, {cpp_value})', ++ 'EventHandler': 'V8SetReturnValue(info, {cpp_value})', ++ 'ScriptValue': 'V8SetReturnValue(info, {cpp_value})', ++ 'SerializedScriptValue': 'V8SetReturnValue(info, {cpp_value})', + # Records. +- 'Record': 'v8SetReturnValue(info, ToV8({cpp_value}, info.Holder(), info.GetIsolate()))', ++ 'Record': 'V8SetReturnValue(info, ToV8({cpp_value}, info.Holder(), info.GetIsolate()))', + # DOMWrapper +- 'DOMWrapperForMainWorld': 'v8SetReturnValueForMainWorld(info, {cpp_value})', +- 'DOMWrapperFast': 'v8SetReturnValueFast(info, {cpp_value}, {script_wrappable})', +- 'DOMWrapperDefault': 'v8SetReturnValue(info, {cpp_value})', ++ 'DOMWrapperForMainWorld': 'V8SetReturnValueForMainWorld(info, {cpp_value})', ++ 'DOMWrapperFast': 'V8SetReturnValueFast(info, {cpp_value}, {script_wrappable})', ++ 'DOMWrapperDefault': 'V8SetReturnValue(info, {cpp_value})', + # If [CheckSecurity=ReturnValue] is specified, the returned object must be + # wrapped in its own realm, which can be different from the realm of the + # receiver object. +@@ -871,23 +872,23 @@ V8_SET_RETURN_VALUE = { + # need to pass |creationContext| in for ToV8(DOMWindow*). + # Window.frameElement is implemented with [Custom]. + 'DOMWrapperAcrossContext': ( +- 'v8SetReturnValue(info, ToV8({cpp_value}, ' + ++ 'V8SetReturnValue(info, ToV8({cpp_value}, ' + + 'ToV8(impl->contentWindow(), v8::Local<v8::Object>(), ' + + 'info.GetIsolate()).As<v8::Object>(), info.GetIsolate()))'), + # Note that static attributes and operations do not check whether |this| is + # an instance of the interface nor |this|'s creation context is the same as + # the current context. So we must always use the current context as the + # creation context of the DOM wrapper for the return value. +- 'DOMWrapperStatic': 'v8SetReturnValue(info, {cpp_value}, info.GetIsolate()->GetCurrentContext()->Global())', ++ 'DOMWrapperStatic': 'V8SetReturnValue(info, {cpp_value}, info.GetIsolate()->GetCurrentContext()->Global())', + # Generic dictionary type +- 'Dictionary': 'v8SetReturnValue(info, {cpp_value})', ++ 'Dictionary': 'V8SetReturnValue(info, {cpp_value})', + 'DictionaryStatic': '#error not implemented yet', + # Nullable dictionaries +- 'NullableDictionary': 'v8SetReturnValue(info, result.get())', +- 'NullableDictionaryStatic': 'v8SetReturnValue(info, result.get(), info.GetIsolate()->GetCurrentContext()->Global())', ++ 'NullableDictionary': 'V8SetReturnValue(info, result.Get())', ++ 'NullableDictionaryStatic': 'V8SetReturnValue(info, result.Get(), info.GetIsolate()->GetCurrentContext()->Global())', + # Union types or dictionaries +- 'DictionaryOrUnion': 'v8SetReturnValue(info, result)', +- 'DictionaryOrUnionStatic': 'v8SetReturnValue(info, result, info.GetIsolate()->GetCurrentContext()->Global())', ++ 'DictionaryOrUnion': 'V8SetReturnValue(info, result)', ++ 'DictionaryOrUnionStatic': 'V8SetReturnValue(info, result, info.GetIsolate()->GetCurrentContext()->Global())', + } + + +@@ -912,7 +913,7 @@ def v8_set_return_value(idl_type, cpp_value, extended_attributes=None, script_wr + this_v8_conversion_type = idl_type.v8_conversion_type(extended_attributes) + # SetReturn-specific overrides + if this_v8_conversion_type in ['Date', 'EventHandler', 'ScriptValue', 'SerializedScriptValue', 'array', 'FrozenArray']: +- # Convert value to V8 and then use general v8SetReturnValue ++ # Convert value to V8 and then use general V8SetReturnValue + cpp_value = idl_type.cpp_value_to_v8_value(cpp_value, extended_attributes=extended_attributes) + if this_v8_conversion_type == 'DOMWrapper': + this_v8_conversion_type = dom_wrapper_conversion_type() +@@ -929,11 +930,11 @@ IdlTypeBase.v8_set_return_value = v8_set_return_value + + CPP_VALUE_TO_V8_VALUE = { + # Built-in types +- 'Date': 'v8DateOrNaN({isolate}, {cpp_value})', +- 'DOMString': 'v8String({isolate}, {cpp_value})', +- 'ByteString': 'v8String({isolate}, {cpp_value})', +- 'USVString': 'v8String({isolate}, {cpp_value})', +- 'boolean': 'v8Boolean({cpp_value}, {isolate})', ++ 'Date': 'V8DateOrNaN({isolate}, {cpp_value})', ++ 'DOMString': 'V8String({isolate}, {cpp_value})', ++ 'ByteString': 'V8String({isolate}, {cpp_value})', ++ 'USVString': 'V8String({isolate}, {cpp_value})', ++ 'boolean': 'V8Boolean({cpp_value}, {isolate})', + # All the int types below are converted to (u)int32_t in the v8::Integer::New*() calls. + # The 64-bit int types have already been converted to double when CPP_VALUE_TO_V8_VALUE is used, so they are not + # listed here. +@@ -948,20 +949,20 @@ CPP_VALUE_TO_V8_VALUE = { + 'double': 'v8::Number::New({isolate}, {cpp_value})', + 'unrestricted double': 'v8::Number::New({isolate}, {cpp_value})', + 'void': 'v8Undefined()', +- 'StringOrNull': '{cpp_value}.isNull() ? v8::Local<v8::Value>(v8::Null({isolate})) : v8String({isolate}, {cpp_value})', ++ 'StringOrNull': '{cpp_value}.IsNull() ? v8::Local<v8::Value>(v8::Null({isolate})) : V8String({isolate}, {cpp_value})', + # Special cases +- 'Dictionary': '{cpp_value}.v8Value()', ++ 'Dictionary': '{cpp_value}.V8Value()', + 'EventHandler': ( + '{cpp_value} ? ' + +- 'V8AbstractEventListener::cast({cpp_value})->getListenerOrNull(' + +- '{isolate}, impl->getExecutionContext()) : ' + ++ 'V8AbstractEventListener::Cast({cpp_value})->GetListenerOrNull(' + ++ '{isolate}, impl->GetExecutionContext()) : ' + + 'v8::Null({isolate}).As<v8::Value>()'), + 'Record': 'ToV8({cpp_value}, {creation_context}, {isolate})', +- 'ScriptValue': '{cpp_value}.v8Value()', +- 'SerializedScriptValue': 'v8Deserialize({isolate}, {cpp_value})', ++ 'ScriptValue': '{cpp_value}.V8Value()', ++ 'SerializedScriptValue': 'V8Deserialize({isolate}, {cpp_value})', + # General + 'array': 'ToV8({cpp_value}, {creation_context}, {isolate})', +- 'FrozenArray': 'freezeV8Object(ToV8({cpp_value}, {creation_context}, {isolate}), {isolate})', ++ 'FrozenArray': 'FreezeV8Object(ToV8({cpp_value}, {creation_context}, {isolate}), {isolate})', + 'DOMWrapper': 'ToV8({cpp_value}, {creation_context}, {isolate})', + # Passing nullable dictionaries isn't a pattern currently used + # anywhere in the web platform, and more work would be needed in +@@ -1035,7 +1036,7 @@ IdlArrayOrSequenceType.literal_cpp_value = array_or_sequence_literal_cpp_value + + def cpp_type_has_null_value(idl_type): + # - String types (String/AtomicString) represent null as a null string, +- # i.e. one for which String::isNull() returns true. ++ # i.e. one for which String::IsNull() returns true. + # - Enum types, as they are implemented as Strings. + # - Interface types (raw pointer or RefPtr/PassRefPtr) represent null as + # a null pointer. +diff --git a/third_party/WebKit/Source/bindings/scripts/v8_utilities.py b/third_party/WebKit/Source/bindings/scripts/v8_utilities.py +index dec531fd2a4f..17cb07c104d9 100644 +--- a/third_party/WebKit/Source/bindings/scripts/v8_utilities.py ++++ b/third_party/WebKit/Source/bindings/scripts/v8_utilities.py +@@ -200,8 +200,8 @@ CALL_WITH_ARGUMENTS = { + 'ScriptState': 'scriptState', + 'ExecutionContext': 'executionContext', + 'ScriptArguments': 'scriptArguments', +- 'CurrentWindow': 'currentDOMWindow(info.GetIsolate())', +- 'EnteredWindow': 'enteredDOMWindow(info.GetIsolate())', ++ 'CurrentWindow': 'CurrentDOMWindow(info.GetIsolate())', ++ 'EnteredWindow': 'EnteredDOMWindow(info.GetIsolate())', + 'Document': 'document', + 'ThisValue': 'ScriptValue(scriptState, info.Holder())', + } +@@ -243,16 +243,16 @@ def deprecate_as(member): + + # [Exposed] + EXPOSED_EXECUTION_CONTEXT_METHOD = { +- 'AnimationWorklet': 'isAnimationWorkletGlobalScope', +- 'AudioWorklet': 'isAudioWorkletGlobalScope', +- 'CompositorWorker': 'isCompositorWorkerGlobalScope', +- 'DedicatedWorker': 'isDedicatedWorkerGlobalScope', +- 'PaintWorklet': 'isPaintWorkletGlobalScope', +- 'ServiceWorker': 'isServiceWorkerGlobalScope', +- 'SharedWorker': 'isSharedWorkerGlobalScope', +- 'Window': 'isDocument', +- 'Worker': 'isWorkerGlobalScope', +- 'Worklet': 'isWorkletGlobalScope', ++ 'AnimationWorklet': 'IsAnimationWorkletGlobalScope', ++ 'AudioWorklet': 'IsAudioWorkletGlobalScope', ++ 'CompositorWorker': 'IsCompositorWorkerGlobalScope', ++ 'DedicatedWorker': 'IsDedicatedWorkerGlobalScope', ++ 'PaintWorklet': 'IsPaintWorkletGlobalScope', ++ 'ServiceWorker': 'IsServiceWorkerGlobalScope', ++ 'SharedWorker': 'IsSharedWorkerGlobalScope', ++ 'Window': 'IsDocument', ++ 'Worker': 'IsWorkerGlobalScope', ++ 'Worklet': 'IsWorkletGlobalScope', + } + + +@@ -344,7 +344,7 @@ def secure_context(member, interface): + """Returns C++ code that checks whether an interface/method/attribute/etc. is exposed + to the current context.""" + if 'SecureContext' in member.extended_attributes or 'SecureContext' in interface.extended_attributes: +- return "executionContext->isSecureContext()" ++ return "executionContext->IsSecureContext()" + return None + + +@@ -478,9 +478,9 @@ def on_instance(interface, member): + if member.is_static: + return False + +- # TODO(yukishiino): Remove a hack for toString once we support +- # Symbol.toStringTag. +- if (interface.name == 'Window' and member.name == 'toString'): ++ # TODO(yukishiino): Remove a hack for ToString once we support ++ # Symbol.ToStringTag. ++ if interface.name == 'Window' and member.name == 'ToString': + return False + + # TODO(yukishiino): Implement "interface object" and its [[Call]] method +@@ -624,7 +624,7 @@ def named_property_getter(interface): + if ('getter' in method.specials and + len(method.arguments) == 1 and + str(method.arguments[0].idl_type) == 'DOMString')) +- getter.name = getter.name or 'anonymousNamedGetter' ++ getter.name = getter.name or 'AnonymousNamedGetter' + return getter + except StopIteration: + return None +diff --git a/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl +index a43b7d2bd2fc..87ee2a8f6f49 100644 +--- a/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl ++++ b/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl +@@ -10,7 +10,7 @@ const v8::FunctionCallbackInfo<v8::Value>& info + {%- endif %}) { + {% filter format_remove_duplicates(['ExceptionState exceptionState']) %} + {% set define_exception_state -%} +- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::GetterContext, "{{interface_name}}", "{{attribute.name}}"); ++ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kGetterContext, "{{interface_name}}", "{{attribute.name}}"); + {%- endset %} + + {% if attribute.is_lenient_this %} +@@ -28,15 +28,15 @@ const v8::FunctionCallbackInfo<v8::Value>& info + // [SaveSameObject] + {% set same_object_private_key = interface_name + attribute.name[0]|capitalize + attribute.name[1:] %} + // If you see a compile error that +- // V8PrivateProperty::getSameObject{{same_object_private_key}} ++ // V8PrivateProperty::GetSameObject{{same_object_private_key}} + // is not defined, then you need to register your attribute at + // V8_PRIVATE_PROPERTY_FOR_EACH defined in V8PrivateProperty.h as + // X(SameObject, {{same_object_private_key}}) +- auto privateSameObject = V8PrivateProperty::getSameObject{{same_object_private_key}}(info.GetIsolate()); ++ auto privateSameObject = V8PrivateProperty::GetSameObject{{same_object_private_key}}(info.GetIsolate()); + { +- v8::Local<v8::Value> v8Value = privateSameObject.getOrEmpty(holder); ++ v8::Local<v8::Value> v8Value = privateSameObject.GetOrEmpty(holder); + if (!v8Value.IsEmpty()) { +- v8SetReturnValue(info, v8Value); ++ V8SetReturnValue(info, v8Value); + return; + } + } +@@ -51,7 +51,7 @@ const v8::FunctionCallbackInfo<v8::Value>& info + // Same-origin attribute getters are never exposed via the cross-origin + // interceptors. Since same-origin access requires a LocalDOMWindow, it is + // safe to downcast here. +- LocalDOMWindow* impl = toLocalDOMWindow({{v8_class}}::toImpl(holder)); ++ LocalDOMWindow* impl = ToLocalDOMWindow({{v8_class}}::toImpl(holder)); + {% endif %}{# attribute.is_check_security_for_receiver #} + {% else %} + {{cpp_class}}* impl = {{v8_class}}::toImpl(holder); +@@ -61,12 +61,12 @@ const v8::FunctionCallbackInfo<v8::Value>& info + {% if attribute.cached_attribute_validation_method %} + // [CachedAttribute] + V8PrivateProperty::Symbol propertySymbol = +- V8PrivateProperty::getSymbol(info.GetIsolate(), ++ V8PrivateProperty::GetSymbol(info.GetIsolate(), + "{{cpp_class}}#{{attribute.name.capitalize()}}"); + if (!impl->{{attribute.cached_attribute_validation_method}}()) { +- v8::Local<v8::Value> v8Value = propertySymbol.getOrUndefined(holder); ++ v8::Local<v8::Value> v8Value = propertySymbol.GetOrUndefined(holder); + if (!v8Value->IsUndefined()) { +- v8SetReturnValue(info, v8Value); ++ V8SetReturnValue(info, v8Value); + return; + } + } +@@ -76,35 +76,35 @@ const v8::FunctionCallbackInfo<v8::Value>& info + // Perform a security check for the receiver object. + {{define_exception_state}} + {% if local_dom_window_only %} +- if (!BindingSecurity::shouldAllowAccessTo(currentDOMWindow(info.GetIsolate()), uncheckedImpl, exceptionState)) { ++ if (!BindingSecurity::ShouldAllowAccessTo(CurrentDOMWindow(info.GetIsolate()), uncheckedImpl, exceptionState)) { + {% else %} +- if (!BindingSecurity::shouldAllowAccessTo(currentDOMWindow(info.GetIsolate()), impl, exceptionState)) { ++ if (!BindingSecurity::ShouldAllowAccessTo(CurrentDOMWindow(info.GetIsolate()), impl, exceptionState)) { + {% endif %}{# local_dom_window_only #} +- v8SetReturnValueNull(info); ++ V8SetReturnValueNull(info); + return; + } + {% if local_dom_window_only %} +- LocalDOMWindow* impl = toLocalDOMWindow(uncheckedImpl); ++ LocalDOMWindow* impl = ToLocalDOMWindow(uncheckedImpl); + {% endif %}{# local_dom_window_only #} + {% endif %} + + {% if attribute.is_check_security_for_return_value %} + // Perform a security check for the returned object. + {{define_exception_state}} +- if (!BindingSecurity::shouldAllowAccessTo(currentDOMWindow(info.GetIsolate()), {{attribute.cpp_value}}, exceptionState)) { +- v8SetReturnValueNull(info); ++ if (!BindingSecurity::ShouldAllowAccessTo(CurrentDOMWindow(info.GetIsolate()), {{attribute.cpp_value}}, exceptionState)) { ++ V8SetReturnValueNull(info); + return; + } + {% endif %} + + {% if attribute.is_call_with_execution_context %} +- ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); ++ ExecutionContext* executionContext = CurrentExecutionContext(info.GetIsolate()); + {% endif %} + {% if attribute.is_call_with_script_state %} + {% if attribute.is_static %} +- ScriptState* scriptState = ScriptState::forFunctionObject(info); ++ ScriptState* scriptState = ScriptState::ForFunctionObject(info); + {% else %} +- ScriptState* scriptState = ScriptState::forReceiverObject(info); ++ ScriptState* scriptState = ScriptState::ForReceiverObject(info); + {% endif %} + {% endif %} + {% if attribute.is_getter_raises_exception %} +@@ -124,7 +124,7 @@ const v8::FunctionCallbackInfo<v8::Value>& info + {% endif %} + + {% if attribute.is_getter_raises_exception %} +- if (UNLIKELY(exceptionState.hadException())) ++ if (UNLIKELY(exceptionState.HadException())) + return; + {% endif %} + +@@ -138,12 +138,12 @@ const v8::FunctionCallbackInfo<v8::Value>& info + {% if attribute.cached_attribute_validation_method %} + // [CachedAttribute] + v8::Local<v8::Value> v8Value({{attribute.cpp_value_to_v8_value}}); +- propertySymbol.set(holder, v8Value); ++ propertySymbol.Set(holder, v8Value); + {% endif %} + + {% if attribute.is_explicit_nullable %} + if (isNull) { +- v8SetReturnValueNull(info); ++ V8SetReturnValueNull(info); + return; + } + {% endif %} +@@ -151,12 +151,12 @@ const v8::FunctionCallbackInfo<v8::Value>& info + {% if attribute.is_keep_alive_for_gc %} + // Keep the wrapper object for the return value alive as long as |this| + // object is alive in order to save creation time of the wrapper object. +- if ({{attribute.cpp_value}} && DOMDataStore::setReturnValue{{world_suffix}}(info.GetReturnValue(), {{attribute.cpp_value}})) ++ if ({{attribute.cpp_value}} && DOMDataStore::SetReturnValue{{world_suffix}}(info.GetReturnValue(), {{attribute.cpp_value}})) + return; + v8::Local<v8::Value> v8Value(ToV8({{attribute.cpp_value}}, holder, info.GetIsolate())); +- V8PrivateProperty::getSymbol( ++ V8PrivateProperty::GetSymbol( + info.GetIsolate(), "KeepAlive#{{interface_name}}#{{attribute.name}}") +- .set(holder, v8Value); ++ .Set(holder, v8Value); + {% endif %} + + {% if world_suffix %} +@@ -167,7 +167,7 @@ const v8::FunctionCallbackInfo<v8::Value>& info + + {% if attribute.is_save_same_object %} + // [SaveSameObject] +- privateSameObject.set(holder, info.GetReturnValue().Get()); ++ privateSameObject.Set(holder, info.GetReturnValue().Get()); + {% endif %} + {% endfilter %}{# format_remove_duplicates #} + } +@@ -181,16 +181,16 @@ const v8::FunctionCallbackInfo<v8::Value>& info + one of those. If not, set it to the empty string. + http://www.whatwg.org/specs/web-apps/current-work/#limited-to-only-known-values #} + {% if reflect_empty %} +-if ({{cpp_value}}.isNull()) { ++if ({{cpp_value}}.IsNull()) { + {% if reflect_missing %} + {{cpp_value}} = "{{reflect_missing}}"; + {% else %} + ; + {% endif %} +-} else if ({{cpp_value}}.isEmpty()) { ++} else if ({{cpp_value}}.IsEmpty()) { + {{cpp_value}} = "{{reflect_empty}}"; + {% else %} +-if ({{cpp_value}}.isEmpty()) { ++if ({{cpp_value}}.IsEmpty()) { + {# FIXME: should use [ReflectEmpty] instead; need to change IDL files #} + {% if reflect_missing %} + {{cpp_value}} = "{{reflect_missing}}"; +@@ -199,7 +199,7 @@ if ({{cpp_value}}.isEmpty()) { + {% endif %} + {% endif %} + {% for value in reflect_only_values %} +-} else if (equalIgnoringASCIICase({{cpp_value}}, "{{value}}")) { ++} else if (EqualIgnoringASCIICase({{cpp_value}}, "{{value}}")) { + {{cpp_value}} = "{{value}}"; + {% endfor %} + } else { +@@ -217,26 +217,26 @@ v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info + const v8::FunctionCallbackInfo<v8::Value>& info + {%- endif %}) { + {% if attribute.deprecate_as %} +- Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); ++ Deprecation::CountDeprecation(CurrentExecutionContext(info.GetIsolate()), UseCounter::k{{attribute.deprecate_as}}); + {% endif %} + + {% if attribute.measure_as %} +- UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::{{attribute.measure_as('AttributeGetter')}}); ++ UseCounter::Count(CurrentExecutionContext(info.GetIsolate()), UseCounter::k{{attribute.measure_as('AttributeGetter')}}); + {% endif %} + + {% if world_suffix in attribute.activity_logging_world_list_for_getter %} + {% if attribute.is_static %} +- ScriptState* scriptState = ScriptState::forFunctionObject(info); ++ ScriptState* scriptState = ScriptState::ForFunctionObject(info); + {% else %} +- ScriptState* scriptState = ScriptState::forReceiverObject(info); ++ ScriptState* scriptState = ScriptState::ForReceiverObject(info); + {% endif %} +- V8PerContextData* contextData = scriptState->perContextData(); ++ V8PerContextData* contextData = scriptState->PerContextData(); + if ( + {%- if attribute.activity_logging_world_check -%} +- scriptState->world().isIsolatedWorld() && {# one space at the end #} ++ scriptState->World().IsIsolatedWorld() && {# one space at the end #} + {%- endif -%} +- contextData && contextData->activityLogger()) { +- contextData->activityLogger()->logGetter("{{interface_name}}.{{attribute.name}}"); ++ contextData && contextData->ActivityLogger()) { ++ contextData->ActivityLogger()->LogGetter("{{interface_name}}.{{attribute.name}}"); + } + {% endif %} + +@@ -253,7 +253,7 @@ const v8::FunctionCallbackInfo<v8::Value>& info + {% macro attribute_cached_property_key(attribute) %} + v8::Local<v8::Private> {{v8_class_or_partial}}::{{attribute.name}}CachedPropertyKey(v8::Isolate* isolate) + { +- return V8PrivateProperty::get{{attribute.cached_accessor_name}}(isolate).getPrivate(); ++ return V8PrivateProperty::Get{{attribute.cached_accessor_name}}(isolate).GetPrivate(); + } + {% endmacro %} + +@@ -262,14 +262,14 @@ v8::Local<v8::Private> {{v8_class_or_partial}}::{{attribute.name}}CachedProperty + {% macro constructor_getter_callback(attribute, world_suffix) %} + void {{v8_class_or_partial}}::{{attribute.name}}ConstructorGetterCallback{{world_suffix}}(v8::Local<v8::Name> property, const v8::PropertyCallbackInfo<v8::Value>& info) { + {% if attribute.deprecate_as %} +- Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); ++ Deprecation::CountDeprecation(CurrentExecutionContext(info.GetIsolate()), UseCounter::k{{attribute.deprecate_as}}); + {% endif %} + + {% if attribute.measure_as %} +- UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::{{attribute.measure_as('ConstructorGetter')}}); ++ UseCounter::Count(CurrentExecutionContext(info.GetIsolate()), UseCounter::k{{attribute.measure_as('ConstructorGetter')}}); + {% endif %} + +- v8ConstructorAttributeGetter(property, info); ++ V8ConstructorAttributeGetter(property, info); + } + {% endmacro %} + +@@ -289,7 +289,7 @@ v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info + ALLOW_UNUSED_LOCAL(isolate); + + {% set define_exception_state -%} +- ExceptionState exceptionState(isolate, ExceptionState::SetterContext, "{{interface_name}}", "{{attribute.name}}"); ++ ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "{{interface_name}}", "{{attribute.name}}"); + {%- endset %} + + {% if attribute.is_lenient_this %} +@@ -303,7 +303,7 @@ v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info + v8::Local<v8::Object> holder = info.Holder(); + {% if attribute.is_put_forwards %} + {{cpp_class}}* proxyImpl = {{v8_class}}::toImpl(holder); +- {{attribute.cpp_type}} impl = WTF::getPtr(proxyImpl->{{attribute.name}}()); ++ {{attribute.cpp_type}} impl = WTF::GetPtr(proxyImpl->{{attribute.name}}()); + if (!impl) + return; + {% else %} +@@ -315,7 +315,7 @@ v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info + // Same-origin attributes setters are never exposed via the cross-origin + // interceptors. Since same-origin access requires a LocalDOMWindow, it is + // safe to downcast here. +- LocalDOMWindow* impl = toLocalDOMWindow({{v8_class}}::toImpl(holder)); ++ LocalDOMWindow* impl = ToLocalDOMWindow({{v8_class}}::toImpl(holder)); + {% endif %}{# attribute.is_check_security_for_receiver #} + {% else %} + {{cpp_class}}* impl = {{v8_class}}::toImpl(holder); +@@ -327,15 +327,15 @@ v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info + // Perform a security check for the receiver object. + {{define_exception_state}} + {% if local_dom_window_only %} +- if (!BindingSecurity::shouldAllowAccessTo(currentDOMWindow(isolate), uncheckedImpl, exceptionState)) { ++ if (!BindingSecurity::ShouldAllowAccessTo(CurrentDOMWindow(isolate), uncheckedImpl, exceptionState)) { + {% else %} +- if (!BindingSecurity::shouldAllowAccessTo(currentDOMWindow(isolate), impl, exceptionState)) { ++ if (!BindingSecurity::ShouldAllowAccessTo(CurrentDOMWindow(isolate), impl, exceptionState)) { + {% endif %}{# local_dom_window_only #} +- v8SetReturnValue(info, v8Value); ++ V8SetReturnValue(info, v8Value); + return; + } + {% if local_dom_window_only %} +- LocalDOMWindow* impl = toLocalDOMWindow(uncheckedImpl); ++ LocalDOMWindow* impl = ToLocalDOMWindow(uncheckedImpl); + {% endif %}{# local_dom_window_only #} + {% endif %} + +@@ -356,7 +356,7 @@ v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info + // Prepare the value to be set. + {% if attribute.idl_type == 'EventHandler' %} + {% if not is_node %} +- moveEventListenerToNewWrapper(isolate, holder, {{attribute.event_handler_getter_expression}}, v8Value, {{v8_class}}::eventListenerCacheIndex); ++ MoveEventListenerToNewWrapper(isolate, holder, {{attribute.event_handler_getter_expression}}, v8Value, {{v8_class}}::eventListenerCacheIndex); + {% endif %} + {% else %}{# not EventHandler #} + {{v8_value_to_local_cpp_value(attribute) | indent(2)}} +@@ -364,8 +364,8 @@ v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info + + {% if attribute.has_type_checking_interface %} + // Type check per: http://heycam.github.io/webidl/#es-interface +- if (!cppValue{% if attribute.is_nullable %} && !isUndefinedOrNull(v8Value){% endif %}) { +- exceptionState.throwTypeError("The provided value is not of type '{{attribute.idl_type}}'."); ++ if (!cppValue{% if attribute.is_nullable %} && !IsUndefinedOrNull(v8Value){% endif %}) { ++ exceptionState.ThrowTypeError("The provided value is not of type '{{attribute.idl_type}}'."); + return; + } + {% endif %} +@@ -375,35 +375,35 @@ v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info + // Returns undefined without setting the value if the value is invalid. + DummyExceptionStateForTesting dummyExceptionState; + {{declare_enum_validation_variable(attribute.enum_values) | indent(2)}} +- if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "{{attribute.enum_type}}", dummyExceptionState)) { +- currentExecutionContext(isolate)->addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessageLevel, dummyExceptionState.message())); ++ if (!IsValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "{{attribute.enum_type}}", dummyExceptionState)) { ++ CurrentExecutionContext(isolate)->AddConsoleMessage(ConsoleMessage::Create(kJSMessageSource, kWarningMessageLevel, dummyExceptionState.Message())); + return; + } + {% endif %} + + {% if attribute.is_call_with_execution_context or attribute.is_setter_call_with_execution_context %} +- ExecutionContext* executionContext = currentExecutionContext(isolate); ++ ExecutionContext* executionContext = CurrentExecutionContext(isolate); + {% endif %} + + {% if attribute.is_call_with_script_state %} + {% if attribute.is_static %} +- ScriptState* scriptState = ScriptState::forFunctionObject(info); ++ ScriptState* scriptState = ScriptState::ForFunctionObject(info); + {% else %} +- ScriptState* scriptState = ScriptState::forReceiverObject(info); ++ ScriptState* scriptState = ScriptState::ForReceiverObject(info); + {% endif %} + {% endif %} + + {% if attribute.is_replaceable %} +- v8::Local<v8::String> propertyName = v8AtomicString(isolate, "{{attribute.name}}"); ++ v8::Local<v8::String> propertyName = V8AtomicString(isolate, "{{attribute.name}}"); + {% endif %} + {{attribute.cpp_setter}}; + + {% if attribute.cached_attribute_validation_method %} + // [CachedAttribute] + // Invalidate the cached value. +- V8PrivateProperty::getSymbol( ++ V8PrivateProperty::GetSymbol( + isolate, "{{cpp_class}}#{{attribute.name.capitalize()}}") +- .deleteProperty(holder, v8::Undefined(isolate)); ++ .DeleteProperty(holder, v8::Undefined(isolate)); + {% endif %} + } + {% endfilter %}{# format_remove_duplicates #} +@@ -423,26 +423,26 @@ const v8::FunctionCallbackInfo<v8::Value>& info + {% endif %} + + {% if attribute.deprecate_as %} +- Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); ++ Deprecation::CountDeprecation(CurrentExecutionContext(info.GetIsolate()), UseCounter::k{{attribute.deprecate_as}}); + {% endif %} + + {% if attribute.measure_as %} +- UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::{{attribute.measure_as('AttributeSetter')}}); ++ UseCounter::Count(CurrentExecutionContext(info.GetIsolate()), UseCounter::k{{attribute.measure_as('AttributeSetter')}}); + {% endif %} + + {% if world_suffix in attribute.activity_logging_world_list_for_setter %} + {% if attribute.is_static %} +- ScriptState* scriptState = ScriptState::forFunctionObject(info); ++ ScriptState* scriptState = ScriptState::ForFunctionObject(info); + {% else %} +- ScriptState* scriptState = ScriptState::forReceiverObject(info); ++ ScriptState* scriptState = ScriptState::ForReceiverObject(info); + {% endif %} +- V8PerContextData* contextData = scriptState->perContextData(); ++ V8PerContextData* contextData = scriptState->PerContextData(); + if ( + {%- if attribute.activity_logging_world_check -%} +- scriptState->world().isIsolatedWorld() && {# one space at the end #} ++ scriptState->World().IsIsolatedWorld() && {# one space at the end #} + {%- endif -%} +- contextData && contextData->activityLogger()) { +- contextData->activityLogger()->logSetter("{{interface_name}}.{{attribute.name}}", v8Value); ++ contextData && contextData->ActivityLogger()) { ++ contextData->ActivityLogger()->LogSetter("{{interface_name}}.{{attribute.name}}", v8Value); + } + {% endif %} + +@@ -473,7 +473,7 @@ const v8::FunctionCallbackInfo<v8::Value>& info + {% set getter_callback = '%s::%sConstructorGetterCallback' % (v8_class_or_partial, attribute.name) %} + {% else %} + {% set getter_callback = 'V8%s::NamedConstructorAttributeGetter' % (attribute.constructor_type) +- if attribute.is_named_constructor else 'v8ConstructorAttributeGetter' %} ++ if attribute.is_named_constructor else 'V8ConstructorAttributeGetter' %} + {% endif %} + {% set setter_callback = 'nullptr' %} + {% else %}{# regular attributes #} +@@ -492,17 +492,17 @@ const v8::FunctionCallbackInfo<v8::Value>& info + '%s::%sCachedPropertyKey' % (v8_class_or_partial, attribute.name) + if attribute.is_cached_accessor else + 'nullptr' %} +-{% set holder_check = 'V8DOMConfiguration::DoNotCheckHolder' +- if attribute.is_lenient_this else 'V8DOMConfiguration::CheckHolder' %} ++{% set holder_check = 'V8DOMConfiguration::kDoNotCheckHolder' ++ if attribute.is_lenient_this else 'V8DOMConfiguration::kCheckHolder' %} + {% if attribute.is_per_world_bindings %} + {% set getter_callback_for_main_world = '%sForMainWorld' % getter_callback %} + {% set setter_callback_for_main_world = + '%sForMainWorld' % setter_callback + if attribute.has_setter else 'nullptr' %} +-{"{{attribute.name}}", {{getter_callback_for_main_world}}, {{setter_callback_for_main_world}}, {{cached_accessor_callback}}, {{wrapper_type_info}}, {{property_attribute}}, {{property_location(attribute)}}, {{holder_check}}, V8DOMConfiguration::MainWorld}, +-{"{{attribute.name}}", {{getter_callback}}, {{setter_callback}}, {{cached_accessor_callback}}, {{wrapper_type_info}}, {{property_attribute}}, {{property_location(attribute)}}, {{holder_check}}, V8DOMConfiguration::NonMainWorlds} ++{"{{attribute.name}}", {{getter_callback_for_main_world}}, {{setter_callback_for_main_world}}, {{cached_accessor_callback}}, {{wrapper_type_info}}, {{property_attribute}}, {{property_location(attribute)}}, {{holder_check}}, V8DOMConfiguration::kMainWorld}, ++{"{{attribute.name}}", {{getter_callback}}, {{setter_callback}}, {{cached_accessor_callback}}, {{wrapper_type_info}}, {{property_attribute}}, {{property_location(attribute)}}, {{holder_check}}, V8DOMConfiguration::kNonMainWorlds} + {%- else %} +-{"{{attribute.name}}", {{getter_callback}}, {{setter_callback}}, {{cached_accessor_callback}}, {{wrapper_type_info}}, {{property_attribute}}, {{property_location(attribute)}}, {{holder_check}}, V8DOMConfiguration::AllWorlds} ++{"{{attribute.name}}", {{getter_callback}}, {{setter_callback}}, {{cached_accessor_callback}}, {{wrapper_type_info}}, {{property_attribute}}, {{property_location(attribute)}}, {{holder_check}}, V8DOMConfiguration::kAllWorlds} + {%- endif %} + {%- endmacro %} + +@@ -516,7 +516,7 @@ static const V8DOMConfiguration::AccessorConfiguration accessorConfiguration[] = + {{attribute_configuration(attribute)}} + }; + for (const auto& accessorConfig : accessorConfiguration) +- V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfig); ++ V8DOMConfiguration::InstallAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfig); + {% endfilter %}{# runtime_enabled #} + {% endfilter %}{# secure_context #} + {% endfilter %}{# exposed #} +diff --git a/third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl +index 8390f85535d9..16735eb1a9fd 100644 +--- a/third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl ++++ b/third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl +@@ -12,43 +12,43 @@ + namespace blink { + + // static +-{{cpp_class}}* {{cpp_class}}::create(ScriptState* scriptState, v8::Local<v8::Value> callback) { +- if (isUndefinedOrNull(callback)) ++{{cpp_class}}* {{cpp_class}}::Create(ScriptState* scriptState, v8::Local<v8::Value> callback) { ++ if (IsUndefinedOrNull(callback)) + return nullptr; + return new {{cpp_class}}(scriptState, v8::Local<v8::Function>::Cast(callback)); + } + + {{cpp_class}}::{{cpp_class}}(ScriptState* scriptState, v8::Local<v8::Function> callback) + : m_scriptState(scriptState), +- m_callback(scriptState->isolate(), this, callback) { +- DCHECK(!m_callback.isEmpty()); ++ m_callback(scriptState->GetIsolate(), this, callback) { ++ DCHECK(!m_callback.IsEmpty()); + } + + DEFINE_TRACE_WRAPPERS({{cpp_class}}) { +- visitor->traceWrappers(m_callback.cast<v8::Value>()); ++ visitor->TraceWrappers(m_callback.Cast<v8::Value>()); + } + + bool {{cpp_class}}::call({{argument_declarations | join(', ')}}) { +- if (m_callback.isEmpty()) ++ if (m_callback.IsEmpty()) + return false; + +- if (!m_scriptState->contextIsValid()) ++ if (!m_scriptState->ContextIsValid()) + return false; + +- ExecutionContext* context = m_scriptState->getExecutionContext(); ++ ExecutionContext* context = m_scriptState->GetExecutionContext(); + DCHECK(context); +- if (context->isContextSuspended() || context->isContextDestroyed()) ++ if (context->IsContextSuspended() || context->IsContextDestroyed()) + return false; + + // TODO(bashi): Make sure that using DummyExceptionStateForTesting is OK. + // crbug.com/653769 + DummyExceptionStateForTesting exceptionState; +- ScriptState::Scope scope(m_scriptState.get()); +- v8::Isolate* isolate = m_scriptState->isolate(); ++ ScriptState::Scope scope(m_scriptState.Get()); ++ v8::Isolate* isolate = m_scriptState->GetIsolate(); + + v8::Local<v8::Value> thisValue = ToV8( + scriptWrappable, +- m_scriptState->context()->Global(), ++ m_scriptState->GetContext()->Global(), + isolate); + + {% for argument in arguments %} +@@ -64,7 +64,7 @@ bool {{cpp_class}}::call({{argument_declarations | join(', ')}}) { + exceptionCatcher.SetVerbose(true); + + v8::Local<v8::Value> v8ReturnValue; +- if (!V8ScriptRunner::callFunction(m_callback.newLocal(isolate), ++ if (!V8ScriptRunner::CallFunction(m_callback.NewLocal(isolate), + context, + thisValue, + {{arguments | length}}, +@@ -80,10 +80,10 @@ bool {{cpp_class}}::call({{argument_declarations | join(', ')}}) { + return true; + } + +-{{cpp_class}}* NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) { +- {{cpp_class}}* nativeValue = {{cpp_class}}::create(ScriptState::current(isolate), value); ++{{cpp_class}}* NativeValueTraits<{{cpp_class}}>::NativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) { ++ {{cpp_class}}* nativeValue = {{cpp_class}}::Create(ScriptState::Current(isolate), value); + if (!nativeValue) +- exceptionState.throwTypeError("Unable to convert value to {{callback_function_name}}."); ++ exceptionState.ThrowTypeError("Unable to convert value to {{callback_function_name}}."); + return nativeValue; + } + +diff --git a/third_party/WebKit/Source/bindings/templates/callback_function.h.tmpl b/third_party/WebKit/Source/bindings/templates/callback_function.h.tmpl +index 6528813495e1..745995a5df37 100644 +--- a/third_party/WebKit/Source/bindings/templates/callback_function.h.tmpl ++++ b/third_party/WebKit/Source/bindings/templates/callback_function.h.tmpl +@@ -18,7 +18,7 @@ class {{forward_declaration}}; + + class {{exported}}{{cpp_class}} final : public GarbageCollectedFinalized<{{cpp_class}}>, public TraceWrapperBase { + public: +- static {{cpp_class}}* create(ScriptState*, v8::Local<v8::Value> callback); ++ static {{cpp_class}}* Create(ScriptState*, v8::Local<v8::Value> callback); + + ~{{cpp_class}}() = default; + +@@ -28,7 +28,7 @@ class {{exported}}{{cpp_class}} final : public GarbageCollectedFinalized<{{cpp_c + bool call({{argument_declarations | join(', ')}}); + + v8::Local<v8::Function> v8Value(v8::Isolate* isolate) { +- return m_callback.newLocal(isolate); ++ return m_callback.NewLocal(isolate); + } + + private: +@@ -40,7 +40,7 @@ class {{exported}}{{cpp_class}} final : public GarbageCollectedFinalized<{{cpp_c + + template <> + struct NativeValueTraits<{{cpp_class}}> : public NativeValueTraitsBase<{{cpp_class}}> { +- {{exported}}static {{cpp_class}}* nativeValue(v8::Isolate*, v8::Local<v8::Value>, ExceptionState&); ++ {{exported}}static {{cpp_class}}* NativeValue(v8::Isolate*, v8::Local<v8::Value>, ExceptionState&); + }; + + } // namespace blink +diff --git a/third_party/WebKit/Source/bindings/templates/callback_interface.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/callback_interface.cpp.tmpl +index 420c27645fe3..e3109b5bdfe5 100644 +--- a/third_party/WebKit/Source/bindings/templates/callback_interface.cpp.tmpl ++++ b/third_party/WebKit/Source/bindings/templates/callback_interface.cpp.tmpl +@@ -11,29 +11,29 @@ namespace blink { + + {{v8_class}}::{{v8_class}}(v8::Local<v8::Function> callback, ScriptState* scriptState) + : m_scriptState(scriptState) { +- m_callback.set(scriptState->isolate(), callback); ++ m_callback.Set(scriptState->GetIsolate(), callback); + } + + {{v8_class}}::~{{v8_class}}() {} + + DEFINE_TRACE({{v8_class}}) { +- {{cpp_class}}::trace(visitor); ++ {{cpp_class}}::Trace(visitor); + } + + {% for method in methods if not method.is_custom %} + {{method.cpp_type}} {{v8_class}}::{{method.name}}({{method.argument_declarations | join(', ')}}) { + {% set return_default = 'return true' + if method.idl_type == 'boolean' else 'return' %}{# void #} +- ExecutionContext* executionContext = m_scriptState->getExecutionContext(); +- if (!executionContext || executionContext->isContextSuspended() || +- executionContext->isContextDestroyed()) ++ ExecutionContext* executionContext = m_scriptState->GetExecutionContext(); ++ if (!executionContext || executionContext->IsContextSuspended() || ++ executionContext->IsContextDestroyed()) + {{return_default}}; +- if (!m_scriptState->contextIsValid()) ++ if (!m_scriptState->ContextIsValid()) + {{return_default}}; + +- ScriptState::Scope scope(m_scriptState.get()); ++ ScriptState::Scope scope(m_scriptState.Get()); + {% if method.call_with_this_handle %} +- v8::Local<v8::Value> thisHandle = thisValue.v8Value(); ++ v8::Local<v8::Value> thisHandle = thisValue.V8Value(); + {% endif %} + + {% for argument in method.arguments %} +@@ -46,13 +46,13 @@ DEFINE_TRACE({{v8_class}}) { + v8::Local<v8::Value> *argv = 0; + {% endif %} + +- v8::Isolate* isolate = m_scriptState->isolate(); ++ v8::Isolate* isolate = m_scriptState->GetIsolate(); + {% set this_handle_parameter = 'thisHandle' + if method.call_with_this_handle else 'v8::Undefined(isolate)' %} + {% if method.idl_type == 'boolean' %} + v8::TryCatch exceptionCatcher(isolate); + exceptionCatcher.SetVerbose(true); +- V8ScriptRunner::callFunction(m_callback.newLocal(isolate), ++ V8ScriptRunner::CallFunction(m_callback.NewLocal(isolate), + executionContext, + {{this_handle_parameter}}, + {{method.arguments | length}}, +@@ -60,8 +60,8 @@ DEFINE_TRACE({{v8_class}}) { + isolate); + return !exceptionCatcher.HasCaught(); + {% else %}{# void #} +- V8ScriptRunner::callFunction(m_callback.newLocal(isolate), +- m_scriptState->getExecutionContext(), ++ V8ScriptRunner::CallFunction(m_callback.NewLocal(isolate), ++ m_scriptState->GetExecutionContext(), + {{this_handle_parameter}}, + {{method.arguments | length}}, + argv, +diff --git a/third_party/WebKit/Source/bindings/templates/callback_interface.h.tmpl b/third_party/WebKit/Source/bindings/templates/callback_interface.h.tmpl +index e8d141217241..a38934ce1fe8 100644 +--- a/third_party/WebKit/Source/bindings/templates/callback_interface.h.tmpl ++++ b/third_party/WebKit/Source/bindings/templates/callback_interface.h.tmpl +@@ -12,7 +12,7 @@ namespace blink { + + class {{v8_class}} final : public {{cpp_class}} { + public: +- static {{v8_class}}* create(v8::Local<v8::Function> callback, ScriptState* scriptState) { ++ static {{v8_class}}* Create(v8::Local<v8::Function> callback, ScriptState* scriptState) { + return new {{v8_class}}(callback, scriptState); + } + +diff --git a/third_party/WebKit/Source/bindings/templates/constants.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/constants.cpp.tmpl +index 9940b50bd4bd..ff8dc553801c 100644 +--- a/third_party/WebKit/Source/bindings/templates/constants.cpp.tmpl ++++ b/third_party/WebKit/Source/bindings/templates/constants.cpp.tmpl +@@ -2,17 +2,17 @@ + {% macro constant_getter_callback(constant) %} + void {{v8_class_or_partial}}::{{constant.name}}ConstantGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) { + {% if constant.deprecate_as %} +- Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::{{constant.deprecate_as}}); ++ Deprecation::CountDeprecation(CurrentExecutionContext(info.GetIsolate()), UseCounter::k{{constant.deprecate_as}}); + {% endif %} + {% if constant.measure_as %} +- UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::{{constant.measure_as('ConstantGetter')}}); ++ UseCounter::Count(CurrentExecutionContext(info.GetIsolate()), UseCounter::k{{constant.measure_as('ConstantGetter')}}); + {% endif %} + {% if constant.idl_type in ('Double', 'Float') %} +- v8SetReturnValue(info, {{constant.value}}); ++ V8SetReturnValue(info, {{constant.value}}); + {% elif constant.idl_type == 'String' %} +- v8SetReturnValueString(info, "{{constant.value}}"); ++ V8SetReturnValueString(info, "{{constant.value}}"); + {% else %} +- v8SetReturnValueInt(info, {{constant.value}}); ++ V8SetReturnValueInt(info, {{constant.value}}); + {% endif %} + } + {% endmacro %} +@@ -27,7 +27,7 @@ const V8DOMConfiguration::ConstantConfiguration {{v8_class}}Constants[] = { + {{constant_configuration(constant)}}, + {% endfor %} + }; +-V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototypeTemplate, {{v8_class}}Constants, WTF_ARRAY_LENGTH({{v8_class}}Constants)); ++V8DOMConfiguration::InstallConstants(isolate, interfaceTemplate, prototypeTemplate, {{v8_class}}Constants, WTF_ARRAY_LENGTH({{v8_class}}Constants)); + {% endif %} + {# Runtime-enabled constants #} + {% for group in constants | runtime_enabled_constants | groupby('runtime_enabled_feature_name') %} +@@ -35,13 +35,13 @@ V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototypeTempla + {% for constant in group.list %} + {% set constant_name = constant.name.title().replace('_', '') %} + const V8DOMConfiguration::ConstantConfiguration constant{{constant_name}}Configuration = {{constant_configuration(constant)}}; +-V8DOMConfiguration::installConstant(isolate, interfaceTemplate, prototypeTemplate, constant{{constant_name}}Configuration); ++V8DOMConfiguration::InstallConstant(isolate, interfaceTemplate, prototypeTemplate, constant{{constant_name}}Configuration); + {% endfor %} + {% endfilter %} + {% endfor %} + {# Constants with [DeprecateAs] or [MeasureAs] #} + {% for constant in constants | has_special_getter %} +-V8DOMConfiguration::installConstantWithGetter(isolate, interfaceTemplate, prototypeTemplate, "{{constant.name}}", {{v8_class_or_partial}}::{{constant.name}}ConstantGetterCallback); ++V8DOMConfiguration::InstallConstantWithGetter(isolate, interfaceTemplate, prototypeTemplate, "{{constant.name}}", {{v8_class_or_partial}}::{{constant.name}}ConstantGetterCallback); + {% endfor %} + {# Check constants #} + {% if not do_not_check_constants %} +@@ -63,5 +63,5 @@ static_assert({{constant.value}} == {{constant_cpp_class}}::{{constant.reflected + {# 'Short', 'Long' etc. #} + {% set value = '%s, 0' % constant.value %} + {% endif %} +-{"{{constant.name}}", {{value}}, V8DOMConfiguration::ConstantType{{constant.idl_type}}} ++{"{{constant.name}}", {{value}}, V8DOMConfiguration::kConstantType{{constant.idl_type}}} + {%- endmacro %} +diff --git a/third_party/WebKit/Source/bindings/templates/dictionary_impl.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/dictionary_impl.cpp.tmpl +index 46b5735d58d8..f9865bb7afa4 100644 +--- a/third_party/WebKit/Source/bindings/templates/dictionary_impl.cpp.tmpl ++++ b/third_party/WebKit/Source/bindings/templates/dictionary_impl.cpp.tmpl +@@ -51,10 +51,10 @@ void {{cpp_class}}::{{member.null_setter_name}}() { + + DEFINE_TRACE({{cpp_class}}) { + {% for member in members if member.is_traceable %} +- visitor->trace(m_{{member.cpp_name}}); ++ visitor->Trace(m_{{member.cpp_name}}); + {% endfor %} + {% if parent_cpp_class %} +- {{parent_cpp_class}}::trace(visitor); ++ {{parent_cpp_class}}::Trace(visitor); + {% endif %} + } + +diff --git a/third_party/WebKit/Source/bindings/templates/dictionary_impl.h.tmpl b/third_party/WebKit/Source/bindings/templates/dictionary_impl.h.tmpl +index 1324d882fe9e..7c904e5ee5aa 100644 +--- a/third_party/WebKit/Source/bindings/templates/dictionary_impl.h.tmpl ++++ b/third_party/WebKit/Source/bindings/templates/dictionary_impl.h.tmpl +@@ -32,7 +32,7 @@ class {{exported}}{{cpp_class}}{% if parent_cpp_class %} : public {{parent_cpp_c + {% endif %} + + {% endfor %} +- v8::Local<v8::Value> toV8Impl(v8::Local<v8::Object>, v8::Isolate*) const override; ++ v8::Local<v8::Value> ToV8Impl(v8::Local<v8::Object>, v8::Isolate*) const override; + DECLARE_VIRTUAL_TRACE(); + + private: +diff --git a/third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl +index cad3566b8f85..7b718cb97970 100644 +--- a/third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl ++++ b/third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl +@@ -17,16 +17,16 @@ static const v8::Eternal<v8::Name>* eternal{{v8_class}}Keys(v8::Isolate* isolate + "{{member.name}}", + {% endfor %} + }; +- return V8PerIsolateData::from(isolate)->findOrCreateEternalNameCache( ++ return V8PerIsolateData::From(isolate)->FindOrCreateEternalNameCache( + kKeys, kKeys, WTF_ARRAY_LENGTH(kKeys)); + } + {% endif %} + + {% from 'utilities.cpp.tmpl' import v8_value_to_local_cpp_value %} + void {{v8_class}}::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, {{cpp_class}}& impl, ExceptionState& exceptionState) { +- if (isUndefinedOrNull(v8Value)) { ++ if (IsUndefinedOrNull(v8Value)) { + {% if required_member_names %} +- exceptionState.throwTypeError("Missing required member(s): {{required_member_names|join(', ')}}."); ++ exceptionState.ThrowTypeError("Missing required member(s): {{required_member_names|join(', ')}}."); + {% endif %} + return; + } +@@ -35,7 +35,7 @@ void {{v8_class}}::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, {{ + // Do nothing. + return; + {% else %} +- exceptionState.throwTypeError("cannot convert to dictionary."); ++ exceptionState.ThrowTypeError("cannot convert to dictionary."); + return; + {% endif %} + } +@@ -44,7 +44,7 @@ void {{v8_class}}::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, {{ + + {% if parent_v8_class %} + {{parent_v8_class}}::toImpl(isolate, v8Value, impl, exceptionState); +- if (exceptionState.hadException()) ++ if (exceptionState.HadException()) + return; + + {% endif %} +@@ -58,12 +58,12 @@ void {{v8_class}}::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, {{ + {% filter runtime_enabled(member.runtime_enabled_feature_name) %} + v8::Local<v8::Value> {{member.name}}Value; + if (!v8Object->Get(context, keys[{{loop.index0}}].Get(isolate)).ToLocal(&{{member.name}}Value)) { +- exceptionState.rethrowV8Exception(block.Exception()); ++ exceptionState.RethrowV8Exception(block.Exception()); + return; + } + if ({{member.name}}Value.IsEmpty() || {{member.name}}Value->IsUndefined()) { + {% if member.is_required %} +- exceptionState.throwTypeError("required member {{member.name}} is undefined."); ++ exceptionState.ThrowTypeError("required member {{member.name}} is undefined."); + return; + {% else %} + // Do nothing. +@@ -74,22 +74,22 @@ void {{v8_class}}::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, {{ + {% endif %} + } else { + {% if member.deprecate_as %} +- Deprecation::countDeprecation(currentExecutionContext(isolate), UseCounter::{{member.deprecate_as}}); ++ Deprecation::CountDeprecation(CurrentExecutionContext(isolate), UseCounter::k{{member.deprecate_as}}); + {% endif %} + {{v8_value_to_local_cpp_value(member) | indent}} + {% if member.is_interface_type %} + if (!{{member.name}}) { +- exceptionState.throwTypeError("member {{member.name}} is not of type {{member.idl_type}}."); ++ exceptionState.ThrowTypeError("member {{member.name}} is not of type {{member.idl_type}}."); + return; + } + {% endif %} + {% if member.enum_values %} + {{declare_enum_validation_variable(member.enum_values) | indent}} +- if (!isValidEnum({{member.name}}, validValues, WTF_ARRAY_LENGTH(validValues), "{{member.enum_type}}", exceptionState)) ++ if (!IsValidEnum({{member.name}}, validValues, WTF_ARRAY_LENGTH(validValues), "{{member.enum_type}}", exceptionState)) + return; + {% elif member.is_object %} +- if (!{{member.name}}.isObject()) { +- exceptionState.throwTypeError("member {{member.name}} is not an object."); ++ if (!{{member.name}}.IsObject()) { ++ exceptionState.ThrowTypeError("member {{member.name}} is not an object."); + return; + } + {% endif %} +@@ -100,7 +100,7 @@ void {{v8_class}}::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, {{ + {% endfor %} + } + +-v8::Local<v8::Value> {{cpp_class}}::toV8Impl(v8::Local<v8::Object> creationContext, v8::Isolate* isolate) const { ++v8::Local<v8::Value> {{cpp_class}}::ToV8Impl(v8::Local<v8::Object> creationContext, v8::Isolate* isolate) const { + v8::Local<v8::Object> v8Object = v8::Object::New(isolate); + if (!toV8{{cpp_class}}(*this, v8Object, creationContext, isolate)) + return v8::Undefined(isolate); +@@ -122,7 +122,7 @@ bool toV8{{cpp_class}}(const {{cpp_class}}& impl, v8::Local<v8::Object> dictiona + bool {{member.name}}HasValueOrDefault = false; + if (impl.{{member.has_method_name}}()) { + {% if member.is_object %} +- DCHECK(impl.{{member.getter_name}}().isObject()); ++ DCHECK(impl.{{member.getter_name}}().IsObject()); + {% endif %} + {{member.name}}Value = {{member.cpp_value_to_v8_value}}; + {{member.name}}HasValueOrDefault = true; +@@ -144,7 +144,7 @@ bool toV8{{cpp_class}}(const {{cpp_class}}& impl, v8::Local<v8::Object> dictiona + If there is not, then the compiler will inline this call into the only branch that sets it to true. + Either way, the code is efficient and the variable is completely elided. #} + if ({{member.name}}HasValueOrDefault && +- !v8CallBoolean(dictionary->CreateDataProperty(context, keys[{{loop.index0}}].Get(isolate), {{member.name}}Value))) { ++ !V8CallBoolean(dictionary->CreateDataProperty(context, keys[{{loop.index0}}].Get(isolate), {{member.name}}Value))) { + return false; + } + +@@ -152,7 +152,7 @@ bool toV8{{cpp_class}}(const {{cpp_class}}& impl, v8::Local<v8::Object> dictiona + return true; + } + +-{{cpp_class}} NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) { ++{{cpp_class}} NativeValueTraits<{{cpp_class}}>::NativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) { + {{cpp_class}} impl; + {{v8_class}}::toImpl(isolate, value, impl, exceptionState); + return impl; +diff --git a/third_party/WebKit/Source/bindings/templates/dictionary_v8.h.tmpl b/third_party/WebKit/Source/bindings/templates/dictionary_v8.h.tmpl +index 59e14fdb5a2d..39d821385fc4 100644 +--- a/third_party/WebKit/Source/bindings/templates/dictionary_v8.h.tmpl ++++ b/third_party/WebKit/Source/bindings/templates/dictionary_v8.h.tmpl +@@ -20,18 +20,18 @@ class {{v8_class}} { + {{exported}}bool toV8{{cpp_class}}(const {{cpp_class}}&, v8::Local<v8::Object> dictionary, v8::Local<v8::Object> creationContext, v8::Isolate*); + + template <class CallbackInfo> +-inline void v8SetReturnValue(const CallbackInfo& callbackInfo, {{cpp_class}}& impl) { +- v8SetReturnValue(callbackInfo, ToV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate())); ++inline void V8SetReturnValue(const CallbackInfo& callbackInfo, {{cpp_class}}& impl) { ++ V8SetReturnValue(callbackInfo, ToV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate())); + } + + template <class CallbackInfo> +-inline void v8SetReturnValue(const CallbackInfo& callbackInfo, {{cpp_class}}& impl, v8::Local<v8::Object> creationContext) { +- v8SetReturnValue(callbackInfo, ToV8(impl, creationContext, callbackInfo.GetIsolate())); ++inline void V8SetReturnValue(const CallbackInfo& callbackInfo, {{cpp_class}}& impl, v8::Local<v8::Object> creationContext) { ++ V8SetReturnValue(callbackInfo, ToV8(impl, creationContext, callbackInfo.GetIsolate())); + } + + template <> + struct NativeValueTraits<{{cpp_class}}> : public NativeValueTraitsBase<{{cpp_class}}> { +- {{exported}}static {{cpp_class}} nativeValue(v8::Isolate*, v8::Local<v8::Value>, ExceptionState&); ++ {{exported}}static {{cpp_class}} NativeValue(v8::Isolate*, v8::Local<v8::Value>, ExceptionState&); + }; + + template <> +diff --git a/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl +index e840b30e4d2e..289ea7ebb4ac 100644 +--- a/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl ++++ b/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl +@@ -6,7 +6,7 @@ + {% set getter = indexed_property_getter %} + static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info) { + {% if getter.is_raises_exception %} +- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::IndexedGetterContext, "{{interface_name}}"); ++ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kIndexedGetterContext, "{{interface_name}}"); + {% endif %} + + {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); +@@ -18,10 +18,10 @@ static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo + if (index >= impl->length()) + return; // Returns undefined due to out-of-range. + +- {% set getter_name = getter.name or 'anonymousIndexedGetter' %} ++ {% set getter_name = getter.name or 'AnonymousIndexedGetter' %} + {% set getter_arguments = ['index'] %} + {% if getter.is_call_with_script_state %} +- ScriptState* scriptState = ScriptState::forReceiverObject(info); ++ ScriptState* scriptState = ScriptState::ForReceiverObject(info); + {% set getter_arguments = ['scriptState'] + getter_arguments %} + {% endif %} + {% if getter.is_raises_exception %} +@@ -50,7 +50,7 @@ void {{v8_class_or_partial}}::indexedPropertyGetterCallback(uint32_t index, cons + + {% else %}{# otherwise, named property #} + +- const AtomicString& propertyName = AtomicString::number(index); ++ const AtomicString& propertyName = AtomicString::Number(index); + + {% if getter.is_custom %} + {{v8_class}}::namedPropertyGetterCustom(propertyName, info); +@@ -72,7 +72,7 @@ void {{v8_class_or_partial}}::indexedPropertyGetterCallback(uint32_t index, cons + {% set setter = indexed_property_setter %} + static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) { + {% if setter.has_exception_state %} +- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::IndexedSetterContext, "{{interface_name}}"); ++ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kIndexedSetterContext, "{{interface_name}}"); + {% endif %} + + {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); +@@ -80,16 +80,16 @@ static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value, + {% if setter.has_type_checking_interface %} + {# Type checking for interface types (if interface not implemented, throw + TypeError), per http://www.w3.org/TR/WebIDL/#es-interface #} +- if (!propertyValue{% if setter.is_nullable %} && !isUndefinedOrNull(v8Value){% endif %}) { +- exceptionState.throwTypeError("The provided value is not of type '{{setter.idl_type}}'."); ++ if (!propertyValue{% if setter.is_nullable %} && !IsUndefinedOrNull(v8Value){% endif %}) { ++ exceptionState.ThrowTypeError("The provided value is not of type '{{setter.idl_type}}'."); + return; + } + {% endif %} + +- {% set setter_name = setter.name or 'anonymousIndexedSetter' %} ++ {% set setter_name = setter.name or 'AnonymousIndexedSetter' %} + {% set setter_arguments = ['index', 'propertyValue'] %} + {% if setter.is_call_with_script_state %} +- ScriptState* scriptState = ScriptState::forReceiverObject(info); ++ ScriptState* scriptState = ScriptState::ForReceiverObject(info); + {% set setter_arguments = ['scriptState'] + setter_arguments %} + {% endif %} + {% if setter.is_raises_exception %} +@@ -97,12 +97,12 @@ static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value, + {% endif %} + bool result = impl->{{setter_name}}({{setter_arguments | join(', ')}}); + {% if setter.is_raises_exception %} +- if (exceptionState.hadException()) ++ if (exceptionState.HadException()) + return; + {% endif %} + if (!result) + return; +- v8SetReturnValue(info, v8Value); ++ V8SetReturnValue(info, v8Value); + } + + {% endif %} +@@ -128,7 +128,7 @@ void {{v8_class_or_partial}}::indexedPropertySetterCallback(uint32_t index, v8:: + + {% else %}{# otherwise, named property #} + +- const AtomicString& propertyName = AtomicString::number(index); ++ const AtomicString& propertyName = AtomicString::Number(index); + + {% if setter.is_custom %} + {{v8_class}}::namedPropertySetterCustom(propertyName, v8Value, info); +@@ -149,15 +149,15 @@ void {{v8_class_or_partial}}::indexedPropertySetterCallback(uint32_t index, v8:: + {% set deleter = indexed_property_deleter %} + static void indexedPropertyDeleter(uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>& info) { + {% if deleter.is_raises_exception %} +- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::IndexedDeletionContext, "{{interface_name}}"); ++ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kIndexedDeletionContext, "{{interface_name}}"); + {% endif %} + + {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); + +- {% set deleter_name = deleter.name or 'anonymousIndexedDeleter' %} ++ {% set deleter_name = deleter.name or 'AnonymousIndexedDeleter' %} + {% set deleter_arguments = ['index'] %} + {% if deleter.is_call_with_script_state %} +- ScriptState* scriptState = ScriptState::forReceiverObject(info); ++ ScriptState* scriptState = ScriptState::ForReceiverObject(info); + {% set deleter_arguments = ['scriptState'] + deleter_arguments %} + {% endif %} + {% if deleter.is_raises_exception %} +@@ -165,12 +165,12 @@ static void indexedPropertyDeleter(uint32_t index, const v8::PropertyCallbackInf + {% endif %} + DeleteResult result = impl->{{deleter_name}}({{deleter_arguments | join(', ')}}); + {% if deleter.is_raises_exception %} +- if (exceptionState.hadException()) ++ if (exceptionState.HadException()) + return; + {% endif %} +- if (result == DeleteUnknownProperty) ++ if (result == kDeleteUnknownProperty) + return; +- v8SetReturnValue(info, result == DeleteSuccess); ++ V8SetReturnValue(info, result == kDeleteSuccess); + } + + {% endif %} +@@ -196,7 +196,7 @@ void {{v8_class_or_partial}}::indexedPropertyDeleterCallback(uint32_t index, con + + {% else %}{# otherwise, named property #} + +- const AtomicString& propertyName = AtomicString::number(index); ++ const AtomicString& propertyName = AtomicString::Number(index); + + {% if deleter.is_custom %} + {{v8_class}}::namedPropertyDeleterCustom(propertyName, info); +@@ -217,11 +217,11 @@ void {{v8_class_or_partial}}::indexedPropertyDeleterCallback(uint32_t index, con + {% set getter = named_property_getter %} + static void namedPropertyGetter(const AtomicString& name, const v8::PropertyCallbackInfo<v8::Value>& info) { + {% if getter.is_raises_exception %} +- const CString& nameInUtf8 = name.utf8(); +- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::GetterContext, "{{interface_name}}", nameInUtf8.data()); ++ const CString& nameInUtf8 = name.Utf8(); ++ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kGetterContext, "{{interface_name}}", nameInUtf8.Data()); + {% endif %} + {% if getter.is_call_with_script_state %} +- ScriptState* scriptState = ScriptState::forReceiverObject(info); ++ ScriptState* scriptState = ScriptState::ForReceiverObject(info); + {% endif %} + + {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); +@@ -247,7 +247,7 @@ static void namedPropertyGetter(const AtomicString& name, const v8::PropertyCall + void {{v8_class_or_partial}}::namedPropertyGetterCallback(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) { + if (!name->IsString()) + return; +- const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>()); ++ const AtomicString& propertyName = ToCoreAtomicString(name.As<v8::String>()); + + {% if getter.is_custom %} + {{v8_class}}::namedPropertyGetterCustom(propertyName, info); +@@ -267,11 +267,11 @@ void {{v8_class_or_partial}}::namedPropertyGetterCallback(v8::Local<v8::Name> na + {% set setter = named_property_setter %} + static void namedPropertySetter(const AtomicString& name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) { + {% if setter.has_exception_state %} +- const CString& nameInUtf8 = name.utf8(); +- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "{{interface_name}}", nameInUtf8.data()); ++ const CString& nameInUtf8 = name.Utf8(); ++ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kSetterContext, "{{interface_name}}", nameInUtf8.Data()); + {% endif %} + {% if setter.is_call_with_script_state %} +- ScriptState* scriptState = ScriptState::forReceiverObject(info); ++ ScriptState* scriptState = ScriptState::ForReceiverObject(info); + {% endif %} + + {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); +@@ -279,13 +279,13 @@ static void namedPropertySetter(const AtomicString& name, v8::Local<v8::Value> v + {% if setter.has_type_checking_interface %} + {# Type checking for interface types (if interface not implemented, throw + TypeError), per http://www.w3.org/TR/WebIDL/#es-interface #} +- if (!propertyValue{% if setter.is_nullable %} && !isUndefinedOrNull(v8Value){% endif %}) { +- exceptionState.throwTypeError("The provided value is not of type '{{setter.idl_type}}'."); ++ if (!propertyValue{% if setter.is_nullable %} && !IsUndefinedOrNull(v8Value){% endif %}) { ++ exceptionState.ThrowTypeError("The provided value is not of type '{{setter.idl_type}}'."); + return; + } + {% endif %} + +- {% set setter_name = setter.name or 'anonymousNamedSetter' %} ++ {% set setter_name = setter.name or 'AnonymousNamedSetter' %} + {% set setter_arguments = ['name', 'propertyValue'] %} + {% if setter.is_call_with_script_state %} + {% set setter_arguments = ['scriptState'] + setter_arguments %} +@@ -295,12 +295,12 @@ static void namedPropertySetter(const AtomicString& name, v8::Local<v8::Value> v + {% endif %} + bool result = impl->{{setter_name}}({{setter_arguments | join(', ')}}); + {% if setter.is_raises_exception %} +- if (exceptionState.hadException()) ++ if (exceptionState.HadException()) + return; + {% endif %} + if (!result) + return; +- v8SetReturnValue(info, v8Value); ++ V8SetReturnValue(info, v8Value); + } + + {% endif %} +@@ -314,7 +314,7 @@ static void namedPropertySetter(const AtomicString& name, v8::Local<v8::Value> v + void {{v8_class_or_partial}}::namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) { + if (!name->IsString()) + return; +- const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>()); ++ const AtomicString& propertyName = ToCoreAtomicString(name.As<v8::String>()); + + {% if setter.is_ce_reactions %} + CEReactionsScope ceReactionsScope; +@@ -337,16 +337,16 @@ void {{v8_class_or_partial}}::namedPropertySetterCallback(v8::Local<v8::Name> na + {% set deleter = named_property_deleter %} + static void namedPropertyDeleter(const AtomicString& name, const v8::PropertyCallbackInfo<v8::Boolean>& info) { + {% if deleter.is_raises_exception %} +- const CString& nameInUtf8 = name.utf8(); +- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::DeletionContext, "{{interface_name}}", nameInUtf8.data()); ++ const CString& nameInUtf8 = name.Utf8(); ++ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kDeletionContext, "{{interface_name}}", nameInUtf8.Data()); + {% endif %} + {% if deleter.is_call_with_script_state %} +- ScriptState* scriptState = ScriptState::forReceiverObject(info); ++ ScriptState* scriptState = ScriptState::ForReceiverObject(info); + {% endif %} + + {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); + +- {% set deleter_name = deleter.name or 'anonymousNamedDeleter' %} ++ {% set deleter_name = deleter.name or 'AnonymousNamedDeleter' %} + {% set deleter_arguments = ['name'] %} + {% if deleter.is_call_with_script_state %} + {% set deleter_arguments = ['scriptState'] + deleter_arguments %} +@@ -356,12 +356,12 @@ static void namedPropertyDeleter(const AtomicString& name, const v8::PropertyCal + {% endif %} + DeleteResult result = impl->{{deleter_name}}({{deleter_arguments | join(', ')}}); + {% if deleter.is_raises_exception %} +- if (exceptionState.hadException()) ++ if (exceptionState.HadException()) + return; + {% endif %} +- if (result == DeleteUnknownProperty) ++ if (result == kDeleteUnknownProperty) + return; +- v8SetReturnValue(info, result == DeleteSuccess); ++ V8SetReturnValue(info, result == kDeleteSuccess); + } + + {% endif %} +@@ -375,7 +375,7 @@ static void namedPropertyDeleter(const AtomicString& name, const v8::PropertyCal + void {{v8_class_or_partial}}::namedPropertyDeleterCallback(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Boolean>& info) { + if (!name->IsString()) + return; +- const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>()); ++ const AtomicString& propertyName = ToCoreAtomicString(name.As<v8::String>()); + + {% if deleter.is_ce_reactions %} + CEReactionsScope ceReactionsScope; +@@ -400,10 +400,10 @@ void {{v8_class_or_partial}}::namedPropertyDeleterCallback(v8::Local<v8::Name> n + {# If there is an enumerator, there MUST be a query method to properly + communicate property attributes. #} + static void namedPropertyQuery(const AtomicString& name, const v8::PropertyCallbackInfo<v8::Integer>& info) { +- const CString& nameInUtf8 = name.utf8(); +- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::GetterContext, "{{interface_name}}", nameInUtf8.data()); ++ const CString& nameInUtf8 = name.Utf8(); ++ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kGetterContext, "{{interface_name}}", nameInUtf8.Data()); + {% if getter.is_call_with_script_state %} +- ScriptState* scriptState = ScriptState::forReceiverObject(info); ++ ScriptState* scriptState = ScriptState::ForReceiverObject(info); + {% endif %} + + {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); +@@ -412,10 +412,10 @@ static void namedPropertyQuery(const AtomicString& name, const v8::PropertyCallb + {% if getter.is_call_with_script_state %} + {% set getter_arguments = ['scriptState'] + getter_arguments %} + {% endif %} +- bool result = impl->namedPropertyQuery({{getter_arguments | join(', ')}}); ++ bool result = impl->NamedPropertyQuery({{getter_arguments | join(', ')}}); + if (!result) + return; +- v8SetReturnValueInt(info, v8::None); ++ V8SetReturnValueInt(info, v8::None); + } + + {% endif %} +@@ -429,7 +429,7 @@ static void namedPropertyQuery(const AtomicString& name, const v8::PropertyCallb + void {{v8_class_or_partial}}::namedPropertyQueryCallback(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Integer>& info) { + if (!name->IsString()) + return; +- const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>()); ++ const AtomicString& propertyName = ToCoreAtomicString(name.As<v8::String>()); + + {% if getter.is_custom_property_query %} + {{v8_class}}::namedPropertyQueryCustom(propertyName, info); +@@ -447,15 +447,15 @@ void {{v8_class_or_partial}}::namedPropertyQueryCallback(v8::Local<v8::Name> nam + {% if named_property_getter and named_property_getter.is_enumerable and + not named_property_getter.is_custom_property_enumerator %} + static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& info) { +- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::EnumerationContext, "{{interface_name}}"); ++ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kEnumerationContext, "{{interface_name}}"); + + {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); + + Vector<String> names; +- impl->namedPropertyEnumerator(names, exceptionState); +- if (exceptionState.hadException()) ++ impl->NamedPropertyEnumerator(names, exceptionState); ++ if (exceptionState.HadException()) + return; +- v8SetReturnValue(info, ToV8(names, info.Holder(), info.GetIsolate()).As<v8::Array>()); ++ V8SetReturnValue(info, ToV8(names, info.Holder(), info.GetIsolate()).As<v8::Array>()); + } + + {% endif %} +@@ -492,8 +492,8 @@ static void {{cpp_class}}OriginSafeMethodSetter(v8::Local<v8::Name> name, v8::Lo + return; + {{cpp_class}}* impl = {{v8_class}}::toImpl(holder); + v8::String::Utf8Value methodName(name); +- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "{{interface_name}}", *methodName); +- if (!BindingSecurity::shouldAllowAccessTo(currentDOMWindow(info.GetIsolate()), impl, exceptionState)) { ++ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kSetterContext, "{{interface_name}}", *methodName); ++ if (!BindingSecurity::ShouldAllowAccessTo(CurrentDOMWindow(info.GetIsolate()), impl, exceptionState)) { + return; + } + +@@ -503,8 +503,8 @@ static void {{cpp_class}}OriginSafeMethodSetter(v8::Local<v8::Name> name, v8::Lo + // {{method.name}}OriginSafeMethodGetter{{world_suffix}} defined in + // methods.cpp.tmpl + {% endraw %} +- V8PrivateProperty::getSymbol(info.GetIsolate(), *methodName) +- .set(v8::Local<v8::Object>::Cast(info.Holder()), v8Value); ++ V8PrivateProperty::GetSymbol(info.GetIsolate(), *methodName) ++ .Set(v8::Local<v8::Object>::Cast(info.Holder()), v8Value); + } + {% endif %} + {% endblock %} +@@ -523,16 +523,16 @@ void {{v8_class_or_partial}}::{{cpp_class}}OriginSafeMethodSetterCallback(v8::Lo + {% from 'methods.cpp.tmpl' import generate_constructor with context %} + {% if named_constructor %} + {% set active_scriptwrappable_inheritance = +- 'InheritFromActiveScriptWrappable' ++ 'kInheritFromActiveScriptWrappable' + if active_scriptwrappable else +- 'NotInheritFromActiveScriptWrappable' %} ++ 'kNotInheritFromActiveScriptWrappable' %} + // Suppress warning: global constructors, because struct WrapperTypeInfo is trivial + // and does not depend on another global objects. + #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wglobal-constructors" + #endif +-const WrapperTypeInfo {{v8_class}}Constructor::wrapperTypeInfo = { gin::kEmbedderBlink, {{v8_class}}Constructor::domTemplate, {{v8_class}}::trace, {{v8_class}}::traceWrappers, {{prepare_prototype_and_interface_object_func or 'nullptr'}}, "{{interface_name}}", 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::{{wrapper_class_id}}, WrapperTypeInfo::{{active_scriptwrappable_inheritance}}, WrapperTypeInfo::{{lifetime}} }; ++const WrapperTypeInfo {{v8_class}}Constructor::wrapperTypeInfo = { gin::kEmbedderBlink, {{v8_class}}Constructor::domTemplate, {{v8_class}}::Trace, {{v8_class}}::TraceWrappers, {{prepare_prototype_and_interface_object_func or 'nullptr'}}, "{{interface_name}}", 0, WrapperTypeInfo::kWrapperTypeObjectPrototype, WrapperTypeInfo::{{wrapper_class_id}}, WrapperTypeInfo::{{active_scriptwrappable_inheritance}}, WrapperTypeInfo::{{lifetime}} }; + #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) + #pragma clang diagnostic pop + #endif +@@ -540,17 +540,17 @@ const WrapperTypeInfo {{v8_class}}Constructor::wrapperTypeInfo = { gin::kEmbedde + {{generate_constructor(named_constructor)}} + v8::Local<v8::FunctionTemplate> {{v8_class}}Constructor::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) { + static int domTemplateKey; // This address is used for a key to look up the dom template. +- V8PerIsolateData* data = V8PerIsolateData::from(isolate); +- v8::Local<v8::FunctionTemplate> result = data->findInterfaceTemplate(world, &domTemplateKey); ++ V8PerIsolateData* data = V8PerIsolateData::From(isolate); ++ v8::Local<v8::FunctionTemplate> result = data->FindInterfaceTemplate(world, &domTemplateKey); + if (!result.IsEmpty()) + return result; + + result = v8::FunctionTemplate::New(isolate, {{v8_class}}ConstructorCallback); + v8::Local<v8::ObjectTemplate> instanceTemplate = result->InstanceTemplate(); + instanceTemplate->SetInternalFieldCount({{v8_class}}::internalFieldCount); +- result->SetClassName(v8AtomicString(isolate, "{{named_constructor.name}}")); ++ result->SetClassName(V8AtomicString(isolate, "{{named_constructor.name}}")); + result->Inherit({{v8_class}}::domTemplate(isolate, world)); +- data->setInterfaceTemplate(world, &domTemplateKey, result); ++ data->SetInterfaceTemplate(world, &domTemplateKey, result); + return result; + } + +@@ -558,29 +558,29 @@ void {{v8_class}}Constructor::NamedConstructorAttributeGetter( + v8::Local<v8::Name> propertyName, + const v8::PropertyCallbackInfo<v8::Value>& info) { + v8::Local<v8::Context> creationContext = info.Holder()->CreationContext(); +- V8PerContextData* perContextData = V8PerContextData::from(creationContext); ++ V8PerContextData* perContextData = V8PerContextData::From(creationContext); + if (!perContextData) { + // TODO(yukishiino): Return a valid named constructor even after the context is detached + return; + } + +- v8::Local<v8::Function> namedConstructor = perContextData->constructorForType(&{{v8_class}}Constructor::wrapperTypeInfo); ++ v8::Local<v8::Function> namedConstructor = perContextData->ConstructorForType(&{{v8_class}}Constructor::wrapperTypeInfo); + + // Set the prototype of named constructors to the regular constructor. +- auto privateProperty = V8PrivateProperty::getNamedConstructorInitialized(info.GetIsolate()); ++ auto privateProperty = V8PrivateProperty::GetNamedConstructorInitialized(info.GetIsolate()); + v8::Local<v8::Context> currentContext = info.GetIsolate()->GetCurrentContext(); +- v8::Local<v8::Value> privateValue = privateProperty.getOrEmpty(namedConstructor); ++ v8::Local<v8::Value> privateValue = privateProperty.GetOrEmpty(namedConstructor); + + if (privateValue.IsEmpty()) { +- v8::Local<v8::Function> interface = perContextData->constructorForType(&{{v8_class}}::wrapperTypeInfo); +- v8::Local<v8::Value> interfacePrototype = interface->Get(currentContext, v8AtomicString(info.GetIsolate(), "prototype")).ToLocalChecked(); +- bool result = namedConstructor->Set(currentContext, v8AtomicString(info.GetIsolate(), "prototype"), interfacePrototype).ToChecked(); ++ v8::Local<v8::Function> interface = perContextData->ConstructorForType(&{{v8_class}}::wrapperTypeInfo); ++ v8::Local<v8::Value> interfacePrototype = interface->Get(currentContext, V8AtomicString(info.GetIsolate(), "prototype")).ToLocalChecked(); ++ bool result = namedConstructor->Set(currentContext, V8AtomicString(info.GetIsolate(), "prototype"), interfacePrototype).ToChecked(); + if (!result) + return; +- privateProperty.set(namedConstructor, v8::True(info.GetIsolate())); ++ privateProperty.Set(namedConstructor, v8::True(info.GetIsolate())); + } + +- v8SetReturnValue(info, namedConstructor); ++ V8SetReturnValue(info, namedConstructor); + } + + {% endif %} +@@ -590,7 +590,7 @@ void {{v8_class}}Constructor::NamedConstructorAttributeGetter( + {% block overloaded_constructor %} + {% if constructor_overloads %} + static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) { +- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ConstructionContext, "{{interface_name}}"); ++ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kConstructionContext, "{{interface_name}}"); + {# 2. Initialize argcount to be min(maxarg, n). #} + switch (std::min({{constructor_overloads.maxarg}}, info.Length())) { + {# 3. Remove from S all entries whose type list is not of length argcount. #} +@@ -611,16 +611,16 @@ static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) { + {# Report full list of valid arities if gaps and above minimum #} + {% if constructor_overloads.valid_arities %} + if (info.Length() >= {{constructor_overloads.length}}) { +- exceptionState.throwTypeError(ExceptionMessages::invalidArity("{{constructor_overloads.valid_arities}}", info.Length())); ++ exceptionState.ThrowTypeError(ExceptionMessages::InvalidArity("{{constructor_overloads.valid_arities}}", info.Length())); + return; + } + {% endif %} + {# Otherwise just report "not enough arguments" #} +- exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments({{constructor_overloads.length}}, info.Length())); ++ exceptionState.ThrowTypeError(ExceptionMessages::NotEnoughArguments({{constructor_overloads.length}}, info.Length())); + return; + } + {# No match, throw error #} +- exceptionState.throwTypeError("No matching constructor signature."); ++ exceptionState.ThrowTypeError("No matching constructor signature."); + } + + {% endif %} +@@ -632,22 +632,22 @@ static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) { + {% if constructors or has_custom_constructor or has_event_constructor or has_html_constructor %} + void {{v8_class}}::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { + {% if measure_as %} +- UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::{{measure_as('Constructor')}}); ++ UseCounter::Count(CurrentExecutionContext(info.GetIsolate()), UseCounter::k{{measure_as('Constructor')}}); + {% endif %} + if (!info.IsConstructCall()) { +- V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::constructorNotCallableAsFunction("{{interface_name}}")); ++ V8ThrowException::ThrowTypeError(info.GetIsolate(), ExceptionMessages::ConstructorNotCallableAsFunction("{{interface_name}}")); + return; + } + +- if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExistingObject) { +- v8SetReturnValue(info, info.Holder()); ++ if (ConstructorMode::Current(info.GetIsolate()) == ConstructorMode::kWrapExistingObject) { ++ V8SetReturnValue(info, info.Holder()); + return; + } + + {% if has_custom_constructor %} + {{v8_class}}::constructorCustom(info); + {% elif has_html_constructor %} +- V8HTMLConstructor::htmlConstructor(info, {{v8_class}}::wrapperTypeInfo, HTMLElementType::k{{interface_name}}); ++ V8HTMLConstructor::HtmlConstructor(info, {{v8_class}}::wrapperTypeInfo, HTMLElementType::k{{interface_name}}); + {% else %} + {{cpp_class}}V8Internal::constructor(info); + {% endif %} +@@ -672,7 +672,7 @@ void {{v8_class}}::constructorCallback(const v8::FunctionCallbackInfo<v8::Value> + {% set property_attribute = + 'static_cast<v8::PropertyAttribute>(%s)' % + ' | '.join(method.property_attributes or ['v8::None']) %} +-{% set holder_check = 'V8DOMConfiguration::CheckHolder' %} ++{% set holder_check = 'V8DOMConfiguration::kCheckHolder' %} + static const V8DOMConfiguration::AttributeConfiguration {{method.name}}OriginSafeAttributeConfiguration[] = { + {% if method.is_per_world_bindings %} + {% set getter_callback_for_main_world = '%sForMainWorld' % getter_callback %} +@@ -681,11 +681,11 @@ static const V8DOMConfiguration::AttributeConfiguration {{method.name}}OriginSaf + {"{{method.name}}", {{getter_callback_for_main_world}}, {{setter_callback_for_main_world}}, nullptr, &{{v8_class}}::wrapperTypeInfo, {{property_attribute}}, {{property_location(method)}}, {{holder_check}}, V8DOMConfiguration::MainWorld}, + {"{{method.name}}", {{getter_callback}}, {{setter_callback}}, nullptr, &{{v8_class}}::wrapperTypeInfo, {{property_attribute}}, {{property_location(method)}}, {{holder_check}}, V8DOMConfiguration::NonMainWorlds}} + {% else %} +- {"{{method.name}}", {{getter_callback}}, {{setter_callback}}, nullptr, &{{v8_class}}::wrapperTypeInfo, {{property_attribute}}, {{property_location(method)}}, {{holder_check}}, V8DOMConfiguration::AllWorlds} ++ {"{{method.name}}", {{getter_callback}}, {{setter_callback}}, nullptr, &{{v8_class}}::wrapperTypeInfo, {{property_attribute}}, {{property_location(method)}}, {{holder_check}}, V8DOMConfiguration::kAllWorlds} + {% endif %} + }; + for (const auto& attributeConfig : {{method.name}}OriginSafeAttributeConfiguration) +- V8DOMConfiguration::installAttribute(isolate, world, {{instance_template}}, {{prototype_template}}, attributeConfig); ++ V8DOMConfiguration::InstallAttribute(isolate, world, {{instance_template}}, {{prototype_template}}, attributeConfig); + {%- endmacro %} + + +@@ -701,7 +701,7 @@ for (const auto& attributeConfig : {{method.name}}OriginSafeAttributeConfigurati + '%s::indexedPropertyDeleterCallback' % v8_class_or_partial + if indexed_property_deleter or named_property_deleter else 'nullptr' %} + {% set indexed_property_enumerator_callback = +- 'indexedPropertyEnumerator<%s>' % cpp_class ++ 'IndexedPropertyEnumerator<%s>' % cpp_class + if indexed_property_getter.is_enumerable else 'nullptr' %} + {% set property_handler_flags = + 'v8::PropertyHandlerFlags::kNone' %} +@@ -745,7 +745,7 @@ v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig({{named_propert + {% if not is_array_buffer_or_view %} + v8::Local<v8::FunctionTemplate> {{v8_class}}::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) { + {% set installTemplateFunction = '%s::install%sTemplateFunction' % (v8_class, v8_class) if has_partial_interface else 'install%sTemplate' % v8_class %} +- return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), {{installTemplateFunction}}); ++ return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), {{installTemplateFunction}}); + } + + {% endif %} +@@ -758,15 +758,15 @@ v8::Local<v8::FunctionTemplate> {{v8_class}}::domTemplate(v8::Isolate* isolate, + v8::Local<v8::FunctionTemplate> {{v8_class}}::domTemplateForNamedPropertiesObject(v8::Isolate* isolate, const DOMWrapperWorld& world) { + v8::Local<v8::FunctionTemplate> parentTemplate = V8{{parent_interface}}::domTemplate(isolate, world); + +- v8::Local<v8::FunctionTemplate> namedPropertiesObjectFunctionTemplate = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidConstructorMode); +- namedPropertiesObjectFunctionTemplate->SetClassName(v8AtomicString(isolate, "{{interface_name}}Properties")); ++ v8::Local<v8::FunctionTemplate> namedPropertiesObjectFunctionTemplate = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::IsValidConstructorMode); ++ namedPropertiesObjectFunctionTemplate->SetClassName(V8AtomicString(isolate, "{{interface_name}}Properties")); + namedPropertiesObjectFunctionTemplate->Inherit(parentTemplate); + + v8::Local<v8::ObjectTemplate> namedPropertiesObjectTemplate = namedPropertiesObjectFunctionTemplate->PrototypeTemplate(); + namedPropertiesObjectTemplate->SetInternalFieldCount({{v8_class}}::internalFieldCount); + // Named Properties object has SetPrototype method of Immutable Prototype Exotic Objects + namedPropertiesObjectTemplate->SetImmutableProto(); +- V8DOMConfiguration::setClassString(isolate, namedPropertiesObjectTemplate, "{{interface_name}}Properties"); ++ V8DOMConfiguration::SetClassString(isolate, namedPropertiesObjectTemplate, "{{interface_name}}Properties"); + {{install_named_property_handler('namedPropertiesObjectTemplate') | indent(2)}} + + return namedPropertiesObjectFunctionTemplate; +@@ -781,11 +781,11 @@ v8::Local<v8::FunctionTemplate> {{v8_class}}::domTemplateForNamedPropertiesObjec + {% if not is_array_buffer_or_view %} + + bool {{v8_class}}::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) { +- return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value); ++ return V8PerIsolateData::From(isolate)->HasInstance(&wrapperTypeInfo, v8Value); + } + + v8::Local<v8::Object> {{v8_class}}::findInstanceInPrototypeChain(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) { +- return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperTypeInfo, v8Value); ++ return V8PerIsolateData::From(isolate)->FindInstanceInPrototypeChain(&wrapperTypeInfo, v8Value); + } + + {% endif %} +@@ -799,19 +799,19 @@ v8::Local<v8::Object> {{v8_class}}::findInstanceInPrototypeChain(v8::Local<v8::V + DCHECK(object->Is{{interface_name}}()); + v8::Local<v8::{{interface_name}}> v8buffer = object.As<v8::{{interface_name}}>(); + if (v8buffer->IsExternal()) { +- const WrapperTypeInfo* wrapperTypeInfo = toWrapperTypeInfo(object); ++ const WrapperTypeInfo* wrapperTypeInfo = ToWrapperTypeInfo(object); + CHECK(wrapperTypeInfo); +- CHECK_EQ(wrapperTypeInfo->ginEmbedder, gin::kEmbedderBlink); +- return toScriptWrappable(object)->toImpl<{{cpp_class}}>(); ++ CHECK_EQ(wrapperTypeInfo->gin_embedder, gin::kEmbedderBlink); ++ return ToScriptWrappable(object)->ToImpl<{{cpp_class}}>(); + } + + // Transfer the ownership of the allocated memory to an {{interface_name}} without + // copying. + v8::{{interface_name}}::Contents v8Contents = v8buffer->Externalize(); +- WTF::ArrayBufferContents::DataHandle data(v8Contents.Data(), WTF::ArrayBufferContents::freeMemory); +- WTF::ArrayBufferContents contents(std::move(data), v8Contents.ByteLength(), WTF::ArrayBufferContents::{% if interface_name == 'ArrayBuffer' %}Not{% endif %}Shared); +- {{cpp_class}}* buffer = {{cpp_class}}::create(contents); +- v8::Local<v8::Object> associatedWrapper = buffer->associateWithWrapper(v8::Isolate::GetCurrent(), buffer->wrapperTypeInfo(), object); ++ WTF::ArrayBufferContents::DataHandle data(v8Contents.Data(), WTF::ArrayBufferContents::FreeMemory); ++ WTF::ArrayBufferContents contents(std::move(data), v8Contents.ByteLength(), WTF::ArrayBufferContents::k{% if interface_name == 'ArrayBuffer' %}Not{% endif %}Shared); ++ {{cpp_class}}* buffer = {{cpp_class}}::Create(contents); ++ v8::Local<v8::Object> associatedWrapper = buffer->AssociateWithWrapper(v8::Isolate::GetCurrent(), buffer->GetWrapperTypeInfo(), object); + DCHECK(associatedWrapper == object); + + return buffer; +@@ -820,9 +820,9 @@ v8::Local<v8::Object> {{v8_class}}::findInstanceInPrototypeChain(v8::Local<v8::V + {% elif interface_name == 'ArrayBufferView' %} + {{cpp_class}}* V8ArrayBufferView::toImpl(v8::Local<v8::Object> object) { + DCHECK(object->IsArrayBufferView()); +- ScriptWrappable* scriptWrappable = toScriptWrappable(object); ++ ScriptWrappable* scriptWrappable = ToScriptWrappable(object); + if (scriptWrappable) +- return scriptWrappable->toImpl<{{cpp_class}}>(); ++ return scriptWrappable->ToImpl<{{cpp_class}}>(); + + if (object->IsInt8Array()) + return V8Int8Array::toImpl(object); +@@ -852,24 +852,24 @@ v8::Local<v8::Object> {{v8_class}}::findInstanceInPrototypeChain(v8::Local<v8::V + {% elif is_array_buffer_or_view %} + {{cpp_class}}* {{v8_class}}::toImpl(v8::Local<v8::Object> object) { + DCHECK(object->Is{{interface_name}}()); +- ScriptWrappable* scriptWrappable = toScriptWrappable(object); ++ ScriptWrappable* scriptWrappable = ToScriptWrappable(object); + if (scriptWrappable) +- return scriptWrappable->toImpl<{{cpp_class}}>(); ++ return scriptWrappable->ToImpl<{{cpp_class}}>(); + + v8::Local<v8::{{interface_name}}> v8View = object.As<v8::{{interface_name}}>(); + v8::Local<v8::Object> arrayBuffer = v8View->Buffer(); + {{cpp_class}}* typedArray = nullptr; + if (arrayBuffer->IsArrayBuffer()) { +- typedArray = {{cpp_class}}::create(V8ArrayBuffer::toImpl(arrayBuffer), v8View->ByteOffset(), v8View->{% if interface_name == 'DataView' %}Byte{% endif %}Length()); ++ typedArray = {{cpp_class}}::Create(V8ArrayBuffer::toImpl(arrayBuffer), v8View->ByteOffset(), v8View->{% if interface_name == 'DataView' %}Byte{% endif %}Length()); + } else if (arrayBuffer->IsSharedArrayBuffer()) { +- typedArray = {{cpp_class}}::create(V8SharedArrayBuffer::toImpl(arrayBuffer), v8View->ByteOffset(), v8View->{% if interface_name == 'DataView' %}Byte{% endif %}Length()); ++ typedArray = {{cpp_class}}::Create(V8SharedArrayBuffer::toImpl(arrayBuffer), v8View->ByteOffset(), v8View->{% if interface_name == 'DataView' %}Byte{% endif %}Length()); + } else { + NOTREACHED(); + } +- v8::Local<v8::Object> associatedWrapper = typedArray->associateWithWrapper(v8::Isolate::GetCurrent(), typedArray->wrapperTypeInfo(), object); ++ v8::Local<v8::Object> associatedWrapper = typedArray->AssociateWithWrapper(v8::Isolate::GetCurrent(), typedArray->GetWrapperTypeInfo(), object); + DCHECK(associatedWrapper == object); + +- return typedArray->toImpl<{{cpp_class}}>(); ++ return typedArray->ToImpl<{{cpp_class}}>(); + } + + {% endif %} +@@ -891,10 +891,10 @@ v8::Local<v8::Object> {{v8_class}}::findInstanceInPrototypeChain(v8::Local<v8::V + + {##############################################################################} + {% block native_value_traits %} +-{{cpp_class}}* NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) { ++{{cpp_class}}* NativeValueTraits<{{cpp_class}}>::NativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) { + {{cpp_class}}* nativeValue = {{v8_class}}::toImplWithTypeCheck(isolate, value); + if (!nativeValue) +- exceptionState.throwTypeError("Unable to convert value to {{interface_name}}."); ++ exceptionState.ThrowTypeError("Unable to convert value to {{interface_name}}."); + return nativeValue; + } + +@@ -926,7 +926,7 @@ void {{v8_class}}::updateWrapperTypeInfo( + installRuntimeEnabledFunction; + {% endif %} + if (preparePrototypeAndInterfaceObjectFunction) { +- {{v8_class}}::wrapperTypeInfo.preparePrototypeAndInterfaceObjectFunction = ++ {{v8_class}}::wrapperTypeInfo.prepare_prototype_and_interface_object_function = + preparePrototypeAndInterfaceObjectFunction; + } + } +diff --git a/third_party/WebKit/Source/bindings/templates/interface.h.tmpl b/third_party/WebKit/Source/bindings/templates/interface.h.tmpl +index 88b5b51865f1..a87f5d0a4ebe 100644 +--- a/third_party/WebKit/Source/bindings/templates/interface.h.tmpl ++++ b/third_party/WebKit/Source/bindings/templates/interface.h.tmpl +@@ -39,7 +39,7 @@ class {{v8_class}} { + {{exported}}static v8::Local<v8::FunctionTemplate> domTemplateForNamedPropertiesObject(v8::Isolate*, const DOMWrapperWorld&); + {% endif %} + static {{cpp_class}}* toImpl(v8::Local<v8::Object> object) { +- return toScriptWrappable(object)->toImpl<{{cpp_class}}>(); ++ return ToScriptWrappable(object)->ToImpl<{{cpp_class}}>(); + } + {% endif %} + {{exported}}static {{cpp_class}}* toImplWithTypeCheck(v8::Isolate*, v8::Local<v8::Value>); +@@ -48,11 +48,11 @@ class {{v8_class}} { + {% else %} + {{exported}}static const WrapperTypeInfo wrapperTypeInfo; + {% endif %} +- static void trace(Visitor* visitor, ScriptWrappable* scriptWrappable) { +- visitor->trace(scriptWrappable->toImpl<{{cpp_class}}>()); ++ static void Trace(Visitor* visitor, ScriptWrappable* scriptWrappable) { ++ visitor->Trace(scriptWrappable->ToImpl<{{cpp_class}}>()); + } +- static void traceWrappers(WrapperVisitor* visitor, ScriptWrappable* scriptWrappable) { +- visitor->traceWrappers(scriptWrappable->toImpl<{{cpp_class}}>()); ++ static void TraceWrappers(WrapperVisitor* visitor, ScriptWrappable* scriptWrappable) { ++ visitor->TraceWrappers(scriptWrappable->ToImpl<{{cpp_class}}>()); + } + {% for method in methods %} + {% if method.is_custom %} +@@ -120,7 +120,7 @@ class {{v8_class}} { + {% set custom_internal_field_counter = 0 %} + {% if is_event_target and not is_node %} + {# Event listeners on DOM nodes are explicitly supported in the GC controller. #} +- static const int eventListenerCacheIndex = v8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}}; ++ static const int eventListenerCacheIndex = kV8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}}; + {% set custom_internal_field_counter = custom_internal_field_counter + 1 %} + {% endif %} + {# persistentHandleIndex must be the last field, if it is present. +@@ -128,7 +128,7 @@ class {{v8_class}} { + FIXME: Remove this internal field, and share one field for either: + * a persistent handle (if the object is in oilpan) or + * a C++ pointer to the DOM object (if the object is not in oilpan) #} +- static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}}; ++ static const int internalFieldCount = kV8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}}; + {# End custom internal fields #} + {% if prepare_prototype_and_interface_object_func %} + {{exported}}static void preparePrototypeAndInterfaceObject(v8::Local<v8::Context>, const DOMWrapperWorld&, v8::Local<v8::Object> prototypeObject, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate); +@@ -275,7 +275,7 @@ class {{v8_class}} { + {% endif %} + template <> + struct NativeValueTraits<{{cpp_class}}> : public NativeValueTraitsBase<{{cpp_class}}> { +- {{exported}}static {{cpp_class}}* nativeValue(v8::Isolate*, v8::Local<v8::Value>, ExceptionState&); ++ {{exported}}static {{cpp_class}}* NativeValue(v8::Isolate*, v8::Local<v8::Value>, ExceptionState&); + }; + + template <> +diff --git a/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl +index c4826362fc0b..83b24c6ac27c 100644 +--- a/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl ++++ b/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl +@@ -11,12 +11,12 @@ namespace blink { + {% set dom_template = '%s::domTemplate' % v8_class if not is_array_buffer_or_view else '0' %} + {% set parent_wrapper_type_info = '&V8%s::wrapperTypeInfo' % parent_interface + if parent_interface else '0' %} +-{% set wrapper_type_prototype = 'WrapperTypeExceptionPrototype' if is_exception else +- 'WrapperTypeObjectPrototype' %} ++{% set wrapper_type_prototype = 'kWrapperTypeExceptionPrototype' if is_exception else ++ 'kWrapperTypeObjectPrototype' %} + {% set active_scriptwrappable_inheritance = +- 'InheritFromActiveScriptWrappable' ++ 'kInheritFromActiveScriptWrappable' + if active_scriptwrappable else +- 'NotInheritFromActiveScriptWrappable' %} ++ 'kNotInheritFromActiveScriptWrappable' %} + + {% set wrapper_type_info_const = '' if has_partial_interface else 'const ' %} + {% if not is_partial %} +@@ -26,7 +26,7 @@ namespace blink { + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wglobal-constructors" + #endif +-{{wrapper_type_info_const}}WrapperTypeInfo {{v8_class}}::wrapperTypeInfo = { gin::kEmbedderBlink, {{dom_template}}, {{v8_class}}::trace, {{v8_class}}::traceWrappers, {{prepare_prototype_and_interface_object_func or 'nullptr'}}, "{{interface_name}}", {{parent_wrapper_type_info}}, WrapperTypeInfo::{{wrapper_type_prototype}}, WrapperTypeInfo::{{wrapper_class_id}}, WrapperTypeInfo::{{active_scriptwrappable_inheritance}}, WrapperTypeInfo::{{lifetime}} }; ++{{wrapper_type_info_const}}WrapperTypeInfo {{v8_class}}::wrapperTypeInfo = { gin::kEmbedderBlink, {{dom_template}}, {{v8_class}}::Trace, {{v8_class}}::TraceWrappers, {{prepare_prototype_and_interface_object_func or 'nullptr'}}, "{{interface_name}}", {{parent_wrapper_type_info}}, WrapperTypeInfo::{{wrapper_type_prototype}}, WrapperTypeInfo::{{wrapper_class_id}}, WrapperTypeInfo::{{active_scriptwrappable_inheritance}}, WrapperTypeInfo::{{lifetime}} }; + #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) + #pragma clang diagnostic pop + #endif +@@ -35,7 +35,7 @@ namespace blink { + // This static member must be declared by DEFINE_WRAPPERTYPEINFO in {{cpp_class}}.h. + // For details, see the comment of DEFINE_WRAPPERTYPEINFO in + // bindings/core/v8/ScriptWrappable.h. +-const WrapperTypeInfo& {{cpp_class}}::s_wrapperTypeInfo = {{v8_class}}::wrapperTypeInfo; ++const WrapperTypeInfo& {{cpp_class}}::wrapper_type_info_ = {{v8_class}}::wrapperTypeInfo; + {% endif %} + + {% if active_scriptwrappable %} +@@ -46,8 +46,8 @@ static_assert( + "[ActiveScriptWrappable] extended attribute in the IDL file. " + "Be consistent."); + static_assert( +- !std::is_same<decltype(&{{cpp_class}}::hasPendingActivity), +- decltype(&ScriptWrappable::hasPendingActivity)>::value, ++ !std::is_same<decltype(&{{cpp_class}}::HasPendingActivity), ++ decltype(&ScriptWrappable::HasPendingActivity)>::value, + "{{cpp_class}} is not overriding hasPendingActivity(), but is specifying " + "[ActiveScriptWrappable] extended attribute in the IDL file. " + "Be consistent."); +@@ -59,8 +59,8 @@ static_assert( + "[ActiveScriptWrappable] extended attribute in the IDL file. " + "Be consistent."); + static_assert( +- std::is_same<decltype(&{{cpp_class}}::hasPendingActivity), +- decltype(&ScriptWrappable::hasPendingActivity)>::value, ++ std::is_same<decltype(&{{cpp_class}}::HasPendingActivity), ++ decltype(&ScriptWrappable::HasPendingActivity)>::value, + "{{cpp_class}} is overriding hasPendingActivity(), but is not specifying " + "[ActiveScriptWrappable] extended attribute in the IDL file. " + "Be consistent."); +@@ -240,10 +240,10 @@ bool {{v8_class_or_partial}}::securityCheck(v8::Local<v8::Context> accessingCont + return false; // the frame is gone. + + const DOMWindow* targetWindow = V8Window::toImpl(window); +- return BindingSecurity::shouldAllowAccessTo(toLocalDOMWindow(accessingContext), targetWindow, BindingSecurity::ErrorReportOption::DoNotReport); ++ return BindingSecurity::ShouldAllowAccessTo(ToLocalDOMWindow(accessingContext), targetWindow, BindingSecurity::ErrorReportOption::kDoNotReport); + {% elif interface_name == 'Location' %} + {{cpp_class}}* impl = {{v8_class}}::toImpl(accessedObject); +- return BindingSecurity::shouldAllowAccessTo(toLocalDOMWindow(accessingContext), impl, BindingSecurity::ErrorReportOption::DoNotReport); ++ return BindingSecurity::ShouldAllowAccessTo(ToLocalDOMWindow(accessingContext), impl, BindingSecurity::ErrorReportOption::kDoNotReport); + {% else %} + #error "Unexpected security check for interface {{interface_name}}" + {% endif %} +@@ -253,7 +253,7 @@ bool {{v8_class_or_partial}}::securityCheck(v8::Local<v8::Context> accessingCont + void {{v8_class_or_partial}}::crossOriginNamedGetter(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) { + if (!name->IsString()) + return; +- const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>()); ++ const AtomicString& propertyName = ToCoreAtomicString(name.As<v8::String>()); + + for (const auto& attribute : {{cpp_class_or_partial}}V8Internal::kCrossOriginAttributeTable) { + if (propertyName == attribute.name && attribute.getter) { +@@ -269,9 +269,9 @@ void {{v8_class_or_partial}}::crossOriginNamedGetter(v8::Local<v8::Name> name, c + {{cpp_class}}V8Internal::namedPropertyGetter(propertyName, info); + {% endif %} + {% else %} +- BindingSecurity::failedAccessCheckFor( ++ BindingSecurity::FailedAccessCheckFor( + info.GetIsolate(), +- {{v8_class}}::toImpl(info.Holder())->frame()); ++ {{v8_class}}::toImpl(info.Holder())->GetFrame()); + {% endif %} + } + {% endif %} +@@ -280,7 +280,7 @@ void {{v8_class_or_partial}}::crossOriginNamedGetter(v8::Local<v8::Name> name, c + void {{v8_class_or_partial}}::crossOriginNamedSetter(v8::Local<v8::Name> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<v8::Value>& info) { + if (!name->IsString()) + return; +- const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>()); ++ const AtomicString& propertyName = ToCoreAtomicString(name.As<v8::String>()); + + for (const auto& attribute : {{cpp_class_or_partial}}V8Internal::kCrossOriginAttributeTable) { + if (propertyName == attribute.name && attribute.setter) { +@@ -293,9 +293,9 @@ void {{v8_class_or_partial}}::crossOriginNamedSetter(v8::Local<v8::Name> name, v + an access check failure: there are no custom named setters that are + accessible from a cross-origin context. #} + +- BindingSecurity::failedAccessCheckFor( ++ BindingSecurity::FailedAccessCheckFor( + info.GetIsolate(), +- {{v8_class}}::toImpl(info.Holder())->frame()); ++ {{v8_class}}::toImpl(info.Holder())->GetFrame()); + } + {% endif %} + +@@ -307,7 +307,7 @@ void {{v8_class_or_partial}}::crossOriginNamedEnumerator(const v8::PropertyCallb + + // Use the current context as the creation context, as a cross-origin access + // may involve an object that does not have a creation context. +- v8SetReturnValue(info, ++ V8SetReturnValue(info, + ToV8(names, info.GetIsolate()->GetCurrentContext()->Global(), + info.GetIsolate()).As<v8::Array>()); + } +@@ -417,7 +417,7 @@ static void install{{v8_class}}Template(v8::Isolate* isolate, const DOMWrapperWo + 'V8%s::domTemplate(isolate, world)' % parent_interface + if parent_interface else + 'v8::Local<v8::FunctionTemplate>()' %} +- V8DOMConfiguration::initializeDOMInterfaceTemplate(isolate, interfaceTemplate, {{v8_class}}::wrapperTypeInfo.interfaceName, {{parent_interface_template}}, {{v8_class}}::internalFieldCount); ++ V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, {{v8_class}}::wrapperTypeInfo.interface_name, {{parent_interface_template}}, {{v8_class}}::internalFieldCount); + {% if constructors or has_custom_constructor or has_event_constructor or has_html_constructor %} + interfaceTemplate->SetCallHandler({{v8_class}}::constructorCallback); + interfaceTemplate->SetLength({{interface_length}}); +@@ -456,16 +456,16 @@ static void install{{v8_class}}Template(v8::Isolate* isolate, const DOMWrapperWo + {{install_constants() | indent(2)}} + {% endif %} + {% if data_attributes %} +- V8DOMConfiguration::installAttributes(isolate, world, instanceTemplate, prototypeTemplate, {{'%sAttributes' % v8_class}}, {{'WTF_ARRAY_LENGTH(%sAttributes)' % v8_class}}); ++ V8DOMConfiguration::InstallAttributes(isolate, world, instanceTemplate, prototypeTemplate, {{'%sAttributes' % v8_class}}, {{'WTF_ARRAY_LENGTH(%sAttributes)' % v8_class}}); + {% endif %} + {% if lazy_data_attributes %} +- V8DOMConfiguration::installLazyDataAttributes(isolate, world, instanceTemplate, prototypeTemplate, {{'%sLazyDataAttributes' % v8_class}}, {{'WTF_ARRAY_LENGTH(%sLazyDataAttributes)' % v8_class}}); ++ V8DOMConfiguration::InstallLazyDataAttributes(isolate, world, instanceTemplate, prototypeTemplate, {{'%sLazyDataAttributes' % v8_class}}, {{'WTF_ARRAY_LENGTH(%sLazyDataAttributes)' % v8_class}}); + {% endif %} + {% if accessors %} +- V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, {{'%sAccessors' % v8_class}}, {{'WTF_ARRAY_LENGTH(%sAccessors)' % v8_class}}); ++ V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, {{'%sAccessors' % v8_class}}, {{'WTF_ARRAY_LENGTH(%sAccessors)' % v8_class}}); + {% endif %} + {% if methods | has_method_configuration(is_partial) %} +- V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, {{'%sMethods' % v8_class}}, {{'WTF_ARRAY_LENGTH(%sMethods)' % v8_class}}); ++ V8DOMConfiguration::InstallMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, {{'%sMethods' % v8_class}}, {{'WTF_ARRAY_LENGTH(%sMethods)' % v8_class}}); + {% endif %} + + {% if has_access_check_callbacks and not is_partial %} +@@ -485,13 +485,13 @@ static void install{{v8_class}}Template(v8::Isolate* isolate, const DOMWrapperWo + {{attribute_configuration(attribute) | indent(2)}} + }; + for (const auto& attributeConfig : attribute{{attribute.name}}Configuration) +- V8DOMConfiguration::installAttribute(isolate, world, instanceTemplate, prototypeTemplate, attributeConfig); ++ V8DOMConfiguration::InstallAttribute(isolate, world, instanceTemplate, prototypeTemplate, attributeConfig); + {% else %} + static const V8DOMConfiguration::AccessorConfiguration accessor{{attribute.name}}Configuration[] = { + {{attribute_configuration(attribute) | indent(2)}} + }; + for (const auto& accessorConfig : accessor{{attribute.name}}Configuration) +- V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorConfig); ++ V8DOMConfiguration::InstallAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorConfig); + {% endif %} + {% endfor %} + {% endfilter %} +@@ -515,10 +515,10 @@ static void install{{v8_class}}Template(v8::Isolate* isolate, const DOMWrapperWo + {% endif %} + // For value iterators, the properties below must originally be set to the corresponding ones in %ArrayPrototype%. + // See https://heycam.github.io/webidl/#es-iterators. +- prototypeTemplate->SetIntrinsicDataProperty(v8AtomicString(isolate, "entries"), v8::kArrayProto_entries); +- prototypeTemplate->SetIntrinsicDataProperty(v8AtomicString(isolate, "forEach"), v8::kArrayProto_forEach); +- prototypeTemplate->SetIntrinsicDataProperty(v8AtomicString(isolate, "keys"), v8::kArrayProto_keys); +- prototypeTemplate->SetIntrinsicDataProperty(v8AtomicString(isolate, "values"), v8::kArrayProto_values); ++ prototypeTemplate->SetIntrinsicDataProperty(V8AtomicString(isolate, "entries"), v8::kArrayProto_entries); ++ prototypeTemplate->SetIntrinsicDataProperty(V8AtomicString(isolate, "forEach"), v8::kArrayProto_forEach); ++ prototypeTemplate->SetIntrinsicDataProperty(V8AtomicString(isolate, "keys"), v8::kArrayProto_keys); ++ prototypeTemplate->SetIntrinsicDataProperty(V8AtomicString(isolate, "values"), v8::kArrayProto_values); + {% endif %} + {% endif %} + +@@ -526,8 +526,8 @@ static void install{{v8_class}}Template(v8::Isolate* isolate, const DOMWrapperWo + {% filter exposed(iterator_method.exposed_test) %} + {% filter runtime_enabled(iterator_method.runtime_enabled_feature_name) %} + // Iterator (@@iterator) +- static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, {{v8_class_or_partial}}::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConfiguration::DoNotCheckAccess }; +- V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature, symbolKeyedIteratorConfiguration); ++ static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, {{v8_class_or_partial}}::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess }; ++ V8DOMConfiguration::InstallMethod(isolate, world, prototypeTemplate, signature, symbolKeyedIteratorConfiguration); + {% endfilter %} + {% endfilter %} + {% endif %} +@@ -605,13 +605,13 @@ void {{v8_class_or_partial}}::installRuntimeEnabledFeatures(v8::Isolate* isolate + {{attribute_configuration(attribute) | indent(2)}} + }; + for (const auto& attributeConfig : attribute{{attribute.name}}Configuration) +- V8DOMConfiguration::installAttribute(isolate, world, instance, prototype, attributeConfig); ++ V8DOMConfiguration::InstallAttribute(isolate, world, instance, prototype, attributeConfig); + {% else %} + static const V8DOMConfiguration::AccessorConfiguration accessor{{attribute.name}}Configuration[] = { + {{attribute_configuration(attribute) | indent(2)}} + }; + for (const auto& accessorConfig : accessor{{attribute.name}}Configuration) +- V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, interface, signature, accessorConfig); ++ V8DOMConfiguration::InstallAccessor(isolate, world, instance, prototype, interface, signature, accessorConfig); + {% endif %} + {% endfor %} + {% endfilter %} +@@ -667,20 +667,20 @@ void {{v8_class_or_partial}}::install{{feature.name}}(v8::Isolate* isolate, cons + {{attribute_configuration(attribute) | indent(2)}} + }; + for (const auto& attributeConfig : attribute{{attribute.name}}Configuration) +- V8DOMConfiguration::installAttribute(isolate, world, instance, prototype, attributeConfig); ++ V8DOMConfiguration::InstallAttribute(isolate, world, instance, prototype, attributeConfig); + {% else %} + static const V8DOMConfiguration::AccessorConfiguration accessor{{attribute.name}}Configuration[] = { + {{attribute_configuration(attribute) | indent(2)}} + }; + for (const auto& accessorConfig : accessor{{attribute.name}}Configuration) +- V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, interface, signature, accessorConfig); ++ V8DOMConfiguration::InstallAccessor(isolate, world, instance, prototype, interface, signature, accessorConfig); + {% endif %} + {% endfor %} + {# Origin-Trial-enabled constants #} + {% for constant in feature.constants %} + {% set constant_name = constant.name.title().replace('_', '') %} + const V8DOMConfiguration::ConstantConfiguration constant{{constant_name}}Configuration = {{constant_configuration(constant)}}; +- V8DOMConfiguration::installConstant(isolate, interface, prototype, constant{{constant_name}}Configuration); ++ V8DOMConfiguration::InstallConstant(isolate, interface, prototype, constant{{constant_name}}Configuration); + {% endfor %} + {# Origin-Trial-enabled methods (no overloads) #} + {% for method in feature.methods %} +@@ -689,16 +689,16 @@ void {{v8_class_or_partial}}::install{{feature.name}}(v8::Isolate* isolate, cons + {{method_configuration(method) | indent(2)}} + }; + for (const auto& methodConfig : method{{method_name}}Configuration) +- V8DOMConfiguration::installMethod(isolate, world, instance, prototype, interface, signature, methodConfig); ++ V8DOMConfiguration::InstallMethod(isolate, world, instance, prototype, interface, signature, methodConfig); + {% endfor %} + } + + void {{v8_class_or_partial}}::install{{feature.name}}(ScriptState* scriptState, v8::Local<v8::Object> instance) { +- V8PerContextData* perContextData = V8PerContextData::from(scriptState->context()); +- v8::Local<v8::Object> prototype = perContextData->prototypeForType(&{{v8_class}}::wrapperTypeInfo); +- v8::Local<v8::Function> interface = perContextData->constructorForType(&{{v8_class}}::wrapperTypeInfo); ++ V8PerContextData* perContextData = V8PerContextData::From(scriptState->GetContext()); ++ v8::Local<v8::Object> prototype = perContextData->PrototypeForType(&{{v8_class}}::wrapperTypeInfo); ++ v8::Local<v8::Function> interface = perContextData->ConstructorForType(&{{v8_class}}::wrapperTypeInfo); + ALLOW_UNUSED_LOCAL(interface); +- install{{feature.name}}(scriptState->isolate(), scriptState->world(), instance, prototype, interface); ++ install{{feature.name}}(scriptState->GetIsolate(), scriptState->World(), instance, prototype, interface); + } + {% if not feature.needs_instance %} + +@@ -729,20 +729,20 @@ void {{v8_class_or_partial}}::preparePrototypeAndInterfaceObject(v8::Local<v8::C + v8::Isolate* isolate = context->GetIsolate(); + {% if has_conditional_attributes_on_prototype or methods | conditionally_exposed(is_partial) %} + v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate); +- ExecutionContext* executionContext = toExecutionContext(context); ++ ExecutionContext* executionContext = ToExecutionContext(context); + DCHECK(executionContext); + {% endif %} + + {% if unscopables %} + v8::Local<v8::Name> unscopablesSymbol(v8::Symbol::GetUnscopables(isolate)); + v8::Local<v8::Object> unscopables; +- if (v8CallBoolean(prototypeObject->HasOwnProperty(context, unscopablesSymbol))) ++ if (V8CallBoolean(prototypeObject->HasOwnProperty(context, unscopablesSymbol))) + unscopables = prototypeObject->Get(context, unscopablesSymbol).ToLocalChecked().As<v8::Object>(); + else + unscopables = v8::Object::New(isolate); + {% for name, runtime_enabled_feature_name in unscopables %} + {% filter runtime_enabled(runtime_enabled_feature_name) %} +- unscopables->CreateDataProperty(context, v8AtomicString(isolate, "{{name}}"), v8::True(isolate)).FromJust(); ++ unscopables->CreateDataProperty(context, V8AtomicString(isolate, "{{name}}"), v8::True(isolate)).FromJust(); + {% endfilter %} + {% endfor %} + prototypeObject->CreateDataProperty(context, unscopablesSymbol, unscopables).FromJust(); +diff --git a/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl +index 8033b620f5a2..71453338eb3a 100644 +--- a/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl ++++ b/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl +@@ -7,7 +7,7 @@ static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const + 'ExceptionState exceptionState', + 'ScriptState* scriptState = ']) %} + {% set define_exception_state -%} +- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "{{interface_name}}", "{{method.name}}"); ++ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kExecutionContext, "{{interface_name}}", "{{method.name}}"); + {%- endset %} + + {% set function_call = func_call_with_prep_of_args(method, world_suffix) %} +@@ -22,7 +22,7 @@ static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const + + {% if not method.is_static %} + {% if method.returns_promise %} +- // V8DOMConfiguration::DoNotCheckHolder ++ // V8DOMConfiguration::kDoNotCheckHolder + // Make sure that info.Holder() really points to an instance of the type. + if (!{{v8_class}}::hasInstance(info.Holder(), info.GetIsolate())) { + {{throw_type_error(method, '"Illegal invocation"')}} +@@ -33,7 +33,7 @@ static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const + // Same-origin methods are never exposed via the cross-origin interceptors. + // Since same-origin access requires a LocalDOMWindow, it is safe to downcast + // here. +- LocalDOMWindow* impl = toLocalDOMWindow({{v8_class}}::toImpl(info.Holder())); ++ LocalDOMWindow* impl = ToLocalDOMWindow({{v8_class}}::toImpl(info.Holder())); + {% else %} + {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); + {% endif %}{# interface_name == 'Window' and not method.is_cross_origin #} +@@ -42,17 +42,17 @@ static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const + {# Security checks #} + {% if method.is_check_security_for_return_value %} + {{define_exception_state}} +- if (!BindingSecurity::shouldAllowAccessTo(currentDOMWindow(info.GetIsolate()), {{method.cpp_value}}, exceptionState)) { +- v8SetReturnValueNull(info); ++ if (!BindingSecurity::ShouldAllowAccessTo(CurrentDOMWindow(info.GetIsolate()), {{method.cpp_value}}, exceptionState)) { ++ V8SetReturnValueNull(info); + return; + } + {% endif %} + + {% if 'scriptState' in function_call %} + {% if method.is_static %} +- ScriptState* scriptState = ScriptState::forFunctionObject(info); ++ ScriptState* scriptState = ScriptState::ForFunctionObject(info); + {% else %} +- ScriptState* scriptState = ScriptState::forReceiverObject(info); ++ ScriptState* scriptState = ScriptState::ForReceiverObject(info); + {% endif %} + {% endif %} + +@@ -85,7 +85,7 @@ static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const + {% if method.number_of_required_arguments and not method.overload_index %} + if (UNLIKELY(info.Length() < {{method.number_of_required_arguments}})) { + {{throw_type_error(method, +- 'ExceptionMessages::notEnoughArguments(%(expected)d, info.Length())' ++ 'ExceptionMessages::NotEnoughArguments(%(expected)d, info.Length())' + | format(expected=method.number_of_required_arguments))}} + return; + } +@@ -139,21 +139,21 @@ if (UNLIKELY(numArgsPassed <= {{argument.index}})) { + {% if argument.is_callback_interface %} + {# FIXME: remove EventListener special case #} + {% if argument.idl_type == 'EventListener' %} +-{% if method.name == 'removeEventListener' or method.name == 'removeListener' %} +-{{argument.name}} = V8EventListenerHelper::getEventListener(ScriptState::current(info.GetIsolate()), info[{{argument.index}}], false, ListenerFindOnly); +-{% else %}{# method.name == 'addEventListener' #} +-{{argument.name}} = V8EventListenerHelper::getEventListener(ScriptState::current(info.GetIsolate()), info[{{argument.index}}], false, ListenerFindOrCreate); ++{% if method.name == 'RemoveEventListener' or method.name == 'RemoveListener' %} ++{{argument.name}} = V8EventListenerHelper::GetEventListener(ScriptState::Current(info.GetIsolate()), info[{{argument.index}}], false, kListenerFindOnly); ++{% else %}{# method.name == 'AddEventListener' #} ++{{argument.name}} = V8EventListenerHelper::GetEventListener(ScriptState::Current(info.GetIsolate()), info[{{argument.index}}], false, kListenerFindOrCreate); + {% endif %}{# method.name #} + {% else %}{# argument.idl_type == 'EventListener' #} + {# Callback functions must be functions: + http://www.w3.org/TR/WebIDL/#es-callback-function #} + {% if argument.is_optional %} +-if (!isUndefinedOrNull(info[{{argument.index}}])) { ++if (!IsUndefinedOrNull(info[{{argument.index}}])) { + if (!info[{{argument.index}}]->IsFunction()) { + {{throw_argument_error(method, argument, "The callback provided as parameter %(index)d is not a function.")}} + return; + } +- {{argument.name}} = V8{{argument.idl_type}}::create(v8::Local<v8::Function>::Cast(info[{{argument.index}}]), ScriptState::current(info.GetIsolate())); ++ {{argument.name}} = V8{{argument.idl_type}}::Create(v8::Local<v8::Function>::Cast(info[{{argument.index}}]), ScriptState::Current(info.GetIsolate())); + } else { + {{argument.name}} = nullptr; + } +@@ -162,11 +162,11 @@ if (info.Length() <= {{argument.index}} || !{% if argument.is_nullable %}(info[{ + {{throw_argument_error(method, argument, "The callback provided as parameter %(index)d is not a function.")}} + return; + } +-{{argument.name}} = {% if argument.is_nullable %}info[{{argument.index}}]->IsNull() ? nullptr : {% endif %}V8{{argument.idl_type}}::create(v8::Local<v8::Function>::Cast(info[{{argument.index}}]), ScriptState::current(info.GetIsolate())); ++{{argument.name}} = {% if argument.is_nullable %}info[{{argument.index}}]->IsNull() ? nullptr : {% endif %}V8{{argument.idl_type}}::Create(v8::Local<v8::Function>::Cast(info[{{argument.index}}]), ScriptState::Current(info.GetIsolate())); + {% endif %}{# argument.is_optional #} + {% endif %}{# argument.idl_type == 'EventListener' #} + {% elif argument.is_callback_function %} +-if ({% if argument.is_nullable %}!isUndefinedOrNull(info[{{argument.index}}]) && {% endif %}!(info[{{argument.index}}]->IsObject() && v8::Local<v8::Object>::Cast(info[{{argument.index}}])->IsCallable())) { ++if ({% if argument.is_nullable %}!IsUndefinedOrNull(info[{{argument.index}}]) && {% endif %}!(info[{{argument.index}}]->IsObject() && v8::Local<v8::Object>::Cast(info[{{argument.index}}])->IsCallable())) { + {{throw_argument_error(method, argument, "The callback provided as parameter %(index)d is not a function.")}} + return; + } +@@ -183,14 +183,14 @@ for (int i = {{argument.index}}; i < info.Length(); ++i) { + {% if not argument.use_permissive_dictionary_conversion %} + {# Dictionaries must have type Undefined, Null or Object: + http://heycam.github.io/webidl/#es-dictionary #} +-if (!isUndefinedOrNull(info[{{argument.index}}]) && !info[{{argument.index}}]->IsObject()) { ++if (!IsUndefinedOrNull(info[{{argument.index}}]) && !info[{{argument.index}}]->IsObject()) { + {{throw_argument_error(method, argument, "parameter %(index)d ('%(name)s') is not an object.")}} + return; + } + {% endif %}{# not argument.use_permissive_dictionary_conversion #} + {{v8_value_to_local_cpp_value(argument)}} + {% elif argument.is_explicit_nullable %} +-if (!isUndefinedOrNull(info[{{argument.index}}])) { ++if (!IsUndefinedOrNull(info[{{argument.index}}])) { + {{v8_value_to_local_cpp_value(argument) | indent(2)}} + } + {% else %}{# argument.is_nullable #} +@@ -203,7 +203,7 @@ if (!isUndefinedOrNull(info[{{argument.index}}])) { + throw a TypeError), per http://www.w3.org/TR/WebIDL/#es-interface + Note: for variadic arguments, the type checking is done for each matched + argument instead; see argument.is_variadic_wrapper_type code-path above. #} +-if (!{{argument.name}}{% if argument.is_nullable %} && !isUndefinedOrNull(info[{{argument.index}}]){% endif %}) { ++if (!{{argument.name}}{% if argument.is_nullable %} && !IsUndefinedOrNull(info[{{argument.index}}]){% endif %}) { + {{throw_argument_error(method, argument, "parameter %(index)d is not of type '%(type)s'.")}} + return; + } +@@ -211,13 +211,13 @@ if (!{{argument.name}}{% if argument.is_nullable %} && !isUndefinedOrNull(info[{ + {# Invalid enum values: http://www.w3.org/TR/WebIDL/#idl-enums #} + {% set enum_variable = 'valid' + argument.name[0].upper() + argument.name[1:] + 'Values' %} + {{declare_enum_validation_variable(argument.enum_values, enum_variable)}} +-if (!isValidEnum({{argument.name}}, {{enum_variable}}, WTF_ARRAY_LENGTH({{enum_variable}}), "{{argument.enum_type}}", exceptionState)) { ++if (!IsValidEnum({{argument.name}}, {{enum_variable}}, WTF_ARRAY_LENGTH({{enum_variable}}), "{{argument.enum_type}}", exceptionState)) { + return; + } + {% elif argument.idl_type == 'Promise' %} + {# We require this for our implementation of promises, though not in spec: + http://heycam.github.io/webidl/#es-promise #} +-if (!{{argument.name}}.isUndefinedOrNull() && !{{argument.name}}.isObject()) { ++if (!{{argument.name}}.IsUndefinedOrNull() && !{{argument.name}}.IsObject()) { + {{throw_argument_error(method, argument, "parameter %(index)d ('%(name)s') is not an object.")}} + return; + } +@@ -234,15 +234,15 @@ if (!{{argument.name}}.isUndefinedOrNull() && !{{argument.name}}.isObject()) { + {% if method.is_call_with_execution_context %} + {# [ConstructorCallWith=ExecutionContext] #} + {# [CallWith=ExecutionContext] #} +-ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); ++ExecutionContext* executionContext = CurrentExecutionContext(info.GetIsolate()); + {% endif %} + {% if method.is_call_with_script_arguments %} + {# [CallWith=ScriptArguments] #} +-ScriptArguments* scriptArguments(ScriptArguments::create(scriptState, info, {{method.number_of_arguments}})); ++ScriptArguments* scriptArguments(ScriptArguments::Create(scriptState, info, {{method.number_of_arguments}})); + {% endif %} + {% if method.is_call_with_document %} + {# [ConstructorCallWith=Document] #} +-Document& document = *toDocument(currentExecutionContext(info.GetIsolate())); ++Document& document = *ToDocument(CurrentExecutionContext(info.GetIsolate())); + {% endif %} + {# Call #} + {% if method.idl_type == 'void' %} +@@ -257,7 +257,7 @@ Document& document = *toDocument(currentExecutionContext(info.GetIsolate())); + {% endif %} + {# Post-call #} + {% if method.is_raises_exception %} +-if (exceptionState.hadException()) { ++if (exceptionState.HadException()) { + return; + } + {% endif %} +@@ -265,14 +265,14 @@ if (exceptionState.hadException()) { + {% if method.is_new_object and not method.do_not_test_new_object %} + // [NewObject] must always create a new wrapper. Check that a wrapper + // does not exist yet. +-DCHECK(!result || DOMDataStore::getWrapper(result, info.GetIsolate()).IsEmpty()); ++DCHECK(!result || DOMDataStore::GetWrapper(result, info.GetIsolate()).IsEmpty()); + {% endif %} + {% if method.is_constructor %} + {{generate_constructor_wrapper(method)}} + {%- elif v8_set_return_value %} + {% if method.is_explicit_nullable %} +-if (result.isNull()) +- v8SetReturnValueNull(info); ++if (result.IsNull()) ++ V8SetReturnValueNull(info); + else + {{v8_set_return_value}}; + {% else %} +@@ -288,11 +288,11 @@ else + {##############################################################################} + {% macro throw_type_error(method, error_message) %} + {% if method.has_exception_state or method.returns_promise %} +-exceptionState.throwTypeError({{error_message}}); ++exceptionState.ThrowTypeError({{error_message}}); + {%- elif method.is_constructor %} +-V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToConstruct("{{interface_name}}", {{error_message}})); ++V8ThrowException::ThrowTypeError(info.GetIsolate(), ExceptionMessages::FailedToConstruct("{{interface_name}}", {{error_message}})); + {%- else %} +-V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("{{method.name}}", "{{interface_name}}", {{error_message}})); ++V8ThrowException::ThrowTypeError(info.GetIsolate(), ExceptionMessages::FailedToExecute("{{method.name}}", "{{interface_name}}", {{error_message}})); + {%- endif %} + {% endmacro %} + +@@ -338,10 +338,10 @@ static void {{overloads.name}}Method{{world_suffix}}(const v8::FunctionCallbackI + {% set fall_through_to_partial_overloads = not is_partial and overloads.has_partial_overloads %} + + {% if overloads.measure_all_as %} +- UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::{{overloads.measure_all_as}}); ++ UseCounter::Count(CurrentExecutionContext(info.GetIsolate()), UseCounter::k{{overloads.measure_all_as}}); + {% endif %} + {% if overloads.deprecate_all_as %} +- Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::{{overloads.deprecate_all_as}}); ++ Deprecation::CountDeprecation(CurrentExecutionContext(info.GetIsolate()), UseCounter::k{{overloads.deprecate_all_as}}); + {% endif %} + + {# First resolve by length #} +@@ -360,10 +360,10 @@ static void {{overloads.name}}Method{{world_suffix}}(const v8::FunctionCallbackI + {% filter runtime_enabled(not overloads.runtime_enabled_all and method.runtime_enabled_feature_name) %} + if ({{test}}) { + {% if method.measure_as and not overloads.measure_all_as %} +- UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::{{method.measure_as('Method')}}); ++ UseCounter::Count(CurrentExecutionContext(info.GetIsolate()), UseCounter::k{{method.measure_as('Method')}}); + {% endif %} + {% if method.deprecate_as and not overloads.deprecate_all_as %} +- Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::{{method.deprecate_as}}); ++ Deprecation::CountDeprecation(CurrentExecutionContext(info.GetIsolate()), UseCounter::k{{method.deprecate_as}}); + {% endif %} + {{method.name}}{{method.overload_index}}Method{{world_suffix}}(info); + return; +@@ -387,7 +387,7 @@ static void {{overloads.name}}Method{{world_suffix}}(const v8::FunctionCallbackI + + {% else %}{# fall_through_to_partial_overloads #} + +- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "{{interface_name}}", "{{overloads.name}}"); ++ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kExecutionContext, "{{interface_name}}", "{{overloads.name}}"); + {% if overloads.returns_promise_all %} + ExceptionToRejectPromiseScope rejectPromiseScope(info, exceptionState); + {% endif %} +@@ -395,18 +395,18 @@ static void {{overloads.name}}Method{{world_suffix}}(const v8::FunctionCallbackI + if (isArityError) { + {% if overloads.length != 0 %} + if (info.Length() < {{overloads.length}}) { +- exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments({{overloads.length}}, info.Length())); ++ exceptionState.ThrowTypeError(ExceptionMessages::NotEnoughArguments({{overloads.length}}, info.Length())); + return; + } + {% endif %} + {% if overloads.valid_arities %} + if (info.Length() >= {{overloads.length}}) { +- exceptionState.throwTypeError(ExceptionMessages::invalidArity("{{overloads.valid_arities}}", info.Length())); ++ exceptionState.ThrowTypeError(ExceptionMessages::InvalidArity("{{overloads.valid_arities}}", info.Length())); + return; + } + {% endif %} + } +- exceptionState.throwTypeError("No function was found that matched the signature provided."); ++ exceptionState.ThrowTypeError("No function was found that matched the signature provided."); + + {% endif %}{# fall_through_to_partial_overloads #} + } +@@ -416,27 +416,27 @@ static void {{overloads.name}}Method{{world_suffix}}(const v8::FunctionCallbackI + {##############################################################################} + {% macro generate_post_message_impl(method) %} + static void postMessageImpl(const char* interfaceName, {{cpp_class}}* instance, const v8::FunctionCallbackInfo<v8::Value>& info) { +- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, interfaceName, "postMessage"); ++ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kExecutionContext, interfaceName, "postMessage"); + if (UNLIKELY(info.Length() < {{method.number_of_required_arguments}})) { +- exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments({{method.number_of_required_arguments}}, info.Length())); ++ exceptionState.ThrowTypeError(ExceptionMessages::NotEnoughArguments({{method.number_of_required_arguments}}, info.Length())); + return; + } + + Transferables transferables; + if (info.Length() > 1) { + const int transferablesArgIndex = 1; +- if (!SerializedScriptValue::extractTransferables(info.GetIsolate(), info[transferablesArgIndex], transferablesArgIndex, transferables, exceptionState)) { ++ if (!SerializedScriptValue::ExtractTransferables(info.GetIsolate(), info[transferablesArgIndex], transferablesArgIndex, transferables, exceptionState)) { + return; + } + } + + RefPtr<SerializedScriptValue> message; +- if (instance->canTransferArrayBuffersAndImageBitmaps()) { ++ if (instance->CanTransferArrayBuffersAndImageBitmaps()) { + // This instance supports sending array buffers by move semantics. + SerializedScriptValue::SerializeOptions options; + options.transferables = &transferables; +- message = SerializedScriptValue::serialize(info.GetIsolate(), info[0], options, exceptionState); +- if (exceptionState.hadException()) ++ message = SerializedScriptValue::Serialize(info.GetIsolate(), info[0], options, exceptionState); ++ if (exceptionState.HadException()) + return; + } else { + // This instance doesn't support sending array buffers and image bitmaps +@@ -447,30 +447,30 @@ static void postMessageImpl(const char* interfaceName, {{cpp_class}}* instance, + // Clear references to array buffers and image bitmaps from transferables + // so that the serializer can consider the array buffers as + // non-transferable and serialize them into the message. +- ArrayBufferArray transferableArrayBuffers = transferables.arrayBuffers; +- transferables.arrayBuffers.clear(); +- ImageBitmapArray transferableImageBitmaps = transferables.imageBitmaps; +- transferables.imageBitmaps.clear(); ++ ArrayBufferArray transferableArrayBuffers = transferables.array_buffers; ++ transferables.array_buffers.Clear(); ++ ImageBitmapArray transferableImageBitmaps = transferables.image_bitmaps; ++ transferables.image_bitmaps.Clear(); + SerializedScriptValue::SerializeOptions options; + options.transferables = &transferables; +- message = SerializedScriptValue::serialize(info.GetIsolate(), info[0], options, exceptionState); +- if (exceptionState.hadException()) ++ message = SerializedScriptValue::Serialize(info.GetIsolate(), info[0], options, exceptionState); ++ if (exceptionState.HadException()) + return; + + // Neuter the original array buffers on the sender context. +- SerializedScriptValue::transferArrayBufferContents(info.GetIsolate(), transferableArrayBuffers, exceptionState); +- if (exceptionState.hadException()) ++ SerializedScriptValue::TransferArrayBufferContents(info.GetIsolate(), transferableArrayBuffers, exceptionState); ++ if (exceptionState.HadException()) + return; + // Neuter the original image bitmaps on the sender context. +- SerializedScriptValue::transferImageBitmapContents(info.GetIsolate(), transferableImageBitmaps, exceptionState); +- if (exceptionState.hadException()) ++ SerializedScriptValue::TransferImageBitmapContents(info.GetIsolate(), transferableImageBitmaps, exceptionState); ++ if (exceptionState.HadException()) + return; + } + + // FIXME: Only pass scriptState/exceptionState if instance really requires it. +- ScriptState* scriptState = ScriptState::current(info.GetIsolate()); +- message->unregisterMemoryAllocatedWithCurrentScriptContext(); +- instance->postMessage(scriptState, message.get(), transferables.messagePorts, exceptionState); ++ ScriptState* scriptState = ScriptState::Current(info.GetIsolate()); ++ message->UnregisterMemoryAllocatedWithCurrentScriptContext(); ++ instance->postMessage(scriptState, message.Get(), transferables.message_ports, exceptionState); + } + {% endmacro %} + +@@ -480,23 +480,23 @@ static void postMessageImpl(const char* interfaceName, {{cpp_class}}* instance, + void {{v8_class_or_partial}}::{{method.name}}MethodCallback{{world_suffix}}(const v8::FunctionCallbackInfo<v8::Value>& info) { + {% if not method.overloads %}{# Overloaded methods are measured in overload_resolution_method() #} + {% if method.measure_as %} +- UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::{{method.measure_as('Method')}}); ++ UseCounter::Count(CurrentExecutionContext(info.GetIsolate()), UseCounter::k{{method.measure_as('Method')}}); + {% endif %} + {% if method.deprecate_as %} +- Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::{{method.deprecate_as}}); ++ Deprecation::CountDeprecation(CurrentExecutionContext(info.GetIsolate()), UseCounter::k{{method.deprecate_as}}); + {% endif %} + {% endif %}{# not method.overloads #} + {% if world_suffix in method.activity_logging_world_list %} + {% if method.is_static %} +- ScriptState* scriptState = ScriptState::forFunctionObject(info); ++ ScriptState* scriptState = ScriptState::ForFunctionObject(info); + {% else %} +- ScriptState* scriptState = ScriptState::forReceiverObject(info); ++ ScriptState* scriptState = ScriptState::ForReceiverObject(info); + {% endif %} +- V8PerContextData* contextData = scriptState->perContextData(); +- if (contextData && contextData->activityLogger()) { +- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "{{interface_name}}", "{{method.name}}"); +- Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<Vector<v8::Local<v8::Value>>>(info, 0, exceptionState); +- contextData->activityLogger()->logMethod("{{interface_name}}.{{method.name}}", info.Length(), loggerArgs.data()); ++ V8PerContextData* contextData = scriptState->PerContextData(); ++ if (contextData && contextData->ActivityLogger()) { ++ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kExecutionContext, "{{interface_name}}", "{{method.name}}"); ++ Vector<v8::Local<v8::Value>> loggerArgs = ToImplArguments<Vector<v8::Local<v8::Value>>>(info, 0, exceptionState); ++ contextData->ActivityLogger()->LogMethod("{{interface_name}}.{{method.name}}", info.Length(), loggerArgs.Data()); + } + {% endif %} + {% if method.is_ce_reactions %} +@@ -520,17 +520,17 @@ void {{v8_class_or_partial}}::{{method.name}}MethodCallback{{world_suffix}}(cons + properly supports the incumbent realm. #} + static void {{method.name}}OriginSafeMethodGetter{{world_suffix}}(const v8::PropertyCallbackInfo<v8::Value>& info) { + static int domTemplateKey; // This address is used for a key to look up the dom template. +- V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate()); +- const DOMWrapperWorld& world = DOMWrapperWorld::world(info.GetIsolate()->GetCurrentContext()); +- v8::Local<v8::FunctionTemplate> interfaceTemplate = data->findInterfaceTemplate(world, &{{v8_class}}::wrapperTypeInfo); ++ V8PerIsolateData* data = V8PerIsolateData::From(info.GetIsolate()); ++ const DOMWrapperWorld& world = DOMWrapperWorld::World(info.GetIsolate()->GetCurrentContext()); ++ v8::Local<v8::FunctionTemplate> interfaceTemplate = data->FindInterfaceTemplate(world, &{{v8_class}}::wrapperTypeInfo); + v8::Local<v8::Signature> signature = v8::Signature::New(info.GetIsolate(), interfaceTemplate); + +- v8::Local<v8::FunctionTemplate> methodTemplate = data->findOrCreateOperationTemplate(world, &domTemplateKey, {{v8_class_or_partial}}::{{method.name}}MethodCallback{{world_suffix}}, v8Undefined(), signature, {{method.length}}); ++ v8::Local<v8::FunctionTemplate> methodTemplate = data->FindOrCreateOperationTemplate(world, &domTemplateKey, {{v8_class_or_partial}}::{{method.name}}MethodCallback{{world_suffix}}, V8Undefined(), signature, {{method.length}}); + // Return the function by default, unless the user script has overwritten it. +- v8SetReturnValue(info, methodTemplate->GetFunction(info.GetIsolate()->GetCurrentContext()).ToLocalChecked()); ++ V8SetReturnValue(info, methodTemplate->GetFunction(info.GetIsolate()->GetCurrentContext()).ToLocalChecked()); + + {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); +- if (!BindingSecurity::shouldAllowAccessTo(currentDOMWindow(info.GetIsolate()), impl, BindingSecurity::ErrorReportOption::DoNotReport)) { ++ if (!BindingSecurity::ShouldAllowAccessTo(CurrentDOMWindow(info.GetIsolate()), impl, BindingSecurity::ErrorReportOption::kDoNotReport)) { + return; + } + +@@ -539,10 +539,10 @@ static void {{method.name}}OriginSafeMethodGetter{{world_suffix}}(const v8::Prop + // {{cpp_class}}OriginSafeMethodSetter defined in interface.cpp.tmpl. + {% endraw %} + V8PrivateProperty::Symbol propertySymbol = +- V8PrivateProperty::getSymbol(info.GetIsolate(), "{{method.name}}"); ++ V8PrivateProperty::GetSymbol(info.GetIsolate(), "{{method.name}}"); + v8::Local<v8::Object> holder = v8::Local<v8::Object>::Cast(info.Holder()); +- if (propertySymbol.hasValue(holder)) { +- v8SetReturnValue(info, propertySymbol.getOrUndefined(holder)); ++ if (propertySymbol.HasValue(holder)) { ++ V8SetReturnValue(info, propertySymbol.GetOrUndefined(holder)); + } + } + {% endmacro %} +@@ -564,21 +564,21 @@ static void {{name}}(const v8::FunctionCallbackInfo<v8::Value>& info) { + + {% if constructor.is_named_constructor %} + if (!info.IsConstructCall()) { +- V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::constructorNotCallableAsFunction("{{constructor.name}}")); ++ V8ThrowException::ThrowTypeError(info.GetIsolate(), ExceptionMessages::ConstructorNotCallableAsFunction("{{constructor.name}}")); + return; + } + +- if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExistingObject) { +- v8SetReturnValue(info, info.Holder()); ++ if (ConstructorMode::Current(info.GetIsolate()) == ConstructorMode::kWrapExistingObject) { ++ V8SetReturnValue(info, info.Holder()); + return; + } + {% endif %} + + {% if 'exceptionState' in function_call %} +- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ConstructionContext, "{{interface_name}}"); ++ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kConstructionContext, "{{interface_name}}"); + {% endif %} + {% if 'scriptState' in function_call %} +- ScriptState* scriptState = ScriptState::forReceiverObject(info); ++ ScriptState* scriptState = ScriptState::ForReceiverObject(info); + {% endif %} + + {{function_call | indent(2)}} +@@ -592,8 +592,8 @@ static void {{name}}(const v8::FunctionCallbackInfo<v8::Value>& info) { + if constructor.is_named_constructor else + '') %} + v8::Local<v8::Object> wrapper = info.Holder(); +-wrapper = impl->associateWithWrapper(info.GetIsolate(), &{{constructor_class}}::wrapperTypeInfo, wrapper); +-v8SetReturnValue(info, wrapper); ++wrapper = impl->AssociateWithWrapper(info.GetIsolate(), &{{constructor_class}}::wrapperTypeInfo, wrapper); ++V8SetReturnValue(info, wrapper); + {% endmacro %} + + +@@ -608,17 +608,17 @@ v8SetReturnValue(info, wrapper); + {% set property_attribute = + 'static_cast<v8::PropertyAttribute>(%s)' % ' | '.join(method.property_attributes) + if method.property_attributes else 'v8::None' %} +-{% set holder_check = 'V8DOMConfiguration::DoNotCheckHolder' +- if method.returns_promise else 'V8DOMConfiguration::CheckHolder' %} +-{% set access_check = 'V8DOMConfiguration::CheckAccess' +- if method.is_check_security_for_receiver else 'V8DOMConfiguration::DoNotCheckAccess' %} ++{% set holder_check = 'V8DOMConfiguration::kDoNotCheckHolder' ++ if method.returns_promise else 'V8DOMConfiguration::kCheckHolder' %} ++{% set access_check = 'V8DOMConfiguration::kCheckAccess' ++ if method.is_check_security_for_receiver else 'V8DOMConfiguration::kDoNotCheckAccess' %} + {% if method.is_per_world_bindings %} + {% set method_callback_for_main_world = + '%s::%sMethodCallbackForMainWorld' % (v8_class_or_partial, method.name) %} +-{"{{method.name}}", {{method_callback_for_main_world}}, {{method.length}}, {{property_attribute}}, {{property_location(method)}}, {{holder_check}}, {{access_check}}, V8DOMConfiguration::MainWorld}, +-{"{{method.name}}", {{method_callback}}, {{method.length}}, {{property_attribute}}, {{property_location(method)}}, {{holder_check}}, {{access_check}}, V8DOMConfiguration::NonMainWorlds} ++{"{{method.name}}", {{method_callback_for_main_world}}, {{method.length}}, {{property_attribute}}, {{property_location(method)}}, {{holder_check}}, {{access_check}}, V8DOMConfiguration::kMainWorld}, ++{"{{method.name}}", {{method_callback}}, {{method.length}}, {{property_attribute}}, {{property_location(method)}}, {{holder_check}}, {{access_check}}, V8DOMConfiguration::kNonMainWorlds} + {%- else %} +-{"{{method.name}}", {{method_callback}}, {{method.length}}, {{property_attribute}}, {{property_location(method)}}, {{holder_check}}, {{access_check}}, V8DOMConfiguration::AllWorlds} ++{"{{method.name}}", {{method_callback}}, {{method.length}}, {{property_attribute}}, {{property_location(method)}}, {{holder_check}}, {{access_check}}, V8DOMConfiguration::kAllWorlds} + {%- endif %} + {%- endmacro %} + +@@ -629,7 +629,7 @@ const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration + {{method_configuration(method) | indent(2)}} + }; + for (const auto& methodConfig : {{method.name}}MethodConfiguration) +- V8DOMConfiguration::installMethod(isolate, world, {{instance_template}}, {{prototype_template}}, {{interface_template}}, {{signature}}, methodConfig); ++ V8DOMConfiguration::InstallMethod(isolate, world, {{instance_template}}, {{prototype_template}}, {{interface_template}}, {{signature}}, methodConfig); + {%- endmacro %} + + +@@ -650,7 +650,7 @@ const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration + {{method_configuration(method) | indent(2)}} + }; + for (const auto& methodConfig : {{method.name}}MethodConfiguration) +- V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, methodConfig); ++ V8DOMConfiguration::InstallMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, methodConfig); + {% endfilter %}{# runtime_enabled() #} + {% endfilter %}{# exposed() #} + {% endfilter %}{# secure_context() #} +diff --git a/third_party/WebKit/Source/bindings/templates/union_container.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/union_container.cpp.tmpl +index ff2eca5b997b..02dca6c3f7a3 100644 +--- a/third_party/WebKit/Source/bindings/templates/union_container.cpp.tmpl ++++ b/third_party/WebKit/Source/bindings/templates/union_container.cpp.tmpl +@@ -36,7 +36,7 @@ void {{cpp_class}}::set{{member.type_name}}({{member.rvalue_cpp_type}} value) { + {% if member.enum_values %} + NonThrowableExceptionState exceptionState; + {{declare_enum_validation_variable(member.enum_values) | indent(2)}} +- if (!isValidEnum(value, validValues, WTF_ARRAY_LENGTH(validValues), "{{member.type_name}}", exceptionState)) { ++ if (!IsValidEnum(value, validValues, WTF_ARRAY_LENGTH(validValues), "{{member.type_name}}", exceptionState)) { + NOTREACHED(); + return; + } +@@ -58,7 +58,7 @@ void {{cpp_class}}::set{{member.type_name}}({{member.rvalue_cpp_type}} value) { + + DEFINE_TRACE({{cpp_class}}) { + {% for member in members if member.is_traceable %} +- visitor->trace(m_{{member.cpp_name}}); ++ visitor->Trace(m_{{member.cpp_name}}); + {% endfor %} + } + +@@ -69,12 +69,12 @@ void {{v8_class}}::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, {{ + {# The numbers in the following comments refer to the steps described in + http://heycam.github.io/webidl/#es-union #} + {# 1. null or undefined #} +- if (conversionMode == UnionTypeConversionMode::Nullable && isUndefinedOrNull(v8Value)) ++ if (conversionMode == UnionTypeConversionMode::kNullable && IsUndefinedOrNull(v8Value)) + return; + + {% if dictionary_type %} + {# 3. Dictionaries for null or undefined #} +- if (isUndefinedOrNull(v8Value)) { ++ if (IsUndefinedOrNull(v8Value)) { + {{v8_value_to_local_cpp_value(dictionary_type) | indent}} + impl.set{{dictionary_type.type_name}}(cppValue); + return; +@@ -130,7 +130,7 @@ void {{v8_class}}::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, {{ + {# TODO(bashi): Support 11.5 Callback interface when we need it #} + {# 11.6. Objects #} + {% if object_type %} +- if (isUndefinedOrNull(v8Value) || v8Value->IsObject()) { ++ if (IsUndefinedOrNull(v8Value) || v8Value->IsObject()) { + {{v8_value_to_local_cpp_value(object_type) | indent}} + impl.set{{object_type.type_name}}(cppValue); + return; +@@ -162,7 +162,7 @@ void {{v8_class}}::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, {{ + {{v8_value_to_local_cpp_value(string_type) | indent}} + {% if string_type.enum_values %} + {{declare_enum_validation_variable(string_type.enum_values) | indent}} +- if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "{{string_type.type_name}}", exceptionState)) ++ if (!IsValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "{{string_type.type_name}}", exceptionState)) + return; + {% endif %} + impl.set{{string_type.type_name}}(cppValue); +@@ -186,7 +186,7 @@ void {{v8_class}}::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, {{ + + {% else %} + {# 17. TypeError #} +- exceptionState.throwTypeError("The provided value is not of type '{{type_string}}'"); ++ exceptionState.ThrowTypeError("The provided value is not of type '{{type_string}}'"); + {% endif %} + } + +@@ -205,9 +205,9 @@ v8::Local<v8::Value> ToV8(const {{cpp_class}}& impl, v8::Local<v8::Object> creat + return v8::Local<v8::Value>(); + } + +-{{cpp_class}} NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) { ++{{cpp_class}} NativeValueTraits<{{cpp_class}}>::NativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) { + {{cpp_class}} impl; +- {{v8_class}}::toImpl(isolate, value, impl, UnionTypeConversionMode::NotNullable, exceptionState); ++ {{v8_class}}::toImpl(isolate, value, impl, UnionTypeConversionMode::kNotNullable, exceptionState); + return impl; + } + +diff --git a/third_party/WebKit/Source/bindings/templates/union_container.h.tmpl b/third_party/WebKit/Source/bindings/templates/union_container.h.tmpl +index 29453cfaf6d8..e6ca782b6298 100644 +--- a/third_party/WebKit/Source/bindings/templates/union_container.h.tmpl ++++ b/third_party/WebKit/Source/bindings/templates/union_container.h.tmpl +@@ -56,18 +56,18 @@ class {{v8_class}} final { + {{exported}}v8::Local<v8::Value> ToV8(const {{cpp_class}}&, v8::Local<v8::Object>, v8::Isolate*); + + template <class CallbackInfo> +-inline void v8SetReturnValue(const CallbackInfo& callbackInfo, {{cpp_class}}& impl) { +- v8SetReturnValue(callbackInfo, ToV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate())); ++inline void V8SetReturnValue(const CallbackInfo& callbackInfo, {{cpp_class}}& impl) { ++ V8SetReturnValue(callbackInfo, ToV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate())); + } + + template <class CallbackInfo> +-inline void v8SetReturnValue(const CallbackInfo& callbackInfo, {{cpp_class}}& impl, v8::Local<v8::Object> creationContext) { +- v8SetReturnValue(callbackInfo, ToV8(impl, creationContext, callbackInfo.GetIsolate())); ++inline void V8SetReturnValue(const CallbackInfo& callbackInfo, {{cpp_class}}& impl, v8::Local<v8::Object> creationContext) { ++ V8SetReturnValue(callbackInfo, ToV8(impl, creationContext, callbackInfo.GetIsolate())); + } + + template <> + struct NativeValueTraits<{{cpp_class}}> : public NativeValueTraitsBase<{{cpp_class}}> { +- {{exported}}static {{cpp_class}} nativeValue(v8::Isolate*, v8::Local<v8::Value>, ExceptionState&); ++ {{exported}}static {{cpp_class}} NativeValue(v8::Isolate*, v8::Local<v8::Value>, ExceptionState&); + }; + + template <> +diff --git a/third_party/WebKit/Source/bindings/templates/utilities.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/utilities.cpp.tmpl +index 1e23d92f1a19..5040010b78ed 100644 +--- a/third_party/WebKit/Source/bindings/templates/utilities.cpp.tmpl ++++ b/third_party/WebKit/Source/bindings/templates/utilities.cpp.tmpl +@@ -43,25 +43,25 @@ const char* {{enum_variable}}[] = { + {% macro property_location(member) %} + {% set property_location_list = [] %} + {% if member.on_instance %} +-{% set property_location_list = property_location_list + ['V8DOMConfiguration::OnInstance'] %} ++{% set property_location_list = property_location_list + ['V8DOMConfiguration::kOnInstance'] %} + {% endif %} + {% if member.on_prototype %} +-{% set property_location_list = property_location_list + ['V8DOMConfiguration::OnPrototype'] %} ++{% set property_location_list = property_location_list + ['V8DOMConfiguration::kOnPrototype'] %} + {% endif %} + {% if member.on_interface %} +-{% set property_location_list = property_location_list + ['V8DOMConfiguration::OnInterface'] %} ++{% set property_location_list = property_location_list + ['V8DOMConfiguration::kOnInterface'] %} + {% endif %} + {{property_location_list | join(' | ')}} + {%- endmacro %} + + + {% macro check_origin_trial(member, isolate="info.GetIsolate()") -%} +-ExecutionContext* executionContext = currentExecutionContext({{isolate}}); ++ExecutionContext* executionContext = CurrentExecutionContext({{isolate}}); + String errorMessage; + if (!{{member.origin_trial_enabled_function}}(executionContext, errorMessage)) { +- v8SetReturnValue(info, v8::Undefined(info.GetIsolate())); +- if (!errorMessage.isEmpty()) { +- executionContext->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage)); ++ V8SetReturnValue(info, v8::Undefined(info.GetIsolate())); ++ if (!errorMessage.IsEmpty()) { ++ executionContext->AddConsoleMessage(ConsoleMessage::Create(kJSMessageSource, kErrorMessageLevel, errorMessage)); + } + return; + } +diff --git a/third_party/WebKit/Source/build/scripts/make_computed_style_base.py b/third_party/WebKit/Source/build/scripts/make_computed_style_base.py +index 03bf4aaa816b..29475a0ad2e7 100755 +--- a/third_party/WebKit/Source/build/scripts/make_computed_style_base.py ++++ b/third_party/WebKit/Source/build/scripts/make_computed_style_base.py +@@ -62,7 +62,7 @@ NONPROPERTIES = [ + 'type_name': 'bool', 'inherited': False, 'independent': False}, + {'name': 'StyleType', 'field_template': 'storage_only', 'size': 6, 'default_value': '0', + 'type_name': 'PseudoId', 'inherited': False, 'independent': False}, +- {'name': 'PseudoBits', 'field_template': 'storage_only', 'size': 8, 'default_value': 'PseudoIdNone', ++ {'name': 'PseudoBits', 'field_template': 'storage_only', 'size': 8, 'default_value': 'kPseudoIdNone', + 'type_name': 'PseudoId', 'inherited': False, 'independent': False}, + # True if 'underline solid' is the only text decoration on this element. + {'name': 'HasSimpleUnderline', 'field_template': 'storage_only', 'size': 1, 'default_value': 'false', +@@ -105,7 +105,7 @@ class Field(object): + """ + + def __init__(self, field_role, name_for_methods, property_name, type_name, +- field_template, size, default_value, **kwargs): ++ field_template, size, default_value, properties, **kwargs): + """Creates a new field.""" + self.name = class_member_name(name_for_methods) + self.property_name = property_name +@@ -129,11 +129,14 @@ class Field(object): + self.is_inherited_method_name = method_name(join_name(name_for_methods, 'is inherited')) + + # Method names +- getter_prefix = 'Get' if name_for_methods == self.type_name else '' +- self.getter_method_name = method_name(join_name(getter_prefix, name_for_methods)) +- self.setter_method_name = method_name(join_name('set', name_for_methods)) +- self.initial_method_name = method_name(join_name('initial', name_for_methods)) +- self.resetter_method_name = method_name(join_name('reset', name_for_methods)) ++ if 'getter' in properties and not self.is_inherited_flag: ++ self.getter_method_name = properties['getter'] ++ else: ++ getter_prefix = 'Get' if name_for_methods == self.type_name else '' ++ self.getter_method_name = method_name(join_name(getter_prefix, name_for_methods)) ++ self.setter_method_name = method_name(join_name('Set', name_for_methods)) ++ self.initial_method_name = method_name(join_name('Initial', name_for_methods)) ++ self.resetter_method_name = method_name(join_name('Reset', name_for_methods)) + + # If the size of the field is not None, it means it is a bit field + self.is_bit_field = self.size is not None +@@ -221,6 +224,7 @@ def _create_field(field_role, property_): + field_template=property_['field_template'], + size=size, + default_value=default_value, ++ properties=property_, + ) + + +@@ -237,6 +241,7 @@ def _create_inherited_flag_field(property_): + field_template='primitive', + size=1, + default_value='true', ++ properties=property_, + ) + + +diff --git a/third_party/WebKit/Source/build/scripts/make_css_property_metadata.py b/third_party/WebKit/Source/build/scripts/make_css_property_metadata.py +index 80df8355a5d8..1fa4eba59cf0 100755 +--- a/third_party/WebKit/Source/build/scripts/make_css_property_metadata.py ++++ b/third_party/WebKit/Source/build/scripts/make_css_property_metadata.py +@@ -24,11 +24,11 @@ class CSSPropertyMetadataWriter(css_properties.CSSProperties): + def generate_css_property_metadata_cpp(self): + return { + 'properties_including_aliases': self._properties_including_aliases, +- 'switches': [('is_descriptor', 'isDescriptor'), +- ('is_property', 'isProperty'), +- ('interpolable', 'isInterpolableProperty'), +- ('inherited', 'isInheritedProperty'), +- ('supports_percentage', 'propertySupportsPercentage'), ++ 'switches': [('is_descriptor', 'IsDescriptor'), ++ ('is_property', 'IsProperty'), ++ ('interpolable', 'IsInterpolableProperty'), ++ ('inherited', 'IsInheritedProperty'), ++ ('supports_percentage', 'PropertySupportsPercentage'), + ], + 'first_enum_value': self._first_enum_value, + } +diff --git a/third_party/WebKit/Source/build/scripts/make_css_property_names.py b/third_party/WebKit/Source/build/scripts/make_css_property_names.py +index b3e05b07a39d..949c1825d049 100755 +--- a/third_party/WebKit/Source/build/scripts/make_css_property_names.py ++++ b/third_party/WebKit/Source/build/scripts/make_css_property_names.py +@@ -122,7 +122,7 @@ struct Property; + %%define class-name %(class_name)sHash + %%define lookup-function-name findPropertyImpl + %%define hash-function-name property_hash_function +-%%define slot-name nameOffset ++%%define slot-name name_offset + %%define word-array-name property_word_list + %%enum + %%%% +@@ -133,7 +133,7 @@ struct Property; + #pragma clang diagnostic pop + #endif + +-const Property* findProperty(const char* str, unsigned int len) { ++const Property* FindProperty(const char* str, unsigned int len) { + return %(class_name)sHash::findPropertyImpl(str, len); + } + +@@ -149,7 +149,7 @@ const AtomicString& getPropertyNameAtomicString(CSSPropertyID id) { + static AtomicString* propertyStrings = + new AtomicString[lastUnresolvedCSSProperty]; // Leaked. + AtomicString& propertyString = propertyStrings[index]; +- if (propertyString.isNull()) { ++ if (propertyString.IsNull()) { + propertyString = AtomicString(propertyNameStringsPool + + propertyNameStringsOffsets[index]); + } +@@ -158,7 +158,7 @@ const AtomicString& getPropertyNameAtomicString(CSSPropertyID id) { + + String getPropertyNameString(CSSPropertyID id) { + // We share the StringImpl with the AtomicStrings. +- return getPropertyNameAtomicString(id).getString(); ++ return getPropertyNameAtomicString(id).GetString(); + } + + String getJSPropertyName(CSSPropertyID id) { +@@ -166,7 +166,7 @@ String getJSPropertyName(CSSPropertyID id) { + const char* cssPropertyName = getPropertyName(id); + const char* propertyNamePointer = cssPropertyName; + if (!propertyNamePointer) +- return emptyString; ++ return g_empty_string; + + char* resultPointer = result; + while (char character = *propertyNamePointer++) { +@@ -175,7 +175,7 @@ String getJSPropertyName(CSSPropertyID id) { + if (!nextCharacter) + break; + character = (propertyNamePointer - 2 != cssPropertyName) +- ? toASCIIUpper(nextCharacter) : nextCharacter; ++ ? ToASCIIUpper(nextCharacter) : nextCharacter; + } + *resultPointer++ = character; + } +diff --git a/third_party/WebKit/Source/build/scripts/make_css_tokenizer_codepoints.py b/third_party/WebKit/Source/build/scripts/make_css_tokenizer_codepoints.py +index d7e81d50e012..ce9cb40bdb22 100755 +--- a/third_party/WebKit/Source/build/scripts/make_css_tokenizer_codepoints.py ++++ b/third_party/WebKit/Source/build/scripts/make_css_tokenizer_codepoints.py +@@ -18,7 +18,7 @@ CPP_TEMPLATE = """ + + // Auto-generated by {module_pyname} + +-const CSSTokenizer::CodePoint CSSTokenizer::codePoints[{array_size}] = {{ ++const CSSTokenizer::CodePoint CSSTokenizer::kCodePoints[{array_size}] = {{ + {token_lines} + }}; + const unsigned codePointsNumber = {array_size}; +@@ -26,30 +26,30 @@ const unsigned codePointsNumber = {array_size}; + + + def token_type(i): +- codepoints = {'(': 'leftParenthesis', +- ')': 'rightParenthesis', +- '[': 'leftBracket', +- ']': 'rightBracket', +- '{': 'leftBrace', +- '}': 'rightBrace', +- '+': 'plusOrFullStop', +- '.': 'plusOrFullStop', +- '-': 'hyphenMinus', +- '*': 'asterisk', +- '<': 'lessThan', +- ',': 'comma', +- '/': 'solidus', +- '\\': 'reverseSolidus', +- ':': 'colon', +- ';': 'semiColon', +- '#': 'hash', +- '^': 'circumflexAccent', +- '$': 'dollarSign', +- '|': 'verticalLine', +- '~': 'tilde', +- '@': 'commercialAt', +- 'u': 'letterU', +- 'U': 'letterU', ++ codepoints = {'(': 'LeftParenthesis', ++ ')': 'RightParenthesis', ++ '[': 'LeftBracket', ++ ']': 'RightBracket', ++ '{': 'LeftBrace', ++ '}': 'RightBrace', ++ '+': 'PlusOrFullStop', ++ '.': 'PlusOrFullStop', ++ '-': 'HyphenMinus', ++ '*': 'Asterisk', ++ '<': 'LessThan', ++ ',': 'Comma', ++ '/': 'Solidus', ++ '\\': 'ReverseSolidus', ++ ':': 'Colon', ++ ';': 'SemiColon', ++ '#': 'Hash', ++ '^': 'CircumflexAccent', ++ '$': 'DollarSign', ++ '|': 'VerticalLine', ++ '~': 'Tilde', ++ '@': 'CommercialAt', ++ 'u': 'LetterU', ++ 'U': 'LetterU', + } + c = chr(i) + if c in codepoints: +@@ -57,15 +57,15 @@ def token_type(i): + whitespace = '\n\r\t\f ' + quotes = '"\'' + if c in whitespace: +- return 'whiteSpace' ++ return 'WhiteSpace' + if c.isdigit(): +- return 'asciiDigit' ++ return 'AsciiDigit' + if c.isalpha() or c == '_': +- return 'nameStart' ++ return 'NameStart' + if c in quotes: +- return 'stringStart' ++ return 'StringStart' + if i == 0: +- return 'endOfFile' ++ return 'EndOfFile' + + + class MakeCSSTokenizerCodePointsWriter(in_generator.Writer): +diff --git a/third_party/WebKit/Source/build/scripts/make_css_value_keywords.py b/third_party/WebKit/Source/build/scripts/make_css_value_keywords.py +index 71c4efc6f4d8..96546ca5997a 100755 +--- a/third_party/WebKit/Source/build/scripts/make_css_value_keywords.py ++++ b/third_party/WebKit/Source/build/scripts/make_css_value_keywords.py +@@ -77,7 +77,7 @@ struct Value; + %%define class-name %(class_name)sHash + %%define lookup-function-name findValueImpl + %%define hash-function-name value_hash_function +-%%define slot-name nameOffset ++%%define slot-name name_offset + %%define word-array-name value_word_list + %%pic + %%enum +@@ -89,7 +89,7 @@ struct Value; + #pragma clang diagnostic pop + #endif + +-const Value* findValue(const char* str, unsigned int len) { ++const Value* FindValue(const char* str, unsigned int len) { + return CSSValueKeywordsHash::findValueImpl(str, len); + } + +@@ -101,9 +101,9 @@ const char* getValueName(CSSValueID id) { + bool isValueAllowedInMode(unsigned short id, CSSParserMode mode) { + switch (id) { + %(ua_sheet_mode_values_keywords)s +- return isUASheetBehavior(mode); ++ return IsUASheetBehavior(mode); + %(quirks_mode_or_ua_sheet_mode_values_keywords)s +- return isUASheetBehavior(mode) || isQuirksModeBehavior(mode); ++ return IsUASheetBehavior(mode) || IsQuirksModeBehavior(mode); + default: + return true; + } +diff --git a/third_party/WebKit/Source/build/scripts/make_instrumenting_probes.py b/third_party/WebKit/Source/build/scripts/make_instrumenting_probes.py +index 0b7105acdb14..d769096f5657 100644 +--- a/third_party/WebKit/Source/build/scripts/make_instrumenting_probes.py ++++ b/third_party/WebKit/Source/build/scripts/make_instrumenting_probes.py +@@ -24,6 +24,7 @@ third_party_dir = os.path.normpath(os.path.join(module_path, os.pardir, os.pardi + sys.path.insert(1, third_party_dir) + import jinja2 + ++from name_utilities import method_name + + def _json5_loads(lines): + # Use json5.loads when json5 is available. Currently we use simple +@@ -245,6 +246,7 @@ template_context = { + "files": files, + "agents": build_observers(), + "config": config, ++ "method_name": method_name, + "name": base_name, + "input_file": os.path.basename(input_path) + } +diff --git a/third_party/WebKit/Source/build/scripts/make_media_features.py b/third_party/WebKit/Source/build/scripts/make_media_features.py +index b1041248ebb3..22db17424d2a 100755 +--- a/third_party/WebKit/Source/build/scripts/make_media_features.py ++++ b/third_party/WebKit/Source/build/scripts/make_media_features.py +@@ -19,6 +19,7 @@ class MakeMediaFeaturesWriter(json5_generator.Writer): + filters = { + 'symbol': media_feature_symbol.getMediaFeatureSymbolWithSuffix(''), + 'to_macro_style': name_utilities.to_macro_style, ++ 'upper_first_letter': name_utilities.upper_first_letter, + } + + def __init__(self, json5_file_path): +diff --git a/third_party/WebKit/Source/build/scripts/make_style_builder.py b/third_party/WebKit/Source/build/scripts/make_style_builder.py +index 70cc8e98e3e8..f73c570bc698 100755 +--- a/third_party/WebKit/Source/build/scripts/make_style_builder.py ++++ b/third_party/WebKit/Source/build/scripts/make_style_builder.py +@@ -57,16 +57,16 @@ class StyleBuilderWriter(css_properties.CSSProperties): + name = property['name_for_methods'] + simple_type_name = str(property['type_name']).split('::')[-1] + set_if_none(property, 'type_name', 'E' + name) +- set_if_none(property, 'getter', lower_first(name) if simple_type_name != name else 'get' + name) +- set_if_none(property, 'setter', 'set' + name) ++ set_if_none(property, 'getter', name if simple_type_name != name else 'Get' + name) ++ set_if_none(property, 'setter', 'Set' + name) + set_if_none(property, 'inherited', False) +- set_if_none(property, 'initial', 'initial' + name) ++ set_if_none(property, 'initial', 'Initial' + name) + if property['custom_all']: + property['custom_initial'] = True + property['custom_inherit'] = True + property['custom_value'] = True + if property['inherited']: +- property['is_inherited_setter'] = 'set' + name + 'IsInherited' ++ property['is_inherited_setter'] = 'Set' + name + 'IsInherited' + property['should_declare_functions'] = not property['use_handlers_for'] and not property['longhands'] \ + and not property['direction_aware'] and not property['builder_skip'] \ + and property['is_property'] +diff --git a/third_party/WebKit/Source/build/scripts/name_utilities.py b/third_party/WebKit/Source/build/scripts/name_utilities.py +index cd4dad7997db..df4b8436ffa4 100644 +--- a/third_party/WebKit/Source/build/scripts/name_utilities.py ++++ b/third_party/WebKit/Source/build/scripts/name_utilities.py +@@ -148,11 +148,12 @@ def enum_value_name(name): + + + def class_member_name(name): +- return 'm_' + lower_camel_case(name) ++ lower_case_words = [word.lower() for word in split_name(name)] ++ return "_".join(lower_case_words) + "_" + + + def method_name(name): +- return lower_camel_case(name) ++ return upper_camel_case(name) + + + def join_name(*names): +diff --git a/third_party/WebKit/Source/build/scripts/templates/CSSOMKeywords.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/CSSOMKeywords.cpp.tmpl +index 776272850292..f865a43e9902 100644 +--- a/third_party/WebKit/Source/build/scripts/templates/CSSOMKeywords.cpp.tmpl ++++ b/third_party/WebKit/Source/build/scripts/templates/CSSOMKeywords.cpp.tmpl +@@ -23,7 +23,7 @@ KeywordTable createKeywordTable() { + {% for keywordValueID in property.keywordIDs %} + {{property.lower_camel_name}}Keywords.push_back({{keywordValueID}}); + {% endfor %} +- table.set({{property_id}}, {{property.lower_camel_name}}Keywords); ++ table.Set({{property_id}}, {{property.lower_camel_name}}Keywords); + } + {% endfor %} + return table; +@@ -36,9 +36,9 @@ KeywordTable& keywordTable() { + + } // namespace + +-bool CSSOMKeywords::validKeywordForProperty(CSSPropertyID id, ++bool CSSOMKeywords::ValidKeywordForProperty(CSSPropertyID id, + const CSSKeywordValue& keyword) { +- CSSValueID valueID = keyword.keywordValueID(); ++ CSSValueID valueID = keyword.KeywordValueID(); + if (valueID == CSSValueInvalid) { + return false; + } +@@ -49,12 +49,12 @@ bool CSSOMKeywords::validKeywordForProperty(CSSPropertyID id, + return true; + } + +- const KeywordTable::iterator tableIterator = keywordTable().find(id); ++ const KeywordTable::iterator tableIterator = keywordTable().Find(id); + if (tableIterator == keywordTable().end()) { + return false; + } + +- return tableIterator->value.contains(valueID); ++ return tableIterator->value.Contains(valueID); + } + + } // namespace blink +diff --git a/third_party/WebKit/Source/build/scripts/templates/CSSOMTypes.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/CSSOMTypes.cpp.tmpl +index 33b93b0688df..7c90430ad536 100644 +--- a/third_party/WebKit/Source/build/scripts/templates/CSSOMTypes.cpp.tmpl ++++ b/third_party/WebKit/Source/build/scripts/templates/CSSOMTypes.cpp.tmpl +@@ -12,35 +12,35 @@ + + namespace blink { + +-bool CSSOMTypes::propertyCanTake(CSSPropertyID id, ++bool CSSOMTypes::PropertyCanTake(CSSPropertyID id, + const CSSStyleValue& styleValue) { + // Shortcut special case. +- if (styleValue.type() == CSSStyleValue::SimpleLengthType || +- styleValue.type() == CSSStyleValue::CalcLengthType) { +- if (toCSSLengthValue(styleValue).containsPercent() && +- !CSSPropertyMetadata::propertySupportsPercentage(id)) { ++ if (styleValue.GetType() == CSSStyleValue::kSimpleLengthType || ++ styleValue.GetType() == CSSStyleValue::kCalcLengthType) { ++ if (ToCSSLengthValue(styleValue).ContainsPercent() && ++ !CSSPropertyMetadata::PropertySupportsPercentage(id)) { + return false; + } +- } else if (styleValue.type() == CSSStyleValue::KeywordType) { ++ } else if (styleValue.GetType() == CSSStyleValue::kKeywordType) { + // Keywords are also handled differently. +- return CSSOMKeywords::validKeywordForProperty( +- id, toCSSKeywordValue(styleValue)); +- } else if (styleValue.type() == CSSStyleValue::Unknown) { ++ return CSSOMKeywords::ValidKeywordForProperty( ++ id, ToCSSKeywordValue(styleValue)); ++ } else if (styleValue.GetType() == CSSStyleValue::kUnknown) { + // The check happens later in this case. + return true; + } + +- return CSSOMTypes::propertyCanTakeType(id, styleValue.type()); ++ return CSSOMTypes::PropertyCanTakeType(id, styleValue.GetType()); + } + +-bool CSSOMTypes::propertyCanTakeType(CSSPropertyID id, ++bool CSSOMTypes::PropertyCanTakeType(CSSPropertyID id, + CSSStyleValue::StyleValueType type) { + switch (id) { + {% for property_id, property in properties.items() if property.typedom_types %} + case {{property_id}}: + return ( + {% for type in property.typedom_types %} +- {{ "|| " if not loop.first }}type == CSSStyleValue::{{type}}Type ++ {{ "|| " if not loop.first }}type == CSSStyleValue::k{{type}}Type + {% endfor %} + ); + {% endfor %} +diff --git a/third_party/WebKit/Source/build/scripts/templates/CSSPrimitiveValueUnitTrie.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/CSSPrimitiveValueUnitTrie.cpp.tmpl +index 108509aced5c..61c62cd85310 100644 +--- a/third_party/WebKit/Source/build/scripts/templates/CSSPrimitiveValueUnitTrie.cpp.tmpl ++++ b/third_party/WebKit/Source/build/scripts/templates/CSSPrimitiveValueUnitTrie.cpp.tmpl +@@ -16,17 +16,17 @@ CSSPrimitiveValue::UnitType cssPrimitiveValueUnitFromTrie( + DCHECK(length); + {% macro trie_return_statement(unit_name) %}CSSPrimitiveValue::UnitType::{{unit_name}}{% endmacro %} + {{ trie_length_switch(length_tries, trie_return_statement, True) | indent(4) }} +- return CSSPrimitiveValue::UnitType::Unknown; ++ return CSSPrimitiveValue::UnitType::kUnknown; + } + + } // namespace + +-CSSPrimitiveValue::UnitType CSSPrimitiveValue::stringToUnitType( ++CSSPrimitiveValue::UnitType CSSPrimitiveValue::StringToUnitType( + const LChar* characters8, unsigned length) { + return cssPrimitiveValueUnitFromTrie(characters8, length); + } + +-CSSPrimitiveValue::UnitType CSSPrimitiveValue::stringToUnitType( ++CSSPrimitiveValue::UnitType CSSPrimitiveValue::StringToUnitType( + const UChar* characters16, unsigned length) { + return cssPrimitiveValueUnitFromTrie(characters16, length); + } +diff --git a/third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl +index ea16a173d3ba..b78f752ae39a 100644 +--- a/third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl ++++ b/third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl +@@ -50,7 +50,7 @@ static size_t CSSDescriptorIndices[] = { + {% endfor %} + }; + +-const CSSPropertyDescriptor& CSSPropertyDescriptor::get(CSSPropertyID id) { ++const CSSPropertyDescriptor& CSSPropertyDescriptor::Get(CSSPropertyID id) { + return cssPropertyDescriptors[CSSDescriptorIndices[id]]; + } + +diff --git a/third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.h.tmpl b/third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.h.tmpl +index 6012ba22efae..33f5a674c2c6 100644 +--- a/third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.h.tmpl ++++ b/third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.h.tmpl +@@ -19,7 +19,7 @@ struct CSSPropertyDescriptor { + // Returns the corresponding CSSPropertyDescriptor for a given CSSPropertyID. + // Use this function to access the API for a property. Returns a descriptor + // with isValid set to false if no descriptor exists for this ID. +- static const CSSPropertyDescriptor& get(CSSPropertyID); ++ static const CSSPropertyDescriptor& Get(CSSPropertyID); + }; + + } // namespace blink +diff --git a/third_party/WebKit/Source/build/scripts/templates/CSSPropertyMetadata.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/CSSPropertyMetadata.cpp.tmpl +index d834f5483d5e..219fbc6a1bbf 100644 +--- a/third_party/WebKit/Source/build/scripts/templates/CSSPropertyMetadata.cpp.tmpl ++++ b/third_party/WebKit/Source/build/scripts/templates/CSSPropertyMetadata.cpp.tmpl +@@ -17,10 +17,10 @@ bool CSSPropertyMetadata::{{function_name}}(CSSPropertyID unresolvedProperty) { + {% for property in properties_including_aliases if property[flag] %} + case {{property.property_id}}: + {% endfor %} +- {% if function_name in ("isInheritedProperty", "isProperty") %} ++ {% if function_name in ("IsInheritedProperty", "IsProperty") %} + case CSSPropertyVariable: + {% endif %} +- {% if function_name == "isProperty" %} ++ {% if function_name == "IsProperty" %} + case CSSPropertyApplyAtRule: + {% endif %} + return true; +@@ -30,7 +30,7 @@ bool CSSPropertyMetadata::{{function_name}}(CSSPropertyID unresolvedProperty) { + } + {% endfor %} + +-char CSSPropertyMetadata::repetitionSeparator(CSSPropertyID unresolvedProperty) { ++char CSSPropertyMetadata::RepetitionSeparator(CSSPropertyID unresolvedProperty) { + switch (unresolvedProperty) { + {% for property in properties_including_aliases if property.separator %} + case {{property.property_id}}: +@@ -41,11 +41,11 @@ char CSSPropertyMetadata::repetitionSeparator(CSSPropertyID unresolvedProperty) + } + } + +-bool CSSPropertyMetadata::propertyIsRepeated(CSSPropertyID unresolvedProperty) { +- return repetitionSeparator(unresolvedProperty) != 0; ++bool CSSPropertyMetadata::PropertyIsRepeated(CSSPropertyID unresolvedProperty) { ++ return RepetitionSeparator(unresolvedProperty) != 0; + } + +-bool CSSPropertyMetadata::isEnabledProperty(CSSPropertyID unresolvedProperty) { ++bool CSSPropertyMetadata::IsEnabledProperty(CSSPropertyID unresolvedProperty) { + CSSPropertyID property = resolveCSSPropertyID(unresolvedProperty); + static std::bitset<numCSSProperties>* enabledProperties = nullptr; + if (!enabledProperties) { +@@ -69,13 +69,13 @@ bool CSSPropertyMetadata::isEnabledProperty(CSSPropertyID unresolvedProperty) { + return RuntimeEnabledFeatures::cssApplyAtRulesEnabled(); + } + +-void CSSPropertyMetadata::filterEnabledCSSPropertiesIntoVector( ++void CSSPropertyMetadata::FilterEnabledCSSPropertiesIntoVector( + const CSSPropertyID* properties, + size_t propertyCount, + Vector<CSSPropertyID>& outVector) { + for (unsigned i = 0; i < propertyCount; i++) { + CSSPropertyID property = properties[i]; +- if (isEnabledProperty(property)) ++ if (IsEnabledProperty(property)) + outVector.push_back(property); + } + } +diff --git a/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.cpp.tmpl +index 4c8ec2878b49..16f0ab40d9eb 100644 +--- a/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.cpp.tmpl ++++ b/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.cpp.tmpl +@@ -17,21 +17,21 @@ struct SameSizeAsComputedStyleBase { + // ensure that the buckets are placed so that each takes up at most 1 word. + ASSERT_SIZE(ComputedStyleBase, SameSizeAsComputedStyleBase); + +-void ComputedStyleBase::inheritFrom(const ComputedStyleBase& inheritParent, ++void ComputedStyleBase::InheritFrom(const ComputedStyleBase& inheritParent, + IsAtShadowBoundary isAtShadowBoundary) { + {% for field in fields if field.is_inherited %} + {{field.name}} = inheritParent.{{field.name}}; + {% endfor %} + } + +-void ComputedStyleBase::copyNonInheritedFromCached( ++void ComputedStyleBase::CopyNonInheritedFromCached( + const ComputedStyleBase& other) { + {% for field in fields if (field.is_property and not field.is_inherited) or field.is_inherited_flag %} + {{field.name}} = other.{{field.name}}; + {% endfor %} + } + +-void ComputedStyleBase::propagateIndependentInheritedProperties( ++void ComputedStyleBase::PropagateIndependentInheritedProperties( + const ComputedStyleBase& parentStyle) { + {% for field in fields if field.is_property and field.is_independent %} + if ({{field.is_inherited_method_name}}()) +diff --git a/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl b/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl +index 5325ec38c198..03a48012e77d 100644 +--- a/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl ++++ b/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl +@@ -33,7 +33,7 @@ namespace blink { + // in ComputedStyle.h. + class CORE_EXPORT ComputedStyleBase { + public: +- inline bool independentInheritedEqual(const ComputedStyleBase& o) const { ++ inline bool IndependentInheritedEqual(const ComputedStyleBase& o) const { + return ( + {% for field in fields if field.is_inherited and field.is_independent %} + {{field.name}} == o.{{field.name}}{{print_if(not loop.last, ' &&')}} +@@ -41,7 +41,7 @@ class CORE_EXPORT ComputedStyleBase { + ); + } + +- inline bool nonIndependentInheritedEqual(const ComputedStyleBase& o) const { ++ inline bool NonIndependentInheritedEqual(const ComputedStyleBase& o) const { + return ( + {% for field in fields if field.is_inherited and not field.is_independent %} + {{field.name}} == o.{{field.name}}{{print_if(not loop.last, ' &&')}} +@@ -49,11 +49,11 @@ class CORE_EXPORT ComputedStyleBase { + ); + } + +- inline bool inheritedEqual(const ComputedStyleBase& o) const { +- return independentInheritedEqual(o) && nonIndependentInheritedEqual(o); ++ inline bool InheritedEqual(const ComputedStyleBase& o) const { ++ return IndependentInheritedEqual(o) && NonIndependentInheritedEqual(o); + } + +- inline bool nonInheritedEqual(const ComputedStyleBase& o) const { ++ inline bool NonInheritedEqual(const ComputedStyleBase& o) const { + return ( + {% for field in fields if field.is_property and not field.is_inherited %} + {{field.name}} == o.{{field.name}}{{print_if(not loop.last, ' &&')}} +@@ -62,17 +62,17 @@ class CORE_EXPORT ComputedStyleBase { + } + + enum IsAtShadowBoundary { +- AtShadowBoundary, +- NotAtShadowBoundary, ++ kAtShadowBoundary, ++ kNotAtShadowBoundary, + }; +- void inheritFrom(const ComputedStyleBase& inheritParent, +- IsAtShadowBoundary isAtShadowBoundary = NotAtShadowBoundary); ++ void InheritFrom(const ComputedStyleBase& inheritParent, ++ IsAtShadowBoundary isAtShadowBoundary = kNotAtShadowBoundary); + +- void copyNonInheritedFromCached(const ComputedStyleBase& other); ++ void CopyNonInheritedFromCached(const ComputedStyleBase& other); + + // Copies the values of any independent inherited properties from the parent + // style that are marked as inherited by this style. +- void propagateIndependentInheritedProperties( ++ void PropagateIndependentInheritedProperties( + const ComputedStyleBase& parentStyle); + + // Fields. +diff --git a/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl +index 280201db8ac5..4dfd11502eb9 100644 +--- a/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl ++++ b/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl +@@ -38,12 +38,12 @@ static {{namespace}}Element* {{tag|symbol}}Constructor( + CreateElementFlags flags) { + {% if tag.runtimeEnabled %} + if (!RuntimeEnabledFeatures::{{tag.runtimeEnabled}}Enabled()) +- return {{fallback_interface}}::create({{tag|symbol}}Tag, document); ++ return {{fallback_interface}}::Create({{tag|symbol}}Tag, document); + {% endif %} +- return {{tag.interface}}::create( ++ return {{tag.interface}}::Create( + {%- if tag.multipleTagNames %}{{tag|symbol}}Tag, {% endif -%} + document +- {%- if tag.constructorNeedsCreatedByParser %}, flags & CreatedByParser{% endif -%} ++ {%- if tag.constructorNeedsCreatedByParser %}, flags & kCreatedByParser{% endif -%} + ); + } + {% endfor %} +@@ -64,7 +64,7 @@ static void create{{namespace}}FunctionMap() { + {% endfor %} + }; + for (size_t i = 0; i < WTF_ARRAY_LENGTH(data); i++) +- g_constructors->set(data[i].tag.localName(), data[i].func); ++ g_constructors->Set(data[i].tag.LocalName(), data[i].func); + } + + {{namespace}}Element* {{namespace}}ElementFactory::create{{namespace}}Element( +@@ -82,23 +82,23 @@ static void create{{namespace}}FunctionMap() { + // TODO(dominicc): When the HTML parser can pass an error + // reporting ExceptionState, and "v0" custom elements have been + // removed, consolidate custom element creation into one place. +- if (flags != CreatedByCreateElement && CustomElement::shouldCreateCustomElement(localName)) { +- QualifiedName tagName(nullAtom, localName, HTMLNames::xhtmlNamespaceURI); +- if (flags & AsynchronousCustomElements) +- return CustomElement::createCustomElementAsync(document, tagName); +- return CustomElement::createCustomElementSync(document, tagName); ++ if (flags != kCreatedByCreateElement && CustomElement::ShouldCreateCustomElement(localName)) { ++ QualifiedName tagName(g_null_atom, localName, HTMLNames::xhtmlNamespaceURI); ++ if (flags & kAsynchronousCustomElements) ++ return CustomElement::CreateCustomElementAsync(document, tagName); ++ return CustomElement::CreateCustomElementSync(document, tagName); + } + {% endif %} + +- if (document.registrationContext() && +- V0CustomElement::isValidName(localName)) { +- Element* element = document.registrationContext()->createCustomTagElement( +- document, QualifiedName(nullAtom, localName, {{namespace_prefix}}NamespaceURI)); +- SECURITY_DCHECK(element->is{{namespace}}Element()); +- return to{{namespace}}Element(element); ++ if (document.RegistrationContext() && ++ V0CustomElement::IsValidName(localName)) { ++ Element* element = document.RegistrationContext()->CreateCustomTagElement( ++ document, QualifiedName(g_null_atom, localName, {{namespace_prefix}}NamespaceURI)); ++ SECURITY_DCHECK(element->Is{{namespace}}Element()); ++ return To{{namespace}}Element(element); + } + +- return {{fallback_interface}}::create(QualifiedName(nullAtom, localName, {{namespace_prefix}}NamespaceURI), document); ++ return {{fallback_interface}}::Create(QualifiedName(g_null_atom, localName, {{namespace_prefix}}NamespaceURI), document); + } + + } // namespace blink +diff --git a/third_party/WebKit/Source/build/scripts/templates/ElementFactory.h.tmpl b/third_party/WebKit/Source/build/scripts/templates/ElementFactory.h.tmpl +index e684bc32724f..8bd30a00d1e8 100644 +--- a/third_party/WebKit/Source/build/scripts/templates/ElementFactory.h.tmpl ++++ b/third_party/WebKit/Source/build/scripts/templates/ElementFactory.h.tmpl +@@ -22,7 +22,7 @@ class {{namespace}}ElementFactory { + static {{namespace}}Element* create{{namespace}}Element( + const AtomicString& localName, + Document&, +- CreateElementFlags flags = CreatedByParser); ++ CreateElementFlags flags = kCreatedByParser); + }; + + } // namespace blink +diff --git a/third_party/WebKit/Source/build/scripts/templates/ElementLookupTrie.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/ElementLookupTrie.cpp.tmpl +index 4d6828a42b74..3bc573e57226 100644 +--- a/third_party/WebKit/Source/build/scripts/templates/ElementLookupTrie.cpp.tmpl ++++ b/third_party/WebKit/Source/build/scripts/templates/ElementLookupTrie.cpp.tmpl +@@ -14,7 +14,7 @@ using namespace {{namespace}}Names; + StringImpl* lookup{{namespace}}Tag(const UChar* data, unsigned length) { + DCHECK(data); + DCHECK(length); +- {% macro trie_return_statement(tag) %}{{tag}}Tag.localName().impl(){% endmacro %} ++ {% macro trie_return_statement(tag) %}{{tag}}Tag.LocalName().Impl(){% endmacro %} + {{ trie_length_switch(length_tries, trie_return_statement, false) | indent(4) }} + return nullptr; + } +diff --git a/third_party/WebKit/Source/build/scripts/templates/ElementTypeHelpers.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/ElementTypeHelpers.cpp.tmpl +index fafe78021108..4afbeca8ad77 100644 +--- a/third_party/WebKit/Source/build/scripts/templates/ElementTypeHelpers.cpp.tmpl ++++ b/third_party/WebKit/Source/build/scripts/templates/ElementTypeHelpers.cpp.tmpl +@@ -17,13 +17,13 @@ void createHTMLTypeMap() { + DCHECK(!html_type_map); + html_type_map = new HTMLTypeMap; + {% for tag in tags|sort %} +- html_type_map->set(AtomicString("{{tag.name}}"), HTMLElementType::k{{tag.interface}}); ++ html_type_map->Set(AtomicString("{{tag.name}}"), HTMLElementType::k{{tag.interface}}); + {% endfor %} + } + + HTMLElementType htmlElementTypeForTag(const AtomicString& tagName) { + if (!html_type_map) createHTMLTypeMap(); +- if (html_type_map->contains(tagName)) { ++ if (html_type_map->Contains(tagName)) { + {% for tag in tags|sort %} + {% if tag.runtimeEnabled %} + if (tagName == "{{tag.name}}") { +diff --git a/third_party/WebKit/Source/build/scripts/templates/ElementTypeHelpers.h.tmpl b/third_party/WebKit/Source/build/scripts/templates/ElementTypeHelpers.h.tmpl +index 35ca29d97c3c..4ea2e9657a03 100644 +--- a/third_party/WebKit/Source/build/scripts/templates/ElementTypeHelpers.h.tmpl ++++ b/third_party/WebKit/Source/build/scripts/templates/ElementTypeHelpers.h.tmpl +@@ -21,23 +21,23 @@ inline bool is{{tag.interface}}(const {{namespace}}Element& element) { + if (!RuntimeEnabledFeatures::{{tag.runtimeEnabled}}Enabled()) + return false; + {% endif %} +- return element.hasTagName({{namespace}}Names::{{tag|symbol}}Tag); ++ return element.HasTagName({{namespace}}Names::{{tag|symbol}}Tag); + } + inline bool is{{tag.interface}}(const {{namespace}}Element* element) { + return element && is{{tag.interface}}(*element); + } + inline bool is{{tag.interface}}(const Node& node) { +- return node.is{{namespace}}Element() && is{{tag.interface}}(to{{namespace}}Element(node)); ++ return node.Is{{namespace}}Element() && is{{tag.interface}}(To{{namespace}}Element(node)); + } + inline bool is{{tag.interface}}(const Node* node) { + return node && is{{tag.interface}}(*node); + } + template <> +-inline bool isElementOfType<const {{tag.interface}}>(const Node& node) { ++inline bool IsElementOfType<const {{tag.interface}}>(const Node& node) { + return is{{tag.interface}}(node); + } + template <> +-inline bool isElementOfType<const {{tag.interface}}>(const {{namespace}}Element& element) { ++inline bool IsElementOfType<const {{tag.interface}}>(const {{namespace}}Element& element) { + return is{{tag.interface}}(element); + } + +@@ -47,8 +47,8 @@ inline bool isElementOfType<const {{tag.interface}}>(const {{namespace}}Element& + // unsafe due to multiple inheritence. + + {% for tag in tags|sort if not tag.multipleTagNames and not tag.noTypeHelpers %} +-#define to{{tag.interface}}(x) blink::toElement<blink::{{tag.interface}}>(x) +-#define to{{tag.interface}}OrDie(x) blink::toElementOrDie<blink::{{tag.interface}}>(x) ++#define to{{tag.interface}}(x) blink::ToElement<blink::{{tag.interface}}>(x) ++#define to{{tag.interface}}OrDie(x) blink::ToElementOrDie<blink::{{tag.interface}}>(x) + {% endfor %} + + {% if namespace == "HTML" %} +diff --git a/third_party/WebKit/Source/build/scripts/templates/EventFactory.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/EventFactory.cpp.tmpl +index b5fa84794be1..b552329352a7 100644 +--- a/third_party/WebKit/Source/build/scripts/templates/EventFactory.cpp.tmpl ++++ b/third_party/WebKit/Source/build/scripts/templates/EventFactory.cpp.tmpl +@@ -13,17 +13,17 @@ + + namespace blink { + +-{{namespace}}* {{namespace}}{{suffix}}Factory::create(ExecutionContext* executionContext, const String& type) { ++{{namespace}}* {{namespace}}{{suffix}}Factory::Create(ExecutionContext* executionContext, const String& type) { + {% for event in events if event|script_name|create_event_whitelist or event|script_name|create_event_measure_whitelist %} + {% if event|script_name|create_event_whitelist or event|script_name|create_event_measure_whitelist %} +- if (equalIgnoringCase(type, "{{event|script_name}}"){% if event.RuntimeEnabled %} && RuntimeEnabledFeatures::{{event.RuntimeEnabled|lower_first}}(){% endif %}) { ++ if (EqualIgnoringCase(type, "{{event|script_name}}"){% if event.RuntimeEnabled %} && RuntimeEnabledFeatures::{{event.RuntimeEnabled|lower_first}}(){% endif %}) { + {% else %} + if (type == "{{event|script_name}}"{% if event.RuntimeEnabled %} && RuntimeEnabledFeatures::{{event.RuntimeEnabled|lower_first}}(){% endif %}) { + {% endif %} + {% if not event|script_name|create_event_whitelist %} +- UseCounter::count(executionContext, UseCounter::{{event|script_name|measure_name}}); ++ UseCounter::Count(executionContext, UseCounter::k{{event|script_name|measure_name}}); + {% endif %} +- return {{event|cpp_name}}::create(); ++ return {{event|cpp_name}}::Create(); + } + {% endfor %} + return nullptr; +diff --git a/third_party/WebKit/Source/build/scripts/templates/InstrumentingProbesImpl.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/InstrumentingProbesImpl.cpp.tmpl +index 4db548ba0847..6dd319b62f24 100644 +--- a/third_party/WebKit/Source/build/scripts/templates/InstrumentingProbesImpl.cpp.tmpl ++++ b/third_party/WebKit/Source/build/scripts/templates/InstrumentingProbesImpl.cpp.tmpl +@@ -28,7 +28,7 @@ void {{sink_class}}::add{{class_name}}({{class_name}}* agent) { + + void {{sink_class}}::remove{{class_name}}({{class_name}}* agent) { + m_{{getter_name}}s.erase(agent); +- m_has{{class_name}}s = !m_{{getter_name}}s.isEmpty(); ++ m_has{{class_name}}s = !m_{{getter_name}}s.IsEmpty(); + } + + {% endfor -%} +@@ -37,7 +37,7 @@ DEFINE_TRACE({{sink_class}}) + { + {% for agent in agents %} + {% set getter_name = agent | agent_name_to_class | to_lower_case %} +- visitor->trace(m_{{getter_name}}s); ++ visitor->Trace(m_{{getter_name}}s); + {% endfor %} + } + +@@ -50,8 +50,8 @@ namespace probe { + {%- endmacro %} + + {% macro probe_body(probe, common_name) %} +-{% set agent_probe_name = common_name or probe.name %} +- {{sink_class}}* sink = to{{sink_class}}({{probe.params[0].name}}); ++{% set agent_probe_name = method_name(common_name or probe.name) %} ++ {{sink_class}}* sink = To{{sink_class}}({{probe.params[0].name}}); + if (!sink) + return; + {% for param in probe.params %} +@@ -77,11 +77,11 @@ namespace probe { + {%- if not loop.last %}, + {% endif %} + {% endfor %} { +-{% call probe_body(probe, "will") %}*this{% endcall %} ++{% call probe_body(probe, "Will") %}*this{% endcall %} + } + + {{probe.name}}::~{{probe.name}}() { +-{% call probe_body(probe, "did") %}*this{% endcall %} ++{% call probe_body(probe, "Did") %}*this{% endcall %} + } + + {% else -%} +diff --git a/third_party/WebKit/Source/build/scripts/templates/InternalSettingsGenerated.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/InternalSettingsGenerated.cpp.tmpl +index 5eb67dfdd737..66cdd9a0314d 100644 +--- a/third_party/WebKit/Source/build/scripts/templates/InternalSettingsGenerated.cpp.tmpl ++++ b/third_party/WebKit/Source/build/scripts/templates/InternalSettingsGenerated.cpp.tmpl +@@ -11,7 +11,7 @@ namespace blink { + InternalSettingsGenerated::InternalSettingsGenerated(Page* page) + : m_page(page) + {% for setting in settings if setting.type|to_idl_type %} +- , m_{{setting.name}}(page->settings().get{{setting.name|upper_first}}()) ++ , m_{{setting.name}}(page->GetSettings().Get{{setting.name|upper_first}}()) + {% endfor %} + { + } +@@ -20,18 +20,18 @@ InternalSettingsGenerated::~InternalSettingsGenerated() {} + + void InternalSettingsGenerated::resetToConsistentState() { + {% for setting in settings if setting.type|to_idl_type %} +- m_page->settings().set{{setting.name|upper_first}}(m_{{setting.name}}); ++ m_page->GetSettings().Set{{setting.name|upper_first}}(m_{{setting.name}}); + {% endfor %} + } + {% for setting in settings if setting.type|to_idl_type %} + + void InternalSettingsGenerated::set{{setting.name|upper_first}}({{setting.type|to_passing_type}} {{setting.name}}) { +- m_page->settings().set{{setting.name|upper_first}}({{setting.name}}); ++ m_page->GetSettings().Set{{setting.name|upper_first}}({{setting.name}}); + } + {% endfor %} + + DEFINE_TRACE(InternalSettingsGenerated) { +- visitor->trace(m_page); ++ visitor->Trace(m_page); + } + + } // namespace blink +diff --git a/third_party/WebKit/Source/build/scripts/templates/MakeNames.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/MakeNames.cpp.tmpl +index 3621be2e6045..01f860bcebc2 100644 +--- a/third_party/WebKit/Source/build/scripts/templates/MakeNames.cpp.tmpl ++++ b/third_party/WebKit/Source/build/scripts/templates/MakeNames.cpp.tmpl +@@ -35,7 +35,7 @@ void init{{suffix}}() { + }; + + for (size_t i = 0; i < WTF_ARRAY_LENGTH(kNames); i++) { +- StringImpl* stringImpl = StringImpl::createStatic(kNames[i].name, kNames[i].length, kNames[i].hash); ++ StringImpl* stringImpl = StringImpl::CreateStatic(kNames[i].name, kNames[i].length, kNames[i].hash); + void* address = reinterpret_cast<AtomicString*>(&{{suffix}}NamesStorage) + i; + new (address) AtomicString(stringImpl); + } +diff --git a/third_party/WebKit/Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl +index 69f37ea04db7..25f9ba9f46e4 100644 +--- a/third_party/WebKit/Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl ++++ b/third_party/WebKit/Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl +@@ -25,7 +25,7 @@ const {{namespace}}QualifiedName& {{tag|symbol}}Tag = reinterpret_cast<{{namespa + + + std::unique_ptr<const {{namespace}}QualifiedName*[]> get{{namespace}}Tags() { +- std::unique_ptr<const {{namespace}}QualifiedName*[]> tags = wrapArrayUnique(new const {{namespace}}QualifiedName*[{{namespace}}TagsCount]); ++ std::unique_ptr<const {{namespace}}QualifiedName*[]> tags = WrapArrayUnique(new const {{namespace}}QualifiedName*[{{namespace}}TagsCount]); + for (size_t i = 0; i < {{namespace}}TagsCount; i++) + tags[i] = reinterpret_cast<{{namespace}}QualifiedName*>(&{{suffix}}TagStorage) + i; + return tags; +@@ -42,7 +42,7 @@ const QualifiedName& {{attr|symbol}}Attr = reinterpret_cast<QualifiedName*>(&{{s + + {% if namespace != 'HTML' %} + std::unique_ptr<const QualifiedName*[]> get{{namespace}}Attrs() { +- std::unique_ptr<const QualifiedName*[]> attrs = wrapArrayUnique(new const QualifiedName*[{{namespace}}AttrsCount]); ++ std::unique_ptr<const QualifiedName*[]> attrs = WrapArrayUnique(new const QualifiedName*[{{namespace}}AttrsCount]); + for (size_t i = 0; i < {{namespace}}AttrsCount; i++) + attrs[i] = reinterpret_cast<QualifiedName*>(&{{suffix}}AttrStorage) + i; + return attrs; +@@ -77,11 +77,11 @@ void init() { + {% endif %} + size_t attr_i = 0; + for (size_t i = 0; i < WTF_ARRAY_LENGTH(kNames); i++) { +- StringImpl* stringImpl = StringImpl::createStatic(kNames[i].name, kNames[i].length, kNames[i].hash); ++ StringImpl* stringImpl = StringImpl::CreateStatic(kNames[i].name, kNames[i].length, kNames[i].hash); + {% if tags %} + if (kNames[i].isTag) { + void* address = reinterpret_cast<{{namespace}}QualifiedName*>(&{{suffix}}TagStorage) + tag_i; +- QualifiedName::createStatic(address, stringImpl, {{namespace_prefix}}NS); ++ QualifiedName::CreateStatic(address, stringImpl, {{namespace_prefix}}NS); + tag_i++; + } + +@@ -90,9 +90,9 @@ void init() { + {% endif %} + void* address = reinterpret_cast<QualifiedName*>(&{{suffix}}AttrStorage) + attr_i; + {% if use_namespace_for_attrs %} +- QualifiedName::createStatic(address, stringImpl, {{namespace_prefix}}NS); ++ QualifiedName::CreateStatic(address, stringImpl, {{namespace_prefix}}NS); + {% else %} +- QualifiedName::createStatic(address, stringImpl); ++ QualifiedName::CreateStatic(address, stringImpl); + {% endif %} + attr_i++; + } +diff --git a/third_party/WebKit/Source/build/scripts/templates/MediaFeatures.h.tmpl b/third_party/WebKit/Source/build/scripts/templates/MediaFeatures.h.tmpl +index d4a56ab0eb1f..e357f3b1c269 100644 +--- a/third_party/WebKit/Source/build/scripts/templates/MediaFeatures.h.tmpl ++++ b/third_party/WebKit/Source/build/scripts/templates/MediaFeatures.h.tmpl +@@ -6,7 +6,9 @@ + + #define CSS_MEDIAQUERY_NAMES_FOR_EACH_MEDIAFEATURE(macro) \ + {% for entry in entries %} +- macro({{entry|symbol}}){% if not loop.last %} \ ++ {% set constant_prefix = entry | symbol %} ++ {% set method_prefix = constant_prefix | upper_first_letter %} ++ macro({{constant_prefix}}, {{method_prefix}}){% if not loop.last %} \ + {% endif %} + {% endfor %} + +diff --git a/third_party/WebKit/Source/build/scripts/templates/OriginTrials.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/OriginTrials.cpp.tmpl +index 5d81ac5a16a7..4b222bdf05eb 100644 +--- a/third_party/WebKit/Source/build/scripts/templates/OriginTrials.cpp.tmpl ++++ b/third_party/WebKit/Source/build/scripts/templates/OriginTrials.cpp.tmpl +@@ -22,9 +22,9 @@ bool OriginTrials::{{feature.first_lowered_name}}Enabled(ExecutionContext* execu + {%- endfor %} + {% endif %} + +- OriginTrialContext* context =OriginTrialContext::from(executionContext, +- OriginTrialContext::DontCreateIfNotExists); +- return context && context->isTrialEnabled("{{feature.origin_trial_feature_name}}"); ++ OriginTrialContext* context =OriginTrialContext::From(executionContext, ++ OriginTrialContext::kDontCreateIfNotExists); ++ return context && context->IsTrialEnabled("{{feature.origin_trial_feature_name}}"); + {% if feature.origin_trial_os %} + #else + return false; +diff --git a/third_party/WebKit/Source/build/scripts/templates/SettingsMacros.h.tmpl b/third_party/WebKit/Source/build/scripts/templates/SettingsMacros.h.tmpl +index c21f1b65b446..18e5f9cca31a 100644 +--- a/third_party/WebKit/Source/build/scripts/templates/SettingsMacros.h.tmpl ++++ b/third_party/WebKit/Source/build/scripts/templates/SettingsMacros.h.tmpl +@@ -6,8 +6,8 @@ + + #define SETTINGS_GETTERS_AND_SETTERS \ + {% for setting in settings %} +- {{setting.type|to_passing_type}} get{{setting.name|upper_first}}() const { return m_{{setting.name}}; } \ +- void set{{setting.name|upper_first}}({{setting.type|to_passing_type}} {{setting.name}}); \ ++ {{setting.type|to_passing_type}} Get{{setting.name|upper_first}}() const { return m_{{setting.name}}; } \ ++ void Set{{setting.name|upper_first}}({{setting.type|to_passing_type}} {{setting.name}}); \ + {% endfor %} + void setFromStrings(const String& name, const String& value); + // End of SETTINGS_GETTERS_AND_SETTERS. +@@ -32,31 +32,31 @@ + + #define SETTINGS_SETTER_BODIES \ + {% for setting in settings %} +-void Settings::set{{setting.name|upper_first}}({{setting.type|to_passing_type}} {{setting.name}}) { \ ++void Settings::Set{{setting.name|upper_first}}({{setting.type|to_passing_type}} {{setting.name}}) { \ + if (m_{{setting.name}} == {{setting.name}}) \ + return; \ + m_{{setting.name}} = {{setting.name}}; \ + {% if setting.invalidate %} +- invalidate(SettingsDelegate::{{setting.invalidate}}Change); \ ++ Invalidate(SettingsDelegate::k{{setting.invalidate}}Change); \ + {% endif %} + } \ + {% endfor %} + void Settings::setFromStrings(const String& name, const String& value) { \ + {% for setting in settings %} + if (name == "{{setting.name}}") { \ +- set{{setting.name|upper_first}}( \ ++ Set{{setting.name|upper_first}}( \ + {% if setting.type == 'String' %} + value \ + {% elif setting.type == 'bool' %} +- value.isEmpty() || value == "true" \ ++ value.IsEmpty() || value == "true" \ + {% elif setting.type == 'int' %} +- value.toInt() \ ++ value.ToInt() \ + {% elif setting.type == 'float' %} +- value.toFloat() \ ++ value.ToFloat() \ + {% elif setting.type == 'double' %} +- value.toDouble() \ ++ value.ToDouble() \ + {% else %} +- static_cast<{{setting.type}}>(value.toInt()) \ ++ static_cast<{{setting.type}}>(value.ToInt()) \ + {% endif %} + ); \ + return; \ +diff --git a/third_party/WebKit/Source/build/scripts/templates/StyleBuilder.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/StyleBuilder.cpp.tmpl +index e439323a69db..f615e4d4e51c 100644 +--- a/third_party/WebKit/Source/build/scripts/templates/StyleBuilder.cpp.tmpl ++++ b/third_party/WebKit/Source/build/scripts/templates/StyleBuilder.cpp.tmpl +@@ -12,7 +12,7 @@ + + namespace blink { + +-void StyleBuilder::applyProperty(CSSPropertyID property, ++void StyleBuilder::ApplyProperty(CSSPropertyID property, + StyleResolverState& state, + const CSSValue& value, + bool isInitial, +@@ -40,9 +40,9 @@ void StyleBuilder::applyProperty(CSSPropertyID property, + case {{property_id}}: + {% endfor %} + { +- CSSPropertyID resolvedProperty = CSSProperty::resolveDirectionAwareProperty(property, state.style()->direction(), state.style()->getWritingMode()); ++ CSSPropertyID resolvedProperty = CSSProperty::ResolveDirectionAwareProperty(property, state.Style()->Direction(), state.Style()->GetWritingMode()); + ASSERT(resolvedProperty != property); +- applyProperty(resolvedProperty, state, value); ++ ApplyProperty(resolvedProperty, state, value); + return; + } + {% for property_id, property in properties.items() if property.builder_skip %} +diff --git a/third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl +index 1f7243f64ce0..4e81b0f414f9 100644 +--- a/third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl ++++ b/third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl +@@ -29,11 +29,11 @@ void StyleBuilderFunctions::applyValue{{property_id}}(StyleResolverState& state, + {%- endmacro %} + {% macro set_value(property) %} + {% if property.svg %} +-state.style()->accessSVGStyle().{{property.setter}} ++state.Style()->AccessSVGStyle().{{property.setter}} + {%- elif property.font %} +-state.fontBuilder().{{property.setter}} ++state.GetFontBuilder().{{property.setter}} + {%- else %} +-state.style()->{{property.setter}} ++state.Style()->{{property.setter}} + {%- endif %} + {% endmacro %} + {% macro convert_and_set_value(property) %} +@@ -41,13 +41,13 @@ state.style()->{{property.setter}} + {{set_value(property)}}(StyleBuilderConverter::{{property.converter}}(state, value)); + {# TODO(sashab): Remove this list from this file. #} + {% elif property.type_name in ['short', 'unsigned short', 'int', 'unsigned int', 'unsigned', 'float', 'LineClampValue'] %} +-{{set_value(property)}}(toCSSPrimitiveValue(value).convertTo<{{property.type_name}}>()); ++{{set_value(property)}}(ToCSSPrimitiveValue(value).ConvertTo<{{property.type_name}}>()); + {%- else %} +-{{set_value(property)}}(toCSSIdentifierValue(value).convertTo<{{property.type_name}}>()); ++{{set_value(property)}}(ToCSSIdentifierValue(value).ConvertTo<{{property.type_name}}>()); + {%- endif %} + {% endmacro %} + {% macro set_is_inherited(property) %} +-state.style()->{{property.is_inherited_setter}} ++state.Style()->{{property.is_inherited_setter}} + {% endmacro %} + + namespace blink { +@@ -72,11 +72,11 @@ namespace blink { + {% if not property.custom_inherit %} + {{declare_inherit_function(property_id)}} { + {% if property.svg %} +- {{set_value(property)}}(state.parentStyle()->svgStyle().{{property.getter}}()); ++ {{set_value(property)}}(state.ParentStyle()->SvgStyle().{{property.getter}}()); + {% elif property.font %} +- {{set_value(property)}}(state.parentFontDescription().{{property.getter}}()); ++ {{set_value(property)}}(state.ParentFontDescription().{{property.getter}}()); + {% else %} +- {{set_value(property)}}(state.parentStyle()->{{property.getter}}()); ++ {{set_value(property)}}(state.ParentStyle()->{{property.getter}}()); + {% endif %} + {% if property.independent %} + {{set_is_inherited(property)}}(true); +@@ -96,26 +96,26 @@ namespace blink { + {% endfor %} + + {% macro apply_animation(property_id, attribute, animation) %} +-{% set vector = attribute|lower_first + "List()" %} ++{% set vector = attribute + "List()" %} + {{declare_initial_function(property_id)}} { +- CSS{{animation}}Data& data = state.style()->access{{animation}}s(); +- data.{{vector}}.clear(); +- data.{{vector}}.push_back(CSS{{animation}}Data::initial{{attribute}}()); ++ CSS{{animation}}Data& data = state.Style()->Access{{animation}}s(); ++ data.{{vector}}.Clear(); ++ data.{{vector}}.push_back(CSS{{animation}}Data::Initial{{attribute}}()); + } + + {{declare_inherit_function(property_id)}} { +- const CSS{{animation}}Data* parentData = state.parentStyle()->{{animation|lower}}s(); ++ const CSS{{animation}}Data* parentData = state.ParentStyle()->{{animation}}s(); + if (!parentData) + applyInitial{{property_id}}(state); + else +- state.style()->access{{animation}}s().{{vector}} = parentData->{{vector}}; ++ state.Style()->Access{{animation}}s().{{vector}} = parentData->{{vector}}; + } + + {{declare_value_function(property_id)}} { +- CSS{{animation}}Data& data = state.style()->access{{animation}}s(); +- data.{{vector}}.clear(); +- for (auto& listValue : toCSSValueList(value)) +- data.{{vector}}.push_back(CSSToStyleMap::mapAnimation{{attribute}}(*listValue)); ++ CSS{{animation}}Data& data = state.Style()->Access{{animation}}s(); ++ data.{{vector}}.Clear(); ++ for (auto& listValue : ToCSSValueList(value)) ++ data.{{vector}}.push_back(CSSToStyleMap::MapAnimation{{attribute}}(*listValue)); + } + {% endmacro %} + {{apply_animation('CSSPropertyAnimationDelay', 'Delay', 'Animation')}} +@@ -133,130 +133,130 @@ namespace blink { + + {% macro apply_auto(property_id, auto_getter=none, auto_setter=none, auto_identity='CSSValueAuto') %} + {% set property = properties[property_id] %} +-{% set auto_getter = auto_getter or 'hasAuto' + property.name_for_methods %} +-{% set auto_setter = auto_setter or 'setHasAuto' + property.name_for_methods %} ++{% set auto_getter = auto_getter or 'HasAuto' + property.name_for_methods %} ++{% set auto_setter = auto_setter or 'SetHasAuto' + property.name_for_methods %} + {{declare_initial_function(property_id)}} { +- state.style()->{{auto_setter}}(); ++ state.Style()->{{auto_setter}}(); + } + + {{declare_inherit_function(property_id)}} { +- if (state.parentStyle()->{{auto_getter}}()) +- state.style()->{{auto_setter}}(); ++ if (state.ParentStyle()->{{auto_getter}}()) ++ state.Style()->{{auto_setter}}(); + else +- {{set_value(property)}}(state.parentStyle()->{{property.getter}}()); ++ {{set_value(property)}}(state.ParentStyle()->{{property.getter}}()); + } + + {{declare_value_function(property_id)}} { +- if (value.isIdentifierValue() && toCSSIdentifierValue(value).getValueID() == {{auto_identity}}) +- state.style()->{{auto_setter}}(); ++ if (value.IsIdentifierValue() && ToCSSIdentifierValue(value).GetValueID() == {{auto_identity}}) ++ state.Style()->{{auto_setter}}(); + else + {{convert_and_set_value(property)}} + } + {% endmacro %} + {{apply_auto('CSSPropertyClip')}} + {{apply_auto('CSSPropertyColumnCount')}} +-{{apply_auto('CSSPropertyColumnGap', auto_getter='hasNormalColumnGap', auto_setter='setHasNormalColumnGap', auto_identity='CSSValueNormal')}} ++{{apply_auto('CSSPropertyColumnGap', auto_getter='HasNormalColumnGap', auto_setter='SetHasNormalColumnGap', auto_identity='CSSValueNormal')}} + {{apply_auto('CSSPropertyColumnWidth')}} + {{apply_auto('CSSPropertyZIndex')}} + + static bool lengthMatchesAllSides(const LengthBox& lengthBox, + const Length& length) { +- return (lengthBox.left() == length && +- lengthBox.right() == length && +- lengthBox.top() == length && +- lengthBox.bottom() == length); ++ return (lengthBox.Left() == length && ++ lengthBox.Right() == length && ++ lengthBox.Top() == length && ++ lengthBox.Bottom() == length); + } + + static bool borderImageLengthMatchesAllSides( + const BorderImageLengthBox& borderImageLengthBox, + const BorderImageLength& borderImageLength) { +- return (borderImageLengthBox.left() == borderImageLength && +- borderImageLengthBox.right() == borderImageLength && +- borderImageLengthBox.top() == borderImageLength && +- borderImageLengthBox.bottom() == borderImageLength); ++ return (borderImageLengthBox.Left() == borderImageLength && ++ borderImageLengthBox.Right() == borderImageLength && ++ borderImageLengthBox.Top() == borderImageLength && ++ borderImageLengthBox.Bottom() == borderImageLength); + } + + {% macro apply_border_image_modifier(property_id, modifier_type) %} + {% set is_mask_box = 'MaskBox' in property_id %} +-{% set getter = 'maskBoxImage' if is_mask_box else 'borderImage' %} +-{% set setter = 'setMaskBoxImage' if is_mask_box else 'setBorderImage' %} ++{% set getter = 'MaskBoxImage' if is_mask_box else 'BorderImage' %} ++{% set setter = 'SetMaskBoxImage' if is_mask_box else 'SetBorderImage' %} + {{ declare_initial_function(property_id) }} { +- const NinePieceImage& currentImage = state.style()->{{getter}}(); ++ const NinePieceImage& currentImage = state.Style()->{{getter}}(); + {# Check for equality in case we can bail out before creating a new NinePieceImage. #} + {% if modifier_type == 'Outset' %} +- if (borderImageLengthMatchesAllSides(currentImage.outset(), +- BorderImageLength(Length(0, Fixed)))) ++ if (borderImageLengthMatchesAllSides(currentImage.Outset(), ++ BorderImageLength(Length(0, kFixed)))) + return; + {% elif modifier_type == 'Repeat' %} +- if (currentImage.horizontalRule() == StretchImageRule && +- currentImage.verticalRule() == StretchImageRule) ++ if (currentImage.HorizontalRule() == kStretchImageRule && ++ currentImage.VerticalRule() == kStretchImageRule) + return; + {% elif modifier_type == 'Slice' and is_mask_box %} + // Masks have a different initial value for slices. Preserve the value of 0 + // for backwards compatibility. +- if (currentImage.fill() == true && +- lengthMatchesAllSides(currentImage.imageSlices(), Length(0, Fixed))) ++ if (currentImage.Fill() == true && ++ lengthMatchesAllSides(currentImage.ImageSlices(), Length(0, kFixed))) + return; + {% elif modifier_type == 'Slice' and not is_mask_box %} +- if (currentImage.fill() == false && +- lengthMatchesAllSides(currentImage.imageSlices(), Length(100, Percent))) ++ if (currentImage.Fill() == false && ++ lengthMatchesAllSides(currentImage.ImageSlices(), Length(100, kPercent))) + return; + {% elif modifier_type == 'Width' and is_mask_box %} + // Masks have a different initial value for widths. Preserve the value of + // 'auto' for backwards compatibility. +- if (borderImageLengthMatchesAllSides(currentImage.borderSlices(), +- BorderImageLength(Length(Auto)))) ++ if (borderImageLengthMatchesAllSides(currentImage.BorderSlices(), ++ BorderImageLength(Length(kAuto)))) + return; + {% elif modifier_type == 'Width' and not is_mask_box %} +- if (borderImageLengthMatchesAllSides(currentImage.borderSlices(), ++ if (borderImageLengthMatchesAllSides(currentImage.BorderSlices(), + BorderImageLength(1.0))) + return; + {% endif %} + + NinePieceImage image(currentImage); + {% if modifier_type == 'Outset' %} +- image.setOutset(Length(0, Fixed)); ++ image.SetOutset(Length(0, kFixed)); + {% elif modifier_type == 'Repeat' %} +- image.setHorizontalRule(StretchImageRule); +- image.setVerticalRule(StretchImageRule); ++ image.SetHorizontalRule(kStretchImageRule); ++ image.SetVerticalRule(kStretchImageRule); + {% elif modifier_type == 'Slice' and is_mask_box %} +- image.setImageSlices(LengthBox({{ (['Length(0, Fixed)']*4) | join(', ') }})); +- image.setFill(true); ++ image.SetImageSlices(LengthBox({{ (['Length(0, kFixed)']*4) | join(', ') }})); ++ image.SetFill(true); + {% elif modifier_type == 'Slice' and not is_mask_box %} +- image.setImageSlices(LengthBox({{ (['Length(100, Percent)']*4) | join(', ') }})); +- image.setFill(false); ++ image.SetImageSlices(LengthBox({{ (['Length(100, kPercent)']*4) | join(', ') }})); ++ image.SetFill(false); + {% elif modifier_type == 'Width' %} +- image.setBorderSlices({{ 'Length(Auto)' if is_mask_box else '1.0' }}); ++ image.SetBorderSlices({{ 'Length(kAuto)' if is_mask_box else '1.0' }}); + {% endif %} +- state.style()->{{setter}}(image); ++ state.Style()->{{setter}}(image); + } + + {{declare_inherit_function(property_id)}} { +- NinePieceImage image(state.style()->{{getter}}()); ++ NinePieceImage image(state.Style()->{{getter}}()); + {% if modifier_type == 'Outset' %} +- image.copyOutsetFrom(state.parentStyle()->{{getter}}()); ++ image.CopyOutsetFrom(state.ParentStyle()->{{getter}}()); + {% elif modifier_type == 'Repeat' %} +- image.copyRepeatFrom(state.parentStyle()->{{getter}}()); ++ image.CopyRepeatFrom(state.ParentStyle()->{{getter}}()); + {% elif modifier_type == 'Slice' %} +- image.copyImageSlicesFrom(state.parentStyle()->{{getter}}()); ++ image.CopyImageSlicesFrom(state.ParentStyle()->{{getter}}()); + {% elif modifier_type == 'Width' %} +- image.copyBorderSlicesFrom(state.parentStyle()->{{getter}}()); ++ image.CopyBorderSlicesFrom(state.ParentStyle()->{{getter}}()); + {% endif %} +- state.style()->{{setter}}(image); ++ state.Style()->{{setter}}(image); + } + + {{declare_value_function(property_id)}} { +- NinePieceImage image(state.style()->{{getter}}()); ++ NinePieceImage image(state.Style()->{{getter}}()); + {% if modifier_type == 'Outset' %} +- image.setOutset(CSSToStyleMap::mapNinePieceImageQuad(state, value)); ++ image.SetOutset(CSSToStyleMap::MapNinePieceImageQuad(state, value)); + {% elif modifier_type == 'Repeat' %} +- CSSToStyleMap::mapNinePieceImageRepeat(state, value, image); ++ CSSToStyleMap::MapNinePieceImageRepeat(state, value, image); + {% elif modifier_type == 'Slice' %} +- CSSToStyleMap::mapNinePieceImageSlice(state, value, image); ++ CSSToStyleMap::MapNinePieceImageSlice(state, value, image); + {% elif modifier_type == 'Width' %} +- image.setBorderSlices(CSSToStyleMap::mapNinePieceImageQuad(state, value)); ++ image.SetBorderSlices(CSSToStyleMap::MapNinePieceImageQuad(state, value)); + {% endif %} +- state.style()->{{setter}}(image); ++ state.Style()->{{setter}}(image); + } + {% endmacro %} + {{apply_border_image_modifier('CSSPropertyBorderImageOutset', 'Outset')}} +@@ -271,44 +271,44 @@ static bool borderImageLengthMatchesAllSides( + {% macro apply_value_border_image_source(property_id) %} + {{declare_value_function(property_id)}} { + {% set property = properties[property_id] %} +- {{set_value(property)}}(state.styleImage({{property_id}}, value)); ++ {{set_value(property)}}(state.GetStyleImage({{property_id}}, value)); + } + {% endmacro %} + {{apply_value_border_image_source('CSSPropertyBorderImageSource')}} + {{apply_value_border_image_source('CSSPropertyWebkitMaskBoxImageSource')}} + +-{% macro apply_color(property_id, initial_color='StyleColor::currentColor') %} ++{% macro apply_color(property_id, initial_color='StyleColor::CurrentColor') %} + {% set property = properties[property_id] %} +-{% set visited_link_setter = 'setVisitedLink' + property.name_for_methods %} ++{% set visited_link_setter = 'SetVisitedLink' + property.name_for_methods %} + {{declare_initial_function(property_id)}} { + StyleColor color = {{initial_color}}(); +- if (state.applyPropertyToRegularStyle()) ++ if (state.ApplyPropertyToRegularStyle()) + {{set_value(property)}}(color); +- if (state.applyPropertyToVisitedLinkStyle()) +- state.style()->{{visited_link_setter}}(color); ++ if (state.ApplyPropertyToVisitedLinkStyle()) ++ state.Style()->{{visited_link_setter}}(color); + } + + {{declare_inherit_function(property_id)}} { + // Visited link style can never explicitly inherit from parent visited link + // style so no separate getters are needed. +- StyleColor color = state.parentStyle()->{{property.getter}}(); +- if (state.applyPropertyToRegularStyle()) ++ StyleColor color = state.ParentStyle()->{{property.getter}}(); ++ if (state.ApplyPropertyToRegularStyle()) + {{set_value(property)}}(color); +- if (state.applyPropertyToVisitedLinkStyle()) +- state.style()->{{visited_link_setter}}(color); ++ if (state.ApplyPropertyToVisitedLinkStyle()) ++ state.Style()->{{visited_link_setter}}(color); + } + + {{declare_value_function(property_id)}} + { +- if (state.applyPropertyToRegularStyle()) +- {{set_value(property)}}(StyleBuilderConverter::convertStyleColor(state, value)); +- if (state.applyPropertyToVisitedLinkStyle()) { +- state.style()->{{visited_link_setter}}( +- StyleBuilderConverter::convertStyleColor(state, value, true)); ++ if (state.ApplyPropertyToRegularStyle()) ++ {{set_value(property)}}(StyleBuilderConverter::ConvertStyleColor(state, value)); ++ if (state.ApplyPropertyToVisitedLinkStyle()) { ++ state.Style()->{{visited_link_setter}}( ++ StyleBuilderConverter::ConvertStyleColor(state, value, true)); + } + } + {% endmacro %} +-{{apply_color('CSSPropertyBackgroundColor', initial_color='ComputedStyle::initialBackgroundColor') }} ++{{apply_color('CSSPropertyBackgroundColor', initial_color='ComputedStyle::InitialBackgroundColor') }} + {{apply_color('CSSPropertyBorderBottomColor')}} + {{apply_color('CSSPropertyBorderLeftColor')}} + {{apply_color('CSSPropertyBorderRightColor')}} +@@ -323,144 +323,145 @@ static bool borderImageLengthMatchesAllSides( + {% macro apply_counter(property_id, action) %} + {% set property = properties[property_id] %} + {{declare_initial_function(property_id)}} { +- state.style()->clear{{action}}Directives(); ++ state.Style()->Clear{{action}}Directives(); + } + + {{declare_inherit_function(property_id)}} { +- const CounterDirectiveMap* parentMap = state.parentStyle()->counterDirectives(); ++ const CounterDirectiveMap* parentMap = state.ParentStyle()->GetCounterDirectives(); + if (!parentMap) + return; + +- CounterDirectiveMap& map = state.style()->accessCounterDirectives(); +- DCHECK(!parentMap->isEmpty()); ++ CounterDirectiveMap& map = state.Style()->AccessCounterDirectives(); ++ DCHECK(!parentMap->IsEmpty()); + + typedef CounterDirectiveMap::const_iterator Iterator; + Iterator end = parentMap->end(); + for (Iterator it = parentMap->begin(); it != end; ++it) { +- CounterDirectives& directives = map.insert(it->key, CounterDirectives()).storedValue->value; +- directives.inherit{{action}}(it->value); ++ CounterDirectives& directives = map.insert(it->key, CounterDirectives()).stored_value->value; ++ directives.Inherit{{action}}(it->value); + } + } + + {{declare_value_function(property_id)}} { +- state.style()->clear{{action}}Directives(); ++ state.Style()->Clear{{action}}Directives(); + +- if (!value.isValueList()) { +- DCHECK(value.isIdentifierValue()); +- DCHECK_EQ(toCSSIdentifierValue(value).getValueID(), CSSValueNone); ++ if (!value.IsValueList()) { ++ DCHECK(value.IsIdentifierValue()); ++ DCHECK_EQ(ToCSSIdentifierValue(value).GetValueID(), CSSValueNone); + return; + } + +- CounterDirectiveMap& map = state.style()->accessCounterDirectives(); ++ CounterDirectiveMap& map = state.Style()->AccessCounterDirectives(); + +- const CSSValueList& list = toCSSValueList(value); ++ const CSSValueList& list = ToCSSValueList(value); + + for (size_t i = 0; i < list.length(); ++i) { +- const CSSValuePair& pair = toCSSValuePair(list.item(i)); +- AtomicString identifier(toCSSCustomIdentValue(pair.first()).value()); +- int value = toCSSPrimitiveValue(pair.second()).getIntValue(); ++ const CSSValuePair& pair = ToCSSValuePair(list.Item(i)); ++ AtomicString identifier(ToCSSCustomIdentValue(pair.First()).Value()); ++ int value = ToCSSPrimitiveValue(pair.Second()).GetIntValue(); + CounterDirectives& directives = +- map.insert(identifier, CounterDirectives()).storedValue->value; ++ map.insert(identifier, CounterDirectives()).stored_value->value; + {% if action == 'Reset' %} +- directives.setResetValue(value); ++ directives.SetResetValue(value); + {% else %} +- directives.addIncrementValue(value); ++ directives.AddIncrementValue(value); + {% endif %} + } +- DCHECK(!map.isEmpty()); ++ DCHECK(!map.IsEmpty()); + } + {% endmacro %} + {{apply_counter('CSSPropertyCounterIncrement', 'Increment')}} + {{apply_counter('CSSPropertyCounterReset', 'Reset')}} + +-{% macro apply_fill_layer(property_id, fill_type) %} ++{% macro apply_fill_layer(property_id, fill_type, fill_type_getter = None) %} + {% set layer_type = 'Background' if 'Background' in property_id else 'Mask' %} +-{% set fill_layer_type = layer_type + 'FillLayer' %} +-{% set access_layers = 'access' + layer_type + 'Layers' %} +-{% set map_fill = 'mapFill' + fill_type %} ++{% set fill_layer_type = 'k' + layer_type + 'FillLayer' %} ++{% set access_layers = 'Access' + layer_type + 'Layers' %} ++{% set map_fill = 'MapFill' + fill_type %} ++{% set fill_type_getter = fill_type_getter or fill_type %} + {{declare_initial_function(property_id)}} { +- FillLayer* currChild = &state.style()->{{access_layers}}(); +- currChild->set{{fill_type}}(FillLayer::initialFill{{fill_type}}({{fill_layer_type}})); +- for (currChild = currChild->next(); currChild; currChild = currChild->next()) +- currChild->clear{{fill_type}}(); ++FillLayer* currChild = &state.Style()->{{access_layers}}(); ++currChild->Set{{fill_type}}(FillLayer::InitialFill{{fill_type}}({{fill_layer_type}})); ++for (currChild = currChild->Next(); currChild; currChild = currChild->Next()) ++ currChild->Clear{{fill_type}}(); + } + + {{declare_inherit_function(property_id)}} { +- FillLayer* currChild = &state.style()->{{access_layers}}(); +- FillLayer* prevChild = 0; +- const FillLayer* currParent = &state.parentStyle()->{{layer_type|lower}}Layers(); +- while (currParent && currParent->is{{fill_type}}Set()) { ++FillLayer* currChild = &state.Style()->{{access_layers}}(); ++FillLayer* prevChild = 0; ++const FillLayer* currParent = &state.ParentStyle()->{{layer_type}}Layers(); ++while (currParent && currParent->Is{{fill_type}}Set()) { + if (!currChild) +- currChild = prevChild->ensureNext(); +- currChild->set{{fill_type}}(currParent->{{fill_type|lower_first}}()); ++ currChild = prevChild->EnsureNext(); ++ currChild->Set{{fill_type}}(currParent->{{fill_type_getter}}()); + prevChild = currChild; +- currChild = prevChild->next(); +- currParent = currParent->next(); ++ currChild = prevChild->Next(); ++ currParent = currParent->Next(); + } + + while (currChild) { + // Reset any remaining layers to not have the property set. +- currChild->clear{{fill_type}}(); +- currChild = currChild->next(); ++ currChild->Clear{{fill_type}}(); ++ currChild = currChild->Next(); + } + } + + {{declare_value_function(property_id)}} { +- FillLayer* currChild = &state.style()->{{access_layers}}(); ++ FillLayer* currChild = &state.Style()->{{access_layers}}(); + FillLayer* prevChild = 0; +- if (value.isValueList() && !value.isImageSetValue()) { ++ if (value.IsValueList() && !value.IsImageSetValue()) { + // Walk each value and put it into a layer, creating new layers as needed. +- const CSSValueList& valueList = toCSSValueList(value); ++ const CSSValueList& valueList = ToCSSValueList(value); + for (unsigned int i = 0; i < valueList.length(); i++) { + if (!currChild) +- currChild = prevChild->ensureNext(); +- CSSToStyleMap::{{map_fill}}(state, currChild, valueList.item(i)); ++ currChild = prevChild->EnsureNext(); ++ CSSToStyleMap::{{map_fill}}(state, currChild, valueList.Item(i)); + prevChild = currChild; +- currChild = currChild->next(); ++ currChild = currChild->Next(); + } + } else { + CSSToStyleMap::{{map_fill}}(state, currChild, value); +- currChild = currChild->next(); ++ currChild = currChild->Next(); + } + while (currChild) { + // Reset all remaining layers to not have the property set. +- currChild->clear{{fill_type}}(); +- currChild = currChild->next(); ++ currChild->Clear{{fill_type}}(); ++ currChild = currChild->Next(); + } + } + {% endmacro %} + {{apply_fill_layer('CSSPropertyBackgroundAttachment', 'Attachment')}} + {{apply_fill_layer('CSSPropertyBackgroundBlendMode', 'BlendMode')}} + {{apply_fill_layer('CSSPropertyBackgroundClip', 'Clip')}} +-{{apply_fill_layer('CSSPropertyBackgroundImage', 'Image')}} ++{{apply_fill_layer('CSSPropertyBackgroundImage', 'Image', 'GetImage')}} + {{apply_fill_layer('CSSPropertyBackgroundOrigin', 'Origin')}} + {{apply_fill_layer('CSSPropertyBackgroundPositionX', 'XPosition')}} + {{apply_fill_layer('CSSPropertyBackgroundPositionY', 'YPosition')}} + {{apply_fill_layer('CSSPropertyBackgroundRepeatX', 'RepeatX')}} + {{apply_fill_layer('CSSPropertyBackgroundRepeatY', 'RepeatY')}} +-{{apply_fill_layer('CSSPropertyBackgroundSize', 'Size')}} ++{{apply_fill_layer('CSSPropertyBackgroundSize', 'Size', 'size')}} + {{apply_fill_layer('CSSPropertyMaskSourceType', 'MaskSourceType')}} + {{apply_fill_layer('CSSPropertyWebkitMaskClip', 'Clip')}} + {{apply_fill_layer('CSSPropertyWebkitMaskComposite', 'Composite')}} +-{{apply_fill_layer('CSSPropertyWebkitMaskImage', 'Image')}} ++{{apply_fill_layer('CSSPropertyWebkitMaskImage', 'Image', 'GetImage')}} + {{apply_fill_layer('CSSPropertyWebkitMaskOrigin', 'Origin')}} + {{apply_fill_layer('CSSPropertyWebkitMaskPositionX', 'XPosition')}} + {{apply_fill_layer('CSSPropertyWebkitMaskPositionY', 'YPosition')}} + {{apply_fill_layer('CSSPropertyWebkitMaskRepeatX', 'RepeatX')}} + {{apply_fill_layer('CSSPropertyWebkitMaskRepeatY', 'RepeatY')}} +-{{apply_fill_layer('CSSPropertyWebkitMaskSize', 'Size')}} ++{{apply_fill_layer('CSSPropertyWebkitMaskSize', 'Size', 'size')}} + + {% macro apply_grid_template(property_id, type) %} + {{declare_initial_function(property_id)}} { +- state.style()->setGridTemplate{{type}}s(ComputedStyle::initialGridTemplate{{type}}s()); +- state.style()->setNamedGrid{{type}}Lines(ComputedStyle::initialNamedGrid{{type}}Lines()); +- state.style()->setOrderedNamedGrid{{type}}Lines(ComputedStyle::initialOrderedNamedGrid{{type}}Lines()); ++ state.Style()->SetGridTemplate{{type}}s(ComputedStyle::InitialGridTemplate{{type}}s()); ++ state.Style()->SetNamedGrid{{type}}Lines(ComputedStyle::InitialNamedGrid{{type}}Lines()); ++ state.Style()->SetOrderedNamedGrid{{type}}Lines(ComputedStyle::InitialOrderedNamedGrid{{type}}Lines()); + } + + {{declare_inherit_function(property_id)}} { +- state.style()->setGridTemplate{{type}}s(state.parentStyle()->gridTemplate{{type}}s()); +- state.style()->setNamedGrid{{type}}Lines(state.parentStyle()->namedGrid{{type}}Lines()); +- state.style()->setOrderedNamedGrid{{type}}Lines(state.parentStyle()->orderedNamedGrid{{type}}Lines()); ++ state.Style()->SetGridTemplate{{type}}s(state.ParentStyle()->GridTemplate{{type}}s()); ++ state.Style()->SetNamedGrid{{type}}Lines(state.ParentStyle()->NamedGrid{{type}}Lines()); ++ state.Style()->SetOrderedNamedGrid{{type}}Lines(state.ParentStyle()->OrderedNamedGrid{{type}}Lines()); + } + + {{declare_value_function(property_id)}} { +@@ -470,29 +471,29 @@ static bool borderImageLengthMatchesAllSides( + OrderedNamedGridLines orderedNamedGridLines; + NamedGridLinesMap autoRepeatNamedGridLines; + OrderedNamedGridLines autoRepeatOrderedNamedGridLines; +- AutoRepeatType autoRepeatType = ComputedStyle::initialGridAutoRepeatType(); ++ AutoRepeatType autoRepeatType = ComputedStyle::InitialGridAutoRepeatType(); + size_t autoRepeatInsertionPoint = +- ComputedStyle::initialGridAutoRepeatInsertionPoint(); +- StyleBuilderConverter::convertGridTrackList( ++ ComputedStyle::InitialGridAutoRepeatInsertionPoint(); ++ StyleBuilderConverter::ConvertGridTrackList( + value, trackSizes, namedGridLines, orderedNamedGridLines, + autoRepeatTrackSizes, autoRepeatNamedGridLines, + autoRepeatOrderedNamedGridLines, autoRepeatInsertionPoint, + autoRepeatType, state); +- const NamedGridAreaMap& namedGridAreas = state.style()->namedGridArea(); +- if (!namedGridAreas.isEmpty()) { +- StyleBuilderConverter::createImplicitNamedGridLinesFromGridArea( +- namedGridAreas, namedGridLines, For{{type}}s); ++ const NamedGridAreaMap& namedGridAreas = state.Style()->NamedGridArea(); ++ if (!namedGridAreas.IsEmpty()) { ++ StyleBuilderConverter::CreateImplicitNamedGridLinesFromGridArea( ++ namedGridAreas, namedGridLines, kFor{{type}}s); + } +- state.style()->setGridTemplate{{type}}s(trackSizes); +- state.style()->setNamedGrid{{type}}Lines(namedGridLines); +- state.style()->setOrderedNamedGrid{{type}}Lines(orderedNamedGridLines); +- state.style()->setGridAutoRepeat{{type}}s(autoRepeatTrackSizes); +- state.style()->setGridAutoRepeat{{type}}sInsertionPoint( ++ state.Style()->SetGridTemplate{{type}}s(trackSizes); ++ state.Style()->SetNamedGrid{{type}}Lines(namedGridLines); ++ state.Style()->SetOrderedNamedGrid{{type}}Lines(orderedNamedGridLines); ++ state.Style()->SetGridAutoRepeat{{type}}s(autoRepeatTrackSizes); ++ state.Style()->SetGridAutoRepeat{{type}}sInsertionPoint( + autoRepeatInsertionPoint); +- state.style()->setAutoRepeatNamedGrid{{type}}Lines(autoRepeatNamedGridLines); +- state.style()->setAutoRepeatOrderedNamedGrid{{type}}Lines( ++ state.Style()->SetAutoRepeatNamedGrid{{type}}Lines(autoRepeatNamedGridLines); ++ state.Style()->SetAutoRepeatOrderedNamedGrid{{type}}Lines( + autoRepeatOrderedNamedGridLines); +- state.style()->setGridAutoRepeat{{type}}sType(autoRepeatType); ++ state.Style()->SetGridAutoRepeat{{type}}sType(autoRepeatType); + } + {% endmacro %} + {{apply_grid_template('CSSPropertyGridTemplateColumns', 'Column')}} +@@ -502,54 +503,54 @@ static bool borderImageLengthMatchesAllSides( + {% set property = properties[property_id] %} + {{declare_initial_function(property_id)}} { + {{set_value(property)}}( +- SVGComputedStyle::initial{{paint_type}}Type(), +- SVGComputedStyle::initial{{paint_type}}Color(), +- SVGComputedStyle::initial{{paint_type}}Uri(), +- state.applyPropertyToRegularStyle(), +- state.applyPropertyToVisitedLinkStyle()); ++ SVGComputedStyle::Initial{{paint_type}}Type(), ++ SVGComputedStyle::Initial{{paint_type}}Color(), ++ SVGComputedStyle::Initial{{paint_type}}Uri(), ++ state.ApplyPropertyToRegularStyle(), ++ state.ApplyPropertyToVisitedLinkStyle()); + } + + {{declare_inherit_function(property_id)}} { +- const SVGComputedStyle& svgParentStyle = state.parentStyle()->svgStyle(); ++ const SVGComputedStyle& svgParentStyle = state.ParentStyle()->SvgStyle(); + {{set_value(property)}}( +- svgParentStyle.{{paint_type|lower_first}}Type(), +- svgParentStyle.{{paint_type|lower_first}}Color(), +- svgParentStyle.{{paint_type|lower_first}}Uri(), +- state.applyPropertyToRegularStyle(), +- state.applyPropertyToVisitedLinkStyle()); ++ svgParentStyle.{{paint_type}}Type(), ++ svgParentStyle.{{paint_type}}Color(), ++ svgParentStyle.{{paint_type}}Uri(), ++ state.ApplyPropertyToRegularStyle(), ++ state.ApplyPropertyToVisitedLinkStyle()); + } + + {{declare_value_function(property_id)}} { + const CSSValue* localValue = &value; + String url; +- if (value.isValueList()) { +- const CSSValueList& list = toCSSValueList(value); ++ if (value.IsValueList()) { ++ const CSSValueList& list = ToCSSValueList(value); + DCHECK_EQ(list.length(), 2U); +- url = toCSSURIValue(list.item(0)).value(); +- localValue = &list.item(1); ++ url = ToCSSURIValue(list.Item(0)).Value(); ++ localValue = &list.Item(1); + } + + Color color; + SVGPaintType paintType = SVG_PAINTTYPE_RGBCOLOR; +- if (localValue->isURIValue()) { ++ if (localValue->IsURIValue()) { + paintType = SVG_PAINTTYPE_URI; +- url = toCSSURIValue(localValue)->value(); +- } else if (localValue->isIdentifierValue() && +- toCSSIdentifierValue(localValue)->getValueID() == CSSValueNone) { +- paintType = url.isEmpty() ? SVG_PAINTTYPE_NONE : SVG_PAINTTYPE_URI_NONE; +- } else if (localValue->isIdentifierValue() && +- toCSSIdentifierValue(localValue)->getValueID() == CSSValueCurrentcolor) { +- color = state.style()->color(); +- paintType = url.isEmpty() ? SVG_PAINTTYPE_CURRENTCOLOR ++ url = ToCSSURIValue(localValue)->Value(); ++ } else if (localValue->IsIdentifierValue() && ++ ToCSSIdentifierValue(localValue)->GetValueID() == CSSValueNone) { ++ paintType = url.IsEmpty() ? SVG_PAINTTYPE_NONE : SVG_PAINTTYPE_URI_NONE; ++ } else if (localValue->IsIdentifierValue() && ++ ToCSSIdentifierValue(localValue)->GetValueID() == CSSValueCurrentcolor) { ++ color = state.Style()->GetColor(); ++ paintType = url.IsEmpty() ? SVG_PAINTTYPE_CURRENTCOLOR + : SVG_PAINTTYPE_URI_CURRENTCOLOR; + } else { +- color = StyleBuilderConverter::convertColor(state, *localValue); +- paintType = url.isEmpty() ? SVG_PAINTTYPE_RGBCOLOR ++ color = StyleBuilderConverter::ConvertColor(state, *localValue); ++ paintType = url.IsEmpty() ? SVG_PAINTTYPE_RGBCOLOR + : SVG_PAINTTYPE_URI_RGBCOLOR; + } + {{set_value(property)}}(paintType, color, url, +- state.applyPropertyToRegularStyle(), +- state.applyPropertyToVisitedLinkStyle()); ++ state.ApplyPropertyToRegularStyle(), ++ state.ApplyPropertyToVisitedLinkStyle()); + } + {% endmacro %} + {{apply_svg_paint('CSSPropertyFill', 'FillPaint')}} +diff --git a/third_party/WebKit/Source/build/scripts/templates/StylePropertyShorthand.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/StylePropertyShorthand.cpp.tmpl +index effe6d2129ac..c470d935b256 100644 +--- a/third_party/WebKit/Source/build/scripts/templates/StylePropertyShorthand.cpp.tmpl ++++ b/third_party/WebKit/Source/build/scripts/templates/StylePropertyShorthand.cpp.tmpl +@@ -63,7 +63,7 @@ void getMatchingShorthandsForLonghand( + {% for longhand_id, shorthands in longhands_dictionary.items() %} + case {{longhand_id}}: { + {% for shorthand in shorthands %} +- result->uncheckedAppend({{shorthand.lower_camel_name}}Shorthand()); ++ result->UncheckedAppend({{shorthand.lower_camel_name}}Shorthand()); + {% endfor %} + break; + } +diff --git a/third_party/WebKit/Source/build/scripts/templates/macros.tmpl b/third_party/WebKit/Source/build/scripts/templates/macros.tmpl +index d8617410ef2a..0a0496d0efbe 100644 +--- a/third_party/WebKit/Source/build/scripts/templates/macros.tmpl ++++ b/third_party/WebKit/Source/build/scripts/templates/macros.tmpl +@@ -14,7 +14,7 @@ + if ( + {%- for c in name -%} + {%- if lowercase_data -%} +- {{ " && " if not loop.first }}toASCIILower(data[{{index + loop.index0}}]) == '{{c}}' ++ {{ " && " if not loop.first }}ToASCIILower(data[{{index + loop.index0}}]) == '{{c}}' + {%- else -%} + {{ " && " if not loop.first }}data[{{index + loop.index0}}] == '{{c}}' + {%- endif -%} +@@ -33,7 +33,7 @@ return {{ return_macro(value) }}; + {{ trie_leaf(index, trie, return_macro, lowercase_data) -}} + {% else %} + {% if lowercase_data %} +-switch (toASCIILower(data[{{index}}])) { ++switch (ToASCIILower(data[{{index}}])) { + {% else %} + switch (data[{{index}}]) { + {% endif %} +diff --git a/third_party/WebKit/Source/core/css/CSSGradientValue.cpp b/third_party/WebKit/Source/core/css/CSSGradientValue.cpp +index b0c102c45cc8..d0f55e844c09 100644 +--- a/third_party/WebKit/Source/core/css/CSSGradientValue.cpp ++++ b/third_party/WebKit/Source/core/css/CSSGradientValue.cpp +@@ -112,7 +112,7 @@ PassRefPtr<Image> CSSGradientValue::GetImage(const LayoutObject& layout_object, + + // Need to look up our size. Create a string of width*height to use as a + // hash key. +- Image* result = GetImage(&layout_object, size); ++ Image* result = this->CSSImageGeneratorValue::GetImage(&layout_object, size); + if (result) + return result; + } +diff --git a/third_party/WebKit/Source/core/css/CSSPrimitiveValueUnits.json5 b/third_party/WebKit/Source/core/css/CSSPrimitiveValueUnits.json5 +index a83d9399b3a2..63babdd2798d 100644 +--- a/third_party/WebKit/Source/core/css/CSSPrimitiveValueUnits.json5 ++++ b/third_party/WebKit/Source/core/css/CSSPrimitiveValueUnits.json5 +@@ -8,111 +8,111 @@ + data: [ + { + name: "em", +- unit_type: "Ems", ++ unit_type: "kEms", + }, + { + name: "ex", +- unit_type: "Exs", ++ unit_type: "kExs", + }, + { + name: "px", +- unit_type: "Pixels", ++ unit_type: "kPixels", + }, + { + name: "cm", +- unit_type: "Centimeters", ++ unit_type: "kCentimeters", + }, + { + name: "mm", +- unit_type: "Millimeters", ++ unit_type: "kMillimeters", + }, + { + name: "in", +- unit_type: "Inches", ++ unit_type: "kInches", + }, + { + name: "pt", +- unit_type: "Points", ++ unit_type: "kPoints", + }, + { + name: "pc", +- unit_type: "Picas", ++ unit_type: "kPicas", + }, + { + name: "deg", +- unit_type: "Degrees", ++ unit_type: "kDegrees", + }, + { + name: "rad", +- unit_type: "Radians", ++ unit_type: "kRadians", + }, + { + name: "grad", +- unit_type: "Gradians", ++ unit_type: "kGradians", + }, + { + name: "ms", +- unit_type: "Milliseconds", ++ unit_type: "kMilliseconds", + }, + { + name: "s", +- unit_type: "Seconds", ++ unit_type: "kSeconds", + }, + { + name: "hz", +- unit_type: "Hertz", ++ unit_type: "kHertz", + }, + { + name: "khz", +- unit_type: "Kilohertz", ++ unit_type: "kKilohertz", + }, + { + name: "dpi", +- unit_type: "DotsPerInch", ++ unit_type: "kDotsPerInch", + }, + { + name: "dpcm", +- unit_type: "DotsPerCentimeter", ++ unit_type: "kDotsPerCentimeter", + }, + { + name: "dppx", +- unit_type: "DotsPerPixel", ++ unit_type: "kDotsPerPixel", + }, + { + name: "vw", +- unit_type: "ViewportWidth", ++ unit_type: "kViewportWidth", + }, + { + name: "vh", +- unit_type: "ViewportHeight", ++ unit_type: "kViewportHeight", + }, + { + name: "vmin", +- unit_type: "ViewportMin", ++ unit_type: "kViewportMin", + }, + { + name: "vmax", +- unit_type: "ViewportMax", ++ unit_type: "kViewportMax", + }, + { + name: "rem", +- unit_type: "Rems", ++ unit_type: "kRems", + }, + { + name: "fr", +- unit_type: "Fraction", ++ unit_type: "kFraction", + }, + { + name: "turn", +- unit_type: "Turns", ++ unit_type: "kTurns", + }, + { + name: "ch", +- unit_type: "Chs", ++ unit_type: "kChs", + }, + { + name: "__qem", +- unit_type: "QuirkyEms", ++ unit_type: "kQuirkyEms", + }, + ], + } +diff --git a/third_party/WebKit/Source/core/css/CSSProperties.json5 b/third_party/WebKit/Source/core/css/CSSProperties.json5 +index 8f5725cdb950..77e1a944f3d6 100644 +--- a/third_party/WebKit/Source/core/css/CSSProperties.json5 ++++ b/third_party/WebKit/Source/core/css/CSSProperties.json5 +@@ -200,7 +200,7 @@ + type_name: { + }, + +- // - converter: "convertRadius" ++ // - converter: "ConvertRadius" + // The StyleBuilder will call the specified function on StyleBuilderConverter + // to convert a CSSValue to an appropriate platform value + converter: { +@@ -353,7 +353,7 @@ + name: "font-family", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertFontFamily", ++ converter: "ConvertFontFamily", + is_descriptor: true, + font: true, + inherited: true, +@@ -373,9 +373,9 @@ + name: "font-size", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertFontSize", ++ converter: "ConvertFontSize", + font: true, +- getter: "getSize", ++ getter: "GetSize", + inherited: true, + interpolable: true, + name_for_methods: "Size", +@@ -385,7 +385,7 @@ + name: "font-size-adjust", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertFontSizeAdjust", ++ converter: "ConvertFontSizeAdjust", + font: true, + inherited: true, + interpolable: true, +@@ -415,7 +415,7 @@ + name: "font-variant-ligatures", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertFontVariantLigatures", ++ converter: "ConvertFontVariantLigatures", + font: true, + inherited: true, + name_for_methods: "VariantLigatures", +@@ -426,7 +426,7 @@ + name: "font-variant-caps", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertFontVariantCaps", ++ converter: "ConvertFontVariantCaps", + font: true, + inherited: true, + name_for_methods: "VariantCaps", +@@ -436,7 +436,7 @@ + name: "font-variant-numeric", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertFontVariantNumeric", ++ converter: "ConvertFontVariantNumeric", + font: true, + inherited: true, + name_for_methods: "VariantNumeric", +@@ -444,7 +444,7 @@ + }, + { + name: "font-weight", +- converter: "convertFontWeight", ++ converter: "ConvertFontWeight", + is_descriptor: true, + font: true, + inherited: true, +@@ -455,7 +455,7 @@ + }, + { + name: "font-feature-settings", +- converter: "convertFontFeatureSettings", ++ converter: "ConvertFontFeatureSettings", + is_descriptor: true, + font: true, + inherited: true, +@@ -466,7 +466,7 @@ + name: "font-variation-settings", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertFontVariationSettings", ++ converter: "ConvertFontVariationSettings", + font: true, + inherited: true, + name_for_methods: "VariationSettings", +@@ -539,15 +539,15 @@ + name: "align-content", + api_methods: ["parseSingleValue"], + api_class: "CSSPropertyAPIAlignOrJustifyContent", +- converter: "convertContentAlignmentData", +- initial: "initialContentAlignment", ++ converter: "ConvertContentAlignmentData", ++ initial: "InitialContentAlignment", + }, + { + name: "align-items", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertSelfOrDefaultAlignmentData", +- initial: "initialDefaultAlignment", ++ converter: "ConvertSelfOrDefaultAlignmentData", ++ initial: "InitialDefaultAlignment", + }, + { + name: "alignment-baseline", +@@ -557,13 +557,13 @@ + api_class: "CSSPropertyAPIAlignOrJustifySelf", + api_methods: ["parseSingleValue"], + name: "align-self", +- converter: "convertSelfOrDefaultAlignmentData", +- initial: "initialSelfAlignment", ++ converter: "ConvertSelfOrDefaultAlignmentData", ++ initial: "InitialSelfAlignment", + }, + { + name: "backdrop-filter", + api_class: "CSSPropertyAPIFilter", +- converter: "convertFilterOperations", ++ converter: "ConvertFilterOperations", + interpolable: true, + runtime_flag: "CSSBackdropFilter", + }, +@@ -637,21 +637,21 @@ + name: "border-bottom-left-radius", + api_class: "CSSPropertyAPIBorderRadius", + api_methods: ["parseSingleValue"], +- converter: "convertRadius", +- initial: "initialBorderRadius", ++ converter: "ConvertRadius", ++ initial: "InitialBorderRadius", + interpolable: true, + }, + { + name: "border-bottom-right-radius", + api_class: "CSSPropertyAPIBorderRadius", + api_methods: ["parseSingleValue"], +- converter: "convertRadius", +- initial: "initialBorderRadius", ++ converter: "ConvertRadius", ++ initial: "InitialBorderRadius", + interpolable: true, + }, + { + name: "border-bottom-style", +- initial: "initialBorderStyle", ++ initial: "InitialBorderStyle", + type_name: "EBorderStyle", + keywords: ["none"], + typedom_types: ["Image"], +@@ -659,8 +659,8 @@ + { + name: "border-bottom-width", + api_class: "CSSPropertyAPIBorderWidth", +- converter: "convertLineWidth<float>", +- initial: "initialBorderWidth", ++ converter: "ConvertLineWidth<float>", ++ initial: "InitialBorderWidth", + interpolable: true, + keywords: ["thin", "medium", "thick"], + typedom_types: ["Length"], +@@ -712,7 +712,7 @@ + }, + { + name: "border-left-style", +- initial: "initialBorderStyle", ++ initial: "InitialBorderStyle", + type_name: "EBorderStyle", + keywords: ["none"], + typedom_types: ["Image"], +@@ -720,8 +720,8 @@ + { + name: "border-left-width", + api_class: "CSSPropertyAPIBorderWidth", +- converter: "convertLineWidth<float>", +- initial: "initialBorderWidth", ++ converter: "ConvertLineWidth<float>", ++ initial: "InitialBorderWidth", + interpolable: true, + keywords: ["thin", "medium", "thick"], + typedom_types: ["Length"], +@@ -733,7 +733,7 @@ + }, + { + name: "border-right-style", +- initial: "initialBorderStyle", ++ initial: "InitialBorderStyle", + type_name: "EBorderStyle", + keywords: ["none"], + typedom_types: ["Image"], +@@ -741,8 +741,8 @@ + { + name: "border-right-width", + api_class: "CSSPropertyAPIBorderWidth", +- converter: "convertLineWidth<float>", +- initial: "initialBorderWidth", ++ converter: "ConvertLineWidth<float>", ++ initial: "InitialBorderWidth", + interpolable: true, + keywords: ["thin", "medium", "thick"], + typedom_types: ["Length"], +@@ -756,21 +756,21 @@ + name: "border-top-left-radius", + api_class: "CSSPropertyAPIBorderRadius", + api_methods: ["parseSingleValue"], +- converter: "convertRadius", +- initial: "initialBorderRadius", ++ converter: "ConvertRadius", ++ initial: "InitialBorderRadius", + interpolable: true, + }, + { + name: "border-top-right-radius", + api_class: "CSSPropertyAPIBorderRadius", + api_methods: ["parseSingleValue"], +- converter: "convertRadius", +- initial: "initialBorderRadius", ++ converter: "ConvertRadius", ++ initial: "InitialBorderRadius", + interpolable: true, + }, + { + name: "border-top-style", +- initial: "initialBorderStyle", ++ initial: "InitialBorderStyle", + type_name: "EBorderStyle", + keywords: ["none"], + typedom_types: ["Image"], +@@ -778,8 +778,8 @@ + { + name: "border-top-width", + api_class: "CSSPropertyAPIBorderWidth", +- converter: "convertLineWidth<float>", +- initial: "initialBorderWidth", ++ converter: "ConvertLineWidth<float>", ++ initial: "InitialBorderWidth", + interpolable: true, + keywords: ["thin", "medium", "thick"], + supports_percentage: true, +@@ -789,8 +789,8 @@ + name: "bottom", + api_class: "CSSPropertyAPIMargin", + api_methods: ["parseSingleValue"], +- converter: "convertLengthOrAuto", +- initial: "initialOffset", ++ converter: "ConvertLengthOrAuto", ++ initial: "InitialOffset", + interpolable: true, + keywords: ["auto"], + supports_percentage: true, +@@ -798,7 +798,7 @@ + }, + { + name: "box-shadow", +- converter: "convertShadowList", ++ converter: "ConvertShadowList", + interpolable: true, + }, + "box-sizing", +@@ -862,7 +862,7 @@ + name: "clip", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertClip", ++ converter: "ConvertClip", + custom_all: true, + interpolable: true, + }, +@@ -870,7 +870,7 @@ + name: "clip-path", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertClipPath", ++ converter: "ConvertClipPath", + interpolable: true, + }, + { +@@ -903,7 +903,7 @@ + name: "contain", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertFlags<Containment>", ++ converter: "ConvertFlags<Containment>", + runtime_flag: "CSSContainment", + }, + { +@@ -945,20 +945,20 @@ + { + name: "cx", + api_class: "CSSPropertyAPIStrokeOrLength", +- converter: "convertLength", ++ converter: "ConvertLength", + interpolable: true, + svg: true, + }, + { + name: "cy", + api_class: "CSSPropertyAPIStrokeOrLength", +- converter: "convertLength", ++ converter: "ConvertLength", + interpolable: true, + svg: true, + }, + { + name: "d", +- converter: "convertPathOrNone", ++ converter: "ConvertPathOrNone", + interpolable: true, + svg: true, + }, +@@ -993,14 +993,14 @@ + custom_all: true, + inherited: true, + interpolable: true, +- setter: "setFillPaint", ++ setter: "SetFillPaint", + svg: true, + }, + { + name: "fill-opacity", + api_class: "CSSPropertyAPIOpacity", + api_methods: ["parseSingleValue"], +- converter: "convertNumberOrPercentage", ++ converter: "ConvertNumberOrPercentage", + inherited: true, + interpolable: true, + svg: true, +@@ -1014,14 +1014,14 @@ + { + name: "filter", + api_class: "CSSPropertyAPIFilter", +- converter: "convertFilterOperations", ++ converter: "ConvertFilterOperations", + interpolable: true, + }, + { + name: "flex-basis", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertLengthOrAuto", ++ converter: "ConvertLengthOrAuto", + interpolable: true, + }, + "flex-direction", +@@ -1050,7 +1050,7 @@ + name: "flood-color", + api_class: "CSSPropertyAPIColor", + api_methods: ["parseSingleValue"], +- converter: "convertColor", ++ converter: "ConvertColor", + interpolable: true, + svg: true, + }, +@@ -1058,62 +1058,62 @@ + name: "flood-opacity", + api_class: "CSSPropertyAPIOpacity", + api_methods: ["parseSingleValue"], +- converter: "convertNumberOrPercentage", ++ converter: "ConvertNumberOrPercentage", + interpolable: true, + svg: true, + }, + { + name: "grid-auto-columns", + api_class: "CSSPropertyAPIGridAutoLine", +- converter: "convertGridTrackSizeList", ++ converter: "ConvertGridTrackSizeList", + runtime_flag: "CSSGridLayout", + }, + { + name: "grid-auto-flow", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertGridAutoFlow", ++ converter: "ConvertGridAutoFlow", + runtime_flag: "CSSGridLayout", + type_name: "GridAutoFlow", + }, + { + name: "grid-auto-rows", + api_class: "CSSPropertyAPIGridAutoLine", +- converter: "convertGridTrackSizeList", ++ converter: "ConvertGridTrackSizeList", + runtime_flag: "CSSGridLayout", + }, + { + name: "grid-column-end", +- converter: "convertGridPosition", ++ converter: "ConvertGridPosition", + runtime_flag: "CSSGridLayout", + api_class: "CSSPropertyAPIGridLine", + }, + { + name: "grid-column-gap", +- converter: "convertLength", ++ converter: "ConvertLength", + runtime_flag: "CSSGridLayout", + }, + { + name: "grid-column-start", + api_class: "CSSPropertyAPIGridLine", +- converter: "convertGridPosition", ++ converter: "ConvertGridPosition", + runtime_flag: "CSSGridLayout", + }, + { + name: "grid-row-end", + api_class: "CSSPropertyAPIGridLine", +- converter: "convertGridPosition", ++ converter: "ConvertGridPosition", + runtime_flag: "CSSGridLayout", + }, + { + name: "grid-row-gap", +- converter: "convertLength", ++ converter: "ConvertLength", + runtime_flag: "CSSGridLayout", + }, + { + name: "grid-row-start", + api_class: "CSSPropertyAPIGridLine", +- converter: "convertGridPosition", ++ converter: "ConvertGridPosition", + runtime_flag: "CSSGridLayout", + }, + { +@@ -1137,9 +1137,9 @@ + { + name: "height", + api_class: "CSSPropertyAPIWidthOrHeight", +- converter: "convertLengthSizing", ++ converter: "ConvertLengthSizing", + is_descriptor: true, +- initial: "initialSize", ++ initial: "InitialSize", + interpolable: true, + keywords: ["auto", "fit-content", "min-content", "max-content"], + supports_percentage: true, +@@ -1159,7 +1159,7 @@ + name: "image-orientation", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertImageOrientation", ++ converter: "ConvertImageOrientation", + inherited: true, + name_for_methods: "RespectImageOrientation", + runtime_flag: "ImageOrientation", +@@ -1169,31 +1169,31 @@ + name: "justify-content", + api_class: "CSSPropertyAPIAlignOrJustifyContent", + api_methods: ["parseSingleValue"], +- converter: "convertContentAlignmentData", +- initial: "initialContentAlignment", ++ converter: "ConvertContentAlignmentData", ++ initial: "InitialContentAlignment", + }, + { + name: "justify-items", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertSelfOrDefaultAlignmentData", +- initial: "initialSelfAlignment", ++ converter: "ConvertSelfOrDefaultAlignmentData", ++ initial: "InitialSelfAlignment", + runtime_flag: "CSSGridLayout", + }, + { + name: "justify-self", + api_class: "CSSPropertyAPIAlignOrJustifySelf", + api_methods: ["parseSingleValue"], +- converter: "convertSelfOrDefaultAlignmentData", +- initial: "initialSelfAlignment", ++ converter: "ConvertSelfOrDefaultAlignmentData", ++ initial: "InitialSelfAlignment", + runtime_flag: "CSSGridLayout", + }, + { + name: "left", + api_class: "CSSPropertyAPIMargin", + api_methods: ["parseSingleValue"], +- converter: "convertLengthOrAuto", +- initial: "initialOffset", ++ converter: "ConvertLengthOrAuto", ++ initial: "InitialOffset", + interpolable: true, + keywords: ["auto"], + supports_percentage: true, +@@ -1203,16 +1203,16 @@ + name: "letter-spacing", + api_class: "CSSPropertyAPILetterAndWordSpacing", + api_methods: ["parseSingleValue"], +- converter: "convertSpacing", ++ converter: "ConvertSpacing", + inherited: true, +- initial: "initialLetterWordSpacing", ++ initial: "InitialLetterWordSpacing", + interpolable: true, + }, + { + name: "lighting-color", + api_class: "CSSPropertyAPIColor", + api_methods: ["parseSingleValue"], +- converter: "convertColor", ++ converter: "ConvertColor", + interpolable: true, + svg: true, + }, +@@ -1220,8 +1220,8 @@ + name: "line-height", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertLineHeight", +- getter: "specifiedLineHeight", ++ converter: "ConvertLineHeight", ++ getter: "SpecifiedLineHeight", + inherited: true, + interpolable: true, + }, +@@ -1229,7 +1229,7 @@ + name: "line-height-step", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertComputedLength<uint8_t>", ++ converter: "ConvertComputedLength<uint8_t>", + inherited: true, + runtime_flag: "CSSSnapSize", + }, +@@ -1263,38 +1263,38 @@ + name: "margin-bottom", + api_class: "CSSPropertyAPIMargin", + api_methods: ["parseSingleValue"], +- converter: "convertQuirkyLength", +- initial: "initialMargin", ++ converter: "ConvertQuirkyLength", ++ initial: "InitialMargin", + interpolable: true, + }, + { + name: "margin-left", + api_class: "CSSPropertyAPIMargin", + api_methods: ["parseSingleValue"], +- converter: "convertQuirkyLength", +- initial: "initialMargin", ++ converter: "ConvertQuirkyLength", ++ initial: "InitialMargin", + interpolable: true, + }, + { + name: "margin-right", + api_class: "CSSPropertyAPIMargin", + api_methods: ["parseSingleValue"], +- converter: "convertQuirkyLength", +- initial: "initialMargin", ++ converter: "ConvertQuirkyLength", ++ initial: "InitialMargin", + interpolable: true, + }, + { + name: "margin-top", + api_class: "CSSPropertyAPIMargin", + api_methods: ["parseSingleValue"], +- converter: "convertQuirkyLength", +- initial: "initialMargin", ++ converter: "ConvertQuirkyLength", ++ initial: "InitialMargin", + interpolable: true, + }, + { + name: "marker-end", + api_class: "CSSPropertyAPIMarker", +- converter: "convertFragmentIdentifier", ++ converter: "ConvertFragmentIdentifier", + inherited: true, + name_for_methods: "MarkerEndResource", + svg: true, +@@ -1302,7 +1302,7 @@ + { + name: "marker-mid", + api_class: "CSSPropertyAPIMarker", +- converter: "convertFragmentIdentifier", ++ converter: "ConvertFragmentIdentifier", + inherited: true, + name_for_methods: "MarkerMidResource", + svg: true, +@@ -1310,7 +1310,7 @@ + { + name: "marker-start", + api_class: "CSSPropertyAPIMarker", +- converter: "convertFragmentIdentifier", ++ converter: "ConvertFragmentIdentifier", + inherited: true, + name_for_methods: "MarkerStartResource", + svg: true, +@@ -1318,7 +1318,7 @@ + { + name: "mask", + api_class: "CSSPropertyAPIMarker", +- converter: "convertFragmentIdentifier", ++ converter: "ConvertFragmentIdentifier", + name_for_methods: "MaskerResource", + svg: true, + }, +@@ -1333,32 +1333,32 @@ + }, + { + name: "max-height", +- converter: "convertLengthMaxSizing", ++ converter: "ConvertLengthMaxSizing", + is_descriptor: true, +- initial: "initialMaxSize", ++ initial: "InitialMaxSize", + interpolable: true, + }, + { + name: "max-width", +- converter: "convertLengthMaxSizing", ++ converter: "ConvertLengthMaxSizing", + is_descriptor: true, +- initial: "initialMaxSize", ++ initial: "InitialMaxSize", + interpolable: true, + }, + { + name: "min-height", + api_class: "CSSPropertyAPIWidthOrHeight", +- converter: "convertLengthSizing", ++ converter: "ConvertLengthSizing", + is_descriptor: true, +- initial: "initialMinSize", ++ initial: "InitialMinSize", + interpolable: true, + }, + { + name: "min-width", + api_class: "CSSPropertyAPIWidthOrHeight", +- converter: "convertLengthSizing", ++ converter: "ConvertLengthSizing", + is_descriptor: true, +- initial: "initialMinSize", ++ initial: "InitialMinSize", + interpolable: true, + }, + { +@@ -1384,46 +1384,46 @@ + }, + { + name: "object-position", +- converter: "convertPosition", ++ converter: "ConvertPosition", + interpolable: true, + }, + { + name: "offset-anchor", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertPositionOrAuto", ++ converter: "ConvertPositionOrAuto", + interpolable: true, + runtime_flag: "CSSOffsetPositionAnchor", + }, + { + name: "offset-distance", + api_class: true, +- converter: "convertLength", ++ converter: "ConvertLength", + interpolable: true, + }, + { + name: "offset-path", +- converter: "convertPathOrNone", ++ converter: "ConvertPathOrNone", + }, + { + name: "offset-position", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertPositionOrAuto", ++ converter: "ConvertPositionOrAuto", + interpolable: true, + runtime_flag: "CSSOffsetPositionAnchor", + }, + { + name: "offset-rotate", + api_class: "CSSPropertyAPIOffsetRotate", +- converter: "convertOffsetRotate", ++ converter: "ConvertOffsetRotate", + interpolable: true, + runtime_flag: "CSSOffsetRotate", + }, + { + name: "offset-rotation", + api_class: "CSSPropertyAPIOffsetRotate", +- converter: "convertOffsetRotate", ++ converter: "ConvertOffsetRotate", + interpolable: true, + runtime_flag: "CSSOffsetRotation", + }, +@@ -1460,7 +1460,7 @@ + name: "outline-offset", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertComputedLength<int>", ++ converter: "ConvertComputedLength<int>", + interpolable: true, + }, + { +@@ -1471,7 +1471,7 @@ + name: "outline-width", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertLineWidth<unsigned short>", ++ converter: "ConvertLineWidth<unsigned short>", + interpolable: true, + }, + { +@@ -1510,51 +1510,51 @@ + name: "padding-bottom", + api_class: "CSSPropertyAPIPadding", + api_methods: ["parseSingleValue"], +- converter: "convertLength", +- initial: "initialPadding", ++ converter: "ConvertLength", ++ initial: "InitialPadding", + interpolable: true, + }, + { + name: "padding-left", + api_class: "CSSPropertyAPIPadding", + api_methods: ["parseSingleValue"], +- converter: "convertLength", +- initial: "initialPadding", ++ converter: "ConvertLength", ++ initial: "InitialPadding", + interpolable: true, + }, + { + name: "padding-right", + api_class: "CSSPropertyAPIPadding", + api_methods: ["parseSingleValue"], +- converter: "convertLength", +- initial: "initialPadding", ++ converter: "ConvertLength", ++ initial: "InitialPadding", + interpolable: true, + }, + { + name: "padding-top", + api_class: "CSSPropertyAPIPadding", + api_methods: ["parseSingleValue"], +- converter: "convertLength", +- initial: "initialPadding", ++ converter: "ConvertLength", ++ initial: "InitialPadding", + interpolable: true, + }, + { + name: "paint-order", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertPaintOrder", ++ converter: "ConvertPaintOrder", + inherited: true, + svg: true, + }, + { + name: "perspective", + api_class: "CSSPropertyAPIPerspective", +- converter: "convertPerspective", ++ converter: "ConvertPerspective", + interpolable: true, + }, + { + name: "perspective-origin", +- converter: "convertPosition", ++ converter: "ConvertPosition", + interpolable: true, + }, + { +@@ -1572,6 +1572,7 @@ + custom_inherit: true, + default_value: "static", + field_template: "keyword", ++ getter: "GetPosition", + keywords: [ + "static", "relative", "absolute", "fixed", "sticky", + ], +@@ -1580,7 +1581,7 @@ + name: "quotes", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertQuotes", ++ converter: "ConvertQuotes", + inherited: true, + }, + { +@@ -1591,8 +1592,8 @@ + name: "right", + api_class: "CSSPropertyAPIMargin", + api_methods: ["parseSingleValue"], +- converter: "convertLengthOrAuto", +- initial: "initialOffset", ++ converter: "ConvertLengthOrAuto", ++ initial: "InitialOffset", + interpolable: true, + keywords: ["auto"], + supports_percentage: true, +@@ -1601,7 +1602,7 @@ + { + name: "r", + api_class: "CSSPropertyAPIStrokeOrLength", +- converter: "convertLength", ++ converter: "ConvertLength", + interpolable: true, + svg: true, + }, +@@ -1609,7 +1610,7 @@ + name: "rx", + api_class: "CSSPropertyAPIRadius", + api_methods: ["parseSingleValue"], +- converter: "convertLengthOrAuto", ++ converter: "ConvertLengthOrAuto", + interpolable: true, + svg: true, + }, +@@ -1617,7 +1618,7 @@ + name: "ry", + api_class: "CSSPropertyAPIRadius", + api_methods: ["parseSingleValue"], +- converter: "convertLengthOrAuto", ++ converter: "ConvertLengthOrAuto", + interpolable: true, + svg: true, + }, +@@ -1633,24 +1634,24 @@ + }, + { + name: "scroll-snap-points-x", +- converter: "convertSnapPoints", ++ converter: "ConvertSnapPoints", + runtime_flag: "CSSScrollSnapPoints", + }, + { + name: "scroll-snap-points-y", +- converter: "convertSnapPoints", ++ converter: "ConvertSnapPoints", + runtime_flag: "CSSScrollSnapPoints", + }, + { + name: "scroll-snap-destination", +- converter: "convertPosition", ++ converter: "ConvertPosition", + runtime_flag: "CSSScrollSnapPoints", + }, + { + name: "scroll-snap-coordinate", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertSnapCoordinates", ++ converter: "ConvertSnapCoordinates", + runtime_flag: "CSSScrollSnapPoints", + }, + { +@@ -1664,14 +1665,14 @@ + name: "shape-margin", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertLength", ++ converter: "ConvertLength", + interpolable: true, + }, + { + name: "shape-outside", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertShapeValue", ++ converter: "ConvertShapeValue", + interpolable: true, + typedom_types: ["Image"], + }, +@@ -1694,7 +1695,7 @@ + name: "stop-color", + api_class: "CSSPropertyAPIColor", + api_methods: ["parseSingleValue"], +- converter: "convertColor", ++ converter: "ConvertColor", + interpolable: true, + svg: true, + }, +@@ -1702,7 +1703,7 @@ + name: "stop-opacity", + api_class: "CSSPropertyAPIOpacity", + api_methods: ["parseSingleValue"], +- converter: "convertNumberOrPercentage", ++ converter: "ConvertNumberOrPercentage", + interpolable: true, + svg: true, + }, +@@ -1713,14 +1714,14 @@ + custom_all: true, + inherited: true, + interpolable: true, +- setter: "setStrokePaint", ++ setter: "SetStrokePaint", + svg: true, + }, + { + name: "stroke-dasharray", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertStrokeDasharray", ++ converter: "ConvertStrokeDasharray", + inherited: true, + interpolable: true, + name_for_methods: "StrokeDashArray", +@@ -1729,7 +1730,7 @@ + { + name: "stroke-dashoffset", + api_class: "CSSPropertyAPIStrokeOrLength", +- converter: "convertLength", ++ converter: "ConvertLength", + inherited: true, + interpolable: true, + name_for_methods: "StrokeDashOffset", +@@ -1763,7 +1764,7 @@ + name: "stroke-opacity", + api_class: "CSSPropertyAPIOpacity", + api_methods: ["parseSingleValue"], +- converter: "convertNumberOrPercentage", ++ converter: "ConvertNumberOrPercentage", + inherited: true, + interpolable: true, + svg: true, +@@ -1771,7 +1772,7 @@ + { + name: "stroke-width", + api_class: "CSSPropertyAPIStrokeOrLength", +- converter: "convertUnzoomedLength", ++ converter: "ConvertUnzoomedLength", + inherited: true, + interpolable: true, + svg: true, +@@ -1788,7 +1789,7 @@ + name: "tab-size", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertLengthOrTabSpaces", ++ converter: "ConvertLengthOrTabSpaces", + inherited: true, + type_name: "TabSize", + }, +@@ -1799,6 +1800,7 @@ + inherited: true, + default_value: "start", + field_template: "keyword", ++ getter: "GetTextAlign", + keywords: [ + "left", "right", "center", "justify", "webkitLeft", "webkitRight", "webkitCenter", "start", "end", + ], +@@ -1837,7 +1839,7 @@ + { + name: "text-decoration-line", + api_class: "CSSPropertyAPITextDecorationLine", +- converter: "convertFlags<TextDecoration>", ++ converter: "ConvertFlags<TextDecoration>", + name_for_methods: "TextDecoration", + runtime_flag: "CSS3TextDecorations", + type_name: "TextDecoration", +@@ -1846,7 +1848,7 @@ + name: "text-decoration-skip", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertFlags<TextDecorationSkip>", ++ converter: "ConvertFlags<TextDecorationSkip>", + inherited: true, + runtime_flag: "CSS3TextDecorations", + type_name: "TextDecorationSkip", +@@ -1877,7 +1879,7 @@ + { + name: "text-shadow", + api_class: "CSSPropertyAPIShadow", +- converter: "convertShadowList", ++ converter: "ConvertShadowList", + inherited: true, + interpolable: true, + }, +@@ -1885,7 +1887,7 @@ + name: "text-size-adjust", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertTextSizeAdjust", ++ converter: "ConvertTextSizeAdjust", + inherited: true, + type_name: "TextSizeAdjust", + }, +@@ -1909,8 +1911,8 @@ + name: "top", + api_class: "CSSPropertyAPIMargin", + api_methods: ["parseSingleValue"], +- converter: "convertLengthOrAuto", +- initial: "initialOffset", ++ converter: "ConvertLengthOrAuto", ++ initial: "InitialOffset", + interpolable: true, + keywords: ["auto"], + supports_percentage: true, +@@ -1920,12 +1922,12 @@ + name: "touch-action", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertFlags<TouchAction>", ++ converter: "ConvertFlags<TouchAction>", + type_name: "TouchAction", + }, + { + name: "transform", +- converter: "convertTransformOperations", ++ converter: "ConvertTransformOperations", + interpolable: true, + keywords: ["none"], + typedom_types: ["Transform"], +@@ -1941,7 +1943,8 @@ + name: "transform-origin", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertTransformOrigin", ++ converter: "ConvertTransformOrigin", ++ getter: "GetTransformOrigin", + interpolable: true, + }, + { +@@ -1952,7 +1955,7 @@ + name: "translate", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertTranslate", ++ converter: "ConvertTranslate", + interpolable: true, + runtime_flag: "CSSIndependentTransformProperties", + }, +@@ -1960,7 +1963,7 @@ + name: "rotate", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertRotate", ++ converter: "ConvertRotate", + interpolable: true, + runtime_flag: "CSSIndependentTransformProperties", + }, +@@ -1968,7 +1971,7 @@ + name: "scale", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertScale", ++ converter: "ConvertScale", + interpolable: true, + runtime_flag: "CSSIndependentTransformProperties", + }, +@@ -2006,14 +2009,14 @@ + { + name: "x", + api_class: "CSSPropertyAPIStrokeOrLength", +- converter: "convertLength", ++ converter: "ConvertLength", + interpolable: true, + svg: true, + }, + { + name: "y", + api_class: "CSSPropertyAPIStrokeOrLength", +- converter: "convertLength", ++ converter: "ConvertLength", + interpolable: true, + svg: true, + }, +@@ -2037,7 +2040,7 @@ + name: "-webkit-border-horizontal-spacing", + api_class: "CSSPropertyAPIWebkitBorderSpacing", + api_methods: ["parseSingleValue"], +- converter: "convertComputedLength<short>", ++ converter: "ConvertComputedLength<short>", + inherited: true, + interpolable: true, + name_for_methods: "HorizontalBorderSpacing", +@@ -2046,13 +2049,13 @@ + name: "-webkit-border-image", + api_class: true, + custom_value: true, +- initial: "initialNinePieceImage", ++ initial: "InitialNinePieceImage", + }, + { + name: "-webkit-border-vertical-spacing", + api_class: "CSSPropertyAPIWebkitBorderSpacing", + api_methods: ["parseSingleValue"], +- converter: "convertComputedLength<short>", ++ converter: "ConvertComputedLength<short>", + inherited: true, + interpolable: true, + name_for_methods: "VerticalBorderSpacing", +@@ -2092,7 +2095,7 @@ + "-webkit-box-pack", + { + name: "-webkit-box-reflect", +- converter: "convertBoxReflect", ++ converter: "ConvertBoxReflect", + }, + { + name: "column-count", +@@ -2106,7 +2109,7 @@ + name: "column-gap", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertComputedLength<float>", ++ converter: "ConvertComputedLength<float>", + custom_all: true, + interpolable: true, + }, +@@ -2119,14 +2122,14 @@ + }, + { + name: "column-rule-style", +- initial: "initialBorderStyle", ++ initial: "InitialBorderStyle", + type_name: "EBorderStyle", + }, + { + name: "column-rule-width", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertLineWidth<unsigned short>", ++ converter: "ConvertLineWidth<unsigned short>", + interpolable: true, + }, + { +@@ -2139,7 +2142,7 @@ + name: "column-width", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertComputedLength<float>", ++ converter: "ConvertComputedLength<float>", + custom_all: true, + interpolable: true, + }, +@@ -2147,12 +2150,12 @@ + name: "-webkit-highlight", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertString<CSSValueNone>", ++ converter: "ConvertString<CSSValueNone>", + inherited: true, + }, + { + name: "-webkit-hyphenate-character", +- converter: "convertString<CSSValueAuto>", ++ converter: "ConvertString<CSSValueAuto>", + inherited: true, + name_for_methods: "HyphenationString", + }, +@@ -2260,13 +2263,13 @@ + { + name: "-webkit-perspective-origin-x", + api_class: "CSSPropertyAPIWebkitOriginX", +- converter: "convertLength", ++ converter: "ConvertLength", + interpolable: true, + }, + { + name: "-webkit-perspective-origin-y", + api_class: "CSSPropertyAPIWebkitOriginY", +- converter: "convertLength", ++ converter: "ConvertLength", + interpolable: true, + }, + { +@@ -2281,11 +2284,11 @@ + name: "-webkit-rtl-ordering", + independent: true, + inherited: true, +- initial: "initialRtlOrdering", ++ initial: "InitialRtlOrdering", + default_value: "logical", + field_template: "keyword", + keywords: ["logical", "visual"], +- setter: "setRtlOrdering", ++ setter: "SetRtlOrdering", + type_name: "EOrder", + }, + { +@@ -2297,7 +2300,7 @@ + name: "-webkit-tap-highlight-color", + api_class: "CSSPropertyAPIColor", + api_methods: ["parseSingleValue"], +- converter: "convertColor", ++ converter: "ConvertColor", + inherited: true, + }, + { +@@ -2348,26 +2351,26 @@ + name: "-webkit-text-stroke-width", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertTextStrokeWidth", ++ converter: "ConvertTextStrokeWidth", + inherited: true, + }, + { + name: "-webkit-transform-origin-x", + api_class: "CSSPropertyAPIWebkitOriginX", +- converter: "convertLength", ++ converter: "ConvertLength", + interpolable: true, + }, + { + name: "-webkit-transform-origin-y", + api_class: "CSSPropertyAPIWebkitOriginY", +- converter: "convertLength", ++ converter: "ConvertLength", + interpolable: true, + }, + { + name: "-webkit-transform-origin-z", + api_class: true, + api_methods: ["parseSingleValue"], +- converter: "convertComputedLength<float>", ++ converter: "ConvertComputedLength<float>", + interpolable: true, + }, + "-webkit-user-drag", +@@ -2398,9 +2401,9 @@ + { + name: "width", + api_class: "CSSPropertyAPIWidthOrHeight", +- converter: "convertLengthSizing", ++ converter: "ConvertLengthSizing", + is_descriptor: true, +- initial: "initialSize", ++ initial: "InitialSize", + interpolable: true, + keywords: ["auto", "fit-content", "min-content", "max-content"], + supports_percentage: true, +@@ -2420,9 +2423,9 @@ + name: "word-spacing", + api_class: "CSSPropertyAPILetterAndWordSpacing", + api_methods: ["parseSingleValue"], +- converter: "convertSpacing", ++ converter: "ConvertSpacing", + inherited: true, +- initial: "initialLetterWordSpacing", ++ initial: "InitialLetterWordSpacing", + interpolable: true, + }, + // UAs must treat 'word-wrap' as an alternate name for the 'overflow-wrap' property. So using the same handlers. +diff --git a/third_party/WebKit/Source/core/css/CSSRuleList.h b/third_party/WebKit/Source/core/css/CSSRuleList.h +index a9c7859610c4..12dc32810cc7 100644 +--- a/third_party/WebKit/Source/core/css/CSSRuleList.h ++++ b/third_party/WebKit/Source/core/css/CSSRuleList.h +@@ -89,7 +89,7 @@ class LiveCSSRuleList final : public CSSRuleList { + unsigned length() const override { return rule_->length(); } + CSSRule* item(unsigned index) const override { return rule_->Item(index); } + CSSStyleSheet* GetStyleSheet() const override { +- return rule_->ParentStyleSheet(); ++ return rule_->parentStyleSheet(); + } + + Member<Rule> rule_; +diff --git a/third_party/WebKit/Source/core/css/CSSValue.h b/third_party/WebKit/Source/core/css/CSSValue.h +index 930809772e42..14f7acc953c5 100644 +--- a/third_party/WebKit/Source/core/css/CSSValue.h ++++ b/third_party/WebKit/Source/core/css/CSSValue.h +@@ -43,7 +43,7 @@ class CORE_EXPORT CSSValue : public GarbageCollectedFinalized<CSSValue> { + const char* type_name = "blink::CSSValue"; + return ThreadHeap::AllocateOnArenaIndex( + state, size, +- is_eager ? BlinkGC::kEagerSweepArenaIndex : BlinkGC::CSSValueArenaIndex, ++ is_eager ? BlinkGC::kEagerSweepArenaIndex : BlinkGC::kCSSValueArenaIndex, + GCInfoTrait<CSSValue>::Index(), type_name); + } + +diff --git a/third_party/WebKit/Source/core/css/ElementRuleCollector.cpp b/third_party/WebKit/Source/core/css/ElementRuleCollector.cpp +index b2e864e935f5..00f1a5e10b6d 100644 +--- a/third_party/WebKit/Source/core/css/ElementRuleCollector.cpp ++++ b/third_party/WebKit/Source/core/css/ElementRuleCollector.cpp +@@ -257,7 +257,7 @@ CSSRule* ElementRuleCollector::FindStyleRule(CSSRuleCollection* css_rules, + return nullptr; + CSSRule* result = 0; + for (unsigned i = 0; i < css_rules->length() && !result; ++i) { +- CSSRule* css_rule = css_rules->Item(i); ++ CSSRule* css_rule = css_rules->item(i); + CSSRule::Type css_rule_type = css_rule->type(); + if (css_rule_type == CSSRule::kStyleRule) { + CSSStyleRule* css_style_rule = ToCSSStyleRule(css_rule); +diff --git a/third_party/WebKit/Source/core/css/FontFaceSet.cpp b/third_party/WebKit/Source/core/css/FontFaceSet.cpp +index 23ba22269edb..8b250f82c7e7 100644 +--- a/third_party/WebKit/Source/core/css/FontFaceSet.cpp ++++ b/third_party/WebKit/Source/core/css/FontFaceSet.cpp +@@ -254,7 +254,7 @@ ScriptPromise FontFaceSet::ready(ScriptState* script_state) { + return ready_->Promise(script_state->World()); + } + +-FontFaceSet* FontFaceSet::AddForBinding(ScriptState*, ++FontFaceSet* FontFaceSet::addForBinding(ScriptState*, + FontFace* font_face, + ExceptionState&) { + DCHECK(font_face); +@@ -273,7 +273,7 @@ FontFaceSet* FontFaceSet::AddForBinding(ScriptState*, + return this; + } + +-void FontFaceSet::ClearForBinding(ScriptState*, ExceptionState&) { ++void FontFaceSet::clearForBinding(ScriptState*, ExceptionState&) { + if (!InActiveDocumentContext() || non_css_connected_faces_.IsEmpty()) + return; + CSSFontSelector* font_selector = GetDocument()->GetStyleEngine().FontSelector(); +@@ -287,7 +287,7 @@ void FontFaceSet::ClearForBinding(ScriptState*, ExceptionState&) { + font_selector->FontFaceInvalidated(); + } + +-bool FontFaceSet::DeleteForBinding(ScriptState*, ++bool FontFaceSet::deleteForBinding(ScriptState*, + FontFace* font_face, + ExceptionState&) { + DCHECK(font_face); +@@ -307,7 +307,7 @@ bool FontFaceSet::DeleteForBinding(ScriptState*, + return false; + } + +-bool FontFaceSet::HasForBinding(ScriptState*, ++bool FontFaceSet::hasForBinding(ScriptState*, + FontFace* font_face, + ExceptionState&) const { + DCHECK(font_face); +diff --git a/third_party/WebKit/Source/core/css/FontFaceSet.h b/third_party/WebKit/Source/core/css/FontFaceSet.h +index f2a136766d1b..f995527d6d45 100644 +--- a/third_party/WebKit/Source/core/css/FontFaceSet.h ++++ b/third_party/WebKit/Source/core/css/FontFaceSet.h +@@ -74,10 +74,10 @@ class CORE_EXPORT FontFaceSet final : public EventTargetWithInlineData, + ScriptPromise load(ScriptState*, const String& font, const String& text); + ScriptPromise ready(ScriptState*); + +- FontFaceSet* AddForBinding(ScriptState*, FontFace*, ExceptionState&); +- void ClearForBinding(ScriptState*, ExceptionState&); +- bool DeleteForBinding(ScriptState*, FontFace*, ExceptionState&); +- bool HasForBinding(ScriptState*, FontFace*, ExceptionState&) const; ++ FontFaceSet* addForBinding(ScriptState*, FontFace*, ExceptionState&); ++ void clearForBinding(ScriptState*, ExceptionState&); ++ bool deleteForBinding(ScriptState*, FontFace*, ExceptionState&); ++ bool hasForBinding(ScriptState*, FontFace*, ExceptionState&) const; + + size_t size() const; + AtomicString status() const; +diff --git a/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp b/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp +index 78c7d5dfc70c..b51d722a7c5f 100644 +--- a/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp ++++ b/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp +@@ -798,8 +798,9 @@ static bool ColorGamutMediaFeatureEval(const MediaQueryExpValue& value, + void MediaQueryEvaluator::Init() { + // Create the table. + g_function_map = new FunctionMap; +-#define ADD_TO_FUNCTIONMAP(name) \ +- g_function_map->Set(name##MediaFeature.Impl(), name##MediaFeatureEval); ++#define ADD_TO_FUNCTIONMAP(constantPrefix, methodPrefix) \ ++ g_function_map->Set(constantPrefix##MediaFeature.Impl(), \ ++ methodPrefix##MediaFeatureEval); + CSS_MEDIAQUERY_NAMES_FOR_EACH_MEDIAFEATURE(ADD_TO_FUNCTIONMAP); + #undef ADD_TO_FUNCTIONMAP + } +diff --git a/third_party/WebKit/Source/core/css/StylePropertySet.cpp b/third_party/WebKit/Source/core/css/StylePropertySet.cpp +index 68b0b997ea86..e48e537120db 100644 +--- a/third_party/WebKit/Source/core/css/StylePropertySet.cpp ++++ b/third_party/WebKit/Source/core/css/StylePropertySet.cpp +@@ -136,9 +136,9 @@ int ImmutableStylePropertySet::FindPropertyIndex(T property) const { + + return -1; + } +-template CORE_EXPORT int ImmutableStylePropertySet::findPropertyIndex( ++template CORE_EXPORT int ImmutableStylePropertySet::FindPropertyIndex( + CSSPropertyID) const; +-template CORE_EXPORT int ImmutableStylePropertySet::findPropertyIndex( ++template CORE_EXPORT int ImmutableStylePropertySet::FindPropertyIndex( + AtomicString) const; + + DEFINE_TRACE_AFTER_DISPATCH(ImmutableStylePropertySet) { +@@ -178,9 +178,9 @@ String StylePropertySet::GetPropertyValue(T property) const { + return SerializeShorthand(*this, property); + } + template CORE_EXPORT String +- StylePropertySet::getPropertyValue<CSSPropertyID>(CSSPropertyID) const; ++ StylePropertySet::GetPropertyValue<CSSPropertyID>(CSSPropertyID) const; + template CORE_EXPORT String +- StylePropertySet::getPropertyValue<AtomicString>(AtomicString) const; ++ StylePropertySet::GetPropertyValue<AtomicString>(AtomicString) const; + + template <typename T> + const CSSValue* StylePropertySet::GetPropertyCSSValue(T property) const { +@@ -190,9 +190,9 @@ const CSSValue* StylePropertySet::GetPropertyCSSValue(T property) const { + return &PropertyAt(found_property_index).Value(); + } + template CORE_EXPORT const CSSValue* +- StylePropertySet::getPropertyCSSValue<CSSPropertyID>(CSSPropertyID) const; ++ StylePropertySet::GetPropertyCSSValue<CSSPropertyID>(CSSPropertyID) const; + template CORE_EXPORT const CSSValue* +- StylePropertySet::getPropertyCSSValue<AtomicString>(AtomicString) const; ++ StylePropertySet::GetPropertyCSSValue<AtomicString>(AtomicString) const; + + DEFINE_TRACE(StylePropertySet) { + if (is_mutable_) +@@ -247,9 +247,9 @@ bool MutableStylePropertySet::RemoveProperty(T property, String* return_text) { + int found_property_index = FindPropertyIndex(property); + return RemovePropertyAtIndex(found_property_index, return_text); + } +-template CORE_EXPORT bool MutableStylePropertySet::removeProperty(CSSPropertyID, ++template CORE_EXPORT bool MutableStylePropertySet::RemoveProperty(CSSPropertyID, + String*); +-template CORE_EXPORT bool MutableStylePropertySet::removeProperty(AtomicString, ++template CORE_EXPORT bool MutableStylePropertySet::RemoveProperty(AtomicString, + String*); + + template <typename T> +@@ -259,9 +259,9 @@ bool StylePropertySet::PropertyIsImportant(T property) const { + return PropertyAt(found_property_index).IsImportant(); + return ShorthandIsImportant(property); + } +-template bool StylePropertySet::propertyIsImportant<CSSPropertyID>( ++template bool StylePropertySet::PropertyIsImportant<CSSPropertyID>( + CSSPropertyID) const; +-template bool StylePropertySet::propertyIsImportant<AtomicString>( ++template bool StylePropertySet::PropertyIsImportant<AtomicString>( + AtomicString) const; + + bool StylePropertySet::ShorthandIsImportant(CSSPropertyID property_id) const { +@@ -574,9 +574,9 @@ int MutableStylePropertySet::FindPropertyIndex(T property) const { + + return (it == end) ? -1 : it - begin; + } +-template CORE_EXPORT int MutableStylePropertySet::findPropertyIndex( ++template CORE_EXPORT int MutableStylePropertySet::FindPropertyIndex( + CSSPropertyID) const; +-template CORE_EXPORT int MutableStylePropertySet::findPropertyIndex( ++template CORE_EXPORT int MutableStylePropertySet::FindPropertyIndex( + AtomicString) const; + + DEFINE_TRACE_AFTER_DISPATCH(MutableStylePropertySet) { +diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp +index c6b1b7192695..5115f6fe8985 100644 +--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp ++++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp +@@ -1834,7 +1834,7 @@ const CSSValue* CSSPropertyParser::ParseSingleValue( + // other properties, those properties will be taken out of the switch + // statement. + const CSSPropertyDescriptor& css_property_desc = +- CSSPropertyDescriptor::get(property); ++ CSSPropertyDescriptor::Get(property); + if (css_property_desc.parseSingleValue) { + DCHECK(context_); + return css_property_desc.parseSingleValue(range_, *context_); +@@ -3366,7 +3366,7 @@ bool CSSPropertyParser::ParseShorthand(CSSPropertyID unresolved_property, + // other properties, those properties will be taken out of the switch + // statement. + const CSSPropertyDescriptor& css_property_desc = +- CSSPropertyDescriptor::get(property); ++ CSSPropertyDescriptor::Get(property); + if (css_property_desc.parseShorthand) + return css_property_desc.parseShorthand(important, range_, context_); + +diff --git a/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp b/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp +index bdcc92e9b951..b4549c73b1f2 100644 +--- a/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp ++++ b/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp +@@ -210,7 +210,7 @@ CSSParserToken CSSTokenizer::SemiColon(UChar cc) { + return CSSParserToken(kSemicolonToken); + } + +-CSSParserToken CSSTokenizer::GetHash(UChar cc) { ++CSSParserToken CSSTokenizer::Hash(UChar cc) { + UChar next_char = input_.PeekWithoutReplacement(0); + if (IsNameCodePoint(next_char) || + TwoCharsAreValidEscape(next_char, input_.PeekWithoutReplacement(1))) { +@@ -338,12 +338,12 @@ CSSParserToken CSSTokenizer::ConsumeNumber() { + sign = kMinusSign; + } + +- number_length = input_.SkipWhilePredicate<isASCIIDigit>(number_length); ++ number_length = input_.SkipWhilePredicate<IsASCIIDigit>(number_length); + next = input_.PeekWithoutReplacement(number_length); + if (next == '.' && + IsASCIIDigit(input_.PeekWithoutReplacement(number_length + 1))) { + type = kNumberValueType; +- number_length = input_.SkipWhilePredicate<isASCIIDigit>(number_length + 2); ++ number_length = input_.SkipWhilePredicate<IsASCIIDigit>(number_length + 2); + next = input_.PeekWithoutReplacement(number_length); + } + +@@ -351,11 +351,11 @@ CSSParserToken CSSTokenizer::ConsumeNumber() { + next = input_.PeekWithoutReplacement(number_length + 1); + if (IsASCIIDigit(next)) { + type = kNumberValueType; +- number_length = input_.SkipWhilePredicate<isASCIIDigit>(number_length + 1); ++ number_length = input_.SkipWhilePredicate<IsASCIIDigit>(number_length + 1); + } else if ((next == '+' || next == '-') && + IsASCIIDigit(input_.PeekWithoutReplacement(number_length + 2))) { + type = kNumberValueType; +- number_length = input_.SkipWhilePredicate<isASCIIDigit>(number_length + 3); ++ number_length = input_.SkipWhilePredicate<IsASCIIDigit>(number_length + 3); + } + } + +diff --git a/third_party/WebKit/Source/core/css/parser/CSSTokenizer.h b/third_party/WebKit/Source/core/css/parser/CSSTokenizer.h +index b5d5f8789aab..32da368e0007 100644 +--- a/third_party/WebKit/Source/core/css/parser/CSSTokenizer.h ++++ b/third_party/WebKit/Source/core/css/parser/CSSTokenizer.h +@@ -82,7 +82,7 @@ class CORE_EXPORT CSSTokenizer { + CSSParserToken Solidus(UChar); + CSSParserToken Colon(UChar); + CSSParserToken SemiColon(UChar); +- CSSParserToken GetHash(UChar); ++ CSSParserToken Hash(UChar); + CSSParserToken CircumflexAccent(UChar); + CSSParserToken DollarSign(UChar); + CSSParserToken VerticalLine(UChar); +diff --git a/third_party/WebKit/Source/core/css/parser/CSSTokenizerTest.cpp b/third_party/WebKit/Source/core/css/parser/CSSTokenizerTest.cpp +index 46df1978e07f..2de2e4f5d22c 100644 +--- a/third_party/WebKit/Source/core/css/parser/CSSTokenizerTest.cpp ++++ b/third_party/WebKit/Source/core/css/parser/CSSTokenizerTest.cpp +@@ -141,22 +141,22 @@ DEFINE_TOKEN(Whitespace, (kWhitespaceToken)) + DEFINE_TOKEN(Colon, (kColonToken)); + DEFINE_TOKEN(Semicolon, (kSemicolonToken)); + DEFINE_TOKEN(Comma, (kCommaToken)); +-DEFINE_TOKEN(Include_match, (kIncludeMatchToken)); +-DEFINE_TOKEN(Dash_match, (kDashMatchToken)); +-DEFINE_TOKEN(Prefix_match, (kPrefixMatchToken)); +-DEFINE_TOKEN(Suffix_match, (kSuffixMatchToken)); +-DEFINE_TOKEN(Substring_match, (kSubstringMatchToken)); ++DEFINE_TOKEN(IncludeMatch, (kIncludeMatchToken)); ++DEFINE_TOKEN(DashMatch, (kDashMatchToken)); ++DEFINE_TOKEN(PrefixMatch, (kPrefixMatchToken)); ++DEFINE_TOKEN(SuffixMatch, (kSuffixMatchToken)); ++DEFINE_TOKEN(SubstringMatch, (kSubstringMatchToken)); + DEFINE_TOKEN(Column, (kColumnToken)); + DEFINE_TOKEN(Cdo, (kCDOToken)); + DEFINE_TOKEN(Cdc, (kCDCToken)); +-DEFINE_TOKEN(Left_parenthesis, (kLeftParenthesisToken)); +-DEFINE_TOKEN(Right_parenthesis, (kRightParenthesisToken)); +-DEFINE_TOKEN(Left_bracket, (kLeftBracketToken)); +-DEFINE_TOKEN(Right_bracket, (kRightBracketToken)); +-DEFINE_TOKEN(Left_brace, (kLeftBraceToken)); +-DEFINE_TOKEN(Right_brace, (kRightBraceToken)); +-DEFINE_TOKEN(Bad_string, (kBadStringToken)); +-DEFINE_TOKEN(Bad_url, (kBadUrlToken)); ++DEFINE_TOKEN(LeftParenthesis, (kLeftParenthesisToken)); ++DEFINE_TOKEN(RightParenthesis, (kRightParenthesisToken)); ++DEFINE_TOKEN(LeftBracket, (kLeftBracketToken)); ++DEFINE_TOKEN(RightBracket, (kRightBracketToken)); ++DEFINE_TOKEN(LeftBrace, (kLeftBraceToken)); ++DEFINE_TOKEN(RightBrace, (kRightBraceToken)); ++DEFINE_TOKEN(BadString, (kBadStringToken)); ++DEFINE_TOKEN(BadUrl, (kBadUrlToken)); + + String FromUChar32(UChar32 c) { + StringBuilder input; +diff --git a/third_party/WebKit/Source/core/dom/ElementTraversal.h b/third_party/WebKit/Source/core/dom/ElementTraversal.h +index 4da55073b7c9..4c425226b24b 100644 +--- a/third_party/WebKit/Source/core/dom/ElementTraversal.h ++++ b/third_party/WebKit/Source/core/dom/ElementTraversal.h +@@ -281,7 +281,7 @@ template <class ElementType> + template <class NodeType> + inline ElementType* Traversal<ElementType>::FirstChildTemplate( + NodeType& current) { +- Node* node = current.FirstChild(); ++ Node* node = current.firstChild(); + while (node && !IsElementOfType<const ElementType>(*node)) + node = node->nextSibling(); + return ToElement<ElementType>(node); +@@ -319,7 +319,7 @@ template <class ElementType> + template <class NodeType> + inline ElementType* Traversal<ElementType>::LastChildTemplate( + NodeType& current) { +- Node* node = current.LastChild(); ++ Node* node = current.lastChild(); + while (node && !IsElementOfType<const ElementType>(*node)) + node = node->previousSibling(); + return ToElement<ElementType>(node); +@@ -340,7 +340,7 @@ template <class ElementType> + template <class NodeType> + inline ElementType* Traversal<ElementType>::FirstWithinTemplate( + NodeType& current) { +- Node* node = current.FirstChild(); ++ Node* node = current.firstChild(); + while (node && !IsElementOfType<const ElementType>(*node)) + node = NodeTraversal::Next(*node, ¤t); + return ToElement<ElementType>(node); +diff --git a/third_party/WebKit/Source/core/dom/Node.h b/third_party/WebKit/Source/core/dom/Node.h +index 161d5afde984..6ef44061ca60 100644 +--- a/third_party/WebKit/Source/core/dom/Node.h ++++ b/third_party/WebKit/Source/core/dom/Node.h +@@ -167,7 +167,7 @@ class CORE_EXPORT Node : public EventTarget { + const char* type_name = "blink::Node"; + return ThreadHeap::AllocateOnArenaIndex( + state, size, +- is_eager ? BlinkGC::kEagerSweepArenaIndex : BlinkGC::NodeArenaIndex, ++ is_eager ? BlinkGC::kEagerSweepArenaIndex : BlinkGC::kNodeArenaIndex, + GCInfoTrait<EventTarget>::Index(), type_name); + } + +diff --git a/third_party/WebKit/Source/core/dom/NodeTraversal.h b/third_party/WebKit/Source/core/dom/NodeTraversal.h +index 1097a4c5228f..e7c6314bc54d 100644 +--- a/third_party/WebKit/Source/core/dom/NodeTraversal.h ++++ b/third_party/WebKit/Source/core/dom/NodeTraversal.h +@@ -349,22 +349,22 @@ NodeTraversal::StartsAfter(const Node& start) { + + template <class NodeType> + inline Node* NodeTraversal::TraverseNextTemplate(NodeType& current) { +- if (current.HasChildren()) +- return current.FirstChild(); +- if (current.NextSibling()) +- return current.NextSibling(); ++ if (current.hasChildren()) ++ return current.firstChild(); ++ if (current.nextSibling()) ++ return current.nextSibling(); + return NextAncestorSibling(current); + } + + template <class NodeType> + inline Node* NodeTraversal::TraverseNextTemplate(NodeType& current, + const Node* stay_within) { +- if (current.HasChildren()) +- return current.FirstChild(); ++ if (current.hasChildren()) ++ return current.firstChild(); + if (current == stay_within) + return 0; +- if (current.NextSibling()) +- return current.NextSibling(); ++ if (current.nextSibling()) ++ return current.nextSibling(); + return NextAncestorSibling(current, stay_within); + } + +@@ -392,7 +392,7 @@ inline Node& NodeTraversal::HighestAncestorOrSelf(Node& current) { + + template <class NodeType> + inline Node* NodeTraversal::ChildAtTemplate(NodeType& parent, unsigned index) { +- Node* child = parent.FirstChild(); ++ Node* child = parent.firstChild(); + while (child && index--) + child = child->nextSibling(); + return child; +diff --git a/third_party/WebKit/Source/core/editing/EditingCommandTest.cpp b/third_party/WebKit/Source/core/editing/EditingCommandTest.cpp +index afcae11323e1..f9a42305f223 100644 +--- a/third_party/WebKit/Source/core/editing/EditingCommandTest.cpp ++++ b/third_party/WebKit/Source/core/editing/EditingCommandTest.cpp +@@ -19,7 +19,7 @@ struct CommandNameEntry { + }; + + const CommandNameEntry kCommandNameEntries[] = { +-#define V(name) {#name, WebEditingCommandType::name}, ++#define V(name) {#name, WebEditingCommandType::k##name}, + FOR_EACH_BLINK_EDITING_COMMAND_NAME(V) + #undef V + }; +diff --git a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp +index 3d664fbdbb5a..ba61fa7dee19 100644 +--- a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp ++++ b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp +@@ -88,7 +88,7 @@ struct CommandNameEntry { + }; + + const CommandNameEntry kCommandNameEntries[] = { +-#define V(name) {#name, WebEditingCommandType::name}, ++#define V(name) {#name, WebEditingCommandType::k##name}, + FOR_EACH_BLINK_EDITING_COMMAND_NAME(V) + #undef V + }; +diff --git a/third_party/WebKit/Source/core/editing/commands/EditorCommandNames.h b/third_party/WebKit/Source/core/editing/commands/EditorCommandNames.h +index 2b99df14310a..312b4c9c34c9 100644 +--- a/third_party/WebKit/Source/core/editing/commands/EditorCommandNames.h ++++ b/third_party/WebKit/Source/core/editing/commands/EditorCommandNames.h +@@ -9,146 +9,148 @@ namespace blink { + + // Must be ordered in a case-folding manner for binary search. Covered by unit + // tests in EditingCommandTest.cpp (not able to use static_assert) ++ /* DO NOT SUBMIT - conflict resolution helper: ++ * Important to have AlignCenter instead of kAlignCenter below. */ + #define FOR_EACH_BLINK_EDITING_COMMAND_NAME(V) \ +- V(kAlignCenter) \ +- V(kAlignJustified) \ +- V(kAlignLeft) \ +- V(kAlignRight) \ +- V(kBackColor) \ +- V(kBackwardDelete) \ +- V(kBold) \ +- V(kCopy) \ +- V(kCreateLink) \ +- V(kCut) \ +- V(kDefaultParagraphSeparator) \ +- V(kDelete) \ +- V(kDeleteBackward) \ +- V(kDeleteBackwardByDecomposingPreviousCharacter) \ +- V(kDeleteForward) \ +- V(kDeleteToBeginningOfLine) \ +- V(kDeleteToBeginningOfParagraph) \ +- V(kDeleteToEndOfLine) \ +- V(kDeleteToEndOfParagraph) \ +- V(kDeleteToMark) \ +- V(kDeleteWordBackward) \ +- V(kDeleteWordForward) \ +- V(kFindString) \ +- V(kFontName) \ +- V(kFontSize) \ +- V(kFontSizeDelta) \ +- V(kForeColor) \ +- V(kFormatBlock) \ +- V(kForwardDelete) \ +- V(kHiliteColor) \ +- V(kIgnoreSpelling) \ +- V(kIndent) \ +- V(kInsertBacktab) \ +- V(kInsertHorizontalRule) \ +- V(kInsertHTML) \ +- V(kInsertImage) \ +- V(kInsertLineBreak) \ +- V(kInsertNewline) \ +- V(kInsertNewlineInQuotedContent) \ +- V(kInsertOrderedList) \ +- V(kInsertParagraph) \ +- V(kInsertTab) \ +- V(kInsertText) \ +- V(kInsertUnorderedList) \ +- V(kItalic) \ +- V(kJustifyCenter) \ +- V(kJustifyFull) \ +- V(kJustifyLeft) \ +- V(kJustifyNone) \ +- V(kJustifyRight) \ +- V(kMakeTextWritingDirectionLeftToRight) \ +- V(kMakeTextWritingDirectionNatural) \ +- V(kMakeTextWritingDirectionRightToLeft) \ +- V(kMoveBackward) \ +- V(kMoveBackwardAndModifySelection) \ +- V(kMoveDown) \ +- V(kMoveDownAndModifySelection) \ +- V(kMoveForward) \ +- V(kMoveForwardAndModifySelection) \ +- V(kMoveLeft) \ +- V(kMoveLeftAndModifySelection) \ +- V(kMovePageDown) \ +- V(kMovePageDownAndModifySelection) \ +- V(kMovePageUp) \ +- V(kMovePageUpAndModifySelection) \ +- V(kMoveParagraphBackward) \ +- V(kMoveParagraphBackwardAndModifySelection) \ +- V(kMoveParagraphForward) \ +- V(kMoveParagraphForwardAndModifySelection) \ +- V(kMoveRight) \ +- V(kMoveRightAndModifySelection) \ +- V(kMoveToBeginningOfDocument) \ +- V(kMoveToBeginningOfDocumentAndModifySelection) \ +- V(kMoveToBeginningOfLine) \ +- V(kMoveToBeginningOfLineAndModifySelection) \ +- V(kMoveToBeginningOfParagraph) \ +- V(kMoveToBeginningOfParagraphAndModifySelection) \ +- V(kMoveToBeginningOfSentence) \ +- V(kMoveToBeginningOfSentenceAndModifySelection) \ +- V(kMoveToEndOfDocument) \ +- V(kMoveToEndOfDocumentAndModifySelection) \ +- V(kMoveToEndOfLine) \ +- V(kMoveToEndOfLineAndModifySelection) \ +- V(kMoveToEndOfParagraph) \ +- V(kMoveToEndOfParagraphAndModifySelection) \ +- V(kMoveToEndOfSentence) \ +- V(kMoveToEndOfSentenceAndModifySelection) \ +- V(kMoveToLeftEndOfLine) \ +- V(kMoveToLeftEndOfLineAndModifySelection) \ +- V(kMoveToRightEndOfLine) \ +- V(kMoveToRightEndOfLineAndModifySelection) \ +- V(kMoveUp) \ +- V(kMoveUpAndModifySelection) \ +- V(kMoveWordBackward) \ +- V(kMoveWordBackwardAndModifySelection) \ +- V(kMoveWordForward) \ +- V(kMoveWordForwardAndModifySelection) \ +- V(kMoveWordLeft) \ +- V(kMoveWordLeftAndModifySelection) \ +- V(kMoveWordRight) \ +- V(kMoveWordRightAndModifySelection) \ +- V(kOutdent) \ +- V(kOverWrite) \ +- V(kPaste) \ +- V(kPasteAndMatchStyle) \ +- V(kPasteGlobalSelection) \ +- V(kPrint) \ +- V(kRedo) \ +- V(kRemoveFormat) \ +- V(kScrollLineDown) \ +- V(kScrollLineUp) \ +- V(kScrollPageBackward) \ +- V(kScrollPageForward) \ +- V(kScrollToBeginningOfDocument) \ +- V(kScrollToEndOfDocument) \ +- V(kSelectAll) \ +- V(kSelectLine) \ +- V(kSelectParagraph) \ +- V(kSelectSentence) \ +- V(kSelectToMark) \ +- V(kSelectWord) \ +- V(kSetMark) \ +- V(kStrikethrough) \ +- V(kStyleWithCSS) \ +- V(kSubscript) \ +- V(kSuperscript) \ +- V(kSwapWithMark) \ +- V(kToggleBold) \ +- V(kToggleItalic) \ +- V(kToggleUnderline) \ +- V(kTranspose) \ +- V(kUnderline) \ +- V(kUndo) \ +- V(kUnlink) \ +- V(kUnscript) \ +- V(kUnselect) \ +- V(kUseCSS) \ +- V(kYank) \ +- V(kYankAndSelect) ++ V(AlignCenter) \ ++ V(AlignJustified) \ ++ V(AlignLeft) \ ++ V(AlignRight) \ ++ V(BackColor) \ ++ V(BackwardDelete) \ ++ V(Bold) \ ++ V(Copy) \ ++ V(CreateLink) \ ++ V(Cut) \ ++ V(DefaultParagraphSeparator) \ ++ V(Delete) \ ++ V(DeleteBackward) \ ++ V(DeleteBackwardByDecomposingPreviousCharacter) \ ++ V(DeleteForward) \ ++ V(DeleteToBeginningOfLine) \ ++ V(DeleteToBeginningOfParagraph) \ ++ V(DeleteToEndOfLine) \ ++ V(DeleteToEndOfParagraph) \ ++ V(DeleteToMark) \ ++ V(DeleteWordBackward) \ ++ V(DeleteWordForward) \ ++ V(FindString) \ ++ V(FontName) \ ++ V(FontSize) \ ++ V(FontSizeDelta) \ ++ V(ForeColor) \ ++ V(FormatBlock) \ ++ V(ForwardDelete) \ ++ V(HiliteColor) \ ++ V(IgnoreSpelling) \ ++ V(Indent) \ ++ V(InsertBacktab) \ ++ V(InsertHorizontalRule) \ ++ V(InsertHTML) \ ++ V(InsertImage) \ ++ V(InsertLineBreak) \ ++ V(InsertNewline) \ ++ V(InsertNewlineInQuotedContent) \ ++ V(InsertOrderedList) \ ++ V(InsertParagraph) \ ++ V(InsertTab) \ ++ V(InsertText) \ ++ V(InsertUnorderedList) \ ++ V(Italic) \ ++ V(JustifyCenter) \ ++ V(JustifyFull) \ ++ V(JustifyLeft) \ ++ V(JustifyNone) \ ++ V(JustifyRight) \ ++ V(MakeTextWritingDirectionLeftToRight) \ ++ V(MakeTextWritingDirectionNatural) \ ++ V(MakeTextWritingDirectionRightToLeft) \ ++ V(MoveBackward) \ ++ V(MoveBackwardAndModifySelection) \ ++ V(MoveDown) \ ++ V(MoveDownAndModifySelection) \ ++ V(MoveForward) \ ++ V(MoveForwardAndModifySelection) \ ++ V(MoveLeft) \ ++ V(MoveLeftAndModifySelection) \ ++ V(MovePageDown) \ ++ V(MovePageDownAndModifySelection) \ ++ V(MovePageUp) \ ++ V(MovePageUpAndModifySelection) \ ++ V(MoveParagraphBackward) \ ++ V(MoveParagraphBackwardAndModifySelection) \ ++ V(MoveParagraphForward) \ ++ V(MoveParagraphForwardAndModifySelection) \ ++ V(MoveRight) \ ++ V(MoveRightAndModifySelection) \ ++ V(MoveToBeginningOfDocument) \ ++ V(MoveToBeginningOfDocumentAndModifySelection) \ ++ V(MoveToBeginningOfLine) \ ++ V(MoveToBeginningOfLineAndModifySelection) \ ++ V(MoveToBeginningOfParagraph) \ ++ V(MoveToBeginningOfParagraphAndModifySelection) \ ++ V(MoveToBeginningOfSentence) \ ++ V(MoveToBeginningOfSentenceAndModifySelection) \ ++ V(MoveToEndOfDocument) \ ++ V(MoveToEndOfDocumentAndModifySelection) \ ++ V(MoveToEndOfLine) \ ++ V(MoveToEndOfLineAndModifySelection) \ ++ V(MoveToEndOfParagraph) \ ++ V(MoveToEndOfParagraphAndModifySelection) \ ++ V(MoveToEndOfSentence) \ ++ V(MoveToEndOfSentenceAndModifySelection) \ ++ V(MoveToLeftEndOfLine) \ ++ V(MoveToLeftEndOfLineAndModifySelection) \ ++ V(MoveToRightEndOfLine) \ ++ V(MoveToRightEndOfLineAndModifySelection) \ ++ V(MoveUp) \ ++ V(MoveUpAndModifySelection) \ ++ V(MoveWordBackward) \ ++ V(MoveWordBackwardAndModifySelection) \ ++ V(MoveWordForward) \ ++ V(MoveWordForwardAndModifySelection) \ ++ V(MoveWordLeft) \ ++ V(MoveWordLeftAndModifySelection) \ ++ V(MoveWordRight) \ ++ V(MoveWordRightAndModifySelection) \ ++ V(Outdent) \ ++ V(OverWrite) \ ++ V(Paste) \ ++ V(PasteAndMatchStyle) \ ++ V(PasteGlobalSelection) \ ++ V(Print) \ ++ V(Redo) \ ++ V(RemoveFormat) \ ++ V(ScrollLineDown) \ ++ V(ScrollLineUp) \ ++ V(ScrollPageBackward) \ ++ V(ScrollPageForward) \ ++ V(ScrollToBeginningOfDocument) \ ++ V(ScrollToEndOfDocument) \ ++ V(SelectAll) \ ++ V(SelectLine) \ ++ V(SelectParagraph) \ ++ V(SelectSentence) \ ++ V(SelectToMark) \ ++ V(SelectWord) \ ++ V(SetMark) \ ++ V(Strikethrough) \ ++ V(StyleWithCSS) \ ++ V(Subscript) \ ++ V(Superscript) \ ++ V(SwapWithMark) \ ++ V(ToggleBold) \ ++ V(ToggleItalic) \ ++ V(ToggleUnderline) \ ++ V(Transpose) \ ++ V(Underline) \ ++ V(Undo) \ ++ V(Unlink) \ ++ V(Unscript) \ ++ V(Unselect) \ ++ V(UseCSS) \ ++ V(Yank) \ ++ V(YankAndSelect) + + } // namespace blink + +diff --git a/third_party/WebKit/Source/core/editing/serializers/MarkupAccumulator.cpp b/third_party/WebKit/Source/core/editing/serializers/MarkupAccumulator.cpp +index 8ca9beb43bd9..408e70201827 100644 +--- a/third_party/WebKit/Source/core/editing/serializers/MarkupAccumulator.cpp ++++ b/third_party/WebKit/Source/core/editing/serializers/MarkupAccumulator.cpp +@@ -202,7 +202,7 @@ String SerializeNodes(MarkupAccumulator& accumulator, + return accumulator.ToString(); + } + +-template String serializeNodes<EditingStrategy>(MarkupAccumulator&, ++template String SerializeNodes<EditingStrategy>(MarkupAccumulator&, + Node&, + EChildrenOnly); + +diff --git a/third_party/WebKit/Source/core/editing/serializers/MarkupAccumulator.h b/third_party/WebKit/Source/core/editing/serializers/MarkupAccumulator.h +index 9064252faa9d..4ce1662b8684 100644 +--- a/third_party/WebKit/Source/core/editing/serializers/MarkupAccumulator.h ++++ b/third_party/WebKit/Source/core/editing/serializers/MarkupAccumulator.h +@@ -83,7 +83,7 @@ class MarkupAccumulator { + template <typename Strategy> + String SerializeNodes(MarkupAccumulator&, Node&, EChildrenOnly); + +-extern template String serializeNodes<EditingStrategy>(MarkupAccumulator&, ++extern template String SerializeNodes<EditingStrategy>(MarkupAccumulator&, + Node&, + EChildrenOnly); + +diff --git a/third_party/WebKit/Source/core/events/EventTarget.h b/third_party/WebKit/Source/core/events/EventTarget.h +index 3251d895e7be..45f2e4ba4bf7 100644 +--- a/third_party/WebKit/Source/core/events/EventTarget.h ++++ b/third_party/WebKit/Source/core/events/EventTarget.h +@@ -243,10 +243,10 @@ class GC_PLUGIN_IGNORE("513199") CORE_EXPORT EventTargetWithInlineData + // FIXME: These macros should be split into separate DEFINE and DECLARE + // macros to avoid causing so many header includes. + #define DEFINE_ATTRIBUTE_EVENT_LISTENER(attribute) \ +- EventListener* On##attribute() { \ ++ EventListener* on##attribute() { \ + return this->GetAttributeEventListener(EventTypeNames::attribute); \ + } \ +- void SetOn##attribute(EventListener* listener) { \ ++ void setOn##attribute(EventListener* listener) { \ + this->SetAttributeEventListener(EventTypeNames::attribute, listener); \ + } + +diff --git a/third_party/WebKit/Source/core/frame/Settings.json5 b/third_party/WebKit/Source/core/frame/Settings.json5 +index fb80e35663d9..d9b7c509b3fd 100644 +--- a/third_party/WebKit/Source/core/frame/Settings.json5 ++++ b/third_party/WebKit/Source/core/frame/Settings.json5 +@@ -106,7 +106,7 @@ + + { + name: "editingBehaviorType", +- initial: "editingBehaviorTypeForPlatform()", ++ initial: "EditingBehaviorTypeForPlatform()", + type: "EditingBehaviorType", + }, + +@@ -356,7 +356,7 @@ + }, + { + name: "selectTrailingWhitespaceEnabled", +- initial: "defaultSelectTrailingWhitespaceEnabled", ++ initial: "kDefaultSelectTrailingWhitespaceEnabled", + }, + + { +@@ -366,7 +366,7 @@ + + { + name: "selectionStrategy", +- initial: "SelectionStrategy::Character", ++ initial: "SelectionStrategy::kCharacter", + type: "SelectionStrategy", + }, + +@@ -504,7 +504,7 @@ + }, + { + name: "displayModeOverride", +- initial: "WebDisplayModeUndefined", ++ initial: "kWebDisplayModeUndefined", + invalidate: "MediaQuery", + type: "WebDisplayMode", + }, +@@ -523,7 +523,7 @@ + }, + { + name: "imageAnimationPolicy", +- initial: "ImageAnimationPolicyAllowed", ++ initial: "kImageAnimationPolicyAllowed", + type: "ImageAnimationPolicy", + }, + +@@ -631,14 +631,14 @@ + // V8 supports different types of caching. Used by V8 bindings. + { + name: "v8CacheOptions", +- initial: "V8CacheOptionsDefault", ++ initial: "kV8CacheOptionsDefault", + type: "V8CacheOptions", + }, + + // V8 code cache for CacheStorage supports three types of strategies (none, normal and aggressive). + { + name: "v8CacheStrategiesForCacheStorage", +- initial: "V8CacheStrategiesForCacheStorage::Default", ++ initial: "V8CacheStrategiesForCacheStorage::kDefault", + type: "V8CacheStrategiesForCacheStorage", + }, + +@@ -647,13 +647,13 @@ + // has pointerType coarse *and* fine). + { + name: "availablePointerTypes", +- initial: "PointerTypeNone", ++ initial: "kPointerTypeNone", + invalidate: "MediaQuery", + type: "int", + }, + { + name: "availableHoverTypes", +- initial: "HoverTypeNone", ++ initial: "kHoverTypeNone", + invalidate: "MediaQuery", + type: "int", + }, +@@ -661,13 +661,13 @@ + // These values specify properties of the user's primary pointing device only. + { + name: "primaryPointerType", +- initial: "PointerTypeNone", ++ initial: "kPointerTypeNone", + invalidate: "MediaQuery", + type: "PointerType", + }, + { + name: "primaryHoverType", +- initial: "HoverTypeNone", ++ initial: "kHoverTypeNone", + invalidate: "MediaQuery", + type: "HoverType", + }, +@@ -744,7 +744,7 @@ + // used by content embedders to specify custom style on certain platforms. + { + name: "viewportStyle", +- initial: "WebViewportStyle::Default", ++ initial: "WebViewportStyle::kDefault", + invalidate: "ViewportRule", + type: "WebViewportStyle", + }, +@@ -753,7 +753,7 @@ + // by this setting. + { + name: "textTrackKindUserPreference", +- initial: "TextTrackKindUserPreference::Default", ++ initial: "TextTrackKindUserPreference::kDefault", + invalidate: "TextTrackKindUserPreference", + type: "TextTrackKindUserPreference", + }, +@@ -803,7 +803,7 @@ + + { + name: "progressBarCompletion", +- initial: "ProgressBarCompletion::LoadEvent", ++ initial: "ProgressBarCompletion::kLoadEvent", + type: "ProgressBarCompletion", + }, + +@@ -854,7 +854,7 @@ + // to enable it have been shipped. + { + name: "passiveListenerDefault", +- initial: "PassiveListenerDefault::False", ++ initial: "PassiveListenerDefault::kFalse", + type: "PassiveListenerDefault", + }, + +diff --git a/third_party/WebKit/Source/core/frame/SubresourceIntegrity.cpp b/third_party/WebKit/Source/core/frame/SubresourceIntegrity.cpp +index e01d1744b991..7be8232ddbc8 100644 +--- a/third_party/WebKit/Source/core/frame/SubresourceIntegrity.cpp ++++ b/third_party/WebKit/Source/core/frame/SubresourceIntegrity.cpp +@@ -338,9 +338,9 @@ SubresourceIntegrity::ParseIntegrityAttribute( + WTF::String digest; + HashAlgorithm algorithm; + +- skipWhile<UChar, isASCIISpace>(position, end); ++ skipWhile<UChar, IsASCIISpace>(position, end); + current_integrity_end = position; +- skipUntil<UChar, isASCIISpace>(current_integrity_end, end); ++ skipUntil<UChar, IsASCIISpace>(current_integrity_end, end); + + // Algorithm parsing errors are non-fatal (the subresource should + // still be loaded) because strong hash algorithms should be used +@@ -351,7 +351,7 @@ SubresourceIntegrity::ParseIntegrityAttribute( + if (parse_result == kAlgorithmUnknown) { + // Unknown hash algorithms are treated as if they're not present, + // and thus are not marked as an error, they're just skipped. +- skipUntil<UChar, isASCIISpace>(position, end); ++ skipUntil<UChar, IsASCIISpace>(position, end); + if (execution_context) { + LogErrorToConsole("Error parsing 'integrity' attribute ('" + attribute + + "'). The specified hash algorithm must be one of " +@@ -366,7 +366,7 @@ SubresourceIntegrity::ParseIntegrityAttribute( + + if (parse_result == kAlgorithmUnparsable) { + error = true; +- skipUntil<UChar, isASCIISpace>(position, end); ++ skipUntil<UChar, IsASCIISpace>(position, end); + if (execution_context) { + LogErrorToConsole("Error parsing 'integrity' attribute ('" + attribute + + "'). The hash algorithm must be one of 'sha256', " +@@ -384,7 +384,7 @@ SubresourceIntegrity::ParseIntegrityAttribute( + + if (!ParseDigest(position, current_integrity_end, digest)) { + error = true; +- skipUntil<UChar, isASCIISpace>(position, end); ++ skipUntil<UChar, IsASCIISpace>(position, end); + if (execution_context) { + LogErrorToConsole( + "Error parsing 'integrity' attribute ('" + attribute + +diff --git a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp +index 86b460e05b40..b1ea8ce0757a 100644 +--- a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp ++++ b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp +@@ -42,7 +42,7 @@ String GetSha256String(const String& content) { + + template <typename CharType> + inline bool IsASCIIAlphanumericOrHyphen(CharType c) { +- return isASCIIAlphanumeric(c) || c == '-'; ++ return IsASCIIAlphanumeric(c) || c == '-'; + } + + ContentSecurityPolicyHashAlgorithm ConvertHashAlgorithmToCSPHashAlgorithm( +@@ -981,7 +981,7 @@ bool CSPDirectiveList::ParseDirective(const UChar* begin, + ASSERT(value.IsEmpty()); + + const UChar* position = begin; +- skipWhile<UChar, isASCIISpace>(position, end); ++ skipWhile<UChar, IsASCIISpace>(position, end); + + // Empty directive (e.g. ";;;"). Exit early. + if (position == end) +@@ -1003,14 +1003,14 @@ bool CSPDirectiveList::ParseDirective(const UChar* begin, + if (position == end) + return true; + +- if (!skipExactly<UChar, isASCIISpace>(position, end)) { ++ if (!skipExactly<UChar, IsASCIISpace>(position, end)) { + skipWhile<UChar, IsNotASCIISpace>(position, end); + policy_->ReportUnsupportedDirective( + String(name_begin, position - name_begin)); + return false; + } + +- skipWhile<UChar, isASCIISpace>(position, end); ++ skipWhile<UChar, IsASCIISpace>(position, end); + + const UChar* value_begin = position; + skipWhile<UChar, IsCSPDirectiveValueCharacter>(position, end); +@@ -1044,7 +1044,7 @@ void CSPDirectiveList::ParseRequireSRIFor(const String& name, + const UChar* end = position + characters.size(); + + while (position < end) { +- skipWhile<UChar, isASCIISpace>(position, end); ++ skipWhile<UChar, IsASCIISpace>(position, end); + + const UChar* token_begin = position; + skipWhile<UChar, IsNotASCIISpace>(position, end); +@@ -1103,7 +1103,7 @@ void CSPDirectiveList::ParseReportURI(const String& name, const String& value) { + const UChar* end = position + characters.size(); + + while (position < end) { +- skipWhile<UChar, isASCIISpace>(position, end); ++ skipWhile<UChar, IsASCIISpace>(position, end); + + const UChar* url_begin = position; + skipWhile<UChar, IsNotASCIISpace>(position, end); +diff --git a/third_party/WebKit/Source/core/frame/csp/MediaListDirective.cpp b/third_party/WebKit/Source/core/frame/csp/MediaListDirective.cpp +index dec89e08e0b3..92d163a45cb9 100644 +--- a/third_party/WebKit/Source/core/frame/csp/MediaListDirective.cpp ++++ b/third_party/WebKit/Source/core/frame/csp/MediaListDirective.cpp +@@ -39,7 +39,7 @@ void MediaListDirective::Parse(const UChar* begin, const UChar* end) { + while (position < end) { + // _____ OR _____mime1/mime1 + // ^ ^ +- skipWhile<UChar, isASCIISpace>(position, end); ++ skipWhile<UChar, IsASCIISpace>(position, end); + if (position == end) + return; + +diff --git a/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp b/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp +index 8eb452f1296a..b6a6d07cc55c 100644 +--- a/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp ++++ b/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp +@@ -37,14 +37,14 @@ SourceListDirective::SourceListDirective(const String& name, + } + + static bool IsSourceListNone(const UChar* begin, const UChar* end) { +- skipWhile<UChar, isASCIISpace>(begin, end); ++ skipWhile<UChar, IsASCIISpace>(begin, end); + + const UChar* position = begin; + skipWhile<UChar, IsSourceCharacter>(position, end); + if (!EqualIgnoringCase("'none'", StringView(begin, position - begin))) + return false; + +- skipWhile<UChar, isASCIISpace>(position, end); ++ skipWhile<UChar, IsASCIISpace>(position, end); + if (position != end) + return false; + +@@ -128,7 +128,7 @@ void SourceListDirective::Parse(const UChar* begin, const UChar* end) { + + const UChar* position = begin; + while (position < end) { +- skipWhile<UChar, isASCIISpace>(position, end); ++ skipWhile<UChar, IsASCIISpace>(position, end); + if (position == end) + return; + +@@ -422,7 +422,7 @@ bool SourceListDirective::ParseScheme(const UChar* begin, + + const UChar* position = begin; + +- if (!skipExactly<UChar, isASCIIAlpha>(position, end)) ++ if (!skipExactly<UChar, IsASCIIAlpha>(position, end)) + return false; + + skipWhile<UChar, IsSchemeContinuationCharacter>(position, end); +@@ -531,7 +531,7 @@ bool SourceListDirective::ParsePort( + } + + const UChar* position = begin; +- skipWhile<UChar, isASCIIDigit>(position, end); ++ skipWhile<UChar, IsASCIIDigit>(position, end); + + if (position != end) + return false; +diff --git a/third_party/WebKit/Source/core/html/HTMLCollection.h b/third_party/WebKit/Source/core/html/HTMLCollection.h +index 513aa1064d34..2b4489b1fa2f 100644 +--- a/third_party/WebKit/Source/core/html/HTMLCollection.h ++++ b/third_party/WebKit/Source/core/html/HTMLCollection.h +@@ -42,7 +42,7 @@ class HTMLCollectionIterator { + public: + explicit HTMLCollectionIterator(const CollectionType* collection) + : collection_(collection) {} +- NodeType* operator*() { return collection_->Item(index_); } ++ NodeType* operator*() { return collection_->item(index_); } + + void operator++() { + if (index_ < collection_->length()) +diff --git a/third_party/WebKit/Source/core/html/HTMLDimension.cpp b/third_party/WebKit/Source/core/html/HTMLDimension.cpp +index a41ec91d0832..5f87f3fd9fe7 100644 +--- a/third_party/WebKit/Source/core/html/HTMLDimension.cpp ++++ b/third_party/WebKit/Source/core/html/HTMLDimension.cpp +@@ -155,14 +155,14 @@ static bool ParseDimensionValue(const CharacterType* current, + skipWhile<CharacterType, IsHTMLSpace>(current, end); + // Deviation: HTML allows '+' here. + const CharacterType* number_start = current; +- if (!skipExactly<CharacterType, isASCIIDigit>(current, end)) ++ if (!skipExactly<CharacterType, IsASCIIDigit>(current, end)) + return false; +- skipWhile<CharacterType, isASCIIDigit>(current, end); ++ skipWhile<CharacterType, IsASCIIDigit>(current, end); + if (skipExactly<CharacterType>(current, end, '.')) { + // Deviation: HTML requires a digit after the full stop to be able to treat + // the value as a percentage (if not, the '.' will considered "garbage", + // yielding a regular length.) Gecko and Edge does not. +- skipWhile<CharacterType, isASCIIDigit>(current, end); ++ skipWhile<CharacterType, IsASCIIDigit>(current, end); + } + bool ok; + double value = CharactersToDouble(number_start, current - number_start, &ok); +diff --git a/third_party/WebKit/Source/core/html/parser/create-html-entity-table b/third_party/WebKit/Source/core/html/parser/create-html-entity-table +index f0a7918a2b9f..33bb73c77f1e 100755 +--- a/third_party/WebKit/Source/core/html/parser/create-html-entity-table ++++ b/third_party/WebKit/Source/core/html/parser/create-html-entity-table +@@ -199,17 +199,17 @@ for letter in string.ascii_lowercase: + output_file.write("%d\n" % entity_count) + output_file.write("""}; + +-const LChar* HTMLEntityTable::entityString(const HTMLEntityTableEntry& entry) ++const LChar* HTMLEntityTable::EntityString(const HTMLEntityTableEntry& entry) + { +- return staticEntityStringStorage + entry.entityOffset; ++ return staticEntityStringStorage + entry.entity_offset; + } + +-LChar HTMLEntityTableEntry::lastCharacter() const ++LChar HTMLEntityTableEntry::LastCharacter() const + { +- return HTMLEntityTable::entityString(*this)[length - 1]; ++ return HTMLEntityTable::EntityString(*this)[length - 1]; + } + +-const HTMLEntityTableEntry* HTMLEntityTable::firstEntryStartingWith(UChar c) ++const HTMLEntityTableEntry* HTMLEntityTable::FirstEntryStartingWith(UChar c) + { + if (c >= 'A' && c <= 'Z') + return &staticEntityTable[uppercaseOffset[c - 'A']]; +@@ -218,7 +218,7 @@ const HTMLEntityTableEntry* HTMLEntityTable::firstEntryStartingWith(UChar c) + return 0; + } + +-const HTMLEntityTableEntry* HTMLEntityTable::lastEntryStartingWith(UChar c) ++const HTMLEntityTableEntry* HTMLEntityTable::LastEntryStartingWith(UChar c) + { + if (c >= 'A' && c <= 'Z') + return &staticEntityTable[uppercaseOffset[c - 'A' + 1]] - 1; +@@ -227,12 +227,12 @@ const HTMLEntityTableEntry* HTMLEntityTable::lastEntryStartingWith(UChar c) + return 0; + } + +-const HTMLEntityTableEntry* HTMLEntityTable::firstEntry() ++const HTMLEntityTableEntry* HTMLEntityTable::FirstEntry() + { + return &staticEntityTable[0]; + } + +-const HTMLEntityTableEntry* HTMLEntityTable::lastEntry() ++const HTMLEntityTableEntry* HTMLEntityTable::LastEntry() + { + return &staticEntityTable[%s - 1]; + } +diff --git a/third_party/WebKit/Source/core/html/track/vtt/VTTScanner.cpp b/third_party/WebKit/Source/core/html/track/vtt/VTTScanner.cpp +index 5a9bf4eb2980..cb32813f65db 100644 +--- a/third_party/WebKit/Source/core/html/track/vtt/VTTScanner.cpp ++++ b/third_party/WebKit/Source/core/html/track/vtt/VTTScanner.cpp +@@ -110,7 +110,7 @@ String VTTScanner::RestOfInputAsString() { + } + + unsigned VTTScanner::ScanDigits(int& number) { +- Run run_of_digits = CollectWhile<isASCIIDigit>(); ++ Run run_of_digits = CollectWhile<IsASCIIDigit>(); + if (run_of_digits.IsEmpty()) { + number = 0; + return 0; +@@ -134,11 +134,11 @@ unsigned VTTScanner::ScanDigits(int& number) { + } + + bool VTTScanner::ScanFloat(float& number) { +- Run integer_run = CollectWhile<isASCIIDigit>(); ++ Run integer_run = CollectWhile<IsASCIIDigit>(); + SeekTo(integer_run.end()); + Run decimal_run(GetPosition(), GetPosition(), is8_bit_); + if (Scan('.')) { +- decimal_run = CollectWhile<isASCIIDigit>(); ++ decimal_run = CollectWhile<IsASCIIDigit>(); + SeekTo(decimal_run.end()); + } + +diff --git a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp +index 340d50764ea0..b4bb86bc4725 100644 +--- a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp ++++ b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp +@@ -997,7 +997,7 @@ static CSSKeyframesRule* FindKeyframesRule(CSSRuleCollection* css_rules, + StyleRuleKeyframes* keyframes_rule) { + CSSKeyframesRule* result = 0; + for (unsigned j = 0; css_rules && j < css_rules->length() && !result; ++j) { +- CSSRule* css_rule = css_rules->Item(j); ++ CSSRule* css_rule = css_rules->item(j); + if (css_rule->type() == CSSRule::kKeyframesRule) { + CSSKeyframesRule* css_style_rule = ToCSSKeyframesRule(css_rule); + if (css_style_rule->Keyframes() == keyframes_rule) +diff --git a/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp b/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp +index 5a443d8849e0..ade7b996934e 100644 +--- a/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp ++++ b/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp +@@ -514,7 +514,7 @@ void CollectFlatRules(RuleList rule_list, CSSRuleVector* result) { + return; + + for (unsigned i = 0, size = rule_list->length(); i < size; ++i) { +- CSSRule* rule = rule_list->Item(i); ++ CSSRule* rule = rule_list->item(i); + + // The result->append()'ed types should be exactly the same as in + // flattenSourceData(). +diff --git a/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp b/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp +index a900cd9c3fa4..f1b3366f4800 100644 +--- a/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp ++++ b/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp +@@ -219,96 +219,96 @@ void SetNodeInfo(TracedValue* value, + const char* PseudoTypeToString(CSSSelector::PseudoType pseudo_type) { + switch (pseudo_type) { + #define DEFINE_STRING_MAPPING(pseudoType) \ +- case CSSSelector::pseudoType: \ ++ case CSSSelector::k##pseudoType: \ + return #pseudoType; +- DEFINE_STRING_MAPPING(kPseudoUnknown) +- DEFINE_STRING_MAPPING(kPseudoEmpty) +- DEFINE_STRING_MAPPING(kPseudoFirstChild) +- DEFINE_STRING_MAPPING(kPseudoFirstOfType) +- DEFINE_STRING_MAPPING(kPseudoLastChild) +- DEFINE_STRING_MAPPING(kPseudoLastOfType) +- DEFINE_STRING_MAPPING(kPseudoOnlyChild) +- DEFINE_STRING_MAPPING(kPseudoOnlyOfType) +- DEFINE_STRING_MAPPING(kPseudoFirstLine) +- DEFINE_STRING_MAPPING(kPseudoFirstLetter) +- DEFINE_STRING_MAPPING(kPseudoNthChild) +- DEFINE_STRING_MAPPING(kPseudoNthOfType) +- DEFINE_STRING_MAPPING(kPseudoNthLastChild) +- DEFINE_STRING_MAPPING(kPseudoNthLastOfType) +- DEFINE_STRING_MAPPING(kPseudoLink) +- DEFINE_STRING_MAPPING(kPseudoVisited) +- DEFINE_STRING_MAPPING(kPseudoAny) +- DEFINE_STRING_MAPPING(kPseudoAnyLink) +- DEFINE_STRING_MAPPING(kPseudoAutofill) +- DEFINE_STRING_MAPPING(kPseudoHover) +- DEFINE_STRING_MAPPING(kPseudoDrag) +- DEFINE_STRING_MAPPING(kPseudoFocus) +- DEFINE_STRING_MAPPING(kPseudoActive) +- DEFINE_STRING_MAPPING(kPseudoChecked) +- DEFINE_STRING_MAPPING(kPseudoEnabled) +- DEFINE_STRING_MAPPING(kPseudoFullPageMedia) +- DEFINE_STRING_MAPPING(kPseudoDefault) +- DEFINE_STRING_MAPPING(kPseudoDisabled) +- DEFINE_STRING_MAPPING(kPseudoOptional) +- DEFINE_STRING_MAPPING(kPseudoPlaceholderShown) +- DEFINE_STRING_MAPPING(kPseudoRequired) +- DEFINE_STRING_MAPPING(kPseudoReadOnly) +- DEFINE_STRING_MAPPING(kPseudoReadWrite) +- DEFINE_STRING_MAPPING(kPseudoValid) +- DEFINE_STRING_MAPPING(kPseudoInvalid) +- DEFINE_STRING_MAPPING(kPseudoIndeterminate) +- DEFINE_STRING_MAPPING(kPseudoTarget) +- DEFINE_STRING_MAPPING(kPseudoBefore) +- DEFINE_STRING_MAPPING(kPseudoAfter) +- DEFINE_STRING_MAPPING(kPseudoBackdrop) +- DEFINE_STRING_MAPPING(kPseudoLang) +- DEFINE_STRING_MAPPING(kPseudoNot) +- DEFINE_STRING_MAPPING(kPseudoPlaceholder) +- DEFINE_STRING_MAPPING(kPseudoResizer) +- DEFINE_STRING_MAPPING(kPseudoRoot) +- DEFINE_STRING_MAPPING(kPseudoScope) +- DEFINE_STRING_MAPPING(kPseudoScrollbar) +- DEFINE_STRING_MAPPING(kPseudoScrollbarButton) +- DEFINE_STRING_MAPPING(kPseudoScrollbarCorner) +- DEFINE_STRING_MAPPING(kPseudoScrollbarThumb) +- DEFINE_STRING_MAPPING(kPseudoScrollbarTrack) +- DEFINE_STRING_MAPPING(kPseudoScrollbarTrackPiece) +- DEFINE_STRING_MAPPING(kPseudoWindowInactive) +- DEFINE_STRING_MAPPING(kPseudoCornerPresent) +- DEFINE_STRING_MAPPING(kPseudoDecrement) +- DEFINE_STRING_MAPPING(kPseudoIncrement) +- DEFINE_STRING_MAPPING(kPseudoHorizontal) +- DEFINE_STRING_MAPPING(kPseudoVertical) +- DEFINE_STRING_MAPPING(kPseudoStart) +- DEFINE_STRING_MAPPING(kPseudoEnd) +- DEFINE_STRING_MAPPING(kPseudoDoubleButton) +- DEFINE_STRING_MAPPING(kPseudoSingleButton) +- DEFINE_STRING_MAPPING(kPseudoNoButton) +- DEFINE_STRING_MAPPING(kPseudoSelection) +- DEFINE_STRING_MAPPING(kPseudoLeftPage) +- DEFINE_STRING_MAPPING(kPseudoRightPage) +- DEFINE_STRING_MAPPING(kPseudoFirstPage) +- DEFINE_STRING_MAPPING(kPseudoFullScreen) +- DEFINE_STRING_MAPPING(kPseudoFullScreenAncestor) +- DEFINE_STRING_MAPPING(kPseudoInRange) +- DEFINE_STRING_MAPPING(kPseudoOutOfRange) +- DEFINE_STRING_MAPPING(kPseudoWebKitCustomElement) +- DEFINE_STRING_MAPPING(kPseudoBlinkInternalElement) +- DEFINE_STRING_MAPPING(kPseudoCue) +- DEFINE_STRING_MAPPING(kPseudoFutureCue) +- DEFINE_STRING_MAPPING(kPseudoPastCue) +- DEFINE_STRING_MAPPING(kPseudoUnresolved) +- DEFINE_STRING_MAPPING(kPseudoDefined) +- DEFINE_STRING_MAPPING(kPseudoContent) +- DEFINE_STRING_MAPPING(kPseudoHost) +- DEFINE_STRING_MAPPING(kPseudoHostContext) +- DEFINE_STRING_MAPPING(kPseudoShadow) +- DEFINE_STRING_MAPPING(kPseudoSlotted) +- DEFINE_STRING_MAPPING(kPseudoSpatialNavigationFocus) +- DEFINE_STRING_MAPPING(kPseudoListBox) +- DEFINE_STRING_MAPPING(kPseudoHostHasAppearance) +- DEFINE_STRING_MAPPING(kPseudoVideoPersistent) +- DEFINE_STRING_MAPPING(kPseudoVideoPersistentAncestor) ++ DEFINE_STRING_MAPPING(PseudoUnknown) ++ DEFINE_STRING_MAPPING(PseudoEmpty) ++ DEFINE_STRING_MAPPING(PseudoFirstChild) ++ DEFINE_STRING_MAPPING(PseudoFirstOfType) ++ DEFINE_STRING_MAPPING(PseudoLastChild) ++ DEFINE_STRING_MAPPING(PseudoLastOfType) ++ DEFINE_STRING_MAPPING(PseudoOnlyChild) ++ DEFINE_STRING_MAPPING(PseudoOnlyOfType) ++ DEFINE_STRING_MAPPING(PseudoFirstLine) ++ DEFINE_STRING_MAPPING(PseudoFirstLetter) ++ DEFINE_STRING_MAPPING(PseudoNthChild) ++ DEFINE_STRING_MAPPING(PseudoNthOfType) ++ DEFINE_STRING_MAPPING(PseudoNthLastChild) ++ DEFINE_STRING_MAPPING(PseudoNthLastOfType) ++ DEFINE_STRING_MAPPING(PseudoLink) ++ DEFINE_STRING_MAPPING(PseudoVisited) ++ DEFINE_STRING_MAPPING(PseudoAny) ++ DEFINE_STRING_MAPPING(PseudoAnyLink) ++ DEFINE_STRING_MAPPING(PseudoAutofill) ++ DEFINE_STRING_MAPPING(PseudoHover) ++ DEFINE_STRING_MAPPING(PseudoDrag) ++ DEFINE_STRING_MAPPING(PseudoFocus) ++ DEFINE_STRING_MAPPING(PseudoActive) ++ DEFINE_STRING_MAPPING(PseudoChecked) ++ DEFINE_STRING_MAPPING(PseudoEnabled) ++ DEFINE_STRING_MAPPING(PseudoFullPageMedia) ++ DEFINE_STRING_MAPPING(PseudoDefault) ++ DEFINE_STRING_MAPPING(PseudoDisabled) ++ DEFINE_STRING_MAPPING(PseudoOptional) ++ DEFINE_STRING_MAPPING(PseudoPlaceholderShown) ++ DEFINE_STRING_MAPPING(PseudoRequired) ++ DEFINE_STRING_MAPPING(PseudoReadOnly) ++ DEFINE_STRING_MAPPING(PseudoReadWrite) ++ DEFINE_STRING_MAPPING(PseudoValid) ++ DEFINE_STRING_MAPPING(PseudoInvalid) ++ DEFINE_STRING_MAPPING(PseudoIndeterminate) ++ DEFINE_STRING_MAPPING(PseudoTarget) ++ DEFINE_STRING_MAPPING(PseudoBefore) ++ DEFINE_STRING_MAPPING(PseudoAfter) ++ DEFINE_STRING_MAPPING(PseudoBackdrop) ++ DEFINE_STRING_MAPPING(PseudoLang) ++ DEFINE_STRING_MAPPING(PseudoNot) ++ DEFINE_STRING_MAPPING(PseudoPlaceholder) ++ DEFINE_STRING_MAPPING(PseudoResizer) ++ DEFINE_STRING_MAPPING(PseudoRoot) ++ DEFINE_STRING_MAPPING(PseudoScope) ++ DEFINE_STRING_MAPPING(PseudoScrollbar) ++ DEFINE_STRING_MAPPING(PseudoScrollbarButton) ++ DEFINE_STRING_MAPPING(PseudoScrollbarCorner) ++ DEFINE_STRING_MAPPING(PseudoScrollbarThumb) ++ DEFINE_STRING_MAPPING(PseudoScrollbarTrack) ++ DEFINE_STRING_MAPPING(PseudoScrollbarTrackPiece) ++ DEFINE_STRING_MAPPING(PseudoWindowInactive) ++ DEFINE_STRING_MAPPING(PseudoCornerPresent) ++ DEFINE_STRING_MAPPING(PseudoDecrement) ++ DEFINE_STRING_MAPPING(PseudoIncrement) ++ DEFINE_STRING_MAPPING(PseudoHorizontal) ++ DEFINE_STRING_MAPPING(PseudoVertical) ++ DEFINE_STRING_MAPPING(PseudoStart) ++ DEFINE_STRING_MAPPING(PseudoEnd) ++ DEFINE_STRING_MAPPING(PseudoDoubleButton) ++ DEFINE_STRING_MAPPING(PseudoSingleButton) ++ DEFINE_STRING_MAPPING(PseudoNoButton) ++ DEFINE_STRING_MAPPING(PseudoSelection) ++ DEFINE_STRING_MAPPING(PseudoLeftPage) ++ DEFINE_STRING_MAPPING(PseudoRightPage) ++ DEFINE_STRING_MAPPING(PseudoFirstPage) ++ DEFINE_STRING_MAPPING(PseudoFullScreen) ++ DEFINE_STRING_MAPPING(PseudoFullScreenAncestor) ++ DEFINE_STRING_MAPPING(PseudoInRange) ++ DEFINE_STRING_MAPPING(PseudoOutOfRange) ++ DEFINE_STRING_MAPPING(PseudoWebKitCustomElement) ++ DEFINE_STRING_MAPPING(PseudoBlinkInternalElement) ++ DEFINE_STRING_MAPPING(PseudoCue) ++ DEFINE_STRING_MAPPING(PseudoFutureCue) ++ DEFINE_STRING_MAPPING(PseudoPastCue) ++ DEFINE_STRING_MAPPING(PseudoUnresolved) ++ DEFINE_STRING_MAPPING(PseudoDefined) ++ DEFINE_STRING_MAPPING(PseudoContent) ++ DEFINE_STRING_MAPPING(PseudoHost) ++ DEFINE_STRING_MAPPING(PseudoHostContext) ++ DEFINE_STRING_MAPPING(PseudoShadow) ++ DEFINE_STRING_MAPPING(PseudoSlotted) ++ DEFINE_STRING_MAPPING(PseudoSpatialNavigationFocus) ++ DEFINE_STRING_MAPPING(PseudoListBox) ++ DEFINE_STRING_MAPPING(PseudoHostHasAppearance) ++ DEFINE_STRING_MAPPING(PseudoVideoPersistent) ++ DEFINE_STRING_MAPPING(PseudoVideoPersistentAncestor) + #undef DEFINE_STRING_MAPPING + } + +diff --git a/third_party/WebKit/Source/core/inspector/inspector_protocol_config.json b/third_party/WebKit/Source/core/inspector/inspector_protocol_config.json +index 38cb078e43f6..21048f15f2be 100644 +--- a/third_party/WebKit/Source/core/inspector/inspector_protocol_config.json ++++ b/third_party/WebKit/Source/core/inspector/inspector_protocol_config.json +@@ -102,8 +102,8 @@ + + "imported": { + "header": "<v8-inspector-protocol.h>", +- "to_imported_string": "toV8InspectorStringView(%s)", +- "from_imported_string": "toCoreString(%s)", ++ "to_imported_string": "ToV8InspectorStringView(%s)", ++ "from_imported_string": "ToCoreString(%s)", + "namespace": ["v8_inspector", "protocol"], + "options": [ + { +diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h +index 5f55f5210e08..1147cb93f891 100644 +--- a/third_party/WebKit/Source/core/layout/LayoutObject.h ++++ b/third_party/WebKit/Source/core/layout/LayoutObject.h +@@ -2229,54 +2229,54 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver, + // https://codereview.chromium.org/44673003 and subsequent relaxations + // of the memory constraints on layout objects. + LayoutObjectBitfields(Node* node) +- : m_selfNeedsLayout(false), +- m_needsPositionedMovementLayout(false), +- m_normalChildNeedsLayout(false), +- m_posChildNeedsLayout(false), +- m_needsSimplifiedNormalFlowLayout(false), +- m_selfNeedsOverflowRecalcAfterStyleChange(false), +- m_childNeedsOverflowRecalcAfterStyleChange(false), +- m_preferredLogicalWidthsDirty(false), +- m_mayNeedPaintInvalidation(false), +- m_mayNeedPaintInvalidationSubtree(false), +- m_mayNeedPaintInvalidationAnimatedBackgroundImage(false), +- m_needsPaintOffsetAndVisualRectUpdate(false), +- m_shouldInvalidateSelection(false), +- m_floating(false), +- m_isAnonymous(!node), +- m_isText(false), +- m_isBox(false), +- m_isInline(true), +- m_isAtomicInlineLevel(false), +- m_horizontalWritingMode(true), +- m_hasLayer(false), +- m_hasOverflowClip(false), +- m_hasTransformRelatedProperty(false), +- m_hasReflection(false), +- m_canContainFixedPositionObjects(false), +- m_hasCounterNodeMap(false), +- m_everHadLayout(false), +- m_ancestorLineBoxDirty(false), +- m_isInsideFlowThread(false), +- m_subtreeChangeListenerRegistered(false), +- m_notifiedOfSubtreeChange(false), +- m_consumesSubtreeChangeNotification(false), +- m_childrenInline(false), +- m_containsInlineWithOutlineAndContinuation(false), +- m_alwaysCreateLineBoxesForLayoutInline(false), +- m_previousBackgroundObscured(false), +- m_isBackgroundAttachmentFixedObject(false), +- m_isScrollAnchorObject(false), +- m_scrollAnchorDisablingStyleChanged(false), +- m_hasBoxDecorationBackground(false), +- m_hasPreviousLocationInBacking(false), +- m_hasPreviousSelectionVisualRect(false), +- m_needsPaintPropertyUpdate(true), +- m_subtreeNeedsPaintPropertyUpdate(true), +- m_descendantNeedsPaintPropertyUpdate(true), +- m_backgroundChangedSinceLastPaintInvalidation(false), +- m_outlineMayBeAffectedByDescendants(false), +- m_previousOutlineMayBeAffectedByDescendants(false), ++ : m_SelfNeedsLayout(false), ++ m_NeedsPositionedMovementLayout(false), ++ m_NormalChildNeedsLayout(false), ++ m_PosChildNeedsLayout(false), ++ m_NeedsSimplifiedNormalFlowLayout(false), ++ m_SelfNeedsOverflowRecalcAfterStyleChange(false), ++ m_ChildNeedsOverflowRecalcAfterStyleChange(false), ++ m_PreferredLogicalWidthsDirty(false), ++ m_MayNeedPaintInvalidation(false), ++ m_MayNeedPaintInvalidationSubtree(false), ++ m_MayNeedPaintInvalidationAnimatedBackgroundImage(false), ++ m_NeedsPaintOffsetAndVisualRectUpdate(false), ++ m_ShouldInvalidateSelection(false), ++ m_Floating(false), ++ m_IsAnonymous(!node), ++ m_IsText(false), ++ m_IsBox(false), ++ m_IsInline(true), ++ m_IsAtomicInlineLevel(false), ++ m_HorizontalWritingMode(true), ++ m_HasLayer(false), ++ m_HasOverflowClip(false), ++ m_HasTransformRelatedProperty(false), ++ m_HasReflection(false), ++ m_CanContainFixedPositionObjects(false), ++ m_HasCounterNodeMap(false), ++ m_EverHadLayout(false), ++ m_AncestorLineBoxDirty(false), ++ m_IsInsideFlowThread(false), ++ m_SubtreeChangeListenerRegistered(false), ++ m_NotifiedOfSubtreeChange(false), ++ m_ConsumesSubtreeChangeNotification(false), ++ m_ChildrenInline(false), ++ m_ContainsInlineWithOutlineAndContinuation(false), ++ m_AlwaysCreateLineBoxesForLayoutInline(false), ++ m_PreviousBackgroundObscured(false), ++ m_IsBackgroundAttachmentFixedObject(false), ++ m_IsScrollAnchorObject(false), ++ m_ScrollAnchorDisablingStyleChanged(false), ++ m_HasBoxDecorationBackground(false), ++ m_HasPreviousLocationInBacking(false), ++ m_HasPreviousSelectionVisualRect(false), ++ m_NeedsPaintPropertyUpdate(true), ++ m_SubtreeNeedsPaintPropertyUpdate(true), ++ m_DescendantNeedsPaintPropertyUpdate(true), ++ m_BackgroundChangedSinceLastPaintInvalidation(false), ++ m_OutlineMayBeAffectedByDescendants(false), ++ m_PreviousOutlineMayBeAffectedByDescendants(false), + positioned_state_(kIsStaticallyPositioned), + selection_state_(SelectionNone), + background_obscuration_state_(kBackgroundObscurationStatusInvalid), +diff --git a/third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp b/third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp +index 8d498b37e744..200d756df488 100644 +--- a/third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp ++++ b/third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp +@@ -88,7 +88,7 @@ void RenderingTest::LoadAhem() { + ScriptState* script_state = ToScriptStateForMainWorld(&page_holder_->GetFrame()); + DummyExceptionStateForTesting exception_state; + FontFaceSet::From(GetDocument()) +- ->AddForBinding(script_state, ahem, exception_state); ++ ->addForBinding(script_state, ahem, exception_state); + } + + } // namespace blink +diff --git a/third_party/WebKit/Source/core/layout/line/InlineBox.h b/third_party/WebKit/Source/core/layout/line/InlineBox.h +index 78d4dce988ab..bd405ba086c8 100644 +--- a/third_party/WebKit/Source/core/layout/line/InlineBox.h ++++ b/third_party/WebKit/Source/core/layout/line/InlineBox.h +@@ -407,19 +407,19 @@ class CORE_EXPORT InlineBox : public DisplayItemClient { + bool dirty = false, + bool extracted = false, + bool is_horizontal = true) +- : m_firstLine(first_line), +- m_constructed(constructed), ++ : m_FirstLine(first_line), ++ m_Constructed(constructed), + bidi_embedding_level_(0), +- m_dirty(dirty), +- m_extracted(extracted), +- m_hasVirtualLogicalHeight(false), +- m_isHorizontal(is_horizontal), +- m_endsWithBreak(false), +- m_hasSelectedChildrenOrCanHaveLeadingExpansion(false), +- m_knownToHaveNoOverflow(true), +- m_hasEllipsisBoxOrHyphen(false), +- m_dirOverride(false), +- m_isText(false), ++ m_Dirty(dirty), ++ m_Extracted(extracted), ++ m_HasVirtualLogicalHeight(false), ++ m_IsHorizontal(is_horizontal), ++ m_EndsWithBreak(false), ++ m_HasSelectedChildrenOrCanHaveLeadingExpansion(false), ++ m_KnownToHaveNoOverflow(true), ++ m_HasEllipsisBoxOrHyphen(false), ++ m_DirOverride(false), ++ m_IsText(false), + expansion_(0) {} + + // Some of these bits are actually for subclasses and moved here to compact +diff --git a/third_party/WebKit/Source/core/loader/resource/CSSStyleSheetResource.h b/third_party/WebKit/Source/core/loader/resource/CSSStyleSheetResource.h +index 44f9e1a034d6..4855e8ed0855 100644 +--- a/third_party/WebKit/Source/core/loader/resource/CSSStyleSheetResource.h ++++ b/third_party/WebKit/Source/core/loader/resource/CSSStyleSheetResource.h +@@ -92,7 +92,7 @@ class CORE_EXPORT CSSStyleSheetResource final : public StyleSheetResource { + bool did_notify_first_data_; + }; + +-DEFINE_RESOURCE_TYPE_CASTS(kCSSStyleSheet); ++DEFINE_RESOURCE_TYPE_CASTS(CSSStyleSheet); + + } // namespace blink + +diff --git a/third_party/WebKit/Source/core/loader/resource/FontResource.h b/third_party/WebKit/Source/core/loader/resource/FontResource.h +index f0cdf91d5b54..016f5d11e432 100644 +--- a/third_party/WebKit/Source/core/loader/resource/FontResource.h ++++ b/third_party/WebKit/Source/core/loader/resource/FontResource.h +@@ -110,7 +110,7 @@ class CORE_EXPORT FontResource final : public Resource { + FRIEND_TEST_ALL_PREFIXES(FontResourceTest, CacheAwareFontLoading); + }; + +-DEFINE_RESOURCE_TYPE_CASTS(kFont); ++DEFINE_RESOURCE_TYPE_CASTS(Font); + + class FontResourceClient : public ResourceClient { + public: +diff --git a/third_party/WebKit/Source/core/loader/resource/ImageResource.h b/third_party/WebKit/Source/core/loader/resource/ImageResource.h +index 272e1bba1051..fd36a598c38d 100644 +--- a/third_party/WebKit/Source/core/loader/resource/ImageResource.h ++++ b/third_party/WebKit/Source/core/loader/resource/ImageResource.h +@@ -172,7 +172,7 @@ class CORE_EXPORT ImageResource final + double last_flush_time_ = 0.; + }; + +-DEFINE_RESOURCE_TYPE_CASTS(kImage); ++DEFINE_RESOURCE_TYPE_CASTS(Image); + + } // namespace blink + +diff --git a/third_party/WebKit/Source/core/loader/resource/ScriptResource.h b/third_party/WebKit/Source/core/loader/resource/ScriptResource.h +index 44b5ebc0ff21..e376ee78550e 100644 +--- a/third_party/WebKit/Source/core/loader/resource/ScriptResource.h ++++ b/third_party/WebKit/Source/core/loader/resource/ScriptResource.h +@@ -97,7 +97,7 @@ class CORE_EXPORT ScriptResource final : public TextResource { + AtomicString script_; + }; + +-DEFINE_RESOURCE_TYPE_CASTS(kScript); ++DEFINE_RESOURCE_TYPE_CASTS(Script); + + } // namespace blink + +diff --git a/third_party/WebKit/Source/core/loader/resource/XSLStyleSheetResource.h b/third_party/WebKit/Source/core/loader/resource/XSLStyleSheetResource.h +index 1dcf14feec6a..51375c6d2eb8 100644 +--- a/third_party/WebKit/Source/core/loader/resource/XSLStyleSheetResource.h ++++ b/third_party/WebKit/Source/core/loader/resource/XSLStyleSheetResource.h +@@ -63,7 +63,7 @@ class XSLStyleSheetResource final : public StyleSheetResource { + String sheet_; + }; + +-DEFINE_RESOURCE_TYPE_CASTS(kXSLStyleSheet); ++DEFINE_RESOURCE_TYPE_CASTS(XSLStyleSheet); + + } // namespace blink + +diff --git a/third_party/WebKit/Source/core/page/ChromeClient.h b/third_party/WebKit/Source/core/page/ChromeClient.h +index 568eb8d0c4f8..6587f1dfa15a 100644 +--- a/third_party/WebKit/Source/core/page/ChromeClient.h ++++ b/third_party/WebKit/Source/core/page/ChromeClient.h +@@ -45,6 +45,9 @@ + #include "wtf/Vector.h" + #include <memory> + ++// To avoid conflicts with the CreateWindow macro from the Windows SDK... ++#undef CreateWindow ++ + namespace blink { + + class AXObject; +diff --git a/third_party/WebKit/Source/core/page/CreateWindow.h b/third_party/WebKit/Source/core/page/CreateWindow.h +index 297d5a0d9615..9772bc1c5b86 100644 +--- a/third_party/WebKit/Source/core/page/CreateWindow.h ++++ b/third_party/WebKit/Source/core/page/CreateWindow.h +@@ -32,6 +32,9 @@ + #include "core/loader/NavigationPolicy.h" + #include "wtf/text/WTFString.h" + ++// To avoid conflicts with the CreateWindow macro from the Windows SDK... ++#undef CreateWindow ++ + namespace blink { + class LocalFrame; + struct FrameLoadRequest; +diff --git a/third_party/WebKit/Source/core/page/PagePopup.h b/third_party/WebKit/Source/core/page/PagePopup.h +index f7b480aad62f..649e154e6bc1 100644 +--- a/third_party/WebKit/Source/core/page/PagePopup.h ++++ b/third_party/WebKit/Source/core/page/PagePopup.h +@@ -33,6 +33,9 @@ + + #include "wtf/Forward.h" + ++// To avoid conflicts with the CreateWindow macro from the Windows SDK... ++#undef PostMessage ++ + namespace blink { + + class AXObject; +diff --git a/third_party/WebKit/Source/core/paint/FloatClipRecorder.cpp b/third_party/WebKit/Source/core/paint/FloatClipRecorder.cpp +index 0273b109d3b6..14dd76de78b8 100644 +--- a/third_party/WebKit/Source/core/paint/FloatClipRecorder.cpp ++++ b/third_party/WebKit/Source/core/paint/FloatClipRecorder.cpp +@@ -27,7 +27,7 @@ FloatClipRecorder::~FloatClipRecorder() { + if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) + return; + DisplayItem::Type end_type = +- DisplayItem::floatClipTypeToEndFloatClipType(clip_type_); ++ DisplayItem::FloatClipTypeToEndFloatClipType(clip_type_); + context_.GetPaintController().EndItem<EndFloatClipDisplayItem>(client_, + end_type); + } +diff --git a/third_party/WebKit/Source/core/paint/ScrollRecorder.cpp b/third_party/WebKit/Source/core/paint/ScrollRecorder.cpp +index 1e67ae227bc5..7398947b76b7 100644 +--- a/third_party/WebKit/Source/core/paint/ScrollRecorder.cpp ++++ b/third_party/WebKit/Source/core/paint/ScrollRecorder.cpp +@@ -34,7 +34,7 @@ ScrollRecorder::~ScrollRecorder() { + if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) + return; + context_.GetPaintController().EndItem<EndScrollDisplayItem>( +- client_, DisplayItem::scrollTypeToEndScrollType(begin_item_type_)); ++ client_, DisplayItem::ScrollTypeToEndScrollType(begin_item_type_)); + } + + } // namespace blink +diff --git a/third_party/WebKit/Source/core/paint/Transform3DRecorder.cpp b/third_party/WebKit/Source/core/paint/Transform3DRecorder.cpp +index a272c772c4d7..dfcc4733477b 100644 +--- a/third_party/WebKit/Source/core/paint/Transform3DRecorder.cpp ++++ b/third_party/WebKit/Source/core/paint/Transform3DRecorder.cpp +@@ -35,7 +35,7 @@ Transform3DRecorder::~Transform3DRecorder() { + return; + + context_.GetPaintController().EndItem<EndTransform3DDisplayItem>( +- client_, DisplayItem::transform3DTypeToEndTransform3DType(type_)); ++ client_, DisplayItem::Transform3DTypeToEndTransform3DType(type_)); + } + + } // namespace blink +diff --git a/third_party/WebKit/Source/core/style/BasicShapes.h b/third_party/WebKit/Source/core/style/BasicShapes.h +index 0e3d555e1b22..ab6bf9c254c0 100644 +--- a/third_party/WebKit/Source/core/style/BasicShapes.h ++++ b/third_party/WebKit/Source/core/style/BasicShapes.h +@@ -75,8 +75,8 @@ class CORE_EXPORT BasicShape : public RefCounted<BasicShape> { + + #define DEFINE_BASICSHAPE_TYPE_CASTS(thisType) \ + DEFINE_TYPE_CASTS(thisType, BasicShape, value, \ +- value->GetType() == BasicShape::thisType##Type, \ +- value.GetType() == BasicShape::thisType##Type) ++ value->GetType() == BasicShape::k##thisType##Type, \ ++ value.GetType() == BasicShape::k##thisType##Type) + + class BasicShapeCenterCoordinate { + DISALLOW_NEW(); +diff --git a/third_party/WebKit/Source/core/svg/SVGFEBlendElement.cpp b/third_party/WebKit/Source/core/svg/SVGFEBlendElement.cpp +index dfc440948244..64e1161adad6 100644 +--- a/third_party/WebKit/Source/core/svg/SVGFEBlendElement.cpp ++++ b/third_party/WebKit/Source/core/svg/SVGFEBlendElement.cpp +@@ -28,8 +28,8 @@ namespace blink { + + static WebBlendMode ToWebBlendMode(SVGFEBlendElement::Mode mode) { + #define MAP_BLEND_MODE(MODENAME) \ +- case SVGFEBlendElement::Mode##MODENAME: \ +- return WebBlendMode##MODENAME ++ case SVGFEBlendElement::kMode##MODENAME: \ ++ return kWebBlendMode##MODENAME + + switch (mode) { + MAP_BLEND_MODE(Normal); +diff --git a/third_party/WebKit/Source/core/svg/SVGLengthContext.h b/third_party/WebKit/Source/core/svg/SVGLengthContext.h +index c8a9ca8cd295..c42e8f604f9f 100644 +--- a/third_party/WebKit/Source/core/svg/SVGLengthContext.h ++++ b/third_party/WebKit/Source/core/svg/SVGLengthContext.h +@@ -45,9 +45,9 @@ class SVGLengthContext { + SVGUnitTypes::SVGUnitType type, + const FloatRect& viewport) { + return ResolveRectangle( +- context, type, viewport, *context->X()->CurrentValue(), +- *context->Y()->CurrentValue(), *context->Width()->CurrentValue(), +- *context->Height()->CurrentValue()); ++ context, type, viewport, *context->x()->CurrentValue(), ++ *context->y()->CurrentValue(), *context->width()->CurrentValue(), ++ *context->height()->CurrentValue()); + } + + static FloatRect ResolveRectangle(const SVGElement*, +diff --git a/third_party/WebKit/Source/core/svg/SVGViewSpec.h b/third_party/WebKit/Source/core/svg/SVGViewSpec.h +index d54520897601..dc614883fb4e 100644 +--- a/third_party/WebKit/Source/core/svg/SVGViewSpec.h ++++ b/third_party/WebKit/Source/core/svg/SVGViewSpec.h +@@ -66,15 +66,15 @@ class SVGViewSpec final : public GarbageCollectedFinalized<SVGViewSpec>, + template <typename T> + void SVGViewSpec::InheritViewAttributesFromElement(T& inherit_from_element) { + if (inherit_from_element.HasValidViewBox()) +- SetViewBox(inherit_from_element.ViewBox()->CurrentValue()->Value()); ++ SetViewBox(inherit_from_element.viewBox()->CurrentValue()->Value()); + +- if (inherit_from_element.PreserveAspectRatio()->IsSpecified()) { ++ if (inherit_from_element.preserveAspectRatio()->IsSpecified()) { + SetPreserveAspectRatio( +- *inherit_from_element.PreserveAspectRatio()->CurrentValue()); ++ *inherit_from_element.preserveAspectRatio()->CurrentValue()); + } + +- if (inherit_from_element.HasAttribute(SVGNames::zoomAndPanAttr)) +- setZoomAndPan(inherit_from_element.ZoomAndPan()); ++ if (inherit_from_element.hasAttribute(SVGNames::zoomAndPanAttr)) ++ setZoomAndPan(inherit_from_element.zoomAndPan()); + } + + } // namespace blink +diff --git a/third_party/WebKit/Source/core/svg/properties/SVGAnimatedProperty.h b/third_party/WebKit/Source/core/svg/properties/SVGAnimatedProperty.h +index b5f360a14e5d..193e44b6f1eb 100644 +--- a/third_party/WebKit/Source/core/svg/properties/SVGAnimatedProperty.h ++++ b/third_party/WebKit/Source/core/svg/properties/SVGAnimatedProperty.h +@@ -196,12 +196,12 @@ class SVGAnimatedProperty : public SVGAnimatedPropertyCommon<Property> { + base_value_updated_ = true; + + DCHECK(this->AttributeName() != QualifiedName::Null()); +- this->ContextElement()->InvalidateSVGAttributes(); +- this->ContextElement()->SvgAttributeBaseValChanged(this->AttributeName()); ++ this->contextElement()->InvalidateSVGAttributes(); ++ this->contextElement()->SvgAttributeBaseValChanged(this->AttributeName()); + } + + PrimitiveType animVal() { +- this->ContextElement()->EnsureAttributeAnimValUpdated(); ++ this->contextElement()->EnsureAttributeAnimValUpdated(); + return this->CurrentValue()->Value(); + } + +@@ -260,7 +260,7 @@ class SVGAnimatedProperty<Property, TearOffType, void> + virtual TearOffType* baseVal() { + if (!base_val_tear_off_) { + base_val_tear_off_ = +- TearOffType::Create(this->BaseValue(), this->ContextElement(), ++ TearOffType::Create(this->BaseValue(), this->contextElement(), + kPropertyIsNotAnimVal, this->AttributeName()); + } + return base_val_tear_off_; +@@ -269,7 +269,7 @@ class SVGAnimatedProperty<Property, TearOffType, void> + TearOffType* animVal() { + if (!anim_val_tear_off_) { + anim_val_tear_off_ = +- TearOffType::Create(this->CurrentValue(), this->ContextElement(), ++ TearOffType::Create(this->CurrentValue(), this->contextElement(), + kPropertyIsAnimVal, this->AttributeName()); + } + return anim_val_tear_off_; +diff --git a/third_party/WebKit/Source/core/testing/InternalSettings.cpp b/third_party/WebKit/Source/core/testing/InternalSettings.cpp +index 401a8ae6ed9e..6473d431735a 100644 +--- a/third_party/WebKit/Source/core/testing/InternalSettings.cpp ++++ b/third_party/WebKit/Source/core/testing/InternalSettings.cpp +@@ -370,7 +370,7 @@ void InternalSettings::setDefaultVideoPosterURL( + } + + DEFINE_TRACE(InternalSettings) { +- InternalSettingsGenerated::trace(visitor); ++ InternalSettingsGenerated::Trace(visitor); + Supplement<Page>::Trace(visitor); + } + +diff --git a/third_party/WebKit/Source/core/timing/PerformanceBaseTest.cpp b/third_party/WebKit/Source/core/timing/PerformanceBaseTest.cpp +index f64d3b25b1b8..a39be84bffb6 100644 +--- a/third_party/WebKit/Source/core/timing/PerformanceBaseTest.cpp ++++ b/third_party/WebKit/Source/core/timing/PerformanceBaseTest.cpp +@@ -46,7 +46,7 @@ class PerformanceBaseTest : public ::testing::Test { + v8::Local<v8::Function> callback = + v8::Function::New(script_state->GetContext(), nullptr).ToLocalChecked(); + base_ = new TestPerformanceBase(script_state); +- cb_ = PerformanceObserverCallback::create(script_state, callback); ++ cb_ = PerformanceObserverCallback::Create(script_state, callback); + observer_ = PerformanceObserver::Create(script_state->GetExecutionContext(), + base_, cb_); + } +diff --git a/third_party/WebKit/Source/core/timing/PerformanceObserverTest.cpp b/third_party/WebKit/Source/core/timing/PerformanceObserverTest.cpp +index f869b60bf9fd..0e345a1ee341 100644 +--- a/third_party/WebKit/Source/core/timing/PerformanceObserverTest.cpp ++++ b/third_party/WebKit/Source/core/timing/PerformanceObserverTest.cpp +@@ -33,7 +33,7 @@ class PerformanceObserverTest : public ::testing::Test { + v8::Local<v8::Function> callback = + v8::Function::New(script_state->GetContext(), nullptr).ToLocalChecked(); + base_ = new MockPerformanceBase(script_state); +- cb_ = PerformanceObserverCallback::create(script_state, callback); ++ cb_ = PerformanceObserverCallback::Create(script_state, callback); + observer_ = PerformanceObserver::Create(script_state->GetExecutionContext(), + base_, cb_); + } +diff --git a/third_party/WebKit/Source/core/xml/XPathGrammar.y b/third_party/WebKit/Source/core/xml/XPathGrammar.y +index 28d326b48ac4..2b0737fc171e 100644 +--- a/third_party/WebKit/Source/core/xml/XPathGrammar.y ++++ b/third_party/WebKit/Source/core/xml/XPathGrammar.y +@@ -38,11 +38,11 @@ + + void* yyFastMalloc(size_t size) + { +- return WTF::Partitions::fastMalloc(size, nullptr); ++ return WTF::Partitions::FastMalloc(size, nullptr); + } + + #define YYMALLOC yyFastMalloc +-#define YYFREE WTF::Partitions::fastFree ++#define YYFREE WTF::Partitions::FastFree + + #define YYENABLE_NLS 0 + #define YYLTYPE_IS_TRIVIAL 1 +@@ -73,7 +73,7 @@ using namespace XPath; + + %{ + +-static int xpathyylex(YYSTYPE* yylval) { return Parser::current()->lex(yylval); } ++static int xpathyylex(YYSTYPE* yylval) { return Parser::Current()->Lex(yylval); } + static void xpathyyerror(void*, const char*) { } + + %} +@@ -121,19 +121,19 @@ static void xpathyyerror(void*, const char*) { } + Expr: + OrExpr + { +- parser->m_topExpr = $1; ++ parser->top_expr_ = $1; + } + ; + + LocationPath: + RelativeLocationPath + { +- $$->setAbsolute(false); ++ $$->SetAbsolute(false); + } + | + AbsoluteLocationPath + { +- $$->setAbsolute(true); ++ $$->SetAbsolute(true); + } + ; + +@@ -151,7 +151,7 @@ AbsoluteLocationPath: + DescendantOrSelf RelativeLocationPath + { + $$ = $2; +- $$->insertFirstStep($1); ++ $$->InsertFirstStep($1); + } + ; + +@@ -159,18 +159,18 @@ RelativeLocationPath: + Step + { + $$ = new LocationPath; +- $$->appendStep($1); ++ $$->AppendStep($1); + } + | + RelativeLocationPath '/' Step + { +- $$->appendStep($3); ++ $$->AppendStep($3); + } + | + RelativeLocationPath DescendantOrSelf Step + { +- $$->appendStep($2); +- $$->appendStep($3); ++ $$->AppendStep($2); ++ $$->AppendStep($3); + } + ; + +@@ -178,25 +178,25 @@ Step: + NodeTest OptionalPredicateList + { + if ($2) +- $$ = new Step(Step::ChildAxis, *$1, *$2); ++ $$ = new Step(Step::kChildAxis, *$1, *$2); + else +- $$ = new Step(Step::ChildAxis, *$1); ++ $$ = new Step(Step::kChildAxis, *$1); + } + | + NAMETEST OptionalPredicateList + { + AtomicString localName; + AtomicString namespaceURI; +- if (!parser->expandQName(*$1, localName, namespaceURI)) { +- parser->m_gotNamespaceError = true; ++ if (!parser->ExpandQName(*$1, localName, namespaceURI)) { ++ parser->got_namespace_error_ = true; + YYABORT; + } + + if ($2) +- $$ = new Step(Step::ChildAxis, Step::NodeTest(Step::NodeTest::NameTest, localName, namespaceURI), *$2); ++ $$ = new Step(Step::kChildAxis, Step::NodeTest(Step::NodeTest::kNameTest, localName, namespaceURI), *$2); + else +- $$ = new Step(Step::ChildAxis, Step::NodeTest(Step::NodeTest::NameTest, localName, namespaceURI)); +- parser->deleteString($1); ++ $$ = new Step(Step::kChildAxis, Step::NodeTest(Step::NodeTest::kNameTest, localName, namespaceURI)); ++ parser->DeleteString($1); + } + | + AxisSpecifier NodeTest OptionalPredicateList +@@ -211,16 +211,16 @@ Step: + { + AtomicString localName; + AtomicString namespaceURI; +- if (!parser->expandQName(*$2, localName, namespaceURI)) { +- parser->m_gotNamespaceError = true; ++ if (!parser->ExpandQName(*$2, localName, namespaceURI)) { ++ parser->got_namespace_error_ = true; + YYABORT; + } + + if ($3) +- $$ = new Step($1, Step::NodeTest(Step::NodeTest::NameTest, localName, namespaceURI), *$3); ++ $$ = new Step($1, Step::NodeTest(Step::NodeTest::kNameTest, localName, namespaceURI), *$3); + else +- $$ = new Step($1, Step::NodeTest(Step::NodeTest::NameTest, localName, namespaceURI)); +- parser->deleteString($2); ++ $$ = new Step($1, Step::NodeTest(Step::NodeTest::kNameTest, localName, namespaceURI)); ++ parser->DeleteString($2); + } + | + AbbreviatedStep +@@ -231,7 +231,7 @@ AxisSpecifier: + | + '@' + { +- $$ = Step::AttributeAxis; ++ $$ = Step::kAttributeAxis; + } + ; + +@@ -239,26 +239,26 @@ NodeTest: + NODETYPE '(' ')' + { + if (*$1 == "node") +- $$ = new Step::NodeTest(Step::NodeTest::AnyNodeTest); ++ $$ = new Step::NodeTest(Step::NodeTest::kAnyNodeTest); + else if (*$1 == "text") +- $$ = new Step::NodeTest(Step::NodeTest::TextNodeTest); ++ $$ = new Step::NodeTest(Step::NodeTest::kTextNodeTest); + else if (*$1 == "comment") +- $$ = new Step::NodeTest(Step::NodeTest::CommentNodeTest); ++ $$ = new Step::NodeTest(Step::NodeTest::kCommentNodeTest); + +- parser->deleteString($1); ++ parser->DeleteString($1); + } + | + PI '(' ')' + { +- $$ = new Step::NodeTest(Step::NodeTest::ProcessingInstructionNodeTest); +- parser->deleteString($1); ++ $$ = new Step::NodeTest(Step::NodeTest::kProcessingInstructionNodeTest); ++ parser->DeleteString($1); + } + | + PI '(' LITERAL ')' + { +- $$ = new Step::NodeTest(Step::NodeTest::ProcessingInstructionNodeTest, $3->stripWhiteSpace()); +- parser->deleteString($1); +- parser->deleteString($3); ++ $$ = new Step::NodeTest(Step::NodeTest::kProcessingInstructionNodeTest, $3->StripWhiteSpace()); ++ parser->DeleteString($1); ++ parser->DeleteString($3); + } + ; + +@@ -294,19 +294,19 @@ Predicate: + DescendantOrSelf: + SLASHSLASH + { +- $$ = new Step(Step::DescendantOrSelfAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest)); ++ $$ = new Step(Step::kDescendantOrSelfAxis, Step::NodeTest(Step::NodeTest::kAnyNodeTest)); + } + ; + + AbbreviatedStep: + '.' + { +- $$ = new Step(Step::SelfAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest)); ++ $$ = new Step(Step::kSelfAxis, Step::NodeTest(Step::NodeTest::kAnyNodeTest)); + } + | + DOTDOT + { +- $$ = new Step(Step::ParentAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest)); ++ $$ = new Step(Step::kParentAxis, Step::NodeTest(Step::NodeTest::kAnyNodeTest)); + } + ; + +@@ -314,7 +314,7 @@ PrimaryExpr: + VARIABLEREFERENCE + { + $$ = new VariableReference(*$1); +- parser->deleteString($1); ++ parser->DeleteString($1); + } + | + '(' Expr ')' +@@ -325,13 +325,13 @@ PrimaryExpr: + LITERAL + { + $$ = new StringExpression(*$1); +- parser->deleteString($1); ++ parser->DeleteString($1); + } + | + NUMBER + { +- $$ = new Number($1->toDouble()); +- parser->deleteString($1); ++ $$ = new Number($1->ToDouble()); ++ parser->DeleteString($1); + } + | + FunctionCall +@@ -340,18 +340,18 @@ PrimaryExpr: + FunctionCall: + FUNCTIONNAME '(' ')' + { +- $$ = createFunction(*$1); ++ $$ = CreateFunction(*$1); + if (!$$) + YYABORT; +- parser->deleteString($1); ++ parser->DeleteString($1); + } + | + FUNCTIONNAME '(' ArgumentList ')' + { +- $$ = createFunction(*$1, *$3); ++ $$ = CreateFunction(*$1, *$3); + if (!$$) + YYABORT; +- parser->deleteString($1); ++ parser->DeleteString($1); + } + ; + +@@ -378,8 +378,8 @@ UnionExpr: + UnionExpr '|' PathExpr + { + $$ = new Union; +- $$->addSubExpression($1); +- $$->addSubExpression($3); ++ $$->AddSubExpression($1); ++ $$->AddSubExpression($3); + } + ; + +@@ -393,14 +393,14 @@ PathExpr: + | + FilterExpr '/' RelativeLocationPath + { +- $3->setAbsolute(true); ++ $3->SetAbsolute(true); + $$ = new blink::XPath::Path($1, $3); + } + | + FilterExpr DescendantOrSelf RelativeLocationPath + { +- $3->insertFirstStep($2); +- $3->setAbsolute(true); ++ $3->InsertFirstStep($2); ++ $3->SetAbsolute(true); + $$ = new blink::XPath::Path($1, $3); + } + ; +@@ -419,7 +419,7 @@ OrExpr: + | + OrExpr OR AndExpr + { +- $$ = new LogicalOp(LogicalOp::OP_Or, $1, $3); ++ $$ = new LogicalOp(LogicalOp::kOP_Or, $1, $3); + } + ; + +@@ -428,7 +428,7 @@ AndExpr: + | + AndExpr AND EqualityExpr + { +- $$ = new LogicalOp(LogicalOp::OP_And, $1, $3); ++ $$ = new LogicalOp(LogicalOp::kOP_And, $1, $3); + } + ; + +@@ -455,12 +455,12 @@ AdditiveExpr: + | + AdditiveExpr PLUS MultiplicativeExpr + { +- $$ = new NumericOp(NumericOp::OP_Add, $1, $3); ++ $$ = new NumericOp(NumericOp::kOP_Add, $1, $3); + } + | + AdditiveExpr MINUS MultiplicativeExpr + { +- $$ = new NumericOp(NumericOp::OP_Sub, $1, $3); ++ $$ = new NumericOp(NumericOp::kOP_Sub, $1, $3); + } + ; + +@@ -479,7 +479,7 @@ UnaryExpr: + MINUS UnaryExpr + { + $$ = new Negative; +- $$->addSubExpression($2); ++ $$->AddSubExpression($2); + } + ; + +diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp +index 28ae7c41c6db..c3bc1d263505 100644 +--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp ++++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp +@@ -290,7 +290,7 @@ class MockImageBufferSurfaceForOverwriteTesting + MockImageBufferSurfaceForOverwriteTesting* surface_ptr = mock_surface.get(); \ + CanvasElement().CreateImageBufferUsingSurfaceForTesting( \ + std::move(mock_surface)); \ +- EXPECT_CALL(*surface_ptr, willOverwriteCanvas()).Times(EXPECTED_OVERDRAWS); \ ++ EXPECT_CALL(*surface_ptr, WillOverwriteCanvas()).Times(EXPECTED_OVERDRAWS); \ + Context2d()->save(); + + #define TEST_OVERDRAW_FINALIZE \ +diff --git a/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.cpp b/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.cpp +index cc56a5a3a5ee..4ed52c3a2315 100644 +--- a/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.cpp ++++ b/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.cpp +@@ -110,7 +110,7 @@ void FileSystemCallbacksBase::HandleEventOrScheduleCallback(CB* callback, + WTF::Bind(&CB::handleEvent, WrapPersistent(callback), + WrapPersistent(arg))); + } else { +- callback->HandleEvent(arg); ++ callback->handleEvent(arg); + } + } + execution_context_.Clear(); +@@ -125,7 +125,7 @@ void FileSystemCallbacksBase::HandleEventOrScheduleCallback(CB* callback) { + execution_context_.Get(), + WTF::Bind(&CB::handleEvent, WrapPersistent(callback))); + } else { +- callback->HandleEvent(); ++ callback->handleEvent(); + } + } + execution_context_.Clear(); +diff --git a/third_party/WebKit/Source/modules/filesystem/SyncCallbackHelper.h b/third_party/WebKit/Source/modules/filesystem/SyncCallbackHelper.h +index 98d524d5a067..83517bd49209 100644 +--- a/third_party/WebKit/Source/modules/filesystem/SyncCallbackHelper.h ++++ b/third_party/WebKit/Source/modules/filesystem/SyncCallbackHelper.h +@@ -83,9 +83,9 @@ class SyncCallbackHelper final + return new SuccessCallbackImpl(helper); + } + +- virtual void HandleEvent() { helper_->SetError(FileError::kOK); } ++ virtual void handleEvent() { helper_->SetError(FileError::kOK); } + +- virtual void HandleEvent(CallbackArg arg) { helper_->SetResult(arg); } ++ virtual void handleEvent(CallbackArg arg) { helper_->SetResult(arg); } + + DEFINE_INLINE_TRACE() { + visitor->Trace(helper_); +diff --git a/third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp b/third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp +index bbd3197ab48d..f58777b37dfa 100644 +--- a/third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp ++++ b/third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp +@@ -60,7 +60,7 @@ static void SampleGamepads(ListType* into) { + for (unsigned i = 0; i < WebGamepads::kItemsLengthCap; ++i) { + WebGamepad& web_gamepad = gamepads.items[i]; + if (web_gamepad.connected) { +- GamepadType* gamepad = into->Item(i); ++ GamepadType* gamepad = into->item(i); + if (!gamepad) + gamepad = GamepadType::Create(); + SampleGamepad(i, *gamepad, web_gamepad); +diff --git a/third_party/WebKit/Source/modules/mediasource/SourceBuffer.cpp b/third_party/WebKit/Source/modules/mediasource/SourceBuffer.cpp +index c260269e4133..6b0d0f3cdd62 100644 +--- a/third_party/WebKit/Source/modules/mediasource/SourceBuffer.cpp ++++ b/third_party/WebKit/Source/modules/mediasource/SourceBuffer.cpp +@@ -691,7 +691,7 @@ T* FindExistingTrackById(const TrackListBase<T>& track_list, const String& id) { + // one that we had in previous init segments. + if (track_list.length() == 1) + return track_list.AnonymousIndexedGetter(0); +- return track_list.GetTrackById(id); ++ return track_list.getTrackById(id); + } + + const TrackDefault* SourceBuffer::GetTrackDefault( +diff --git a/third_party/WebKit/Source/modules/notifications/NotificationImageLoader.cpp b/third_party/WebKit/Source/modules/notifications/NotificationImageLoader.cpp +index 2febf45b01b7..d30cdba23446 100644 +--- a/third_party/WebKit/Source/modules/notifications/NotificationImageLoader.cpp ++++ b/third_party/WebKit/Source/modules/notifications/NotificationImageLoader.cpp +@@ -21,7 +21,7 @@ + #include "wtf/Threading.h" + + #define NOTIFICATION_PER_TYPE_HISTOGRAM_COUNTS(metric, type_name, value, max) \ +- case NotificationImageLoader::Type::type_name: { \ ++ case NotificationImageLoader::Type::k##type_name: { \ + DEFINE_THREAD_SAFE_STATIC_LOCAL( \ + CustomCountHistogram, metric##type_name##Histogram, \ + new CustomCountHistogram("Notifications." #metric "." #type_name, \ +@@ -32,10 +32,10 @@ + + #define NOTIFICATION_HISTOGRAM_COUNTS(metric, type, value, max) \ + switch (type) { \ +- NOTIFICATION_PER_TYPE_HISTOGRAM_COUNTS(metric, kImage, value, max) \ +- NOTIFICATION_PER_TYPE_HISTOGRAM_COUNTS(metric, kIcon, value, max) \ +- NOTIFICATION_PER_TYPE_HISTOGRAM_COUNTS(metric, kBadge, value, max) \ +- NOTIFICATION_PER_TYPE_HISTOGRAM_COUNTS(metric, kActionIcon, value, max) \ ++ NOTIFICATION_PER_TYPE_HISTOGRAM_COUNTS(metric, Image, value, max) \ ++ NOTIFICATION_PER_TYPE_HISTOGRAM_COUNTS(metric, Icon, value, max) \ ++ NOTIFICATION_PER_TYPE_HISTOGRAM_COUNTS(metric, Badge, value, max) \ ++ NOTIFICATION_PER_TYPE_HISTOGRAM_COUNTS(metric, ActionIcon, value, max) \ + } + + namespace { +diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp +index 1f8c5d845984..a23506422b51 100644 +--- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp ++++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp +@@ -132,35 +132,35 @@ static const int kCompleteTimeoutSeconds = 60; + template <typename T> + void ValidateShippingOptionOrPaymentItem(const T& item, + ExceptionState& exception_state) { +- if (!item.HasLabel() || item.Label().IsEmpty()) { ++ if (!item.hasLabel() || item.label().IsEmpty()) { + exception_state.ThrowTypeError("Item label required"); + return; + } + +- if (!item.HasAmount()) { ++ if (!item.hasAmount()) { + exception_state.ThrowTypeError("Currency amount required"); + return; + } + +- if (!item.Amount().hasCurrency()) { ++ if (!item.amount().hasCurrency()) { + exception_state.ThrowTypeError("Currency code required"); + return; + } + +- if (!item.Amount().hasValue()) { ++ if (!item.amount().hasValue()) { + exception_state.ThrowTypeError("Currency value required"); + return; + } + + String error_message; + if (!PaymentsValidators::IsValidCurrencyCodeFormat( +- item.Amount().currency(), item.Amount().currencySystem(), ++ item.amount().currency(), item.amount().currencySystem(), + &error_message)) { + exception_state.ThrowTypeError(error_message); + return; + } + +- if (!PaymentsValidators::IsValidAmountFormat(item.Amount().value(), ++ if (!PaymentsValidators::IsValidAmountFormat(item.amount().value(), + &error_message)) { + exception_state.ThrowTypeError(error_message); + return; +diff --git a/third_party/WebKit/Source/modules/payments/PaymentTestHelper.cpp b/third_party/WebKit/Source/modules/payments/PaymentTestHelper.cpp +index cf9ffa7667cb..532c643c0ef2 100644 +--- a/third_party/WebKit/Source/modules/payments/PaymentTestHelper.cpp ++++ b/third_party/WebKit/Source/modules/payments/PaymentTestHelper.cpp +@@ -45,13 +45,13 @@ void SetValues(PaymentItemOrPaymentShippingOption& original, + } + + if (data != kPaymentTestDataAmount || modification_type != kPaymentTestRemoveKey) +- original.SetAmount(item_amount); ++ original.setAmount(item_amount); + + if (data == kPaymentTestDataLabel) { + if (modification_type == kPaymentTestOverwriteValue) +- original.SetLabel(value_to_use); ++ original.setLabel(value_to_use); + } else { +- original.SetLabel("Label"); ++ original.setLabel("Label"); + } + } + +diff --git a/third_party/WebKit/Source/modules/permissions/Permissions.cpp b/third_party/WebKit/Source/modules/permissions/Permissions.cpp +index e1533dc6a1c7..1a2054d2e5de 100644 +--- a/third_party/WebKit/Source/modules/permissions/Permissions.cpp ++++ b/third_party/WebKit/Source/modules/permissions/Permissions.cpp +@@ -47,7 +47,7 @@ PermissionDescriptorPtr ParsePermission(ScriptState* script_state, + const Dictionary raw_permission, + ExceptionState& exception_state) { + PermissionDescriptor permission = +- NativeValueTraits<PermissionDescriptor>::nativeValue( ++ NativeValueTraits<PermissionDescriptor>::NativeValue( + script_state->GetIsolate(), raw_permission.V8Value(), exception_state); + + if (exception_state.HadException()) { +@@ -62,7 +62,7 @@ PermissionDescriptorPtr ParsePermission(ScriptState* script_state, + return CreatePermissionDescriptor(PermissionName::NOTIFICATIONS); + if (name == "push") { + PushPermissionDescriptor push_permission = +- NativeValueTraits<PushPermissionDescriptor>::nativeValue( ++ NativeValueTraits<PushPermissionDescriptor>::NativeValue( + script_state->GetIsolate(), raw_permission.V8Value(), exception_state); + if (exception_state.HadException()) { + exception_state.ThrowTypeError(exception_state.Message()); +@@ -81,7 +81,7 @@ PermissionDescriptorPtr ParsePermission(ScriptState* script_state, + } + if (name == "midi") { + MidiPermissionDescriptor midi_permission = +- NativeValueTraits<MidiPermissionDescriptor>::nativeValue( ++ NativeValueTraits<MidiPermissionDescriptor>::NativeValue( + script_state->GetIsolate(), raw_permission.V8Value(), exception_state); + return CreateMidiPermissionDescriptor(midi_permission.sysex()); + } +diff --git a/third_party/WebKit/Source/modules/remoteplayback/RemotePlaybackTest.cpp b/third_party/WebKit/Source/modules/remoteplayback/RemotePlaybackTest.cpp +index 51f9aef1af77..7838441ba10d 100644 +--- a/third_party/WebKit/Source/modules/remoteplayback/RemotePlaybackTest.cpp ++++ b/third_party/WebKit/Source/modules/remoteplayback/RemotePlaybackTest.cpp +@@ -235,7 +235,7 @@ TEST_F(RemotePlaybackTest, DisableRemotePlaybackCancelsAvailabilityCallbacks) { + + MockFunction* callback_function = MockFunction::Create(scope.GetScriptState()); + RemotePlaybackAvailabilityCallback* availability_callback = +- RemotePlaybackAvailabilityCallback::create(scope.GetScriptState(), ++ RemotePlaybackAvailabilityCallback::Create(scope.GetScriptState(), + callback_function->Bind()); + + // The initial call upon registering will not happen as it's posted on the +diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h +index b56e8256924d..e1fa69650bbe 100644 +--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h ++++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h +@@ -1017,7 +1017,7 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext, + + template <typename T> + IntRect GetTextureSourceSize(T* texture_source) { +- return IntRect(0, 0, texture_source->Width(), texture_source->Height()); ++ return IntRect(0, 0, texture_source->width(), texture_source->height()); + } + + template <typename T> +@@ -1031,8 +1031,8 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext, + DCHECK(function_name); + DCHECK(selecting_sub_rectangle); + DCHECK(image); +- int image_width = static_cast<int>(image->Width()); +- int image_height = static_cast<int>(image->Height()); ++ int image_width = static_cast<int>(image->width()); ++ int image_height = static_cast<int>(image->height()); + *selecting_sub_rectangle = + !(sub_rect.X() == 0 && sub_rect.Y() == 0 && + sub_rect.Width() == image_width && sub_rect.Height() == image_height); +diff --git a/third_party/WebKit/Source/platform/ColorData.gperf b/third_party/WebKit/Source/platform/ColorData.gperf +index 6bbfb4b24e9a..d7fd2dbdc21c 100644 +--- a/third_party/WebKit/Source/platform/ColorData.gperf ++++ b/third_party/WebKit/Source/platform/ColorData.gperf +@@ -180,7 +180,7 @@ yellowgreen, 0xff9acd32 + #pragma clang diagnostic pop + #endif + +-const struct NamedColor* findColor(const char* str, unsigned len) { ++const struct NamedColor* FindColor(const char* str, unsigned len) { + return ColorDataHash::findColorImpl(str, len); + } + +diff --git a/third_party/WebKit/Source/platform/Cursor.h b/third_party/WebKit/Source/platform/Cursor.h +index 73e25713cfc0..4b9fe6dd117b 100644 +--- a/third_party/WebKit/Source/platform/Cursor.h ++++ b/third_party/WebKit/Source/platform/Cursor.h +@@ -32,6 +32,9 @@ + #include "wtf/Assertions.h" + #include "wtf/RefPtr.h" + ++// To avoid conflicts with the CreateWindow macro from the Windows SDK... ++#undef CopyCursor ++ + namespace blink { + + class PLATFORM_EXPORT Cursor { +diff --git a/third_party/WebKit/Source/platform/fonts/Font.h b/third_party/WebKit/Source/platform/fonts/Font.h +index 4be370b79eab..dcb2cc2a0605 100644 +--- a/third_party/WebKit/Source/platform/fonts/Font.h ++++ b/third_party/WebKit/Source/platform/fonts/Font.h +@@ -41,6 +41,9 @@ + #include "platform/wtf/MathExtras.h" + #include "platform/wtf/text/CharacterNames.h" + ++// To avoid conflicts with the CreateWindow macro from the Windows SDK... ++#undef DrawText ++ + namespace blink { + + struct CharacterRange; +diff --git a/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp b/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp +index 5f83d92046b3..5e4cc32fa9a6 100644 +--- a/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp ++++ b/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp +@@ -461,16 +461,16 @@ const NodeType* GeometryMapper::LowestCommonAncestor(const NodeType* a, + // Explicitly instantiate the template for all supported types. This allows + // placing the template implementation in this .cpp file. See + // http://stackoverflow.com/a/488989 for more. +-template const EffectPaintPropertyNode* GeometryMapper::lowestCommonAncestor( ++template const EffectPaintPropertyNode* GeometryMapper::LowestCommonAncestor( + const EffectPaintPropertyNode*, + const EffectPaintPropertyNode*); +-template const TransformPaintPropertyNode* GeometryMapper::lowestCommonAncestor( ++template const TransformPaintPropertyNode* GeometryMapper::LowestCommonAncestor( + const TransformPaintPropertyNode*, + const TransformPaintPropertyNode*); +-template const ClipPaintPropertyNode* GeometryMapper::lowestCommonAncestor( ++template const ClipPaintPropertyNode* GeometryMapper::LowestCommonAncestor( + const ClipPaintPropertyNode*, + const ClipPaintPropertyNode*); +-template const ScrollPaintPropertyNode* GeometryMapper::lowestCommonAncestor( ++template const ScrollPaintPropertyNode* GeometryMapper::LowestCommonAncestor( + const ScrollPaintPropertyNode*, + const ScrollPaintPropertyNode*); + +diff --git a/third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTest.cpp b/third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTest.cpp +index 42e697888294..74a849fa5f41 100644 +--- a/third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTest.cpp ++++ b/third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTest.cpp +@@ -108,23 +108,23 @@ const static float kTestEpsilon = 1e-6; + #define CHECK_MAPPINGS(inputRect, expectedVisualRect, expectedTransformedRect, \ + expectedTransformToAncestor, \ + expectedClipInAncestorSpace, localPropertyTreeState, \ +- ancestorPropertyTreeState, hasRadius) \ ++ ancestorPropertyTreeState) \ + do { \ + FloatClipRect float_rect(inputRect); \ + GeometryMapper::LocalToAncestorVisualRect( \ + localPropertyTreeState, ancestorPropertyTreeState, float_rect); \ + EXPECT_RECT_EQ(expectedVisualRect, float_rect.Rect()); \ +- EXPECT_EQ(hasRadius, float_rect.hasRadius()); \ ++ EXPECT_EQ(has_radius, float_rect.HasRadius()); \ + FloatClipRect float_clip_rect; \ + float_clip_rect = GeometryMapper::LocalToAncestorClipRect( \ + localPropertyTreeState, ancestorPropertyTreeState); \ +- EXPECT_EQ(hasRadius, float_clip_rect.hasRadius()); \ ++ EXPECT_EQ(has_radius, float_clip_rect.HasRadius()); \ + EXPECT_CLIP_RECT_EQ(expectedClipInAncestorSpace, float_clip_rect); \ + float_rect.SetRect(inputRect); \ + GeometryMapper::SourceToDestinationVisualRect( \ + localPropertyTreeState, ancestorPropertyTreeState, float_rect); \ + EXPECT_RECT_EQ(expectedVisualRect, float_rect.Rect()); \ +- EXPECT_EQ(hasRadius, float_rect.hasRadius()); \ ++ EXPECT_EQ(has_radius, float_rect.HasRadius()); \ + FloatRect test_mapped_rect = inputRect; \ + GeometryMapper::LocalToAncestorRect(localPropertyTreeState.Transform(), \ + ancestorPropertyTreeState.Transform(), \ +@@ -149,10 +149,10 @@ const static float kTestEpsilon = 1e-6; + DCHECK(output_clip_for_testing); \ + EXPECT_EQ(expectedClipInAncestorSpace, *output_clip_for_testing) \ + << "expected: " << expectedClipInAncestorSpace.Rect().ToString() \ +- << " (hasRadius: " << expectedClipInAncestorSpace.hasRadius() \ ++ << " (hasRadius: " << expectedClipInAncestorSpace.HasRadius() \ + << ") " \ + << "actual: " << output_clip_for_testing->Rect().ToString() \ +- << " (hasRadius: " << output_clip_for_testing->hasRadius() << ")"; \ ++ << " (hasRadius: " << output_clip_for_testing->HasRadius() << ")"; \ + } \ + } while (false) + +@@ -162,8 +162,7 @@ TEST_F(GeometryMapperTest, Root) { + bool has_radius = false; + CHECK_MAPPINGS(input, input, input, + TransformPaintPropertyNode::Root()->Matrix(), FloatClipRect(), +- PropertyTreeState::Root(), PropertyTreeState::Root(), +- Has_radius); ++ PropertyTreeState::Root(), PropertyTreeState::Root()); + } + + TEST_F(GeometryMapperTest, IdentityTransform) { +@@ -178,7 +177,7 @@ TEST_F(GeometryMapperTest, IdentityTransform) { + + bool has_radius = false; + CHECK_MAPPINGS(input, input, input, transform->Matrix(), FloatClipRect(), +- local_state, PropertyTreeState::Root(), Has_radius); ++ local_state, PropertyTreeState::Root()); + } + + TEST_F(GeometryMapperTest, TranslationTransform) { +@@ -195,7 +194,7 @@ TEST_F(GeometryMapperTest, TranslationTransform) { + + bool has_radius = false; + CHECK_MAPPINGS(input, output, output, transform->Matrix(), FloatClipRect(), +- local_state, PropertyTreeState::Root(), Has_radius); ++ local_state, PropertyTreeState::Root()); + + GeometryMapper::AncestorToLocalRect(TransformPaintPropertyNode::Root(), + local_state.Transform(), output); +@@ -218,7 +217,7 @@ TEST_F(GeometryMapperTest, RotationAndScaleTransform) { + + bool has_radius = false; + CHECK_MAPPINGS(input, output, output, transform_matrix, FloatClipRect(), +- local_state, PropertyTreeState::Root(), Has_radius); ++ local_state, PropertyTreeState::Root()); + } + + TEST_F(GeometryMapperTest, RotationAndScaleTransformWithTransformOrigin) { +@@ -238,7 +237,7 @@ TEST_F(GeometryMapperTest, RotationAndScaleTransformWithTransformOrigin) { + + bool has_radius = false; + CHECK_MAPPINGS(input, output, output, transform_matrix, FloatClipRect(), +- local_state, PropertyTreeState::Root(), Has_radius); ++ local_state, PropertyTreeState::Root()); + } + + TEST_F(GeometryMapperTest, NestedTransforms) { +@@ -263,7 +262,7 @@ TEST_F(GeometryMapperTest, NestedTransforms) { + + bool has_radius = false; + CHECK_MAPPINGS(input, output, output, final, FloatClipRect(), local_state, +- PropertyTreeState::Root(), Has_radius); ++ PropertyTreeState::Root()); + + // Check the cached matrix for the intermediate transform. + EXPECT_EQ(rotate_transform, *GetTransform(transform1.Get(), +@@ -293,7 +292,7 @@ TEST_F(GeometryMapperTest, NestedTransformsFlattening) { + FloatRect output = final.MapRect(input); + bool has_radius = false; + CHECK_MAPPINGS(input, output, output, final, FloatClipRect(), local_state, +- PropertyTreeState::Root(), Has_radius); ++ PropertyTreeState::Root()); + } + + TEST_F(GeometryMapperTest, NestedTransformsScaleAndTranslation) { +@@ -320,7 +319,7 @@ TEST_F(GeometryMapperTest, NestedTransformsScaleAndTranslation) { + + bool has_radius = false; + CHECK_MAPPINGS(input, output, output, final, FloatClipRect(), local_state, +- PropertyTreeState::Root(), Has_radius); ++ PropertyTreeState::Root()); + + // Check the cached matrix for the intermediate transform. + EXPECT_EQ(scale_transform, *GetTransform(transform1.Get(), +@@ -351,7 +350,7 @@ TEST_F(GeometryMapperTest, NestedTransformsIntermediateDestination) { + + bool has_radius = false; + CHECK_MAPPINGS(input, output, output, scale_transform, FloatClipRect(), +- local_state, intermediate_state, Has_radius); ++ local_state, intermediate_state); + } + + TEST_F(GeometryMapperTest, SimpleClip) { +@@ -373,7 +372,7 @@ TEST_F(GeometryMapperTest, SimpleClip) { + ->Matrix(), // Transform matrix to ancestor space + FloatClipRect(clip->ClipRect().Rect()), // Clip rect in + // ancestor space +- local_state, PropertyTreeState::Root(), Has_radius); ++ local_state, PropertyTreeState::Root()); + } + + TEST_F(GeometryMapperTest, RoundedClip) { +@@ -399,7 +398,7 @@ TEST_F(GeometryMapperTest, RoundedClip) { + TransformPaintPropertyNode::Root() + ->Matrix(), // Transform matrix to ancestor space + expected_clip, // Clip rect in ancestor space +- local_state, PropertyTreeState::Root(), Has_radius); ++ local_state, PropertyTreeState::Root()); + } + + TEST_F(GeometryMapperTest, TwoClips) { +@@ -434,7 +433,7 @@ TEST_F(GeometryMapperTest, TwoClips) { + ->Matrix(), // Transform matrix to ancestor space + clip_rect, // Clip rect in ancestor space + local_state, +- ancestor_state, Has_radius); ++ ancestor_state); + + ancestor_state.SetClip(clip1.Get()); + FloatRect output2(10, 10, 50, 50); +@@ -449,7 +448,7 @@ TEST_F(GeometryMapperTest, TwoClips) { + TransformPaintPropertyNode::Root() + ->Matrix(), // Transform matrix to ancestor space + clip_rect2, // Clip rect in ancestor space +- local_state, ancestor_state, Has_radius); ++ local_state, ancestor_state); + } + + TEST_F(GeometryMapperTest, TwoClipsTransformAbove) { +@@ -487,7 +486,7 @@ TEST_F(GeometryMapperTest, TwoClipsTransformAbove) { + ->Matrix(), // Transform matrix to ancestor space + expected_clip, // Clip rect in ancestor space + local_state, +- ancestor_state, Has_radius); ++ ancestor_state); + + expected_clip.SetRect(clip1->ClipRect().Rect()); + local_state.SetClip(clip1.Get()); +@@ -499,7 +498,7 @@ TEST_F(GeometryMapperTest, TwoClipsTransformAbove) { + ->Matrix(), // Transform matrix to ancestor space + expected_clip, // Clip rect in ancestor space + local_state, +- ancestor_state, Has_radius); ++ ancestor_state); + } + + TEST_F(GeometryMapperTest, ClipBeforeTransform) { +@@ -530,7 +529,7 @@ TEST_F(GeometryMapperTest, ClipBeforeTransform) { + rotate_transform, // Transform matrix to ancestor space + FloatClipRect(rotate_transform.MapRect( + clip->ClipRect().Rect())), // Clip rect in ancestor space +- local_state, PropertyTreeState::Root(), Has_radius); ++ local_state, PropertyTreeState::Root()); + } + + TEST_F(GeometryMapperTest, ClipAfterTransform) { +@@ -560,7 +559,7 @@ TEST_F(GeometryMapperTest, ClipAfterTransform) { + rotate_transform.MapRect(input), // Transformed rect (not clipped) + rotate_transform, // Transform matrix to ancestor space + FloatClipRect(clip->ClipRect().Rect()), // Clip rect in ancestor space +- local_state, PropertyTreeState::Root(), Has_radius); ++ local_state, PropertyTreeState::Root()); + } + + TEST_F(GeometryMapperTest, TwoClipsWithTransformBetween) { +@@ -595,7 +594,7 @@ TEST_F(GeometryMapperTest, TwoClipsWithTransformBetween) { + rotate_transform.MapRect(input), // Transformed rect (not clipped) + rotate_transform, // Transform matrix to ancestor space + FloatClipRect(clip1->ClipRect().Rect()), // Clip rect in ancestor space +- local_state, PropertyTreeState::Root(), Has_radius); ++ local_state, PropertyTreeState::Root()); + } + + { +@@ -621,7 +620,7 @@ TEST_F(GeometryMapperTest, TwoClipsWithTransformBetween) { + rotate_transform.MapRect(input), // Transformed rect (not clipped) + rotate_transform, // Transform matrix to ancestor space + FloatClipRect(mapped_clip), // Clip rect in ancestor space +- local_state, PropertyTreeState::Root(), Has_radius); ++ local_state, PropertyTreeState::Root()); + } + } + +@@ -844,7 +843,7 @@ TEST_F(GeometryMapperTest, FilterWithClipsAndTransforms) { + transform_above_effect->Matrix() * transform_below_effect->Matrix(); + CHECK_MAPPINGS(input, output, FloatRect(0, 0, 300, 300), combined_transform, + FloatClipRect(FloatRect(30, 30, 270, 270)), local_state, +- PropertyTreeState::Root(), Has_radius); ++ PropertyTreeState::Root()); + } + + TEST_F(GeometryMapperTest, ReflectionWithPaintOffset) { +@@ -866,7 +865,7 @@ TEST_F(GeometryMapperTest, ReflectionWithPaintOffset) { + + bool has_radius = false; + CHECK_MAPPINGS(input, output, input, TransformationMatrix(), FloatClipRect(), +- local_state, PropertyTreeState::Root(), Has_radius); ++ local_state, PropertyTreeState::Root()); + } + + } // namespace blink +diff --git a/third_party/WebKit/Source/platform/graphics/paint/Transform3DDisplayItem.h b/third_party/WebKit/Source/platform/graphics/paint/Transform3DDisplayItem.h +index cab430ff6902..cce437517d11 100644 +--- a/third_party/WebKit/Source/platform/graphics/paint/Transform3DDisplayItem.h ++++ b/third_party/WebKit/Source/platform/graphics/paint/Transform3DDisplayItem.h +@@ -65,7 +65,7 @@ class PLATFORM_EXPORT EndTransform3DDisplayItem final + private: + #if DCHECK_IS_ON() + bool IsEndAndPairedWith(DisplayItem::Type other_type) const final { +- return DisplayItem::transform3DTypeToEndTransform3DType(other_type) == ++ return DisplayItem::Transform3DTypeToEndTransform3DType(other_type) == + GetType(); + } + #endif +diff --git a/third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.cpp b/third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.cpp +index 05254db57f83..fa57166259d0 100644 +--- a/third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.cpp ++++ b/third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.cpp +@@ -363,11 +363,11 @@ void DrawPlatformFocusRing(const PrimitiveType& primitive, + #endif + } + +-template void PLATFORM_EXPORT drawPlatformFocusRing<SkRect>(const SkRect&, ++template void PLATFORM_EXPORT DrawPlatformFocusRing<SkRect>(const SkRect&, + PaintCanvas*, + SkColor, + float width); +-template void PLATFORM_EXPORT drawPlatformFocusRing<SkPath>(const SkPath&, ++template void PLATFORM_EXPORT DrawPlatformFocusRing<SkPath>(const SkPath&, + PaintCanvas*, + SkColor, + float width); +diff --git a/third_party/WebKit/Source/platform/heap/BlinkGC.h b/third_party/WebKit/Source/platform/heap/BlinkGC.h +index 75b64328d42d..e31efb9f6a76 100644 +--- a/third_party/WebKit/Source/platform/heap/BlinkGC.h ++++ b/third_party/WebKit/Source/platform/heap/BlinkGC.h +@@ -48,8 +48,10 @@ using MovingObjectCallback = void (*)(void* callback_data, + #define FOR_EACH_TYPED_ARENA(H) \ + H(Node) \ + H(CSSValue) ++ /* DO NOT SUBMIT - Conflict resolution helper: ++ * Important to have CSSValue and Node rather than kCSSValue or kNode above */ + +-#define TypedArenaEnumName(Type) Type##ArenaIndex, ++#define TypedArenaEnumName(Type) k##Type##ArenaIndex, + + class PLATFORM_EXPORT BlinkGC final { + STATIC_ONLY(BlinkGC); +diff --git a/third_party/WebKit/Source/platform/heap/HeapTest.cpp b/third_party/WebKit/Source/platform/heap/HeapTest.cpp +index c5d6e9e3df05..071a06ccb1d3 100644 +--- a/third_party/WebKit/Source/platform/heap/HeapTest.cpp ++++ b/third_party/WebKit/Source/platform/heap/HeapTest.cpp +@@ -722,7 +722,7 @@ class IntNode : public GarbageCollected<IntNode> { + ThreadState* state = ThreadState::Current(); + const char* type_name = WTF_HEAP_PROFILER_TYPE_NAME(IntNode); + return ThreadHeap::AllocateOnArenaIndex( +- state, size, BlinkGC::NodeArenaIndex, GCInfoTrait<IntNode>::Index(), ++ state, size, BlinkGC::kNodeArenaIndex, GCInfoTrait<IntNode>::Index(), + type_name); + } + +diff --git a/third_party/WebKit/Source/platform/heap/ThreadState.cpp b/third_party/WebKit/Source/platform/heap/ThreadState.cpp +index d9a3a4c8d0c2..b526834d3d86 100644 +--- a/third_party/WebKit/Source/platform/heap/ThreadState.cpp ++++ b/third_party/WebKit/Source/platform/heap/ThreadState.cpp +@@ -1031,7 +1031,7 @@ void ThreadState::PostSweep() { + time_for_sweep_histogram.Count(accumulated_sweeping_time_); + + #define COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(GCReason) \ +- case BlinkGC::GCReason: { \ ++ case BlinkGC::k##GCReason: { \ + DEFINE_STATIC_LOCAL(CustomCountHistogram, histogram, \ + ("BlinkGC.CollectionRate_" #GCReason, 1, 100, 20)); \ + histogram.Count(static_cast<int>(100 * collection_rate)); \ +@@ -1039,12 +1039,12 @@ void ThreadState::PostSweep() { + } + + switch (heap_->LastGCReason()) { +- COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(kIdleGC) +- COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(kPreciseGC) +- COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(kConservativeGC) +- COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(kForcedGC) +- COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(kMemoryPressureGC) +- COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(kPageNavigationGC) ++ COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(IdleGC) ++ COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(PreciseGC) ++ COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(ConservativeGC) ++ COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(ForcedGC) ++ COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(MemoryPressureGC) ++ COUNT_COLLECTION_RATE_HISTOGRAM_BY_GC_REASON(PageNavigationGC) + default: + break; + } +@@ -1357,11 +1357,11 @@ void ThreadState::TakeSnapshot(SnapshotType type) { + number_of_heaps_reported++; \ + switch (type) { \ + case SnapshotType::kHeapSnapshot: \ +- arenas_[BlinkGC::ArenaType##ArenaIndex]->TakeSnapshot( \ ++ arenas_[BlinkGC::k##ArenaType##ArenaIndex]->TakeSnapshot( \ + heaps_dump_name + "/" #ArenaType, info); \ + break; \ + case SnapshotType::kFreelistSnapshot: \ +- arenas_[BlinkGC::ArenaType##ArenaIndex]->TakeFreelistSnapshot( \ ++ arenas_[BlinkGC::k##ArenaType##ArenaIndex]->TakeFreelistSnapshot( \ + heaps_dump_name + "/" #ArenaType); \ + break; \ + default: \ +@@ -1369,6 +1369,8 @@ void ThreadState::TakeSnapshot(SnapshotType type) { + } \ + } + ++ /* DO NOT SUBMIT - Conflict resolution helper: ++ * Important to use NormalPage instead of kNormalPage1 below */ + SNAPSHOT_HEAP(NormalPage1); + SNAPSHOT_HEAP(NormalPage2); + SNAPSHOT_HEAP(NormalPage3); +@@ -1381,6 +1383,8 @@ void ThreadState::TakeSnapshot(SnapshotType type) { + SNAPSHOT_HEAP(InlineVector); + SNAPSHOT_HEAP(HashTable); + SNAPSHOT_HEAP(LargeObject); ++ /* DO NOT SUBMIT - Conflict resolution helper: ++ * Important to use LargeObject instead of kLargeObject above */ + FOR_EACH_TYPED_ARENA(SNAPSHOT_HEAP); + + ASSERT(number_of_heaps_reported == BlinkGC::kNumberOfArenas); +diff --git a/third_party/WebKit/Source/platform/heap/asm/SaveRegisters_arm.S b/third_party/WebKit/Source/platform/heap/asm/SaveRegisters_arm.S +index 4e2f9912c953..af961fe1a5d5 100644 +--- a/third_party/WebKit/Source/platform/heap/asm/SaveRegisters_arm.S ++++ b/third_party/WebKit/Source/platform/heap/asm/SaveRegisters_arm.S +@@ -31,12 +31,12 @@ + + /* + * typedef void (*PushAllRegistersCallback)(SafePointBarrier*, ThreadState*, intptr_t*); +- * extern "C" void pushAllRegisters(SafePointBarrier*, ThreadState*, PushAllRegistersCallback) ++ * extern "C" void PushAllRegisters(SafePointBarrier*, ThreadState*, PushAllRegistersCallback) + */ + +-.type pushAllRegisters, %function +-.global pushAllRegisters +-.hidden pushAllRegisters ++.type PushAllRegisters, %function ++.global PushAllRegisters ++.hidden PushAllRegisters + #ifdef __thumb__ + /* In THUMB Mode jump to ARM stub via bx to ensure CPU mode switch. + * FIXME: This trampoline is provided to workaround bugs in +@@ -46,7 +46,7 @@ + .align 2 + .code 16 + .thumb_func +-pushAllRegisters: ++PushAllRegisters: + adr r3, pushAllRegistersARM + bx r3 + +@@ -59,7 +59,7 @@ pushAllRegistersARM: + /* ARM Mode */ + .align 4 + .code 32 +-pushAllRegisters: ++PushAllRegisters: + #endif + /* Push all callee-saved registers and save return address. */ + push {r4-r11, lr} +diff --git a/third_party/WebKit/Source/platform/heap/asm/SaveRegisters_arm64.S b/third_party/WebKit/Source/platform/heap/asm/SaveRegisters_arm64.S +index 7bb988d0d153..a6f31555e6f4 100644 +--- a/third_party/WebKit/Source/platform/heap/asm/SaveRegisters_arm64.S ++++ b/third_party/WebKit/Source/platform/heap/asm/SaveRegisters_arm64.S +@@ -31,13 +31,13 @@ + + /* + * typedef void (*PushAllRegistersCallback)(SafePointBarrier*, ThreadState*, intptr_t*); +- * extern "C" void pushAllRegisters(SafePointBarrier*, ThreadState*, PushAllRegistersCallback) ++ * extern "C" void PushAllRegisters(SafePointBarrier*, ThreadState*, PushAllRegistersCallback) + */ + +-.type pushAllRegisters, %function +-.global pushAllRegisters +-.hidden pushAllRegisters +-pushAllRegisters: ++.type PushAllRegisters, %function ++.global PushAllRegisters ++.hidden PushAllRegisters ++PushAllRegisters: + /* Save return address. */ + sub sp, sp, #96 + stp x19, x20, [sp, #80] +diff --git a/third_party/WebKit/Source/platform/heap/asm/SaveRegisters_mips.S b/third_party/WebKit/Source/platform/heap/asm/SaveRegisters_mips.S +index 820209fbc022..f2b22bda65fd 100644 +--- a/third_party/WebKit/Source/platform/heap/asm/SaveRegisters_mips.S ++++ b/third_party/WebKit/Source/platform/heap/asm/SaveRegisters_mips.S +@@ -31,13 +31,13 @@ + + /* + * typedef void (*PushAllRegistersCallback)(SafePointBarrier*, ThreadState*, intptr_t*); +- * extern "C" void pushAllRegisters(SafePointBarrier*, ThreadState*, PushAllRegistersCallback) ++ * extern "C" void PushAllRegisters(SafePointBarrier*, ThreadState*, PushAllRegistersCallback) + */ + +-.type pushAllRegisters, %function +-.global pushAllRegisters +-.hidden pushAllRegisters +-pushAllRegisters: ++.type PushAllRegisters, %function ++.global PushAllRegisters ++.hidden PushAllRegisters ++PushAllRegisters: + // Reserve space for callee-saved registers, return address, + // as well as for the callee arguments. + addiu $sp,$sp,-56 +diff --git a/third_party/WebKit/Source/platform/heap/asm/SaveRegisters_mips64.S b/third_party/WebKit/Source/platform/heap/asm/SaveRegisters_mips64.S +index 2805b5c4336a..71d04553403e 100644 +--- a/third_party/WebKit/Source/platform/heap/asm/SaveRegisters_mips64.S ++++ b/third_party/WebKit/Source/platform/heap/asm/SaveRegisters_mips64.S +@@ -4,13 +4,13 @@ + + /* + * typedef void (*PushAllRegistersCallback)(SafePointBarrier*, ThreadState*, intptr_t*); +- * extern "C" void pushAllRegisters(SafePointBarrier*, ThreadState*, PushAllRegistersCallback) ++ * extern "C" void PushAllRegisters(SafePointBarrier*, ThreadState*, PushAllRegistersCallback) + */ + +-.type pushAllRegisters, %function +-.global pushAllRegisters +-.hidden pushAllRegisters +-pushAllRegisters: ++.type PushAllRegisters, %function ++.global PushAllRegisters ++.hidden PushAllRegisters ++PushAllRegisters: + // Push all callee-saves registers to get them + // on the stack for conservative stack scanning. + // Reserve space for callee-saved registers and return address. +diff --git a/third_party/WebKit/Source/platform/heap/asm/SaveRegisters_x86.asm b/third_party/WebKit/Source/platform/heap/asm/SaveRegisters_x86.asm +index 35fa2c978e7c..8374167f880d 100644 +--- a/third_party/WebKit/Source/platform/heap/asm/SaveRegisters_x86.asm ++++ b/third_party/WebKit/Source/platform/heap/asm/SaveRegisters_x86.asm +@@ -65,13 +65,13 @@ + %endif + + ;; typedef void (*PushAllRegistersCallback)(SafePointBarrier*, ThreadState*, intptr_t*); +-;; extern "C" void pushAllRegisters(SafePointBarrier*, ThreadState*, PushAllRegistersCallback) ++;; extern "C" void PushAllRegisters(SafePointBarrier*, ThreadState*, PushAllRegistersCallback) + +- global mangle(pushAllRegisters) PRIVATE ++ global mangle(PushAllRegisters) PRIVATE + + %if X64POSIX + +-mangle(pushAllRegisters): ++mangle(PushAllRegisters): + ;; Push all callee-saves registers to get them + ;; on the stack for conservative stack scanning. + ;; We maintain 16-byte alignment at calls (required on Mac). +@@ -98,7 +98,7 @@ mangle(pushAllRegisters): + + %elif X64WIN + +-mangle(pushAllRegisters): ++mangle(PushAllRegisters): + ;; Push all callee-saves registers to get them + ;; on the stack for conservative stack scanning. + ;; There is an 8-byte return address on the stack and we push +@@ -126,7 +126,7 @@ mangle(pushAllRegisters): + + %elif IA32 + +-mangle(pushAllRegisters): ++mangle(PushAllRegisters): + ;; Push all callee-saves registers to get them + ;; on the stack for conservative stack scanning. + ;; We maintain 16-byte alignment at calls (required on +diff --git a/third_party/WebKit/Source/platform/image-encoders/JPEGImageEncoderTest.cpp b/third_party/WebKit/Source/platform/image-encoders/JPEGImageEncoderTest.cpp +index e7e8e359e9b3..58565098ca2c 100644 +--- a/third_party/WebKit/Source/platform/image-encoders/JPEGImageEncoderTest.cpp ++++ b/third_party/WebKit/Source/platform/image-encoders/JPEGImageEncoderTest.cpp +@@ -35,10 +35,11 @@ TEST_F(RGBAtoRGBTest, testOpaqueCaseEven8pixels) { + + unsigned char expected[] = {255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 0, + 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0}; ++ // TODO(dcheng): Make this all constexpr. + #if OS(WIN) + // Windows release bot can't be reasoned with (compiler error C2131). +- static const constexpr size_t kPixels = sizeof(canvas) / kChannelsRGBA; +- static const constexpr size_t kRgbSize = kPixels * kChannelsRGB; ++ static const constexpr size_t pixels = sizeof(canvas) / kChannelsRGBA; ++ static const constexpr size_t rgb_size = pixels * kChannelsRGB; + #else + const size_t pixels = CalculateRGBAPixels(sizeof(canvas)); + const size_t rgb_size = CalculateRGBOutputSize(sizeof(canvas)); +@@ -47,7 +48,7 @@ TEST_F(RGBAtoRGBTest, testOpaqueCaseEven8pixels) { + unsigned char output[rgb_size]; + memset(output, 0, rgb_size); + +- blink::RGBAtoRGB(canvas, static_cast<unsigned>(kPixels), output); ++ blink::RGBAtoRGB(canvas, static_cast<unsigned>(pixels), output); + + EXPECT_EQ(memcmp(expected, output, rgb_size), 0); + } +diff --git a/third_party/WebKit/Source/platform/loader/fetch/Resource.h b/third_party/WebKit/Source/platform/loader/fetch/Resource.h +index 24bd426833e6..2f7cc0fe071a 100644 +--- a/third_party/WebKit/Source/platform/loader/fetch/Resource.h ++++ b/third_party/WebKit/Source/platform/loader/fetch/Resource.h +@@ -499,10 +499,10 @@ class ResourceFactory { + Resource::Type type_; + }; + +-#define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ +- DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, \ +- resource->GetType() == Resource::typeName, \ +- resource.GetType() == Resource::typeName); ++#define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ ++ DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, \ ++ resource->GetType() == Resource::k##typeName, \ ++ resource.GetType() == Resource::k##typeName); + + } // namespace blink + +diff --git a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp +index aa70c1cc6112..cc5a5814a797 100644 +--- a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp ++++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp +@@ -69,7 +69,7 @@ enum SriResourceIntegrityMismatchEvent { + }; + + #define DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, name) \ +- case Resource::name: { \ ++ case Resource::k##name: { \ + DEFINE_THREAD_SAFE_STATIC_LOCAL( \ + EnumerationHistogram, resource_histogram, \ + new EnumerationHistogram( \ +@@ -79,21 +79,21 @@ enum SriResourceIntegrityMismatchEvent { + } + + #define DEFINE_RESOURCE_HISTOGRAM(prefix) \ +- switch (factory.GetType()) { \ +- DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, kCSSStyleSheet) \ +- DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, kFont) \ +- DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, kImage) \ +- DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, kImportResource) \ +- DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, kLinkPrefetch) \ +- DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, kMainResource) \ +- DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, kManifest) \ +- DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, kMedia) \ +- DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, kMock) \ +- DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, kRaw) \ +- DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, kScript) \ +- DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, kSVGDocument) \ +- DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, kTextTrack) \ +- DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, kXSLStyleSheet) \ ++ switch (factory.GetType()) { \ ++ DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, CSSStyleSheet) \ ++ DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, Font) \ ++ DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, Image) \ ++ DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, ImportResource) \ ++ DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, LinkPrefetch) \ ++ DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, MainResource) \ ++ DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, Manifest) \ ++ DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, Media) \ ++ DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, Mock) \ ++ DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, Raw) \ ++ DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, Script) \ ++ DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, SVGDocument) \ ++ DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, TextTrack) \ ++ DEFINE_SINGLE_RESOURCE_HISTOGRAM(prefix, XSLStyleSheet) \ + } + + void AddRedirectsToTimingInfo(Resource* resource, ResourceTimingInfo* info) { +diff --git a/third_party/WebKit/Source/platform/network/HTTPParsers.cpp b/third_party/WebKit/Source/platform/network/HTTPParsers.cpp +index 716c26cc11d0..0669e5002f8f 100644 +--- a/third_party/WebKit/Source/platform/network/HTTPParsers.cpp ++++ b/third_party/WebKit/Source/platform/network/HTTPParsers.cpp +@@ -167,7 +167,7 @@ const UChar* ParseSuboriginName(const UChar* begin, + + const UChar* position = begin; + +- if (!skipExactly<UChar, isASCIILower>(position, end)) { ++ if (!skipExactly<UChar, IsASCIILower>(position, end)) { + messages.push_back("Invalid character \'" + String(position, 1) + + "\' in suborigin. First character must be a lower case " + "alphabetic character."); +@@ -769,7 +769,7 @@ bool ParseSuboriginHeader(const String& header, + const UChar* position = characters.Data(); + const UChar* end = position + characters.size(); + +- skipWhile<UChar, isASCIISpace>(position, end); ++ skipWhile<UChar, IsASCIISpace>(position, end); + + String name; + position = ParseSuboriginName(position, end, name, messages); +@@ -782,7 +782,7 @@ bool ParseSuboriginHeader(const String& header, + suborigin->SetName(name); + + while (position < end) { +- skipWhile<UChar, isASCIISpace>(position, end); ++ skipWhile<UChar, IsASCIISpace>(position, end); + if (position == end) + return true; + +diff --git a/third_party/WebKit/Source/platform/text/CharacterPropertyDataGenerator.cpp b/third_party/WebKit/Source/platform/text/CharacterPropertyDataGenerator.cpp +index 9b4bd1f2af06..55c4d36e8c21 100644 +--- a/third_party/WebKit/Source/platform/text/CharacterPropertyDataGenerator.cpp ++++ b/third_party/WebKit/Source/platform/text/CharacterPropertyDataGenerator.cpp +@@ -54,8 +54,8 @@ static void GenerateUTrieSerialized(FILE* fp, int32_t size, uint8_t* array) { + fprintf(fp, + "#include <cstdint>\n\n" + "namespace blink {\n\n" +- "extern const int32_t serializedCharacterDataSize = %d;\n" +- "extern const uint8_t serializedCharacterData[] = {", ++ "extern const int32_t kSerializedCharacterDataSize = %d;\n" ++ "extern const uint8_t kSerializedCharacterData[] = {", + size); + for (int32_t i = 0; i < size;) { + fprintf(fp, "\n "); +diff --git a/third_party/WebKit/Source/platform/weborigin/OriginAccessEntry.cpp b/third_party/WebKit/Source/platform/weborigin/OriginAccessEntry.cpp +index b140636fef7b..15584d38b78b 100644 +--- a/third_party/WebKit/Source/platform/weborigin/OriginAccessEntry.cpp ++++ b/third_party/WebKit/Source/platform/weborigin/OriginAccessEntry.cpp +@@ -85,7 +85,7 @@ OriginAccessEntry::OriginAccessEntry(const String& protocol, + ASSERT(subdomain_setting >= kAllowSubdomains || + subdomain_setting <= kDisallowSubdomains); + +- host_is_ip_address_ = HostIsIPAddress(host); ++ host_is_ip_address_ = blink::HostIsIPAddress(host); + + // Look for top-level domains, either with or without an additional dot. + if (!host_is_ip_address_) { +diff --git a/third_party/WebKit/Source/platform/wtf/ASCIICType.h b/third_party/WebKit/Source/platform/wtf/ASCIICType.h +index 9d38fc9f6400..8361a8f22705 100644 +--- a/third_party/WebKit/Source/platform/wtf/ASCIICType.h ++++ b/third_party/WebKit/Source/platform/wtf/ASCIICType.h +@@ -87,7 +87,7 @@ inline bool IsASCIIPrintable(CharType c) { + } + + /* +- Statistics from a run of Apple's page load test for callers of isASCIISpace: ++ Statistics from a run of Apple's page load test for callers of IsASCIISpace: + + character count + --------- ----- +diff --git a/third_party/WebKit/Source/platform/wtf/RetainPtr.h b/third_party/WebKit/Source/platform/wtf/RetainPtr.h +index 2eb497f52d9f..1322eb2a1832 100644 +--- a/third_party/WebKit/Source/platform/wtf/RetainPtr.h ++++ b/third_party/WebKit/Source/platform/wtf/RetainPtr.h +@@ -293,14 +293,6 @@ inline RetainPtr<T> AdoptNS(T o) { + return RetainPtr<T>(kAdoptNS, o); + } + +-// Helper function for creating a RetainPtr using template argument deduction. +-template <typename T> +-WARN_UNUSED_RESULT inline RetainPtr<T> RetainPtr(T); +-template <typename T> +-inline RetainPtr<T> RetainPtr(T o) { +- return RetainPtr<T>(o); +-} +- + template <typename T> + struct HashTraits<RetainPtr<T>> : SimpleClassHashTraits<RetainPtr<T>> {}; + +@@ -336,6 +328,5 @@ using WTF::kAdoptNS; + using WTF::AdoptCF; + using WTF::AdoptNS; + using WTF::RetainPtr; +-using WTF::RetainPtr; + + #endif // WTF_RetainPtr_h +diff --git a/third_party/WebKit/Source/platform/wtf/text/StringImpl.cpp b/third_party/WebKit/Source/platform/wtf/text/StringImpl.cpp +index 4ede6071cd55..da8757354fbb 100644 +--- a/third_party/WebKit/Source/platform/wtf/text/StringImpl.cpp ++++ b/third_party/WebKit/Source/platform/wtf/text/StringImpl.cpp +@@ -104,7 +104,7 @@ static void fillWithSnippet(const StringImpl* string, Vector<char>& snippet) { + size_t i; + for (i = 0; i < string->length() && i < kMaxSnippetLength; ++i) { + UChar c = (*string)[i]; +- if (isASCIIPrintable(c)) ++ if (IsASCIIPrintable(c)) + snippet.append(c); + else + snippet.append('?'); +diff --git a/third_party/WebKit/Source/platform/wtf/text/StringImpl.h b/third_party/WebKit/Source/platform/wtf/text/StringImpl.h +index 5ee41f295263..be9864e4c047 100644 +--- a/third_party/WebKit/Source/platform/wtf/text/StringImpl.h ++++ b/third_party/WebKit/Source/platform/wtf/text/StringImpl.h +@@ -825,7 +825,7 @@ static inline int CodePointCompare(const StringImpl* string1, + } + + static inline bool IsSpaceOrNewline(UChar c) { +- // Use isASCIISpace() for basic Latin-1. ++ // Use IsASCIISpace() for basic Latin-1. + // This will include newlines, which aren't included in Unicode DirWS. + return c <= 0x7F + ? WTF::IsASCIISpace(c) +diff --git a/third_party/WebKit/Source/web/WebPagePopupImpl.h b/third_party/WebKit/Source/web/WebPagePopupImpl.h +index ea3cd4a01296..38f21b310965 100644 +--- a/third_party/WebKit/Source/web/WebPagePopupImpl.h ++++ b/third_party/WebKit/Source/web/WebPagePopupImpl.h +@@ -36,6 +36,9 @@ + #include "public/web/WebPagePopup.h" + #include "web/PageWidgetDelegate.h" + ++// To avoid conflicts with the CreateWindow macro from the Windows SDK... ++#undef PostMessage ++ + namespace blink { + + class CompositorAnimationHost; +diff --git a/third_party/WebKit/Source/web/WebSettingsImpl.cpp b/third_party/WebKit/Source/web/WebSettingsImpl.cpp +index 79d6c3f1ca9d..451f22e94867 100644 +--- a/third_party/WebKit/Source/web/WebSettingsImpl.cpp ++++ b/third_party/WebKit/Source/web/WebSettingsImpl.cpp +@@ -62,7 +62,7 @@ WebSettingsImpl::WebSettingsImpl(Settings* settings, + + void WebSettingsImpl::SetFromStrings(const WebString& name, + const WebString& value) { +- settings_->SetFromStrings(name, value); ++ settings_->setFromStrings(name, value); + } + + void WebSettingsImpl::SetStandardFontFamily(const WebString& font, +diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp.py b/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp.py +index 0872b56b1b83..bc274c0eba49 100644 +--- a/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp.py ++++ b/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp.py +@@ -2828,37 +2828,8 @@ def check_identifier_name_in_declaration(filename, line_number, line, file_state + + is_function_arguments = is_function_arguments or character_after_identifier == '(' + +- # Remove "m_" and "s_" to allow them. +- modified_identifier = sub(r'(^|(?<=::))[ms]_', '', identifier) +- if not file_state.is_objective_c() and modified_identifier.find('_') >= 0: +- # Various exceptions to the rule: JavaScript op codes functions, const_iterator. +- if (not (filename.find('JavaScriptCore') >= 0 and modified_identifier.find('op_') >= 0) +- and not (filename.find('gtk') >= 0 and modified_identifier.startswith('webkit_') >= 0) +- and not (filename.find('StructTraits.h') >= 0) +- and not modified_identifier.startswith('tst_') +- and not modified_identifier.startswith('webkit_dom_object_') +- and not modified_identifier.startswith('webkit_soup') +- and not modified_identifier.startswith('NPN_') +- and not modified_identifier.startswith('NPP_') +- and not modified_identifier.startswith('NP_') +- and not modified_identifier.startswith('qt_') +- and not modified_identifier.startswith('_q_') +- and not modified_identifier.startswith('cairo_') +- and not modified_identifier.startswith('Ecore_') +- and not modified_identifier.startswith('Eina_') +- and not modified_identifier.startswith('Evas_') +- and not modified_identifier.startswith('Ewk_') +- and not modified_identifier.startswith('cti_') +- and not modified_identifier.find('::qt_') >= 0 +- and not modified_identifier.find('::_q_') >= 0 +- and not modified_identifier == 'const_iterator' +- and not modified_identifier == 'vm_throw' +- and not modified_identifier == 'DFG_OPERATION'): +- error(line_number, 'readability/naming/underscores', 4, identifier + +- " is incorrectly named. Don't use underscores in your identifier names.") +- + # Check for variables named 'l', these are too easy to confuse with '1' in some fonts +- if modified_identifier == 'l': ++ if identifier == 'l': + error(line_number, 'readability/naming', 4, identifier + + " is incorrectly named. Don't use the single letter 'l' as an identifier name.") + +diff --git a/third_party/WebKit/public/platform/WebData.h b/third_party/WebKit/public/platform/WebData.h +index 6bed5f7a0cfd..70f9d425336d 100644 +--- a/third_party/WebKit/public/platform/WebData.h ++++ b/third_party/WebKit/public/platform/WebData.h +@@ -83,12 +83,12 @@ class BLINK_PLATFORM_EXPORT WebData { + #else + template <class C> + WebData(const C& c) { +- Assign(c.Data(), c.size()); ++ Assign(c.data(), c.size()); + } + + template <class C> + WebData& operator=(const C& c) { +- Assign(c.Data(), c.size()); ++ Assign(c.data(), c.size()); + return *this; + } + #endif +diff --git a/third_party/WebKit/public/platform/WebFont.h b/third_party/WebKit/public/platform/WebFont.h +index b39db27692cf..864dcc9ce558 100644 +--- a/third_party/WebKit/public/platform/WebFont.h ++++ b/third_party/WebKit/public/platform/WebFont.h +@@ -10,6 +10,9 @@ + #include "WebCommon.h" + #include <memory> + ++// To avoid conflicts with the CreateWindow macro from the Windows SDK... ++#undef DrawText ++ + namespace blink { + + struct WebFloatPoint; +diff --git a/third_party/WebKit/public/platform/WebInputEvent.h b/third_party/WebKit/public/platform/WebInputEvent.h +index 44fc8f300a49..e162d8c88f28 100644 +--- a/third_party/WebKit/public/platform/WebInputEvent.h ++++ b/third_party/WebKit/public/platform/WebInputEvent.h +@@ -310,43 +310,43 @@ class WebInputEvent { + + static const char* GetName(WebInputEvent::Type type) { + #define CASE_TYPE(t) \ +- case WebInputEvent::t: \ ++ case WebInputEvent::k##t: \ + return #t + switch (type) { +- CASE_TYPE(kUndefined); +- CASE_TYPE(kMouseDown); +- CASE_TYPE(kMouseUp); +- CASE_TYPE(kMouseMove); +- CASE_TYPE(kMouseEnter); +- CASE_TYPE(kMouseLeave); +- CASE_TYPE(kContextMenu); +- CASE_TYPE(kMouseWheel); +- CASE_TYPE(kRawKeyDown); +- CASE_TYPE(kKeyDown); +- CASE_TYPE(kKeyUp); +- CASE_TYPE(kChar); +- CASE_TYPE(kGestureScrollBegin); +- CASE_TYPE(kGestureScrollEnd); +- CASE_TYPE(kGestureScrollUpdate); +- CASE_TYPE(kGestureFlingStart); +- CASE_TYPE(kGestureFlingCancel); +- CASE_TYPE(kGestureShowPress); +- CASE_TYPE(kGestureTap); +- CASE_TYPE(kGestureTapUnconfirmed); +- CASE_TYPE(kGestureTapDown); +- CASE_TYPE(kGestureTapCancel); +- CASE_TYPE(kGestureDoubleTap); +- CASE_TYPE(kGestureTwoFingerTap); +- CASE_TYPE(kGestureLongPress); +- CASE_TYPE(kGestureLongTap); +- CASE_TYPE(kGesturePinchBegin); +- CASE_TYPE(kGesturePinchEnd); +- CASE_TYPE(kGesturePinchUpdate); +- CASE_TYPE(kTouchStart); +- CASE_TYPE(kTouchMove); +- CASE_TYPE(kTouchEnd); +- CASE_TYPE(kTouchCancel); +- CASE_TYPE(kTouchScrollStarted); ++ CASE_TYPE(Undefined); ++ CASE_TYPE(MouseDown); ++ CASE_TYPE(MouseUp); ++ CASE_TYPE(MouseMove); ++ CASE_TYPE(MouseEnter); ++ CASE_TYPE(MouseLeave); ++ CASE_TYPE(ContextMenu); ++ CASE_TYPE(MouseWheel); ++ CASE_TYPE(RawKeyDown); ++ CASE_TYPE(KeyDown); ++ CASE_TYPE(KeyUp); ++ CASE_TYPE(Char); ++ CASE_TYPE(GestureScrollBegin); ++ CASE_TYPE(GestureScrollEnd); ++ CASE_TYPE(GestureScrollUpdate); ++ CASE_TYPE(GestureFlingStart); ++ CASE_TYPE(GestureFlingCancel); ++ CASE_TYPE(GestureShowPress); ++ CASE_TYPE(GestureTap); ++ CASE_TYPE(GestureTapUnconfirmed); ++ CASE_TYPE(GestureTapDown); ++ CASE_TYPE(GestureTapCancel); ++ CASE_TYPE(GestureDoubleTap); ++ CASE_TYPE(GestureTwoFingerTap); ++ CASE_TYPE(GestureLongPress); ++ CASE_TYPE(GestureLongTap); ++ CASE_TYPE(GesturePinchBegin); ++ CASE_TYPE(GesturePinchEnd); ++ CASE_TYPE(GesturePinchUpdate); ++ CASE_TYPE(TouchStart); ++ CASE_TYPE(TouchMove); ++ CASE_TYPE(TouchEnd); ++ CASE_TYPE(TouchCancel); ++ CASE_TYPE(TouchScrollStarted); + default: + NOTREACHED(); + return "";
diff --git a/tools/blink_rename_merge_helper/pylib/__init__.py b/tools/blink_rename_merge_helper/pylib/__init__.py new file mode 100644 index 0000000..a22a6ee --- /dev/null +++ b/tools/blink_rename_merge_helper/pylib/__init__.py
@@ -0,0 +1,3 @@ +# Copyright 2017 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.
diff --git a/tools/blink_rename_merge_helper/pylib/blink_rename_merge_helper/__init__.py b/tools/blink_rename_merge_helper/pylib/blink_rename_merge_helper/__init__.py new file mode 100644 index 0000000..a22a6ee --- /dev/null +++ b/tools/blink_rename_merge_helper/pylib/blink_rename_merge_helper/__init__.py
@@ -0,0 +1,3 @@ +# Copyright 2017 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.
diff --git a/tools/blink_rename_merge_helper/pylib/blink_rename_merge_helper/auto_squasher.py b/tools/blink_rename_merge_helper/pylib/blink_rename_merge_helper/auto_squasher.py new file mode 100755 index 0000000..a9eb2f3f --- /dev/null +++ b/tools/blink_rename_merge_helper/pylib/blink_rename_merge_helper/auto_squasher.py
@@ -0,0 +1,23 @@ +#!/usr/bin/env python +# Copyright 2017 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. +"""Simple utility to help squash multiple commits into one.""" + +import sys + + +def main(): + with open(sys.argv[1], 'r+') as f: + lines = f.readlines() + for i, line in enumerate(lines): + if i: + if line.startswith('pick '): + lines[i] = line.replace('pick ', 'squash ', 1) + f.seek(0) + f.truncate() + f.write('\n'.join(lines)) + + +if __name__ == '__main__': + sys.exit(main())
diff --git a/tools/blink_rename_merge_helper/pylib/blink_rename_merge_helper/driver.py b/tools/blink_rename_merge_helper/pylib/blink_rename_merge_helper/driver.py new file mode 100644 index 0000000..7b8d1de --- /dev/null +++ b/tools/blink_rename_merge_helper/pylib/blink_rename_merge_helper/driver.py
@@ -0,0 +1,493 @@ +# Copyright 2017 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. + +import argparse +import hashlib +import json +import os +import shutil +import subprocess +import sys +import tempfile + +_BEFORE_RENAME_COMMIT = '5e27d4b8d16d9830e52a44a44b4ff501a2a2e667' +_RENAME_COMMIT = '1c4d759e44259650dfb2c426a7f997d2d0bc73dc' +_AFTER_RENAME_COMMIT = 'b0bf8e8ed34ba40acece03baa19446a5d91b009d' +_DEVNULL = open(os.devnull, 'w') +_SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) +_GIT_CONFIG_BRANCH_RECORDS = 'branch.%s.blink-rename-resolver-records' +_GIT_ATTRIBUTES_PATH = os.path.join('.git', 'info', 'attributes') + + +class _MergeTool(object): + """Scoper object for using the Blink Rename merge driver helper.""" + + def __init__(self): + self.__attributes_backup = None + + def __enter__(self): + _check_call_git( + ['config', 'merge.blink-rename.name', 'blink rename merge helper']) + # Note: while it would be possible to encode the path to the records + # directory here, it's easier to pass it as an environmental variable, to + # avoid weird escaping issues. + _check_call_git([ + 'config', 'merge.blink-rename.driver', + '%s %%O %%A %%B %%P' % os.path.join(_SCRIPT_DIR, 'merge.py') + ]) + _check_call_git(['config', 'merge.blink-rename.recursive', 'binary']) + + if os.path.exists(_GIT_ATTRIBUTES_PATH): + filemode = 'r+' + else: + filemode = 'w' + with open(_GIT_ATTRIBUTES_PATH, filemode) as attributes_file: + if filemode == 'r+': + self.__attributes_backup = attributes_file.read() + attributes_file.seek(0) + attributes_file.truncate() + attributes_file.write('# Blink Rename merge helper\n') + attributes_file.write('*.cc merge=blink-rename\n') + attributes_file.write('*.cpp merge=blink-rename\n') + attributes_file.write('*.mm merge=blink-rename\n') + attributes_file.write('*.h merge=blink-rename\n') + + def __exit__(self, exc_type, exc_value, traceback): + _check_call_git(['config', '--remove-section', 'merge.blink-rename']) + if self.__attributes_backup: + try: + with open(_GIT_ATTRIBUTES_PATH, 'w') as attributes_file: + attributes_file.write(self.__attributes_backup) + except IOError: + print 'ERROR: Failed to restore original %s file' % _GIT_ATTRIBUTES_PATH + print ' Original contents:' + print self.__attributes_backup + else: + os.remove(_GIT_ATTRIBUTES_PATH) + + +def _call_gclient(args): + if sys.platform == 'win32': + args = ['gclient.bat'] + args + else: + args = ['gclient'] + args + return subprocess.call(args) + + +def _build_ninja_command(args): + if sys.platform == 'win32': + return ['ninja.exe'] + args + else: + return ['ninja'] + args + + +def _call_ninja_silently(args): + # Eat output, since only the return value is important. + return subprocess.call( + _build_ninja_command(args), stdout=_DEVNULL, stderr=_DEVNULL) + + +def _call_ninja(args): + return subprocess.call(_build_ninja_command(args)) + + +def _build_git_command(args): + if sys.platform == 'win32': + return ['git.bat'] + args + else: + return ['git'] + args + + +def _call_git(args, **kwargs): + return subprocess.call(_build_git_command(args), **kwargs) + + +def _check_call_git(args, **kwargs): + return subprocess.check_call(_build_git_command(args), **kwargs) + + +def _check_call_git_and_get_output(args, **kwargs): + return subprocess.check_output(_build_git_command(args), **kwargs) + + +def _check_call_python(args): + if sys.platform == 'win32': + args = ['python.exe'] + args + else: + args = ['python'] + args + return subprocess.check_call(args) + + +def _is_clean_tree(): + return _call_git(['diff-index', '--quiet', 'HEAD']) == 0 + + +def _ensure_clean_tree(): + if not _is_clean_tree(): + print 'ERROR: cannot proceed with a dirty tree. Please commit or stash ' + print ' changes.' + sys.exit(1) + + +def _get_branch_info(): + current_branch = _check_call_git_and_get_output( + ['rev-parse', '--symbolic-full-name', 'HEAD']).strip() + print 'INFO: current branch: %s' % current_branch + + tracking_branch = None + try: + tracking_branch = _check_call_git_and_get_output( + ['rev-parse', '--symbolic-full-name', 'HEAD@{upstream}']).strip() + except subprocess.CalledProcessError: + # Likely failed because there's no tracking branch info. Fall through and + # fail out. + pass + if not tracking_branch: + print 'ERROR: no tracking branch found. Bailing out...' + print ' If you want to track origin/master, then run:' + print ' git branch --set-upstream-to origin/master' + sys.exit(1) + + print 'INFO: tracking branch: %s' % tracking_branch + return current_branch, tracking_branch + + +def _commit_is_ancestor_of(ancestor, commit): + # merge-base --is-ancestor returns 0 if |ancestor| is the ancestor of + # |commit|. + return _call_git(['merge-base', '--is-ancestor', ancestor, commit]) == 0 + + +def _ensure_origin_contains_commit(): + if not _commit_is_ancestor_of(_RENAME_COMMIT, 'refs/remotes/origin/master'): + _check_call_git(['fetch', 'origin']) + + +def _prompt_yes_or_no(question, default='yes'): + choices = { + 'yes': True, + 'y': True, + 'no': False, + 'n': False, + } + assert default in choices + + if default == 'yes': + prompt = '[Y/n]' + elif default == 'no': + prompt = '[y/N]' + else: + prompt = '[y/n]' + + while True: + choice = raw_input('%s %s? ' % (question, prompt)).lower() + if default and not choice: + return choices[default] + elif choice in choices: + return choices[choice] + else: + print 'Please answer Yes or No.' + + +def _dump_edits_for_debugging(edits): + fd, debug_path = tempfile.mkstemp() + print 'INFO: dumping raw edits to %s' % debug_path + os.write(fd, edits) + os.close(fd) + + +def _prompt_for_squash(commits_in_branch): + print('WARNING: there are %d commits in branch that are not upstream.' % + commits_in_branch) + print ' Squashing into one commit is required to continue.' + if _prompt_yes_or_no('Automatically squash into one commit'): + auto_squasher = os.path.join(_SCRIPT_DIR, 'auto_squasher.py') + return _call_git( + ['rebase', '-i', 'HEAD~%d' % commits_in_branch], + env=dict(os.environ, + GIT_SEQUENCE_EDITOR='python %s' % auto_squasher)) == 0 + else: + sys.exit(1) + + +def _prepare_branch(current_branch, + tracking_branch, + build_dir, + jobs, + rebase=True): + if not build_dir: + print 'ERROR: the build directory must be specified with -C when running ' + print ' --prepare mode.' + sys.exit(1) + if not _commit_is_ancestor_of(_BEFORE_RENAME_COMMIT, tracking_branch): + print 'ERROR: tracking branch not prepared yet; run --prepare on tracking ' + print ' branch first.' + sys.exit(1) + if (tracking_branch != 'refs/remotes/origin/master' and + _commit_is_ancestor_of(_RENAME_COMMIT, tracking_branch)): + print 'ERROR: tracking branch already contains rename commit; bailing out ' + print ' since the tool cannot handle this automatically.' + sys.exit(1) + if _commit_is_ancestor_of(_RENAME_COMMIT, 'HEAD'): + print 'ERROR: current branch appears to already be updated.' + sys.exit(1) + + commits_in_branch = int( + _check_call_git_and_get_output([ + 'rev-list', '--left-only', '--count', 'HEAD...%s' % tracking_branch + ])) + if rebase and commits_in_branch != 1: + if _prompt_for_squash(commits_in_branch): + commits_in_branch = 1 + + update_args = [] + if rebase: + update_args.append('rebase') + else: + update_args.append('merge') + if tracking_branch == 'refs/remotes/origin/master': + update_args.append(_BEFORE_RENAME_COMMIT) + if _call_git(update_args) != 0: + print 'ERROR: failed to update branch to the commit before the rename.' + print ' Fix any conflicts and try running with --prepare again.' + sys.exit(1) + + if _call_gclient(['sync']): + print 'ERROR: gclient sync returned a non-zero exit code.' + print ' Please fix the errors and try running with --prepare again.' + sys.exit(1) + + changed_files = _check_call_git_and_get_output( + ['diff', '--name-only', + 'HEAD~%d' % commits_in_branch]).strip().split('\n') + # Filter changed files out to only the ones that still exist and that ninja + # knows about. + clang_scripts_dir = os.path.join('tools', 'clang', 'scripts') + _check_call_python( + [os.path.join(clang_scripts_dir, 'generate_compdb.py'), build_dir]) + with open(os.path.join(build_dir, 'compile_commands.json')) as f: + compile_db = json.loads(f.read()) + files_in_db = set([ + os.path.realpath(os.path.join(build_dir, entry['file'])) + for entry in compile_db + ]) + changed_buildable_files = [ + f for f in changed_files if os.path.realpath(f) in files_in_db + ] + + if not changed_buildable_files: + print 'INFO: This branch does not appear to change files that this script ' + print ' can help automatically rebase. Exiting...' + sys.exit(0) + + # 'touch' changed files to force a rebuild. + for f in changed_buildable_files: + os.utime(f, None) + + # -d keeprsp is only needed for Windows, but it doesn't hurt to have it + # elsewhere. + ninja_args = ['-C', build_dir, '-d', 'keeprsp'] + if jobs: + ninja_args.extend(['-j', jobs]) + # Source files are specified relative to the root of the build directory. + targets = [ + '%s^' % os.path.relpath(f, build_dir) for f in changed_buildable_files + ] + ninja_args.extend(targets) + if _call_ninja(ninja_args): + print 'ERROR: Cannot continue, ninja failed!' + sys.exit(1) + + staging_dir = os.path.abspath( + os.path.join(os.getcwd(), 'tools', 'blink_rename_merge_helper', + 'staging')) + blocklist_path = os.path.join(staging_dir, 'data', 'idl_blocklist.txt') + clang_tool_args = [ + 'python', os.path.join(clang_scripts_dir, 'run_tool.py'), + '--tool-args=--method-blocklist=%s' % blocklist_path, + 'rewrite_to_chrome_style', build_dir + ] + clang_tool_args.extend(changed_buildable_files) + clang_tool_output = subprocess.check_output( + clang_tool_args, + env=dict( + os.environ, + PATH='%s%s%s' % (os.path.join(staging_dir, 'bin'), os.pathsep, + os.environ['PATH']))) + + # Extract the edits from the clang tool's output. + p = subprocess.Popen( + ['python', os.path.join(clang_scripts_dir, 'extract_edits.py')], + stdin=subprocess.PIPE, + stdout=subprocess.PIPE) + edits, dummy_stderr = p.communicate(input=clang_tool_output) + if p.returncode != 0: + print 'ERROR: extracting edits from clang tool output failed.' + sys.exit(1) + + _dump_edits_for_debugging(edits) + + # And apply them. Note this this intentionally uses changed_files instead of + # changed_buildable_files, as changes to header files, etc should also be + # recorded. + p = subprocess.Popen( + ['python', os.path.join(clang_scripts_dir, 'apply_edits.py'), build_dir] + + changed_files, + stdin=subprocess.PIPE) + p.communicate(input=edits) + if p.returncode != 0: + print 'WARNING: failed to apply %d edits from clang tool.' % -p.returncode + if not _prompt_yes_or_no('Continue (generally safe)', default='yes'): + sys.exit(1) + + # Use git apply with --include + apply_manual_patch_args = [ + 'apply', '--reject', os.path.join(staging_dir, 'data', 'manual.patch') + ] + for f in changed_files: + apply_manual_patch_args.append('--include=%s' % f) + if _call_git(apply_manual_patch_args) != 0: + print 'ERROR: failed to apply manual patches. Please manually resolve ' + print ' conflicts (without committing) and re-run the tool with ' + print ' --finish-prepare.' + sys.exit(1) + + _finish_prepare_branch(current_branch) + + +def _finish_prepare_branch(current_branch): + _check_call_git(['cl', 'format']) + + # Record changed files in a temporary data store for later use in conflict + # resolution. + files_to_save = _check_call_git_and_get_output( + ['diff', '--name-only']).strip().split() + if not files_to_save: + print 'INFO: no changed files. Exiting...' + sys.exit(0) + + record_dir = tempfile.mkdtemp() + print 'INFO: saving changed files to %s' % record_dir + + for file_to_save in files_to_save: + # Skip files that are deleted, since resolving those conflicts should be + # trivial. + # TODO(dcheng): Be more clever and stage this fact somehow? + if not os.path.isfile(file_to_save): + continue + print 'Saving %s' % file_to_save + shutil.copyfile(file_to_save, + os.path.join(record_dir, + hashlib.sha256(file_to_save).hexdigest())) + + _check_call_git( + ['config', _GIT_CONFIG_BRANCH_RECORDS % current_branch, record_dir]) + _check_call_git(['reset', '--hard']) + print 'INFO: finished preparing branch %s' % current_branch + + +def _update_branch(current_branch, tracking_branch, rebase=True): + if not _commit_is_ancestor_of(_BEFORE_RENAME_COMMIT, tracking_branch): + print 'ERROR: tracking branch not prepared yet; run --prepare on tracking ' + print ' branch first.' + sys.exit(1) + if not _commit_is_ancestor_of(_RENAME_COMMIT, tracking_branch): + print 'ERROR: tracking branch not updated yet; run --update on tracking ' + print ' branch first.' + sys.exit(1) + if tracking_branch != 'refs/remotes/origin/master' and _commit_is_ancestor_of( + _AFTER_RENAME_COMMIT, tracking_branch): + print 'WARNING: tracking branch is already ahead of the rename commit.' + print ' The reliability of the tool will be much lower.' + if not _prompt_yes_or_no('Continue', default='no'): + sys.exit(1) + if not _commit_is_ancestor_of(_BEFORE_RENAME_COMMIT, 'HEAD'): + print 'ERROR: current branch not yet prepared; run --prepare first.' + sys.exit(1) + if _commit_is_ancestor_of(_RENAME_COMMIT, 'HEAD'): + print 'ERROR: current branch appears to already be updated.' + sys.exit(1) + prepared_records = None + try: + prepared_records = _check_call_git_and_get_output( + ['config', '--get', + _GIT_CONFIG_BRANCH_RECORDS % current_branch]).strip() + except subprocess.CalledProcessError: + # Likely failed because it's not set. Fall through and fail out + pass + if not prepared_records: + print 'ERROR: current branch is not prepared yet; run --prepare first.' + sys.exit(1) + + if not os.path.isdir(prepared_records): + print 'ERROR: records directory %s is invalid.' % prepared_records + sys.exit(1) + + # TODO(dcheng): Ideally this part would be automated, but I'm failing to think + # of a nice way to do it... + args = [] + if rebase: + args.append('rebase') + else: + args.append('merge') + if tracking_branch == 'refs/remotes/origin/master': + args.append(_RENAME_COMMIT) + with _MergeTool(): + if _call_git( + args, env=dict(os.environ, + BLINK_RENAME_RECORDS_PATH=prepared_records)) != 0: + print 'ERROR: failed to update. Please resolve any remaining conflicts ' + print ' manually.' + + print 'INFO: updated branch %s' % current_branch + + +def run(): + # run.py made a poor life choice. Workaround that here by (hopefully) changing + # the working directory back to the git repo root. + os.chdir(os.path.join('..', '..')) + + parser = argparse.ArgumentParser() + parser.add_argument('-C', metavar='DIR', help='Path to build directory.') + parser.add_argument( + '-j', metavar='N', help='Number of ninja jobs to run in parallel.') + parser.add_argument( + '--merge', + action='store_true', + help='Use merge instead of rebase to update the branch. Not recommended.') + tool_mode = parser.add_mutually_exclusive_group(required=True) + tool_mode.add_argument( + '--prepare', + action='store_true', + help='Prepare the branch for updating across the rename commit.') + tool_mode.add_argument( + '--finish-prepare', + action='store_true', + help='Finish preparing the branch for updating across the rename commit.') + tool_mode.add_argument( + '--update', + action='store_true', + help='Update the branch across the rename commit.') + args = parser.parse_args() + + current_branch, tracking_branch = _get_branch_info() + + if tracking_branch != 'refs/remotes/origin/master': + print 'WARNING: The script is more fragile when the tracking branch ' + print ' is not refs/remotes/origin/master.' + # Default to danger mode. + if not _prompt_yes_or_no('Continue', default='yes'): + sys.exit(1) + + _ensure_origin_contains_commit() + + if args.prepare: + _ensure_clean_tree() + _prepare_branch(current_branch, tracking_branch, args.C, args.j, + not args.merge) + elif args.finish_prepare: + _finish_prepare_branch(current_branch) + else: + _ensure_clean_tree() + _update_branch(current_branch, tracking_branch, not args.merge)
diff --git a/tools/blink_rename_merge_helper/pylib/blink_rename_merge_helper/merge.py b/tools/blink_rename_merge_helper/pylib/blink_rename_merge_helper/merge.py new file mode 100755 index 0000000..69df1a7 --- /dev/null +++ b/tools/blink_rename_merge_helper/pylib/blink_rename_merge_helper/merge.py
@@ -0,0 +1,37 @@ +#!/usr/bin/env python +# Copyright 2017 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. +"""Merge driver for the Blink rename merge helper.""" + +import hashlib +import os +import shutil +import subprocess +import sys + + +def main(): + if len(sys.argv) < 5: + print('usage: %s <base> <current> <others> <path in the tree>' % + sys.argv[0]) + sys.exit(1) + + base, current, others, file_name_in_tree = sys.argv[1:5] + + # If set, try to resolve conflicts based on the precalculated file. + if 'BLINK_RENAME_RECORDS_PATH' in os.environ: + file_hash = hashlib.sha256(file_name_in_tree).hexdigest() + saved_file = os.path.join(os.environ['BLINK_RENAME_RECORDS_PATH'], + file_hash) + if os.path.isfile(saved_file): + print 'Using pre-recorded conflict resolution for %s' % file_name_in_tree + shutil.copyfile(saved_file, current) + shutil.copyfile(others, base) + + return subprocess.call(['git', 'merge-file', '-Lcurrent', '-Lbase', '-Lother', + current, base, others]) + + +if __name__ == '__main__': + sys.exit(main())
diff --git a/tools/blink_rename_merge_helper/run.py b/tools/blink_rename_merge_helper/run.py new file mode 100755 index 0000000..2387e278 --- /dev/null +++ b/tools/blink_rename_merge_helper/run.py
@@ -0,0 +1,161 @@ +#!/usr/bin/env python +# Copyright 2017 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. +"""Tool to help developers rebase branches across the Blink rename.""" + +import argparse +import json +import os +import subprocess +import shutil +import sys +import tempfile + + +class _DepotToolsNotFoundException(Exception): + pass + + +def _whereis(name): + """Find and return the first entry in $PATH containing a file named |name|. + + Returns the path if found; otherwise returns nothing. + """ + for path in os.environ['PATH'].split(os.pathsep): + if os.path.exists(os.path.join(path, name)): + return path + + +def _find_depot_tools(): + """Attempts to configure and return a wrapper for invoking depot tools. + + Returns: + A helper object for invoking depot tools. + + Raises: + _DepotToolsNotFoundException: An error occurred trying to find depot tools. + """ + + class DepotToolsWrapper(object): + + def __init__(self, path): + self.__download_from_google_storage = os.path.join( + path, 'download_from_google_storage.py') + self.__gsutil = os.path.join(path, 'gsutil.py') + + def call_download_from_google_storage(self, *args): + """Runs download_from_google_storage with the given args.""" + subprocess.check_call(['python', self.__download_from_google_storage] + + list(args)) + + def call_gsutil(self, *args): + """Runs gsutil with the given args.""" + subprocess.check_call(['python', self.__gsutil] + list(args)) + + # Attempt to find download_from_google_storage.py from depot_tools + path = _whereis('download_from_google_storage.py') + if not path: + raise _DepotToolsNotFoundException( + 'download_from_google_storage.py not found. Make sure depot_tools is ' + 'in $PATH.') + + # Make sure gsutil.py is in the same location + path2 = _whereis('download_from_google_storage.py') + if not path2: + raise _DepotToolsNotFoundException( + 'gsutil.py not found. Make sure depot_tools is in $PATH.') + + if path != path2: + raise _DepotToolsNotFoundException( + 'download_from_google_storage.py found in %s but gsutil.py found in %s.' + % (path, path2)) + + return DepotToolsWrapper(path) + + +class Bootstrapper(object): + """Helper class for bootstrapping startup of the rebase helper. + + Performs update checks and stages any required binaries.""" + + def __init__(self, depot_tools, components_manifest_name): + """Bootstrapper constructor. + + Args: + depot_tools: a wrapper for invoking depot_tools. + components_manifest_name: The name of the components manifest. + """ + self.__depot_tools = depot_tools + self.__components_manifest_name = components_manifest_name + self.__tmpdir = None + + def __enter__(self): + self.__tmpdir = tempfile.mkdtemp() + return self + + def __exit__(self, exc_type, exc_value, traceback): + shutil.rmtree(self.__tmpdir, ignore_errors=True) + + def update(self): + """Performs an update check for various components.""" + components = self._get_latest_components() + for name, sha1_hash in components.iteritems(): + args = [ + '--no_auth', '--no_resume', '-b', 'chromium-blink-rename', + '--extract', sha1_hash + ] + if '-' in name: + name, platform = name.split('-', 1) + args.append('-p') + args.append(platform) + args.append('-o') + args.append(os.path.join('staging', '%s.tar.gz' % name)) + self.__depot_tools.call_download_from_google_storage(*args) + + def _get_latest_components(self): + """Fetches info about the latest components from google storage. + + The return value should be a dict of component names to SHA1 hashes.""" + components_path = os.path.join(self.__tmpdir, 'COMPONENTS') + self.__depot_tools.call_gsutil( + 'cp', 'gs://chromium-blink-rename/%s' % self.__components_manifest_name, + components_path) + with open(components_path) as f: + return json.loads(f.read()) + + +def main(): + # Intentionally suppress help. These are internal testing flags. + parser = argparse.ArgumentParser(add_help=False) + parser.add_argument('--components-manifest-name', default='COMPONENTS') + parser.add_argument('--pylib-path') + args, remaining_argv = parser.parse_known_args() + + script_dir = os.path.dirname(os.path.realpath(__file__)) + os.chdir(script_dir) + + try: + depot_tools = _find_depot_tools() + except _DepotToolsNotFoundException as e: + print e.message + return 1 + + print 'Checking for updates...' + with Bootstrapper(depot_tools, args.components_manifest_name) as bootstrapper: + bootstrapper.update() + + # Import stage 2 and launch it. + tool_pylib = args.pylib_path + if not tool_pylib: + tool_pylib = os.path.abspath(os.path.join(script_dir, 'staging/pylib')) + sys.path.insert(0, tool_pylib) + from blink_rename_merge_helper import driver + # Note: for compatibility with older versions of run.py, set sys.argv to the + # unconsumed args. + sys.argv = sys.argv[:1] + remaining_argv + driver.run() + + +if __name__ == '__main__': + sys.exit(main())
diff --git a/tools/boilerplate.py b/tools/boilerplate.py index ada43a0..8d63438 100755 --- a/tools/boilerplate.py +++ b/tools/boilerplate.py
@@ -60,12 +60,28 @@ return base[:-l] return base + +def _IsIOSFile(filename): + if os.path.splitext(os.path.basename(filename))[0].endswith('_ios'): + return True + if 'ios' in filename.split(os.path.sep): + return True + return False + + def _CppImplementation(filename): return '\n#include "' + _RemoveTestSuffix(filename) + '.h"\n' def _ObjCppImplementation(filename): - return '\n#import "' + _RemoveTestSuffix(filename) + '.h"\n' + implementation = '\n#import "' + _RemoveTestSuffix(filename) + '.h"\n' + if not _IsIOSFile(filename): + return implementation + implementation += '\n' + implementation += '#if !defined(__has_feature) || !__has_feature(objc_arc)\n' + implementation += '#error "This file requires ARC support."\n' + implementation += '#endif\n' + return implementation def _CreateFile(filename):
diff --git a/tools/cfi/blacklist.txt b/tools/cfi/blacklist.txt index 4b19c288a..ec3da8c 100644 --- a/tools/cfi/blacklist.txt +++ b/tools/cfi/blacklist.txt
@@ -66,9 +66,6 @@ # Skia -# https://crbug.com/638064#c1 -fun:*SkPictureUtils*ApproximateBytesUsed* - # https://crbug.com/638056#c1 fun:*SkCanvas*onDrawRect*
diff --git a/tools/check_grd_for_unused_strings.py b/tools/check_grd_for_unused_strings.py index 8124b576..21afc8a 100755 --- a/tools/check_grd_for_unused_strings.py +++ b/tools/check_grd_for_unused_strings.py
@@ -152,7 +152,7 @@ os.path.join(chrome_dir, 'renderer', 'resources', 'renderer_resources.grd'), os.path.join(device_base_dir, 'bluetooth', 'bluetooth_strings.grd'), - os.path.join(src_dir, 'extensions', 'extensions_strings.grd'), + os.path.join(src_dir, 'extensions', 'strings', 'extensions_strings.grd'), os.path.join(src_dir, 'ui', 'resources', 'ui_resources.grd'), os.path.join(src_dir, 'ui', 'webui', 'resources', 'webui_resources.grd'), os.path.join(ui_strings_dir, 'app_locale_settings.grd'),
diff --git a/tools/checklicenses/checklicenses.py b/tools/checklicenses/checklicenses.py index 3d27b0f2..0e28311 100755 --- a/tools/checklicenses/checklicenses.py +++ b/tools/checklicenses/checklicenses.py
@@ -649,6 +649,10 @@ # Don't check sysroot directories 'build/linux/debian_jessie_arm64-sysroot', + 'build/linux/debian_jessie_amd64-sysroot', + 'build/linux/debian_jessie_arm-sysroot', + 'build/linux/debian_jessie_i386-sysroot', + 'build/linux/debian_jessie_mips-sysroot', 'build/linux/debian_wheezy_amd64-sysroot', 'build/linux/debian_wheezy_arm-sysroot', 'build/linux/debian_wheezy_i386-sysroot',
diff --git a/tools/checkperms/checkperms.py b/tools/checkperms/checkperms.py index 9960558..81c2cf5 100755 --- a/tools/checkperms/checkperms.py +++ b/tools/checkperms/checkperms.py
@@ -192,7 +192,6 @@ 'third_party/libxml/src/ltmain.sh', 'third_party/mesa/', 'third_party/protobuf/', - 'third_party/python_gflags/gflags.py', 'third_party/sqlite/', 'third_party/talloc/script/mksyms.sh', 'third_party/tcmalloc/',
diff --git a/tools/checkteamtags/extract_components.py b/tools/checkteamtags/extract_components.py index e944894..1b385cc 100755 --- a/tools/checkteamtags/extract_components.py +++ b/tools/checkteamtags/extract_components.py
@@ -124,6 +124,28 @@ file_pct_with_team_component_by_depth} +def display_missing_info_OWNERS_files(stats, num_output_depth): + """Display OWNERS files that have missing team and component by depth. + + OWNERS files that have no team and no component information will be shown + for each depth level (up to the level given by num_output_depth). + + Args: + stats (dict): The statistics in dictionary form as produced by the + owners_file_tags module. + num_output_depth (int): number of levels to be displayed. + """ + print "OWNERS files that have missing team and component by depth:" + max_output_depth = len(stats['OWNERS-count-by-depth']) + if (num_output_depth < 0 + or num_output_depth > max_output_depth): + num_output_depth = max_output_depth + + for depth in range(0, num_output_depth): + print 'at depth %(depth)d'%{'depth': depth} + print stats['OWNERS-missing-info-by-depth'][depth] + + def main(argv): usage = """Usage: python %prog [options] [<root_dir>] root_dir specifies the topmost directory to traverse looking for OWNERS @@ -138,6 +160,7 @@ python %prog -o ~/components.json /b/build/src python %prog -c /b/build/src python %prog -s 3 /b/build/src + python %prog -m 2 /b/build/src """ parser = optparse.OptionParser(usage=usage) parser.add_option('-w', '--write', action='store_true', @@ -153,13 +176,20 @@ help='Print complete coverage statistic') parser.add_option('-s', '--stat_coverage', type="int", help='Specify directory depth to display coverage stats') + parser.add_option('--include-subdirs', action='store_true', default=False, + help='List subdirectories without OWNERS file or component ' + 'tag as having same component as parent') + parser.add_option('-m', '--list_missing_info_by_depth', type="int", + help='List OWNERS files that have missing team and ' + 'component information by depth') options, args = parser.parse_args(argv[1:]) if args: root = args[0] else: root = _DEFAULT_SRC_LOCATION - mappings, warnings, errors, stats = aggregate_components_from_owners(root) + mappings, warnings, errors, stats = aggregate_components_from_owners( + root, include_subdirs=options.include_subdirs) if options.verbose: for w in warnings: print w @@ -170,6 +200,10 @@ if options.stat_coverage or options.complete_coverage: display_stat(stats, root, options) + if options.list_missing_info_by_depth: + display_missing_info_OWNERS_files(stats, + options.list_missing_info_by_depth) + mappings['AAA-README']= _README mapping_file_contents = json.dumps(mappings, sort_keys=True, indent=2) if options.write or options.output_file:
diff --git a/tools/checkteamtags/extract_components_test.py b/tools/checkteamtags/extract_components_test.py index 0f99f4e..186c7b2 100644 --- a/tools/checkteamtags/extract_components_test.py +++ b/tools/checkteamtags/extract_components_test.py
@@ -2,6 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +from collections import OrderedDict import json import os import sys @@ -20,8 +21,11 @@ os_walk_mocks = [] file_mocks = {} for path in tree: - os_walk_mocks.append((path, ('ignored'), ('OWNERS', 'dummy.cc'))) - file_mocks[os.path.join(path, 'OWNERS')] = tree[path] + if tree[path] is not None: + os_walk_mocks.append((path, ('ignored'), ('OWNERS', 'dummy.cc'))) + file_mocks[os.path.join(path, 'OWNERS')] = tree[path] + else: + os_walk_mocks.append((path, ('ignored'), ('dummy.cc'))) def custom_mock_open(files_data): def inner_open(path, mode='r'): @@ -162,3 +166,64 @@ self.assertIn('3 (75.00%) OWNERS files have COMPONENT', output) self.assertIn('2 (50.00%) OWNERS files have TEAM and COMPONENT', output) self.assertIn('4 OWNERS files at depth 0', output) + + # We use OrderedDict here to guarantee that mocked version of os.walk returns + # directories in the specified order (top-down). + @mock_file_tree(OrderedDict([ + ('chromium/src', 'boss@chromium.org\n'), + ('chromium/src/dir1', 'dummy@chromium.org\n' + '# TEAM: dummy-team@chromium.org\n' + '# COMPONENT: Dummy>Component'), + ('chromium/src/dir2', 'dummy2@chromium.org\n' + '# TEAM: other-dummy-team@chromium.org\n' + '# COMPONENT: Dummy>Component2'), + ('chromium/src/dir1/subdir', 'dummy@chromium.org'), + ('chromium/src/dir2/subdir', None), + ('third_party/WebKit/LayoutTests/foo', + '# TEAM: dummy-team-3@chromium.org\n'), + ('third_party/WebKit/LayoutTests/bar', + '# TEAM: dummy-team-3@chromium.org\n' + '# COMPONENT: Dummy>Component3\n'), + ])) + def testIncludesSubdirectoriesWithNoOwnersFileOrNoComponentTag(self): + self.maxDiff = None # This helps to see assertDictEqual errors in full. + saved_output = StringIO() + with mock.patch('sys.stdout', saved_output): + error_code = extract_components.main(['%prog', '--include-subdirs', '']) + self.assertEqual(0, error_code) + result_minus_readme = json.loads(saved_output.getvalue()) + del result_minus_readme['AAA-README'] + self.assertDictEqual(result_minus_readme, { + u'component-to-team': { + u'Dummy>Component': u'dummy-team@chromium.org', + u'Dummy>Component2': u'other-dummy-team@chromium.org', + u'Dummy>Component3': u'dummy-team-3@chromium.org', + }, + u'dir-to-component': { + u'chromium/src/dir1': u'Dummy>Component', + u'chromium/src/dir1/subdir': u'Dummy>Component', + u'chromium/src/dir2': u'Dummy>Component2', + u'chromium/src/dir2/subdir': u'Dummy>Component2', + u'third_party/WebKit/LayoutTests/bar': u'Dummy>Component3', + }, + u'dir-to-team': { + u'third_party/WebKit/LayoutTests/foo': u'dummy-team-3@chromium.org', + }}) + + @mock_file_tree({ + 'src': 'boss@chromium.org\n', + 'src/dummydir1': 'dummy@chromium.org\n' + '# TEAM: dummy-team@chromium.org\n' + '# COMPONENT: Dummy>Component', + 'src/dummydir1/innerdir1': 'dummy@chromium.org\n' + '# TEAM: dummy-specialist-team@chromium.org\n' + '# COMPONENT: Dummy>Component>Subcomponent'}) + def testDisplayFile(self): + saved_output = StringIO() + with mock.patch('sys.stdout', saved_output): + extract_components.main(['%prog', '-m 2']) + output = saved_output.getvalue() + self.assertIn('OWNERS files that have missing team and component by depth:', + output) + self.assertIn('at depth 0', output) + self.assertIn('[\'tools/checkteamtags/src/OWNERS\']', output)
diff --git a/tools/checkteamtags/owners_file_tags.py b/tools/checkteamtags/owners_file_tags.py index d2e3fe9..941b368f 100644 --- a/tools/checkteamtags/owners_file_tags.py +++ b/tools/checkteamtags/owners_file_tags.py
@@ -32,7 +32,7 @@ return team, component -def aggregate_components_from_owners(root): +def aggregate_components_from_owners(root, include_subdirs=False): """Traverses the given dir and parse OWNERS files for team and component tags. Args: @@ -62,9 +62,14 @@ warnings = [] component_to_team = defaultdict(set) dir_to_component = {} + dir_missing_info_by_depth = defaultdict(list) + # TODO(sergiyb): Remove this mapping. Please do not use it as it is going to + # be removed in the future. See http://crbug.com/702202. + dir_to_team = {} for dirname, _, files in os.walk(root): # Proofing against windows casing oddities. owners_file_names = [f for f in files if f.upper() == 'OWNERS'] + rel_dirname = os.path.relpath(dirname, root) if owners_file_names: file_depth = dirname[len(root) + len(os.path.sep):].count(os.path.sep) num_total += 1 @@ -75,15 +80,32 @@ if component: num_with_component += 1 num_with_component_by_depth[file_depth] += 1 - dir_to_component[os.path.relpath(dirname, root)] = component + dir_to_component[rel_dirname] = component if team: num_with_team_component += 1 num_with_team_component_by_depth[file_depth] += 1 component_to_team[component].add(team) else: warnings.append('%s has no COMPONENT tag' % owners_rel_path) + if not team: + dir_missing_info_by_depth[file_depth].append(owners_rel_path) + + # Add dir-to-team mapping unless there is also dir-to-component mapping. + if (include_subdirs and team and not component and + rel_dirname.startswith('third_party/WebKit/LayoutTests')): + dir_to_team[rel_dirname] = team + + if include_subdirs and rel_dirname not in dir_to_component: + rel_parent_dirname = os.path.relpath(os.path.dirname(dirname), root) + if rel_parent_dirname in dir_to_component: + dir_to_component[rel_dirname] = dir_to_component[rel_parent_dirname] + if rel_parent_dirname in dir_to_team: + dir_to_team[rel_dirname] = dir_to_team[rel_parent_dirname] + mappings = {'component-to-team': component_to_team, 'dir-to-component': dir_to_component} + if include_subdirs: + mappings['dir-to-team'] = dir_to_team errors = validate_one_team_per_component(mappings) stats = {'OWNERS-count': num_total, 'OWNERS-with-component-only-count': num_with_component, @@ -92,7 +114,9 @@ 'OWNERS-with-component-only-count-by-depth': num_with_component_by_depth, 'OWNERS-with-team-and-component-count-by-depth': - num_with_team_component_by_depth} + num_with_team_component_by_depth, + 'OWNERS-missing-info-by-depth': + dir_missing_info_by_depth} return unwrap(mappings), warnings, errors, stats
diff --git a/tools/chrome_extensions/open_my_editor/ext/background.js b/tools/chrome_extensions/open_my_editor/ext/background.js index 7065510..cdf79e1 100644 --- a/tools/chrome_extensions/open_my_editor/ext/background.js +++ b/tools/chrome_extensions/open_my_editor/ext/background.js
@@ -2,78 +2,76 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -function get_query(uri, key) { - if (uri.includes('?')) { - let query_str = uri.split('?')[1]; - let queries = query_str.split('&'); - for (let query of queries) { - let ss = query.split('='); - if (ss.length == 2 && ss[0] == key) - return ss[1]; - } - } - return undefined; +// lineNumber defaults to 1 if it doesn't parse as an int or is zero. +function openFile(filepath, lineNumber) { + lineNumber = parseInt(lineNumber); + if (!lineNumber) + lineNumber = 1; + fetch('http://127.0.0.1:8989/file?f=' + filepath + '&l=' + lineNumber); } -function open_by_selection(selectionText) { - if (selectionText) - fetch('http://127.0.0.1:8989/file?f=' + selectionText + '&l=1'); +function openFiles(filepaths) { + fetch('http://127.0.0.1:8989/files?f=' + filepaths.join(',,')); } -function open_by_link(pageUrl, info, tabId) { - if (pageUrl.startsWith('https://cs.chromium.org/')) { - if (info.linkUrl.startsWith('https://cs.chromium.org/chromium/src/')) { - let filepath = - info.linkUrl.replace('https://cs.chromium.org/chromium/src/', '') - .replace(/\?.*/, ''); - let line = get_query(info.linkUrl, 'l'); - line = line != undefined ? line : '1'; - fetch('http://127.0.0.1:8989/file?f=' + filepath + '&l=' + line); - } - } else if (pageUrl.startsWith('https://codereview.chromium.org/')) { - if (info.linkUrl.match('https://codereview.chromium.org/.*/patch/') != - null) { +function openByLink(info, tabId) { + let pageHostname = new URL(info.pageUrl).hostname; + let linkUrl = new URL(info.linkUrl); + + if (pageHostname == 'cs.chromium.org') { + let match = linkUrl.pathname.match(/^\/chromium\/src\/(.*)/); + let line = linkUrl.searchParams.get('l'); + if (match) + openFile(match[1], line); + } else if (pageHostname == 'codereview.chromium.org') { + // 'patch' links don't contain the filename so we query the page. + if (linkUrl.pathname.match(/^\/\d+\/patch\//)) { chrome.tabs.sendMessage(tabId, 'getFile', (res) => { if (res.file) - fetch('http://127.0.0.1:8989/file?f=' + res.file + '&l=1'); + openFile(res.file); }); - } else if ( - info.linkUrl.match( - /https:\/\/codereview.chromium.org\/\d*\/diff\/\d*\//) != null) { - let filepath = info.linkUrl.replace( - /https:\/\/codereview.chromium.org\/\d*\/diff\/\d*\//, ''); - fetch('http://127.0.0.1:8989/file?f=' + filepath + '&l=1'); + return; } + + // See if it's a 'diff' link with the filename in the pathname. + let match = linkUrl.pathname.match(/^\/\d+\/diff\/\d+\/(.*)/); + if (!match) + return; + filepath = match[1]; + + // Comment links may have the line number in the hash component. + let line = linkUrl.hash.replace(/#newcode/, '') + openFile(filepath, line); } } -function cs_open_by_current_line(tabId, url) { +function csOpenCurrentFile(tabId, pageUrl) { chrome.tabs.sendMessage(tabId, 'getLine', (res) => { - let line = res.line; - - let filepath = url.replace('https://cs.chromium.org/chromium/src/', '') - .replace(/\?.*/, ''); - - fetch('http://127.0.0.1:8989/file?f=' + filepath + '&l=' + line); + let filepath = pageUrl.pathname.replace(/\/chromium\/src\//, ''); + // If we couldn't get the line number by inspecting the clicked element, + // try to get it from the query params. + let line = res.line ? res.line : pageUrl.searchParams.get('l'); + openFile(filepath, line); }); } -function cr_open_all_in_patchset(tabId) { +function crOpenAllInPatchset(tabId) { chrome.tabs.sendMessage(tabId, 'getFiles', (res) => { - fetch('http://127.0.0.1:8989/files?f=' + res.files.join(',,')); + openFiles(res.files); }); } chrome.contextMenus.onClicked.addListener((info, tab) => { if (info.menuItemId == 'ome-selection') { - open_by_selection(info.selectionText); + openFile(info.selectionText.replace(/\s*/g, '')); } else if (info.menuItemId == 'ome-link') { - open_by_link(tab.url, info, tab.id); + openByLink(info, tab.id); } else if (info.menuItemId == 'ome') { - if (tab.url.startsWith('https://cs.chromium.org/chromium/src/')) { - cs_open_by_current_line(tab.id, tab.url); - } else if (tab.url.startsWith('https://codereview.chromium.org/')) { - cr_open_all_in_patchset(tab.id); + let pageUrl = new URL(info.pageUrl); + if (pageUrl.hostname == 'cs.chromium.org') { + csOpenCurrentFile(tab.id, pageUrl); + } else if (pageUrl.hostname == 'codereview.chromium.org') { + crOpenAllInPatchset(tab.id); } } });
diff --git a/tools/chrome_extensions/open_my_editor/ext/cr-content.js b/tools/chrome_extensions/open_my_editor/ext/cr-content.js index 10860ed..07ad147 100644 --- a/tools/chrome_extensions/open_my_editor/ext/cr-content.js +++ b/tools/chrome_extensions/open_my_editor/ext/cr-content.js
@@ -6,15 +6,14 @@ let clicked_element = null; -document.addEventListener('mousedown', (event) => { - // right click - if (event.button == 2) - clicked_element = event.target; +document.addEventListener('contextmenu', (event) => { + clicked_element = event.target; }); chrome.runtime.onMessage.addListener((request, sender, sendResponse) => { if (request == 'getFiles') { let element = clicked_element; + clicked_element = null; while (element != null && element.tagName != 'TABLE') element = element.parentElement; @@ -22,7 +21,9 @@ if (trs.length == 0) alert('Please toggle one patchset.'); - let files = []; + // TODO(watk): Sometimes this approach collects duplicates, but I'm not + // sure of the conditions under which it happens, so use a Set for now. + let files = new Set(); for (let i = 1; i < trs.length; ++i) { let tr = trs[i]; if (tr.getAttribute('name') != 'patch') @@ -31,11 +32,13 @@ if (tr.children[1].firstChild.data == 'D') continue; - files.push(tr.children[2].children[0].text.replace(/\s*/g, '')); + files.add(tr.children[2].children[0].text.replace(/\s*/g, '')); } - sendResponse({files: files}); + sendResponse({files: Array.from(files)}); } else if (request == 'getFile' && clicked_element.tagName == 'A') { - sendResponse({file: clicked_element.text}); + let filepath = clicked_element.text.replace(/\s*/g, ''); + clicked_element = null; + sendResponse({file: filepath}); } -}); \ No newline at end of file +});
diff --git a/tools/chrome_extensions/open_my_editor/ext/cs-content.js b/tools/chrome_extensions/open_my_editor/ext/cs-content.js index 7df1b85..2cdb2ab2 100644 --- a/tools/chrome_extensions/open_my_editor/ext/cs-content.js +++ b/tools/chrome_extensions/open_my_editor/ext/cs-content.js
@@ -6,17 +6,14 @@ let line = 0; -document.addEventListener('mousedown', (event) => { - // right click - if (event.button == 2) { - let element = event.target; - while (element != null && element.tagName == 'SPAN') { - if (element.className == 'stx-line') { - line = parseInt(element.id.split('_')[1]); - break; - } else { - element = element.parentElement; - } +document.addEventListener('contextmenu', (event) => { + let element = event.target; + while (element != null && element.tagName == 'SPAN') { + if (element.className == 'stx-line') { + line = parseInt(element.id.split('_')[1]); + break; + } else { + element = element.parentElement; } } }, true); @@ -24,5 +21,6 @@ chrome.runtime.onMessage.addListener((request, sender, sendResponse) => { if (request == 'getLine') { sendResponse({line: line}); + line = 0; } -}); \ No newline at end of file +});
diff --git a/tools/chrome_extensions/open_my_editor/ext/manifest.json b/tools/chrome_extensions/open_my_editor/ext/manifest.json index a5e6518..8019254 100644 --- a/tools/chrome_extensions/open_my_editor/ext/manifest.json +++ b/tools/chrome_extensions/open_my_editor/ext/manifest.json
@@ -1,7 +1,7 @@ { "name": "OME", "description": "OME gives you a context menu for opening files in your editor on Chromium Code Search and Code Review.", - "version": "0.4.0", + "version": "0.5.0", "permissions": [ "contextMenus", "tabs",
diff --git a/tools/chrome_proxy/common/inspector_network.py b/tools/chrome_proxy/common/inspector_network.py index 8f4d463..01349d00 100644 --- a/tools/chrome_proxy/common/inspector_network.py +++ b/tools/chrome_proxy/common/inspector_network.py
@@ -4,8 +4,8 @@ import logging from telemetry.core import exceptions -from telemetry.timeline import trace_data from telemetry.timeline import model +from tracing.trace_data import trace_data class InspectorNetworkException(Exception):
diff --git a/tools/chrome_proxy/webdriver/bypass.py b/tools/chrome_proxy/webdriver/bypass.py index 3b7798a..7eb98e1c5 100644 --- a/tools/chrome_proxy/webdriver/bypass.py +++ b/tools/chrome_proxy/webdriver/bypass.py
@@ -102,6 +102,96 @@ for response in responses: self.assertHasChromeProxyViaHeader(response) + # Verify that when Chrome receives a 4xx response through a Data Reduction + # Proxy that doesn't set a proper via header, Chrome bypasses all proxies and + # retries the request over direct. + def testMissingViaHeader4xxBypass(self): + with TestDriver() as test_driver: + test_driver.AddChromeArg('--enable-spdy-proxy-auth') + + # Set the primary Data Reduction Proxy to be the test server, which does + # not add any Via headers. + test_driver.AddChromeArg('--data-reduction-proxy-http-proxies=' + 'https://chromeproxy-test.appspot.com;' + 'http://compress.googlezip.net') + + # Load a page that will come back with a 4xx response code and without the + # proper via header. Chrome should bypass all proxies and retry the + # request. + test_driver.LoadURL( + 'http://chromeproxy-test.appspot.com/default?respStatus=414') + responses = test_driver.GetHTTPResponses() + self.assertNotEqual(0, len(responses)) + for response in responses: + self.assertNotHasChromeProxyViaHeader(response) + self.assertEqual(u'http/1.1', response.protocol) + + # Check that the BlockTypePrimary histogram has at least one entry in the + # MissingViaHeader4xx category (which is enum value 4), to make sure that + # the bypass was caused by the missing via header logic and not something + # else. The favicon for this URL may also be fetched, but will return a + # 404. + histogram = test_driver.GetHistogram( + "DataReductionProxy.BlockTypePrimary") + self.assertNotEqual(0, histogram['count']) + self.assertEqual(1, len(histogram['buckets'])) + self.assertEqual(5, histogram['buckets'][0]['high']) + self.assertEqual(4, histogram['buckets'][0]['low']) + + # Verify that the Data Reduction Proxy understands the "exp" directive. + def testExpDirectiveBypass(self): + # If it was attempted to run with another experiment, skip this test. + if common.ParseFlags().browser_args and ('--data-reduction-proxy-experiment' + in common.ParseFlags().browser_args): + self.skipTest('This test cannot be run with other experiments.') + with TestDriver() as test_driver: + test_driver.AddChromeArg('--enable-spdy-proxy-auth') + test_driver.AddChromeArg('--data-reduction-proxy-experiment=test') + + # Verify that loading a page other than the specific exp directive test + # page loads through the proxy without being bypassed. + test_driver.LoadURL('http://check.googlezip.net/test.html') + responses = test_driver.GetHTTPResponses() + self.assertNotEqual(0, len(responses)) + for response in responses: + self.assertHasChromeProxyViaHeader(response) + + # Verify that loading the exp directive test page with "exp=test" triggers + # a bypass. + test_driver.LoadURL('http://check.googlezip.net/exp/') + responses = test_driver.GetHTTPResponses() + self.assertNotEqual(0, len(responses)) + for response in responses: + self.assertNotHasChromeProxyViaHeader(response) + + # Verify that loading the same test page without setting "exp=test" loads + # through the proxy without being bypassed. + with TestDriver() as test_driver: + test_driver.AddChromeArg('--enable-spdy-proxy-auth') + + test_driver.LoadURL('http://check.googlezip.net/exp/') + responses = test_driver.GetHTTPResponses() + self.assertNotEqual(0, len(responses)) + for response in responses: + self.assertHasChromeProxyViaHeader(response) + + # Data Saver uses a HTTPS proxy by default, if that fails it will fall back to + # a HTTP proxy. + def testBadHTTPSFallback(self): + with TestDriver() as test_driver: + test_driver.AddChromeArg('--enable-spdy-proxy-auth') + # Set the primary (HTTPS) proxy to a bad one. + # That will force Data Saver to the HTTP proxy for normal page requests. + test_driver.AddChromeArg('--spdy-proxy-auth-origin=' + 'https://nonexistent.googlezip.net') + test_driver.AddChromeArg('--data-reduction-proxy-http-proxies=' + 'http://compress.googlezip.net') + + test_driver.LoadURL('http://check.googlezip.net/fallback/') + responses = test_driver.GetHTTPResponses() + self.assertNotEqual(0, len(responses)) + for response in responses: + self.assertEqual(80, response.port) if __name__ == '__main__': IntegrationTest.RunAllTests()
diff --git a/tools/chrome_proxy/webdriver/common.py b/tools/chrome_proxy/webdriver/common.py index 57bab09..9f2cb98 100644 --- a/tools/chrome_proxy/webdriver/common.py +++ b/tools/chrome_proxy/webdriver/common.py
@@ -561,9 +561,12 @@ Args: http_response: The HTTPResponse object to check. """ - expected_via_header = ParseFlags().via_header_value self.assertIn('via', http_response.response_headers) - self.assertEqual(expected_via_header, http_response.response_headers['via']) + expected_via_header = ParseFlags().via_header_value + actual_via_headers = http_response.response_headers['via'].split(',') + self.assertIn(expected_via_header, actual_via_headers, "Via header not in " + "response headers! Expected: %s, Actual: %s" % + (expected_via_header, actual_via_headers)) def assertNotHasChromeProxyViaHeader(self, http_response): """Asserts that the Via header in the given HTTPResponse does not match the @@ -572,11 +575,12 @@ Args: http_response: The HTTPResponse object to check. """ - expected_via_header = ParseFlags().via_header_value - self.assertNotIn('via', http_response.response_headers) if 'via' in http_response.response_headers: - self.assertNotIn(expected_via_header, - http_response.response_headers['via']) + expected_via_header = ParseFlags().via_header_value + actual_via_headers = http_response.response_headers['via'].split(',') + self.assertNotIn(expected_via_header, actual_via_headers, "Via header " + "found in response headers! Not expected: %s, Actual: %s" % + (expected_via_header, actual_via_headers)) def checkLoFiResponse(self, http_response, expected_lo_fi): """Asserts that if expected the response headers contain the Lo-Fi directive
diff --git a/tools/chrome_proxy/webdriver/compression_regression.py b/tools/chrome_proxy/webdriver/compression_regression.py index f6b1ee6..489a1ba 100644 --- a/tools/chrome_proxy/webdriver/compression_regression.py +++ b/tools/chrome_proxy/webdriver/compression_regression.py
@@ -11,10 +11,25 @@ import common from common import TestDriver from common import IntegrationTest +from common import NotAndroid # The maximum number of data points that will be saved. MAX_DATA_POINTS = 365 +# The number of days in the past to compute the average of for regression +# alerting. +ALERT_WINDOW = 31 + +# The amount of tolerable difference a single data point can be away from the +# average without alerting. This is a percentage from 0.0 to 1.0 inclusive. +# 3% was chosen because over the course of the first month no change was seen to +# 8 decimal places. Erring on the more sensitive side to begin with is also +# better so we get a better feel for the timing and degree of regressions. +THRESHOLD = 0.03 + +# The format to use when recording dates in the DATA_FILE +DATE_FORMAT = '%Y-%m-%d' + # The persistant storage for compression data is kept in Google Storage with # this bucket name. BUCKET = 'chrome_proxy_compression' @@ -66,12 +81,13 @@ classified as a regression test. """ + @NotAndroid def testCompression(self): """This function is the main test function for regression compression checking and facilitates the test with all of the helper functions' behavior. """ - compression_average = self.getCurrentCompressionMetrics() + compression_average = self.getCurrentCompressionMetricsWithRetry() self.fetchFromGoogleStorage() data = {} with open(DATA_FILE, 'r') as data_fp: @@ -81,6 +97,27 @@ json.dump(data, data_fp) self.uploadToGoogleStorage() + def getCurrentCompressionMetricsWithRetry(self, max_attempts=10): + """This function allows some number of attempts to be tried to fetch + compressed responses. Sometimes, the proxy will not have compressed results + available immediately, especially for video resources. + + Args: + max_attempts: the maximum number of attempts to try to fetch compressed + resources. + Returns: + a dict object mapping resource type to compression + """ + attempts = 0 + while attempts < max_attempts: + try: + return self.getCurrentCompressionMetrics() + except Exception as e: + attempts += 1 + time.sleep(2) + if attempts >= max_attempts: + raise Exception("Didn't get good response after %d attempts" % attempts) + def getCurrentCompressionMetrics(self): """This function uses the ChromeDriver framework to open Chrome and navigate to a number of static resources of different types, like jpg, png, mp4, gif, @@ -142,12 +179,12 @@ Args: compression_average: the compression data from getCurrentCompressionMetrics() - data: the current data object, a dict + data: all saved results from previous runs today: a date object, specifiable here for testing purposes. Returns: True iff the data object was changed """ - datestamp = today.strftime('%Y-%m-%d') + datestamp = today.strftime(DATE_FORMAT) # Check if this data has already been recorded. if datestamp in data: return False @@ -159,9 +196,44 @@ date = datetime.date(*[int(d) for d in date_str.split('-')]) if min_date == None or date < min_date: min_date = date - del data[min_date.strftime('%Y-%m-%d')] + del data[min_date.strftime(DATE_FORMAT)] return True + def checkForRegression(self, data, compression_average): + """This function checks whether the current data point in + compression_average falls outside an allowable tolerance for the last + ALERT_WINDOW days of data points in data. If so, an expection will be + rasied. + + Args: + data: all saved results from previous runs + compression_average: the most recent data point + """ + # Restructure data to be easily summable. + data_sum_rt = {} + for date in sorted(data, reverse=True): + for resource_type in data[date]: + if resource_type not in data_sum_rt: + data_sum_rt[resource_type] = [] + data_sum_rt[resource_type].append(data[date][resource_type]) + # Compute average over ALERT_WINDOW if there is enough data points. + # Data average will contain average compression ratios (eg: 1 - cl / xocl). + data_average = {} + for resource_type in data_sum_rt: + if len(data_sum_rt[resource_type]) >= ALERT_WINDOW: + data_average[resource_type] = sum( + data_sum_rt[resource_type][:ALERT_WINDOW]) / ALERT_WINDOW + # Check regression, raising an exception if anything is detected. + for resource_type in compression_average: + if resource_type in data_average: + expected = data_average[resource_type] + actual = compression_average[resource_type] + # Going over the max is ok, better compression is better. + min_allowable = expected - THRESHOLD + if actual < min_allowable: + raise Exception('%s compression has regressed to %f' % + (resource_type, actual)) + def uploadToGoogleStorage(self): """This function uses the gsutil command to upload the local data file to Google Storage. @@ -205,7 +277,7 @@ data = {} for i in range(MAX_DATA_POINTS): date_obj = start_date + datetime.timedelta(days=i) - datestamp = date_obj.strftime('%Y-%m-%d') + datestamp = date_obj.strftime(DATE_FORMAT) data[datestamp] = {'hello': 'world'} new_data = {'Benoit': 'Mandelbrot'} test_day = datetime.date(2017, 02, 06) + datetime.timedelta( @@ -213,7 +285,96 @@ changed = self.updateDataObject(new_data, data, today=test_day) self.assertTrue(changed, "Data should have been recorded!") self.assertNotIn('2017-02-06', data) - self.assertIn(test_day.strftime('%Y-%m-%d'), data) + self.assertIn(test_day.strftime(DATE_FORMAT), data) + + def test0CheckForRegressionAverageRecent(self): + """Make sure the checkForRegression() uses only the most recent data points. + """ + data = {} + start_date = datetime.date(2017, 2, 6) + for i in range(2 * ALERT_WINDOW): + date_obj = start_date + datetime.timedelta(days=i) + datestamp = date_obj.strftime(DATE_FORMAT) + data[datestamp] = {'mp4': 0.1} + start_date = datetime.date(2017, 2, 6) + datetime.timedelta(days=(2 * + ALERT_WINDOW)) + for i in range(ALERT_WINDOW): + date_obj = start_date + datetime.timedelta(days=i) + datestamp = date_obj.strftime(DATE_FORMAT) + data[datestamp] = {'mp4': 0.9} + # Expect no exception since the most recent data should have been used. + self.checkForRegression(data, {'mp4': 0.9}) + + def test0CheckForRegressionOnlySufficientData(self): + """Make sure the checkForRegression() only checks resource types that have + at least ALERT_WINDOW many data points. + """ + data = {} + start_date = datetime.date(2017, 2, 6) + for i in range(2 * ALERT_WINDOW): + date_obj = start_date + datetime.timedelta(days=i) + datestamp = date_obj.strftime(DATE_FORMAT) + data[datestamp] = {'mp4': 0.1} + start_date = datetime.date(2017, 2, 6) + datetime.timedelta(days=(2 * + ALERT_WINDOW)) + for i in range(ALERT_WINDOW): + date_obj = start_date + datetime.timedelta(days=i) + datestamp = date_obj.strftime(DATE_FORMAT) + data[datestamp] = {'mp4': 0.9} + for i in range(ALERT_WINDOW / 2): + date_obj = start_date + datetime.timedelta(days=i) + datestamp = date_obj.strftime(DATE_FORMAT) + data[datestamp] = {'html': 0.3} + # Expect no exception since the html should have been ignored for not having + # enough data points. + self.checkForRegression(data, {'mp4': 0.9, 'html': 0.1}) + + def test0CheckForRegressionMismatchResourceTypes(self): + """Make sure resource types that appear in only one of compression_average, + data are not used or expected. + """ + # Check using an extra resource type in the compression_average object. + data = {} + start_date = datetime.date(2017, 2, 6) + for i in range(ALERT_WINDOW): + date_obj = start_date + datetime.timedelta(days=i) + datestamp = date_obj.strftime(DATE_FORMAT) + data[datestamp] = {'mp4': 0.9} + self.checkForRegression(data, {'mp4': 0.9, 'html': 0.2}) + # Check using an extra resource type in the data object. + data = {} + start_date = datetime.date(2017, 2, 6) + for i in range(ALERT_WINDOW): + date_obj = start_date + datetime.timedelta(days=i) + datestamp = date_obj.strftime(DATE_FORMAT) + data[datestamp] = {'mp4': 0.9, 'html': 0.2} + self.checkForRegression(data, {'mp4': 0.9}) + + def test0CheckForRegressionNoAlert(self): + """Make sure checkForRegression does not alert when a new data point falls + on the threshold. + """ + data = {} + start_date = datetime.date(2017, 2, 6) + for i in range(ALERT_WINDOW): + date_obj = start_date + datetime.timedelta(days=i) + datestamp = date_obj.strftime(DATE_FORMAT) + data[datestamp] = {'mp4': 0.9} + self.checkForRegression(data, {'mp4': (0.9 - THRESHOLD)}) + + def test0CheckForRegressionAlert(self): + """Make sure checkForRegression does alert when a new data point falls + outside of the threshold. + """ + data = {} + start_date = datetime.date(2017, 2, 6) + for i in range(ALERT_WINDOW): + date_obj = start_date + datetime.timedelta(days=i) + datestamp = date_obj.strftime(DATE_FORMAT) + data[datestamp] = {'mp4': 0.9} + self.assertRaises(Exception, self.checkForRegression, data, {'mp4': + (0.9 - THRESHOLD - 0.01)}) + if __name__ == '__main__': IntegrationTest.RunAllTests()
diff --git a/tools/chrome_proxy/webdriver/data_use.py b/tools/chrome_proxy/webdriver/data_use.py index c241b8c5..b91c760e 100644 --- a/tools/chrome_proxy/webdriver/data_use.py +++ b/tools/chrome_proxy/webdriver/data_use.py
@@ -7,10 +7,13 @@ import common from common import TestDriver from common import IntegrationTest +from common import NotAndroid class DataUseAscription(IntegrationTest): + # This test uses a desktop extension and cannot be run on Android. + @NotAndroid def testDataUseAscription(self): ext_path = os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os.pardir, 'chrome', 'test', 'data',
diff --git a/tools/chrome_proxy/webdriver/fallback.py b/tools/chrome_proxy/webdriver/fallback.py index 4de3956..2b60ee9d 100644 --- a/tools/chrome_proxy/webdriver/fallback.py +++ b/tools/chrome_proxy/webdriver/fallback.py
@@ -36,5 +36,62 @@ self.assertHasChromeProxyViaHeader(response) self.assertEqual(u'http/1.1', response.protocol) + # Verify that when Chrome receives a non-4xx response through a Data Reduction + # Proxy that doesn't set a proper via header, Chrome falls back to the next + # available proxy. + def testMissingViaHeaderNon4xxFallback(self): + with TestDriver() as test_driver: + test_driver.AddChromeArg('--enable-spdy-proxy-auth') + + # Set the primary Data Reduction Proxy to be the test server, which does + # not add any Via headers. The fallback Data Reduction Proxy is set to the + # canonical Data Reduction Proxy target. + test_driver.AddChromeArg('--data-reduction-proxy-http-proxies=' + 'https://chromeproxy-test.appspot.com;' + 'http://compress.googlezip.net') + + # Load a page that should fall back off of the test server proxy, and onto + # the canonical proxy that will set the correct Via header. + test_driver.LoadURL('http://chromeproxy-test.appspot.com/default') + responses = test_driver.GetHTTPResponses() + self.assertNotEqual(0, len(responses)) + for response in responses: + self.assertHasChromeProxyViaHeader(response) + self.assertEqual(u'http/1.1', response.protocol) + + # Check that the BypassTypePrimary histogram has a single entry in the + # MissingViaHeaderOther category (which is enum value 5), to make sure + # that the bypass was caused by the missing via header logic and not + # something else. + histogram = test_driver.GetHistogram( + "DataReductionProxy.BypassTypePrimary") + self.assertEqual(1, histogram['count']) + self.assertIn({'count': 1, 'high': 6, 'low': 5}, histogram['buckets']) + + # DataSaver uses a https proxy by default, if that fails it will fall back to + # a http proxy; and if that fails, it will fall back to a direct connection + def testHTTPToDirectFallback(self): + with TestDriver() as test_driver: + test_driver.AddChromeArg('--enable-spdy-proxy-auth') + # set the primary (https) proxy to a bad one. + # That will force DataSaver to the http proxy for normal page requests. + test_driver.AddChromeArg('--spdy-proxy-auth-origin=' + 'https://nonexistent.googlezip.net') + test_driver.AddChromeArg('--data-reduction-proxy-http-proxies=' + 'http://nonexistent.googlezip.net;' + 'http://compress.googlezip.net') + + test_driver.LoadURL('http://check.googlezip.net/fallback/') + responses = test_driver.GetHTTPResponses() + self.assertNotEqual(0, len(responses)) + for response in responses: + self.assertEqual(80, response.port) + + test_driver.LoadURL('http://check.googlezip.net/block/') + responses = test_driver.GetHTTPResponses() + self.assertNotEqual(0, len(responses)) + for response in responses: + self.assertNotHasChromeProxyViaHeader(response) + if __name__ == '__main__': IntegrationTest.RunAllTests()
diff --git a/tools/chrome_proxy/webdriver/lite_page.py b/tools/chrome_proxy/webdriver/lite_page.py index a833813..d7fe48aa 100644 --- a/tools/chrome_proxy/webdriver/lite_page.py +++ b/tools/chrome_proxy/webdriver/lite_page.py
@@ -12,6 +12,10 @@ # Checks that a Lite Page is served and that the ignore_preview_blacklist # experiment is being used. def testLitePage(self): + # If it was attempted to run with another experiment, skip this test. + if common.ParseFlags().browser_args and ('--data-reduction-proxy-experiment' + in common.ParseFlags().browser_args): + self.skipTest('This test cannot be run with other experiments.') with TestDriver() as test_driver: test_driver.AddChromeArg('--enable-spdy-proxy-auth') test_driver.AddChromeArg('--data-reduction-proxy-lo-fi=always-on')
diff --git a/tools/chrome_proxy/webdriver/lofi.py b/tools/chrome_proxy/webdriver/lofi.py index fca1f85..18935a0 100644 --- a/tools/chrome_proxy/webdriver/lofi.py +++ b/tools/chrome_proxy/webdriver/lofi.py
@@ -45,6 +45,10 @@ # load should not pick the Lo-Fi placeholder from cache and original image # should be loaded. def testLoFiCacheBypass(self): + # If it was attempted to run with another experiment, skip this test. + if common.ParseFlags().browser_args and ('--data-reduction-proxy-experiment' + in common.ParseFlags().browser_args): + self.skipTest('This test cannot be run with other experiments.') with TestDriver() as test_driver: # First page load, enable Lo-Fi and chrome proxy. Disable server # experiments such as tamper detection. This test should be run with
diff --git a/tools/chrome_proxy/webdriver/quic.py b/tools/chrome_proxy/webdriver/quic.py new file mode 100644 index 0000000..03f8f2c --- /dev/null +++ b/tools/chrome_proxy/webdriver/quic.py
@@ -0,0 +1,59 @@ +# Copyright 2017 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. + +import common +from common import TestDriver +from common import IntegrationTest + + +class Quic(IntegrationTest): + + # Ensure Chrome uses DataSaver when QUIC is enabled. This test should pass + # even if QUIC is disabled on the server side. In that case, Chrome should + # fallback to using the non-QUIC proxies. + def testCheckPageWithQuicProxy(self): + with TestDriver() as t: + t.AddChromeArg('--enable-spdy-proxy-auth') + t.AddChromeArg('--enable-quic') + # Enable QUIC for non-core HTTPS proxies. + t.AddChromeArg('--data-reduction-proxy-enable-quic-on-non-core-proxies') + t.AddChromeArg('--force-fieldtrials=DataReductionProxyUseQuic/Enabled') + t.LoadURL('http://check.googlezip.net/test.html') + responses = t.GetHTTPResponses() + self.assertEqual(2, len(responses)) + for response in responses: + self.assertHasChromeProxyViaHeader(response) + + # Ensure Chrome uses QUIC DataSaver proxy when QUIC is enabled. This test + # may fail if QUIC is disabled on the server side. + def testCheckPageWithQuicProxyTransaction(self): + with TestDriver() as t: + t.AddChromeArg('--enable-spdy-proxy-auth') + t.AddChromeArg('--enable-quic') + # Enable QUIC for non-core HTTPS proxies. + t.AddChromeArg('--data-reduction-proxy-enable-quic-on-non-core-proxies') + t.AddChromeArg('--force-fieldtrials=DataReductionProxyUseQuic/Enabled') + t.LoadURL('http://check.googlezip.net/test.html') + responses = t.GetHTTPResponses() + self.assertEqual(2, len(responses)) + for response in responses: + self.assertHasChromeProxyViaHeader(response) + + # Verify that histogram DataReductionProxy.Quic.ProxyStatus has at least 1 + # sample. This sample must be in bucket 0 (QUIC_PROXY_STATUS_AVAILABLE). + proxy_status = t.GetHistogram('DataReductionProxy.Quic.ProxyStatus') + self.assertLessEqual(1, proxy_status['count']) + self.assertEqual(0, proxy_status['sum']) + + # Navigate to one more page to ensure that established QUIC connection + # is used for the next request. Give 3 seconds extra headroom for the QUIC + # connection to be established. + time.sleep(3) + t.LoadURL('http://check.googlezip.net/test.html') + proxy_usage = t.GetHistogram('Net.QuicAlternativeProxy.Usage') + # Bucket ALTERNATIVE_PROXY_USAGE_NO_RACE should have at least onesample. + self.assertLessEqual(1, proxy_usage['buckets'][0]['count']) + +if __name__ == '__main__': + IntegrationTest.RunAllTests()
diff --git a/tools/chrome_proxy/webdriver/reenable_after_bypass.py b/tools/chrome_proxy/webdriver/reenable_after_bypass.py new file mode 100644 index 0000000..b5e9daf --- /dev/null +++ b/tools/chrome_proxy/webdriver/reenable_after_bypass.py
@@ -0,0 +1,83 @@ +# Copyright 2017 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. + +import time + +import common +from common import TestDriver +from common import IntegrationTest + + +class ReenableAfterBypass(IntegrationTest): + """Tests for ensuring that DRPs are reenabled after bypasses expire. + + These tests take a very long time to run since they wait for their respective + bypasses to expire. These tests have been separated out into their own file in + order to make it easier to run these tests separately from the others. + """ + + # Verify that longer bypasses triggered by the Data Reduction Proxy only last + # as long as they're supposed to, and that the proxy is used once again after + # the bypass has ended. + def testReenableAfterSetBypass(self): + with TestDriver() as test_driver: + test_driver.AddChromeArg('--enable-spdy-proxy-auth') + + # Load URL that triggers a 20-second bypass of all proxies. + test_driver.LoadURL('http://check.googlezip.net/block20/') + responses = test_driver.GetHTTPResponses() + self.assertNotEqual(0, len(responses)) + for response in responses: + self.assertNotHasChromeProxyViaHeader(response) + + # Verify that the Data Reduction Proxy is still bypassed. + test_driver.LoadURL('http://check.googlezip.net/test.html') + responses = test_driver.GetHTTPResponses() + self.assertNotEqual(0, len(responses)) + for response in responses: + self.assertNotHasChromeProxyViaHeader(response) + + # Verify that the Data Reduction Proxy is no longer bypassed after 20 + # seconds. + time.sleep(20) + test_driver.LoadURL('http://check.googlezip.net/test.html') + responses = test_driver.GetHTTPResponses() + self.assertNotEqual(0, len(responses)) + for response in responses: + self.assertHasChromeProxyViaHeader(response) + + # Verify that when the Data Reduction Proxy responds with the "block=0" + # directive, Chrome bypasses all proxies for the next 1-5 minutes. + def testReenableAfterBypass(self): + with TestDriver() as test_driver: + test_driver.AddChromeArg('--enable-spdy-proxy-auth') + + # Load URL that triggers a bypass of all proxies that lasts between 1 and + # 5 minutes. + test_driver.LoadURL('http://check.googlezip.net/block/') + responses = test_driver.GetHTTPResponses() + self.assertNotEqual(0, len(responses)) + for response in responses: + self.assertNotHasChromeProxyViaHeader(response) + + # Verify that the Data Reduction Proxy is still bypassed after 30 seconds. + time.sleep(30) + test_driver.LoadURL('http://check.googlezip.net/test.html') + responses = test_driver.GetHTTPResponses() + self.assertNotEqual(0, len(responses)) + for response in responses: + self.assertNotHasChromeProxyViaHeader(response) + + # Verify that the Data Reduction Proxy is no longer bypassed 5 minutes + # after the original bypass was triggered. + time.sleep(60 * 4 + 30) + test_driver.LoadURL('http://check.googlezip.net/test.html') + responses = test_driver.GetHTTPResponses() + self.assertNotEqual(0, len(responses)) + for response in responses: + self.assertHasChromeProxyViaHeader(response) + + +if __name__ == '__main__': + IntegrationTest.RunAllTests()
diff --git a/tools/chrome_proxy/webdriver/smoke.py b/tools/chrome_proxy/webdriver/smoke.py index b54dd7f..f29dc235 100644 --- a/tools/chrome_proxy/webdriver/smoke.py +++ b/tools/chrome_proxy/webdriver/smoke.py
@@ -3,13 +3,17 @@ # found in the LICENSE file. import common +import time from common import TestDriver from common import IntegrationTest +from common import NotAndroid class Smoke(IntegrationTest): # Ensure Chrome does not use DataSaver in Incognito mode. + # Clank does not honor the --incognito flag. + @NotAndroid def testCheckPageWithIncognito(self): with TestDriver() as t: t.AddChromeArg('--enable-spdy-proxy-auth') @@ -17,19 +21,71 @@ t.LoadURL('http://check.googlezip.net/test.html') for response in t.GetHTTPResponses(): self.assertNotHasChromeProxyViaHeader(response) - - # Ensure Chrome uses DataSaver with QUIC enabled. - def testCheckPageWithQuicProxy(self): + + # Ensure Chrome uses DataSaver in normal mode. + def testCheckPageWithNormalMode(self): with TestDriver() as t: t.AddChromeArg('--enable-spdy-proxy-auth') - t.AddChromeArg('--enable-quic') - t.AddChromeArg('--data-reduction-proxy-http-proxies=https://proxy.googlezip.net:443') - t.AddChromeArg('--force-fieldtrials=DataReductionProxyUseQuic/Enabled') + t.LoadURL('http://check.googlezip.net/test.html') + responses = t.GetHTTPResponses() + self.assertNotEqual(0, len(responses)) + for response in responses: + self.assertHasChromeProxyViaHeader(response) + + # Ensure pageload metric pingback with DataSaver. + def testPingback(self): + with TestDriver() as t: + t.AddChromeArg('--enable-spdy-proxy-auth') + t.AddChromeArg('--enable-data-reduction-proxy-force-pingback') + t.LoadURL('http://check.googlezip.net/test.html') + t.LoadURL('http://check.googlezip.net/test.html') + t.SleepUntilHistogramHasEntry("DataReductionProxy.Pingback.Succeeded") + # Verify one pingback attempt that was successful. + attempted = t.GetHistogram('DataReductionProxy.Pingback.Attempted') + self.assertEqual(1, attempted['count']) + succeeded = t.GetHistogram('DataReductionProxy.Pingback.Succeeded') + self.assertEqual(1, succeeded['count']) + + # Ensure client config is fetched at the start of the Chrome session, and the + # session ID is correctly set in the chrome-proxy request header. + def testClientConfig(self): + with TestDriver() as t: + t.AddChromeArg('--enable-spdy-proxy-auth') + t.SleepUntilHistogramHasEntry( + 'DataReductionProxy.ConfigService.FetchResponseCode') t.LoadURL('http://check.googlezip.net/test.html') responses = t.GetHTTPResponses() self.assertEqual(2, len(responses)) for response in responses: + chrome_proxy_header = response.request_headers['chrome-proxy'] + self.assertIn('s=', chrome_proxy_header) + self.assertNotIn('ps=', chrome_proxy_header) + self.assertNotIn('sid=', chrome_proxy_header) + # Verify that the proxy server honored the session ID. self.assertHasChromeProxyViaHeader(response) + self.assertEqual(200, response.status) + + # Ensure that block causes resources to load from the origin directly. + def testCheckBlockIsWorking(self): + with TestDriver() as t: + t.AddChromeArg('--enable-spdy-proxy-auth') + t.LoadURL('http://check.googlezip.net/block') + responses = t.GetHTTPResponses() + self.assertNotEqual(0, len(responses)) + for response in responses: + self.assertNotHasChromeProxyViaHeader(response) + + # Ensure image, css, and javascript resources are compressed. + def testCheckImageCssJavascriptIsCompressed(self): + with TestDriver() as t: + t.AddChromeArg('--enable-spdy-proxy-auth') + t.LoadURL('http://check.googlezip.net/static') + # http://check.googlezip.net/static is a test page that has + # image/css/javascript resources. + responses = t.GetHTTPResponses() + self.assertNotEqual(0, len(responses)) + for response in responses: + self.assertHasChromeProxyViaHeader(response) if __name__ == '__main__': IntegrationTest.RunAllTests()
diff --git a/tools/chrome_proxy/webdriver/video.py b/tools/chrome_proxy/webdriver/video.py index c080b8b..2d59f2b 100644 --- a/tools/chrome_proxy/webdriver/video.py +++ b/tools/chrome_proxy/webdriver/video.py
@@ -18,7 +18,9 @@ t.AddChromeArg('--enable-spdy-proxy-auth') t.LoadURL( 'http://check.googlezip.net/cacheable/video/buck_bunny_tiny.html') - for response in t.GetHTTPResponses(): + responses = t.GetHTTPResponses() + self.assertEquals(2, len(responses)) + for response in responses: self.assertHasChromeProxyViaHeader(response) # Videos fetched via an XHR request should not be proxied. @@ -45,6 +47,7 @@ # Check the compressed video has the same frame count, width, height, and # duration as uncompressed. + @NotAndroid def testVideoMetrics(self): expected = { 'duration': 3.124, @@ -75,10 +78,12 @@ % (metric, expected[metric], actual), places=None, delta=0.001) # Check the frames of a compressed video. + @NotAndroid def testVideoFrames(self): self.instrumentedVideoTest('http://check.googlezip.net/cacheable/video/buck_bunny_640x360_24fps_video.html') # Check the audio volume of a compressed video. + @NotAndroid def testVideoAudio(self): self.instrumentedVideoTest('http://check.googlezip.net/cacheable/video/buck_bunny_640x360_24fps_audio.html')
diff --git a/tools/clang/base_bind_rewriters/BaseBindRewriters.cpp b/tools/clang/base_bind_rewriters/BaseBindRewriters.cpp index 55877c3..5d4fc132 100644 --- a/tools/clang/base_bind_rewriters/BaseBindRewriters.cpp +++ b/tools/clang/base_bind_rewriters/BaseBindRewriters.cpp
@@ -29,42 +29,51 @@ namespace { -// Remove unneeded scoped_refptr<>::get on a receivers of method bind. +// Replace base::Bind() to base::BindOnce() where resulting base::Callback is +// implicitly converted into base::OnceCallback. // Example: // // Before -// scoped_refptr<Foo> foo; -// base::Bind(&Foo::Bar, foo.get()); +// base::PostTask(FROM_HERE, base::Bind(&Foo)); +// base::OnceCallback<void()> cb = base::Bind(&Foo); // // // After -// scoped_refptr<Foo> foo; -// base::Bind(&Foo::Bar, foo); -// -class ScopedRefptrGetRewriter : public MatchFinder::MatchCallback { +// base::PostTask(FROM_HERE, base::BindOnce(&Foo)); +// base::OnceCallback<void()> cb = base::BindOnce(&Foo); +class BindOnceRewriter : public MatchFinder::MatchCallback { public: - explicit ScopedRefptrGetRewriter(Replacements* replacements) + explicit BindOnceRewriter(Replacements* replacements) : replacements_(replacements) {} StatementMatcher GetMatcher() { - auto is_bind_call = callee(namedDecl(hasName("::base::Bind"))); - auto is_method_bind = hasArgument(0, hasType(memberPointerType())); - auto is_raw_pointer_receiver = hasArgument(1, hasType(pointerType())); - auto is_scoped_refptr_get_call = - cxxMemberCallExpr(thisPointerType(namedDecl(hasName("scoped_refptr"))), - callee(namedDecl(hasName("get")))); - return callExpr(is_bind_call, is_method_bind, is_raw_pointer_receiver, - hasArgument(1, is_scoped_refptr_get_call), - hasArgument(1, stmt().bind("target"))); + auto is_once_callback = hasType(classTemplateSpecializationDecl( + hasName("::base::Callback"), + hasTemplateArgument(1, equalsIntegralValue("0")), + hasTemplateArgument(2, equalsIntegralValue("0")))); + auto is_repeating_callback = hasType(classTemplateSpecializationDecl( + hasName("::base::Callback"), + hasTemplateArgument(1, equalsIntegralValue("1")), + hasTemplateArgument(2, equalsIntegralValue("1")))); + + auto bind_call = + callExpr(callee(namedDecl(hasName("::base::Bind")))).bind("target"); + auto parameter_construction = + cxxConstructExpr(is_repeating_callback, argumentCountIs(1), + hasArgument(0, ignoringImplicit(bind_call))); + auto constructor_conversion = cxxConstructExpr( + is_once_callback, argumentCountIs(1), + hasArgument(0, ignoringImplicit(parameter_construction))); + auto implicit_conversion = implicitCastExpr( + is_once_callback, hasSourceExpression(constructor_conversion)); + return implicit_conversion; } void run(const MatchFinder::MatchResult& result) override { - auto* target = result.Nodes.getNodeAs<clang::CXXMemberCallExpr>("target"); - auto* member = llvm::cast<clang::MemberExpr>(target->getCallee()); - assert(target && member && "Unexpected match! No Expr captured!"); + auto* target = result.Nodes.getNodeAs<clang::CallExpr>("target"); + auto* callee = target->getCallee(); auto range = clang::CharSourceRange::getTokenRange( - result.SourceManager->getSpellingLoc(member->getOperatorLoc()), - result.SourceManager->getSpellingLoc(target->getLocEnd())); - - replacements_->emplace_back(*result.SourceManager, range, ""); + result.SourceManager->getSpellingLoc(callee->getLocEnd()), + result.SourceManager->getSpellingLoc(callee->getLocEnd())); + replacements_->emplace_back(*result.SourceManager, range, "BindOnce"); } private: @@ -87,10 +96,8 @@ MatchFinder match_finder; std::vector<clang::tooling::Replacement> replacements; - - ScopedRefptrGetRewriter scoped_refptr_rewriter(&replacements); - match_finder.addMatcher(scoped_refptr_rewriter.GetMatcher(), - &scoped_refptr_rewriter); + BindOnceRewriter bind_once_rewriter(&replacements); + match_finder.addMatcher(bind_once_rewriter.GetMatcher(), &bind_once_rewriter); std::unique_ptr<clang::tooling::FrontendActionFactory> factory = clang::tooling::newFrontendActionFactory(&match_finder);
diff --git a/tools/clang/base_bind_rewriters/tests/callback-temporary-converted-to-once-callback-expected.cc b/tools/clang/base_bind_rewriters/tests/callback-temporary-converted-to-once-callback-expected.cc new file mode 100644 index 0000000..44c02ec --- /dev/null +++ b/tools/clang/base_bind_rewriters/tests/callback-temporary-converted-to-once-callback-expected.cc
@@ -0,0 +1,19 @@ +// Copyright 2017 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. + +#include "callback.h" + +void Foo(base::OnceClosure) {} + +void Test() { + base::OnceClosure cb = base::BindOnce([] {}); + Foo(base::BindOnce([] {})); + + using namespace base; + + OnceClosure cb2 = BindOnce([] {}); + Foo(BindOnce([] {})); + + Closure cb3 = base::Bind([] {}); +}
diff --git a/tools/clang/base_bind_rewriters/tests/callback-temporary-converted-to-once-callback-original.cc b/tools/clang/base_bind_rewriters/tests/callback-temporary-converted-to-once-callback-original.cc new file mode 100644 index 0000000..66a7361 --- /dev/null +++ b/tools/clang/base_bind_rewriters/tests/callback-temporary-converted-to-once-callback-original.cc
@@ -0,0 +1,19 @@ +// Copyright 2017 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. + +#include "callback.h" + +void Foo(base::OnceClosure) {} + +void Test() { + base::OnceClosure cb = base::Bind([] {}); + Foo(base::Bind([] {})); + + using namespace base; + + OnceClosure cb2 = Bind([] {}); + Foo(Bind([] {})); + + Closure cb3 = base::Bind([] {}); +}
diff --git a/tools/clang/base_bind_rewriters/tests/callback.h b/tools/clang/base_bind_rewriters/tests/callback.h new file mode 100644 index 0000000..f6d8c4b --- /dev/null +++ b/tools/clang/base_bind_rewriters/tests/callback.h
@@ -0,0 +1,68 @@ +// Copyright 2017 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. + +#include <utility> + +namespace base { +namespace internal { + +enum class CopyMode { MoveOnly, Copyable }; +enum class RepeatMode { Once, Repeating }; + +} // namespace internal + +template <typename Signature, + internal::CopyMode copy_mode = internal::CopyMode::Copyable, + internal::RepeatMode repeat_mode = internal::RepeatMode::Repeating> +class Callback; + +template <typename Signature> +using OnceCallback = Callback<Signature, + internal::CopyMode::MoveOnly, + internal::RepeatMode::Once>; +template <typename Signature> +using RepeatingCallback = Callback<Signature, + internal::CopyMode::Copyable, + internal::RepeatMode::Repeating>; + +using Closure = Callback<void()>; +using OnceClosure = OnceCallback<void()>; +using RepeatingClosure = RepeatingCallback<void()>; + +namespace internal { + +template <typename From, typename To> +struct IsCallbackConvertible : std::false_type {}; + +template <typename Signature> +struct IsCallbackConvertible<RepeatingCallback<Signature>, + OnceCallback<Signature>> : std::true_type {}; + +} // namespace internal + +template <typename Signature, internal::CopyMode, internal::RepeatMode> +class Callback { + public: + Callback() {} + Callback(const Callback&) {} + Callback(Callback&&) {} + + template <typename OtherCallback, + typename = typename std::enable_if< + internal::IsCallbackConvertible<OtherCallback, + Callback>::value>::type> + Callback(OtherCallback other) {} +}; + +template <typename Functor, typename... Args> +Callback<void()> Bind(Functor, Args&&...) { + return Callback<void()>(); +} + +template <typename Functor, typename... Args> +OnceCallback<void()> BindOnce(Functor, Args&&...) { + return Callback<void()>(); +} + +} // namespace base
diff --git a/tools/clang/base_bind_rewriters/tests/test-expected.cc b/tools/clang/base_bind_rewriters/tests/test-expected.cc deleted file mode 100644 index 59a3b1c4..0000000 --- a/tools/clang/base_bind_rewriters/tests/test-expected.cc +++ /dev/null
@@ -1,35 +0,0 @@ -// Copyright 2016 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. - -template <typename> -class scoped_refptr { - public: - void* get() { return 0; } -}; - -namespace base { - -template <typename Functor, typename... Args> -void Bind(Functor&&, Args&&...) {} - -} // namespace base - -struct Foo { - void Bar(); - static void Baz(); -}; - -void Test() { - using base::Bind; - scoped_refptr<int> foo; - base::Bind(&Foo::Bar, foo); - Bind(&Foo::Bar, foo); - base::Bind(&Foo::Bar, (&foo)); - base::Bind(&Foo::Bar, foo); - base::Bind(&Foo::Bar, foo); - base::Bind(&Foo::Bar, foo, foo.get()); - base::Bind(&Foo::Baz, foo.get()); - base::Bind(&Foo::Bar, foo); - base::Bind(&Foo::Bar, (&foo)); -}
diff --git a/tools/clang/base_bind_rewriters/tests/test-original.cc b/tools/clang/base_bind_rewriters/tests/test-original.cc deleted file mode 100644 index 89acfde..0000000 --- a/tools/clang/base_bind_rewriters/tests/test-original.cc +++ /dev/null
@@ -1,37 +0,0 @@ -// Copyright 2016 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. - -template <typename> -class scoped_refptr { - public: - void* get() { return 0; } -}; - -namespace base { - -template <typename Functor, typename... Args> -void Bind(Functor&&, Args&&...) {} - -} // namespace base - -struct Foo { - void Bar(); - static void Baz(); -}; - -void Test() { - using base::Bind; - scoped_refptr<int> foo; - base::Bind(&Foo::Bar, foo.get()); - Bind(&Foo::Bar, foo.get()); - base::Bind(&Foo::Bar, (&foo)->get()); - base::Bind(&Foo::Bar, foo.get( - )); - base::Bind(&Foo::Bar, foo - .get()); - base::Bind(&Foo::Bar, foo.get(), foo.get()); - base::Bind(&Foo::Baz, foo.get()); - base::Bind(&Foo::Bar, foo.scoped_refptr<int>::get()); - base::Bind(&Foo::Bar, (&foo)->scoped_refptr<int>::get()); -}
diff --git a/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp b/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp index 43b064c..08572bc 100644 --- a/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp +++ b/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp
@@ -33,14 +33,10 @@ for (const auto& arg : args) { if (arg == "dump-graph") { options_.dump_graph = true; - } else if (arg == "warn-stack-allocated-trace-method") { - // TODO(sof): after next roll, remove this option to round out - // crbug.com/689874 - continue; } else if (arg == "warn-unneeded-finalizer") { options_.warn_unneeded_finalizer = true; } else if (arg == "use-chromium-style-naming") { - options_.use_chromium_style_naming = true; + // TODO(dcheng): Remove this once the build no longer passes this flag. } else { llvm::errs() << "Unknown blink-gc-plugin argument: " << arg << "\n"; return false;
diff --git a/tools/clang/blink_gc_plugin/BlinkGCPluginConsumer.cpp b/tools/clang/blink_gc_plugin/BlinkGCPluginConsumer.cpp index 771d3f8..a770f82 100644 --- a/tools/clang/blink_gc_plugin/BlinkGCPluginConsumer.cpp +++ b/tools/clang/blink_gc_plugin/BlinkGCPluginConsumer.cpp
@@ -75,9 +75,6 @@ // Ignore GC implementation files. options_.ignored_directories.push_back("/heap/"); - - if (!options_.use_chromium_style_naming) - Config::UseLegacyNames(); } void BlinkGCPluginConsumer::HandleTranslationUnit(ASTContext& context) {
diff --git a/tools/clang/blink_gc_plugin/BlinkGCPluginOptions.h b/tools/clang/blink_gc_plugin/BlinkGCPluginOptions.h index fee044b..7aee25f 100644 --- a/tools/clang/blink_gc_plugin/BlinkGCPluginOptions.h +++ b/tools/clang/blink_gc_plugin/BlinkGCPluginOptions.h
@@ -16,9 +16,6 @@ // GarbageCollectedFinalized<> when just GarbageCollected<> will do. bool warn_unneeded_finalizer = false; - // TODO(https://crbug.com/675879): Clean up after the Blink rename. - bool use_chromium_style_naming = false; - std::set<std::string> ignored_classes; std::set<std::string> checked_namespaces; std::vector<std::string> ignored_directories;
diff --git a/tools/clang/blink_gc_plugin/CMakeLists.txt b/tools/clang/blink_gc_plugin/CMakeLists.txt index 66549ed..009807b 100644 --- a/tools/clang/blink_gc_plugin/CMakeLists.txt +++ b/tools/clang/blink_gc_plugin/CMakeLists.txt
@@ -30,11 +30,6 @@ endforeach() set_property(TARGET clang APPEND PROPERTY SOURCES ${absolute_sources}) - # TODO(https://crbug.com/675879): Clean up after the Blink rename. - cr_add_test(blink_gc_plugin_legacy_test - python tests/legacy_naming/test.py - ${CMAKE_BINARY_DIR}/bin/clang - ) cr_add_test(blink_gc_plugin_test python tests/test.py ${CMAKE_BINARY_DIR}/bin/clang @@ -45,12 +40,6 @@ cr_install(TARGETS "lib${LIBRARYNAME}" LIBRARY DESTINATION lib) - # TODO(https://crbug.com/675879): Clean up after the Blink rename. - cr_add_test(blink_gc_plugin_legacy_test - python tests/legacy_naming/test.py - ${CMAKE_BINARY_DIR}/bin/clang - $<TARGET_FILE:lib${LIBRARYNAME}> - ) cr_add_test(blink_gc_plugin_test python tests/test.py ${CMAKE_BINARY_DIR}/bin/clang
diff --git a/tools/clang/blink_gc_plugin/Config.cpp b/tools/clang/blink_gc_plugin/Config.cpp index fa00782c..df8867a9 100644 --- a/tools/clang/blink_gc_plugin/Config.cpp +++ b/tools/clang/blink_gc_plugin/Config.cpp
@@ -10,45 +10,24 @@ using namespace clang; -// Legacy names to be removed after Blink rename: -namespace legacy { -const char kCreateName[] = "create"; -const char kTraceName[] = "trace"; -const char kFinalizeName[] = "finalizeGarbageCollectedObject"; -const char kTraceAfterDispatchName[] = "traceAfterDispatch"; -const char kRegisterWeakMembersName[] = "registerWeakMembers"; -const char kAdjustAndMarkName[] = "adjustAndMark"; -const char kIsHeapObjectAliveName[] = "isHeapObjectAlive"; -} // namespace legacy - const char kNewOperatorName[] = "operator new"; -const char* kCreateName = "Create"; -const char* kTraceName = "Trace"; -const char* kFinalizeName = "FinalizeGarbageCollectedObject"; -const char* kTraceAfterDispatchName = "TraceAfterDispatch"; -const char* kRegisterWeakMembersName = "RegisterWeakMembers"; +const char kCreateName[] = "Create"; +const char kTraceName[] = "Trace"; +const char kFinalizeName[] = "FinalizeGarbageCollectedObject"; +const char kTraceAfterDispatchName[] = "TraceAfterDispatch"; +const char kRegisterWeakMembersName[] = "RegisterWeakMembers"; const char kHeapAllocatorName[] = "HeapAllocator"; const char kTraceIfNeededName[] = "TraceIfNeeded"; const char kVisitorDispatcherName[] = "VisitorDispatcher"; const char kVisitorVarName[] = "visitor"; -const char* kAdjustAndMarkName = "AdjustAndMark"; -const char* kIsHeapObjectAliveName = "IsHeapObjectAlive"; +const char kAdjustAndMarkName[] = "AdjustAndMark"; +const char kIsHeapObjectAliveName[] = "IsHeapObjectAlive"; const char kIsEagerlyFinalizedName[] = "IsEagerlyFinalizedMarker"; const char kConstIteratorName[] = "const_iterator"; const char kIteratorName[] = "iterator"; const char kConstReverseIteratorName[] = "const_reverse_iterator"; const char kReverseIteratorName[] = "reverse_iterator"; -void Config::UseLegacyNames() { - kCreateName = legacy::kCreateName; - kTraceName = legacy::kTraceName; - kFinalizeName = legacy::kFinalizeName; - kTraceAfterDispatchName = legacy::kTraceAfterDispatchName; - kRegisterWeakMembersName = legacy::kRegisterWeakMembersName; - kAdjustAndMarkName = legacy::kAdjustAndMarkName; - kIsHeapObjectAliveName = legacy::kIsHeapObjectAliveName; -} - bool Config::IsTemplateInstantiation(CXXRecordDecl* record) { ClassTemplateSpecializationDecl* spec = dyn_cast<clang::ClassTemplateSpecializationDecl>(record);
diff --git a/tools/clang/blink_gc_plugin/Config.h b/tools/clang/blink_gc_plugin/Config.h index f0c4aec..13d38e8 100644 --- a/tools/clang/blink_gc_plugin/Config.h +++ b/tools/clang/blink_gc_plugin/Config.h
@@ -18,17 +18,17 @@ #include "clang/AST/Attr.h" extern const char kNewOperatorName[]; -extern const char* kCreateName; -extern const char* kTraceName; -extern const char* kFinalizeName; -extern const char* kTraceAfterDispatchName; -extern const char* kRegisterWeakMembersName; +extern const char kCreateName[]; +extern const char kTraceName[]; +extern const char kFinalizeName[]; +extern const char kTraceAfterDispatchName[]; +extern const char kRegisterWeakMembersName[]; extern const char kHeapAllocatorName[]; extern const char kTraceIfNeededName[]; extern const char kVisitorDispatcherName[]; extern const char kVisitorVarName[]; -extern const char* kAdjustAndMarkName; -extern const char* kIsHeapObjectAliveName; +extern const char kAdjustAndMarkName[]; +extern const char kIsHeapObjectAliveName[]; extern const char kIsEagerlyFinalizedName[]; extern const char kConstIteratorName[]; extern const char kIteratorName[]; @@ -37,8 +37,6 @@ class Config { public: - static void UseLegacyNames(); - static bool IsMember(const std::string& name) { return name == "Member"; }
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/.gitignore b/tools/clang/blink_gc_plugin/tests/legacy_naming/.gitignore deleted file mode 100644 index 8564477..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/.gitignore +++ /dev/null
@@ -1,2 +0,0 @@ -/*.o -/*.txt.actual
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/base_class_must_define_virtual_trace.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/base_class_must_define_virtual_trace.cpp deleted file mode 100644 index cd38ec9..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/base_class_must_define_virtual_trace.cpp +++ /dev/null
@@ -1,19 +0,0 @@ -// Copyright 2014 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. - -#include "base_class_must_define_virtual_trace.h" - -namespace blink { - -void PartDerived::trace(Visitor* visitor) -{ -} - -void HeapDerived::trace(Visitor* visitor) -{ - visitor->trace(m_part); -} - - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/base_class_must_define_virtual_trace.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/base_class_must_define_virtual_trace.h deleted file mode 100644 index fbd26d73..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/base_class_must_define_virtual_trace.h +++ /dev/null
@@ -1,38 +0,0 @@ -// Copyright 2014 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. - -#ifndef BASE_CLASS_MUST_DEFINE_VIRTUAL_TRACE_H_ -#define BASE_CLASS_MUST_DEFINE_VIRTUAL_TRACE_H_ - -#include "heap/stubs.h" - -namespace blink { - -class PartBase { - DISALLOW_NEW(); - // Missing virtual trace. -}; - -class PartDerived : public PartBase { - DISALLOW_NEW(); -public: - virtual void trace(Visitor*); -}; - -class HeapBase : public GarbageCollected<HeapBase> { - // Missing virtual trace. -}; - - -class HeapDerived : public HeapBase { -public: - virtual void trace(Visitor*); -private: - PartDerived m_part; -}; - - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/base_class_must_define_virtual_trace.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/base_class_must_define_virtual_trace.txt deleted file mode 100644 index f8276eb2..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/base_class_must_define_virtual_trace.txt +++ /dev/null
@@ -1,8 +0,0 @@ -In file included from base_class_must_define_virtual_trace.cpp:5: -./base_class_must_define_virtual_trace.h:12:1: warning: [blink-gc] Left-most base class 'PartBase' of derived class 'PartDerived' must define a virtual trace method. -class PartBase { -^ -./base_class_must_define_virtual_trace.h:23:1: warning: [blink-gc] Left-most base class 'HeapBase' of derived class 'HeapDerived' must define a virtual trace method. -class HeapBase : public GarbageCollected<HeapBase> { -^ -2 warnings generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/base_requires_tracing.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/base_requires_tracing.cpp deleted file mode 100644 index 87559a85..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/base_requires_tracing.cpp +++ /dev/null
@@ -1,21 +0,0 @@ -// Copyright 2014 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. - -#include "base_requires_tracing.h" - -namespace blink { - -void A::trace(Visitor* visitor) { } - -void C::trace(Visitor* visitor) { - visitor->trace(m_a); - // Missing B::trace(visitor) -} - -void D::trace(Visitor* visitor) { - visitor->trace(m_a); - C::trace(visitor); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/base_requires_tracing.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/base_requires_tracing.h deleted file mode 100644 index 0205a08..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/base_requires_tracing.h +++ /dev/null
@@ -1,37 +0,0 @@ -// Copyright 2014 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. - -#ifndef BASE_REQUIRES_TRACING_H_ -#define BASE_REQUIRES_TRACING_H_ - -#include "heap/stubs.h" - -namespace blink { - -class A : public GarbageCollected<A> { -public: - virtual void trace(Visitor*); -}; - -class B : public A { - // Does not need trace -}; - -class C : public B { -public: - void trace(Visitor*); -private: - Member<A> m_a; -}; - -class D : public C { -public: - void trace(Visitor*); -private: - Member<A> m_a; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/base_requires_tracing.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/base_requires_tracing.txt deleted file mode 100644 index ee525b9d..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/base_requires_tracing.txt +++ /dev/null
@@ -1,4 +0,0 @@ -base_requires_tracing.cpp:11:1: warning: [blink-gc] Base class 'B' of derived class 'C' requires tracing. -void C::trace(Visitor* visitor) { -^ -1 warning generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_does_not_require_finalization.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/class_does_not_require_finalization.cpp deleted file mode 100644 index 9c51eca..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_does_not_require_finalization.cpp +++ /dev/null
@@ -1,22 +0,0 @@ -// Copyright 2014 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. - -#include "class_does_not_require_finalization.h" - -namespace blink { - -void DoesNotNeedFinalizer::trace(Visitor* visitor) -{ -} - -DoesNotNeedFinalizer2::~DoesNotNeedFinalizer2() -{ -} - -void DoesNotNeedFinalizer2::trace(Visitor* visitor) -{ -} - - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_does_not_require_finalization.flags b/tools/clang/blink_gc_plugin/tests/legacy_naming/class_does_not_require_finalization.flags deleted file mode 100644 index b0bf138..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_does_not_require_finalization.flags +++ /dev/null
@@ -1 +0,0 @@ --Xclang -plugin-arg-blink-gc-plugin -Xclang warn-unneeded-finalizer \ No newline at end of file
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_does_not_require_finalization.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/class_does_not_require_finalization.h deleted file mode 100644 index c6530f30..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_does_not_require_finalization.h +++ /dev/null
@@ -1,47 +0,0 @@ -// Copyright 2014 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. - -#ifndef CLASS_DOES_NOT_REQUIRE_FINALIZATION_BASE_H_ -#define CLASS_DOES_NOT_REQUIRE_FINALIZATION_BASE_H_ - -#include "heap/stubs.h" - -namespace blink { - -class DoesNeedFinalizer : public GarbageCollectedFinalized<DoesNeedFinalizer> { -public: - ~DoesNeedFinalizer() { ; } - void trace(Visitor*); -}; - -class DoesNotNeedFinalizer - : public GarbageCollectedFinalized<DoesNotNeedFinalizer> { -public: - void trace(Visitor*); -}; - -class DoesNotNeedFinalizer2 - : public GarbageCollectedFinalized<DoesNotNeedFinalizer2> { -public: - ~DoesNotNeedFinalizer2(); - void trace(Visitor*); -}; - -class HasEmptyDtor { -public: - virtual ~HasEmptyDtor() { } -}; - -// If there are any virtual destructors involved, give up. - -class DoesNeedFinalizer2 - : public GarbageCollectedFinalized<DoesNeedFinalizer2>, - public HasEmptyDtor { -public: - void trace(Visitor*); -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_does_not_require_finalization.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/class_does_not_require_finalization.txt deleted file mode 100644 index 91e264d6..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_does_not_require_finalization.txt +++ /dev/null
@@ -1,8 +0,0 @@ -In file included from class_does_not_require_finalization.cpp:5: -./class_does_not_require_finalization.h:18:1: warning: [blink-gc] Class 'DoesNotNeedFinalizer' may not require finalization. -class DoesNotNeedFinalizer -^ -./class_does_not_require_finalization.h:24:1: warning: [blink-gc] Class 'DoesNotNeedFinalizer2' may not require finalization. -class DoesNotNeedFinalizer2 -^ -2 warnings generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_multiple_trace_bases.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/class_multiple_trace_bases.cpp deleted file mode 100644 index 5bb87c9..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_multiple_trace_bases.cpp +++ /dev/null
@@ -1,22 +0,0 @@ -// Copyright 2014 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. - -#include "class_multiple_trace_bases.h" - -namespace blink { - -void Base::trace(Visitor* visitor) { } - -void Mixin1::trace(Visitor* visitor) { } - -void Mixin2::trace(Visitor* visitor) { } - -// Missing: void Derived1::trace(Visitor* visitor); - -void Derived2::trace(Visitor* visitor) { - Base::trace(visitor); - Mixin1::trace(visitor); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_multiple_trace_bases.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/class_multiple_trace_bases.h deleted file mode 100644 index 133f006..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_multiple_trace_bases.h +++ /dev/null
@@ -1,39 +0,0 @@ -// Copyright 2014 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. - -#ifndef CLASS_MULTIPLE_TRACE_BASES_H_ -#define CLASS_MULTIPLE_TRACE_BASES_H_ - -#include "heap/stubs.h" - -namespace blink { - -class Base : public GarbageCollected<Base> { -public: - virtual void trace(Visitor*); -}; - -class Mixin1 : public GarbageCollectedMixin { -public: - void trace(Visitor*); -}; - -class Mixin2 : public GarbageCollectedMixin { -public: - void trace(Visitor*); -}; - -class Derived1 : public Base, public Mixin1 { - USING_GARBAGE_COLLECTED_MIXIN(Derived1); - // Requires trace method. -}; - -class Derived2 : public Base, public Mixin1, public Mixin2 { - USING_GARBAGE_COLLECTED_MIXIN(Derived2); - void trace(Visitor*) override; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_multiple_trace_bases.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/class_multiple_trace_bases.txt deleted file mode 100644 index 33ae5f5..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_multiple_trace_bases.txt +++ /dev/null
@@ -1,14 +0,0 @@ -In file included from class_multiple_trace_bases.cpp:5: -./class_multiple_trace_bases.h:27:1: warning: [blink-gc] Class 'Derived1' requires a trace method. -class Derived1 : public Base, public Mixin1 { -^ -./class_multiple_trace_bases.h:27:18: note: [blink-gc] Untraced base class 'Base' declared here: -class Derived1 : public Base, public Mixin1 { - ^ -./class_multiple_trace_bases.h:27:31: note: [blink-gc] Untraced base class 'Mixin1' declared here: -class Derived1 : public Base, public Mixin1 { - ^ -class_multiple_trace_bases.cpp:17:1: warning: [blink-gc] Base class 'Mixin2' of derived class 'Derived2' requires tracing. -void Derived2::trace(Visitor* visitor) { -^ -2 warnings generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_overrides_new.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/class_overrides_new.cpp deleted file mode 100644 index 9f47f82a..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_overrides_new.cpp +++ /dev/null
@@ -1,7 +0,0 @@ -// Copyright 2014 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. - -#include "class_overrides_new.h" - -// Nothing to define.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_overrides_new.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/class_overrides_new.h deleted file mode 100644 index 3e80e37..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_overrides_new.h +++ /dev/null
@@ -1,20 +0,0 @@ -// Copyright 2014 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. - -#ifndef CLASS_OVERRIDES_NEW_H_ -#define CLASS_OVERRIDES_NEW_H_ - -#include "heap/stubs.h" - -namespace blink { - -class HeapObject : public GarbageCollected<HeapObject> { - WTF_MAKE_FAST_ALLOCATED; -public: - void trace(Visitor*) { } -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_overrides_new.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/class_overrides_new.txt deleted file mode 100644 index 17f50fe..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_overrides_new.txt +++ /dev/null
@@ -1,8 +0,0 @@ -In file included from class_overrides_new.cpp:5: -./class_overrides_new.h:13:5: warning: [blink-gc] Garbage collected class 'HeapObject' is not permitted to override its new operator. - WTF_MAKE_FAST_ALLOCATED; - ^ -./heap/stubs.h:14:5: note: expanded from macro 'WTF_MAKE_FAST_ALLOCATED' - void* operator new(size_t size); \ - ^ -1 warning generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_base.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_base.cpp deleted file mode 100644 index 8d47634..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_base.cpp +++ /dev/null
@@ -1,19 +0,0 @@ -// Copyright 2014 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. - -#include "class_requires_finalization_base.h" - -namespace blink { - -void NeedsFinalizer::trace(Visitor* visitor) -{ - A::trace(visitor); -} - -void DoesNotNeedFinalizer::trace(Visitor* visitor) -{ - A::trace(visitor); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_base.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_base.h deleted file mode 100644 index 239c2cf1..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_base.h +++ /dev/null
@@ -1,36 +0,0 @@ -// Copyright 2014 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. - -#ifndef CLASS_REQUIRES_FINALIZATION_BASE_H_ -#define CLASS_REQUIRES_FINALIZATION_BASE_H_ - -#include "heap/stubs.h" - -namespace blink { - -class A : public GarbageCollected<A> { -public: - virtual void trace(Visitor*) {} -}; - -class B { -public: - ~B() { /* user-declared, thus, non-trivial */ } -}; - -// Second base class needs finalization. -class NeedsFinalizer : public A, public B { -public: - void trace(Visitor*); -}; - -// Base does not need finalization. -class DoesNotNeedFinalizer : public A { -public: - void trace(Visitor*); -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_base.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_base.txt deleted file mode 100644 index 935883d..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_base.txt +++ /dev/null
@@ -1,8 +0,0 @@ -In file included from class_requires_finalization_base.cpp:5: -./class_requires_finalization_base.h:23:1: warning: [blink-gc] Class 'NeedsFinalizer' requires finalization. -class NeedsFinalizer : public A, public B { -^ -./class_requires_finalization_base.h:23:34: note: [blink-gc] Base class 'B' requiring finalization declared here: -class NeedsFinalizer : public A, public B { - ^ -1 warning generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_field.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_field.cpp deleted file mode 100644 index eb23ab03..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_field.cpp +++ /dev/null
@@ -1,34 +0,0 @@ -// Copyright 2014 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. - -#include "class_requires_finalization_field.h" - -namespace blink { - -void NeedsFinalizer::trace(Visitor* visitor) -{ - visitor->trace(m_as); - A::trace(visitor); -} - -void AlsoNeedsFinalizer::trace(Visitor* visitor) -{ - visitor->trace(m_bs); - A::trace(visitor); -} - -void DoesNotNeedFinalizer::trace(Visitor* visitor) -{ - visitor->trace(m_bs); - A::trace(visitor); -} - -void AlsoDoesNotNeedFinalizer::trace(Visitor* visitor) -{ - visitor->trace(m_as); - visitor->trace(m_cs); - A::trace(visitor); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_field.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_field.h deleted file mode 100644 index 9596127..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_field.h +++ /dev/null
@@ -1,80 +0,0 @@ -// Copyright 2014 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. - -#ifndef CLASS_REQUIRES_FINALIZATION_H_ -#define CLASS_REQUIRES_FINALIZATION_H_ - -#include "heap/stubs.h" - -namespace blink { - -class A : public GarbageCollected<A> { -public: - virtual void trace(Visitor*) { } -}; - -// Has a non-trivial dtor (user-declared). -class B { -public: - ~B() { } - void trace(Visitor*) { }; -}; - -// Has a trivial dtor. -class C { -public: - void trace(Visitor*) { }; -}; - -} // blink namespace - -namespace WTF { - -template<> -struct VectorTraits<blink::C> { - static const bool needsDestruction = false; -}; - -} // WTF namespace - -namespace blink { - -// Off-heap vectors always need to be finalized. -class NeedsFinalizer : public A { -public: - void trace(Visitor*); -private: - Vector<Member<A> > m_as; -}; - -// On-heap vectors with inlined objects that need destruction -// need to be finalized. -class AlsoNeedsFinalizer : public A { -public: - void trace(Visitor*); -private: - HeapVector<B, 10> m_bs; -}; - -// On-heap vectors with no inlined objects never need to be finalized. -class DoesNotNeedFinalizer : public A { -public: - void trace(Visitor*); -private: - HeapVector<B> m_bs; -}; - -// On-heap vectors with inlined objects that don't need destruction -// don't need to be finalized. -class AlsoDoesNotNeedFinalizer : public A { -public: - void trace(Visitor*); -private: - HeapVector<Member<A>, 10> m_as; - HeapVector<C, 10> m_cs; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_field.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_field.txt deleted file mode 100644 index 9e37c46..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_field.txt +++ /dev/null
@@ -1,14 +0,0 @@ -In file included from class_requires_finalization_field.cpp:5: -./class_requires_finalization_field.h:44:1: warning: [blink-gc] Class 'NeedsFinalizer' requires finalization. -class NeedsFinalizer : public A { -^ -./class_requires_finalization_field.h:48:5: note: [blink-gc] Field 'm_as' requiring finalization declared here: - Vector<Member<A> > m_as; - ^ -./class_requires_finalization_field.h:53:1: warning: [blink-gc] Class 'AlsoNeedsFinalizer' requires finalization. -class AlsoNeedsFinalizer : public A { -^ -./class_requires_finalization_field.h:57:5: note: [blink-gc] Field 'm_bs' requiring finalization declared here: - HeapVector<B, 10> m_bs; - ^ -2 warnings generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_mixin.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_mixin.cpp deleted file mode 100644 index 782810e..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_mixin.cpp +++ /dev/null
@@ -1,37 +0,0 @@ -// Copyright 2014 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. - -#include "class_requires_finalization_mixin.h" - -namespace blink { - -void MixinFinalizable::trace(Visitor* visitor) -{ - visitor->trace(m_onHeap); -} - -void MixinNotFinalizable::trace(Visitor* visitor) -{ - visitor->trace(m_onHeap); -} - -void NeedsFinalizer::trace(Visitor* visitor) -{ - visitor->trace(m_obj); - MixinFinalizable::trace(visitor); -} - -void HasFinalizer::trace(Visitor* visitor) -{ - visitor->trace(m_obj); - MixinFinalizable::trace(visitor); -} - -void NeedsNoFinalization::trace(Visitor* visitor) -{ - visitor->trace(m_obj); - MixinNotFinalizable::trace(visitor); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_mixin.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_mixin.h deleted file mode 100644 index 10befbd..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_mixin.h +++ /dev/null
@@ -1,61 +0,0 @@ -// Copyright 2014 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. - -#ifndef CLASS_REQUIRES_FINALIZATION_MIXIN_H_ -#define CLASS_REQUIRES_FINALIZATION_MIXIN_H_ - -#include "heap/stubs.h" - -namespace blink { - -class OffHeap : public RefCounted<OffHeap> { }; -class OnHeap : public GarbageCollected<OnHeap> { }; - -class MixinFinalizable : public GarbageCollectedMixin { -public: - virtual void trace(Visitor*) override; -private: - RefPtr<OffHeap> m_offHeap; // Requires finalization - Member<OnHeap> m_onHeap; -}; - -class MixinNotFinalizable : public GarbageCollectedMixin { -public: - virtual void trace(Visitor*) override; -private: - Member<OnHeap> m_onHeap; -}; - -class NeedsFinalizer - : public GarbageCollected<NeedsFinalizer> - , public MixinFinalizable { - USING_GARBAGE_COLLECTED_MIXIN(NeedsFinalizer); -public: - virtual void trace(Visitor*) override; -private: - Member<OnHeap> m_obj; -}; - -class HasFinalizer : public GarbageCollectedFinalized<HasFinalizer>, - public MixinFinalizable { - USING_GARBAGE_COLLECTED_MIXIN(HasFinalizer); -public: - virtual void trace(Visitor*) override; -private: - Member<OnHeap> m_obj; -}; - -class NeedsNoFinalization - : public GarbageCollected<NeedsNoFinalization> - , public MixinNotFinalizable { - USING_GARBAGE_COLLECTED_MIXIN(NeedsNoFinalization); -public: - virtual void trace(Visitor*) override; -private: - Member<OnHeap> m_obj; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_mixin.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_mixin.txt deleted file mode 100644 index 0bf93d5..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_finalization_mixin.txt +++ /dev/null
@@ -1,8 +0,0 @@ -In file included from class_requires_finalization_mixin.cpp:5: -./class_requires_finalization_mixin.h:30:1: warning: [blink-gc] Class 'NeedsFinalizer' requires finalization. -class NeedsFinalizer -^ -./class_requires_finalization_mixin.h:32:7: note: [blink-gc] Base class 'MixinFinalizable' requiring finalization declared here: - , public MixinFinalizable { - ^ -1 warning generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_trace_method.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_trace_method.cpp deleted file mode 100644 index f18fdf6d..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_trace_method.cpp +++ /dev/null
@@ -1,19 +0,0 @@ -// Copyright 2014 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. - -#include "class_requires_trace_method.h" - -namespace blink { - -void Mixin2::trace(Visitor* visitor) -{ - Mixin::trace(visitor); -} - -void Mixin3::trace(Visitor* visitor) -{ - Mixin::trace(visitor); -} - -} // namespace blink
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_trace_method.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_trace_method.h deleted file mode 100644 index 4a442b72..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_trace_method.h +++ /dev/null
@@ -1,59 +0,0 @@ -// Copyright 2014 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. - -#ifndef CLASS_REQUIRES_TRACE_METHOD_H_ -#define CLASS_REQUIRES_TRACE_METHOD_H_ - -#include "heap/stubs.h" - -namespace blink { - -class HeapObject; - -class PartObject { - DISALLOW_NEW(); -private: - Member<HeapObject> m_obj; -}; - -class HeapObject : public GarbageCollected<HeapObject> { -private: - PartObject m_part; -}; - -class Mixin : public GarbageCollectedMixin { -public: - virtual void trace(Visitor*) override; - Member<Mixin> m_self; -}; - -class HeapObjectMixin : public GarbageCollected<HeapObjectMixin>, public Mixin { - USING_GARBAGE_COLLECTED_MIXIN(HeapObjectMixin); -}; - -class Mixin2 : public Mixin { -public: - virtual void trace(Visitor*) override; -}; - -class HeapObjectMixin2 - : public GarbageCollected<HeapObjectMixin2>, public Mixin2 { - USING_GARBAGE_COLLECTED_MIXIN(HeapObjectMixin2); -}; - -class Mixin3 : public Mixin { -public: - virtual void trace(Visitor*) override; -}; - -class HeapObjectMixin3 - : public GarbageCollected<HeapObjectMixin3>, public Mixin { - USING_GARBAGE_COLLECTED_MIXIN(HeapObjectMixin2); -public: - virtual void trace(Visitor*) override; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_trace_method.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_trace_method.txt deleted file mode 100644 index de6fd94..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_trace_method.txt +++ /dev/null
@@ -1,14 +0,0 @@ -In file included from class_requires_trace_method.cpp:5: -./class_requires_trace_method.h:14:1: warning: [blink-gc] Class 'PartObject' requires a trace method. -class PartObject { -^ -./class_requires_trace_method.h:17:5: note: [blink-gc] Untraced field 'm_obj' declared here: - Member<HeapObject> m_obj; - ^ -./class_requires_trace_method.h:20:1: warning: [blink-gc] Class 'HeapObject' requires a trace method. -class HeapObject : public GarbageCollected<HeapObject> { -^ -./class_requires_trace_method.h:22:5: note: [blink-gc] Untraced field 'm_part' declared here: - PartObject m_part; - ^ -2 warnings generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_trace_method_tmpl.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_trace_method_tmpl.cpp deleted file mode 100644 index 7051fb2..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_trace_method_tmpl.cpp +++ /dev/null
@@ -1,15 +0,0 @@ -// Copyright 2014 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. - -#include "class_requires_trace_method_tmpl.h" - -namespace blink { - -// Does not need a trace method. -class NoTrace : public TemplatedObject<PartObjectA> { }; - -// Needs a trace method. -class NeedsTrace : public TemplatedObject<PartObjectB> { }; - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_trace_method_tmpl.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_trace_method_tmpl.h deleted file mode 100644 index 70cab61..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_trace_method_tmpl.h +++ /dev/null
@@ -1,34 +0,0 @@ -// Copyright 2014 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. - -#ifndef CLASS_REQUIRES_TRACE_METHOD_TMPL_H_ -#define CLASS_REQUIRES_TRACE_METHOD_TMPL_H_ - -#include "heap/stubs.h" - -namespace blink { - -class HeapObject : public GarbageCollected<HeapObject> { }; - -class PartObjectA { - DISALLOW_NEW(); -}; - -class PartObjectB { - DISALLOW_NEW(); -public: - void trace(Visitor* visitor) { visitor->trace(m_obj); } -private: - Member<HeapObject> m_obj; -}; - -template<typename T> -class TemplatedObject { -private: - T m_part; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_trace_method_tmpl.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_trace_method_tmpl.txt deleted file mode 100644 index 49705b9..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/class_requires_trace_method_tmpl.txt +++ /dev/null
@@ -1,8 +0,0 @@ -In file included from class_requires_trace_method_tmpl.cpp:5: -./class_requires_trace_method_tmpl.h:27:1: warning: [blink-gc] Class 'TemplatedObject<blink::PartObjectB>' requires a trace method. -class TemplatedObject { -^ -./class_requires_trace_method_tmpl.h:29:5: note: [blink-gc] Untraced field 'm_part' declared here: - T m_part; - ^ -1 warning generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/crash_on_invalid.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/crash_on_invalid.cpp deleted file mode 100644 index 6370812e..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/crash_on_invalid.cpp +++ /dev/null
@@ -1,7 +0,0 @@ -// Copyright 2014 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. - -#include "crash_on_invalid.h" - -// Nothing to define.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/crash_on_invalid.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/crash_on_invalid.h deleted file mode 100644 index a77d097..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/crash_on_invalid.h +++ /dev/null
@@ -1,26 +0,0 @@ -// Copyright 2014 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. - -// Regression test for http://crbug.com/421958 - -#ifndef CRASH_ON_INVALID_H_ -#define CRASH_ON_INVALID_H_ - -namespace blink { - -class Visitor; -class GamepadCommon {}; -class ScriptWrappable {}; - -class Gamepad final : public GarbageCollectedFinalized<Gamepad>, - public GamepadCommon, - public ScriptWrappable { -public: - virtual const WrapperTypeInfo *wrapperTypeInfo() const {} - void trace(Visitor *); -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/crash_on_invalid.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/crash_on_invalid.txt deleted file mode 100644 index cf19ff5..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/crash_on_invalid.txt +++ /dev/null
@@ -1,8 +0,0 @@ -In file included from crash_on_invalid.cpp:5: -./crash_on_invalid.h:16:30: error: unknown template name 'GarbageCollectedFinalized' -class Gamepad final : public GarbageCollectedFinalized<Gamepad>, - ^ -./crash_on_invalid.h:20:19: error: unknown type name 'WrapperTypeInfo' - virtual const WrapperTypeInfo *wrapperTypeInfo() const {} - ^ -2 errors generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_ptrs.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_ptrs.cpp deleted file mode 100644 index f3b3989..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_ptrs.cpp +++ /dev/null
@@ -1,17 +0,0 @@ -// Copyright 2014 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. - -#include "cycle_ptrs.h" - -namespace blink { - -void A::trace(Visitor* visitor) { - visitor->trace(m_b); -} - -void B::trace(Visitor* visitor) { - visitor->trace(m_a); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_ptrs.flags b/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_ptrs.flags deleted file mode 100644 index a55c2f09..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_ptrs.flags +++ /dev/null
@@ -1 +0,0 @@ --Xclang -plugin-arg-blink-gc-plugin -Xclang dump-graph \ No newline at end of file
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_ptrs.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_ptrs.h deleted file mode 100644 index 8c07a06..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_ptrs.h +++ /dev/null
@@ -1,54 +0,0 @@ -// Copyright 2014 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. - -#ifndef CYCLE_PTRS_H_ -#define CYCLE_PTRS_H_ - -#include "heap/stubs.h" - -namespace blink { - -class B; -class C; -class D; -class E; - -// This contains a leaking cycle: -// E -per-> A -mem-> B -ref-> C -own-> D -own-vec-> E - -// The traced cycle from A -> B -> A does not leak. - -class A : public GarbageCollected<A> { -public: - virtual void trace(Visitor*); -private: - Member<B> m_b; -}; - -class B : public GarbageCollectedFinalized<B> { -public: - virtual void trace(Visitor*); -private: - Member<A> m_a; - RefPtr<C> m_c; -}; - -class C : public RefCounted<C> { -private: - OwnPtr<D> m_d; -}; - -class D { -private: - Vector<OwnPtr<E> > m_es; -}; - -class E { -private: - Persistent<A> m_a; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_ptrs.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_ptrs.txt deleted file mode 100644 index 4d242a6..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_ptrs.txt +++ /dev/null
@@ -1,8 +0,0 @@ - -Found a potentially leaking cycle starting from a GC root: -./cycle_ptrs.h:49:5: blink::E (m_a) => blink::A -./cycle_ptrs.h:26:5: blink::A (m_b) => blink::B -./cycle_ptrs.h:34:5: blink::B (m_c) => blink::C -./cycle_ptrs.h:39:5: blink::C (m_d) => blink::D -./cycle_ptrs.h:44:5: blink::D (m_es) => blink::E -
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_sub.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_sub.cpp deleted file mode 100644 index dfe835a..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_sub.cpp +++ /dev/null
@@ -1,14 +0,0 @@ -// Copyright 2014 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. - -#include "cycle_sub.h" - -namespace blink { - -void B::trace(Visitor* visitor) { - visitor->trace(m_c); - A::trace(visitor); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_sub.flags b/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_sub.flags deleted file mode 100644 index a55c2f09..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_sub.flags +++ /dev/null
@@ -1 +0,0 @@ --Xclang -plugin-arg-blink-gc-plugin -Xclang dump-graph \ No newline at end of file
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_sub.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_sub.h deleted file mode 100644 index a007061..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_sub.h +++ /dev/null
@@ -1,36 +0,0 @@ -// Copyright 2014 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. - -#ifndef CYCLE_SUB_H_ -#define CYCLE_SUB_H_ - -#include "heap/stubs.h" - -namespace blink { - -class C; - -// This contains a leaking cycle: -// C -per-> A -sub-> B -ref-> C - -class A : public GarbageCollectedFinalized<A> { -public: - virtual void trace(Visitor*) {} -}; - -class B : public A { -public: - virtual void trace(Visitor*); -private: - RefPtr<C> m_c; -}; - -class C : public RefCounted<C> { -private: - Persistent<A> m_a; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_sub.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_sub.txt deleted file mode 100644 index b37907d..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_sub.txt +++ /dev/null
@@ -1,6 +0,0 @@ - -Found a potentially leaking cycle starting from a GC root: -./cycle_sub.h:31:5: blink::C (m_a) => blink::A -./cycle_sub.h:22:11: blink::A (<subclass>) => blink::B -./cycle_sub.h:26:5: blink::B (m_c) => blink::C -
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_super.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_super.cpp deleted file mode 100644 index d9ecd79..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_super.cpp +++ /dev/null
@@ -1,21 +0,0 @@ -// Copyright 2014 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. - -#include "cycle_super.h" - -namespace blink { - -void A::trace(Visitor* visitor) { - visitor->trace(m_d); -} - -void B::trace(Visitor* visitor) { - A::trace(visitor); -} - -void C::trace(Visitor* visitor) { - B::trace(visitor); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_super.flags b/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_super.flags deleted file mode 100644 index a55c2f09..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_super.flags +++ /dev/null
@@ -1 +0,0 @@ --Xclang -plugin-arg-blink-gc-plugin -Xclang dump-graph \ No newline at end of file
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_super.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_super.h deleted file mode 100644 index 13b05c12..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_super.h +++ /dev/null
@@ -1,41 +0,0 @@ -// Copyright 2014 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. - -#ifndef CYCLE_SUPER_H_ -#define CYCLE_SUPER_H_ - -#include "heap/stubs.h" - -namespace blink { - -class D; - -// This contains a leaking cycle: -// D -per-> C -sup-> B -sup-> A -ref-> D - -class A : public GarbageCollectedFinalized<A> { -public: - virtual void trace(Visitor*); -private: - RefPtr<D> m_d; -}; - -class B : public A { -public: - virtual void trace(Visitor*); -}; - -class C : public B { -public: - virtual void trace(Visitor*); -}; - -class D : public RefCounted<C> { -private: - Persistent<C> m_c; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_super.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_super.txt deleted file mode 100644 index 89b3675..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_super.txt +++ /dev/null
@@ -1,5 +0,0 @@ - -Found a potentially leaking cycle starting from a GC root: -./cycle_super.h:36:5: blink::D (m_c) => blink::C -./cycle_super.h:21:5: blink::C (blink::B <: blink::A <: m_d) => blink::D -
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_super_neg.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_super_neg.cpp deleted file mode 100644 index 33dec59..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_super_neg.cpp +++ /dev/null
@@ -1,18 +0,0 @@ -// Copyright 2014 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. - -#include "cycle_super_neg.h" - -namespace blink { - -void B::trace(Visitor* visitor) { - A::trace(visitor); -} - -void D::trace(Visitor* visitor) { - visitor->trace(m_c); - A::trace(visitor); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_super_neg.flags b/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_super_neg.flags deleted file mode 100644 index a55c2f09..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_super_neg.flags +++ /dev/null
@@ -1 +0,0 @@ --Xclang -plugin-arg-blink-gc-plugin -Xclang dump-graph \ No newline at end of file
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_super_neg.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_super_neg.h deleted file mode 100644 index 6f99eff..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_super_neg.h +++ /dev/null
@@ -1,44 +0,0 @@ -// Copyright 2014 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. - -#ifndef CYCLE_SUPER_NEG_H_ -#define CYCLE_SUPER_NEG_H_ - -#include "heap/stubs.h" - -namespace blink { - -class C; - -// The chain: -// C -per-> B -sup-> A -sub-> D -ref-> C -// is not a leaking cycle, because the super-class relationship -// should not transitively imply sub-class relationships. -// I.e. B -/-> D - -class A : public GarbageCollectedFinalized<A> { -public: - virtual void trace(Visitor*) {} -}; - -class B : public A { -public: - virtual void trace(Visitor*); -}; - -class C : public RefCounted<C> { -private: - Persistent<B> m_b; -}; - -class D : public A { -public: - virtual void trace(Visitor*); -private: - RefPtr<C> m_c; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_super_neg.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_super_neg.txt deleted file mode 100644 index e69de29..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/cycle_super_neg.txt +++ /dev/null
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/delayed_parsing.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/delayed_parsing.cpp deleted file mode 100644 index 149d95e..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/delayed_parsing.cpp +++ /dev/null
@@ -1,25 +0,0 @@ -// Copyright 2015 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. - -#include "heap/stubs.h" - -namespace blink { - -struct HeapObject : public GarbageCollected<HeapObject> { - void trace(Visitor*) { } -}; - -template<typename T> -class TemplateBase - : public GarbageCollected<TemplateBase<T> > { -public: - void trace(Visitor* visitor) { visitor->trace(m_obj); } -private: - Member<HeapObject> m_obj; -}; - -class Subclass : public TemplateBase<Subclass> { -}; - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/delayed_parsing.flags b/tools/clang/blink_gc_plugin/tests/legacy_naming/delayed_parsing.flags deleted file mode 100644 index 94af50f..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/delayed_parsing.flags +++ /dev/null
@@ -1 +0,0 @@ --fdelayed-template-parsing
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/delayed_parsing.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/delayed_parsing.txt deleted file mode 100644 index e69de29..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/delayed_parsing.txt +++ /dev/null
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_access_finalized_field.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_access_finalized_field.cpp deleted file mode 100644 index b6bbfd2..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_access_finalized_field.cpp +++ /dev/null
@@ -1,35 +0,0 @@ -// Copyright 2014 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. - -#include "destructor_access_finalized_field.h" - -namespace blink { - -HeapObject::~HeapObject() -{ - // Valid access to fields. - if (m_ref->foo() && !m_obj) { - m_objs.size(); - m_part.obj(); - } - - // Invalid access to fields. - bar(m_obj); - m_obj->foo(); - m_objs[0]; -} - -void HeapObject::trace(Visitor* visitor) -{ - visitor->trace(m_obj); - visitor->trace(m_objs); - visitor->trace(m_part); -} - -void PartOther::trace(Visitor* visitor) -{ - visitor->trace(m_obj); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_access_finalized_field.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_access_finalized_field.h deleted file mode 100644 index 4c72156..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_access_finalized_field.h +++ /dev/null
@@ -1,45 +0,0 @@ -// Copyright 2014 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. - -#ifndef DESTRUCTOR_ACCESS_FINALIZED_FIELD_H_ -#define DESTRUCTOR_ACCESS_FINALIZED_FIELD_H_ - -#include "heap/stubs.h" - -namespace blink { - -class Other : public RefCounted<Other> { -public: - bool foo() { return true; } -}; - -class HeapObject; - -class PartOther { - ALLOW_ONLY_INLINE_ALLOCATION(); -public: - void trace(Visitor*); - - HeapObject* obj() { return m_obj; } - -private: - Member<HeapObject> m_obj; -}; - -class HeapObject : public GarbageCollectedFinalized<HeapObject> { -public: - ~HeapObject(); - void trace(Visitor*); - bool foo() { return true; } - void bar(HeapObject*) { } -private: - RefPtr<Other> m_ref; - Member<HeapObject> m_obj; - Vector<Member<HeapObject> > m_objs; - PartOther m_part; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_access_finalized_field.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_access_finalized_field.txt deleted file mode 100644 index 0470b51..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_access_finalized_field.txt +++ /dev/null
@@ -1,19 +0,0 @@ -destructor_access_finalized_field.cpp:18:9: warning: [blink-gc] Finalizer '~HeapObject' accesses potentially finalized field 'm_obj'. - bar(m_obj); - ^ -./destructor_access_finalized_field.h:38:5: note: [blink-gc] Potentially finalized field 'm_obj' declared here: - Member<HeapObject> m_obj; - ^ -destructor_access_finalized_field.cpp:19:5: warning: [blink-gc] Finalizer '~HeapObject' accesses potentially finalized field 'm_obj'. - m_obj->foo(); - ^ -./destructor_access_finalized_field.h:38:5: note: [blink-gc] Potentially finalized field 'm_obj' declared here: - Member<HeapObject> m_obj; - ^ -destructor_access_finalized_field.cpp:20:5: warning: [blink-gc] Finalizer '~HeapObject' accesses potentially finalized field 'm_objs'. - m_objs[0]; - ^ -./destructor_access_finalized_field.h:39:5: note: [blink-gc] Potentially finalized field 'm_objs' declared here: - Vector<Member<HeapObject> > m_objs; - ^ -3 warnings generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_eagerly_finalized.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_eagerly_finalized.cpp deleted file mode 100644 index 07409cc3..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_eagerly_finalized.cpp +++ /dev/null
@@ -1,37 +0,0 @@ -// Copyright 2015 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. - -#include "destructor_eagerly_finalized.h" - -namespace blink { - -HeapObjectEagerFinalized::~HeapObjectEagerFinalized() -{ - // Valid access to a non-eagerly finalized field - m_obj->foo(); -} - -void HeapObjectEagerFinalized::trace(Visitor* visitor) -{ - visitor->trace(m_obj); -} - -HeapObjectEagerFinalizedAlso::~HeapObjectEagerFinalizedAlso() -{ - // Valid access to a non-eagerly finalized field - m_heapObject->foo(); - - // Non-valid accesses to eagerly finalized fields. - m_heapObjectFinalized->foo(); - m_heapVector[0]->foo(); -} - -void HeapObjectEagerFinalizedAlso::trace(Visitor* visitor) -{ - visitor->trace(m_heapObject); - visitor->trace(m_heapObjectFinalized); - visitor->trace(m_heapVector); -} - -} // namespace blink
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_eagerly_finalized.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_eagerly_finalized.h deleted file mode 100644 index 77a29de..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_eagerly_finalized.h +++ /dev/null
@@ -1,47 +0,0 @@ -// Copyright 2015 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. - -#ifndef DESTRUCTOR_EAGERLY_FINALIZED_H_ -#define DESTRUCTOR_EAGERLY_FINALIZED_H_ - -#include "heap/stubs.h" - -namespace blink { - -class HeapObject : public GarbageCollected<HeapObject> { -public: - void trace(Visitor*) { } - void foo() { } -}; - -class HeapObjectEagerFinalized - : public GarbageCollectedFinalized<HeapObjectEagerFinalized> { -public: - EAGERLY_FINALIZED(); - ~HeapObjectEagerFinalized(); - void trace(Visitor*); - - void foo() { } - -private: - Member<HeapObject> m_obj; -}; - -// Accessing other eagerly finalized objects during finalization is not allowed. -class HeapObjectEagerFinalizedAlso - : public GarbageCollectedFinalized<HeapObjectEagerFinalizedAlso> { -public: - EAGERLY_FINALIZED(); - ~HeapObjectEagerFinalizedAlso(); - void trace(Visitor*); - -private: - Member<HeapObject> m_heapObject; - Member<HeapObjectEagerFinalized> m_heapObjectFinalized; - HeapVector<Member<HeapObjectEagerFinalized>> m_heapVector; -}; - -} // namespace blink - -#endif // DESTRUCTOR_EAGERLY_FINALIZED_H_
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_eagerly_finalized.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_eagerly_finalized.txt deleted file mode 100644 index 97d5089..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_eagerly_finalized.txt +++ /dev/null
@@ -1,13 +0,0 @@ -destructor_eagerly_finalized.cpp:26:5: warning: [blink-gc] Finalizer '~HeapObjectEagerFinalizedAlso' accesses eagerly finalized field 'm_heapObjectFinalized'. - m_heapObjectFinalized->foo(); - ^ -./destructor_eagerly_finalized.h:41:5: note: [blink-gc] Field 'm_heapObjectFinalized' having eagerly finalized value, declared here: - Member<HeapObjectEagerFinalized> m_heapObjectFinalized; - ^ -destructor_eagerly_finalized.cpp:27:5: warning: [blink-gc] Finalizer '~HeapObjectEagerFinalizedAlso' accesses eagerly finalized field 'm_heapVector'. - m_heapVector[0]->foo(); - ^ -./destructor_eagerly_finalized.h:42:5: note: [blink-gc] Field 'm_heapVector' having eagerly finalized value, declared here: - HeapVector<Member<HeapObjectEagerFinalized>> m_heapVector; - ^ -2 warnings generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_in_nonfinalized_class.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_in_nonfinalized_class.cpp deleted file mode 100644 index 8efc41d..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_in_nonfinalized_class.cpp +++ /dev/null
@@ -1,20 +0,0 @@ -// Copyright 2014 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. - -#include "destructor_in_nonfinalized_class.h" - -namespace blink { - -HeapObject::~HeapObject() -{ - // Do something when destructed... - (void)this; -} - -void HeapObject::trace(Visitor* visitor) -{ - visitor->trace(m_obj); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_in_nonfinalized_class.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_in_nonfinalized_class.h deleted file mode 100644 index f3fa506a..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_in_nonfinalized_class.h +++ /dev/null
@@ -1,22 +0,0 @@ -// Copyright 2014 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. - -#ifndef DESTRUCTOR_IN_NONFINALIZED_CLASS_H_ -#define DESTRUCTOR_IN_NONFINALIZED_CLASS_H_ - -#include "heap/stubs.h" - -namespace blink { - -class HeapObject : public GarbageCollected<HeapObject> { -public: - ~HeapObject(); - void trace(Visitor*); -private: - Member<HeapObject> m_obj; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_in_nonfinalized_class.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_in_nonfinalized_class.txt deleted file mode 100644 index cf19ea1..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/destructor_in_nonfinalized_class.txt +++ /dev/null
@@ -1,8 +0,0 @@ -In file included from destructor_in_nonfinalized_class.cpp:5: -./destructor_in_nonfinalized_class.h:12:1: warning: [blink-gc] Class 'HeapObject' requires finalization. -class HeapObject : public GarbageCollected<HeapObject> { -^ -destructor_in_nonfinalized_class.cpp:9:1: note: [blink-gc] User-declared destructor declared here: -HeapObject::~HeapObject() -^ -1 warning generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/fields_illegal_tracing.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/fields_illegal_tracing.cpp deleted file mode 100644 index b831077..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/fields_illegal_tracing.cpp +++ /dev/null
@@ -1,23 +0,0 @@ -// Copyright 2016 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. - -#include "fields_illegal_tracing.h" - -namespace blink { - -void PartObject::trace(Visitor* visitor) { - visitor->trace(m_obj1); - visitor->trace(m_obj2); - visitor->trace(m_obj3); - visitor->trace(m_obj4); -} - -void HeapObject::trace(Visitor* visitor) { - visitor->trace(m_obj1); - visitor->trace(m_obj2); - visitor->trace(m_obj3); - visitor->trace(m_obj4); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/fields_illegal_tracing.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/fields_illegal_tracing.h deleted file mode 100644 index f4d91dd2..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/fields_illegal_tracing.h +++ /dev/null
@@ -1,63 +0,0 @@ -// Copyright 2016 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. - -#ifndef FIELDS_ILLEGAL_TRACING_H_ -#define FIELDS_ILLEGAL_TRACING_H_ - -#include "heap/stubs.h" - -namespace blink { - -namespace bar { - -// check that (only) std::unique_ptr<> is reported -// as an illegal smart pointer type. -template<typename T> class unique_ptr { -public: - ~unique_ptr() { } - operator T*() const { return 0; } - T* operator->() { return 0; } - - void trace(Visitor* visitor) - { - } -}; - -} - -class HeapObject; -class PartObject; - -class PartObject { - DISALLOW_NEW(); -public: - void trace(Visitor*); -private: - OwnPtr<HeapObject> m_obj1; - RefPtr<HeapObject> m_obj2; - bar::unique_ptr<HeapObject> m_obj3; - std::unique_ptr<HeapObject> m_obj4; - Vector<int>::iterator m_iterator1; - HeapVector<Member<HeapObject>>::iterator m_iterator2; - HeapHashSet<PartObject>::const_iterator m_iterator3; -}; - -class HeapObject : public GarbageCollectedFinalized<HeapObject> { -public: - void trace(Visitor*); -private: - PartObject m_part; - OwnPtr<HeapObject> m_obj1; - RefPtr<HeapObject> m_obj2; - bar::unique_ptr<HeapObject> m_obj3; - std::unique_ptr<HeapObject> m_obj4; - HeapHashMap<int, Member<HeapObject>>::reverse_iterator m_iterator3; - HeapDeque<Member<HeapObject>>::const_reverse_iterator m_iterator4; - HeapListHashSet<Member<HeapObject>>::const_iterator m_iterator5; - HeapLinkedHashSet<Member<HeapObject>>::const_iterator m_iterator6; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/fields_illegal_tracing.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/fields_illegal_tracing.txt deleted file mode 100644 index 874be1c..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/fields_illegal_tracing.txt +++ /dev/null
@@ -1,68 +0,0 @@ -In file included from fields_illegal_tracing.cpp:5: -./fields_illegal_tracing.h:32:1: warning: [blink-gc] Class 'PartObject' contains invalid fields. -class PartObject { -^ -./fields_illegal_tracing.h:37:5: note: [blink-gc] OwnPtr field 'm_obj1' to a GC managed class declared here: - OwnPtr<HeapObject> m_obj1; - ^ -./fields_illegal_tracing.h:38:5: note: [blink-gc] RefPtr field 'm_obj2' to a GC managed class declared here: - RefPtr<HeapObject> m_obj2; - ^ -./fields_illegal_tracing.h:40:5: note: [blink-gc] std::unique_ptr field 'm_obj4' to a GC managed class declared here: - std::unique_ptr<HeapObject> m_obj4; - ^ -./fields_illegal_tracing.h:42:5: warning: [blink-gc] Iterator field 'm_iterator2' to a GC managed collection declared here: - HeapVector<Member<HeapObject>>::iterator m_iterator2; - ^ -./fields_illegal_tracing.h:43:5: warning: [blink-gc] Iterator field 'm_iterator3' to a GC managed collection declared here: - HeapHashSet<PartObject>::const_iterator m_iterator3; - ^ -./fields_illegal_tracing.h:46:1: warning: [blink-gc] Class 'HeapObject' contains invalid fields. -class HeapObject : public GarbageCollectedFinalized<HeapObject> { -^ -./fields_illegal_tracing.h:51:5: note: [blink-gc] OwnPtr field 'm_obj1' to a GC managed class declared here: - OwnPtr<HeapObject> m_obj1; - ^ -./fields_illegal_tracing.h:52:5: note: [blink-gc] RefPtr field 'm_obj2' to a GC managed class declared here: - RefPtr<HeapObject> m_obj2; - ^ -./fields_illegal_tracing.h:54:5: note: [blink-gc] std::unique_ptr field 'm_obj4' to a GC managed class declared here: - std::unique_ptr<HeapObject> m_obj4; - ^ -./fields_illegal_tracing.h:55:5: warning: [blink-gc] Iterator field 'm_iterator3' to a GC managed collection declared here: - HeapHashMap<int, Member<HeapObject>>::reverse_iterator m_iterator3; - ^ -./fields_illegal_tracing.h:56:5: warning: [blink-gc] Iterator field 'm_iterator4' to a GC managed collection declared here: - HeapDeque<Member<HeapObject>>::const_reverse_iterator m_iterator4; - ^ -./fields_illegal_tracing.h:58:5: warning: [blink-gc] Iterator field 'm_iterator6' to a GC managed collection declared here: - HeapLinkedHashSet<Member<HeapObject>>::const_iterator m_iterator6; - ^ -fields_illegal_tracing.cpp:9:1: warning: [blink-gc] Class 'PartObject' has untraced or not traceable fields. -void PartObject::trace(Visitor* visitor) { -^ -./fields_illegal_tracing.h:37:5: note: [blink-gc] Untraceable field 'm_obj1' declared here: - OwnPtr<HeapObject> m_obj1; - ^ -./fields_illegal_tracing.h:38:5: note: [blink-gc] Untraceable field 'm_obj2' declared here: - RefPtr<HeapObject> m_obj2; - ^ -./fields_illegal_tracing.h:40:5: note: [blink-gc] Untraceable field 'm_obj4' declared here: - std::unique_ptr<HeapObject> m_obj4; - ^ -fields_illegal_tracing.cpp:16:1: warning: [blink-gc] Class 'HeapObject' has untraced or not traceable fields. -void HeapObject::trace(Visitor* visitor) { -^ -./fields_illegal_tracing.h:51:5: note: [blink-gc] Untraceable field 'm_obj1' declared here: - OwnPtr<HeapObject> m_obj1; - ^ -./fields_illegal_tracing.h:52:5: note: [blink-gc] Untraceable field 'm_obj2' declared here: - RefPtr<HeapObject> m_obj2; - ^ -./fields_illegal_tracing.h:54:5: note: [blink-gc] Untraceable field 'm_obj4' declared here: - std::unique_ptr<HeapObject> m_obj4; - ^ -./fields_illegal_tracing.h:57:5: note: [blink-gc] Untraced field 'm_iterator5' declared here: - HeapListHashSet<Member<HeapObject>>::const_iterator m_iterator5; - ^ -9 warnings generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/fields_require_tracing.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/fields_require_tracing.cpp deleted file mode 100644 index 880ce1e..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/fields_require_tracing.cpp +++ /dev/null
@@ -1,26 +0,0 @@ -// Copyright 2014 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. - -#include "fields_require_tracing.h" - -namespace blink { - -void PartObject::trace(Visitor* visitor) { - m_obj1->trace(visitor); // Don't allow direct tracing. - visitor->trace(m_obj2); - // Missing visitor->trace(m_obj3); - visitor->trace(m_parts); -} - -void PartBObject::trace(Visitor* visitor) { - // Missing visitor->trace(m_set); - visitor->trace(m_vector); -} - -void HeapObject::trace(Visitor* visitor) { - // Missing visitor->trace(m_part); - visitor->trace(m_obj); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/fields_require_tracing.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/fields_require_tracing.h deleted file mode 100644 index 1819411..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/fields_require_tracing.h +++ /dev/null
@@ -1,46 +0,0 @@ -// Copyright 2014 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. - -#ifndef FIELDS_REQUIRE_TRACING_H_ -#define FIELDS_REQUIRE_TRACING_H_ - -#include "heap/stubs.h" - -namespace blink { - -class HeapObject; -class PartObject; - -class PartBObject { - DISALLOW_NEW(); -public: - void trace(Visitor*); -private: - HeapHashSet<PartBObject> m_set; - HeapVector<PartBObject> m_vector; -}; - -class PartObject { - DISALLOW_NEW(); -public: - void trace(Visitor*); -private: - Member<HeapObject> m_obj1; - Member<HeapObject> m_obj2; - Member<HeapObject> m_obj3; - - HeapVector<PartBObject> m_parts; -}; - -class HeapObject : public GarbageCollected<HeapObject> { -public: - void trace(Visitor*); -private: - PartObject m_part; - Member<HeapObject> m_obj; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/fields_require_tracing.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/fields_require_tracing.txt deleted file mode 100644 index 39d49f3..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/fields_require_tracing.txt +++ /dev/null
@@ -1,22 +0,0 @@ -fields_require_tracing.cpp:9:1: warning: [blink-gc] Class 'PartObject' has untraced fields that require tracing. -void PartObject::trace(Visitor* visitor) { -^ -./fields_require_tracing.h:29:5: note: [blink-gc] Untraced field 'm_obj1' declared here: - Member<HeapObject> m_obj1; - ^ -./fields_require_tracing.h:31:5: note: [blink-gc] Untraced field 'm_obj3' declared here: - Member<HeapObject> m_obj3; - ^ -fields_require_tracing.cpp:16:1: warning: [blink-gc] Class 'PartBObject' has untraced fields that require tracing. -void PartBObject::trace(Visitor* visitor) { -^ -./fields_require_tracing.h:20:5: note: [blink-gc] Untraced field 'm_set' declared here: - HeapHashSet<PartBObject> m_set; - ^ -fields_require_tracing.cpp:21:1: warning: [blink-gc] Class 'HeapObject' has untraced fields that require tracing. -void HeapObject::trace(Visitor* visitor) { -^ -./fields_require_tracing.h:40:5: note: [blink-gc] Untraced field 'm_part' declared here: - PartObject m_part; - ^ -3 warnings generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/finalize_after_dispatch.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/finalize_after_dispatch.cpp deleted file mode 100644 index 91244d1..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/finalize_after_dispatch.cpp +++ /dev/null
@@ -1,63 +0,0 @@ -// Copyright 2014 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. - -#include "finalize_after_dispatch.h" - -namespace blink { - -static B* toB(A* a) { return static_cast<B*>(a); } - -void A::trace(Visitor* visitor) -{ - switch (m_type) { - case TB: - toB(this)->traceAfterDispatch(visitor); - break; - case TC: - static_cast<C*>(this)->traceAfterDispatch(visitor); - break; - case TD: - static_cast<D*>(this)->traceAfterDispatch(visitor); - break; - } -} - -void A::traceAfterDispatch(Visitor* visitor) -{ -} - -void A::finalizeGarbageCollectedObject() -{ - switch (m_type) { - case TB: - toB(this)->~B(); - break; - case TC: - static_cast<C*>(this)->~C(); - break; - case TD: - // Missing static_cast<D*>(this)->~D(); - break; - } -} - -void B::traceAfterDispatch(Visitor* visitor) -{ - visitor->trace(m_a); - A::traceAfterDispatch(visitor); -} - -void C::traceAfterDispatch(Visitor* visitor) -{ - visitor->trace(m_a); - A::traceAfterDispatch(visitor); -} - -void D::traceAfterDispatch(Visitor* visitor) -{ - visitor->trace(m_a); - Abstract::traceAfterDispatch(visitor); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/finalize_after_dispatch.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/finalize_after_dispatch.h deleted file mode 100644 index acd16ec..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/finalize_after_dispatch.h +++ /dev/null
@@ -1,78 +0,0 @@ -// Copyright 2014 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. - -#ifndef FINALIZE_AFTER_DISPATCH_H_ -#define FINALIZE_AFTER_DISPATCH_H_ - -#include "heap/stubs.h" - -namespace blink { - -class NeedsFinalize : public GarbageCollectedFinalized<NeedsFinalize> { -public: - void trace(Visitor*); - void traceAfterDispatch(Visitor*); - // Needs a finalizeGarbageCollectedObject method. -}; - -class NeedsDispatch : public GarbageCollectedFinalized<NeedsDispatch> { -public: - void trace(Visitor*); - // Needs a traceAfterDispatch method. - void finalizeGarbageCollectedObject() { }; -}; - -class NeedsFinalizedBase : public GarbageCollected<NeedsFinalizedBase> { -public: - void trace(Visitor*) { }; - void traceAfterDispatch(Visitor*) { }; - void finalizeGarbageCollectedObject() { }; -}; - -class A : GarbageCollectedFinalized<A> { -public: - void trace(Visitor*); - void traceAfterDispatch(Visitor*); - void finalizeGarbageCollectedObject(); -protected: - enum Type { TB, TC, TD }; - A(Type type) : m_type(type) { } -private: - Type m_type; -}; - -class B : public A { -public: - B() : A(TB) { } - ~B() { } - void traceAfterDispatch(Visitor*); -private: - Member<A> m_a; -}; - -class C : public A { -public: - C() : A(TC) { } - void traceAfterDispatch(Visitor*); -private: - Member<A> m_a; -}; - -// This class is considered abstract does not need to be dispatched to. -class Abstract : public A { -protected: - Abstract(Type type) : A(type) { } -}; - -class D : public Abstract { -public: - D() : Abstract(TD) { } - void traceAfterDispatch(Visitor*); -private: - Member<A> m_a; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/finalize_after_dispatch.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/finalize_after_dispatch.txt deleted file mode 100644 index 8a652a4..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/finalize_after_dispatch.txt +++ /dev/null
@@ -1,17 +0,0 @@ -In file included from finalize_after_dispatch.cpp:5: -./finalize_after_dispatch.h:12:1: warning: [blink-gc] Class 'NeedsFinalize' is missing manual finalize dispatch. -class NeedsFinalize : public GarbageCollectedFinalized<NeedsFinalize> { -^ -./finalize_after_dispatch.h:19:1: warning: [blink-gc] Class 'NeedsDispatch' is missing manual trace dispatch. -class NeedsDispatch : public GarbageCollectedFinalized<NeedsDispatch> { -^ -./finalize_after_dispatch.h:26:1: warning: [blink-gc] Class 'NeedsFinalizedBase' requires finalization. -class NeedsFinalizedBase : public GarbageCollected<NeedsFinalizedBase> { -^ -./finalize_after_dispatch.h:30:5: note: [blink-gc] User-declared finalizer declared here: - void finalizeGarbageCollectedObject() { }; - ^ -finalize_after_dispatch.cpp:30:1: warning: [blink-gc] Missing dispatch to class 'D' in manual finalize dispatch. -void A::finalizeGarbageCollectedObject() -^ -4 warnings generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/garbage_collected_mixin.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/garbage_collected_mixin.cpp deleted file mode 100644 index e8f42f2..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/garbage_collected_mixin.cpp +++ /dev/null
@@ -1,20 +0,0 @@ -// Copyright 2014 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. - -#include "garbage_collected_mixin.h" - -namespace blink { - -void Mixin::trace(Visitor* visitor) -{ - // Missing: visitor->trace(m_self); -} - -void HeapObject::trace(Visitor* visitor) -{ - visitor->trace(m_mix); - // Missing: Mixin::trace(visitor); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/garbage_collected_mixin.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/garbage_collected_mixin.h deleted file mode 100644 index 3c6f8686..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/garbage_collected_mixin.h +++ /dev/null
@@ -1,29 +0,0 @@ -// Copyright 2014 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. - -#ifndef GARBAGE_COLLECTED_MIXIN_H_ -#define GARBAGE_COLLECTED_MIXIN_H_ - -#include "heap/stubs.h" - -namespace blink { - -class Mixin : public GarbageCollectedMixin { -public: - virtual void trace(Visitor*) override; -private: - Member<Mixin> m_self; -}; - -class HeapObject : public GarbageCollected<HeapObject>, public Mixin { - USING_GARBAGE_COLLECTED_MIXIN(HeapObject); -public: - virtual void trace(Visitor*) override; -private: - Member<Mixin> m_mix; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/garbage_collected_mixin.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/garbage_collected_mixin.txt deleted file mode 100644 index 4051a6a0..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/garbage_collected_mixin.txt +++ /dev/null
@@ -1,10 +0,0 @@ -garbage_collected_mixin.cpp:9:1: warning: [blink-gc] Class 'Mixin' has untraced fields that require tracing. -void Mixin::trace(Visitor* visitor) -^ -./garbage_collected_mixin.h:16:5: note: [blink-gc] Untraced field 'm_self' declared here: - Member<Mixin> m_self; - ^ -garbage_collected_mixin.cpp:14:1: warning: [blink-gc] Base class 'Mixin' of derived class 'HeapObject' requires tracing. -void HeapObject::trace(Visitor* visitor) -^ -2 warnings generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/heap/stubs.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/heap/stubs.h deleted file mode 100644 index 2b965df..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/heap/stubs.h +++ /dev/null
@@ -1,311 +0,0 @@ -// Copyright 2014 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. - -#ifndef HEAP_STUBS_H_ -#define HEAP_STUBS_H_ - -#include "stddef.h" - -#define WTF_MAKE_FAST_ALLOCATED \ - public: \ - void* operator new(size_t, void* p); \ - void* operator new[](size_t, void* p); \ - void* operator new(size_t size); \ - private: \ - typedef int __thisIsHereToForceASemicolonAfterThisMacro - -namespace WTF { - -template<typename T> class RefCounted { }; - -template<typename T> class RawPtr { -public: - operator T*() const { return 0; } - T* operator->() { return 0; } -}; - -template<typename T> class RefPtr { -public: - ~RefPtr() { } - operator T*() const { return 0; } - T* operator->() { return 0; } -}; - -template<typename T> class OwnPtr { -public: - ~OwnPtr() { } - operator T*() const { return 0; } - T* operator->() { return 0; } -}; - -class DefaultAllocator { -public: - static const bool isGarbageCollected = false; -}; - -template<typename T> -struct VectorTraits { - static const bool needsDestruction = true; -}; - -template<size_t inlineCapacity, bool isGarbageCollected, bool tNeedsDestruction> -class VectorDestructorBase { -public: - ~VectorDestructorBase() {} -}; - -template<size_t inlineCapacity> -class VectorDestructorBase<inlineCapacity, true, false> {}; - -template<> -class VectorDestructorBase<0, true, true> {}; - -template< - typename T, - size_t inlineCapacity = 0, - typename Allocator = DefaultAllocator> -class Vector : public VectorDestructorBase<inlineCapacity, - Allocator::isGarbageCollected, - VectorTraits<T>::needsDestruction> { - public: - using iterator = T*; - using const_iterator = const T*; - using reverse_iterator = T*; - using const_reverse_iterator = const T*; - - size_t size(); - T& operator[](size_t); -}; - -template <typename T, - size_t inlineCapacity = 0, - typename Allocator = DefaultAllocator> -class Deque { - public: - using iterator = T*; - using const_iterator = const T*; - using reverse_iterator = T*; - using const_reverse_iterator = const T*; -}; - -template <typename ValueArg, - typename HashArg = void, - typename TraitsArg = void, - typename Allocator = DefaultAllocator> -class HashSet { - public: - typedef ValueArg* iterator; - typedef const ValueArg* const_iterator; - typedef ValueArg* reverse_iterator; - typedef const ValueArg* const_reverse_iterator; -}; - -template <typename ValueArg, - typename HashArg = void, - typename TraitsArg = void, - typename Allocator = DefaultAllocator> -class ListHashSet { - public: - typedef ValueArg* iterator; - typedef const ValueArg* const_iterator; - typedef ValueArg* reverse_iterator; - typedef const ValueArg* const_reverse_iterator; -}; - -template <typename ValueArg, - typename HashArg = void, - typename TraitsArg = void, - typename Allocator = DefaultAllocator> -class LinkedHashSet { - public: - typedef ValueArg* iterator; - typedef const ValueArg* const_iterator; - typedef ValueArg* reverse_iterator; - typedef const ValueArg* const_reverse_iterator; -}; - -template< - typename ValueArg, - typename HashArg = void, - typename TraitsArg = void, - typename Allocator = DefaultAllocator> -class HashCountedSet {}; - -template <typename KeyArg, - typename MappedArg, - typename HashArg = void, - typename KeyTraitsArg = void, - typename MappedTraitsArg = void, - typename Allocator = DefaultAllocator> -class HashMap { - public: - typedef MappedArg* iterator; - typedef const MappedArg* const_iterator; - typedef MappedArg* reverse_iterator; - typedef const MappedArg* const_reverse_iterator; -}; -} - -// Empty namespace declaration to exercise internal -// handling of namespace equality. -namespace std { - /* empty */ -} - -namespace std { - -template<typename T> class unique_ptr { -public: - ~unique_ptr() { } - operator T*() const { return 0; } - T* operator->() { return 0; } -}; - -} - -namespace blink { - -using namespace WTF; - -#define DISALLOW_NEW() \ - private: \ - void* operator new(size_t) = delete; \ - void* operator new(size_t, void*) = delete; - -#define STACK_ALLOCATED() \ - private: \ - __attribute__((annotate("blink_stack_allocated"))) \ - void* operator new(size_t) = delete; \ - void* operator new(size_t, void*) = delete; - -#define ALLOW_ONLY_INLINE_ALLOCATION() \ - public: \ - void* operator new(size_t, void*); \ - private: \ - void* operator new(size_t) = delete; - -#define GC_PLUGIN_IGNORE(bug) \ - __attribute__((annotate("blink_gc_plugin_ignore"))) - -#define USING_GARBAGE_COLLECTED_MIXIN(type) \ -public: \ - virtual void adjustAndMark(Visitor*) const override { } \ - virtual bool isHeapObjectAlive(Visitor*) const override { return 0; } - -#define EAGERLY_FINALIZED() typedef int IsEagerlyFinalizedMarker - -template<typename T> class GarbageCollected { }; - -template<typename T> -class GarbageCollectedFinalized : public GarbageCollected<T> { }; - -template<typename T> -class RefCountedGarbageCollected : public GarbageCollectedFinalized<T> { }; - -template<typename T> class Member { -public: - operator T*() const { return 0; } - T* operator->() { return 0; } - bool operator!() const { return false; } -}; - -template<typename T> class WeakMember { -public: - operator T*() const { return 0; } - T* operator->() { return 0; } - bool operator!() const { return false; } -}; - -template<typename T> class Persistent { -public: - operator T*() const { return 0; } - T* operator->() { return 0; } - bool operator!() const { return false; } -}; - -template<typename T> class WeakPersistent { -public: - operator T*() const { return 0; } - T* operator->() { return 0; } - bool operator!() const { return false; } -}; - -template<typename T> class CrossThreadPersistent { -public: - operator T*() const { return 0; } - T* operator->() { return 0; } - bool operator!() const { return false; } -}; - -template<typename T> class CrossThreadWeakPersistent { -public: - operator T*() const { return 0; } - T* operator->() { return 0; } - bool operator!() const { return false; } -}; - -class HeapAllocator { -public: - static const bool isGarbageCollected = true; -}; - -template<typename T, size_t inlineCapacity = 0> -class HeapVector : public Vector<T, inlineCapacity, HeapAllocator> { }; - -template<typename T, size_t inlineCapacity = 0> -class HeapDeque : public Vector<T, inlineCapacity, HeapAllocator> { }; - -template<typename T> -class HeapHashSet : public HashSet<T, void, void, HeapAllocator> { }; - -template<typename T> -class HeapListHashSet : public ListHashSet<T, void, void, HeapAllocator> { }; - -template<typename T> -class HeapLinkedHashSet : public LinkedHashSet<T, void, void, HeapAllocator> { -}; - -template<typename T> -class HeapHashCountedSet : public HashCountedSet<T, void, void, HeapAllocator> { -}; - -template<typename K, typename V> -class HeapHashMap : public HashMap<K, V, void, void, void, HeapAllocator> { }; - -template<typename T> -class PersistentHeapVector : public Vector<T, 0, HeapAllocator> { }; - -class Visitor { - public: - template <typename T, void (T::*method)(Visitor*)> - void registerWeakMembers(const T* obj); - - template <typename T> - void trace(const T&); -}; - -class GarbageCollectedMixin { -public: - virtual void adjustAndMark(Visitor*) const = 0; - virtual bool isHeapObjectAlive(Visitor*) const = 0; - virtual void trace(Visitor*) { } -}; - -template<typename T> -struct TraceIfNeeded { - static void trace(Visitor*, T*); -}; - -} - -namespace WTF { - -template<typename T> -struct VectorTraits<blink::Member<T> > { - static const bool needsDestruction = false; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/ignore_class.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/ignore_class.cpp deleted file mode 100644 index c539eb6..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/ignore_class.cpp +++ /dev/null
@@ -1,20 +0,0 @@ -// Copyright 2014 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. - -#include "ignore_class.h" - -namespace blink { - -void B::trace(Visitor* visitor) -{ - // Class is ignored so no checking here. -} - -void C::trace(Visitor* visitor) -{ - // Missing trace of m_obj. - // Ignored base class B does not need tracing. -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/ignore_class.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/ignore_class.h deleted file mode 100644 index 580ed7c..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/ignore_class.h +++ /dev/null
@@ -1,40 +0,0 @@ -// Copyright 2014 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. - -#ifndef IGNORE_CLASS_H_ -#define IGNORE_CLASS_H_ - -#include "heap/stubs.h" - -namespace blink { - -class HeapObject : public GarbageCollected<HeapObject> { }; - -// Don't require trace method on ignored class. -class GC_PLUGIN_IGNORE("http://crbug.com/12345") A; -class A : public GarbageCollected<A> { -private: - Member<HeapObject> m_obj; -}; - -// Don't require tracing of fields on ignored class. -class GC_PLUGIN_IGNORE("http://crbug.com/12345") B; -class B : public GarbageCollected<B> { -public: - virtual void trace(Visitor*); -private: - Member<HeapObject> m_obj; -}; - -// Don't require tracing of an ignored base class. -class C : public B { -public: - void trace(Visitor*); -private: - Member<HeapObject> m_obj; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/ignore_class.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/ignore_class.txt deleted file mode 100644 index d3d2d80..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/ignore_class.txt +++ /dev/null
@@ -1,7 +0,0 @@ -ignore_class.cpp:14:1: warning: [blink-gc] Class 'C' has untraced fields that require tracing. -void C::trace(Visitor* visitor) -^ -./ignore_class.h:35:5: note: [blink-gc] Untraced field 'm_obj' declared here: - Member<HeapObject> m_obj; - ^ -1 warning generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/ignore_fields.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/ignore_fields.cpp deleted file mode 100644 index 118af754..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/ignore_fields.cpp +++ /dev/null
@@ -1,15 +0,0 @@ -// Copyright 2014 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. - -#include "ignore_fields.h" - -namespace blink { - -void C::trace(Visitor* visitor) -{ - // Missing trace of m_one. - // Not missing ignored field m_two. -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/ignore_fields.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/ignore_fields.h deleted file mode 100644 index e12bbab..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/ignore_fields.h +++ /dev/null
@@ -1,43 +0,0 @@ -// Copyright 2014 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. - -#ifndef IGNORE_FIELDS_H_ -#define IGNORE_FIELDS_H_ - -#include "heap/stubs.h" - -namespace blink { - -class HeapObject : public GarbageCollected<HeapObject> { -public: - virtual void trace(Visitor*) { } -}; - -// Don't warn about raw pointers to heap allocated objects. -class A : public GarbageCollected<A>{ -private: - GC_PLUGIN_IGNORE("http://crbug.com/12345") - HeapObject* m_obj; -}; - -// Don't require trace method when (all) GC fields are ignored. -class B : public GarbageCollected<B> { -private: - GC_PLUGIN_IGNORE("http://crbug.com/12345") - Member<HeapObject> m_one; -}; - -// Don't require tracing an ignored field. -class C : public GarbageCollected<C> { -public: - void trace(Visitor*); -private: - Member<HeapObject> m_one; - GC_PLUGIN_IGNORE("http://crbug.com/12345") - Member<HeapObject> m_two; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/ignore_fields.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/ignore_fields.txt deleted file mode 100644 index b4de4981..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/ignore_fields.txt +++ /dev/null
@@ -1,7 +0,0 @@ -ignore_fields.cpp:9:1: warning: [blink-gc] Class 'C' has untraced fields that require tracing. -void C::trace(Visitor* visitor) -^ -./ignore_fields.h:36:5: note: [blink-gc] Untraced field 'm_one' declared here: - Member<HeapObject> m_one; - ^ -1 warning generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/inner_class.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/inner_class.cpp deleted file mode 100644 index 03a53ea..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/inner_class.cpp +++ /dev/null
@@ -1,14 +0,0 @@ -// Copyright 2014 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. - -#include "inner_class.h" - -namespace blink { - -void SomeObject::InnerObject::trace(Visitor* visitor) -{ - // Missing: visitor->trace(m_obj); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/inner_class.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/inner_class.h deleted file mode 100644 index 30f6ce3..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/inner_class.h +++ /dev/null
@@ -1,24 +0,0 @@ -// Copyright 2014 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. - -#ifndef INNER_CLASS_H_ -#define INNER_CLASS_H_ - -#include "heap/stubs.h" - -namespace blink { - -class SomeObject { -private: - class InnerObject : public GarbageCollected<InnerObject> { - public: - void trace(Visitor*); - private: - Member<InnerObject> m_obj; - }; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/inner_class.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/inner_class.txt deleted file mode 100644 index acdef6e..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/inner_class.txt +++ /dev/null
@@ -1,7 +0,0 @@ -inner_class.cpp:9:1: warning: [blink-gc] Class 'InnerObject' has untraced fields that require tracing. -void SomeObject::InnerObject::trace(Visitor* visitor) -^ -./inner_class.h:18:9: note: [blink-gc] Untraced field 'm_obj' declared here: - Member<InnerObject> m_obj; - ^ -1 warning generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/left_most_gc_base.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/left_most_gc_base.cpp deleted file mode 100644 index 041d9f07..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/left_most_gc_base.cpp +++ /dev/null
@@ -1,7 +0,0 @@ -// Copyright 2014 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. - -#include "left_most_gc_base.h" - -// Nothing to define.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/left_most_gc_base.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/left_most_gc_base.h deleted file mode 100644 index 0d76d61..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/left_most_gc_base.h +++ /dev/null
@@ -1,30 +0,0 @@ -// Copyright 2014 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. - -#ifndef LEFT_MOST_GC_BASE_H_ -#define LEFT_MOST_GC_BASE_H_ - -#include "heap/stubs.h" - -namespace blink { - -class A { }; -class B { }; - -class Right : public A, public B, public GarbageCollected<Right> { }; // Error -class Left : public GarbageCollected<Left>, public B, public A { }; - -class DerivedRight : public Right, public Left { }; // Error -class DerivedLeft : public Left, public Right { }; - -class C : public GarbageCollected<C> { -public: - virtual void trace(Visitor*); -}; - -class IllFormed : public A, public C { }; // Error - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/left_most_gc_base.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/left_most_gc_base.txt deleted file mode 100644 index e2d04186..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/left_most_gc_base.txt +++ /dev/null
@@ -1,14 +0,0 @@ -In file included from left_most_gc_base.cpp:5: -./left_most_gc_base.h:15:1: warning: [blink-gc] Class 'Right' must derive its GC base in the left-most position. -class Right : public A, public B, public GarbageCollected<Right> { }; // Error -^ -./left_most_gc_base.h:18:1: warning: [blink-gc] Class 'DerivedRight' must derive its GC base in the left-most position. -class DerivedRight : public Right, public Left { }; // Error -^ -./left_most_gc_base.h:12:1: warning: [blink-gc] Left-most base class 'A' of derived class 'IllFormed' must be polymorphic. -class A { }; -^ -./left_most_gc_base.h:26:1: warning: [blink-gc] Class 'IllFormed' must derive its GC base in the left-most position. -class IllFormed : public A, public C { }; // Error -^ -4 warnings generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/member_in_offheap_class.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/member_in_offheap_class.cpp deleted file mode 100644 index 4b44c2d..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/member_in_offheap_class.cpp +++ /dev/null
@@ -1,24 +0,0 @@ -// Copyright 2014 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. - -#include "member_in_offheap_class.h" - -namespace blink { - -void OffHeapObject::trace(Visitor* visitor) -{ - visitor->trace(m_obj); -} - -void PartObject::trace(Visitor* visitor) -{ - visitor->trace(m_obj); -} - -void InlineObject::trace(Visitor* visitor) -{ - visitor->trace(m_obj); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/member_in_offheap_class.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/member_in_offheap_class.h deleted file mode 100644 index 2a7c868..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/member_in_offheap_class.h +++ /dev/null
@@ -1,48 +0,0 @@ -// Copyright 2014 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. - -#ifndef MEMBER_IN_OFFHEAP_CLASS_H_ -#define MEMBER_IN_OFFHEAP_CLASS_H_ - -#include "heap/stubs.h" - -namespace blink { - -class HeapObject : public GarbageCollected<HeapObject> { }; - -class OffHeapObject { -public: - void trace(Visitor*); -private: - Member<HeapObject> m_obj; // Must not contain Member. - Persistent<HeapVector<Member<HeapObject> > > m_objs; // OK -}; - -class StackObject { - STACK_ALLOCATED(); -private: - Member<HeapObject> m_obj; // OK - Member<OffHeapObject> m_memberOff; // NOT OK - HeapVector<Member<OffHeapObject>> m_heapVectorMemberOff; // NOT OK -}; - -class PartObject { - DISALLOW_NEW(); -public: - void trace(Visitor*); -private: - Member<HeapObject> m_obj; // OK -}; - -class InlineObject { - ALLOW_ONLY_INLINE_ALLOCATION(); -public: - void trace(Visitor*); -private: - Member<HeapObject> m_obj; // OK -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/member_in_offheap_class.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/member_in_offheap_class.txt deleted file mode 100644 index 9d5f2388..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/member_in_offheap_class.txt +++ /dev/null
@@ -1,17 +0,0 @@ -In file included from member_in_offheap_class.cpp:5: -./member_in_offheap_class.h:14:1: warning: [blink-gc] Class 'OffHeapObject' contains invalid fields. -class OffHeapObject { -^ -./member_in_offheap_class.h:18:5: note: [blink-gc] Member field 'm_obj' in unmanaged class declared here: - Member<HeapObject> m_obj; // Must not contain Member. - ^ -./member_in_offheap_class.h:22:1: warning: [blink-gc] Class 'StackObject' contains invalid fields. -class StackObject { -^ -./member_in_offheap_class.h:26:5: note: [blink-gc] Member field 'm_memberOff' to non-GC managed class declared here: - Member<OffHeapObject> m_memberOff; // NOT OK - ^ -./member_in_offheap_class.h:27:5: note: [blink-gc] Member field 'm_heapVectorMemberOff' to non-GC managed class declared here: - HeapVector<Member<OffHeapObject>> m_heapVectorMemberOff; // NOT OK - ^ -2 warnings generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/non_virtual_trace.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/non_virtual_trace.cpp deleted file mode 100644 index 9f57711..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/non_virtual_trace.cpp +++ /dev/null
@@ -1,23 +0,0 @@ -// Copyright 2014 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. - -#include "non_virtual_trace.h" - -namespace blink { - -void A::trace(Visitor* visitor) -{ -} - -void C::trace(Visitor* visitor) -{ - B::trace(visitor); -} - -void D::trace(Visitor* visitor) -{ - B::trace(visitor); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/non_virtual_trace.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/non_virtual_trace.h deleted file mode 100644 index 4179d49..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/non_virtual_trace.h +++ /dev/null
@@ -1,32 +0,0 @@ -// Copyright 2014 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. - -#ifndef NON_VIRTUAL_TRACE_H_ -#define NON_VIRTUAL_TRACE_H_ - -#include "heap/stubs.h" - -namespace blink { - -class A : public GarbageCollected<A> { -public: - void trace(Visitor*); -}; - -class B : public A { -}; - -class C : public B { -public: - void trace(Visitor*); // Cannot override a non-virtual trace. -}; - -class D : public B { -public: - virtual void trace(Visitor*); // Cannot override a non-virtual trace. -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/non_virtual_trace.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/non_virtual_trace.txt deleted file mode 100644 index a05a94d..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/non_virtual_trace.txt +++ /dev/null
@@ -1,17 +0,0 @@ -In file included from non_virtual_trace.cpp:5: -./non_virtual_trace.h:12:1: warning: [blink-gc] Left-most base class 'A' of derived class 'D' must define a virtual trace method. -class A : public GarbageCollected<A> { -^ -non_virtual_trace.cpp:13:1: warning: [blink-gc] Class 'C' overrides non-virtual trace of base class 'A'. -void C::trace(Visitor* visitor) -^ -./non_virtual_trace.h:14:5: note: [blink-gc] Non-virtual trace method declared here: - void trace(Visitor*); - ^ -non_virtual_trace.cpp:18:1: warning: [blink-gc] Class 'D' overrides non-virtual trace of base class 'A'. -void D::trace(Visitor* visitor) -^ -./non_virtual_trace.h:14:5: note: [blink-gc] Non-virtual trace method declared here: - void trace(Visitor*); - ^ -3 warnings generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/own_ptr_to_gc_managed_class.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/own_ptr_to_gc_managed_class.cpp deleted file mode 100644 index 9e27c3d..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/own_ptr_to_gc_managed_class.cpp +++ /dev/null
@@ -1,11 +0,0 @@ -// Copyright 2014 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. - -#include "own_ptr_to_gc_managed_class.h" - -namespace blink { - -void HeapObject::trace(Visitor* visitor) { } - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/own_ptr_to_gc_managed_class.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/own_ptr_to_gc_managed_class.h deleted file mode 100644 index 6f47bafe..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/own_ptr_to_gc_managed_class.h +++ /dev/null
@@ -1,30 +0,0 @@ -// Copyright 2014 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. - -#ifndef OWN_PTR_TO_GC_MANAGED_CLASS_H_ -#define OWN_PTR_TO_GC_MANAGED_CLASS_H_ - -#include "heap/stubs.h" - -namespace blink { - -class HeapObject; - -class PartObject { - DISALLOW_NEW(); -private: - OwnPtr<HeapObject> m_obj; -}; - -class HeapObject : public GarbageCollectedFinalized<HeapObject> { -public: - void trace(Visitor*); -private: - Vector<OwnPtr<HeapObject> > m_objs; - OwnPtr<HeapVector<Member<HeapObject> > > m_objs2; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/own_ptr_to_gc_managed_class.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/own_ptr_to_gc_managed_class.txt deleted file mode 100644 index 4102e86..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/own_ptr_to_gc_managed_class.txt +++ /dev/null
@@ -1,17 +0,0 @@ -In file included from own_ptr_to_gc_managed_class.cpp:5: -./own_ptr_to_gc_managed_class.h:14:1: warning: [blink-gc] Class 'PartObject' contains invalid fields. -class PartObject { -^ -./own_ptr_to_gc_managed_class.h:17:5: note: [blink-gc] OwnPtr field 'm_obj' to a GC managed class declared here: - OwnPtr<HeapObject> m_obj; - ^ -./own_ptr_to_gc_managed_class.h:20:1: warning: [blink-gc] Class 'HeapObject' contains invalid fields. -class HeapObject : public GarbageCollectedFinalized<HeapObject> { -^ -./own_ptr_to_gc_managed_class.h:24:5: note: [blink-gc] OwnPtr field 'm_objs' to a GC managed class declared here: - Vector<OwnPtr<HeapObject> > m_objs; - ^ -./own_ptr_to_gc_managed_class.h:25:5: note: [blink-gc] OwnPtr field 'm_objs2' to a GC managed class declared here: - OwnPtr<HeapVector<Member<HeapObject> > > m_objs2; - ^ -2 warnings generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/part_object_to_gc_derived_class.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/part_object_to_gc_derived_class.cpp deleted file mode 100644 index 2da8661..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/part_object_to_gc_derived_class.cpp +++ /dev/null
@@ -1,14 +0,0 @@ -// Copyright 2014 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. - -#include "part_object_to_gc_derived_class.h" - -namespace blink { - -void B::trace(Visitor* visitor) -{ - visitor->trace(m_a); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/part_object_to_gc_derived_class.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/part_object_to_gc_derived_class.h deleted file mode 100644 index ef5a649..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/part_object_to_gc_derived_class.h +++ /dev/null
@@ -1,23 +0,0 @@ -// Copyright 2014 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. - -#ifndef PART_OBJECT_TO_GC_DERIVED_CLASS_H_ -#define PART_OBJECT_TO_GC_DERIVED_CLASS_H_ - -#include "heap/stubs.h" - -namespace blink { - -class A : public GarbageCollected<A> { }; - -class B : public GarbageCollected<B> { -public: - void trace(Visitor*); -private: - A m_a; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/part_object_to_gc_derived_class.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/part_object_to_gc_derived_class.txt deleted file mode 100644 index 5970132..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/part_object_to_gc_derived_class.txt +++ /dev/null
@@ -1,8 +0,0 @@ -In file included from part_object_to_gc_derived_class.cpp:5: -./part_object_to_gc_derived_class.h:14:1: warning: [blink-gc] Class 'B' contains invalid fields. -class B : public GarbageCollected<B> { -^ -./part_object_to_gc_derived_class.h:18:5: note: [blink-gc] Part-object field 'm_a' to a GC derived class declared here: - A m_a; - ^ -1 warning generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/persistent_field_in_gc_managed_class.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/persistent_field_in_gc_managed_class.cpp deleted file mode 100644 index 7b3f286..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/persistent_field_in_gc_managed_class.cpp +++ /dev/null
@@ -1,13 +0,0 @@ -// Copyright 2014 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. - -#include "persistent_field_in_gc_managed_class.h" - -namespace blink { - -void HeapObject::trace(Visitor* visitor) { - visitor->trace(m_parts); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/persistent_field_in_gc_managed_class.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/persistent_field_in_gc_managed_class.h deleted file mode 100644 index a90f63c..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/persistent_field_in_gc_managed_class.h +++ /dev/null
@@ -1,32 +0,0 @@ -// Copyright 2014 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. - -#ifndef PERSISTENT_FIELD_IN_GC_MANAGED_CLASS_H_ -#define PERSISTENT_FIELD_IN_GC_MANAGED_CLASS_H_ - -#include "heap/stubs.h" - -namespace blink { - -class HeapObject; - -class PartObject { - DISALLOW_NEW(); -private: - Persistent<HeapObject> m_obj; -}; - -class HeapObject : public GarbageCollected<HeapObject> { -public: - void trace(Visitor*); -private: - PartObject m_part; - HeapVector<PartObject> m_parts; - PersistentHeapVector<Member<HeapObject> > m_objs; - WeakPersistent<HeapObject> m_weakPersistent; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/persistent_field_in_gc_managed_class.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/persistent_field_in_gc_managed_class.txt deleted file mode 100644 index dd5bc74..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/persistent_field_in_gc_managed_class.txt +++ /dev/null
@@ -1,32 +0,0 @@ -In file included from persistent_field_in_gc_managed_class.cpp:5: -./persistent_field_in_gc_managed_class.h:20:1: warning: [blink-gc] Class 'HeapObject' contains GC root in field 'm_part'. -class HeapObject : public GarbageCollected<HeapObject> { -^ -./persistent_field_in_gc_managed_class.h:24:5: note: [blink-gc] Field 'm_part' with embedded GC root in 'HeapObject' declared here: - PartObject m_part; - ^ -./persistent_field_in_gc_managed_class.h:17:5: note: [blink-gc] Field 'm_obj' defining a GC root declared here: - Persistent<HeapObject> m_obj; - ^ -./persistent_field_in_gc_managed_class.h:20:1: warning: [blink-gc] Class 'HeapObject' contains GC root in field 'm_parts'. -class HeapObject : public GarbageCollected<HeapObject> { -^ -./persistent_field_in_gc_managed_class.h:25:5: note: [blink-gc] Field 'm_parts' with embedded GC root in 'HeapObject' declared here: - HeapVector<PartObject> m_parts; - ^ -./persistent_field_in_gc_managed_class.h:17:5: note: [blink-gc] Field 'm_obj' defining a GC root declared here: - Persistent<HeapObject> m_obj; - ^ -./persistent_field_in_gc_managed_class.h:20:1: warning: [blink-gc] Class 'HeapObject' contains GC root in field 'm_objs'. -class HeapObject : public GarbageCollected<HeapObject> { -^ -./persistent_field_in_gc_managed_class.h:26:5: note: [blink-gc] Field 'm_objs' defining a GC root declared here: - PersistentHeapVector<Member<HeapObject> > m_objs; - ^ -./persistent_field_in_gc_managed_class.h:20:1: warning: [blink-gc] Class 'HeapObject' contains GC root in field 'm_weakPersistent'. -class HeapObject : public GarbageCollected<HeapObject> { -^ -./persistent_field_in_gc_managed_class.h:27:5: note: [blink-gc] Field 'm_weakPersistent' defining a GC root declared here: - WeakPersistent<HeapObject> m_weakPersistent; - ^ -4 warnings generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/persistent_no_trace.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/persistent_no_trace.cpp deleted file mode 100644 index 637b46f..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/persistent_no_trace.cpp +++ /dev/null
@@ -1,14 +0,0 @@ -// Copyright 2016 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. - -#include "persistent_no_trace.h" - -namespace blink { - -void HeapObject::trace(Visitor* visitor) { - visitor->trace(m_crossThreadPersistent); - visitor->trace(m_crossThreadWeakPersistent); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/persistent_no_trace.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/persistent_no_trace.h deleted file mode 100644 index c8beb996..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/persistent_no_trace.h +++ /dev/null
@@ -1,22 +0,0 @@ -// Copyright 2016 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. - -#ifndef PERSISTENT_NO_TRACE_H_ -#define PERSISTENT_NO_TRACE_H_ - -#include "heap/stubs.h" - -namespace blink { - -class HeapObject : public GarbageCollected<HeapObject> { -public: - void trace(Visitor*); -private: - CrossThreadPersistent<HeapObject> m_crossThreadPersistent; - CrossThreadWeakPersistent<HeapObject> m_crossThreadWeakPersistent; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/persistent_no_trace.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/persistent_no_trace.txt deleted file mode 100644 index dcfe76d..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/persistent_no_trace.txt +++ /dev/null
@@ -1,10 +0,0 @@ -persistent_no_trace.cpp:9:1: warning: [blink-gc] Class 'HeapObject' has untraced or not traceable fields. -void HeapObject::trace(Visitor* visitor) { -^ -./persistent_no_trace.h:16:5: note: [blink-gc] Untraceable field 'm_crossThreadPersistent' declared here: - CrossThreadPersistent<HeapObject> m_crossThreadPersistent; - ^ -./persistent_no_trace.h:17:5: note: [blink-gc] Untraceable field 'm_crossThreadWeakPersistent' declared here: - CrossThreadWeakPersistent<HeapObject> m_crossThreadWeakPersistent; - ^ -1 warning generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/polymorphic_class_with_non_virtual_trace.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/polymorphic_class_with_non_virtual_trace.cpp deleted file mode 100644 index dc7620a..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/polymorphic_class_with_non_virtual_trace.cpp +++ /dev/null
@@ -1,19 +0,0 @@ -// Copyright 2014 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. - -#include "polymorphic_class_with_non_virtual_trace.h" - -namespace blink { - -void IsLeftMostPolymorphic::trace(Visitor* visitor) -{ - visitor->trace(m_obj); -} - -void IsNotLeftMostPolymorphic::trace(Visitor* visitor) -{ - visitor->trace(m_obj); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/polymorphic_class_with_non_virtual_trace.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/polymorphic_class_with_non_virtual_trace.h deleted file mode 100644 index f5d999eb..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/polymorphic_class_with_non_virtual_trace.h +++ /dev/null
@@ -1,61 +0,0 @@ -// Copyright 2014 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. - -#ifndef POLYMORPHIC_CLASS_WITH_NON_VIRTUAL_TRACE_H_ -#define POLYMORPHIC_CLASS_WITH_NON_VIRTUAL_TRACE_H_ - -#include "heap/stubs.h" - -namespace blink { - -class HeapObject : public GarbageCollected<HeapObject> { -public: - void trace(Visitor*) { } -}; - -class NonPolymorphicBase { -}; - -class PolymorphicBase { -public: - virtual void foo(); -}; - -class IsLeftMostPolymorphic - : public GarbageCollected<IsLeftMostPolymorphic>, - public PolymorphicBase { -public: - void trace(Visitor*); -private: - Member<HeapObject> m_obj; -}; - -class IsNotLeftMostPolymorphic - : public GarbageCollected<IsNotLeftMostPolymorphic>, - public NonPolymorphicBase, - public PolymorphicBase { -public: - void trace(Visitor*); -private: - Member<HeapObject> m_obj; -}; - -template<typename T> -class TemplatedNonPolymorphicBase - : public GarbageCollected<TemplatedNonPolymorphicBase<T> > { -public: - void trace(Visitor* visitor) { visitor->trace(m_obj); } -private: - Member<HeapObject> m_obj; -}; - -// Looks OK, but will result in an incorrect object pointer when marking. -class TemplatedIsNotLeftMostPolymorphic - : public TemplatedNonPolymorphicBase<TemplatedIsNotLeftMostPolymorphic>, - public PolymorphicBase { -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/polymorphic_class_with_non_virtual_trace.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/polymorphic_class_with_non_virtual_trace.txt deleted file mode 100644 index 38f2e77..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/polymorphic_class_with_non_virtual_trace.txt +++ /dev/null
@@ -1,8 +0,0 @@ -In file included from polymorphic_class_with_non_virtual_trace.cpp:5: -./polymorphic_class_with_non_virtual_trace.h:17:1: warning: [blink-gc] Left-most base class 'NonPolymorphicBase' of derived class 'IsNotLeftMostPolymorphic' must be polymorphic. -class NonPolymorphicBase { -^ -./polymorphic_class_with_non_virtual_trace.h:45:1: warning: [blink-gc] Left-most base class 'TemplatedNonPolymorphicBase<blink::TemplatedIsNotLeftMostPolymorphic>' of derived class 'TemplatedIsNotLeftMostPolymorphic' must be polymorphic. -class TemplatedNonPolymorphicBase -^ -2 warnings generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/pure_virtual_trace.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/pure_virtual_trace.cpp deleted file mode 100644 index d993a326..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/pure_virtual_trace.cpp +++ /dev/null
@@ -1,7 +0,0 @@ -// Copyright 2014 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. - -#include "pure_virtual_trace.h" - -// Nothing to define
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/pure_virtual_trace.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/pure_virtual_trace.h deleted file mode 100644 index 356a95e..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/pure_virtual_trace.h +++ /dev/null
@@ -1,19 +0,0 @@ -// Copyright 2014 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. - -#ifndef PURE_VIRTUAL_TRACE_H_ -#define PURE_VIRTUAL_TRACE_H_ - -#include "heap/stubs.h" - -namespace blink { - -class A : public GarbageCollected<A> { -public: - virtual void trace(Visitor*) = 0; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/pure_virtual_trace.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/pure_virtual_trace.txt deleted file mode 100644 index 175a28a..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/pure_virtual_trace.txt +++ /dev/null
@@ -1,5 +0,0 @@ -In file included from pure_virtual_trace.cpp:5: -./pure_virtual_trace.h:14:5: warning: [blink-gc] Garbage collected class 'A' is not permitted to declare a pure-virtual trace method. - virtual void trace(Visitor*) = 0; - ^ -1 warning generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/raw_ptr_to_gc_managed_class.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/raw_ptr_to_gc_managed_class.cpp deleted file mode 100644 index 4d6cc05..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/raw_ptr_to_gc_managed_class.cpp +++ /dev/null
@@ -1,13 +0,0 @@ -// Copyright 2014 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. - -#include "raw_ptr_to_gc_managed_class.h" - -namespace blink { - -void HeapObject::trace(Visitor* visitor) { - visitor->trace(m_objs); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/raw_ptr_to_gc_managed_class.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/raw_ptr_to_gc_managed_class.h deleted file mode 100644 index 18fa9fa..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/raw_ptr_to_gc_managed_class.h +++ /dev/null
@@ -1,33 +0,0 @@ -// Copyright 2014 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. - -#ifndef RAW_PTR_TO_GC_MANAGED_CLASS_H_ -#define RAW_PTR_TO_GC_MANAGED_CLASS_H_ - -#include "heap/stubs.h" - -namespace blink { - -class HeapObject; - -class PartObject { - DISALLOW_NEW(); -private: - PartObject(); - - HeapObject* m_rawObj; - HeapObject& m_refObj; -}; - -class HeapObject : public GarbageCollected<HeapObject> { -public: - void trace(Visitor*); -private: - PartObject m_part; - HeapVector<HeapObject*> m_objs; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/raw_ptr_to_gc_managed_class.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/raw_ptr_to_gc_managed_class.txt deleted file mode 100644 index 98f5abe8..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/raw_ptr_to_gc_managed_class.txt +++ /dev/null
@@ -1,17 +0,0 @@ -In file included from raw_ptr_to_gc_managed_class.cpp:5: -./raw_ptr_to_gc_managed_class.h:14:1: warning: [blink-gc] Class 'PartObject' contains invalid fields. -class PartObject { -^ -./raw_ptr_to_gc_managed_class.h:19:5: note: [blink-gc] Raw pointer field 'm_rawObj' to a GC managed class declared here: - HeapObject* m_rawObj; - ^ -./raw_ptr_to_gc_managed_class.h:20:5: note: [blink-gc] Reference pointer field 'm_refObj' to a GC managed class declared here: - HeapObject& m_refObj; - ^ -./raw_ptr_to_gc_managed_class.h:23:1: warning: [blink-gc] Class 'HeapObject' contains invalid fields. -class HeapObject : public GarbageCollected<HeapObject> { -^ -./raw_ptr_to_gc_managed_class.h:28:5: note: [blink-gc] Raw pointer field 'm_objs' to a GC managed class declared here: - HeapVector<HeapObject*> m_objs; - ^ -2 warnings generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/raw_ptr_to_gc_managed_class_error.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/raw_ptr_to_gc_managed_class_error.cpp deleted file mode 100644 index f71d1b8..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/raw_ptr_to_gc_managed_class_error.cpp +++ /dev/null
@@ -1,13 +0,0 @@ -// Copyright 2015 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. - -#include "raw_ptr_to_gc_managed_class_error.h" - -namespace blink { - -void HeapObject::trace(Visitor* visitor) { - visitor->trace(m_objs); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/raw_ptr_to_gc_managed_class_error.flags b/tools/clang/blink_gc_plugin/tests/legacy_naming/raw_ptr_to_gc_managed_class_error.flags deleted file mode 100644 index 2f41be66..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/raw_ptr_to_gc_managed_class_error.flags +++ /dev/null
@@ -1 +0,0 @@ --Werror
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/raw_ptr_to_gc_managed_class_error.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/raw_ptr_to_gc_managed_class_error.h deleted file mode 100644 index f4921c4..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/raw_ptr_to_gc_managed_class_error.h +++ /dev/null
@@ -1,33 +0,0 @@ -// Copyright 2015 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. - -#ifndef RAW_PTR_TO_GC_MANAGED_CLASS_ERROR_H_ -#define RAW_PTR_TO_GC_MANAGED_CLASS_ERROR_H_ - -#include "heap/stubs.h" - -namespace blink { - -class HeapObject; - -class PartObject { - DISALLOW_NEW(); -private: - PartObject(); - - HeapObject* m_rawObj; - HeapObject& m_refObj; -}; - -class HeapObject : public GarbageCollected<HeapObject> { -public: - void trace(Visitor*); -private: - PartObject m_part; - HeapVector<HeapObject*> m_objs; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/raw_ptr_to_gc_managed_class_error.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/raw_ptr_to_gc_managed_class_error.txt deleted file mode 100644 index c21c8172..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/raw_ptr_to_gc_managed_class_error.txt +++ /dev/null
@@ -1,17 +0,0 @@ -In file included from raw_ptr_to_gc_managed_class_error.cpp:5: -./raw_ptr_to_gc_managed_class_error.h:14:1: error: [blink-gc] Class 'PartObject' contains invalid fields. -class PartObject { -^ -./raw_ptr_to_gc_managed_class_error.h:19:5: note: [blink-gc] Raw pointer field 'm_rawObj' to a GC managed class declared here: - HeapObject* m_rawObj; - ^ -./raw_ptr_to_gc_managed_class_error.h:20:5: note: [blink-gc] Reference pointer field 'm_refObj' to a GC managed class declared here: - HeapObject& m_refObj; - ^ -./raw_ptr_to_gc_managed_class_error.h:23:1: error: [blink-gc] Class 'HeapObject' contains invalid fields. -class HeapObject : public GarbageCollected<HeapObject> { -^ -./raw_ptr_to_gc_managed_class_error.h:28:5: note: [blink-gc] Raw pointer field 'm_objs' to a GC managed class declared here: - HeapVector<HeapObject*> m_objs; - ^ -2 errors generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/ref_ptr_to_gc_managed_class.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/ref_ptr_to_gc_managed_class.cpp deleted file mode 100644 index e0a200f..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/ref_ptr_to_gc_managed_class.cpp +++ /dev/null
@@ -1,11 +0,0 @@ -// Copyright 2014 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. - -#include "ref_ptr_to_gc_managed_class.h" - -namespace blink { - -void HeapObject::trace(Visitor*) { } - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/ref_ptr_to_gc_managed_class.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/ref_ptr_to_gc_managed_class.h deleted file mode 100644 index c3df7f8..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/ref_ptr_to_gc_managed_class.h +++ /dev/null
@@ -1,30 +0,0 @@ -// Copyright 2014 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. - -#ifndef REF_PTR_TO_GC_MANAGED_CLASS_H_ -#define REF_PTR_TO_GC_MANAGED_CLASS_H_ - -#include "heap/stubs.h" - -namespace blink { - -class HeapObject; - -class PartObject { - DISALLOW_NEW(); -private: - RefPtr<HeapObject> m_obj; -}; - -class HeapObject : public GarbageCollectedFinalized<HeapObject> { -public: - void trace(Visitor*); -private: - PartObject m_part; - Vector<RefPtr<HeapObject> > m_objs; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/ref_ptr_to_gc_managed_class.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/ref_ptr_to_gc_managed_class.txt deleted file mode 100644 index fd4978512..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/ref_ptr_to_gc_managed_class.txt +++ /dev/null
@@ -1,14 +0,0 @@ -In file included from ref_ptr_to_gc_managed_class.cpp:5: -./ref_ptr_to_gc_managed_class.h:14:1: warning: [blink-gc] Class 'PartObject' contains invalid fields. -class PartObject { -^ -./ref_ptr_to_gc_managed_class.h:17:5: note: [blink-gc] RefPtr field 'm_obj' to a GC managed class declared here: - RefPtr<HeapObject> m_obj; - ^ -./ref_ptr_to_gc_managed_class.h:20:1: warning: [blink-gc] Class 'HeapObject' contains invalid fields. -class HeapObject : public GarbageCollectedFinalized<HeapObject> { -^ -./ref_ptr_to_gc_managed_class.h:25:5: note: [blink-gc] RefPtr field 'm_objs' to a GC managed class declared here: - Vector<RefPtr<HeapObject> > m_objs; - ^ -2 warnings generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/register_weak_members_template.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/register_weak_members_template.cpp deleted file mode 100644 index 6742c22..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/register_weak_members_template.cpp +++ /dev/null
@@ -1,7 +0,0 @@ -// Copyright 2015 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. - -#include "register_weak_members_template.h" - -// Nothing to define here.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/register_weak_members_template.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/register_weak_members_template.h deleted file mode 100644 index 4df3ade..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/register_weak_members_template.h +++ /dev/null
@@ -1,33 +0,0 @@ -// Copyright 2015 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. - -#ifndef REGISTER_WEAK_MEMBERS_TEMPLATE_H_ -#define REGISTER_WEAK_MEMBERS_TEMPLATE_H_ - -#include "heap/stubs.h" - -namespace blink { - -class X : public GarbageCollected<X> { - public: - void trace(Visitor*) {} -}; - -class HasUntracedWeakMembers : public GarbageCollected<HasUntracedWeakMembers> { - public: - void trace(Visitor* visitor) { - visitor->registerWeakMembers<HasUntracedWeakMembers, - &HasUntracedWeakMembers::clearWeakMembers>( - this); - } - - void clearWeakMembers(Visitor* visitor); - - private: - WeakMember<X> x_; -}; - -} - -#endif // REGISTER_WEAK_MEMBERS_TEMPLATE_H_
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/register_weak_members_template.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/register_weak_members_template.txt deleted file mode 100644 index b168673..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/register_weak_members_template.txt +++ /dev/null
@@ -1,8 +0,0 @@ -In file included from register_weak_members_template.cpp:5: -./register_weak_members_template.h:19:3: warning: [blink-gc] Class 'HasUntracedWeakMembers' has untraced fields that require tracing. - void trace(Visitor* visitor) { - ^ -./register_weak_members_template.h:28:3: note: [blink-gc] Untraced field 'x_' declared here: - WeakMember<X> x_; - ^ -1 warning generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/stack_allocated.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/stack_allocated.cpp deleted file mode 100644 index 3c4e321..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/stack_allocated.cpp +++ /dev/null
@@ -1,23 +0,0 @@ -// Copyright 2014 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. - -#include "stack_allocated.h" - -namespace blink { - -// Verify that anon namespaces are checked. -namespace { - -class AnonStackObject : public StackObject { -public: - HeapObject* m_obj; -}; - -} - -void HeapObject::trace(Visitor* visitor) -{ -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/stack_allocated.flags b/tools/clang/blink_gc_plugin/tests/legacy_naming/stack_allocated.flags deleted file mode 100644 index 7ec7af4..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/stack_allocated.flags +++ /dev/null
@@ -1 +0,0 @@ --Xclang -plugin-arg-blink-gc-plugin -Xclang warn-stack-allocated-trace-method \ No newline at end of file
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/stack_allocated.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/stack_allocated.h deleted file mode 100644 index 22100ec..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/stack_allocated.h +++ /dev/null
@@ -1,54 +0,0 @@ -// Copyright 2014 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. - -#ifndef STACK_ALLOCATED_H_ -#define STACK_ALLOCATED_H_ - -#include "heap/stubs.h" - -namespace blink { - -class HeapObject; - -class PartObject { - DISALLOW_NEW(); -private: - Member<HeapObject> m_obj; // Needs tracing. -}; - -class StackObject { - STACK_ALLOCATED(); - - // Redundant trace() method, warning/error expected. - void trace(Visitor* visitor) { visitor->trace(m_obj); } - -private: - Member<HeapObject> m_obj; // Does not need tracing. -}; - -class HeapObject : public GarbageCollected<HeapObject> { -public: - void trace(Visitor*); -private: - StackObject m_part; // Cannot embed a stack allocated object. -}; - -// Cannot derive from both heap- and stack-allocated objects. -class DerivedHeapObject : public HeapObject, public StackObject { -}; - -// Cannot be stack-allocated and derive from a heap-allocated object. -class DerivedHeapObject2 : public HeapObject { - STACK_ALLOCATED(); -}; - -// STACK_ALLOCATED is inherited. -class DerivedStackObject : public StackObject { -private: - StackObject m_anotherPart; // Also fine. -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/stack_allocated.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/stack_allocated.txt deleted file mode 100644 index 5eb6220..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/stack_allocated.txt +++ /dev/null
@@ -1,35 +0,0 @@ -In file included from stack_allocated.cpp:5: -./stack_allocated.h:14:1: warning: [blink-gc] Class 'PartObject' requires a trace method. -class PartObject { -^ -./stack_allocated.h:17:5: note: [blink-gc] Untraced field 'm_obj' declared here: - Member<HeapObject> m_obj; // Needs tracing. - ^ -./stack_allocated.h:24:5: warning: [blink-gc] The stack allocated class 'StackObject' provides an unnecessary trace method: - void trace(Visitor* visitor) { visitor->trace(m_obj); } - ^ -./stack_allocated.h:30:1: warning: [blink-gc] Class 'HeapObject' contains invalid fields. -class HeapObject : public GarbageCollected<HeapObject> { -^ -./stack_allocated.h:34:5: note: [blink-gc] Stack-allocated field 'm_part' declared here: - StackObject m_part; // Cannot embed a stack allocated object. - ^ -./stack_allocated.h:38:27: warning: [blink-gc] Stack-allocated class 'DerivedHeapObject' derives class 'HeapObject' which is garbage collected. -class DerivedHeapObject : public HeapObject, public StackObject { - ^ -./stack_allocated.h:42:28: warning: [blink-gc] Stack-allocated class 'DerivedHeapObject2' derives class 'HeapObject' which is garbage collected. -class DerivedHeapObject2 : public HeapObject { - ^ -./stack_allocated.h:43:3: warning: [blink-gc] Garbage collected class 'DerivedHeapObject2' is not permitted to override its new operator. - STACK_ALLOCATED(); - ^ -./heap/stubs.h:178:5: note: expanded from macro 'STACK_ALLOCATED' - __attribute__((annotate("blink_stack_allocated"))) \ - ^ -stack_allocated.cpp:12:1: warning: [blink-gc] Class 'AnonStackObject' contains invalid fields. -class AnonStackObject : public StackObject { -^ -stack_allocated.cpp:14:5: note: [blink-gc] Raw pointer field 'm_obj' to a GC managed class declared here: - HeapObject* m_obj; - ^ -7 warnings generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/templated_class_with_local_class_requires_trace.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/templated_class_with_local_class_requires_trace.cpp deleted file mode 100644 index bd8b737..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/templated_class_with_local_class_requires_trace.cpp +++ /dev/null
@@ -1,26 +0,0 @@ -// Copyright 2014 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. - -#include "templated_class_with_local_class_requires_trace.h" - -namespace blink { - -template<typename T> -void TemplatedObject<T>::trace(Visitor* visitor) -{ - visitor->trace(m_local); - visitor->trace(m_memberRef); -} - -class Test { -public: - static void test() - { - HeapObject* obj = new HeapObject(); - TemplatedObject<HeapObject>* instance = - new TemplatedObject<HeapObject>(obj); - } -}; - -} // namespace blink
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/templated_class_with_local_class_requires_trace.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/templated_class_with_local_class_requires_trace.h deleted file mode 100644 index d2b0225..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/templated_class_with_local_class_requires_trace.h +++ /dev/null
@@ -1,52 +0,0 @@ -// Copyright 2014 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. - -#ifndef TEMPLATED_CLASS_WITH_LOCAL_CLASS_REQUIRES_TRACE_H -#define TEMPLATED_CLASS_WITH_LOCAL_CLASS_REQUIRES_TRACE_H - -#include "heap/stubs.h" - -namespace blink { - -class NonHeapObject { }; - -class HeapObject : public GarbageCollected<HeapObject> { -public: - HeapObject() { } - - void trace(Visitor*) { } -}; - -template<typename T> -class TemplatedObject final - : public GarbageCollectedFinalized<TemplatedObject<T> > { -public: - TemplatedObject(T*) - { - } - - void trace(Visitor*); - -private: - class Local final : public GarbageCollected<Local> { - public: - void trace(Visitor* visitor) - { - visitor->trace(m_heapObject); - visitor->trace(m_object); - } - private: - Member<HeapObject> m_heapObject; - OwnPtr<HeapObject> m_object; - }; - - Member<Local> m_local; - Member<T> m_memberRef; - OwnPtr<T> m_ownRef; -}; - -} // namespace blink - -#endif // TEMPLATED_CLASS_WITH_LOCAL_CLASS_REQUIRES_TRACE_H -
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/templated_class_with_local_class_requires_trace.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/templated_class_with_local_class_requires_trace.txt deleted file mode 100644 index fa6b9f5..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/templated_class_with_local_class_requires_trace.txt +++ /dev/null
@@ -1,26 +0,0 @@ -In file included from templated_class_with_local_class_requires_trace.cpp:5: -./templated_class_with_local_class_requires_trace.h:22:1: warning: [blink-gc] Class 'TemplatedObject<blink::HeapObject>' contains invalid fields. -class TemplatedObject final -^ -./templated_class_with_local_class_requires_trace.h:46:5: note: [blink-gc] OwnPtr field 'm_ownRef' to a GC managed class declared here: - OwnPtr<T> m_ownRef; - ^ -./templated_class_with_local_class_requires_trace.h:32:5: warning: [blink-gc] Class 'Local' contains invalid fields. - class Local final : public GarbageCollected<Local> { - ^ -./templated_class_with_local_class_requires_trace.h:41:9: note: [blink-gc] OwnPtr field 'm_object' to a GC managed class declared here: - OwnPtr<HeapObject> m_object; - ^ -./templated_class_with_local_class_requires_trace.h:32:5: warning: [blink-gc] Class 'Local' requires finalization. - class Local final : public GarbageCollected<Local> { - ^ -./templated_class_with_local_class_requires_trace.h:41:9: note: [blink-gc] Field 'm_object' requiring finalization declared here: - OwnPtr<HeapObject> m_object; - ^ -./templated_class_with_local_class_requires_trace.h:34:9: warning: [blink-gc] Class 'Local' has untraced or not traceable fields. - void trace(Visitor* visitor) - ^ -./templated_class_with_local_class_requires_trace.h:41:9: note: [blink-gc] Untraceable field 'm_object' declared here: - OwnPtr<HeapObject> m_object; - ^ -4 warnings generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/test.py b/tools/clang/blink_gc_plugin/tests/legacy_naming/test.py deleted file mode 100755 index 475f6fbf..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/test.py +++ /dev/null
@@ -1,66 +0,0 @@ -#!/usr/bin/env python -# Copyright 2015 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. - -import argparse -import os -import subprocess -import sys - -script_dir = os.path.dirname(os.path.realpath(__file__)) -tool_dir = os.path.abspath(os.path.join(script_dir, '../../../pylib')) -sys.path.insert(0, tool_dir) - -from clang import plugin_testing - - -class BlinkGcPluginTest(plugin_testing.ClangPluginTest): - """Test harness for the Blink GC plugin.""" - - def AdjustClangArguments(self, clang_cmd): - clang_cmd.append('-Wno-inaccessible-base') - - def ProcessOneResult(self, test_name, actual): - # Some Blink GC plugins dump a JSON representation of the object graph, and - # use the processed results as the actual results of the test. - if os.path.exists('%s.graph.json' % test_name): - try: - actual = subprocess.check_output( - ['python', '../../process-graph.py', '-c', - '%s.graph.json' % test_name], - stderr=subprocess.STDOUT) - except subprocess.CalledProcessError, e: - # The graph processing script returns a failure exit code if the graph - # is bad (e.g. it has a cycle). The output still needs to be captured in - # that case, since the expected results capture the errors. - actual = e.output - finally: - # Clean up the .graph.json file to prevent false passes from stale - # results from a previous run. - os.remove('%s.graph.json' % test_name) - return super(BlinkGcPluginTest, self).ProcessOneResult(test_name, actual) - - -def main(): - parser = argparse.ArgumentParser() - parser.add_argument( - '--reset-results', - action='store_true', - help='If specified, overwrites the expected results in place.') - parser.add_argument('clang_path', help='The path to the clang binary.') - parser.add_argument('plugin_path', - nargs='?', - help='The path to the plugin library, if any.') - args = parser.parse_args() - - return BlinkGcPluginTest( - os.path.dirname(os.path.realpath(__file__)), - args.clang_path, - args.plugin_path, - 'blink-gc-plugin', - args.reset_results).Run() - - -if __name__ == '__main__': - sys.exit(main())
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch.cpp deleted file mode 100644 index c246aaaf..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch.cpp +++ /dev/null
@@ -1,50 +0,0 @@ -// Copyright 2014 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. - -#include "trace_after_dispatch.h" - -namespace blink { - -static B* toB(A* a) { return static_cast<B*>(a); } - -void A::trace(Visitor* visitor) -{ - switch (m_type) { - case TB: - toB(this)->traceAfterDispatch(visitor); - break; - case TC: - static_cast<C*>(this)->traceAfterDispatch(visitor); - break; - case TD: - // Missing static_cast<D*>(this)->traceAfterDispatch(visitor); - break; - } -} - -void A::traceAfterDispatch(Visitor* visitor) -{ -} - -void B::traceAfterDispatch(Visitor* visitor) -{ - visitor->trace(m_a); - // Missing A::traceAfterDispatch(visitor); - // Also check that calling trace does not count. - A::trace(visitor); -} - -void C::traceAfterDispatch(Visitor* visitor) -{ - // Missing visitor->trace(m_a); - A::traceAfterDispatch(visitor); -} - -void D::traceAfterDispatch(Visitor* visitor) -{ - visitor->trace(m_a); - Abstract::traceAfterDispatch(visitor); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch.h deleted file mode 100644 index a19a536..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch.h +++ /dev/null
@@ -1,55 +0,0 @@ -// Copyright 2014 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. - -#ifndef TRACE_AFTER_DISPATCH_H_ -#define TRACE_AFTER_DISPATCH_H_ - -#include "heap/stubs.h" - -namespace blink { - -class A : public GarbageCollected<A> { -public: - void trace(Visitor*); - void traceAfterDispatch(Visitor*); -protected: - enum Type { TB, TC, TD }; - A(Type type) : m_type(type) { } -private: - Type m_type; -}; - -class B : public A { -public: - B() : A(TB) { } - void traceAfterDispatch(Visitor*); -private: - Member<A> m_a; -}; - -class C : public A { -public: - C() : A(TC) { } - void traceAfterDispatch(Visitor*); -private: - Member<A> m_a; -}; - -// This class is considered abstract does not need to be dispatched to. -class Abstract : public A { -protected: - Abstract(Type type) : A(type) { } -}; - -class D : public Abstract { -public: - D() : Abstract(TD) { } - void traceAfterDispatch(Visitor*); -private: - Member<A> m_a; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch.txt deleted file mode 100644 index 877fbbe..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch.txt +++ /dev/null
@@ -1,13 +0,0 @@ -trace_after_dispatch.cpp:11:1: warning: [blink-gc] Missing dispatch to class 'D' in manual trace dispatch. -void A::trace(Visitor* visitor) -^ -trace_after_dispatch.cpp:30:1: warning: [blink-gc] Base class 'A' of derived class 'B' requires tracing. -void B::traceAfterDispatch(Visitor* visitor) -^ -trace_after_dispatch.cpp:38:1: warning: [blink-gc] Class 'C' has untraced fields that require tracing. -void C::traceAfterDispatch(Visitor* visitor) -^ -./trace_after_dispatch.h:36:5: note: [blink-gc] Untraced field 'm_a' declared here: - Member<A> m_a; - ^ -3 warnings generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch_impl.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch_impl.cpp deleted file mode 100644 index ae5ec1e..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch_impl.cpp +++ /dev/null
@@ -1,41 +0,0 @@ -// Copyright 2015 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. - -#include "trace_after_dispatch_impl.h" - -namespace blink { - -void TraceAfterDispatchInlinedBase::trace(Visitor* visitor) { - // Implement a simple form of manual dispatching, because BlinkGCPlugin - // checks if the tracing is dispatched to all derived classes. - // - // This function has to be implemented out-of-line, since we need to know the - // definition of derived classes here. - if (tag_ == DERIVED) { - static_cast<TraceAfterDispatchInlinedDerived*>(this)->traceAfterDispatch( - visitor); - } else { - traceAfterDispatch(visitor); - } -} - -void TraceAfterDispatchExternBase::trace(Visitor* visitor) { - if (tag_ == DERIVED) { - static_cast<TraceAfterDispatchExternDerived*>(this)->traceAfterDispatch( - visitor); - } else { - traceAfterDispatch(visitor); - } -} - -void TraceAfterDispatchExternBase::traceAfterDispatch(Visitor* visitor) { - visitor->trace(x_base_); -} - -void TraceAfterDispatchExternDerived::traceAfterDispatch(Visitor* visitor) { - visitor->trace(x_derived_); - TraceAfterDispatchExternBase::traceAfterDispatch(visitor); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch_impl.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch_impl.h deleted file mode 100644 index 3913f3ad..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch_impl.h +++ /dev/null
@@ -1,72 +0,0 @@ -// Copyright 2015 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. - -#ifndef TRACE_AFTER_DISPATCH_IMPL_H_ -#define TRACE_AFTER_DISPATCH_IMPL_H_ - -#include "heap/stubs.h" - -namespace blink { - -class X : public GarbageCollected<X> { - public: - void trace(Visitor*) {} -}; - -enum ClassTag { - BASE, DERIVED -}; - -class TraceAfterDispatchInlinedBase - : public GarbageCollected<TraceAfterDispatchInlinedBase> { - public: - explicit TraceAfterDispatchInlinedBase(ClassTag tag) : tag_(tag) {} - - void trace(Visitor*); - void traceAfterDispatch(Visitor* visitor) { visitor->trace(x_base_); } - - private: - ClassTag tag_; - Member<X> x_base_; -}; - -class TraceAfterDispatchInlinedDerived : public TraceAfterDispatchInlinedBase { - public: - TraceAfterDispatchInlinedDerived() : TraceAfterDispatchInlinedBase(DERIVED) {} - - void traceAfterDispatch(Visitor* visitor) { - visitor->trace(x_derived_); - TraceAfterDispatchInlinedBase::traceAfterDispatch(visitor); - } - - private: - Member<X> x_derived_; -}; - -class TraceAfterDispatchExternBase - : public GarbageCollected<TraceAfterDispatchExternBase> { - public: - explicit TraceAfterDispatchExternBase(ClassTag tag) : tag_(tag) {} - - void trace(Visitor* visitor); - void traceAfterDispatch(Visitor* visitor); - - private: - ClassTag tag_; - Member<X> x_base_; -}; - -class TraceAfterDispatchExternDerived : public TraceAfterDispatchExternBase { - public: - TraceAfterDispatchExternDerived() : TraceAfterDispatchExternBase(DERIVED) {} - - void traceAfterDispatch(Visitor* visitor); - - private: - Member<X> x_derived_; -}; - -} - -#endif // TRACE_AFTER_DISPATCH_IMPL_H_
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch_impl.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch_impl.txt deleted file mode 100644 index e69de29..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch_impl.txt +++ /dev/null
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch_impl_error.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch_impl_error.cpp deleted file mode 100644 index 9157bc0..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch_impl_error.cpp +++ /dev/null
@@ -1,42 +0,0 @@ -// Copyright 2015 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. - -#include "trace_after_dispatch_impl_error.h" - -namespace blink { - -inline void TraceAfterDispatchInlinedBase::trace(Visitor* visitor) { - // Implement a simple form of manual dispatching, because BlinkGCPlugin - // checks if the tracing is dispatched to all derived classes. - // - // This function has to be implemented out-of-line, since we need to know the - // definition of derived classes here. - if (tag_ == DERIVED) { - // Missing dispatch call: - // static_cast<TraceAfterDispatchInlinedDerived*>(this)->traceAfterDispatch( - // visitor); - } else { - traceAfterDispatch(visitor); - } -} - -void TraceAfterDispatchExternBase::trace(Visitor* visitor) { - if (tag_ == DERIVED) { - // Missing dispatch call: - // static_cast<TraceAfterDispatchExternDerived*>(this)->traceAfterDispatch( - // visitor); - } else { - traceAfterDispatch(visitor); - } -} - -void TraceAfterDispatchExternBase::traceAfterDispatch(Visitor* visitor) { - // No trace call. -} - -void TraceAfterDispatchExternDerived::traceAfterDispatch(Visitor* visitor) { - // Ditto. -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch_impl_error.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch_impl_error.h deleted file mode 100644 index f9878f8..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch_impl_error.h +++ /dev/null
@@ -1,74 +0,0 @@ -// Copyright 2015 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. - -#ifndef TRACE_AFTER_DISPATCH_IMPL_ERROR_H_ -#define TRACE_AFTER_DISPATCH_IMPL_ERROR_H_ - -#include "heap/stubs.h" - -namespace blink { - -class X : public GarbageCollected<X> { - public: - void trace(Visitor*) {} -}; - -enum ClassTag { - BASE, DERIVED -}; - -class TraceAfterDispatchInlinedBase - : public GarbageCollected<TraceAfterDispatchInlinedBase> { - public: - explicit TraceAfterDispatchInlinedBase(ClassTag tag) : tag_(tag) {} - - void trace(Visitor*); - - // No trace call; should get a warning. - void traceAfterDispatch(Visitor*) {} - - private: - ClassTag tag_; - Member<X> x_base_; -}; - -class TraceAfterDispatchInlinedDerived : public TraceAfterDispatchInlinedBase { - public: - TraceAfterDispatchInlinedDerived() : TraceAfterDispatchInlinedBase(DERIVED) {} - - void traceAfterDispatch(Visitor* visitor) { - // No trace call (for member and base class). - } - - private: - Member<X> x_derived_; -}; - -class TraceAfterDispatchExternBase - : public GarbageCollected<TraceAfterDispatchExternBase> { - public: - explicit TraceAfterDispatchExternBase(ClassTag tag) : tag_(tag) {} - - void trace(Visitor* visitor); - - void traceAfterDispatch(Visitor* visitor); - - private: - ClassTag tag_; - Member<X> x_base_; -}; - -class TraceAfterDispatchExternDerived : public TraceAfterDispatchExternBase { - public: - TraceAfterDispatchExternDerived() : TraceAfterDispatchExternBase(DERIVED) {} - - void traceAfterDispatch(Visitor* visitor); - - private: - Member<X> x_derived_; -}; - -} - -#endif // TRACE_AFTER_DISPATCH_IMPL_ERROR_H_
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch_impl_error.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch_impl_error.txt deleted file mode 100644 index 5cb7cac..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_after_dispatch_impl_error.txt +++ /dev/null
@@ -1,34 +0,0 @@ -trace_after_dispatch_impl_error.cpp:9:1: warning: [blink-gc] Missing dispatch to class 'TraceAfterDispatchInlinedDerived' in manual trace dispatch. -inline void TraceAfterDispatchInlinedBase::trace(Visitor* visitor) { -^ -trace_after_dispatch_impl_error.cpp:24:1: warning: [blink-gc] Missing dispatch to class 'TraceAfterDispatchExternDerived' in manual trace dispatch. -void TraceAfterDispatchExternBase::trace(Visitor* visitor) { -^ -In file included from trace_after_dispatch_impl_error.cpp:5: -./trace_after_dispatch_impl_error.h:29:3: warning: [blink-gc] Class 'TraceAfterDispatchInlinedBase' has untraced fields that require tracing. - void traceAfterDispatch(Visitor*) {} - ^ -./trace_after_dispatch_impl_error.h:33:3: note: [blink-gc] Untraced field 'x_base_' declared here: - Member<X> x_base_; - ^ -./trace_after_dispatch_impl_error.h:40:3: warning: [blink-gc] Base class 'TraceAfterDispatchInlinedBase' of derived class 'TraceAfterDispatchInlinedDerived' requires tracing. - void traceAfterDispatch(Visitor* visitor) { - ^ -./trace_after_dispatch_impl_error.h:40:3: warning: [blink-gc] Class 'TraceAfterDispatchInlinedDerived' has untraced fields that require tracing. -./trace_after_dispatch_impl_error.h:45:3: note: [blink-gc] Untraced field 'x_derived_' declared here: - Member<X> x_derived_; - ^ -trace_after_dispatch_impl_error.cpp:34:1: warning: [blink-gc] Class 'TraceAfterDispatchExternBase' has untraced fields that require tracing. -void TraceAfterDispatchExternBase::traceAfterDispatch(Visitor* visitor) { -^ -./trace_after_dispatch_impl_error.h:59:3: note: [blink-gc] Untraced field 'x_base_' declared here: - Member<X> x_base_; - ^ -trace_after_dispatch_impl_error.cpp:38:1: warning: [blink-gc] Base class 'TraceAfterDispatchExternBase' of derived class 'TraceAfterDispatchExternDerived' requires tracing. -void TraceAfterDispatchExternDerived::traceAfterDispatch(Visitor* visitor) { -^ -trace_after_dispatch_impl_error.cpp:38:1: warning: [blink-gc] Class 'TraceAfterDispatchExternDerived' has untraced fields that require tracing. -./trace_after_dispatch_impl_error.h:69:3: note: [blink-gc] Untraced field 'x_derived_' declared here: - Member<X> x_derived_; - ^ -8 warnings generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_collections.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_collections.cpp deleted file mode 100644 index 9ba7c96..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_collections.cpp +++ /dev/null
@@ -1,13 +0,0 @@ -// Copyright 2014 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. - -#include "trace_collections.h" - -namespace blink { - -void HeapObject::trace(Visitor* visitor) -{ -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_collections.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_collections.h deleted file mode 100644 index 219b056..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_collections.h +++ /dev/null
@@ -1,44 +0,0 @@ -// Copyright 2014 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. - -#ifndef TRACE_COLLECTIONS_H_ -#define TRACE_COLLECTIONS_H_ - -#include "heap/stubs.h" - -namespace blink { - -class HeapObject : public GarbageCollected<HeapObject> { -public: - void trace(Visitor*); -private: - HeapVector<Member<HeapObject> > m_heapVector; - Vector<Member<HeapObject>, 0, HeapAllocator> m_wtfVector; - - HeapDeque<Member<HeapObject> > m_heapDeque; - Deque<Member<HeapObject>, 0, HeapAllocator> m_wtfDeque; - - HeapHashSet<Member<HeapObject> > m_heapSet; - HashSet<Member<HeapObject>, void, HeapAllocator> m_wtfSet; - - HeapListHashSet<Member<HeapObject> > m_heapListSet; - ListHashSet<Member<HeapObject>, void, HeapAllocator> m_wtfListSet; - - HeapLinkedHashSet<Member<HeapObject> > m_heapLinkedSet; - LinkedHashSet<Member<HeapObject>, void, HeapAllocator> m_wtfLinkedSet; - - HeapHashCountedSet<Member<HeapObject> > m_heapCountedSet; - HashCountedSet<Member<HeapObject>, void, HeapAllocator> m_wtfCountedSet; - - HeapHashMap<int, Member<HeapObject> > m_heapMapKey; - HeapHashMap<Member<HeapObject>, int > m_heapMapVal; - HashMap<int, Member<HeapObject>, void, void, void, HeapAllocator> - m_wtfMapKey; - HashMap<Member<HeapObject>, int, void, void, void, HeapAllocator> - m_wtfMapVal; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_collections.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_collections.txt deleted file mode 100644 index 7c20ad4..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_collections.txt +++ /dev/null
@@ -1,52 +0,0 @@ -trace_collections.cpp:9:1: warning: [blink-gc] Class 'HeapObject' has untraced fields that require tracing. -void HeapObject::trace(Visitor* visitor) -^ -./trace_collections.h:16:5: note: [blink-gc] Untraced field 'm_heapVector' declared here: - HeapVector<Member<HeapObject> > m_heapVector; - ^ -./trace_collections.h:17:5: note: [blink-gc] Untraced field 'm_wtfVector' declared here: - Vector<Member<HeapObject>, 0, HeapAllocator> m_wtfVector; - ^ -./trace_collections.h:19:5: note: [blink-gc] Untraced field 'm_heapDeque' declared here: - HeapDeque<Member<HeapObject> > m_heapDeque; - ^ -./trace_collections.h:20:5: note: [blink-gc] Untraced field 'm_wtfDeque' declared here: - Deque<Member<HeapObject>, 0, HeapAllocator> m_wtfDeque; - ^ -./trace_collections.h:22:5: note: [blink-gc] Untraced field 'm_heapSet' declared here: - HeapHashSet<Member<HeapObject> > m_heapSet; - ^ -./trace_collections.h:23:5: note: [blink-gc] Untraced field 'm_wtfSet' declared here: - HashSet<Member<HeapObject>, void, HeapAllocator> m_wtfSet; - ^ -./trace_collections.h:25:5: note: [blink-gc] Untraced field 'm_heapListSet' declared here: - HeapListHashSet<Member<HeapObject> > m_heapListSet; - ^ -./trace_collections.h:26:5: note: [blink-gc] Untraced field 'm_wtfListSet' declared here: - ListHashSet<Member<HeapObject>, void, HeapAllocator> m_wtfListSet; - ^ -./trace_collections.h:28:5: note: [blink-gc] Untraced field 'm_heapLinkedSet' declared here: - HeapLinkedHashSet<Member<HeapObject> > m_heapLinkedSet; - ^ -./trace_collections.h:29:5: note: [blink-gc] Untraced field 'm_wtfLinkedSet' declared here: - LinkedHashSet<Member<HeapObject>, void, HeapAllocator> m_wtfLinkedSet; - ^ -./trace_collections.h:31:5: note: [blink-gc] Untraced field 'm_heapCountedSet' declared here: - HeapHashCountedSet<Member<HeapObject> > m_heapCountedSet; - ^ -./trace_collections.h:32:5: note: [blink-gc] Untraced field 'm_wtfCountedSet' declared here: - HashCountedSet<Member<HeapObject>, void, HeapAllocator> m_wtfCountedSet; - ^ -./trace_collections.h:34:5: note: [blink-gc] Untraced field 'm_heapMapKey' declared here: - HeapHashMap<int, Member<HeapObject> > m_heapMapKey; - ^ -./trace_collections.h:35:5: note: [blink-gc] Untraced field 'm_heapMapVal' declared here: - HeapHashMap<Member<HeapObject>, int > m_heapMapVal; - ^ -./trace_collections.h:36:5: note: [blink-gc] Untraced field 'm_wtfMapKey' declared here: - HashMap<int, Member<HeapObject>, void, void, void, HeapAllocator> - ^ -./trace_collections.h:38:5: note: [blink-gc] Untraced field 'm_wtfMapVal' declared here: - HashMap<Member<HeapObject>, int, void, void, void, HeapAllocator> - ^ -1 warning generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_if_needed.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_if_needed.cpp deleted file mode 100644 index 563c6cc1..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_if_needed.cpp +++ /dev/null
@@ -1,16 +0,0 @@ -// Copyright 2014 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. - -#include "trace_if_needed.h" - -namespace blink { - -template<typename T> -void TemplatedObject<T>::trace(Visitor* visitor) -{ - TraceIfNeeded<T>::trace(visitor, &m_one); - // Missing trace of m_two -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_if_needed.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_if_needed.h deleted file mode 100644 index 00b8f22..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_if_needed.h +++ /dev/null
@@ -1,27 +0,0 @@ -// Copyright 2014 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. - -#ifndef TRACE_IF_NEEDED_H_ -#define TRACE_IF_NEEDED_H_ - -#include "heap/stubs.h" - -namespace blink { - -class HeapObject : public GarbageCollected<HeapObject> { }; - -template<typename T> -class TemplatedObject : public GarbageCollected<TemplatedObject<T> > { -public: - virtual void trace(Visitor*); -private: - T m_one; - T m_two; -}; - -class InstantiatedObject : public TemplatedObject<Member<HeapObject> > { }; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_if_needed.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_if_needed.txt deleted file mode 100644 index 79a24e8..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_if_needed.txt +++ /dev/null
@@ -1,7 +0,0 @@ -trace_if_needed.cpp:9:1: warning: [blink-gc] Class 'TemplatedObject<blink::Member<blink::HeapObject> >' has untraced fields that require tracing. -template<typename T> -^ -./trace_if_needed.h:20:5: note: [blink-gc] Untraced field 'm_two' declared here: - T m_two; - ^ -1 warning generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_templated_super.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_templated_super.cpp deleted file mode 100644 index 2b59034..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_templated_super.cpp +++ /dev/null
@@ -1,36 +0,0 @@ -// Copyright 2014 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. - -#include "trace_templated_super.h" - -namespace blink { - -template<typename T> -void Super<T>::clearWeakMembers(Visitor* visitor) -{ - (void)m_weak; -} - -template<typename T> -void Super<T>::trace(Visitor* visitor) -{ - visitor->registerWeakMembers<Super<T>, &Super<T>::clearWeakMembers>(this); - visitor->trace(m_obj); - Mixin::trace(visitor); -} - -template<typename T> -void Sub<T>::trace(Visitor* visitor) -{ - // Missing trace of m_obj. - Super<T>::trace(visitor); -} - -void HeapObject::trace(Visitor* visitor) -{ - visitor->trace(m_obj); - Sub<HeapObject>::trace(visitor); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_templated_super.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_templated_super.h deleted file mode 100644 index de8fd7b..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_templated_super.h +++ /dev/null
@@ -1,47 +0,0 @@ -// Copyright 2014 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. - -#ifndef TRACE_TEMPLATED_SUPER_H_ -#define TRACE_TEMPLATED_SUPER_H_ - -#include "heap/stubs.h" - -namespace blink { - -class HeapObject; - -class Mixin : public GarbageCollectedMixin { -public: - virtual void trace(Visitor*) override { } -}; - -template<typename T> -class Super : public GarbageCollected<Super<T> >, public Mixin { - USING_GARBAGE_COLLECTED_MIXIN(Super); -public: - virtual void trace(Visitor*) override; - void clearWeakMembers(Visitor*); -private: - Member<HeapObject> m_obj; - WeakMember<HeapObject> m_weak; -}; - -template<typename T> -class Sub : public Super<T> { -public: - virtual void trace(Visitor* visitor) override; -private: - Member<HeapObject> m_obj; -}; - -class HeapObject : public Sub<HeapObject> { -public: - virtual void trace(Visitor*) override; -private: - Member<HeapObject> m_obj; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_templated_super.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_templated_super.txt deleted file mode 100644 index 291b018..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/trace_templated_super.txt +++ /dev/null
@@ -1,7 +0,0 @@ -trace_templated_super.cpp:23:1: warning: [blink-gc] Class 'Sub<blink::HeapObject>' has untraced fields that require tracing. -template<typename T> -^ -./trace_templated_super.h:35:5: note: [blink-gc] Untraced field 'm_obj' declared here: - Member<HeapObject> m_obj; - ^ -1 warning generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl.cpp deleted file mode 100644 index a5f3a7a4..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl.cpp +++ /dev/null
@@ -1,18 +0,0 @@ -// Copyright 2014 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. - -#include "traceimpl.h" - -namespace blink { - -void TraceImplExtern::trace(Visitor* visitor) { - visitor->trace(x_); -} - -void TraceImplBaseExtern::trace(Visitor* visitor) { - visitor->trace(x_); - Base::trace(visitor); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl.h deleted file mode 100644 index 57f69c6f..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl.h +++ /dev/null
@@ -1,53 +0,0 @@ -// Copyright 2014 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. - -#ifndef TRACEIMPL_H_ -#define TRACEIMPL_H_ - -#include "heap/stubs.h" - -namespace blink { - -class X : public GarbageCollected<X> { - public: - virtual void trace(Visitor*) {} -}; - -class TraceImplInlined : public GarbageCollected<TraceImplInlined> { - public: - void trace(Visitor* visitor) { visitor->trace(x_); } - - private: - Member<X> x_; -}; - -class TraceImplExtern : public GarbageCollected<TraceImplExtern> { - public: - void trace(Visitor* visitor); - - private: - Member<X> x_; -}; - -class Base : public GarbageCollected<Base> { - public: - virtual void trace(Visitor* visitor) {} -}; - -class TraceImplBaseInlined : public Base { - public: - void trace(Visitor* visitor) override { Base::trace(visitor); } -}; - -class TraceImplBaseExtern : public Base { - public: - void trace(Visitor* visitor) override; - - private: - Member<X> x_; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl.txt deleted file mode 100644 index e69de29..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl.txt +++ /dev/null
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_dependent_scope.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_dependent_scope.cpp deleted file mode 100644 index 11b576c..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_dependent_scope.cpp +++ /dev/null
@@ -1,13 +0,0 @@ -// Copyright 2015 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. - -#include "traceimpl_dependent_scope.h" - -namespace blink { - -// Template instantiation. -template class Derived<int>; -template class DerivedMissingTrace<int>; - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_dependent_scope.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_dependent_scope.h deleted file mode 100644 index d0a723b..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_dependent_scope.h +++ /dev/null
@@ -1,39 +0,0 @@ -// Copyright 2015 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. - -#ifndef TRACEIMPL_DEPENDENT_SCOPE_H_ -#define TRACEIMPL_DEPENDENT_SCOPE_H_ - -#include "heap/stubs.h" - -namespace blink { - -class X : public GarbageCollected<X> { - public: - virtual void trace(Visitor*) {} -}; - -template <typename T> -class Base : public GarbageCollected<Base<T> > { - public: - virtual void trace(Visitor*) {} -}; - -template <typename T> -class Derived : public Base<T> { - public: - void trace(Visitor* visitor) override { Base<T>::trace(visitor); } -}; - -template <typename T> -class DerivedMissingTrace : public Base<T> { - public: - void trace(Visitor* visitor) override { - // Missing Base<T>::trace(visitor). - } -}; - -} - -#endif // TRACEIMPL_DEPENDENT_SCOPE_H_
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_dependent_scope.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_dependent_scope.txt deleted file mode 100644 index 985b7f9..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_dependent_scope.txt +++ /dev/null
@@ -1,5 +0,0 @@ -In file included from traceimpl_dependent_scope.cpp:5: -./traceimpl_dependent_scope.h:32:3: warning: [blink-gc] Base class 'Base<int>' of derived class 'DerivedMissingTrace<int>' requires tracing. - void trace(Visitor* visitor) override { - ^ -1 warning generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_derived_from_templated_base.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_derived_from_templated_base.cpp deleted file mode 100644 index 9636fca7..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_derived_from_templated_base.cpp +++ /dev/null
@@ -1,7 +0,0 @@ -// Copyright 2015 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. - -#include "traceimpl_derived_from_templated_base.h" - -// Nothing to define.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_derived_from_templated_base.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_derived_from_templated_base.h deleted file mode 100644 index b382545..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_derived_from_templated_base.h +++ /dev/null
@@ -1,32 +0,0 @@ -// Copyright 2015 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. - -#ifndef TRACEIMPL_DERIVED_FROM_TEMPLATED_BASE_H_ -#define TRACEIMPL_DERIVED_FROM_TEMPLATED_BASE_H_ - -#include "heap/stubs.h" - -namespace blink { - -class X : public GarbageCollected<X> { - public: - virtual void trace(Visitor*) {} -}; - -template <int Y> -class TraceImplTemplatedBase - : public GarbageCollected<TraceImplTemplatedBase<Y> > { - public: - void trace(Visitor* visitor) { visitor->trace(x_); } - - private: - Member<X> x_; -}; - -class TraceImplDerivedFromTemplatedBase : public TraceImplTemplatedBase<0> { -}; - -} - -#endif // TRACEIMPL_DERIVED_FROM_TEMPLATED_BASE_H_
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_derived_from_templated_base.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_derived_from_templated_base.txt deleted file mode 100644 index e69de29..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_derived_from_templated_base.txt +++ /dev/null
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_error.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_error.cpp deleted file mode 100644 index 3a7638a3..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_error.cpp +++ /dev/null
@@ -1,17 +0,0 @@ -// Copyright 2015 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. - -#include "traceimpl_error.h" - -namespace blink { - -void TraceImplExternWithUntracedMember::trace(Visitor* visitor) { - // Should get a warning as well. -} - -void TraceImplExternWithUntracedBase::trace(Visitor* visitor) { - // Ditto. -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_error.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_error.h deleted file mode 100644 index 0960199..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_error.h +++ /dev/null
@@ -1,56 +0,0 @@ -// Copyright 2015 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. - -#ifndef TRACEIMPL_ERROR_H_ -#define TRACEIMPL_ERROR_H_ - -#include "heap/stubs.h" - -namespace blink { - -class X : public GarbageCollected<X> { - public: - virtual void trace(Visitor*) {} -}; - -class TraceImplInlinedWithUntracedMember - : public GarbageCollected<TraceImplInlinedWithUntracedMember> { - public: - void trace(Visitor* visitor) { - // Empty; should get complaints from the plugin for untraced x_. - } - - private: - Member<X> x_; -}; - -class TraceImplExternWithUntracedMember - : public GarbageCollected<TraceImplExternWithUntracedMember> { - public: - void trace(Visitor* visitor); - - private: - Member<X> x_; -}; - -class Base : public GarbageCollected<Base> { - public: - virtual void trace(Visitor*) {} -}; - -class TraceImplInlineWithUntracedBase : public Base { - public: - void trace(Visitor* visitor) override { - // Empty; should get complaints from the plugin for untraced Base. - } -}; - -class TraceImplExternWithUntracedBase : public Base { - public: - void trace(Visitor*) override; -}; - -} - -#endif // TRACEIMPL_ERROR_H_
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_error.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_error.txt deleted file mode 100644 index 056711a..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_error.txt +++ /dev/null
@@ -1,20 +0,0 @@ -In file included from traceimpl_error.cpp:5: -./traceimpl_error.h:20:3: warning: [blink-gc] Class 'TraceImplInlinedWithUntracedMember' has untraced fields that require tracing. - void trace(Visitor* visitor) { - ^ -./traceimpl_error.h:25:3: note: [blink-gc] Untraced field 'x_' declared here: - Member<X> x_; - ^ -./traceimpl_error.h:44:3: warning: [blink-gc] Base class 'Base' of derived class 'TraceImplInlineWithUntracedBase' requires tracing. - void trace(Visitor* visitor) override { - ^ -traceimpl_error.cpp:9:1: warning: [blink-gc] Class 'TraceImplExternWithUntracedMember' has untraced fields that require tracing. -void TraceImplExternWithUntracedMember::trace(Visitor* visitor) { -^ -./traceimpl_error.h:34:3: note: [blink-gc] Untraced field 'x_' declared here: - Member<X> x_; - ^ -traceimpl_error.cpp:13:1: warning: [blink-gc] Base class 'Base' of derived class 'TraceImplExternWithUntracedBase' requires tracing. -void TraceImplExternWithUntracedBase::trace(Visitor* visitor) { -^ -4 warnings generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_omitted_trace.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_omitted_trace.cpp deleted file mode 100644 index b6dc2dff..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_omitted_trace.cpp +++ /dev/null
@@ -1,7 +0,0 @@ -// Copyright 2015 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. - -#include "traceimpl_omitted_trace.h" - -// Nothing to define here.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_omitted_trace.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_omitted_trace.h deleted file mode 100644 index ec5c0b3e..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_omitted_trace.h +++ /dev/null
@@ -1,33 +0,0 @@ -// Copyright 2015 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. - -#ifndef TRACEIMPL_OMITTED_TRACE_H_ -#define TRACEIMPL_OMITTED_TRACE_H_ - -#include "heap/stubs.h" - -namespace blink { - -class A : public GarbageCollected<A> { - public: - virtual void trace(Visitor* visitor) {} -}; - -class B : public A { - // trace() isn't necessary because we've got nothing to trace here. -}; - -class C : public B { - public: - void trace(Visitor* visitor) override { - // B::trace() is actually A::trace(), and in certain cases we only get - // limited information like "there is a function call that will be resolved - // to A::trace()". We still want to mark B as traced. - B::trace(visitor); - } -}; - -} - -#endif // TRACEIMPL_OMITTED_TRACE_H_
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_omitted_trace.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_omitted_trace.txt deleted file mode 100644 index e69de29..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_omitted_trace.txt +++ /dev/null
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_overloaded.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_overloaded.cpp deleted file mode 100644 index dc7051c..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_overloaded.cpp +++ /dev/null
@@ -1,18 +0,0 @@ -// Copyright 2015 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. - -#include "traceimpl_overloaded.h" - -namespace blink { - -void ExternBase::trace(Visitor* visitor) { - visitor->trace(x_base_); -} - -void ExternDerived::trace(Visitor* visitor) { - visitor->trace(x_derived_); - ExternBase::trace(visitor); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_overloaded.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_overloaded.h deleted file mode 100644 index 34185a39..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_overloaded.h +++ /dev/null
@@ -1,54 +0,0 @@ -// Copyright 2015 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. - -#ifndef TRACEIMPL_OVERLOADED_H_ -#define TRACEIMPL_OVERLOADED_H_ - -#include "heap/stubs.h" - -namespace blink { - -class X : public GarbageCollected<X> { - public: - void trace(Visitor*) {} -}; - -class InlinedBase : public GarbageCollected<InlinedBase> { - public: - virtual void trace(Visitor* visitor) { visitor->trace(x_base_); } - - private: - Member<X> x_base_; -}; - -class InlinedDerived : public InlinedBase { - public: - void trace(Visitor* visitor) override { - visitor->trace(x_derived_); - InlinedBase::trace(visitor); - } - - private: - Member<X> x_derived_; -}; - -class ExternBase : public GarbageCollected<ExternBase> { - public: - virtual void trace(Visitor*); - - private: - Member<X> x_base_; -}; - -class ExternDerived : public ExternBase { - public: - void trace(Visitor*) override; - - private: - Member<X> x_derived_; -}; - -} - -#endif // TRACEIMPL_OVERLOADED_H_
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_overloaded.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_overloaded.txt deleted file mode 100644 index e69de29..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_overloaded.txt +++ /dev/null
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_overloaded_error.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_overloaded_error.cpp deleted file mode 100644 index 478ad7d6..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_overloaded_error.cpp +++ /dev/null
@@ -1,17 +0,0 @@ -// Copyright 2015 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. - -#include "traceimpl_overloaded_error.h" - -namespace blink { - -void ExternBase::trace(Visitor* visitor) { - // Missing visitor->trace(x_base_). -} - -void ExternDerived::trace(Visitor* visitor) { - // Missing visitor->trace(x_derived_) and ExternBase::trace(visitor). -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_overloaded_error.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_overloaded_error.h deleted file mode 100644 index 8d6e9504..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_overloaded_error.h +++ /dev/null
@@ -1,53 +0,0 @@ -// Copyright 2015 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. - -#ifndef TRACEIMPL_OVERLOADED_ERROR_H_ -#define TRACEIMPL_OVERLOADED_ERROR_H_ - -#include "heap/stubs.h" - -namespace blink { - -class X : public GarbageCollected<X> { - public: - void trace(Visitor*) {} -}; - -class InlinedBase : public GarbageCollected<InlinedBase> { - public: - virtual void trace(Visitor* visitor) { - // Missing visitor->trace(x_base_). - } - - Member<X> x_base_; -}; - -class InlinedDerived : public InlinedBase { - public: - void trace(Visitor* visitor) override { - // Missing visitor->trace(x_derived_) and InlinedBase::trace(visitor). - } - - Member<X> x_derived_; -}; - -class ExternBase : public GarbageCollected<ExternBase> { - public: - virtual void trace(Visitor*); - - private: - Member<X> x_base_; -}; - -class ExternDerived : public ExternBase { - public: - void trace(Visitor*) override; - - private: - Member<X> x_derived_; -}; - -} - -#endif // TRACEIMPL_OVERLOADED_ERROR_H_
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_overloaded_error.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_overloaded_error.txt deleted file mode 100644 index bfbabd8..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/traceimpl_overloaded_error.txt +++ /dev/null
@@ -1,28 +0,0 @@ -In file included from traceimpl_overloaded_error.cpp:5: -./traceimpl_overloaded_error.h:19:3: warning: [blink-gc] Class 'InlinedBase' has untraced fields that require tracing. - virtual void trace(Visitor* visitor) { - ^ -./traceimpl_overloaded_error.h:23:3: note: [blink-gc] Untraced field 'x_base_' declared here: - Member<X> x_base_; - ^ -./traceimpl_overloaded_error.h:28:3: warning: [blink-gc] Base class 'InlinedBase' of derived class 'InlinedDerived' requires tracing. - void trace(Visitor* visitor) override { - ^ -./traceimpl_overloaded_error.h:28:3: warning: [blink-gc] Class 'InlinedDerived' has untraced fields that require tracing. -./traceimpl_overloaded_error.h:32:3: note: [blink-gc] Untraced field 'x_derived_' declared here: - Member<X> x_derived_; - ^ -traceimpl_overloaded_error.cpp:9:1: warning: [blink-gc] Class 'ExternBase' has untraced fields that require tracing. -void ExternBase::trace(Visitor* visitor) { -^ -./traceimpl_overloaded_error.h:40:3: note: [blink-gc] Untraced field 'x_base_' declared here: - Member<X> x_base_; - ^ -traceimpl_overloaded_error.cpp:13:1: warning: [blink-gc] Base class 'ExternBase' of derived class 'ExternDerived' requires tracing. -void ExternDerived::trace(Visitor* visitor) { -^ -traceimpl_overloaded_error.cpp:13:1: warning: [blink-gc] Class 'ExternDerived' has untraced fields that require tracing. -./traceimpl_overloaded_error.h:48:3: note: [blink-gc] Untraced field 'x_derived_' declared here: - Member<X> x_derived_; - ^ -6 warnings generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/virtual_and_trace_after_dispatch.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/virtual_and_trace_after_dispatch.cpp deleted file mode 100644 index 2ba6f1e..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/virtual_and_trace_after_dispatch.cpp +++ /dev/null
@@ -1,30 +0,0 @@ -// Copyright 2014 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. - -#include "virtual_and_trace_after_dispatch.h" - -namespace blink { - -static B* toB(A* a) { return static_cast<B*>(a); } - -void A::trace(Visitor* visitor) -{ - switch (m_type) { - case TB: - toB(this)->traceAfterDispatch(visitor); - break; - } -} - -void A::traceAfterDispatch(Visitor* visitor) -{ -} - -void B::traceAfterDispatch(Visitor* visitor) -{ - visitor->trace(m_a); - A::traceAfterDispatch(visitor); -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/virtual_and_trace_after_dispatch.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/virtual_and_trace_after_dispatch.h deleted file mode 100644 index 50483496..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/virtual_and_trace_after_dispatch.h +++ /dev/null
@@ -1,34 +0,0 @@ -// Copyright 2014 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. - -#ifndef VIRTUAL_AND_TRACE_AFTER_DISPATCH_H_ -#define VIRTUAL_AND_TRACE_AFTER_DISPATCH_H_ - -#include "heap/stubs.h" - -namespace blink { - -class A : public GarbageCollected<A> { -public: - void trace(Visitor*); - void traceAfterDispatch(Visitor*); -protected: - enum Type { TB }; - A(Type type) : m_type(type) { } -private: - Type m_type; -}; - -class B : public A { -public: - B() : A(TB) { } - void traceAfterDispatch(Visitor*); - virtual void foo() { } -private: - Member<A> m_a; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/virtual_and_trace_after_dispatch.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/virtual_and_trace_after_dispatch.txt deleted file mode 100644 index fb46696..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/virtual_and_trace_after_dispatch.txt +++ /dev/null
@@ -1,11 +0,0 @@ -In file included from virtual_and_trace_after_dispatch.cpp:5: -./virtual_and_trace_after_dispatch.h:12:1: warning: [blink-gc] Left-most base class 'A' of derived class 'B' must be polymorphic. -class A : public GarbageCollected<A> { -^ -./virtual_and_trace_after_dispatch.h:23:1: warning: [blink-gc] Class 'B' contains or inherits virtual methods but implements manual dispatching. -class B : public A { -^ -./virtual_and_trace_after_dispatch.h:14:5: note: [blink-gc] Manual dispatch 'trace' declared here: - void trace(Visitor*); - ^ -2 warnings generated.
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/weak_fields_require_tracing.cpp b/tools/clang/blink_gc_plugin/tests/legacy_naming/weak_fields_require_tracing.cpp deleted file mode 100644 index 382e9f97..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/weak_fields_require_tracing.cpp +++ /dev/null
@@ -1,28 +0,0 @@ -// Copyright 2014 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. - -#include "weak_fields_require_tracing.h" - -namespace blink { - -void HeapObject::trace(Visitor* visitor) -{ - // Missing visitor->trace(m_obj1); - // Missing visitor->trace(m_obj2); - // visitor->trace(m_obj3) in callback. - // Missing visitor->trace(m_set1); - visitor->trace(m_set2); - visitor->registerWeakMembers<HeapObject, - &HeapObject::clearWeakMembers>(this); -} - -void HeapObject::clearWeakMembers(Visitor* visitor) -{ - visitor->trace(m_obj1); // Does not count. - // Missing visitor->trace(m_obj2); - visitor->trace(m_obj3); // OK. - visitor->trace(m_set1); // Does not count. -} - -}
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/weak_fields_require_tracing.h b/tools/clang/blink_gc_plugin/tests/legacy_naming/weak_fields_require_tracing.h deleted file mode 100644 index c6850e6d..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/weak_fields_require_tracing.h +++ /dev/null
@@ -1,26 +0,0 @@ -// Copyright 2014 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. - -#ifndef WEAK_FIELDS_REQUIRE_TRACING_H_ -#define WEAK_FIELDS_REQUIRE_TRACING_H_ - -#include "heap/stubs.h" - -namespace blink { - -class HeapObject : public GarbageCollected<HeapObject> { -public: - void trace(Visitor*); - void clearWeakMembers(Visitor*); -private: - Member<HeapObject> m_obj1; - WeakMember<HeapObject> m_obj2; - WeakMember<HeapObject> m_obj3; - HeapHashSet<WeakMember<HeapObject> > m_set1; - HeapHashSet<WeakMember<HeapObject> > m_set2; -}; - -} - -#endif
diff --git a/tools/clang/blink_gc_plugin/tests/legacy_naming/weak_fields_require_tracing.txt b/tools/clang/blink_gc_plugin/tests/legacy_naming/weak_fields_require_tracing.txt deleted file mode 100644 index 02f56a393..0000000 --- a/tools/clang/blink_gc_plugin/tests/legacy_naming/weak_fields_require_tracing.txt +++ /dev/null
@@ -1,13 +0,0 @@ -weak_fields_require_tracing.cpp:9:1: warning: [blink-gc] Class 'HeapObject' has untraced fields that require tracing. -void HeapObject::trace(Visitor* visitor) -^ -./weak_fields_require_tracing.h:17:5: note: [blink-gc] Untraced field 'm_obj1' declared here: - Member<HeapObject> m_obj1; - ^ -./weak_fields_require_tracing.h:18:5: note: [blink-gc] Untraced field 'm_obj2' declared here: - WeakMember<HeapObject> m_obj2; - ^ -./weak_fields_require_tracing.h:20:5: note: [blink-gc] Untraced field 'm_set1' declared here: - HeapHashSet<WeakMember<HeapObject> > m_set1; - ^ -1 warning generated.
diff --git a/tools/clang/blink_gc_plugin/tests/stack_allocated.flags b/tools/clang/blink_gc_plugin/tests/stack_allocated.flags deleted file mode 100644 index 7ec7af4..0000000 --- a/tools/clang/blink_gc_plugin/tests/stack_allocated.flags +++ /dev/null
@@ -1 +0,0 @@ --Xclang -plugin-arg-blink-gc-plugin -Xclang warn-stack-allocated-trace-method \ No newline at end of file
diff --git a/tools/clang/blink_gc_plugin/tests/test.py b/tools/clang/blink_gc_plugin/tests/test.py index b1338bf..a380cc63 100755 --- a/tools/clang/blink_gc_plugin/tests/test.py +++ b/tools/clang/blink_gc_plugin/tests/test.py
@@ -20,10 +20,6 @@ def AdjustClangArguments(self, clang_cmd): clang_cmd.append('-Wno-inaccessible-base') - clang_cmd.append('-Xclang') - clang_cmd.append('-plugin-arg-blink-gc-plugin') - clang_cmd.append('-Xclang') - clang_cmd.append('use-chromium-style-naming') def ProcessOneResult(self, test_name, actual): # Some Blink GC plugins dump a JSON representation of the object graph, and
diff --git a/tools/clang/plugins/ChromeClassTester.cpp b/tools/clang/plugins/ChromeClassTester.cpp index b0cc3db..c938806 100644 --- a/tools/clang/plugins/ChromeClassTester.cpp +++ b/tools/clang/plugins/ChromeClassTester.cpp
@@ -48,15 +48,15 @@ // We handle class types here where we have semantic information. We can only // check structs/classes/enums here, but we get a bunch of nice semantic // information instead of just parsing information. + if (InBannedNamespace(tag)) + return; + + SourceLocation location = tag->getInnerLocStart(); + LocationType location_type = ClassifyLocation(location); + if (location_type == LocationType::kThirdParty) + return; if (CXXRecordDecl* record = dyn_cast<CXXRecordDecl>(tag)) { - if (InBannedNamespace(record)) - return; - - SourceLocation record_location = record->getInnerLocStart(); - if (InBannedDirectory(record_location)) - return; - // We sadly need to maintain a blacklist of types that violate these // rules, but do so for good reason or due to limitations of this // checker (i.e., we don't handle extern templates very well). @@ -69,17 +69,14 @@ if (ends_with(base_name, "Matcher")) return; - CheckChromeClass(record_location, record); + CheckChromeClass(location_type, location, record); } else if (EnumDecl* enum_decl = dyn_cast<EnumDecl>(tag)) { - SourceLocation enum_location = enum_decl->getInnerLocStart(); - if (InBannedDirectory(enum_location)) - return; - std::string base_name = enum_decl->getNameAsString(); + // TODO(dcheng): This should probably consult a separate list. if (IsIgnoredType(base_name)) return; - CheckChromeEnum(enum_location, enum_decl); + CheckChromeEnum(location_type, location, enum_decl); } } @@ -98,27 +95,27 @@ } -bool ChromeClassTester::InBannedDirectory(SourceLocation loc) { +ChromeClassTester::LocationType ChromeClassTester::ClassifyLocation( + SourceLocation loc) { if (instance().getSourceManager().isInSystemHeader(loc)) - return true; + return LocationType::kThirdParty; std::string filename; if (!GetFilename(loc, &filename)) { // If the filename cannot be determined, simply treat this as a banned // location, instead of going through the full lookup process. - return true; + return LocationType::kThirdParty; } // We need to special case scratch space; which is where clang does its // macro expansion. We explicitly want to allow people to do otherwise bad // things through macros that were defined due to third party libraries. if (filename == "<scratch space>") - return true; + return LocationType::kThirdParty; // Don't complain about autogenerated protobuf files. - if (ends_with(filename, ".pb.h")) { - return true; - } + if (ends_with(filename, ".pb.h")) + return LocationType::kThirdParty; #if defined(LLVM_ON_UNIX) // Resolve the symlinktastic relative path and make it absolute. @@ -160,14 +157,14 @@ std::replace(filename.begin(), filename.end(), '\\', '/'); #endif - for (const std::string& allowed_dir : allowed_directories_) { + for (const std::string& blink_dir : blink_directories_) { // If any of the allowed directories occur as a component in filename, // this file is allowed. - assert(allowed_dir.front() == '/' && "Allowed dir must start with '/'"); - assert(allowed_dir.back() == '/' && "Allowed dir must end with '/'"); + assert(blink_dir.front() == '/' && "Allowed dir must start with '/'"); + assert(blink_dir.back() == '/' && "Allowed dir must end with '/'"); - if (filename.find(allowed_dir) != std::string::npos) - return false; + if (filename.find(blink_dir) != std::string::npos) + return LocationType::kBlink; } for (const std::string& banned_dir : banned_directories_) { @@ -177,24 +174,22 @@ assert(banned_dir.back() == '/' && "Banned dir must end with '/'"); if (filename.find(banned_dir) != std::string::npos) - return true; + return LocationType::kThirdParty; } - return false; + return LocationType::kChrome; } bool ChromeClassTester::InBannedNamespace(const Decl* record) { std::string n = GetNamespace(record); - if (!n.empty()) { - return std::find(banned_namespaces_.begin(), banned_namespaces_.end(), n) - != banned_namespaces_.end(); - } + if (!n.empty()) + return banned_namespaces_.find(n) != banned_namespaces_.end(); return false; } std::string ChromeClassTester::GetNamespace(const Decl* record) { - return GetNamespaceImpl(record->getDeclContext(), ""); + return GetNamespaceImpl(record->getDeclContext(), std::string()); } bool ChromeClassTester::HasIgnoredBases(const CXXRecordDecl* record) { @@ -238,9 +233,7 @@ banned_namespaces_.emplace("std"); banned_namespaces_.emplace("__gnu_cxx"); - if (options_.enforce_in_thirdparty_webkit) { - allowed_directories_.emplace("/third_party/WebKit/"); - } + blink_directories_.emplace("/third_party/WebKit/"); banned_directories_.emplace("/third_party/"); banned_directories_.emplace("/native_client/");
diff --git a/tools/clang/plugins/ChromeClassTester.h b/tools/clang/plugins/ChromeClassTester.h index 22af158..03bc2bd 100644 --- a/tools/clang/plugins/ChromeClassTester.h +++ b/tools/clang/plugins/ChromeClassTester.h
@@ -32,15 +32,27 @@ // Emits a simple warning; this shouldn't be used if you require printf-style // printing. + // TODO(dcheng): This will be removed. Do not add new usage. void emitWarning(clang::SourceLocation loc, const char* error); // Utility method for subclasses to check if this class is in a banned // namespace. bool InBannedNamespace(const clang::Decl* record); - // Utility method for subclasses to check if the source location is in a - // directory the plugin should ignore. - bool InBannedDirectory(clang::SourceLocation loc); + // Utility method for subclasses to check how a certain SourceLocation should + // be handled. The main criteria for classification is the SourceLocation's + // path (e.g. whether it's in //third_party). + enum class LocationType { + // Enforce all default checks. + kChrome, + // Enforces a subset of checks for Blink code. This is hopefully a + // transitional stage, as more plugin checks are gradually enabled in Blink. + kBlink, + // Skip all checks. Typically, this is third-party or generated code where + // it doesn't make sense to enforce Chrome's custom diagnostics. + kThirdParty, + }; + LocationType ClassifyLocation(clang::SourceLocation loc); // Utility method for subclasses to determine the namespace of the // specified record, if any. Unnamed namespaces will be identified as @@ -63,14 +75,15 @@ // Filtered versions of tags that are only called with things defined in // chrome header files. - virtual void CheckChromeClass(clang::SourceLocation record_location, + virtual void CheckChromeClass(LocationType location_type, + clang::SourceLocation record_location, clang::CXXRecordDecl* record) = 0; // Filtered versions of enum type that are only called with things defined // in chrome header files. - virtual void CheckChromeEnum(clang::SourceLocation enum_location, - clang::EnumDecl* enum_decl) { - } + virtual void CheckChromeEnum(LocationType location_type, + clang::SourceLocation enum_location, + clang::EnumDecl* enum_decl) = 0; // Utility methods used for filtering out non-chrome classes (and ones we // deliberately ignore) in HandleTagDeclDefinition(). @@ -88,9 +101,8 @@ // List of banned namespaces. std::set<std::string> banned_namespaces_; - // List of directories allowed even though their parent directories are in - // |banned_directories_|, below. - std::set<std::string> allowed_directories_; + // List of Blink directories. + std::set<std::string> blink_directories_; // List of banned directories. std::set<std::string> banned_directories_;
diff --git a/tools/clang/plugins/FindBadConstructsAction.cpp b/tools/clang/plugins/FindBadConstructsAction.cpp index 25382ec0..56050b4 100644 --- a/tools/clang/plugins/FindBadConstructsAction.cpp +++ b/tools/clang/plugins/FindBadConstructsAction.cpp
@@ -58,7 +58,8 @@ } else if (args[i] == "check-ipc") { options_.check_ipc = true; } else if (args[i] == "check-auto-raw-pointer") { - options_.check_auto_raw_pointer = true; + // This flag is deprecated and will be removed once Chromium builds aren't + // using it. http://crbug.com/554600. } else { parsed = false; llvm::errs() << "Unknown clang plugin argument: " << args[i] << "\n";
diff --git a/tools/clang/plugins/FindBadConstructsConsumer.cpp b/tools/clang/plugins/FindBadConstructsConsumer.cpp index 427fa47..629090c 100644 --- a/tools/clang/plugins/FindBadConstructsConsumer.cpp +++ b/tools/clang/plugins/FindBadConstructsConsumer.cpp
@@ -216,8 +216,14 @@ return true; } -void FindBadConstructsConsumer::CheckChromeClass(SourceLocation record_location, +void FindBadConstructsConsumer::CheckChromeClass(LocationType location_type, + SourceLocation record_location, CXXRecordDecl* record) { + // TODO(dcheng): After emitWarning() is removed, move warning filtering into + // ReportIfSpellingLocNotIgnored. + if (location_type == LocationType::kBlink) + return; + bool implementation_file = InImplementationFile(record_location); if (!implementation_file) { @@ -245,11 +251,15 @@ CheckWeakPtrFactoryMembers(record_location, record); } -void FindBadConstructsConsumer::CheckChromeEnum(SourceLocation enum_location, +void FindBadConstructsConsumer::CheckChromeEnum(LocationType location_type, + SourceLocation enum_location, EnumDecl* enum_decl) { if (!options_.check_enum_last_value) return; + if (location_type == LocationType::kBlink) + return; + bool got_one = false; bool is_signed = false; llvm::APSInt max_so_far; @@ -451,9 +461,12 @@ FindBadConstructsConsumer::ReportIfSpellingLocNotIgnored( SourceLocation loc, unsigned diagnostic_id) { - return SuppressibleDiagnosticBuilder( - &diagnostic(), loc, diagnostic_id, - InBannedDirectory(instance().getSourceManager().getSpellingLoc(loc))); + LocationType type = + ClassifyLocation(instance().getSourceManager().getSpellingLoc(loc)); + bool ignored = + type == LocationType::kThirdParty || type == LocationType::kBlink; + return SuppressibleDiagnosticBuilder(&diagnostic(), loc, diagnostic_id, + ignored); } // Checks that virtual methods are correctly annotated, and have no body in a @@ -609,7 +622,8 @@ bool emit = true; if (loc.isMacroID()) { SourceManager& manager = instance().getSourceManager(); - if (InBannedDirectory(manager.getSpellingLoc(loc))) + LocationType type = ClassifyLocation(manager.getSpellingLoc(loc)); + if (type == LocationType::kThirdParty || type == LocationType::kBlink) emit = false; else { StringRef name = Lexer::getImmediateMacroName( @@ -982,9 +996,6 @@ } void FindBadConstructsConsumer::CheckVarDecl(clang::VarDecl* var_decl) { - if (!options_.check_auto_raw_pointer) - return; - // Check whether auto deduces to a raw pointer. QualType non_reference_type = var_decl->getType().getNonReferenceType(); // We might have a case where the type is written as auto*, but the actual @@ -1001,8 +1012,10 @@ // Check if we should even be considering this type (note that there // should be fewer auto types than banned namespace/directory types, // so check this last. + LocationType location_type = + ClassifyLocation(var_decl->getLocStart()); if (!InBannedNamespace(var_decl) && - !InBannedDirectory(var_decl->getLocStart())) { + location_type != LocationType::kThirdParty) { // The range starts from |var_decl|'s loc start, which is the // beginning of the full expression defining this |var_decl|. It // ends, however, where this |var_decl|'s type loc ends, since
diff --git a/tools/clang/plugins/FindBadConstructsConsumer.h b/tools/clang/plugins/FindBadConstructsConsumer.h index 64032d8..a1acf4a1 100644 --- a/tools/clang/plugins/FindBadConstructsConsumer.h +++ b/tools/clang/plugins/FindBadConstructsConsumer.h
@@ -56,9 +56,11 @@ bool VisitCallExpr(clang::CallExpr* call_expr); // ChromeClassTester overrides: - void CheckChromeClass(clang::SourceLocation record_location, + void CheckChromeClass(LocationType location_type, + clang::SourceLocation record_location, clang::CXXRecordDecl* record) override; - void CheckChromeEnum(clang::SourceLocation enum_location, + void CheckChromeEnum(LocationType location_type, + clang::SourceLocation enum_location, clang::EnumDecl* enum_decl) override; private:
diff --git a/tools/clang/plugins/Options.h b/tools/clang/plugins/Options.h index cf04601..a012979 100644 --- a/tools/clang/plugins/Options.h +++ b/tools/clang/plugins/Options.h
@@ -15,9 +15,6 @@ // paths. See https://crbug.com/583454 for details. bool no_realpath = false; bool check_ipc = false; - // Enforce that auto doesn't deduce to a raw pointer. See - // https://crbug.com/554600 for details. - bool check_auto_raw_pointer = false; }; } // namespace chrome_checker
diff --git a/tools/clang/plugins/tests/auto_raw_pointer.flags b/tools/clang/plugins/tests/auto_raw_pointer.flags deleted file mode 100644 index b291544f..0000000 --- a/tools/clang/plugins/tests/auto_raw_pointer.flags +++ /dev/null
@@ -1 +0,0 @@ --Xclang -plugin-arg-find-bad-constructs -Xclang check-auto-raw-pointer
diff --git a/tools/clang/pylib/clang/compile_db.py b/tools/clang/pylib/clang/compile_db.py index 8bae555..cb8a39fb1 100755 --- a/tools/clang/pylib/clang/compile_db.py +++ b/tools/clang/pylib/clang/compile_db.py
@@ -5,22 +5,93 @@ import json import os +import re +import shlex +import sys import subprocess +_RSP_RE = re.compile(r' (@(.+?\.rsp)) ') +_debugging = False + + +def _ProcessEntry(entry): + """Transforms one entry in the compile database to be clang-tool friendly.""" + # Escape backslashes to prevent shlex from interpreting them. + escaped_command = entry['command'].replace('\\', '\\\\') + split_command = shlex.split(escaped_command) + # Drop gomacc.exe from the front, if present. + if split_command[0].endswith('gomacc.exe'): + split_command = split_command[1:] + # Insert --driver-mode=cl as the first argument. + split_command = split_command[:1] + ['--driver-mode=cl'] + split_command[1:] + entry['command'] = ' '.join(split_command) + + # Expand the contents of the response file, if any. + # http://llvm.org/bugs/show_bug.cgi?id=21634 + try: + match = _RSP_RE.search(entry['command']) + if match: + rsp_path = os.path.join(entry['directory'], match.group(2)) + rsp_contents = file(rsp_path).read() + entry['command'] = ''.join([ + entry['command'][:match.start(1)], + rsp_contents, + entry['command'][match.end(1):]]) + except IOError: + if _debugging: + print 'Couldn\'t read response file for %s' % entry['file'] + + return entry + + +def _ProcessCompileDatabaseForWindows(compile_db): + """Make the compile db generated by ninja on Windows more clang-tool friendly. + + Args: + compile_db: The compile database parsed as a Python dictionary. + + Returns: + A postprocessed compile db that clang tooling can use. + """ + if _debugging > 0: + print 'Read in %d entries from the compile db' % len(compile_db) + compile_db = [_ProcessEntry(e) for e in compile_db] + original_length = len(compile_db) + + # Filter out NaCl stuff. The clang tooling chokes on them. + # TODO(dcheng): This doesn't appear to do anything anymore, remove? + compile_db = [e for e in compile_db if '_nacl.cc.pdb' not in e['command'] + and '_nacl_win64.cc.pdb' not in e['command']] + if _debugging > 0: + print 'Filtered out %d entries...' % (original_length - len(compile_db)) + + # TODO(dcheng): Also filter out multiple commands for the same file. Not sure + # how that happens, but apparently it's an issue on Windows. + return compile_db + + def GenerateWithNinja(path): """Generates a compile database using ninja. Args: path: The build directory to generate a compile database for. """ - # TODO(dcheng): Incorporate Windows-specific compile DB munging from - # https://codereview.chromium.org/718873004 - print 'Generating compile database in %s...' % path - args = ['ninja', '-C', path, '-t', 'compdb', 'cc', 'cxx', 'objc', 'objcxx'] - output = subprocess.check_output(args) - with file(os.path.join(path, 'compile_commands.json'), 'w') as f: - f.write(output) + # TODO(dcheng): Ensure that clang is enabled somehow. + + # First, generate the compile database. + json_compile_db = subprocess.check_output([ + 'ninja', '-C', path, '-t', 'compdb', 'cc', 'cxx', 'objc', 'objcxx']) + compile_db = json.loads(json_compile_db) + + # TODO(dcheng): Ideally this would check target_os... but not sure there's an + # easy way to do that, and (for now) cross-compiles don't work without custom + # patches anyway. + if sys.platform == 'win32': + compile_db = _ProcessCompileDatabaseForWindows(compile_db) + + with open(os.path.join(path, 'compile_commands.json'), 'w') as f: + f.write(json.dumps(compile_db, indent=2)) def Read(path):
diff --git a/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp b/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp index 9f94e9b..8b0af6a 100644 --- a/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp +++ b/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp
@@ -26,8 +26,8 @@ #include "clang/Basic/SourceManager.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Frontend/FrontendActions.h" -#include "clang/Lex/MacroArgs.h" #include "clang/Lex/Lexer.h" +#include "clang/Lex/MacroArgs.h" #include "clang/Lex/PPCallbacks.h" #include "clang/Lex/Preprocessor.h" #include "clang/Tooling/CommonOptionsParser.h" @@ -37,6 +37,7 @@ #include "llvm/Support/ErrorOr.h" #include "llvm/Support/LineIterator.h" #include "llvm/Support/MemoryBuffer.h" +#include "llvm/Support/Path.h" #include "llvm/Support/TargetSelect.h" #include "EditTracker.h" @@ -50,12 +51,14 @@ const char kBlinkFieldPrefix[] = "m_"; const char kBlinkStaticMemberPrefix[] = "s_"; -const char kGeneratedFileRegex[] = "^gen/|/gen/"; -const char kGeneratedFileExclusionRegex[] = - "(^gen/|/gen/).*/ComputedStyleBase\\.h$"; const char kGMockMethodNamePrefix[] = "gmock_"; const char kMethodBlocklistParamName[] = "method-blocklist"; +std::set<clang::SourceLocation>& GetRewrittenLocs() { + static auto& locations = *new std::set<clang::SourceLocation>(); + return locations; +} + template <typename MatcherType, typename NodeType> bool IsMatching(const MatcherType& matcher, const NodeType& node, @@ -140,8 +143,8 @@ if (!method.getDeclName().isIdentifier()) return false; - auto it = method_to_class_to_args_.find(method.getName()); - if (it == method_to_class_to_args_.end()) + auto it = method_to_classes_.find(method.getName()); + if (it == method_to_classes_.end()) return false; // |method_context| is either @@ -154,32 +157,19 @@ if (!method_context->getDeclName().isIdentifier()) return false; - const llvm::StringMap<std::set<unsigned>>& class_to_args = it->second; - auto it2 = class_to_args.find(method_context->getName()); - if (it2 == class_to_args.end()) + const llvm::StringSet<>& classes = it->second; + auto it2 = classes.find(method_context->getName()); + if (it2 == classes.end()) return false; - const std::set<unsigned>& arg_counts = it2->second; - unsigned method_param_count = method.param_size(); - unsigned method_non_optional_param_count = method_param_count; - for (const clang::ParmVarDecl* param : method.parameters()) { - if (param->hasInit()) - method_non_optional_param_count--; - } - bool found_matching_arg_count = - std::any_of(arg_counts.begin(), arg_counts.end(), - [method_param_count, - method_non_optional_param_count](unsigned arg_count) { - return (method_non_optional_param_count <= arg_count) && - (arg_count <= method_param_count); - }); - // No need to verify here that |actual_class| is in the |blink| namespace - // this will be done by other matchers elsewhere. // TODO(lukasza): Do we need to consider return type and/or param types? - return found_matching_arg_count; + // TODO(lukasza): Do we need to consider param count? + + return true; } private: @@ -218,24 +208,16 @@ // Parse individual parts. llvm::StringRef class_name = parts[0]; llvm::StringRef method_name = parts[1]; - unsigned number_of_method_args; - if (parts[2].getAsInteger(0, number_of_method_args)) { - llvm::errs() << "ERROR: Parsing error - '" << parts[2] << "' " - << "is not an unsigned integer: " << filepath << ":" - << it.line_number() << ": " << line << "\n"; - assert(false); - continue; - } + // ignoring parts[2] - the (not so trustworthy) number of parameters. // Store the new entry. - method_to_class_to_args_[method_name][class_name].insert( - number_of_method_args); + method_to_classes_[method_name].insert(class_name); } } // Stores methods to blacklist in a map: // method name -> class name -> set of all allowed numbers of arguments. - llvm::StringMap<llvm::StringMap<std::set<unsigned>>> method_to_class_to_args_; + llvm::StringMap<llvm::StringSet<>> method_to_classes_; }; AST_MATCHER_P(clang::FunctionDecl, @@ -446,7 +428,7 @@ // https://crbug.com/672902: Should not rewrite names that mimick methods // from std library. - "back", "empty", "erase", "front", "insert", "length", "size", + "at", "back", "empty", "erase", "front", "insert", "length", "size", }; for (const auto& b : kBlacklistedNames) { if (name == b) @@ -537,12 +519,22 @@ if (!file_entry) return false; - static llvm::Regex exclusion_regex(kGeneratedFileExclusionRegex); - if (exclusion_regex.match(file_entry->getName())) - return false; - - static llvm::Regex generated_file_regex(kGeneratedFileRegex); - return generated_file_regex.match(file_entry->getName()); + bool is_generated_file = false; + bool is_computed_style_base_cpp = + llvm::sys::path::filename(file_entry->getName()) + .equals("ComputedStyleBase.h"); + for (auto it = llvm::sys::path::begin(file_entry->getName()); + it != llvm::sys::path::end(file_entry->getName()); ++it) { + if (it->equals("gen")) { + is_generated_file = true; + break; + } + } + // ComputedStyleBase is intentionally not treated as a generated file, since + // style definitions are split between generated and non-generated code. It's + // easier to have the tool just automatically rewrite references to generated + // code as well, with a small manual patch to fix the code generators. + return is_generated_file && !is_computed_style_base_cpp; } // Helper to convert from a camelCaseName to camel_case_name. It uses some @@ -678,92 +670,118 @@ bool ShouldPrefixFunctionName(const std::string& old_method_name) { // Functions that are named similarily to a type - they should be prefixed // with a "Get" prefix. - static const char* kConflictingMethods[] = { - "animationWorklet", - "audioWorklet", - "binaryType", - "blob", - "channelCountMode", - "color", - "compositorElementId", - "counterDirectives", - "document", - "element", - "emptyChromeClient", - "emptyEditorClient", - "emptySpellCheckerClient", - "entryType", - "error", - "fileUtilities", - "font", - "frame", - "frameBlameContext", - "frontend", - "gridCell", - "hash", - "heapObjectHeader", - "iconURL", - "image", - "inputMethodController", - "inputType", - "interpolationTypes", - "layout", - "layoutBlock", - "layoutObject", - "layoutSize", - "lineCap", - "lineEndings", - "lineJoin", - "listItems", - "matchedProperties", - "midpointState", - "modifiers", - "mouseEvent", - "name", - "navigationType", - "node", - "notificationManager", - "outcome", - "pagePopup", - "paintWorklet", - "path", - "position", - "processingInstruction", - "readyState", - "relList", - "referrer", - "referrerPolicy", - "resource", - "response", - "restrictedKeyMap", - "sandboxSupport", - "screenInfo", - "screenOrientationController", - "scrollAnimator", - "selectionInFlatTree", - "settings", - "signalingState", - "snapshotById", - "state", - "string", - "styleSheet", - "supplementable", - "text", - "textAlign", - "textBaseline", - "theme", - "thread", - "timing", - "topLevelBlameContext", - "type", - "vector", - "visibleSelection", - "visibleSelectionInFlatTree", - "webFrame", - "widget", - "wordBoundaries", - "wrapperTypeInfo", - }; + static const char* kConflictingMethods[] = {"accumulatorMap", + "animationWorklet", + "attrNodeList", + "audioWorklet", + "binaryType", + "blob", + "channelCountMode", + "color", + "compositorElementId", + "constructionStack", + "controlSize", + "counterDirectives", + "counterMaps", + "document", + "dragOperation", + "element", + "emptyChromeClient", + "emptyEditorClient", + "emptySpellCheckerClient", + "entryType", + "error", + "eventTargetDataMap", + "fileUtilities", + "font", + "frame", + "frameBlameContext", + "frontend", + "gridCell", + "harfBuzzFontCache", + "hash", + "heapObjectHeader", + "heapObjectSet", + "iconURL", + "image", + "infoMap", + "inputMethodController", + "inputType", + "interpolationTypes", + "intervalArena", + "layout", + "layoutBlock", + "layoutObject", + "layoutSize", + "lineCap", + "lineEndings", + "lineJoin", + "listItems", + "locationInBackingMap", + "matchedProperties", + "midpointState", + "modifiers", + "mouseEvent", + "name", + "navigationType", + "node", + "notificationManager", + "originAccessMap", + "outcome", + "pagePopup", + "paintWorklet", + "path", + "position", + "presentationAttributeCache", + "processingInstruction", + "qualifiedNameCache", + "readyState", + "referrer", + "referrerPolicy", + "relList", + "resource", + "response", + "restrictedKeyMap", + "sandboxSupport", + "screenInfo", + "screenOrientationController", + "scrollAnimator", + "scrollbarPainterMap", + "scrollbarSet", + "selectionInDOMTree", + "selectionInFlatTree", + "selectionVisualRectMap", + "selectorTextCache", + "settings", + "shadowRootType", + "signalingState", + "snapshotById", + "state", + "stickyConstraintsMap", + "string", + "styleSharingList", + "styleSheet", + "supplementable", + "text", + "textAlign", + "textBaseline", + "textDirection", + "theme", + "thread", + "timing", + "topLevelBlameContext", + "type", + "vector", + "visibleSelection", + "visibleSelectionInFlatTree", + "weakHeapObjectSet", + "webFrame", + "widget", + "wordBoundaries", + "workerThread", + "worldId", + "worldMap", + "wrapperTypeInfo"}; for (const auto& conflicting_method : kConflictingMethods) { if (old_method_name == conflicting_method) return true; @@ -876,28 +894,8 @@ StringRef original_name = decl.getName(); // Nothing to do for unnamed parameters. - if (clang::isa<clang::ParmVarDecl>(decl)) { - if (original_name.empty()) - return false; - - // Check if |decl| and |decl.getLocation| are in sync. We need to skip - // out-of-sync ParmVarDecls to avoid renaming buggy ParmVarDecls that - // 1) have decl.getLocation() pointing at a parameter declaration without a - // name, but 2) have decl.getName() retained from a template specialization - // of a method. See also: https://llvm.org/bugs/show_bug.cgi?id=29145 - clang::SourceLocation loc = - context.getSourceManager().getSpellingLoc(decl.getLocation()); - auto parents = context.getParents(decl); - bool is_child_location_within_parent_source_range = std::all_of( - parents.begin(), parents.end(), - [&loc](const clang::ast_type_traits::DynTypedNode& parent) { - clang::SourceLocation begin = parent.getSourceRange().getBegin(); - clang::SourceLocation end = parent.getSourceRange().getEnd(); - return (begin < loc) && (loc < end); - }); - if (!is_child_location_within_parent_source_range) - return false; - } + if (clang::isa<clang::ParmVarDecl>(decl) && original_name.empty()) + return false; // This is a type trait that appears in consumers of WTF as well as inside // WTF. We want it to be named in this_style_of_case accordingly. @@ -1136,8 +1134,16 @@ if (actual_old_text != expected_old_text) return false; - if (replacement) + if (replacement) { + // If there's already a replacement for this location, don't emit any + // other replacements to avoid potential naming conflicts. This is + // primarily to avoid problems when a function and a parameter are defined + // by the same macro argument. + if (!GetRewrittenLocs().emplace(spell).second) + return false; + *replacement = Replacement(source_manager, range, new_text); + } return true; }
diff --git a/tools/clang/rewrite_to_chrome_style/tests/blocked_methods.txt b/tools/clang/rewrite_to_chrome_style/tests/blocked_methods.txt index 8e82370..fd692e4 100644 --- a/tools/clang/rewrite_to_chrome_style/tests/blocked_methods.txt +++ b/tools/clang/rewrite_to_chrome_style/tests/blocked_methods.txt
@@ -4,16 +4,12 @@ # Line with whitespace only below: -IdlTestClass:::idlTestMethodNoParams:::0 -IdlTestClass:::idlTestMethodOneParam:::1 -IdlTestClass:::idlTestMethodTwoOrThreeParams:::2 -IdlTestClass:::idlTestMethodTwoOrThreeParams:::3 -IdlTestClass:::idlTemplateMethod:::1 -IdlTestClass:::path:::0 -IdlTestClass:::idlOptionalArgsPass:::0 -IdlTestClass:::idlOptionalArgsStillTooMany:::0 -IdlTestClass:::idlOptionalArgsTooLittle:::2 -IdlTemplateClass:::idlTestMethod:::1 + +# Some tests: +IdlTestClass:::idlStaticMethod:::1234 +IdlTestClass:::idlInstanceMethod:::1234 +IdlTestClass:::idlTemplateMethod:::1234 +IdlTemplateClass:::idlInstanceMethod:::1234 # Test for free functions: IdlFunctions:::foo:::0
diff --git a/tools/clang/rewrite_to_chrome_style/tests/bool-is-macro-expected.cc b/tools/clang/rewrite_to_chrome_style/tests/bool-is-macro-expected.cc new file mode 100644 index 0000000..374a094 --- /dev/null +++ b/tools/clang/rewrite_to_chrome_style/tests/bool-is-macro-expected.cc
@@ -0,0 +1,14 @@ +// Copyright 2017 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. + +namespace blink { + +// On Linux, bool can be a macro. Make sure this case is handled correctly. +#define bool bool + +bool FunctionReturningBool(char* input_data) { + return input_data[0]; +} + +} // namespace blink
diff --git a/tools/clang/rewrite_to_chrome_style/tests/bool-is-macro-original.cc b/tools/clang/rewrite_to_chrome_style/tests/bool-is-macro-original.cc new file mode 100644 index 0000000..dcddee1 --- /dev/null +++ b/tools/clang/rewrite_to_chrome_style/tests/bool-is-macro-original.cc
@@ -0,0 +1,14 @@ +// Copyright 2017 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. + +namespace blink { + +// On Linux, bool can be a macro. Make sure this case is handled correctly. +#define bool bool + +bool functionReturningBool(char* inputData) { + return inputData[0]; +} + +} // namespace blink
diff --git a/tools/clang/rewrite_to_chrome_style/tests/macros-expected.cc b/tools/clang/rewrite_to_chrome_style/tests/macros-expected.cc index 7136069..00ce6b21 100644 --- a/tools/clang/rewrite_to_chrome_style/tests/macros-expected.cc +++ b/tools/clang/rewrite_to_chrome_style/tests/macros-expected.cc
@@ -19,7 +19,7 @@ struct Base {}; struct Derived : public Base {}; -DEFINE_TYPE_CASTS(Derived, Base, object, true); +DEFINE_TYPE_CASTS(Derived, Base, the_object, true); void F() { Base* base_ptr = new Derived; @@ -76,7 +76,7 @@ \ public: \ int name() { return m_##name; } \ - void Set##Name(int value) { m_##name = value; } + void Set##Name(int name) { m_##name = name; } DECLARE_FIELD(FooBar, FooBar) DECLARE_FIELD(BarBaz, BarBaz)
diff --git a/tools/clang/rewrite_to_chrome_style/tests/macros-original.cc b/tools/clang/rewrite_to_chrome_style/tests/macros-original.cc index 8a924eba..78412c9 100644 --- a/tools/clang/rewrite_to_chrome_style/tests/macros-original.cc +++ b/tools/clang/rewrite_to_chrome_style/tests/macros-original.cc
@@ -19,7 +19,7 @@ struct Base {}; struct Derived : public Base {}; -DEFINE_TYPE_CASTS(Derived, Base, object, true); +DEFINE_TYPE_CASTS(Derived, Base, theObject, true); void F() { Base* basePtr = new Derived; @@ -76,7 +76,7 @@ \ public: \ int name() { return m_##name; } \ - void set##Name(int value) { m_##name = value; } + void set##Name(int name) { m_##name = name; } DECLARE_FIELD(fooBar, FooBar) DECLARE_FIELD(barBaz, BarBaz)
diff --git a/tools/clang/rewrite_to_chrome_style/tests/methods-expected.cc b/tools/clang/rewrite_to_chrome_style/tests/methods-expected.cc index f79e321..c11f9229 100644 --- a/tools/clang/rewrite_to_chrome_style/tests/methods-expected.cc +++ b/tools/clang/rewrite_to_chrome_style/tests/methods-expected.cc
@@ -305,36 +305,22 @@ // Tests for --method-blocklist cmdline parameter. class IdlTestClass { public: - static int IdlTestMethodNoParams(char x) { return 123; } - static int idlTestMethodOneParam(char x) { return 123; } + static int NotBlocklistedMethod() { return 123; } + int NotBlocklistedMethod(int x) { return 123; } - int idlTestMethodNoParams() { return 123; } - int IdlTestMethodNoParams(int x) { return 123; } - - int IdlTestMethodOneParam() { return 123; } - int idlTestMethodOneParam(int x) { return 123; } - - int IdlTestMethodTwoOrThreeParams() { return 123; } - int idlTestMethodTwoOrThreeParams(int x, int y) { return 123; } - int idlTestMethodTwoOrThreeParams(int x, int y, int z) { return 123; } - - int idlOptionalArgsPass(int x = 0) { return x; } - int IdlOptionalArgsStillTooMany(int x, int y = 0) { return x + y; } - int IdlOptionalArgsTooLittle(int x = 0) { return x; } + static int idlStaticMethod() { return 123; } + int idlInstanceMethod() { return 123; } template <typename T> int idlTemplateMethod(T x) { return 123; } - - int path() { return 123; } - int GetPath(int x) { return 123; } }; template <typename T> class IdlTemplateClass { public: - int idlTestMethod(T x) { return 123; } + int idlInstanceMethod(T x) { return 123; } }; } // namespace blink
diff --git a/tools/clang/rewrite_to_chrome_style/tests/methods-original.cc b/tools/clang/rewrite_to_chrome_style/tests/methods-original.cc index cc9d57a..5441724 100644 --- a/tools/clang/rewrite_to_chrome_style/tests/methods-original.cc +++ b/tools/clang/rewrite_to_chrome_style/tests/methods-original.cc
@@ -309,36 +309,22 @@ // Tests for --method-blocklist cmdline parameter. class IdlTestClass { public: - static int idlTestMethodNoParams(char x) { return 123; } - static int idlTestMethodOneParam(char x) { return 123; } + static int notBlocklistedMethod() { return 123; } + int notBlocklistedMethod(int x) { return 123; } - int idlTestMethodNoParams() { return 123; } - int idlTestMethodNoParams(int x) { return 123; } - - int idlTestMethodOneParam() { return 123; } - int idlTestMethodOneParam(int x) { return 123; } - - int idlTestMethodTwoOrThreeParams() { return 123; } - int idlTestMethodTwoOrThreeParams(int x, int y) { return 123; } - int idlTestMethodTwoOrThreeParams(int x, int y, int z) { return 123; } - - int idlOptionalArgsPass(int x = 0) { return x; } - int idlOptionalArgsStillTooMany(int x, int y = 0) { return x + y; } - int idlOptionalArgsTooLittle(int x = 0) { return x; } + static int idlStaticMethod() { return 123; } + int idlInstanceMethod() { return 123; } template <typename T> int idlTemplateMethod(T x) { return 123; } - - int path() { return 123; } - int path(int x) { return 123; } }; template <typename T> class IdlTemplateClass { public: - int idlTestMethod(T x) { return 123; } + int idlInstanceMethod(T x) { return 123; } }; } // namespace blink
diff --git a/tools/clang/rewrite_to_chrome_style/tests/variables-expected.cc b/tools/clang/rewrite_to_chrome_style/tests/variables-expected.cc index 119edd6..7b8a3d8f 100644 --- a/tools/clang/rewrite_to_chrome_style/tests/variables-expected.cc +++ b/tools/clang/rewrite_to_chrome_style/tests/variables-expected.cc
@@ -20,9 +20,9 @@ // Static locals. static int a_static_local_variable = 2; // Make sure references to variables are also rewritten. - return g_frame_count + - g_variable_mentioning_http_and_https * interesting_number / - a_local_variable % a_static_local_variable; + return g_frame_count + g_variable_mentioning_http_and_https * + interesting_number / a_local_variable % + a_static_local_variable; } } // namespace blink
diff --git a/tools/clang/scripts/apply_edits.py b/tools/clang/scripts/apply_edits.py index 7d373a9..5bc8d27 100755 --- a/tools/clang/scripts/apply_edits.py +++ b/tools/clang/scripts/apply_edits.py
@@ -147,10 +147,10 @@ error_count += tmp_error_count done_files += 1 percentage = (float(done_files) / len(edits)) * 100 - sys.stderr.write('Applied %d edits (%d errors) to %d files [%.2f%%]\r' % + sys.stdout.write('Applied %d edits (%d errors) to %d files [%.2f%%]\r' % (edit_count, error_count, done_files, percentage)) - sys.stderr.write('\n') + sys.stdout.write('\n') return -error_count
diff --git a/tools/clang/scripts/extract_edits.py b/tools/clang/scripts/extract_edits.py index b0df9c3..0eb7cf6 100755 --- a/tools/clang/scripts/extract_edits.py +++ b/tools/clang/scripts/extract_edits.py
@@ -45,6 +45,9 @@ def main(): + # TODO(dcheng): extract_edits.py should normalize paths. Doing this in + # apply_edits.py is too late, as a common use case is to apply edits from many + # different platforms. unique_lines = set() inside_marker_lines = False for line in sys.stdin:
diff --git a/tools/clang/scripts/generate_compdb.py b/tools/clang/scripts/generate_compdb.py new file mode 100755 index 0000000..a33e4095 --- /dev/null +++ b/tools/clang/scripts/generate_compdb.py
@@ -0,0 +1,37 @@ +#!/usr/bin/env python +# Copyright 2014 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. + +""" +Helper for generating compile DBs for clang tooling. On non-Windows platforms, +this is pretty straightforward. On Windows, the tool does a bit of extra work to +integrate the content of response files, force clang tooling to run in clang-cl +mode, etc. +""" + +import argparse +import os +import sys + +script_dir = os.path.dirname(os.path.realpath(__file__)) +tool_dir = os.path.abspath(os.path.join(script_dir, '../pylib')) +sys.path.insert(0, tool_dir) + +from clang import compile_db + + +def main(argv): + parser = argparse.ArgumentParser() + parser.add_argument( + 'build_path', + nargs='?', + help='Path to build directory', + default='out/Debug') + args = parser.parse_args() + + compile_db.GenerateWithNinja(args.build_path) + + +if __name__ == '__main__': + sys.exit(main(sys.argv[1:]))
diff --git a/tools/clang/scripts/generate_win_compdb.py b/tools/clang/scripts/generate_win_compdb.py deleted file mode 100755 index 6edd593..0000000 --- a/tools/clang/scripts/generate_win_compdb.py +++ /dev/null
@@ -1,83 +0,0 @@ -#!/usr/bin/env python -# Copyright 2014 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. - -""" -Clang tools on Windows are still a bit busted. The tooling can't handle -backslashes in paths, doesn't understand how to read .rsp files, etc. In -addition, ninja generates compile commands prefixed with the ninja msvc helper, -which also confuses clang. This script generates a compile DB that should mostly -work until clang tooling can be improved upstream. -""" - -import argparse -import os -import re -import json -import shlex -import subprocess -import sys - - -_NINJA_MSVC_WRAPPER = re.compile('ninja -t msvc -e .+? -- ') -_RSP_RE = re.compile(r' (@(.+?\.rsp)) ') - - -def _ProcessEntry(e): - # Strip off the ninja -t msvc wrapper. - e['command'] = _NINJA_MSVC_WRAPPER.sub('', e['command']) - - # Prepend --driver-mode=cl to the command's arguments. - # Escape backslashes so shlex doesn't try to interpret them. - escaped_command = e['command'].replace('\\', '\\\\') - split_command = shlex.split(escaped_command) - e['command'] = ' '.join( - split_command[:1] + ['--driver-mode=cl'] + split_command[1:]) - - # Expand the contents of the response file, if any. - # http://llvm.org/bugs/show_bug.cgi?id=21634 - try: - match = _RSP_RE.search(e['command']) - rsp_path = os.path.join(e['directory'], match.group(2)) - rsp_contents = file(rsp_path).read() - e['command'] = ''.join([ - e['command'][:match.start(1)], - rsp_contents, - e['command'][match.end(1):]]) - except IOError: - pass - - return e - - -def main(argv): - # Parse argument - parser = argparse.ArgumentParser() - parser.add_argument( - 'build_path', - nargs='?', - help='Path to build directory', - default='out/Debug') - args = parser.parse_args() - # First, generate the compile database. - print 'Generating compile DB with ninja...' - compile_db_as_json = subprocess.check_output(shlex.split( - 'ninja -C %s -t compdb cc cxx objc objcxx' % args.build_path)) - - compile_db = json.loads(compile_db_as_json) - print 'Read in %d entries from the compile db' % len(compile_db) - compile_db = [_ProcessEntry(e) for e in compile_db] - original_length = len(compile_db) - - # Filter out NaCl stuff. The clang tooling chokes on them. - compile_db = [e for e in compile_db if '_nacl.cc.pdb' not in e['command'] - and '_nacl_win64.cc.pdb' not in e['command']] - print 'Filtered out %d entries...' % (original_length - len(compile_db)) - f = file('%s/compile_commands.json' % args.build_path, 'w') - f.write(json.dumps(compile_db, indent=2)) - print 'Done!' - - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:]))
diff --git a/tools/clang/scripts/package.py b/tools/clang/scripts/package.py index 780bf5f1..151cb357 100755 --- a/tools/clang/scripts/package.py +++ b/tools/clang/scripts/package.py
@@ -104,12 +104,61 @@ exit_code = RunGsutil(gsutil_args) if exit_code != 0: print "gsutil failed, exit_code: %s" % exit_code - os.exit(exit_code) + sys.exit(exit_code) else: print 'To upload, run:' print ('gsutil %s' % ' '.join(gsutil_args)) +def UploadPDBToSymbolServer(): + assert sys.platform == 'win32' + # Upload PDB and binary to the symbol server on Windows. Put them into the + # chromium-browser-symsrv bucket, since chrome devs have that in their + # _NT_SYMBOL_PATH already. Executable and PDB must be at paths following a + # certain pattern for the Microsoft debuggers to be able to load them. + # Executable: + # chromium-browser-symsrv/clang-cl.exe/ABCDEFAB01234/clang-cl.ex_ + # ABCDEFAB is the executable's timestamp in %08X format, 01234 is the + # executable's image size in %x format. tools/symsrc/img_fingerprint.py + # can compute this ABCDEFAB01234 string for us, so use that. + # The .ex_ instead of .exe at the end means that the file is compressed. + # PDB: + # gs://chromium-browser-symsrv/clang-cl.exe.pdb/AABBCCDD/clang-cl.dll.pd_ + # AABBCCDD here is computed from the output of + # dumpbin /all mybinary.exe | find "Format: RSDS" + # but tools/symsrc/pdb_fingerprint_from_img.py can compute it already, so + # again just use that. + sys.path.insert(0, os.path.join(CHROMIUM_DIR, 'tools', 'symsrc')) + import img_fingerprint, pdb_fingerprint_from_img + + binaries = [ 'bin/clang-cl.exe', 'bin/lld-link.exe' ] + for binary_path in binaries: + binary_path = os.path.join(LLVM_RELEASE_DIR, binary_path) + binary_id = img_fingerprint.GetImgFingerprint(binary_path) + (pdb_id, pdb_path) = pdb_fingerprint_from_img.GetPDBInfoFromImg(binary_path) + + # The build process builds clang.exe and then copies it to clang-cl.exe + # (both are the same binary and they behave differently on what their + # filename is). Hence, the pdb is at clang.pdb, not at clang-cl.pdb. + # Likewise, lld-link.exe's PDB file is called lld.pdb. + + # Compress and upload. + for f, f_id in ((binary_path, binary_id), (pdb_path, pdb_id)): + subprocess.check_call( + ['makecab', '/D', 'CompressionType=LZX', '/D', 'CompressionMemory=21', + f, '/L', os.path.dirname(f)], stdout=open(os.devnull, 'w')) + f_cab = f[:-1] + '_' + + dest = '%s/%s/%s' % (os.path.basename(f), f_id, os.path.basename(f_cab)) + print 'Uploading %s to Google Cloud Storage...' % dest + gsutil_args = ['cp', '-n', '-a', 'public-read', f_cab, + 'gs://chromium-browser-symsrv/' + dest] + exit_code = RunGsutil(gsutil_args) + if exit_code != 0: + print "gsutil failed, exit_code: %s" % exit_code + sys.exit(exit_code) + + def main(): parser = argparse.ArgumentParser(description='build and package clang') parser.add_argument('--upload', action='store_true', @@ -137,8 +186,8 @@ # Check if Google Cloud Storage already has the artifacts we want to build. if (args.upload and GsutilArchiveExists(pdir, platform) and - not sys.platform.startswith('linux') or - GsutilArchiveExists(golddir, platform)): + (not sys.platform.startswith('linux') or + GsutilArchiveExists(golddir, platform))): print ('Desired toolchain revision %s is already available ' 'in Google Cloud Storage:') % expected_stamp print 'gs://chromium-browser-clang-staging/%s/%s.tgz' % (platform, pdir) @@ -222,6 +271,9 @@ elif sys.platform.startswith('linux'): # Copy the libstdc++.so.6 we linked Clang against so it can run. want.append('lib/libstdc++.so.6') + # Add llvm-ar and lld for LTO. + want.append('bin/llvm-ar') + want.append('bin/lld') # Copy only # lib/clang/*/lib/linux/libclang_rt.{[atm]san,san,ubsan,profile}-*.a , # but not dfsan. @@ -262,6 +314,9 @@ os.symlink('clang', os.path.join(pdir, 'bin', 'clang++')) os.symlink('clang', os.path.join(pdir, 'bin', 'clang-cl')) + if sys.platform.startswith('linux'): + os.symlink('lld', os.path.join(pdir, 'bin', 'ld.lld')) + # Copy libc++ headers. if sys.platform == 'darwin': shutil.copytree(os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'include', 'c++'), @@ -302,6 +357,9 @@ filter=PrintTarProgress) MaybeUpload(args, objdumpdir, platform) + if sys.platform == 'win32' and args.upload: + UploadPDBToSymbolServer() + # FIXME: Warn if the file already exists on the server.
diff --git a/tools/clang/scripts/run_tool.py b/tools/clang/scripts/run_tool.py index 53c7d0f..37ff3cc 100755 --- a/tools/clang/scripts/run_tool.py +++ b/tools/clang/scripts/run_tool.py
@@ -195,6 +195,9 @@ action='store_true', help='regenerate the compile database before running the tool') parser.add_argument( + '--shard', + metavar='<n>-of-<count>') + parser.add_argument( 'compile_database', help='path to the directory that contains the compile database') parser.add_argument( @@ -226,6 +229,19 @@ for f in git_filenames if os.path.splitext(f)[1] in extensions] + if args.shard: + total_length = len(source_filenames) + match = re.match(r'(\d+)-of-(\d+)$', args.shard) + # Input is 1-based, but modular arithmetic is 0-based. + shard_number = int(match.group(1)) - 1 + shard_count = int(match.group(2)) + source_filenames = [ + f[1] for f in enumerate(sorted(source_filenames)) + if f[0] % shard_count == shard_number + ] + print 'Shard %d-of-%d will process %d entries out of %d' % ( + shard_number, shard_count, len(source_filenames), total_length) + dispatcher = _CompilerDispatcher(args.tool, args.tool_args, args.compile_database, source_filenames)
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py index 2dfef6f..af2b34a 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py
@@ -27,7 +27,7 @@ # Do NOT CHANGE this if you don't know what you're doing -- see # https://chromium.googlesource.com/chromium/src/+/master/docs/updating_clang.md # Reverting problematic clang rolls is safe, though. -CLANG_REVISION = '296320' +CLANG_REVISION = '299960' use_head_revision = 'LLVM_FORCE_HEAD_REVISION' in os.environ if use_head_revision: @@ -87,6 +87,7 @@ DIA_DLL = { '2013': 'msdia120.dll', '2015': 'msdia140.dll', + '2017': 'msdia140.dll', } @@ -283,7 +284,6 @@ f.write('# two arg version to specify where build artifacts go. CMake\n') f.write('# disallows reuse of the same binary dir for multiple source\n') f.write('# dirs, so the build artifacts need to go into a subdirectory.\n') - f.write('# dirs, so the build artifacts need to go into a subdirectory.\n') f.write('if (CHROMIUM_TOOLS_SRC)\n') f.write(' add_subdirectory(${CHROMIUM_TOOLS_SRC} ' + '${CMAKE_CURRENT_BINARY_DIR}/a)\n') @@ -450,7 +450,6 @@ return 1 DownloadHostGcc(args) - AddSvnToPathOnWin() AddCMakeToPath() AddGnuWinToPath() @@ -458,7 +457,7 @@ Checkout('LLVM', LLVM_REPO_URL + '/llvm/trunk', LLVM_DIR) Checkout('Clang', LLVM_REPO_URL + '/cfe/trunk', CLANG_DIR) - if sys.platform == 'win32' or use_head_revision: + if sys.platform != 'darwin': Checkout('LLD', LLVM_REPO_URL + '/lld/trunk', LLD_DIR) elif os.path.exists(LLD_DIR): # In case someone sends a tryjob that temporary adds lld to the checkout, @@ -498,7 +497,6 @@ base_cmake_args = ['-GNinja', '-DCMAKE_BUILD_TYPE=Release', '-DLLVM_ENABLE_ASSERTIONS=ON', - '-DLLVM_ENABLE_THREADS=OFF', # Statically link MSVCRT to avoid DLL dependencies. '-DLLVM_USE_CRT_RELEASE=MT', ] @@ -567,8 +565,8 @@ os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'lib', 'LLVMgold.so'), os.path.join(BFD_PLUGINS_DIR, 'LLVMgold.so')]) - lto_cflags = ['-flto'] - lto_ldflags = ['-fuse-ld=gold'] + lto_cflags = ['-flto=thin'] + lto_ldflags = ['-fuse-ld=lld'] if args.gcc_toolchain: # Tell the bootstrap compiler to use a specific gcc prefix to search # for standard library headers and shared object files. @@ -589,7 +587,7 @@ RmCmakeCache('.') RunCommand(['cmake'] + lto_cmake_args + [LLVM_DIR], env=lto_env) - RunCommand(['ninja', 'LLVMgold'], env=lto_env) + RunCommand(['ninja', 'LLVMgold', 'lld'], env=lto_env) # LLVM uses C++11 starting in llvm 3.5. On Linux, this means libstdc++4.7+ is @@ -619,6 +617,13 @@ cflags += ['-DLLVM_FORCE_HEAD_REVISION'] cxxflags += ['-DLLVM_FORCE_HEAD_REVISION'] + # Build PDBs for archival on Windows. Don't use RelWithDebInfo since it + # has different optimization defaults than Release. + if sys.platform == 'win32' and args.bootstrap: + cflags += ['/Zi'] + cxxflags += ['/Zi'] + ldflags += ['/DEBUG', '/OPT:REF', '/OPT:ICF'] + CreateChromeToolsShim() deployment_env = None @@ -634,6 +639,7 @@ if cxx is not None: cc_args.append('-DCMAKE_CXX_COMPILER=' + cxx) chrome_tools = list(set(['plugins', 'blink_gc_plugin'] + args.extra_tools)) cmake_args += base_cmake_args + [ + '-DLLVM_ENABLE_THREADS=OFF', '-DLLVM_BINUTILS_INCDIR=' + binutils_incdir, '-DCMAKE_C_FLAGS=' + ' '.join(cflags), '-DCMAKE_CXX_FLAGS=' + ' '.join(cxxflags), @@ -641,9 +647,6 @@ '-DCMAKE_SHARED_LINKER_FLAGS=' + ' '.join(ldflags), '-DCMAKE_MODULE_LINKER_FLAGS=' + ' '.join(ldflags), '-DCMAKE_INSTALL_PREFIX=' + LLVM_BUILD_DIR, - # TODO(thakis): Remove this once official builds pass -Wl,--build-id - # explicitly, https://crbug.com/622775 - '-DENABLE_LINKER_BUILD_ID=ON', '-DCHROMIUM_TOOLS_SRC=%s' % os.path.join(CHROMIUM_DIR, 'tools', 'clang'), '-DCHROMIUM_TOOLS=%s' % ';'.join(chrome_tools)] @@ -663,6 +666,11 @@ RunCommand(['ninja'], msvc_arch='x64') + # Copy LTO-optimized lld, if any. + if args.bootstrap and args.lto_gold_plugin: + CopyFile(os.path.join(LLVM_LTO_GOLD_PLUGIN_DIR, 'bin', 'lld'), + os.path.join(LLVM_BUILD_DIR, 'bin')) + if chrome_tools: # If any Chromium tools were built, install those now. RunCommand(['ninja', 'cr-install'], msvc_arch='x64') @@ -691,6 +699,7 @@ #cflags += ['-m32'] #cxxflags += ['-m32'] compiler_rt_args = base_cmake_args + [ + '-DLLVM_ENABLE_THREADS=OFF', '-DCMAKE_C_FLAGS=' + ' '.join(cflags), '-DCMAKE_CXX_FLAGS=' + ' '.join(cxxflags)] if sys.platform == 'darwin': @@ -793,6 +802,7 @@ '--sysroot=%s/sysroot' % toolchain_dir, '-B%s' % toolchain_dir] android_args = base_cmake_args + [ + '-DLLVM_ENABLE_THREADS=OFF', '-DCMAKE_C_COMPILER=' + os.path.join(LLVM_BUILD_DIR, 'bin/clang'), '-DCMAKE_CXX_COMPILER=' + os.path.join(LLVM_BUILD_DIR, 'bin/clang++'), '-DLLVM_CONFIG_PATH=' + os.path.join(LLVM_BUILD_DIR, 'bin/llvm-config'), @@ -867,6 +877,11 @@ print 'Skipping Clang update (make_clang_dir= was set in GYP_DEFINES).' return 0 + # Get svn if we're going to use it to check the revision or do a local build. + if (use_head_revision or args.llvm_force_head_revision or + args.force_local_build): + AddSvnToPathOnWin() + global CLANG_REVISION, PACKAGE_VERSION if args.print_revision: if use_head_revision or args.llvm_force_head_revision:
diff --git a/tools/copyright_scanner/copyright_scanner.py b/tools/copyright_scanner/copyright_scanner.py index 6e99354..c6118aa 100644 --- a/tools/copyright_scanner/copyright_scanner.py +++ b/tools/copyright_scanner/copyright_scanner.py
@@ -70,13 +70,14 @@ path_join('build', 'goma', 'client'), # Ignore sysroots. path_join('build', 'linux', 'debian_jessie_arm64-sysroot'), + path_join('build', 'linux', 'debian_jessie_arm-sysroot'), + path_join('build', 'linux', 'debian_jessie_mips-sysroot'), + path_join('build', 'linux', 'debian_jessie_i386-sysroot'), path_join('build', 'linux', 'debian_wheezy_amd64-sysroot'), path_join('build', 'linux', 'debian_wheezy_arm-sysroot'), path_join('build', 'linux', 'debian_wheezy_mips-sysroot'), path_join('build', 'linux', 'debian_wheezy_i386-sysroot'), path_join('build', 'linux', 'ubuntu_precise_amd64-sysroot'), - # Old location (TODO(sbc): Remove this once it no longer exists on any bots) - path_join('chrome', 'installer', 'linux', 'debian_wheezy_arm-sysroot'), # Data is not part of open source chromium, but are included on some bots. path_join('data'), # This is not part of open source chromium, but are included on some bots.
diff --git a/tools/cros/OWNERS b/tools/cros/OWNERS index 9dc4e19..51dd6715 100644 --- a/tools/cros/OWNERS +++ b/tools/cros/OWNERS
@@ -5,3 +5,5 @@ tbarzic@chromium.org tengs@chromium.org zelidrag@chromium.org + +# COMPONENT: Speed>Telemetry
diff --git a/tools/cygprofile/profile_android_startup.py b/tools/cygprofile/profile_android_startup.py index 96d1b4c..914f7d19 100755 --- a/tools/cygprofile/profile_android_startup.py +++ b/tools/cygprofile/profile_android_startup.py
@@ -230,7 +230,8 @@ self._device.PushChangedFiles([(self._cygprofile_tests, device_path)]) try: self._device.RunShellCommand(device_path, check_return=True) - except device_errors.CommandFailedError: + except (device_errors.CommandFailedError, + device_errors.DeviceUnreachableError): # TODO(jbudorick): Let the exception propagate up once clients can # handle it. logging.exception('Failure while running cygprofile_unittests:')
diff --git a/tools/determinism/compare_build_artifacts.py b/tools/determinism/compare_build_artifacts.py index 1d398e2..62dae00 100755 --- a/tools/determinism/compare_build_artifacts.py +++ b/tools/determinism/compare_build_artifacts.py
@@ -131,7 +131,7 @@ result = '%d out of %d bytes are different (%.2f%%)' % ( diffs, file_len, 100.0 * diffs / file_len) if streams: - encode = lambda text: ''.join(i if 31 < ord(i) < 128 else '.' for i in text) + encode = lambda text: ''.join(i if 31 < ord(i) < 127 else '.' for i in text) for offset, lhs_data, rhs_data in streams: lhs_line = '%s \'%s\'' % (lhs_data.encode('hex'), encode(lhs_data)) rhs_line = '%s \'%s\'' % (rhs_data.encode('hex'), encode(rhs_data))
diff --git a/tools/git/mass-rename.py b/tools/git/mass-rename.py index 21fbef7..d6aa8efe4 100755 --- a/tools/git/mass-rename.py +++ b/tools/git/mass-rename.py
@@ -28,13 +28,18 @@ out, _ = popen.communicate() if popen.returncode != 0: return 1 - for line in out.splitlines(): + lines = out.splitlines() + for item, line in enumerate(lines, 1): + # Print progress + print '[%d/%d]' % (item, len(lines)), + parts = line.split('\t') if len(parts) != 3: print 'Skipping: %s -- not a rename?' % parts continue attrs, fro, to = parts if attrs.split()[4].startswith('R'): + print 'Moving: %s' % fro subprocess.check_call([ sys.executable, os.path.join(BASE_DIR, 'move_source_file.py'),
diff --git a/tools/gn/BUILD.gn b/tools/gn/BUILD.gn index 1461a79..f65073d 100644 --- a/tools/gn/BUILD.gn +++ b/tools/gn/BUILD.gn
@@ -41,6 +41,7 @@ "command_clean.cc", "command_desc.cc", "command_format.cc", + "command_format.h", "command_gen.cc", "command_help.cc", "command_ls.cc",
diff --git a/tools/gn/analyzer.cc b/tools/gn/analyzer.cc index 559287ef..6e23c345 100644 --- a/tools/gn/analyzer.cc +++ b/tools/gn/analyzer.cc
@@ -59,7 +59,9 @@ bool AnyBuildFilesWereModified(const SourceFileSet& source_files) { for (auto* file : source_files) { if (base::EndsWith(file->value(), ".gn", base::CompareCase::SENSITIVE) || - base::EndsWith(file->value(), ".gni", base::CompareCase::SENSITIVE)) + base::EndsWith(file->value(), ".gni", base::CompareCase::SENSITIVE) || + base::EndsWith(file->value(), "build/vs_toolchain.py", + base::CompareCase::SENSITIVE)) return true; } return false; @@ -262,7 +264,7 @@ // TODO(crbug.com/555273): We can do smarter things when we detect changes // to build files. For example, if all of the ninja files are unchanged, - // we know that we can ignore changes to these files. Also, for most .gn + // we know that we can ignore changes to .gn* files. Also, for most .gn // files, we can treat a change as simply affecting every target, config, // or toolchain defined in that file. if (AnyBuildFilesWereModified(inputs.source_files)) {
diff --git a/tools/gn/bootstrap/OWNERS b/tools/gn/bootstrap/OWNERS index 72e8ffc..21aeec2 100644 --- a/tools/gn/bootstrap/OWNERS +++ b/tools/gn/bootstrap/OWNERS
@@ -1 +1,4 @@ +# It's OK to TBR changes to bootstrap.py that edits the file lists to bring +# them in line with the Chrome build. For more substantial changes, please +# send a normal review. *
diff --git a/tools/gn/bootstrap/bootstrap.py b/tools/gn/bootstrap/bootstrap.py index 38cfb11..8252799 100755 --- a/tools/gn/bootstrap/bootstrap.py +++ b/tools/gn/bootstrap/bootstrap.py
@@ -171,7 +171,8 @@ write_buildflag_header_manually(root_gen_dir, 'base/debug/debugging_flags.h', { 'ENABLE_PROFILING': 'false', - 'ENABLE_MEMORY_TASK_PROFILER': 'false' + 'ENABLE_MEMORY_TASK_PROFILER': 'false', + 'CAN_UNWIND_WITH_FRAME_POINTERS': 'false' }) write_build_date_header(root_gen_dir) @@ -384,6 +385,7 @@ 'base/base_paths.cc', 'base/base_switches.cc', 'base/build_time.cc', + 'base/callback_helpers.cc', 'base/callback_internal.cc', 'base/command_line.cc', 'base/debug/activity_tracker.cc', @@ -471,6 +473,7 @@ 'base/task_scheduler/post_task.cc', 'base/task_scheduler/priority_queue.cc', 'base/task_scheduler/scheduler_lock_impl.cc', + 'base/task_scheduler/scheduler_single_thread_task_runner_manager.cc', 'base/task_scheduler/scheduler_worker.cc', 'base/task_scheduler/scheduler_worker_pool_impl.cc', 'base/task_scheduler/scheduler_worker_pool_params.cc', @@ -515,15 +518,18 @@ 'base/trace_event/memory_allocator_dump.cc', 'base/trace_event/memory_allocator_dump_guid.cc', 'base/trace_event/memory_dump_manager.cc', + 'base/trace_event/memory_dump_provider_info.cc', 'base/trace_event/memory_dump_request_args.cc', 'base/trace_event/memory_dump_scheduler.cc', 'base/trace_event/memory_dump_session_state.cc', 'base/trace_event/memory_infra_background_whitelist.cc', + 'base/trace_event/memory_peak_detector.cc', 'base/trace_event/process_memory_dump.cc', 'base/trace_event/process_memory_maps.cc', 'base/trace_event/process_memory_totals.cc', 'base/trace_event/trace_buffer.cc', 'base/trace_event/trace_config.cc', + 'base/trace_event/trace_config_category_filter.cc', 'base/trace_event/trace_event_argument.cc', 'base/trace_event/trace_event_filter.cc', 'base/trace_event/trace_event_impl.cc', @@ -605,10 +611,12 @@ 'base/allocator/allocator_shim.cc', 'base/allocator/allocator_shim_default_dispatch_to_glibc.cc', 'base/memory/shared_memory_posix.cc', + 'base/memory/shared_memory_tracker.cc', 'base/nix/xdg_util.cc', 'base/process/internal_linux.cc', 'base/process/memory_linux.cc', 'base/process/process_handle_linux.cc', + 'base/process/process_info_linux.cc', 'base/process/process_iterator_linux.cc', 'base/process/process_linux.cc', 'base/process/process_metrics_linux.cc', @@ -645,6 +653,7 @@ 'base/message_loop/message_pump_mac.mm', 'base/metrics/field_trial.cc', 'base/process/process_handle_mac.cc', + 'base/process/process_info_mac.cc', 'base/process/process_iterator_mac.cc', 'base/process/process_metrics_mac.cc', 'base/strings/sys_string_conversions_mac.mm',
diff --git a/tools/gn/command_desc.cc b/tools/gn/command_desc.cc index 8e4ebd7..8dbe6de 100644 --- a/tools/gn/command_desc.cc +++ b/tools/gn/command_desc.cc
@@ -39,7 +39,7 @@ bool bool_value = false; if (value->GetAsList(&list_value)) { for (const auto& v : *list_value) { - PrintValue(v.get(), indentLevel); + PrintValue(&v, indentLevel); } } else if (value->GetAsString(&string_value)) { OutputString(indent);
diff --git a/tools/gn/command_gen.cc b/tools/gn/command_gen.cc index 26fc729..194cace3 100644 --- a/tools/gn/command_gen.cc +++ b/tools/gn/command_gen.cc
@@ -36,6 +36,7 @@ const char kSwitchIdeValueVs[] = "vs"; const char kSwitchIdeValueVs2013[] = "vs2013"; const char kSwitchIdeValueVs2015[] = "vs2015"; +const char kSwitchIdeValueVs2017[] = "vs2017"; const char kSwitchIdeValueXcode[] = "xcode"; const char kSwitchIdeValueJson[] = "json"; const char kSwitchNinjaExtraArgs[] = "ninja-extra-args"; @@ -193,10 +194,13 @@ } return res; } else if (ide == kSwitchIdeValueVs || ide == kSwitchIdeValueVs2013 || - ide == kSwitchIdeValueVs2015) { - VisualStudioWriter::Version version = - ide == kSwitchIdeValueVs2013 ? VisualStudioWriter::Version::Vs2013 - : VisualStudioWriter::Version::Vs2015; + ide == kSwitchIdeValueVs2015 || ide == kSwitchIdeValueVs2017) { + VisualStudioWriter::Version version = VisualStudioWriter::Version::Vs2015; + if (ide == kSwitchIdeValueVs2013) + version = VisualStudioWriter::Version::Vs2013; + else if (ide == kSwitchIdeValueVs2017) + version = VisualStudioWriter::Version::Vs2017; + std::string sln_name; if (command_line->HasSwitch(kSwitchSln)) sln_name = command_line->GetSwitchValueASCII(kSwitchSln); @@ -293,6 +297,7 @@ (default Visual Studio version: 2015) "vs2013" - Visual Studio 2013 project/solution files. "vs2015" - Visual Studio 2015 project/solution files. + "vs2017" - Visual Studio 2017 project/solution files. "xcode" - Xcode workspace/solution files. "qtcreator" - QtCreator project files. "json" - JSON file containing target information
diff --git a/tools/gn/command_help.cc b/tools/gn/command_help.cc index 62ce6d3e..eb13456 100644 --- a/tools/gn/command_help.cc +++ b/tools/gn/command_help.cc
@@ -29,39 +29,37 @@ namespace { void PrintToplevelHelp() { - OutputString("Commands (type \"gn help <command>\" for more details):\n"); + PrintSectionHelp("Commands", "<command>", "commands"); for (const auto& cmd : commands::GetCommands()) PrintShortHelp(cmd.second.help_short); // Target declarations. - OutputString("\nTarget declarations (type \"gn help <function>\" for more " - "details):\n"); + PrintSectionHelp("Target declarations", "<function>", "targets"); for (const auto& func : functions::GetFunctions()) { if (func.second.is_target) PrintShortHelp(func.second.help_short); } // Functions. - OutputString("\nBuildfile functions (type \"gn help <function>\" for more " - "details):\n"); + PrintSectionHelp("Buildfile functions", "<function>", "functions"); for (const auto& func : functions::GetFunctions()) { if (!func.second.is_target) PrintShortHelp(func.second.help_short); } // Built-in variables. - OutputString("\nBuilt-in predefined variables (type \"gn help <variable>\" " - "for more details):\n"); + PrintSectionHelp("Built-in predefined variables", "<variable>", + "predefined_variables"); for (const auto& builtin : variables::GetBuiltinVariables()) PrintShortHelp(builtin.second.help_short); // Target variables. - OutputString("\nVariables you set in targets (type \"gn help <variable>\" " - "for more details):\n"); + PrintSectionHelp("Variables you set in targets", "<variable>", + "target_variables"); for (const auto& target : variables::GetTargetVariables()) PrintShortHelp(target.second.help_short); - OutputString("\nOther help topics:\n"); + PrintSectionHelp("Other help topics", "", "other"); PrintShortHelp("all: Print all the help at once"); PrintShortHelp("buildargs: How build arguments work."); PrintShortHelp("dotfile: Info about the toplevel .gn file."); @@ -80,7 +78,7 @@ void PrintSwitchHelp() { const base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess(); - bool use_markdown = cmdline->HasSwitch(switches::kMarkdown); + bool is_markdown = cmdline->HasSwitch(switches::kMarkdown); OutputString("Available global switches\n", DECORATION_YELLOW); OutputString( @@ -88,57 +86,87 @@ " commands may take command-specific switches not listed here. See the\n" " help on your specific command for more.\n\n"); - if (use_markdown) - OutputString("```\n\n", DECORATION_NONE); + if (is_markdown) + OutputString("```\n", DECORATION_NONE); for (const auto& s : switches::GetSwitches()) PrintShortHelp(s.second.short_help); - if (use_markdown) - OutputString("\n```\n", DECORATION_NONE); + if (is_markdown) + OutputString("```\n", DECORATION_NONE); + + OutputString("\n"); } void PrintAllHelp() { const base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess(); - if (cmdline->HasSwitch(switches::kMarkdown)) { - OutputString("# GN Reference\n\n"); + bool is_markdown = cmdline->HasSwitch(switches::kMarkdown); - // TODO: https://code.google.com/p/gitiles/issues/detail?id=75 - // Gitiles crashes when rendering the table of contents, so we must omit - // it until the bug is fixed. - // OutputString("[TOC]\n\n"); + if (is_markdown) { + OutputString("# GN Reference\n\n"); OutputString("*This page is automatically generated from* " "`gn help --markdown all`.\n\n"); - } else { - PrintToplevelHelp(); + + // Generate our own table of contents so that we have more control + // over what's in and out. + OutputString("## Contents\n\n"); } - for (const auto& s : switches::GetSwitches()) - PrintLongHelp(s.second.long_help); + PrintToplevelHelp(); + OutputString("\n"); + + if (is_markdown) + OutputString("## <a name=\"commands\"></a>Commands\n\n"); for (const auto& c: commands::GetCommands()) PrintLongHelp(c.second.help); - for (const auto& f: functions::GetFunctions()) - PrintLongHelp(f.second.help); + if (is_markdown) + OutputString("## <a name=\"targets\"></a>Target declarations\n\n"); + for (const auto& f : functions::GetFunctions()) { + if (f.second.is_target) + PrintLongHelp(f.second.help); + } + if (is_markdown) + OutputString("## <a name=\"functions\"></a>Buildfile functions\n\n"); + for (const auto& f : functions::GetFunctions()) { + if (!f.second.is_target) + PrintLongHelp(f.second.help); + } + + if (is_markdown) { + OutputString( + "## <a name=\"predefined_variables\"></a>" + "Built-in predefined variables\n\n"); + } for (const auto& v: variables::GetBuiltinVariables()) PrintLongHelp(v.second.help); + if (is_markdown) { + OutputString( + "## <a name=\"target_variables\"></a>" + "Variables you set in targets\n\n"); + } for (const auto& v: variables::GetTargetVariables()) PrintLongHelp(v.second.help); - PrintLongHelp(kBuildArgs_Help); - PrintLongHelp(kDotfile_Help); - PrintLongHelp(kExecution_Help); - PrintLongHelp(kGrammar_Help); - PrintLongHelp(kInputConversion_Help); - PrintLongHelp(kLabelPattern_Help); - PrintLongHelp(kLabels_Help); - PrintLongHelp(kNinjaRules_Help); - PrintLongHelp(kNoGnCheck_Help); - PrintLongHelp(kRuntimeDeps_Help); - PrintLongHelp(kSourceExpansion_Help); + if (is_markdown) + OutputString("## <a name=\"other\"></a>Other help topics\n\n"); + PrintLongHelp(kBuildArgs_Help, "buildargs"); + PrintLongHelp(kDotfile_Help, "dotfile"); + PrintLongHelp(kExecution_Help, "execution"); + PrintLongHelp(kGrammar_Help, "grammar"); + PrintLongHelp(kInputConversion_Help, "input_conversion"); + PrintLongHelp(kLabelPattern_Help, "label_pattern"); + PrintLongHelp(kLabels_Help, "labels"); + PrintLongHelp(kNinjaRules_Help, "ninja_rules"); + PrintLongHelp(kNoGnCheck_Help, "nogncheck"); + PrintLongHelp(kRuntimeDeps_Help, "runtime_deps"); + PrintLongHelp(kSourceExpansion_Help, "source_expansion"); + + if (is_markdown) + OutputString("## <a name=\"switches\"></a>Command Line Switches\n\n"); PrintSwitchHelp(); }
diff --git a/tools/gn/commands.cc b/tools/gn/commands.cc index 39dd079..e9691aa 100644 --- a/tools/gn/commands.cc +++ b/tools/gn/commands.cc
@@ -515,7 +515,7 @@ FilterAndPrintTargets(targets, &tmp); for (const auto& value : tmp) { std::string string; - value->GetAsString(&string); + value.GetAsString(&string); if (indent) OutputString(" "); OutputString(string);
diff --git a/tools/gn/desc_builder.cc b/tools/gn/desc_builder.cc index c04fad6..965ec92 100644 --- a/tools/gn/desc_builder.cc +++ b/tools/gn/desc_builder.cc
@@ -122,17 +122,17 @@ } ValuePtr RenderValue(const std::string& s, bool optional = false) { - return (s.empty() && optional) ? base::Value::CreateNullValue() + return (s.empty() && optional) ? base::MakeUnique<base::Value>() : ValuePtr(new base::Value(s)); } ValuePtr RenderValue(const SourceDir& d) { - return d.is_null() ? base::Value::CreateNullValue() + return d.is_null() ? base::MakeUnique<base::Value>() : ValuePtr(new base::Value(FormatSourceDir(d))); } ValuePtr RenderValue(const SourceFile& f) { - return f.is_null() ? base::Value::CreateNullValue() + return f.is_null() ? base::MakeUnique<base::Value>() : ValuePtr(new base::Value(f.value())); }
diff --git a/tools/gn/docs/reference.md b/tools/gn/docs/reference.md index db5c341..9c318b8e 100644 --- a/tools/gn/docs/reference.md +++ b/tools/gn/docs/reference.md
@@ -2,249 +2,147 @@ *This page is automatically generated from* `gn help --markdown all`. -## **\--args**: Specifies build arguments overrides. +## Contents -``` - See "gn help buildargs" for an overview of how build arguments work. +* [Commands](#commands) + * [analyze: Analyze which targets are affected by a list of files.](#analyze) + * [args: Display or configure arguments declared by the build.](#args) + * [check: Check header dependencies.](#check) + * [clean: Cleans the output directory.](#clean) + * [desc: Show lots of insightful information about a target or config.](#desc) + * [format: Format .gn file.](#format) + * [gen: Generate ninja files.](#gen) + * [help: Does what you think.](#help) + * [ls: List matching targets.](#ls) + * [path: Find paths between two targets.](#path) + * [refs: Find stuff referencing a target or file.](#refs) +* [Target declarations](#targets) + * [action: Declare a target that runs a script a single time.](#action) + * [action_foreach: Declare a target that runs a script over a set of files.](#action_foreach) + * [bundle_data: [iOS/OS X] Declare a target without output.](#bundle_data) + * [copy: Declare a target that copies files.](#copy) + * [create_bundle: [iOS/OS X] Build an OS X / iOS bundle.](#create_bundle) + * [executable: Declare an executable target.](#executable) + * [group: Declare a named group of targets.](#group) + * [loadable_module: Declare a loadable module target.](#loadable_module) + * [shared_library: Declare a shared library target.](#shared_library) + * [source_set: Declare a source set target.](#source_set) + * [static_library: Declare a static library target.](#static_library) + * [target: Declare an target with the given programmatic type.](#target) +* [Buildfile functions](#functions) + * [assert: Assert an expression is true at generation time.](#assert) + * [config: Defines a configuration object.](#config) + * [declare_args: Declare build arguments.](#declare_args) + * [defined: Returns whether an identifier is defined.](#defined) + * [exec_script: Synchronously run a script and return the output.](#exec_script) + * [foreach: Iterate over a list.](#foreach) + * [forward_variables_from: Copies variables from a different scope.](#forward_variables_from) + * [get_label_info: Get an attribute from a target's label.](#get_label_info) + * [get_path_info: Extract parts of a file or directory name.](#get_path_info) + * [get_target_outputs: [file list] Get the list of outputs from a target.](#get_target_outputs) + * [getenv: Get an environment variable.](#getenv) + * [import: Import a file into the current scope.](#import) + * [pool: Defines a pool object.](#pool) + * [print: Prints to the console.](#print) + * [process_file_template: Do template expansion over a list of files.](#process_file_template) + * [read_file: Read a file into a variable.](#read_file) + * [rebase_path: Rebase a file or directory to another location.](#rebase_path) + * [set_default_toolchain: Sets the default toolchain name.](#set_default_toolchain) + * [set_defaults: Set default values for a target type.](#set_defaults) + * [set_sources_assignment_filter: Set a pattern to filter source files.](#set_sources_assignment_filter) + * [split_list: Splits a list into N different sub-lists.](#split_list) + * [template: Define a template rule.](#template) + * [tool: Specify arguments to a toolchain tool.](#tool) + * [toolchain: Defines a toolchain.](#toolchain) + * [write_file: Write a file to disk.](#write_file) +* [Built-in predefined variables](#predefined_variables) + * [current_cpu: [string] The processor architecture of the current toolchain.](#current_cpu) + * [current_os: [string] The operating system of the current toolchain.](#current_os) + * [current_toolchain: [string] Label of the current toolchain.](#current_toolchain) + * [default_toolchain: [string] Label of the default toolchain.](#default_toolchain) + * [host_cpu: [string] The processor architecture that GN is running on.](#host_cpu) + * [host_os: [string] The operating system that GN is running on.](#host_os) + * [invoker: [string] The invoking scope inside a template.](#invoker) + * [python_path: [string] Absolute path of Python.](#python_path) + * [root_build_dir: [string] Directory where build commands are run.](#root_build_dir) + * [root_gen_dir: [string] Directory for the toolchain's generated files.](#root_gen_dir) + * [root_out_dir: [string] Root directory for toolchain output files.](#root_out_dir) + * [target_cpu: [string] The desired cpu architecture for the build.](#target_cpu) + * [target_gen_dir: [string] Directory for a target's generated files.](#target_gen_dir) + * [target_name: [string] The name of the current target.](#target_name) + * [target_os: [string] The desired operating system for the build.](#target_os) + * [target_out_dir: [string] Directory for target output files.](#target_out_dir) +* [Variables you set in targets](#target_variables) + * [all_dependent_configs: [label list] Configs to be forced on dependents.](#all_dependent_configs) + * [allow_circular_includes_from: [label list] Permit includes from deps.](#allow_circular_includes_from) + * [arflags: [string list] Arguments passed to static_library archiver.](#arflags) + * [args: [string list] Arguments passed to an action.](#args) + * [asmflags: [string list] Flags passed to the assembler.](#asmflags) + * [assert_no_deps: [label pattern list] Ensure no deps on these targets.](#assert_no_deps) + * [bundle_deps_filter: [label list] A list of labels that are filtered out.](#bundle_deps_filter) + * [bundle_executable_dir: Expansion of {{bundle_executable_dir}} in create_bundle](#bundle_executable_dir) + * [bundle_plugins_dir: Expansion of {{bundle_plugins_dir}} in create_bundle.](#bundle_plugins_dir) + * [bundle_resources_dir: Expansion of {{bundle_resources_dir}} in create_bundle.](#bundle_resources_dir) + * [bundle_root_dir: Expansion of {{bundle_root_dir}} in create_bundle.](#bundle_root_dir) + * [cflags: [string list] Flags passed to all C compiler variants.](#cflags) + * [cflags_c: [string list] Flags passed to the C compiler.](#cflags_c) + * [cflags_cc: [string list] Flags passed to the C++ compiler.](#cflags_cc) + * [cflags_objc: [string list] Flags passed to the Objective C compiler.](#cflags_objc) + * [cflags_objcc: [string list] Flags passed to the Objective C++ compiler.](#cflags_objcc) + * [check_includes: [boolean] Controls whether a target's files are checked.](#check_includes) + * [code_signing_args: [string list] Arguments passed to code signing script.](#code_signing_args) + * [code_signing_outputs: [file list] Output files for code signing step.](#code_signing_outputs) + * [code_signing_script: [file name] Script for code signing.](#code_signing_script) + * [code_signing_sources: [file list] Sources for code signing step.](#code_signing_sources) + * [complete_static_lib: [boolean] Links all deps into a static library.](#complete_static_lib) + * [configs: [label list] Configs applying to this target or config.](#configs) + * [console: [boolean] Run this action in the console pool.](#console) + * [data: [file list] Runtime data file dependencies.](#data) + * [data_deps: [label list] Non-linked dependencies.](#data_deps) + * [defines: [string list] C preprocessor defines.](#defines) + * [depfile: [string] File name for input dependencies for actions.](#depfile) + * [deps: [label list] Private linked dependencies.](#deps) + * [include_dirs: [directory list] Additional include directories.](#include_dirs) + * [inputs: [file list] Additional compile-time dependencies.](#inputs) + * [ldflags: [string list] Flags passed to the linker.](#ldflags) + * [lib_dirs: [directory list] Additional library directories.](#lib_dirs) + * [libs: [string list] Additional libraries to link.](#libs) + * [output_dir: [directory] Directory to put output file in.](#output_dir) + * [output_extension: [string] Value to use for the output's file extension.](#output_extension) + * [output_name: [string] Name for the output file other than the default.](#output_name) + * [output_prefix_override: [boolean] Don't use prefix for output name.](#output_prefix_override) + * [outputs: [file list] Output files for actions and copy targets.](#outputs) + * [precompiled_header: [string] Header file to precompile.](#precompiled_header) + * [precompiled_header_type: [string] "gcc" or "msvc".](#precompiled_header_type) + * [precompiled_source: [file name] Source file to precompile.](#precompiled_source) + * [product_type: [string] Product type for Xcode projects.](#product_type) + * [public: [file list] Declare public header files for a target.](#public) + * [public_configs: [label list] Configs applied to dependents.](#public_configs) + * [public_deps: [label list] Declare public dependencies.](#public_deps) + * [response_file_contents: [string list] Contents of .rsp file for actions.](#response_file_contents) + * [script: [file name] Script file for actions.](#script) + * [sources: [file list] Source files for a target.](#sources) + * [testonly: [boolean] Declares a target must only be used for testing.](#testonly) + * [visibility: [label list] A list of labels that can depend on a target.](#visibility) + * [write_runtime_deps: Writes the target's runtime_deps to the given path.](#write_runtime_deps) +* [Other help topics](#other) + * [all: Print all the help at once](#all) + * [buildargs: How build arguments work.](#buildargs) + * [dotfile: Info about the toplevel .gn file.](#dotfile) + * [execution: Build graph and execution overview.](#execution) + * [grammar: Language and grammar for GN build files.](#grammar) + * [input_conversion: Processing input from exec_script and read_file.](#input_conversion) + * [label_pattern: Matching more than one label.](#label_pattern) + * [labels: About labels.](#labels) + * [ninja_rules: How Ninja build rules are named.](#ninja_rules) + * [nogncheck: Annotating includes for checking.](#nogncheck) + * [runtime_deps: How runtime dependency computation works.](#runtime_deps) + * [source_expansion: Map sources to outputs for scripts.](#source_expansion) + * [switches: Show available command-line switches.](#switches) - Most operations take a build directory. The build arguments are taken from - the previous build done in that directory. If a command specifies --args, it - will override the previous arguments stored in the build directory, and use - the specified ones. +## <a name="commands"></a>Commands - The args specified will be saved to the build directory for subsequent - commands. Specifying --args="" will clear all build arguments. - -``` - -### **Formatting** - -``` - The value of the switch is interpreted in GN syntax. For typical usage of - string arguments, you will need to be careful about escaping of quotes. - -``` - -### **Examples** - -``` - gn gen out/Default --args="foo=\"bar\"" - - gn gen out/Default --args='foo="bar" enable=true blah=7' - - gn check out/Default --args="" - Clears existing build args from the directory. - - gn desc out/Default --args="some_list=[1, false, \"foo\"]" - - -``` -## **\--[no]color**: Forces colored output on or off. - -``` - Normally GN will try to detect whether it is outputting to a terminal - and will enable or disable color accordingly. Use of these switches - will override the default. - -``` - -### **Examples** - -``` - gn gen out/Default --color - - gn gen out/Default --nocolor - - -``` -## **\--dotfile**: Override the name of the ".gn" file. - -``` - Normally GN loads the ".gn"file from the source root for some basic - configuration (see "gn help dotfile"). This flag allows you to - use a different file. - - Note that this interacts with "--root" in a possibly incorrect way. - It would be nice to test the edge cases and document or fix. - - -``` -## **\--fail-on-unused-args**: Treat unused build args as fatal errors. - -``` - If you set a value in a build's "gn args" and never use it in the build (in - a declare_args() block), GN will normally print an error but not fail the - build. - - In many cases engineers would use build args to enable or disable features - that would sometimes get removed. It would by annoying to block work for - typically benign problems. In Chrome in particular, flags might be configured - for build bots in a separate infrastructure repository, or a declare_args - block might be changed in a third party repository. Treating these errors as - blocking forced complex multi- way patches to land what would otherwise be - simple changes. - - In some cases, such concerns are not as important, and a mismatch in build - flags between the invoker of the build and the build files represents a - critical mismatch that should be immediately fixed. Such users can set this - flag to force GN to fail in that case. - - -``` -## **\--markdown**: Write help output in the Markdown format. - -## **\--[no]color**: Forces colored output on or off. - -``` - Normally GN will try to detect whether it is outputting to a terminal - and will enable or disable color accordingly. Use of these switches - will override the default. - -``` - -### **Examples** - -``` - gn gen out/Default --color - - gn gen out/Default --nocolor - - -``` -## **-q**: Quiet mode. Don't print output on success. - -``` - This is useful when running as a part of another script. - - -``` -## **\--root**: Explicitly specify source root. - -``` - Normally GN will look up in the directory tree from the current directory to - find a ".gn" file. The source root directory specifies the meaning of "//" - beginning with paths, and the BUILD.gn file in that directory will be the - first thing loaded. - - Specifying --root allows GN to do builds in a specific directory regardless - of the current directory. - -``` - -### **Examples** - -``` - gn gen //out/Default --root=/home/baracko/src - - gn desc //out/Default --root="C:\Users\BObama\My Documents\foo" - - -``` -## **\--runtime-deps-list-file**: Save runtime dependencies for targets in file. - -``` - --runtime-deps-list-file=<filename> - - Where <filename> is a text file consisting of the labels, one per line, of - the targets for which runtime dependencies are desired. - - See "gn help runtime_deps" for a description of how runtime dependencies are - computed. - -``` - -### **Runtime deps output file** - -``` - For each target requested, GN will write a separate runtime dependency file. - The runtime dependency file will be in the output directory alongside the - output file of the target, with a ".runtime_deps" extension. For example, if - the target "//foo:bar" is listed in the input file, and that target produces - an output file "bar.so", GN will create a file "bar.so.runtime_deps" in the - build directory. - - If a source set, action, copy, or group is listed, the runtime deps file will - correspond to the .stamp file corresponding to that target. This is probably - not useful; the use-case for this feature is generally executable targets. - - The runtime dependency file will list one file per line, with no escaping. - The files will be relative to the root_build_dir. The first line of the file - will be the main output file of the target itself (in the above example, - "bar.so"). - - -``` -## **\--script-executable**: Set the executable used to execute scripts. - -``` - By default GN searches the PATH for Python to execute scripts in action - targets and exec_script calls. This flag allows the specification of a - specific Python executable or potentially a different language - interpreter. - - -``` -## **\--threads**: Specify number of worker threads. - -``` - GN runs many threads to load and run build files. This can make debugging - challenging. Or you may want to experiment with different values to see how - it affects performance. - - The parameter is the number of worker threads. This does not count the main - thread (so there are always at least two). - -``` - -### **Examples** - -``` - gen gen out/Default --threads=1 - - -``` -## **\--time**: Outputs a summary of how long everything took. - -``` - Hopefully self-explanatory. - -``` - -### **Examples** - -``` - gn gen out/Default --time - - -``` -## **\--tracelog**: Writes a Chrome-compatible trace log to the given file. - -``` - The trace log will show file loads, executions, scripts, and writes. This - allows performance analysis of the generation step. - - To view the trace, open Chrome and navigate to "chrome://tracing/", then - press "Load" and specify the file you passed to this parameter. - -``` - -### **Examples** - -``` - gn gen out/Default --tracelog=mytrace.trace - - -``` -## **-v**: Verbose logging. - -``` - This will spew logging events to the console for debugging issues. - - Good luck! - - -``` -## **gn analyze <out_dir> <input_path> <output_path>** +### <a name="analyze"></a>**gn analyze <out_dir> <input_path> <output_path>** ``` Analyze which targets are affected by a list of files. @@ -313,18 +211,15 @@ "error" key is non-empty and a non-fatal error occurred. In other words, it tries really hard to always write something to the output JSON and convey errors that way rather than via return codes. - - ``` -## **gn args <out_dir> [\--list] [\--short] [\--args]** +### <a name="args"></a>**gn args <out_dir> [\--list] [\--short] [\--args]** ``` See also "gn help buildargs" for a more high-level overview of how build arguments work. - ``` -### **Usage** +#### **Usage** ``` gn args <out_dir> @@ -353,10 +248,9 @@ If --short is specified, only the names and current values will be printed. - ``` -### **Examples** +#### **Examples** ``` gn args out/Debug @@ -375,10 +269,8 @@ Prints all arguments with the default values for a build with the given arguments set (which may affect the values of other arguments). - - ``` -## **gn check <out_dir> [<label_pattern>] [\--force]** +### <a name="check"></a>**gn check <out_dir> [<label_pattern>] [\--force]** ``` GN's include header checker validates that the includes for C-like source @@ -391,19 +283,17 @@ The <label_pattern> can take exact labels or patterns that match more than one (although not general regular expressions). If specified, only those matching targets will be checked. See "gn help label_pattern" for details. - ``` -### **Command-specific switches** +#### **Command-specific switches** ``` --force Ignores specifications of "check_includes = false" and checks all target's files that match the target label. - ``` -### **What gets checked** +#### **What gets checked** ``` The .gn file may specify a list of targets to be checked. Only these targets @@ -456,10 +346,9 @@ - A target can include headers from a target that depends on it if the other target is annotated accordingly. See "gn help allow_circular_includes_from". - ``` -### **Advice on fixing problems** +#### **Advice on fixing problems** ``` If you have a third party project that uses relative includes, it's generally @@ -484,10 +373,9 @@ In rare cases it makes sense to list a header in more than one target if it could be considered conceptually a member of both. - ``` -### **Examples** +#### **Examples** ``` gn check out/Debug @@ -498,19 +386,15 @@ gn check out/Default "//foo/* Check only the files in targets in the //foo directory tree. - - ``` -## **gn clean <out_dir>** +### <a name="clean"></a>**gn clean <out_dir>** ``` Deletes the contents of the output directory except for args.gn and creates a Ninja build environment sufficient to regenerate the build. - - ``` -## **gn desc <out_dir> <label or pattern> [<what to show>] [\--blame] "** -### **[\--format=json]** +### <a name="desc"></a>**gn desc <out_dir> <label or pattern> [<what to show>] [\--blame] "** +#### **[\--format=json]** ``` Displays information about a given target or config. The build build @@ -519,10 +403,9 @@ The <label or pattern> can be a target label, a config label, or a label pattern (see "gn help label_pattern"). A label pattern will only match targets. - ``` -### **Possibilities for <what to show>** +#### **Possibilities for <what to show>** ``` (If unspecified an overall summary will be displayed.) @@ -560,10 +443,9 @@ The output is a list of file names relative to the build directory. See "gn help runtime_deps" for how this is computed. This also works with "--blame" to see the source of the dependency. - ``` -### **Shared flags** +#### **Shared flags** ``` --all-toolchains Normally only inputs in the default toolchain will be included. @@ -576,10 +458,9 @@ --format=json Format the output as JSON instead of text. - ``` -### **Target flags** +#### **Target flags** ``` --blame @@ -587,10 +468,9 @@ cause that target to get the flag. This doesn't currently work for libs and lib_dirs because those are inherited and are more complicated to figure out the blame (patches welcome). - ``` -### **Configs** +#### **Configs** ``` The "configs" section will list all configs that apply. For targets this will @@ -598,19 +478,17 @@ configs pushed onto this target via public or "all dependent" configs. Configs can have child configs. Specifying --tree will show the hierarchy. - ``` -### **Printing outputs** +#### **Printing outputs** ``` The "outputs" section will list all outputs that apply, including the outputs computed from the tool definition (eg for "executable", "static_library", ... targets). - ``` -### **Printing deps** +#### **Printing deps** ``` Deps will include all public, private, and data deps (TODO this could be @@ -651,17 +529,16 @@ unspecified, no filtering will be performed. ``` -### **Note** +#### **Note** ``` This command will show the full name of directories and source files, but when directories and source paths are written to the build file, they will be adjusted to be relative to the build directory. So the values for paths displayed by this command won't match (but should mean the same thing). - ``` -### **Examples** +#### **Examples** ``` gn desc out/Debug //base:base @@ -674,10 +551,8 @@ gn desc out/Debug //base defines --blame Shows defines set for the //base:base target, annotated by where each one was set from. - - ``` -## **gn format [\--dump-tree] (\--stdin | <build_file>)** +### <a name="format"></a>**gn format [\--dump-tree] (\--stdin | <build_file>)** ``` Formats .gn file to a standard format. @@ -691,10 +566,9 @@ "z.cc", "a.cc", ] - ``` -### **Arguments** +#### **Arguments** ``` --dry-run @@ -712,19 +586,16 @@ --stdin Read input from stdin and write to stdout rather than update a file in-place. - ``` -### **Examples** +#### **Examples** ``` gn format //some/BUILD.gn gn format some\\BUILD.gn gn format /abspath/some/BUILD.gn gn format --stdin - - ``` -## **gn gen**: Generate ninja files. +### <a name="gen:"></a>**gn gen**: Generate ninja files. ``` gn gen [<ide options>] <out_dir> @@ -738,10 +609,9 @@ out/foo See "gn help switches" for the common command-line switches. - ``` -### **IDE options** +#### **IDE options** ``` GN optionally generates files for IDE. Possibilities for <ide options> @@ -753,6 +623,7 @@ (default Visual Studio version: 2015) "vs2013" - Visual Studio 2013 project/solution files. "vs2015" - Visual Studio 2015 project/solution files. + "vs2017" - Visual Studio 2017 project/solution files. "xcode" - Xcode workspace/solution files. "qtcreator" - QtCreator project files. "json" - JSON file containing target information @@ -762,10 +633,9 @@ generated projects (see "gn help label_pattern"). Only matching targets and their dependencies will be included in the solution. Only used for Visual Studio, Xcode and JSON. - ``` -### **Visual Studio Flags** +#### **Visual Studio Flags** ``` --sln=<file_name> @@ -775,10 +645,9 @@ --no-deps Don't include targets dependencies to the solution. Changes the way how --filters option works. Only directly matching targets are included. - ``` -### **Xcode Flags** +#### **Xcode Flags** ``` --workspace=<file_name> @@ -793,21 +662,18 @@ --root-target=<target_name> Name of the target corresponding to "All" target in Xcode. If unset, "All" invokes ninja without any target and builds everything. - ``` -### **QtCreator Flags** +#### **QtCreator Flags** ``` --root-target=<target_name> Name of the root target for which the QtCreator project will be generated to contain files of it and its dependencies. If unset, the whole build graph will be emitted. - - ``` -### **Eclipse IDE Support** +#### **Eclipse IDE Support** ``` GN DOES NOT generate Eclipse CDT projects. Instead, it generates a settings @@ -817,10 +683,9 @@ for each file individually. Instead, one set of includes/defines is generated for the entire project. This works fairly well but may still result in a few indexer issues here and there. - ``` -### **Generic JSON Output** +#### **Generic JSON Output** ``` Dumps target information to JSON file and optionally invokes python script on @@ -838,36 +703,30 @@ --json-ide-script-args=<argument> Optional second argument that will passed to executed script. - - ``` -## **gn help <anything>** +### <a name="help"></a>**gn help <anything>** ``` Yo dawg, I heard you like help on your help so I put help on the help in the help. You can also use "all" as the parameter to get all help at once. - ``` -### **Switches** +#### **Switches** ``` --markdown Format output in markdown syntax. - ``` -### **Example** +#### **Example** ``` gn help --markdown all Dump all help to stdout in markdown format. - - ``` -## **gn ls <out_dir> [<label_pattern>] [\--all-toolchains] [\--as=...]** +### <a name="ls"></a>**gn ls <out_dir> [<label_pattern>] [\--all-toolchains] [\--as=...]** ``` [--type=...] [--testonly=...] @@ -878,10 +737,9 @@ If the label pattern is unspecified, list all targets. The label pattern is not a general regular expression (see "gn help label_pattern"). If you need more complex expressions, pipe the result through grep. - ``` -### **Options** +#### **Options** ``` --as=(buildfile|label|output) @@ -914,10 +772,9 @@ source_set|static_library) Restrict outputs to targets matching the given type. If unspecified, no filtering will be performed. - ``` -### **Examples** +#### **Examples** ``` gn ls out/Debug @@ -941,10 +798,8 @@ gn ls out/Debug //base --all-toolchains Lists all variants of the target //base:base (it may be referenced in multiple toolchains). - - ``` -## **gn path <out_dir> <target_one> <target_two>** +### <a name="path"></a>**gn path <out_dir> <target_one> <target_two>** ``` Finds paths of dependencies between two targets. Each unique path will be @@ -957,20 +812,18 @@ shortest path using either public or private dependencies will be printed. If --with-data is specified, data deps will also be considered. If there are multiple shortest paths, an arbitrary one will be selected. - ``` -### **Interesting paths** +#### **Interesting paths** ``` In a large project, there can be 100's of millions of unique paths between a very high level and a common low-level target. To make the output more useful (and terminate in a reasonable time), GN will not revisit sub-paths previously known to lead to the target. - ``` -### **Options** +#### **Options** ``` --all @@ -984,17 +837,14 @@ --with-data Additionally follows data deps. Without this flag, only public and private linked deps will be followed. Can't be used with --public. - ``` -### **Example** +#### **Example** ``` gn path out/Default //base //tools/gn - - ``` -## **gn refs <out_dir> (<label_pattern>|<label>|<file>|@<response_file>)*** +### <a name="refs"></a>**gn refs <out_dir> (<label_pattern>|<label>|<file>|@<response_file>)*** ``` [--all] [--all-toolchains] [--as=...] [--testonly=...] [--type=...] @@ -1019,10 +869,9 @@ a path to a file containing a list of labels or file names, one per line. This allows us to handle long lists of inputs without worrying about command line limits. - ``` -### **Options** +#### **Options** ``` --all @@ -1073,11 +922,9 @@ source_set|static_library) Restrict outputs to targets matching the given type. If unspecified, no filtering will be performed. - - ``` -### **Examples (target input)** +#### **Examples (target input)** ``` gn refs out/Debug //tools/gn:gn @@ -1099,10 +946,9 @@ gn refs out/Debug //base --tree Print a reverse dependency tree of //base:base - ``` -### **Examples (file input)** +#### **Examples (file input)** ``` gn refs out/Debug //base/macros.h @@ -1120,19 +966,18 @@ --all --as=output Display the executable file names of all test executables potentially affected by a change to the given file. - - ``` -## **action**: Declare a target that runs a script a single time. +## <a name="targets"></a>Target declarations + +### <a name="action"></a>**action**: Declare a target that runs a script a single time. ``` This target type allows you to run a script a single time to produce one or more output files. If you want to run a script once for each of a set of input files, see "gn help action_foreach". - ``` -### **Inputs** +#### **Inputs** ``` In an action the "sources" and "inputs" are treated the same: they're both @@ -1159,10 +1004,9 @@ action is built, but may not have completed before all steps of the action are started. This can give additional parallelism in the build for runtime-only dependencies. - ``` -### **Outputs** +#### **Outputs** ``` You should specify files created by your script by specifying them in the @@ -1173,28 +1017,25 @@ file names to be relative to the build directory (file names in the sources, outputs, and inputs will be all treated as relative to the current build file and converted as needed automatically). - ``` -### **File name handling** +#### **File name handling** ``` All output files must be inside the output directory of the build. You would generally use |$target_out_dir| or |$target_gen_dir| to reference the output or generated intermediate file directories, respectively. - ``` -### **Variables** +#### **Variables** ``` args, console, data, data_deps, depfile, deps, inputs, outputs*, response_file_contents, script*, sources * = required - ``` -### **Example** +#### **Example** ``` action("run_this_guy_once") { @@ -1210,19 +1051,16 @@ args = [ "--out", rebase_path(target_gen_dir, root_build_dir) ] + rebase_path(sources, root_build_dir) } - - ``` -## **action_foreach**: Declare a target that runs a script over a set of files. +### <a name="action_foreach"></a>**action_foreach**: Declare a target that runs a script over a set of files. ``` This target type allows you to run a script once-per-file over a set of sources. If you want to run a script once that takes many files as input, see "gn help action". - ``` -### **Inputs** +#### **Inputs** ``` The script will be run once per file in the "sources" variable. The "outputs" @@ -1247,10 +1085,9 @@ action is built, but may not have completed before all steps of the action are started. This can give additional parallelism in the build for runtime-only dependencies. - ``` -### **Outputs** +#### **Outputs** ``` The script will be executed with the given arguments with the current directory being that of the root build directory. If you pass files @@ -1258,28 +1095,25 @@ file names to be relative to the build directory (file names in the sources, outputs, and inputs will be all treated as relative to the current build file and converted as needed automatically). - ``` -### **File name handling** +#### **File name handling** ``` All output files must be inside the output directory of the build. You would generally use |$target_out_dir| or |$target_gen_dir| to reference the output or generated intermediate file directories, respectively. - ``` -### **Variables** +#### **Variables** ``` args, console, data, data_deps, depfile, deps, inputs, outputs*, response_file_contents, script*, sources* * = required - ``` -### **Example** +#### **Example** ``` # Runs the script over each IDL file. The IDL script will generate both a .cc @@ -1305,29 +1139,8 @@ rebase_path(relative_target_gen_dir, root_build_dir) + "/{{source_name_part}}.h" ] } - - ``` -## **assert**: Assert an expression is true at generation time. - -``` - assert(<condition> [, <error string>]) - - If the condition is false, the build will fail with an error. If the - optional second argument is provided, that string will be printed - with the error message. - -``` - -### **Examples** - -``` - assert(is_win) - assert(defined(sources), "Sources must be defined"); - - -``` -## **bundle_data**: [iOS/OS X] Declare a target without output. +### <a name="bundle_data"></a>**bundle_data**: [iOS/OS X] Declare a target without output. ``` This target type allows to declare data that is required at runtime. It is @@ -1343,18 +1156,16 @@ behind iOS/Mac conditionals. See "gn help create_bundle" for more information. - ``` -### **Variables** +#### **Variables** ``` sources*, outputs*, deps, data_deps, public_deps, visibility * = required - ``` -### **Examples** +#### **Examples** ``` bundle_data("icudata") { @@ -1382,64 +1193,10 @@ "{{source_file_part}}" ] } - - ``` -## **config**: Defines a configuration object. +### <a name="copy"></a>**copy**: Declare a target that copies files. -``` - Configuration objects can be applied to targets and specify sets of compiler - flags, includes, defines, etc. They provide a way to conveniently group sets - of this configuration information. - - A config is referenced by its label just like a target. - - The values in a config are additive only. If you want to remove a flag you - need to remove the corresponding config that sets it. The final set of flags, - defines, etc. for a target is generated in this order: - - 1. The values specified directly on the target (rather than using a config. - 2. The configs specified in the target's "configs" list, in order. - 3. Public_configs from a breadth-first traversal of the dependency tree in - the order that the targets appear in "deps". - 4. All dependent configs from a breadth-first traversal of the dependency - tree in the order that the targets appear in "deps". - -``` - -### **Variables valid in a config definition** -``` - Flags: cflags, cflags_c, cflags_cc, cflags_objc, cflags_objcc, - asmflags, defines, include_dirs, ldflags, lib_dirs, libs, - precompiled_header, precompiled_source - Nested configs: configs - -``` - -### **Variables on a target used to apply configs** - -``` - all_dependent_configs, configs, public_configs - -``` - -### **Example** - -``` - config("myconfig") { - includes = [ "include/common" ] - defines = [ "ENABLE_DOOM_MELON" ] - } - - executable("mything") { - configs = [ ":myconfig" ] - } - - -``` -## **copy**: Declare a target that copies files. - -### **File name handling** +#### **File name handling** ``` All output files must be inside the output directory of the build. You would @@ -1454,10 +1211,9 @@ mapping from each source file to an output file name using source expansion (see "gn help source_expansion"). The placeholders will look like "{{source_name_part}}", for example. - ``` -### **Examples** +#### **Examples** ``` # Write a rule that copies a checked-in DLL to the output directory. @@ -1474,10 +1230,8 @@ # names in the gen dir. This will just copy each file. outputs = [ "$target_gen_dir/{{source_file_part}}" ] } - - ``` -## **create_bundle**: [iOS/OS X] Build an OS X / iOS bundle. +### <a name="create_bundle"></a>**create_bundle**: [iOS/OS X] Build an OS X / iOS bundle. ``` This target generates an iOS/OS X bundle (which is a directory with a @@ -1497,10 +1251,9 @@ contribute to any data or data_deps. Required runtime dependencies should be placed in the bundle. A create_bundle can declare its own explicit data and data_deps, however. - ``` -### **Code signing** +#### **Code signing** ``` Some bundle needs to be code signed as part of the build (on iOS all @@ -1516,10 +1269,9 @@ code_signing_args will be passed as is to the script (so path have to be rebased) and additional inputs may be listed with the variable code_signing_sources. - ``` -### **Variables** +#### **Variables** ``` bundle_root_dir*, bundle_resources_dir*, bundle_executable_dir*, @@ -1527,10 +1279,9 @@ visibility, product_type, code_signing_args, code_signing_script, code_signing_sources, code_signing_outputs * = required - ``` -### **Example** +#### **Example** ``` # Defines a template to create an application. On most platform, this is just @@ -1622,10 +1373,245 @@ } } } +``` +### <a name="executable"></a>**executable**: Declare an executable target. +#### **Variables** ``` -## **declare_args**: Declare build arguments. + Flags: cflags, cflags_c, cflags_cc, cflags_objc, cflags_objcc, + asmflags, defines, include_dirs, ldflags, lib_dirs, libs, + precompiled_header, precompiled_source + Deps: data_deps, deps, public_deps + Dependent configs: all_dependent_configs, public_configs + General: check_includes, configs, data, inputs, output_name, + output_extension, public, sources, testonly, visibility +``` +### <a name="group"></a>**group**: Declare a named group of targets. + +``` + This target type allows you to create meta-targets that just collect a set of + dependencies into one named target. Groups can additionally specify configs + that apply to their dependents. +``` + +#### **Variables** + +``` + Deps: data_deps, deps, public_deps + Dependent configs: all_dependent_configs, public_configs +``` + +#### **Example** + +``` + group("all") { + deps = [ + "//project:runner", + "//project:unit_tests", + ] + } +``` +### <a name="loadable_module"></a>**loadable_module**: Declare a loadable module target. + +``` + This target type allows you to create an object file that is (and can only + be) loaded and unloaded at runtime. + + A loadable module will be specified on the linker line for targets listing + the loadable module in its "deps". If you don't want this (if you don't need + to dynamically load the library at runtime), then you should use a + "shared_library" target type instead. +``` + +#### **Variables** + +``` + Flags: cflags, cflags_c, cflags_cc, cflags_objc, cflags_objcc, + asmflags, defines, include_dirs, ldflags, lib_dirs, libs, + precompiled_header, precompiled_source + Deps: data_deps, deps, public_deps + Dependent configs: all_dependent_configs, public_configs + General: check_includes, configs, data, inputs, output_name, + output_extension, public, sources, testonly, visibility +``` +### <a name="shared_library"></a>**shared_library**: Declare a shared library target. + +``` + A shared library will be specified on the linker line for targets listing the + shared library in its "deps". If you don't want this (say you dynamically + load the library at runtime), then you should depend on the shared library + via "data_deps" or, on Darwin platforms, use a "loadable_module" target type + instead. +``` + +#### **Variables** + +``` + Flags: cflags, cflags_c, cflags_cc, cflags_objc, cflags_objcc, + asmflags, defines, include_dirs, ldflags, lib_dirs, libs, + precompiled_header, precompiled_source + Deps: data_deps, deps, public_deps + Dependent configs: all_dependent_configs, public_configs + General: check_includes, configs, data, inputs, output_name, + output_extension, public, sources, testonly, visibility +``` +### <a name="source_set"></a>**source_set**: Declare a source set target. + +``` + A source set is a collection of sources that get compiled, but are not linked + to produce any kind of library. Instead, the resulting object files are + implicitly added to the linker line of all targets that depend on the source + set. + + In most cases, a source set will behave like a static library, except no + actual library file will be produced. This will make the build go a little + faster by skipping creation of a large static library, while maintaining the + organizational benefits of focused build targets. + + The main difference between a source set and a static library is around + handling of exported symbols. Most linkers assume declaring a function + exported means exported from the static library. The linker can then do dead + code elimination to delete code not reachable from exported functions. + + A source set will not do this code elimination since there is no link step. + This allows you to link many sources sets into a shared library and have the + "exported symbol" notation indicate "export from the final shared library and + not from the intermediate targets." There is no way to express this concept + when linking multiple static libraries into a shared library. +``` + +#### **Variables** + +``` + Flags: cflags, cflags_c, cflags_cc, cflags_objc, cflags_objcc, + asmflags, defines, include_dirs, ldflags, lib_dirs, libs, + precompiled_header, precompiled_source + Deps: data_deps, deps, public_deps + Dependent configs: all_dependent_configs, public_configs + General: check_includes, configs, data, inputs, output_name, + output_extension, public, sources, testonly, visibility +``` +### <a name="static_library"></a>**static_library**: Declare a static library target. + +``` + Make a ".a" / ".lib" file. + + If you only need the static library for intermediate results in the build, + you should consider a source_set instead since it will skip the (potentially + slow) step of creating the intermediate library file. +``` + +#### **Variables** + +``` + complete_static_lib + Flags: cflags, cflags_c, cflags_cc, cflags_objc, cflags_objcc, + asmflags, defines, include_dirs, ldflags, lib_dirs, libs, + precompiled_header, precompiled_source + Deps: data_deps, deps, public_deps + Dependent configs: all_dependent_configs, public_configs + General: check_includes, configs, data, inputs, output_name, + output_extension, public, sources, testonly, visibility +``` +### <a name="target"></a>**target**: Declare an target with the given programmatic type. + +``` + target(target_type_string, target_name_string) { ... } + + The target() function is a way to invoke a built-in target or template with a + type determined at runtime. This is useful for cases where the type of a + target might not be known statically. + + Only templates and built-in target functions are supported for the + target_type_string parameter. Arbitrary functions, configs, and toolchains + are not supported. + + The call: + target("source_set", "doom_melon") { + Is equivalent to: + source_set("doom_melon") { +``` + +#### **Example** + +``` + if (foo_build_as_shared) { + my_type = "shared_library" + } else { + my_type = "source_set" + } + + target(my_type, "foo") { + ... + } +``` +## <a name="functions"></a>Buildfile functions + +### <a name="assert"></a>**assert**: Assert an expression is true at generation time. + +``` + assert(<condition> [, <error string>]) + + If the condition is false, the build will fail with an error. If the + optional second argument is provided, that string will be printed + with the error message. +``` + +#### **Examples** + +``` + assert(is_win) + assert(defined(sources), "Sources must be defined"); +``` +### <a name="config"></a>**config**: Defines a configuration object. + +``` + Configuration objects can be applied to targets and specify sets of compiler + flags, includes, defines, etc. They provide a way to conveniently group sets + of this configuration information. + + A config is referenced by its label just like a target. + + The values in a config are additive only. If you want to remove a flag you + need to remove the corresponding config that sets it. The final set of flags, + defines, etc. for a target is generated in this order: + + 1. The values specified directly on the target (rather than using a config. + 2. The configs specified in the target's "configs" list, in order. + 3. Public_configs from a breadth-first traversal of the dependency tree in + the order that the targets appear in "deps". + 4. All dependent configs from a breadth-first traversal of the dependency + tree in the order that the targets appear in "deps". +``` + +#### **Variables valid in a config definition** +``` + Flags: cflags, cflags_c, cflags_cc, cflags_objc, cflags_objcc, + asmflags, defines, include_dirs, ldflags, lib_dirs, libs, + precompiled_header, precompiled_source + Nested configs: configs +``` + +#### **Variables on a target used to apply configs** + +``` + all_dependent_configs, configs, public_configs +``` + +#### **Example** + +``` + config("myconfig") { + includes = [ "include/common" ] + defines = [ "ENABLE_DOOM_MELON" ] + } + + executable("mything") { + configs = [ ":myconfig" ] + } +``` +### <a name="declare_args"></a>**declare_args**: Declare build arguments. ``` Introduces the given arguments into the current scope. If they are not @@ -1670,10 +1656,9 @@ # Bar defaults to same user-overridden state as foo. enable_bar = enable_foo } - ``` -### **Example** +#### **Example** ``` declare_args() { @@ -1685,10 +1670,8 @@ gn --args="enable_doom_melon=true enable_teleporter=true" This also sets the teleporter, but it's already defaulted to on so it will have no effect. - - ``` -## **defined**: Returns whether an identifier is defined. +### <a name="defined"></a>**defined**: Returns whether an identifier is defined. ``` Returns true if the given argument is defined. This is most useful in @@ -1704,10 +1687,9 @@ which will return true or false depending on whether bar is defined in the named scope foo. It will throw an error if foo is not defined or is not a scope. - ``` -### **Example** +#### **Example** ``` template("mytemplate") { @@ -1722,10 +1704,8 @@ values = "some default value" } } - - ``` -## **exec_script**: Synchronously run a script and return the output. +### <a name="exec_script"></a>**exec_script**: Synchronously run a script and return the output. ``` exec_script(filename, @@ -1741,10 +1721,9 @@ directory. If you are passing file names, you will want to use the rebase_path() function to make file names relative to this path (see "gn help rebase_path"). - ``` -### **Arguments**: +#### **Arguments**: ``` filename: @@ -1769,10 +1748,9 @@ The script itself will be an implicit dependency so you do not need to list it. - ``` -### **Example** +#### **Example** ``` all_lines = exec_script( @@ -1782,25 +1760,8 @@ # This example just calls the script with no arguments and discards the # result. exec_script("//foo/bar/myscript.py") - - ``` -## **executable**: Declare an executable target. - -### **Variables** - -``` - Flags: cflags, cflags_c, cflags_cc, cflags_objc, cflags_objcc, - asmflags, defines, include_dirs, ldflags, lib_dirs, libs, - precompiled_header, precompiled_source - Deps: data_deps, deps, public_deps - Dependent configs: all_dependent_configs, public_configs - General: check_includes, configs, data, inputs, output_name, - output_extension, public, sources, testonly, visibility - - -``` -## **foreach**: Iterate over a list. +### <a name="foreach"></a>**foreach**: Iterate over a list. ``` foreach(<loop_var>, <list>) { @@ -1818,10 +1779,9 @@ same name for the duration of the loop. After the loop terminates the loop variable will no longer be in scope, and the previous value (if any) will be restored. - ``` -### **Example** +#### **Example** ``` mylist = [ "a", "b", "c" ] @@ -1833,10 +1793,8 @@ a b c - - ``` -## **forward_variables_from**: Copies variables from a different scope. +### <a name="forward_variables_from"></a>**forward_variables_from**: Copies variables from a different scope. ``` forward_variables_from(from_scope, variable_list_or_star, @@ -1869,10 +1827,9 @@ If variables_to_not_forward_list is non-empty, then it must contains a list of variable names that will not be forwarded. This is mostly useful when variable_list_or_star has a value of "*". - ``` -### **Examples** +#### **Examples** ``` # This is a common action template. It would invoke a script with some given @@ -1913,10 +1870,8 @@ extra_substitutions += [ "BUNDLE_ID_TEST_NAME=$test_bundle_name" ] } } - - ``` -## **get_label_info**: Get an attribute from a target's label. +### <a name="get_label_info"></a>**get_label_info**: Get an attribute from a target's label. ``` get_label_info(target_label, what) @@ -1926,10 +1881,9 @@ the attributes depend on the actual target definition, only the label itself. See also "gn help get_target_outputs". - ``` -### **Possible values for the "what" parameter** +#### **Possible values for the "what" parameter** ``` "name" @@ -1970,10 +1924,9 @@ "toolchain" The label of the toolchain. This will match the value of the "current_toolchain" variable when inside that target's declaration. - ``` -### **Examples** +#### **Examples** ``` get_label_info(":foo", "name") @@ -1981,10 +1934,8 @@ get_label_info("//foo/bar:baz", "gen_dir") # Returns string "//out/Debug/gen/foo/bar". - - ``` -## **get_path_info**: Extract parts of a file or directory name. +### <a name="get_path_info"></a>**get_path_info**: Extract parts of a file or directory name. ``` get_path_info(input, what) @@ -1992,10 +1943,9 @@ The first argument is either a string representing a file or directory name, or a list of such strings. If the input is a list the return value will be a list containing the result of applying the rule to each item in the input. - ``` -### **Possible values for the "what" parameter** +#### **Possible values for the "what" parameter** ``` "file" @@ -2051,10 +2001,9 @@ If you want to make the path relative to another directory, or to be system-absolute, see rebase_path(). - ``` -### **Examples** +#### **Examples** ``` sources = [ "foo.cc", "foo.h" ] result = get_path_info(source, "abspath") @@ -2065,10 +2014,8 @@ # Extract the source-absolute directory name, result = get_path_info(get_path_info(path, "dir"), "abspath" - - ``` -## **get_target_outputs**: [file list] Get the list of outputs from a target. +### <a name="get_target_outputs"></a>**get_target_outputs**: [file list] Get the list of outputs from a target. ``` get_target_outputs(target_label) @@ -2083,10 +2030,9 @@ will depend on the toolchain definition which won't necessarily have been loaded by the time a given line of code has run, and source sets and groups have no useful output file. - ``` -### **Return value** +#### **Return value** ``` The names in the resulting list will be absolute file paths (normally like @@ -2110,10 +2056,9 @@ source sets and groups: this will return a list containing the path of the "stamp" file that Ninja will produce once all outputs are generated. This probably isn't very useful. - ``` -### **Example** +#### **Example** ``` # Say this action generates a bunch of C source files. @@ -2126,10 +2071,8 @@ source_set("my_lib") { sources = get_target_outputs(":my_action") } - - ``` -## **getenv**: Get an environment variable. +### <a name="getenv"></a>**getenv**: Get an environment variable. ``` value = getenv(env_var_name) @@ -2142,46 +2085,14 @@ If the environment variable is not found, the empty string will be returned. Note: it might be nice to extend this if we had the concept of "none" in the language to indicate lookup failure. - ``` -### **Example** +#### **Example** ``` home_dir = getenv("HOME") - - ``` -## **group**: Declare a named group of targets. - -``` - This target type allows you to create meta-targets that just collect a set of - dependencies into one named target. Groups can additionally specify configs - that apply to their dependents. - -``` - -### **Variables** - -``` - Deps: data_deps, deps, public_deps - Dependent configs: all_dependent_configs, public_configs - -``` - -### **Example** - -``` - group("all") { - deps = [ - "//project:runner", - "//project:unit_tests", - ] - } - - -``` -## **import**: Import a file into the current scope. +### <a name="import"></a>**import**: Import a file into the current scope. ``` The import command loads the rules and variables resulting from executing the @@ -2206,46 +2117,17 @@ Variables and templates beginning with an underscore '_' are considered private and will not be imported. Imported files can use such variables for internal computation without affecting other files. - ``` -### **Examples** +#### **Examples** ``` import("//build/rules/idl_compilation_rule.gni") # Looks in the current directory. import("my_vars.gni") - - ``` -## **loadable_module**: Declare a loadable module target. - -``` - This target type allows you to create an object file that is (and can only - be) loaded and unloaded at runtime. - - A loadable module will be specified on the linker line for targets listing - the loadable module in its "deps". If you don't want this (if you don't need - to dynamically load the library at runtime), then you should use a - "shared_library" target type instead. - -``` - -### **Variables** - -``` - Flags: cflags, cflags_c, cflags_cc, cflags_objc, cflags_objcc, - asmflags, defines, include_dirs, ldflags, lib_dirs, libs, - precompiled_header, precompiled_source - Deps: data_deps, deps, public_deps - Dependent configs: all_dependent_configs, public_configs - General: check_includes, configs, data, inputs, output_name, - output_extension, public, sources, testonly, visibility - - -``` -## **pool**: Defines a pool object. +### <a name="pool"></a>**pool**: Defines a pool object. ``` Pool objects can be applied to a tool to limit the parallelism of the @@ -2257,18 +2139,16 @@ explicit toolchain when defining and referencing a pool. A pool is referenced by its label just like a target. - ``` -### **Variables** +#### **Variables** ``` depth* * = required - ``` -### **Example** +#### **Example** ``` if (current_toolchain == default_toolchain) { @@ -2283,10 +2163,8 @@ pool = ":link_pool($default_toolchain)") } } - - ``` -## **print**: Prints to the console. +### <a name="print"></a>**print**: Prints to the console. ``` Prints all arguments to the console separated by spaces. A newline is @@ -2297,19 +2175,16 @@ more than once in parallel in the context of different toolchains so the prints from one file may be duplicated or interleaved with itself. - ``` -### **Examples** +#### **Examples** ``` print("Hello world") print(sources, deps) - - ``` -## **process_file_template**: Do template expansion over a list of files. +### <a name="process_file_template"></a>**process_file_template**: Do template expansion over a list of files. ``` process_file_template(source_list, template) @@ -2322,10 +2197,9 @@ more maintainable code. This function should only be used when that function can't be used (like there's no target or the target is defined in another build file). - ``` -### **Arguments** +#### **Arguments** ``` The source_list is a list of file names. @@ -2335,10 +2209,9 @@ The template should contain source expansions to which each name in the source list is applied. See "gn help source_expansion". - ``` -### **Example** +#### **Example** ``` sources = [ @@ -2355,20 +2228,17 @@ "//out/Debug/foo.h" "//out/Debug/bar.cc" "//out/Debug/bar.h" ] - - ``` -## **read_file**: Read a file into a variable. +### <a name="read_file"></a>**read_file**: Read a file into a variable. ``` read_file(filename, input_conversion) Whitespace will be trimmed from the end of the file. Throws an error if the file can not be opened. - ``` -### **Arguments** +#### **Arguments** ``` filename @@ -2376,17 +2246,14 @@ input_conversion Controls how the file is read and parsed. See "gn help input_conversion". - ``` -### **Example** +#### **Example** ``` lines = read_file("foo.txt", "list lines") - - ``` -## **rebase_path**: Rebase a file or directory to another location. +### <a name="rebase_path"></a>**rebase_path**: Rebase a file or directory to another location. ``` converted = rebase_path(input, @@ -2411,10 +2278,9 @@ function. This function won't work because it will always make relative paths, and it needs to support making paths relative to the source root, so can't also generate source-absolute paths without more special-cases. - ``` -### **Arguments** +#### **Arguments** ``` input @@ -2436,10 +2302,9 @@ is not an absolute path, it will be treated as being relative to the current build file. Use "." (the default) to convert paths from the current BUILD-file's directory. - ``` -### **Return value** +#### **Return value** ``` The return value will be the same type as the input value (either a string or @@ -2452,10 +2317,9 @@ (depending on whether the input ends in a slash) to avoid returning empty strings. This means if you want a root path ("//" or "/") not ending in a slash, you can add a dot ("//."). - ``` -### **Example** +#### **Example** ``` # Convert a file in the current directory to be relative to the build @@ -2484,10 +2348,8 @@ rebase_path("relative_path.txt", root_build_dir) ] + rebase_path(sources, root_build_dir) } - - ``` -## **set_default_toolchain**: Sets the default toolchain name. +### <a name="set_default_toolchain"></a>**set_default_toolchain**: Sets the default toolchain name. ``` set_default_toolchain(toolchain_label) @@ -2506,18 +2368,16 @@ target with a 64-bit toolchain, we wouldn't want processing of the build config file for the 64-bit toolchain to reset the default toolchain to 64-bit, we want to keep it 32-bits. - ``` -### **Argument** +#### **Argument** ``` toolchain_label Toolchain name. - ``` -### **Example** +#### **Example** ``` # Set default toolchain only has an effect when run in the context of the @@ -2528,10 +2388,8 @@ } else if (target_cpu == "x86") { set_default_toolchain("//toolchains:32") } - - ``` -## **set_defaults**: Set default values for a target type. +### <a name="set_defaults"></a>**set_defaults**: Set default values for a target type. ``` set_defaults(<target_type_name>) { <values...> } @@ -2550,10 +2408,9 @@ apply, but there is no way to refer to the previous defaults and modify them (each call to set_defaults must supply a complete list of all defaults it wants). If you want to share defaults, store them in a separate variable. - ``` -### **Example** +#### **Example** ``` set_defaults("static_library") { @@ -2565,10 +2422,8 @@ # you don't want the default for a particular default: configs -= [ "//tools/mything:settings" ] } - - ``` -## **set_sources_assignment_filter**: Set a pattern to filter source files. +### <a name="set_sources_assignment_filter"></a>**set_sources_assignment_filter**: Set a pattern to filter source files. ``` The sources assignment filter is a list of patterns that remove files from @@ -2586,10 +2441,9 @@ If you want to bypass the filter and add a file even if it might be filtered out, call set_sources_assignment_filter([]) to clear the list of filters. This will apply until the current scope exits - ``` -### **How to use patterns** +#### **How to use patterns** ``` File patterns are VERY limited regular expressions. They must match the @@ -2606,10 +2460,9 @@ - "\b" Matches a path boundary. This will match the beginning or end of a string, or a slash. - ``` -### **Pattern examples** +#### **Pattern examples** ``` "*asdf*" @@ -2623,10 +2476,9 @@ "\bwin/*" Matches "win/foo" and "foo/win/bar.cc" but not "iwin/foo". - ``` -### **Sources assignment example** +#### **Sources assignment example** ``` # Filter out all _win files. @@ -2634,73 +2486,8 @@ sources = [ "a.cc", "b_win.cc" ] print(sources) # Will print [ "a.cc" ]. b_win one was filtered out. - - ``` -## **shared_library**: Declare a shared library target. - -``` - A shared library will be specified on the linker line for targets listing the - shared library in its "deps". If you don't want this (say you dynamically - load the library at runtime), then you should depend on the shared library - via "data_deps" or, on Darwin platforms, use a "loadable_module" target type - instead. - -``` - -### **Variables** - -``` - Flags: cflags, cflags_c, cflags_cc, cflags_objc, cflags_objcc, - asmflags, defines, include_dirs, ldflags, lib_dirs, libs, - precompiled_header, precompiled_source - Deps: data_deps, deps, public_deps - Dependent configs: all_dependent_configs, public_configs - General: check_includes, configs, data, inputs, output_name, - output_extension, public, sources, testonly, visibility - - -``` -## **source_set**: Declare a source set target. - -``` - A source set is a collection of sources that get compiled, but are not linked - to produce any kind of library. Instead, the resulting object files are - implicitly added to the linker line of all targets that depend on the source - set. - - In most cases, a source set will behave like a static library, except no - actual library file will be produced. This will make the build go a little - faster by skipping creation of a large static library, while maintaining the - organizational benefits of focused build targets. - - The main difference between a source set and a static library is around - handling of exported symbols. Most linkers assume declaring a function - exported means exported from the static library. The linker can then do dead - code elimination to delete code not reachable from exported functions. - - A source set will not do this code elimination since there is no link step. - This allows you to link many sources sets into a shared library and have the - "exported symbol" notation indicate "export from the final shared library and - not from the intermediate targets." There is no way to express this concept - when linking multiple static libraries into a shared library. - -``` - -### **Variables** - -``` - Flags: cflags, cflags_c, cflags_cc, cflags_objc, cflags_objcc, - asmflags, defines, include_dirs, ldflags, lib_dirs, libs, - precompiled_header, precompiled_source - Deps: data_deps, deps, public_deps - Dependent configs: all_dependent_configs, public_configs - General: check_includes, configs, data, inputs, output_name, - output_extension, public, sources, testonly, visibility - - -``` -## **split_list**: Splits a list into N different sub-lists. +### <a name="split_list"></a>**split_list**: Splits a list into N different sub-lists. ``` result = split_list(input, n) @@ -2711,10 +2498,9 @@ elements in the input, it will be padded with empty lists. The expected use is to divide source files into smaller uniform chunks. - ``` -### **Example** +#### **Example** ``` The code: @@ -2723,70 +2509,8 @@ Will print: [[1, 2], [3, 4], [5, 6] - - ``` -## **static_library**: Declare a static library target. - -``` - Make a ".a" / ".lib" file. - - If you only need the static library for intermediate results in the build, - you should consider a source_set instead since it will skip the (potentially - slow) step of creating the intermediate library file. - -``` - -### **Variables** - -``` - complete_static_lib - Flags: cflags, cflags_c, cflags_cc, cflags_objc, cflags_objcc, - asmflags, defines, include_dirs, ldflags, lib_dirs, libs, - precompiled_header, precompiled_source - Deps: data_deps, deps, public_deps - Dependent configs: all_dependent_configs, public_configs - General: check_includes, configs, data, inputs, output_name, - output_extension, public, sources, testonly, visibility - - -``` -## **target**: Declare an target with the given programmatic type. - -``` - target(target_type_string, target_name_string) { ... } - - The target() function is a way to invoke a built-in target or template with a - type determined at runtime. This is useful for cases where the type of a - target might not be known statically. - - Only templates and built-in target functions are supported for the - target_type_string parameter. Arbitrary functions, configs, and toolchains - are not supported. - - The call: - target("source_set", "doom_melon") { - Is equivalent to: - source_set("doom_melon") { - -``` - -### **Example** - -``` - if (foo_build_as_shared) { - my_type = "shared_library" - } else { - my_type = "source_set" - } - - target(my_type, "foo") { - ... - } - - -``` -## **template**: Define a template rule. +### <a name="template"></a>**template**: Define a template rule. ``` A template defines a custom name that acts like a function. It provides a way @@ -2798,10 +2522,9 @@ Often you will want to declare your template in a special file that other files will import (see "gn help import") so your template rule can be shared across build files. - ``` -### **Variables and templates**: +#### **Variables and templates**: ``` When you call template() it creates a closure around all variables currently @@ -2830,10 +2553,9 @@ more or possibly all variables in this manner: forward_variables_from(invoker, ["deps", "public_deps"]) - ``` -### **Target naming** +#### **Target naming** ``` Your template should almost always define a built-in target with the name the @@ -2858,10 +2580,9 @@ targets to depend on to link your code. And you would name the action something like "${target_name}_action" to make it unique. The source set would have a dependency on the action to make it run. - ``` -### **Example of defining a template** +#### **Example of defining a template** ``` template("my_idl") { @@ -2914,10 +2635,9 @@ deps = [ ":$code_gen_target_name" ] } } - ``` -### **Example of invoking the resulting template** +#### **Example of invoking the resulting template** ``` # This calls the template code above, defining target_name to be @@ -2936,21 +2656,18 @@ # gen action. deps = [ ":foo_idl_files" ] } - - ``` -## **tool**: Specify arguments to a toolchain tool. +### <a name="tool"></a>**tool**: Specify arguments to a toolchain tool. -### **Usage** +#### **Usage** ``` tool(<tool type>) { <tool variables...> } - ``` -### **Tool types** +#### **Tool types** ``` Compiler tools: @@ -2973,10 +2690,9 @@ Platform specific tools: "copy_bundle_data": [iOS, OS X] Tool to copy files in a bundle. "compile_xcassets": [iOS, OS X] Tool to compile asset catalogs. - ``` -### **Tool variables** +#### **Tool variables** ``` command [string with substitutions] @@ -3176,10 +2892,9 @@ If specified, this list is the subset of the outputs that should be added to runtime deps (see "gn help runtime_deps"). By default (if runtime_outputs is empty or unspecified), it will be the link_output. - ``` -### **Expansions for tool variables** +#### **Expansions for tool variables** ``` All paths are relative to the root build directory, which is the current @@ -3345,10 +3060,9 @@ Expands to the product_type of the bundle that will contain the compiled asset catalog. Usually corresponds to the product_type property of the corresponding create_bundle target. - ``` -### **Separate linking and dependencies for shared libraries** +#### **Separate linking and dependencies for shared libraries** ``` Shared libraries are special in that not all changes to them require that @@ -3381,10 +3095,9 @@ "{{output_extension}}.TOC" restat = true } - ``` -### **Example** +#### **Example** ``` toolchain("my_toolchain") { @@ -3403,18 +3116,15 @@ description = "G++ {{source}}" } }; - - ``` -## **toolchain**: Defines a toolchain. +### <a name="toolchain"></a>**toolchain**: Defines a toolchain. ``` A toolchain is a set of commands and build flags used to compile the source code. The toolchain() function defines these commands. - ``` -### **Toolchain overview** +#### **Toolchain overview** ``` You can have more than one toolchain in use at once in a build and a target @@ -3451,10 +3161,9 @@ set_default_toolchain()). In secondary toolchains, the configuration flows from the toolchain to the build config file: the "toolchain_args" in the toolchain definition specifies the arguments to re-invoke the build. - ``` -### **Functions and variables** +#### **Functions and variables** ``` tool() @@ -3491,10 +3200,9 @@ This concept is somewhat inefficient to express in Ninja (it requires a lot of duplicate of rules) so should only be used when absolutely necessary. - ``` -### **Example of defining a toolchain** +#### **Example of defining a toolchain** ``` toolchain("32") { @@ -3520,10 +3228,9 @@ current_cpu = "x64" } } - ``` -### **Example of cross-toolchain dependencies** +#### **Example of cross-toolchain dependencies** ``` If a 64-bit target wants to depend on a 32-bit binary, it would specify a @@ -3545,10 +3252,8 @@ ... } } - - ``` -## **write_file**: Write a file to disk. +### <a name="write_file"></a>**write_file**: Write a file to disk. ``` write_file(filename, data) @@ -3566,10 +3271,9 @@ TODO(brettw) we probably need an optional third argument to control list formatting. - ``` -### **Arguments** +#### **Arguments** ``` filename @@ -3577,10 +3281,10 @@ data The list or string to write. - - ``` -## **current_cpu**: The processor architecture of the current toolchain. +## <a name="predefined_variables"></a>Built-in predefined variables + +### <a name="current_cpu"></a>**current_cpu**: The processor architecture of the current toolchain. ``` The build configuration usually sets this value based on the value of @@ -3593,9 +3297,8 @@ the command line if so desired. See "gn help target_cpu" for a list of common values returned. - ``` -## **current_os**: The operating system of the current toolchain. +### <a name="current_os"></a>**current_os**: The operating system of the current toolchain. ``` The build configuration usually sets this value based on the value of @@ -3608,36 +3311,29 @@ the command line if so desired. See "gn help target_os" for a list of common values returned. - - ``` -## **current_toolchain**: Label of the current toolchain. +### <a name="current_toolchain"></a>**current_toolchain**: Label of the current toolchain. ``` A fully-qualified label representing the current toolchain. You can use this to make toolchain-related decisions in the build. See also "default_toolchain". - ``` -### **Example** +#### **Example** ``` if (current_toolchain == "//build:64_bit_toolchain") { executable("output_thats_64_bit_only") { ... - - ``` -## **default_toolchain**: [string] Label of the default toolchain. +### <a name="default_toolchain"></a>**default_toolchain**: [string] Label of the default toolchain. ``` A fully-qualified label representing the default toolchain, which may not necessarily be the current one (see "current_toolchain"). - - ``` -## **host_cpu**: The processor architecture that GN is running on. +### <a name="host_cpu"></a>**host_cpu**: The processor architecture that GN is running on. ``` This is value is exposed so that cross-compile toolchains can access the host @@ -3647,18 +3343,15 @@ in order to handle unusual cases where there might be multiple plausible values for the host architecture (e.g., if you can do either 32-bit or 64-bit builds). The value is not used internally by GN for any purpose. - ``` -### **Some possible values** +#### **Some possible values** ``` - "x64" - "x86" - - ``` -## **host_os**: [string] The operating system that GN is running on. +### <a name="host_os"></a>**host_os**: [string] The operating system that GN is running on. ``` This value is exposed so that cross-compiles can access the host build @@ -3666,19 +3359,16 @@ This value should generally be treated as read-only. It, however, is not used internally by GN for any purpose. - ``` -### **Some possible values** +#### **Some possible values** ``` - "linux" - "mac" - "win" - - ``` -## **invoker**: [string] The invoking scope inside a template. +### <a name="invoker"></a>**invoker**: [string] The invoking scope inside a template. ``` Inside a template invocation, this variable refers to the scope of the @@ -3693,10 +3383,9 @@ scope. See "gn help template" for more examples. - ``` -### **Example** +#### **Example** ``` template("my_template") { @@ -3709,19 +3398,15 @@ sources = [ "a.cc", "b.cc" ] bar = 123 } - - ``` -## **python_path**: Absolute path of Python. +### <a name="python_path"></a>**python_path**: Absolute path of Python. ``` Normally used in toolchain definitions if running some command requires Python. You will normally not need this when invoking scripts since GN automatically finds it for you. - - ``` -## **root_build_dir**: [string] Directory where build commands are run. +### <a name="root_build_dir"></a>**root_build_dir**: [string] Directory where build commands are run. ``` This is the root build output directory which will be the current directory @@ -3729,10 +3414,8 @@ Most often this is used with rebase_path (see "gn help rebase_path") to convert arguments to be relative to a script's current directory. - - ``` -## **root_gen_dir**: Directory for the toolchain's generated files. +### <a name="root_gen_dir"></a>**root_gen_dir**: Directory for the toolchain's generated files. ``` Absolute path to the root of the generated output directory tree for the @@ -3746,10 +3429,8 @@ See also "target_gen_dir" which is usually a better location for generated files. It will be inside the root generated dir. - - ``` -## **root_out_dir**: [string] Root directory for toolchain output files. +### <a name="root_out_dir"></a>**root_out_dir**: [string] Root directory for toolchain output files. ``` Absolute path to the root of the output directory tree for the current @@ -3765,20 +3446,17 @@ See also "target_out_dir" which is usually a better location for output files. It will be inside the root output dir. - ``` -### **Example** +#### **Example** ``` action("myscript") { # Pass the output dir to the script. args = [ "-o", rebase_path(root_out_dir, root_build_dir) ] } - - ``` -## **target_cpu**: The desired cpu architecture for the build. +### <a name="target_cpu"></a>**target_cpu**: The desired cpu architecture for the build. ``` This value should be used to indicate the desired architecture for the @@ -3796,10 +3474,9 @@ string ("") and the configuration files should set it to an appropriate value (e.g., setting it to the value of "host_cpu") if it is not overridden on the command line or in the args.gn file. - ``` -### **Possible values** +#### **Possible values** ``` - "x86" @@ -3807,10 +3484,8 @@ - "arm" - "arm64" - "mipsel" - - ``` -## **target_gen_dir**: Directory for a target's generated files. +### <a name="target_gen_dir"></a>**target_gen_dir**: Directory for a target's generated files. ``` Absolute path to the target's generated file directory. This will be the @@ -3824,20 +3499,17 @@ build directory. See also "gn help root_gen_dir". - ``` -### **Example** +#### **Example** ``` action("myscript") { # Pass the generated output dir to the script. args = [ "-o", rebase_path(target_gen_dir, root_build_dir) ]" } - - ``` -## **target_name**: [string] The name of the current target. +### <a name="target_name"></a>**target_name**: [string] The name of the current target. ``` Inside a target or template invocation, this variable refers to the name @@ -3856,10 +3528,9 @@ outside of any target definitions. See "gn help template" for more examples. - ``` -### **Example** +#### **Example** ``` executable("doom_melon") { @@ -3876,10 +3547,8 @@ my_template("space_ray") { } - - ``` -## **target_os**: The desired operating system for the build. +### <a name="target_os"></a>**target_os**: The desired operating system for the build. ``` This value should be used to indicate the desired operating system for the @@ -3907,10 +3576,9 @@ string ("") and the configuration files should set it to an appropriate value (e.g., setting it to the value of "host_os") if it is not set via the command line or in the args.gn file. - ``` -### **Possible values** +#### **Possible values** ``` - "android" @@ -3920,10 +3588,8 @@ - "nacl" - "mac" - "win" - - ``` -## **target_out_dir**: [string] Directory for target output files. +### <a name="target_out_dir"></a>**target_out_dir**: [string] Directory for target output files. ``` Absolute path to the target's generated file directory. If your current @@ -3936,10 +3602,9 @@ directory. See also "gn help root_out_dir". - ``` -### **Example** +#### **Example** ``` action("myscript") { @@ -3947,10 +3612,10 @@ args = [ "-o", rebase_path(target_out_dir, root_build_dir) ]" } - - ``` -## **all_dependent_configs**: Configs to be forced on dependents. +## <a name="target_variables"></a>Variables you set in targets + +### <a name="all_dependent_configs"></a>**all_dependent_configs**: Configs to be forced on dependents. ``` A list of config labels. @@ -3967,10 +3632,9 @@ target's headers. See also "public_configs". - ``` -### **Ordering of flags and values** +#### **Ordering of flags and values** ``` 1. Those set on the current target (not in a config). @@ -3986,10 +3650,8 @@ 6. public_configs pulled from dependencies, in the order of the "deps" list. If a dependency is public, they will be applied recursively. - - ``` -## **allow_circular_includes_from**: Permit includes from deps. +### <a name="allow_circular_includes_from"></a>**allow_circular_includes_from**: Permit includes from deps. ``` A list of target labels. Must be a subset of the target's "deps". These @@ -4001,10 +3663,9 @@ external dependencies depend only on one of the two targets, and to set the visibility on the other to enforce this. Thus the targets will always be linked together in any output. - ``` -### **Details** +#### **Details** ``` Normally, for a file in target A to include a file from target B, A must list @@ -4023,10 +3684,9 @@ allow_circular_includes_from list. Normally includes must follow the direction of dependencies, this flag allows them to go in the opposite direction. - ``` -### **Danger** +#### **Danger** ``` In the above example, A's headers are likely to include headers from A's @@ -4043,10 +3703,9 @@ (consider putting such things in a shared config they can both reference). Make sure the dependencies are also the same (you might consider a group to collect such dependencies they both depend on). - ``` -### **Example** +#### **Example** ``` source_set("a") { @@ -4064,10 +3723,8 @@ group("a_b_shared_deps") { public_deps = [ ":c" ] } - - ``` -## **arflags**: Arguments passed to static_library archiver. +### <a name="arflags"></a>**arflags**: Arguments passed to static_library archiver. ``` A list of flags passed to the archive/lib command that creates static @@ -4081,10 +3738,9 @@ to other static libraries. Due to the nature of how arflags are typically used, you will normally want to apply them directly on static_library targets themselves. - ``` -### **Ordering of flags and values** +#### **Ordering of flags and values** ``` 1. Those set on the current target (not in a config). @@ -4100,10 +3756,8 @@ 6. public_configs pulled from dependencies, in the order of the "deps" list. If a dependency is public, they will be applied recursively. - - ``` -## **args**: Arguments passed to an action. +### <a name="args"></a>**args**: Arguments passed to an action. ``` For action and action_foreach targets, args is the list of arguments to pass @@ -4111,20 +3765,17 @@ source_expansion") to insert the source file names. See also "gn help action" and "gn help action_foreach". - - ``` -## **asmflags**: Flags passed to the assembler. +### <a name="asmflags"></a>**asmflags**: Flags passed to the assembler. ``` A list of strings. "asmflags" are passed to any invocation of a tool that takes an .asm or .S file as input. - ``` -### **Ordering of flags and values** +#### **Ordering of flags and values** ``` 1. Those set on the current target (not in a config). @@ -4140,10 +3791,8 @@ 6. public_configs pulled from dependencies, in the order of the "deps" list. If a dependency is public, they will be applied recursively. - - ``` -## **assert_no_deps**: Ensure no deps on these targets. +### <a name="assert_no_deps"></a>**assert_no_deps**: Ensure no deps on these targets. ``` A list of label patterns. @@ -4169,10 +3818,9 @@ on a target or set of targets. One efficient way to express this is to create a group with the assert_no_deps rule on it, and make that group depend on all targets you want to apply that assertion to. - ``` -### **Example** +#### **Example** ``` executable("doom_melon") { @@ -4183,10 +3831,8 @@ "//foo:test_support", # This target is also disallowed. ] } - - ``` -## **bundle_deps_filter**: [label list] A list of labels that are filtered out. +### <a name="bundle_deps_filter"></a>**bundle_deps_filter**: [label list] A list of labels that are filtered out. ``` A list of target labels. @@ -4200,10 +3846,9 @@ bundle and thus do not require a second copy. See "gn help create_bundle" for more information. - ``` -### **Example** +#### **Example** ``` create_bundle("today_extension") { @@ -4217,10 +3862,8 @@ "//third_party/icu:icudata", ] } - - ``` -## **bundle_executable_dir**: Expansion of {{bundle_executable_dir}} in +### <a name="bundle_executable_dir"></a>**bundle_executable_dir**: Expansion of {{bundle_executable_dir}} in ``` create_bundle. @@ -4231,10 +3874,8 @@ must correspond to a path under "bundle_root_dir". See "gn help bundle_root_dir" for examples. - - ``` -## **bundle_plugins_dir**: Expansion of {{bundle_plugins_dir}} in create_bundle. +### <a name="bundle_plugins_dir"></a>**bundle_plugins_dir**: Expansion of {{bundle_plugins_dir}} in create_bundle. ``` A string corresponding to a path in $root_build_dir. @@ -4244,10 +3885,8 @@ correspond to a path under "bundle_root_dir". See "gn help bundle_root_dir" for examples. - - ``` -## **bundle_resources_dir**: Expansion of {{bundle_resources_dir}} in +### <a name="bundle_resources_dir"></a>**bundle_resources_dir**: Expansion of {{bundle_resources_dir}} in ``` create_bundle. @@ -4258,10 +3897,8 @@ correspond to a path under "bundle_root_dir". See "gn help bundle_root_dir" for examples. - - ``` -## **bundle_root_dir**: Expansion of {{bundle_root_dir}} in create_bundle. +### <a name="bundle_root_dir"></a>**bundle_root_dir**: Expansion of {{bundle_root_dir}} in create_bundle. ``` A string corresponding to a path in root_build_dir. @@ -4269,10 +3906,9 @@ This string is used by the "create_bundle" target to expand the {{bundle_root_dir}} of the "bundle_data" target it depends on. This must correspond to a path under root_build_dir. - ``` -### **Example** +#### **Example** ``` bundle_data("info_plist") { @@ -4287,10 +3923,8 @@ bundle_executable_dir = bundle_root_dir + "/MacOS" bundle_plugins_dir = bundle_root_dir + "/PlugIns" } - - ``` -## **cflags***: Flags passed to the C compiler. +### <a name="cflags*"></a>**cflags***: Flags passed to the C compiler. ``` A list of strings. @@ -4304,10 +3938,9 @@ "cflags". See also "asmflags" for flags for assembly-language files. - ``` -### **Ordering of flags and values** +#### **Ordering of flags and values** ``` 1. Those set on the current target (not in a config). @@ -4323,10 +3956,8 @@ 6. public_configs pulled from dependencies, in the order of the "deps" list. If a dependency is public, they will be applied recursively. - - ``` -## **cflags***: Flags passed to the C compiler. +### <a name="cflags*"></a>**cflags***: Flags passed to the C compiler. ``` A list of strings. @@ -4340,10 +3971,9 @@ "cflags". See also "asmflags" for flags for assembly-language files. - ``` -### **Ordering of flags and values** +#### **Ordering of flags and values** ``` 1. Those set on the current target (not in a config). @@ -4359,10 +3989,8 @@ 6. public_configs pulled from dependencies, in the order of the "deps" list. If a dependency is public, they will be applied recursively. - - ``` -## **cflags***: Flags passed to the C compiler. +### <a name="cflags*"></a>**cflags***: Flags passed to the C compiler. ``` A list of strings. @@ -4376,10 +4004,9 @@ "cflags". See also "asmflags" for flags for assembly-language files. - ``` -### **Ordering of flags and values** +#### **Ordering of flags and values** ``` 1. Those set on the current target (not in a config). @@ -4395,10 +4022,8 @@ 6. public_configs pulled from dependencies, in the order of the "deps" list. If a dependency is public, they will be applied recursively. - - ``` -## **cflags***: Flags passed to the C compiler. +### <a name="cflags*"></a>**cflags***: Flags passed to the C compiler. ``` A list of strings. @@ -4412,10 +4037,9 @@ "cflags". See also "asmflags" for flags for assembly-language files. - ``` -### **Ordering of flags and values** +#### **Ordering of flags and values** ``` 1. Those set on the current target (not in a config). @@ -4431,10 +4055,8 @@ 6. public_configs pulled from dependencies, in the order of the "deps" list. If a dependency is public, they will be applied recursively. - - ``` -## **cflags***: Flags passed to the C compiler. +### <a name="cflags*"></a>**cflags***: Flags passed to the C compiler. ``` A list of strings. @@ -4448,10 +4070,9 @@ "cflags". See also "asmflags" for flags for assembly-language files. - ``` -### **Ordering of flags and values** +#### **Ordering of flags and values** ``` 1. Those set on the current target (not in a config). @@ -4467,10 +4088,8 @@ 6. public_configs pulled from dependencies, in the order of the "deps" list. If a dependency is public, they will be applied recursively. - - ``` -## **check_includes**: [boolean] Controls whether a target's files are checked. +### <a name="check_includes"></a>**check_includes**: [boolean] Controls whether a target's files are checked. ``` When true (the default), the "gn check" command (as well as "gn gen" with the @@ -4487,10 +4106,9 @@ The topic "gn help check" has general information on how checking works and advice on how to pass a check in problematic cases. - ``` -### **Example** +#### **Example** ``` source_set("busted_includes") { @@ -4498,10 +4116,8 @@ check_includes = false ... } - - ``` -## **code_signing_args**: [string list] Arguments passed to code signing script. +### <a name="code_signing_args"></a>**code_signing_args**: [string list] Arguments passed to code signing script. ``` For create_bundle targets, code_signing_args is the list of arguments to pass @@ -4509,30 +4125,24 @@ help source_expansion") to insert the source file names. See also "gn help create_bundle". - - ``` -## **code_signing_outputs**: [file list] Output files for code signing step. +### <a name="code_signing_outputs"></a>**code_signing_outputs**: [file list] Output files for code signing step. ``` Outputs from the code signing step of a create_bundle target. Must refer to files in the build directory. See also "gn help create_bundle". - - ``` -## **code_signing_script**: [file name] Script for code signing." +### <a name="code_signing_script"></a>**code_signing_script**: [file name] Script for code signing." ``` An absolute or buildfile-relative file name of a Python script to run for a create_bundle target to perform code signing step. See also "gn help create_bundle". - - ``` -## **code_signing_sources**: [file list] Sources for code signing step. +### <a name="code_signing_sources"></a>**code_signing_sources**: [file list] Sources for code signing step. ``` A list of files used as input for code signing script step of a create_bundle @@ -4540,10 +4150,8 @@ file. See also "gn help create_bundle". - - ``` -## **complete_static_lib**: [boolean] Links all deps into a static library. +### <a name="complete_static_lib"></a>**complete_static_lib**: [boolean] Links all deps into a static library. ``` A static library normally doesn't include code from dependencies, but instead @@ -4568,27 +4176,23 @@ In rare cases it makes sense to list a header in more than one target if it could be considered conceptually a member of both. libraries. - ``` -### **Example** +#### **Example** ``` static_library("foo") { complete_static_lib = true deps = [ "bar" ] } - - ``` -## **configs**: Configs applying to this target or config. +### <a name="configs"></a>**configs**: Configs applying to this target or config. ``` A list of config labels. - ``` -### **Configs on a target** +#### **Configs on a target** ``` When used on a target, the include_dirs, defines, etc. in each config are @@ -4604,10 +4208,9 @@ The build configuration script will generally set up the default configs applying to a given target type (see "set_defaults"). When a target is being defined, it can add to or remove from this list. - ``` -### **Configs on a config** +#### **Configs on a config** ``` It is possible to create composite configs by specifying configs on a config. @@ -4629,10 +4232,9 @@ listed as a sub-config that it is only used in that context. (Note that it's possible to fix this and de-dupe, but it's not normally relevant and complicates the implementation.) - ``` -### **Ordering of flags and values** +#### **Ordering of flags and values** ``` 1. Those set on the current target (not in a config). @@ -4648,10 +4250,9 @@ 6. public_configs pulled from dependencies, in the order of the "deps" list. If a dependency is public, they will be applied recursively. - ``` -### **Example** +#### **Example** ``` # Configs on a target. @@ -4677,10 +4278,8 @@ configs = [ ":no_optimization" ] } } - - ``` -## **console**: Run this action in the console pool. +### <a name="console"></a>**console**: Run this action in the console pool. ``` Boolean. Defaults to false. @@ -4692,19 +4291,16 @@ Only one console pool target can run at any one time in Ninja. Refer to the Ninja documentation on the console pool for more info. - ``` -### **Example** +#### **Example** ``` action("long_action_with_progress_logs") { console = true } - - ``` -## **data**: Runtime data file dependencies. +### <a name="data"></a>**data**: Runtime data file dependencies. ``` Lists files or directories required to run the given target. These are @@ -4732,10 +4328,8 @@ gathering data. See "gn help create_bundle" for details. See "gn help runtime_deps" for how these are used. - - ``` -## **data_deps**: Non-linked dependencies. +### <a name="data_deps"></a>**data_deps**: Non-linked dependencies. ``` A list of target labels. @@ -4751,30 +4345,26 @@ gathering data_deps. See "gn help create_bundle" for details. See also "gn help deps" and "gn help data". - ``` -### **Example** +#### **Example** ``` executable("foo") { deps = [ "//base" ] data_deps = [ "//plugins:my_runtime_plugin" ] } - - ``` -## **defines**: C preprocessor defines. +### <a name="defines"></a>**defines**: C preprocessor defines. ``` A list of strings These strings will be passed to the C/C++ compiler as #defines. The strings may or may not include an "=" to assign a value. - ``` -### **Ordering of flags and values** +#### **Ordering of flags and values** ``` 1. Those set on the current target (not in a config). @@ -4790,17 +4380,14 @@ 6. public_configs pulled from dependencies, in the order of the "deps" list. If a dependency is public, they will be applied recursively. - ``` -### **Example** +#### **Example** ``` defines = [ "AWESOME_FEATURE", "LOG_LEVEL=3" ] - - ``` -## **depfile**: [string] File name for input dependencies for actions. +### <a name="depfile"></a>**depfile**: [string] File name for input dependencies for actions. ``` If nonempty, this string specifies that the current action or action_foreach @@ -4822,10 +4409,9 @@ Although depfiles are created by an action, they should not be listed in the action's "outputs" unless another target will use the file as an input. - ``` -### **Example** +#### **Example** ``` action_foreach("myscript_target") { @@ -4839,10 +4425,8 @@ # Say our script uses "-o <d file>" to indicate the depfile. args = [ "{{source}}", "-o", depfile ] } - - ``` -## **deps**: Private linked dependencies. +### <a name="deps"></a>**deps**: Private linked dependencies. ``` A list of target labels. @@ -4851,10 +4435,9 @@ propagated up the dependency tree and linked to dependant targets, but do not grant the ability to include headers from the dependency. Public configs are not forwarded. - ``` -### **Details of dependency propagation** +#### **Details of dependency propagation** ``` Source sets, shared libraries, and non-complete static libraries will be @@ -4875,20 +4458,17 @@ "gn help runtime_deps". See also "public_deps". - - ``` -## **include_dirs**: Additional include directories. +### <a name="include_dirs"></a>**include_dirs**: Additional include directories. ``` A list of source directories. The directories in this list will be added to the include path for the files in the affected target. - ``` -### **Ordering of flags and values** +#### **Ordering of flags and values** ``` 1. Those set on the current target (not in a config). @@ -4904,17 +4484,14 @@ 6. public_configs pulled from dependencies, in the order of the "deps" list. If a dependency is public, they will be applied recursively. - ``` -### **Example** +#### **Example** ``` include_dirs = [ "src/include", "//third_party/foo" ] - - ``` -## **inputs**: Additional compile-time dependencies. +### <a name="inputs"></a>**inputs**: Additional compile-time dependencies. ``` Inputs are compile-time dependencies of the current target. This means that @@ -4922,10 +4499,9 @@ any actions. Inputs are typically only used for action and action_foreach targets. - ``` -### **Inputs for actions** +#### **Inputs for actions** ``` For action and action_foreach targets, inputs should be the inputs to script @@ -4944,10 +4520,9 @@ executing the script. This is more efficient than doing processing while running GN to determine the inputs, and is easier to keep in-sync than hardcoding the list. - ``` -### **Script input gotchas** +#### **Script input gotchas** ``` It may be tempting to write a script that enumerates all files in a directory @@ -4962,10 +4537,9 @@ script, or if there are many, create a separate list file that the script reads. As long as this file is listed in the inputs, the build will detect when it has changed in any way and the action will re-run. - ``` -### **Inputs for binary targets** +#### **Inputs for binary targets** ``` Any input dependencies will be resolved before compiling any sources. @@ -4977,20 +4551,17 @@ that changes in any of the inputs will force all sources in the target to be recompiled. If an input only applies to a subset of source files, you may want to split those into a separate target to avoid unnecessary recompiles. - ``` -### **Example** +#### **Example** ``` action("myscript") { script = "domything.py" inputs = [ "input.data" ] } - - ``` -## **ldflags**: Flags passed to the linker. +### <a name="ldflags"></a>**ldflags**: Flags passed to the linker. ``` A list of strings. @@ -5003,10 +4574,9 @@ static libraries will be a no-op. If you want to apply ldflags to dependent targets, put them in a config and set it in the all_dependent_configs or public_configs. - ``` -### **Ordering of flags and values** +#### **Ordering of flags and values** ``` 1. Those set on the current target (not in a config). @@ -5022,10 +4592,8 @@ 6. public_configs pulled from dependencies, in the order of the "deps" list. If a dependency is public, they will be applied recursively. - - ``` -## **lib_dirs**: Additional library directories. +### <a name="lib_dirs"></a>**lib_dirs**: Additional library directories. ``` A list of directories. @@ -5039,10 +4607,9 @@ shared library or executable target is reached. Second, they are uniquified so each one is only passed once (the first instance of it will be the one used). - ``` -### **Ordering of flags and values** +#### **Ordering of flags and values** ``` 1. Those set on the current target (not in a config). @@ -5062,17 +4629,14 @@ For "libs" and "lib_dirs" only, the values propagated from dependencies (as described above) are applied last assuming they are not already in the list. - ``` -### **Example** +#### **Example** ``` lib_dirs = [ "/usr/lib/foo", "lib/doom_melon" ] - - ``` -## **libs**: Additional libraries to link. +### <a name="libs"></a>**libs**: Additional libraries to link. ``` A list of library names or library paths. @@ -5085,10 +4649,9 @@ shared library or executable target is reached. Second, they are uniquified so each one is only passed once (the first instance of it will be the one used). - ``` -### **Types of libs** +#### **Types of libs** ``` There are several different things that can be expressed in libs: @@ -5113,10 +4676,9 @@ "-framework" will be prepended instead of the lib_prefix, and the ".framework" suffix will be trimmed. This is to support the way Mac links framework dependencies. - ``` -### **Ordering of flags and values** +#### **Ordering of flags and values** ``` 1. Those set on the current target (not in a config). @@ -5136,10 +4698,9 @@ For "libs" and "lib_dirs" only, the values propagated from dependencies (as described above) are applied last assuming they are not already in the list. - ``` -### **Examples** +#### **Examples** ``` On Windows: @@ -5147,10 +4708,8 @@ On Linux: libs = [ "ld" ] - - ``` -## **output_dir**: [directory] Directory to put output file in. +### <a name="output_dir"></a>**output_dir**: [directory] Directory to put output file in. ``` For library and executable targets, overrides the directory for the final @@ -5167,20 +4726,17 @@ executables (see "gn help tool"). You will have to consult that for the default location. The default location will be used if output_dir is undefined or empty. - ``` -### **Example** +#### **Example** ``` shared_library("doom_melon") { output_dir = "$root_out_dir/plugin_libs" ... } - - ``` -## **output_extension**: Value to use for the output's file extension. +### <a name="output_extension"></a>**output_extension**: Value to use for the output's file extension. ``` Normally the file extension for a target is based on the target type and the @@ -5194,10 +4750,9 @@ The output_extension will be used to set the "{{output_extension}}" expansion which the linker tool will generally use to specify the output file name. See "gn help tool". - ``` -### **Example** +#### **Example** ``` shared_library("freetype") { @@ -5216,10 +4771,8 @@ ... } } - - ``` -## **output_name**: Define a name for the output file other than the default. +### <a name="output_name"></a>**output_name**: Define a name for the output file other than the default. ``` Normally the output name of a target will be based on the target name, so the @@ -5236,19 +4789,16 @@ flexibility, create a copy target to produce the file you want. This variable is valid for all binary output target types. - ``` -### **Example** +#### **Example** ``` static_library("doom_melon") { output_name = "fluffy_bunny" } - - ``` -## **output_prefix_override**: Don't use prefix for output name. +### <a name="output_prefix_override"></a>**output_prefix_override**: Don't use prefix for output name. ``` A boolean that overrides the output prefix for a target. Defaults to false. @@ -5260,10 +4810,9 @@ (see "gn help tool"). Sometimes this prefix is undesired. See also "gn help output_extension". - ``` -### **Example** +#### **Example** ``` shared_library("doom_melon") { @@ -5272,10 +4821,8 @@ output_prefix_override = true ... } - - ``` -## **outputs**: Output files for actions and copy targets. +### <a name="outputs"></a>**outputs**: Output files for actions and copy targets. ``` Outputs is valid for "copy", "action", and "action_foreach" target types and @@ -5297,10 +4844,8 @@ action Action targets (excluding action_foreach) must list literal output file(s) with no source expansions. See "gn help action". - - ``` -## **precompiled_header**: [string] Header file to precompile. +### <a name="precompiled_header"></a>**precompiled_header**: [string] Header file to precompile. ``` Precompiled headers will be used when a target specifies this value, or a @@ -5316,10 +4861,9 @@ If you use both C and C++ sources, the precompiled header and source file will be compiled once per language. You will want to make sure to wrap C++ includes in __cplusplus #ifdefs so the file will compile in C mode. - ``` -### **GCC precompiled headers** +#### **GCC precompiled headers** ``` When using GCC-style precompiled headers, "precompiled_source" contains the @@ -5328,10 +4872,9 @@ The value of "precompiled_header" is not used with GCC-style precompiled headers. - ``` -### **MSVC precompiled headers** +#### **MSVC precompiled headers** ``` When using MSVC-style precompiled headers, the "precompiled_header" value is @@ -5369,26 +4912,20 @@ executable("doom_melon") { configs += [ ":use_precompiled_headers" ] ... - - ``` -## **precompiled_header_type**: [string] "gcc" or "msvc". +### <a name="precompiled_header_type"></a>**precompiled_header_type**: [string] "gcc" or "msvc". ``` See "gn help precompiled_header". - - ``` -## **precompiled_source**: [file name] Source file to precompile. +### <a name="precompiled_source"></a>**precompiled_source**: [file name] Source file to precompile. ``` The source file that goes along with the precompiled_header when using "msvc"-style precompiled headers. It will be implicitly added to the sources of the target. See "gn help precompiled_header". - - ``` -## **product_type**: Product type for Xcode projects. +### <a name="product_type"></a>**product_type**: Product type for Xcode projects. ``` Correspond to the type of the product of a create_bundle target. Only @@ -5396,10 +4933,8 @@ When generating Xcode project files, only create_bundle target with a non-empty product_type will have a corresponding target in Xcode project. - - ``` -## **public**: Declare public header files for a target. +### <a name="public"></a>**public**: Declare public header files for a target. ``` A list of files that other targets can include. These permissions are checked @@ -5423,10 +4958,9 @@ GN only knows about files declared in the "sources" and "public" sections of targets. If a file is included that is not known to the build, it will be allowed. - ``` -### **Examples** +#### **Examples** ``` These exact files are public: @@ -5434,10 +4968,8 @@ No files are public (no targets may include headers from this one): public = [] - - ``` -## **public_configs**: Configs to be applied on dependents. +### <a name="public_configs"></a>**public_configs**: Configs to be applied on dependents. ``` A list of config labels. @@ -5453,10 +4985,9 @@ target's headers. See also "all_dependent_configs". - ``` -### **Ordering of flags and values** +#### **Ordering of flags and values** ``` 1. Those set on the current target (not in a config). @@ -5472,10 +5003,8 @@ 6. public_configs pulled from dependencies, in the order of the "deps" list. If a dependency is public, they will be applied recursively. - - ``` -## **public_deps**: Declare public dependencies. +### <a name="public_deps"></a>**public_deps**: Declare public dependencies. ``` Public dependencies are like private dependencies (see "gn help deps") but @@ -5493,10 +5022,9 @@ - If the current target is a shared library, other shared libraries that it publicly depends on (directly or indirectly) are propagated up the dependency tree to dependents for linking. - ``` -### **Discussion** +#### **Discussion** ``` Say you have three targets: A -> B -> C. C's visibility may allow B to depend @@ -5509,10 +5037,9 @@ Generally if you are writing a target B and you include C's headers as part of B's public headers, or targets depending on B should consider B and C to be part of a unit, you should use public_deps instead of deps. - ``` -### **Example** +#### **Example** ``` # This target can include files from "c" but not from @@ -5525,10 +5052,8 @@ deps = [ ":super_secret_implementation_details" ] public_deps = [ ":c" ] } - - ``` -## **response_file_contents**: Contents of a response file for actions. +### <a name="response_file_contents"></a>**response_file_contents**: Contents of a response file for actions. ``` Sometimes the arguments passed to a script can be too long for the system's @@ -5546,10 +5071,9 @@ The response file contents will always be quoted and escaped according to Unix shell rules. To parse the response file, the Python script should use "shlex.split(file_contents)". - ``` -### **Example** +#### **Example** ``` action("process_lots_of_files") { @@ -5566,27 +5090,22 @@ "--file-list={{response_file_name}}", ] } - - ``` -## **script**: Script file for actions. +### <a name="script"></a>**script**: Script file for actions. ``` An absolute or buildfile-relative file name of a Python script to run for a action and action_foreach targets (see "gn help action" and "gn help action_foreach"). - - ``` -## **sources**: Source files for a target +### <a name="sources"></a>**sources**: Source files for a target ``` A list of files. Non-absolute paths will be resolved relative to the current build file. - ``` -### **Sources for binary targets** +#### **Sources for binary targets** ``` For binary targets (source sets, executables, and libraries), the known file @@ -5601,10 +5120,9 @@ and they do not cross dependency boundaries (so specifying a .def file in a static library or source set will have no effect on the executable or shared library they're linked into). - ``` -### **Sources for non-binary targets** +#### **Sources for non-binary targets** ``` action_foreach @@ -5617,10 +5135,8 @@ copy The source are the source files to copy. - - ``` -## **testonly**: Declares a target must only be used for testing. +### <a name="testonly"></a>**testonly**: Declares a target must only be used for testing. ``` Boolean. Defaults to false. @@ -5631,20 +5147,17 @@ This feature is intended to prevent accidentally shipping test code in a final product. - ``` -### **Example** +#### **Example** ``` source_set("test_support") { testonly = true ... } - - ``` -## **visibility**: A list of labels that can depend on a target. +### <a name="visibility"></a>**visibility**: A list of labels that can depend on a target. ``` A list of labels and label patterns that define which targets can depend on @@ -5660,20 +5173,18 @@ Tip: Often you will want the same visibility for all targets in a BUILD file. In this case you can just put the definition at the top, outside of any target, and the targets will inherit that scope and see the definition. - ``` -### **Patterns** +#### **Patterns** ``` See "gn help label_pattern" for more details on what types of patterns are supported. If a toolchain is specified, only targets in that toolchain will be matched. If a toolchain is not specified on a pattern, targets in all toolchains will be matched. - ``` -### **Examples** +#### **Examples** ``` Only targets in the current buildfile ("private"): @@ -5700,10 +5211,8 @@ Any target in the current directory and any subdirectory thereof, plus any targets in "//bar/" and any subdirectory thereof. visibility = [ "./*", "//bar/*" ] - - ``` -## **write_runtime_deps**: Writes the target's runtime_deps to the given path. +### <a name="write_runtime_deps"></a>**write_runtime_deps**: Writes the target's runtime_deps to the given path. ``` Does not synchronously write the file, but rather schedules it to be written @@ -5722,18 +5231,17 @@ be the main output file of the target itself. The file contents will be the same as requesting the runtime deps be written on the command line (see "gn help --runtime-deps-list-file"). - - ``` -## **Build Arguments Overview** +## <a name="other"></a>Other help topics + +### <a name="buildargs"></a>**Build Arguments Overview** ``` Build arguments are variables passed in from outside of the build that build files can query to determine how the build works. - ``` -### **How build arguments are set** +#### **How build arguments are set** ``` First, system default arguments are set based on the current system. The @@ -5760,10 +5268,9 @@ If you specify an override for a build argument that never appears in a "declare_args" call, a nonfatal error will be displayed. - ``` -### **Examples** +#### **Examples** ``` gn args out/FooBar @@ -5776,10 +5283,9 @@ This will overwrite the build directory with the given arguments. (Note that the quotes inside the args command will usually need to be escaped for your shell to pass through strings values.) - ``` -### **How build arguments are used** +#### **How build arguments are used** ``` If you want to use an argument, you use declare_args() and specify default @@ -5791,10 +5297,8 @@ passed to all buildfiles. Individual build files can also specify arguments that apply only to those files. It is also useful to specify build args in an "import"-ed file if you want such arguments to apply to multiple buildfiles. - - ``` -## **.gn file** +### <a name="dotfile"></a>**.gn file** ``` When gn starts, it will search the current directory and parent directories @@ -5809,10 +5313,9 @@ --dotfile: gn gen out/Debug --root=/home/build --dotfile=/home/my_gn_file.gn - ``` -### **Variables** +#### **Variables** ``` arg_file_template [optional] @@ -5875,10 +5378,9 @@ This is intended to be used when subprojects declare arguments with default values that need to be changed for whatever reason. - ``` -### **Example .gn file contents** +#### **Example .gn file contents** ``` buildconfig = "//build/config/BUILDCONFIG.gn" @@ -5897,12 +5399,10 @@ is_debug = false is_component_build = false } - - ``` -## **Build graph and execution overview** +### <a name="execution"></a>**Build graph and execution overview** -### **Overall build flow** +#### **Overall build flow** ``` 1. Look for ".gn" file (see "gn help dotfile") in the current directory and @@ -5925,10 +5425,9 @@ file to disk. 6. When all targets are resolved, write out the root build.ninja file. - ``` -### **Executing target definitions and templates** +#### **Executing target definitions and templates** ``` Build files are loaded in parallel. This means it is impossible to @@ -5953,10 +5452,9 @@ definitions that can be overridden by the target code as necessary. Typically this mechanism is used to inject a default set of configs that define the global compiler and linker flags. - ``` -### **Which targets are built** +#### **Which targets are built** ``` All targets encountered in the default toolchain (see "gn help toolchain") @@ -5969,10 +5467,9 @@ toolchain. See also "gn help ninja_rules". - ``` -### **Dependencies** +#### **Dependencies** ``` The only difference between "public_deps" and "deps" except for pushing @@ -5985,21 +5482,18 @@ is linked, but this is not semantically guaranteed and this is undesirable from a build performance perspective. Since we hope to change this in the future, do not rely on this behavior. - - ``` -## **Language and grammar for GN build files** +### <a name="grammar"></a>**Language and grammar for GN build files** -### **Tokens** +#### **Tokens** ``` GN build files are read as sequences of tokens. While splitting the file into tokens, the next token is the longest sequence of characters that form a valid token. - ``` -### **White space and comments** +#### **White space and comments** ``` White space is comprised of spaces (U+0020), horizontal tabs (U+0009), @@ -6009,10 +5503,9 @@ White space and comments are ignored except that they may separate tokens that would otherwise combine into a single token. - ``` -### **Identifiers** +#### **Identifiers** ``` Identifiers name variables and functions. @@ -6020,19 +5513,17 @@ identifier = letter { letter | digit } . letter = "A" ... "Z" | "a" ... "z" | "_" . digit = "0" ... "9" . - ``` -### **Keywords** +#### **Keywords** ``` The following keywords are reserved and may not be used as identifiers: else false if true - ``` -### **Integer literals** +#### **Integer literals** ``` An integer literal represents a decimal integer value. @@ -6040,10 +5531,9 @@ integer = [ "-" ] digit { digit } . Leading zeros and negative zero are disallowed. - ``` -### **String literals** +#### **String literals** ``` A string literal represents a string value consisting of the quoted @@ -6075,10 +5565,9 @@ "$var_one/$var_two" Use the "${var_one}" format to be explicitly deliniate the variable for otherwise-ambiguous cases. - ``` -### **Punctuation** +#### **Punctuation** ``` The following character sequences represent punctuation: @@ -6087,10 +5576,9 @@ - -= < <= [ ] ! = > >= { } && || . , - ``` -### **Grammar** +#### **Grammar** ``` The input tokens form a syntax tree following a context-free grammar: @@ -6125,10 +5613,9 @@ | "||" . // lowest priority All binary operators are left-associative. - ``` -### **Types** +#### **Types** ``` The GN language is dynamically typed. The following types are used: @@ -6148,10 +5635,9 @@ - Scopes: Scopes are like dictionaries that use variable names for keys. See "Scopes" below for more. - ``` -### **Lists** +#### **Lists** ``` Lists are created with [] and using commas to separate items: @@ -6185,10 +5671,9 @@ When assigning to a list named 'sources' using '=' or '+=', list items may be automatically filtered out. See "gn help set_sources_assignment_filter" for more. - ``` -### **Scopes** +#### **Scopes** ``` All execution happens in the context of a scope which holds the current state @@ -6220,10 +5705,8 @@ myvalues.foo += 2 empty_scope.new_thing = [ 1, 2, 3 ] - - ``` -## **input_conversion**: Specifies how to transform input to a variable. +### <a name="input_conversion"></a>**input_conversion**: Specifies how to transform input to a variable. ``` input_conversion is an argument to read_file and exec_script that specifies @@ -6274,10 +5757,8 @@ Note that "trim value" is useless because the value parser skips whitespace anyway. - - ``` -## **Label patterns** +### <a name="label_pattern"></a>**Label patterns** ``` A label pattern is a way of expressing one or more labels in a portion of the @@ -6311,10 +5792,8 @@ "//foo/*(//build/toolchain:win)" All targets in //foo and any subdirectory using the Windows toolchain. - - ``` -## **About labels** +### <a name="labels"></a>**About labels** ``` Everything that can participate in the dependency graph (targets, configs, @@ -6331,10 +5810,9 @@ /usr/local/foo:bar (Posix) /C:/Program Files/MyLibs:bar (Windows) - ``` -### **Toolchains** +#### **Toolchains** ``` A canonical label includes the label of the toolchain being used. Normally, @@ -6345,10 +5823,9 @@ Here GN will look for the toolchain definition called "msvc" in the file "//build/toolchain/win" to know how to compile this target. - ``` -### **Relative labels** +#### **Relative labels** ``` If you want to refer to something in the same buildfile, you can omit @@ -6365,10 +5842,9 @@ source/plugin:myplugin ../net:url_request - ``` -### **Implicit names** +#### **Implicit names** ``` If a name is unspecified, it will inherit the directory name. Stylistically, @@ -6376,12 +5852,10 @@ //net -> //net:net //tools/gn -> //tools/gn:gn - - ``` -## **Ninja build rules** +### <a name="ninja_rules"></a>**Ninja build rules** -### **The "all" and "default" rules** +#### **The "all" and "default" rules** ``` All generated targets (see "gn help execution") will be added to an implicit @@ -6389,10 +5863,9 @@ default rule will be used by Ninja if no specific target is specified (just typing "ninja"). If there is a target named "//:default" it will be the default build rule, otherwise the implicit "all" rule will be used. - ``` -### **Phony rules** +#### **Phony rules** ``` GN generates Ninja "phony" rules for targets in the default toolchain. The @@ -6427,10 +5900,8 @@ To explicitly compile a target in a non-default toolchain, you must give Ninja the exact name of the output file relative to the build directory. - - ``` -## **nogncheck**: Skip an include line from checking. +### <a name="nogncheck"></a>**nogncheck**: Skip an include line from checking. ``` GN's header checker helps validate that the includes match the build @@ -6458,19 +5929,16 @@ But GN's header checker does not understand preprocessor directives, won't know it matches the build dependencies, and will flag this include as incorrect when the condition is false. - ``` -### **More information** +#### **More information** ``` The topic "gn help check" has general information on how checking works and advice on fixing problems. Targets can also opt-out of checking, see "gn help check_includes". - - ``` -## **Runtime dependencies** +### <a name="runtime_deps"></a>**Runtime dependencies** ``` Runtime dependencies of a target are exposed via the "runtime_deps" category @@ -6482,20 +5950,18 @@ "data" files, data directories, and the shared libraries from all transitive dependencies. Executables, shared libraries, and loadable modules are considered runtime dependencies of themselves. - ``` -### **Executables** +#### **Executables** ``` Executable targets and those executable targets' transitive dependencies are not considered unless that executable is listed in "data_deps". Otherwise, GN assumes that the executable (and everything it requires) is a build-time dependency only. - ``` -### **Actions and copies** +#### **Actions and copies** ``` Action and copy targets that are listed as "data_deps" will have all of their @@ -6528,10 +5994,9 @@ list of files required at runtime). - Split B into run-time and build-time versions with the appropriate "deps" for each. - ``` -### **Static libraries and source sets** +#### **Static libraries and source sets** ``` The results of static_library or source_set targets are not considered @@ -6540,19 +6005,16 @@ manually compute the .a/.lib file name for the current platform and list it in the "data" list of a target (possibly on the static library target itself). - ``` -### **Multiple outputs** +#### **Multiple outputs** ``` Linker tools can specify which of their outputs should be considered when computing the runtime deps by setting runtime_outputs. If this is unset on the tool, the default will be the first output only. - - ``` -## **How Source Expansion Works** +### <a name="source_expansion"></a>**How Source Expansion Works** ``` Source expansion is used for the action_foreach and copy target types to map @@ -6571,10 +6033,9 @@ See "gn help copy" and "gn help action_foreach" for more on how this is applied. - ``` -### **Placeholders** +#### **Placeholders** ``` This section discusses only placeholders for actions. There are other @@ -6626,10 +6087,9 @@ output directory. This can only be used in actions and it is an error to use in process_file_template where there is no "target". "//foo/bar/baz.txt" => "baz.txt" - ``` -### **(*) Note on directories** +#### **(*) Note on directories** ``` Paths containing directories (except the source_root_relative_dir) will be @@ -6643,10 +6103,9 @@ relative to the build directory for the script to find. In the other cases, the directories will be source- absolute (begin with a "//") because the results of those expansions will be handled by GN internally. - ``` -### **Examples** +#### **Examples** ``` Non-varying outputs: @@ -6668,30 +6127,29 @@ //out/Debug/obj/mydirectory/input1.cc //out/Debug/obj/mydirectory/input2.h //out/Debug/obj/mydirectory/input2.cc - - ``` +## <a name="switches"></a>Command Line Switches + **Available global switches ** Do "gn help --the_switch_you_want_help_on" for more. Individual commands may take command-specific switches not listed here. See the help on your specific command for more. ``` - -** \--args**: Specifies build arguments overrides. -** \--color**: Force colored output. -** \--dotfile**: Override the name of the ".gn" file. -** \--fail-on-unused-args**: Treat unused build args as fatal errors. -** \--markdown**: Write help output in the Markdown format. -** \--nocolor**: Force non-colored output. -** -q**: Quiet mode. Don't print output on success. -** \--root**: Explicitly specify source root. -** \--runtime-deps-list-file**: Save runtime dependencies for targets in file. -** \--script-executable**: Set the executable used to execute scripts. -** \--threads**: Specify number of worker threads. -** \--time**: Outputs a summary of how long everything took. -** \--tracelog**: Writes a Chrome-compatible trace log to the given file. -** -v**: Verbose logging. -** \--version**: Prints the GN version number and exits. - + * [--args: Specifies build arguments overrides.](#--args) + * [--color: Force colored output.](#--color) + * [--dotfile: Override the name of the ".gn" file.](#--dotfile) + * [--fail-on-unused-args: Treat unused build args as fatal errors.](#--fail-on-unused-args) + * [--markdown: Write help output in the Markdown format.](#--markdown) + * [--nocolor: Force non-colored output.](#--nocolor) + * [-q: Quiet mode. Don't print output on success.](#-q) + * [--root: Explicitly specify source root.](#--root) + * [--runtime-deps-list-file: Save runtime dependencies for targets in file.](#--runtime-deps-list-file) + * [--script-executable: Set the executable used to execute scripts.](#--script-executable) + * [--threads: Specify number of worker threads.](#--threads) + * [--time: Outputs a summary of how long everything took.](#--time) + * [--tracelog: Writes a Chrome-compatible trace log to the given file.](#--tracelog) + * [-v: Verbose logging.](#-v) + * [--version: Prints the GN version number and exits.](#--version) ``` +
diff --git a/tools/gn/docs/standalone.md b/tools/gn/docs/standalone.md index faeb4260..81dd8969 100644 --- a/tools/gn/docs/standalone.md +++ b/tools/gn/docs/standalone.md
@@ -35,7 +35,10 @@ your subproject rather than for all of Chrome. This could be an advantage or a disadvantage. -If you would rather avoid using this file, you can use the command-line -flags `--root` and `--dotfile` to set these values. +If you are in a directory with such a file and you want to not use it +(e.g., to do the full Chrome build instead), you can use the command-line +flags `--root` and `--dotfile` to set the values you want. -# How the standalone and Chrome builds interact +If you want a completely standalone build that has nothing to do w/ Chrome +and doesn't use Chrome's //build files, you can look at an example in +[//tools/gn/example](../example).
diff --git a/tools/gn/escape.cc b/tools/gn/escape.cc index 5f27523..84928ef 100644 --- a/tools/gn/escape.cc +++ b/tools/gn/escape.cc
@@ -6,7 +6,6 @@ #include <stddef.h> -#include "base/containers/stack_container.h" #include "base/logging.h" #include "build/build_config.h" @@ -35,25 +34,22 @@ // Ninja's escaping rules are very simple. We always escape colons even // though they're OK in many places, in case the resulting string is used on // the left-hand-side of a rule. -template<typename DestString> -inline void NinjaEscapeChar(char ch, DestString* dest) { +inline void NinjaEscapeChar(char ch, std::string* dest) { if (ch == '$' || ch == ' ' || ch == ':') dest->push_back('$'); dest->push_back(ch); } -template<typename DestString> void EscapeStringToString_Ninja(const base::StringPiece& str, const EscapeOptions& options, - DestString* dest, + std::string* dest, bool* needed_quoting) { for (const auto& elem : str) NinjaEscapeChar(elem, dest); } -template<typename DestString> void EscapeStringToString_NinjaPreformatted(const base::StringPiece& str, - DestString* dest) { + std::string* dest) { // Only Ninja-escape $. for (const auto& elem : str) { if (elem == '$') @@ -70,10 +66,9 @@ // See: // http://blogs.msdn.com/b/twistylittlepassagesallalike/archive/2011/04/23/everyone-quotes-arguments-the-wrong-way.aspx // http://blogs.msdn.com/b/oldnewthing/archive/2010/09/17/10063629.aspx -template<typename DestString> void EscapeStringToString_WindowsNinjaFork(const base::StringPiece& str, const EscapeOptions& options, - DestString* dest, + std::string* dest, bool* needed_quoting) { // We assume we don't have any whitespace chars that aren't spaces. DCHECK(str.find_first_of("\r\n\v\t") == std::string::npos); @@ -116,10 +111,9 @@ } } -template<typename DestString> void EscapeStringToString_PosixNinjaFork(const base::StringPiece& str, const EscapeOptions& options, - DestString* dest, + std::string* dest, bool* needed_quoting) { for (const auto& elem : str) { if (elem == '$' || elem == ' ') { @@ -145,10 +139,9 @@ } } -template<typename DestString> void EscapeStringToString(const base::StringPiece& str, const EscapeOptions& options, - DestString* dest, + std::string* dest, bool* needed_quoting) { switch (options.mode) { case ESCAPE_NONE: @@ -202,8 +195,8 @@ void EscapeStringToStream(std::ostream& out, const base::StringPiece& str, const EscapeOptions& options) { - base::StackString<256> escaped; - EscapeStringToString(str, options, &escaped.container(), nullptr); - if (!escaped->empty()) - out.write(escaped->data(), escaped->size()); + std::string escaped; + EscapeStringToString(str, options, &escaped, nullptr); + if (!escaped.empty()) + out.write(escaped.data(), escaped.size()); }
diff --git a/tools/gn/standard_out.cc b/tools/gn/standard_out.cc index 6f7dcc8f..8a6b7ef6 100644 --- a/tools/gn/standard_out.cc +++ b/tools/gn/standard_out.cc
@@ -193,16 +193,41 @@ #endif +void PrintSectionHelp(const std::string& line, + const std::string& topic, + const std::string& tag) { + EnsureInitialized(); + + if (is_markdown) { + OutputString("* [" + line + "](#" + tag + ")\n"); + } else if (topic.size()) { + OutputString("\n" + line + " (type \"gn help " + topic + + "\" for more help):\n"); + } else { + OutputString("\n" + line + ":\n"); + } +} + void PrintShortHelp(const std::string& line) { EnsureInitialized(); size_t colon_offset = line.find(':'); size_t first_normal = 0; if (colon_offset != std::string::npos) { - OutputString(" " + line.substr(0, colon_offset), DECORATION_YELLOW); - first_normal = colon_offset; + if (is_markdown) { + OutputString(" * [" + line + "](#" + line.substr(0, colon_offset) + + ")\n"); + } else { + OutputString(" " + line.substr(0, colon_offset), DECORATION_YELLOW); + first_normal = colon_offset; + } + } else if (is_markdown) { + OutputString(" * [" + line + "](" + line + ")\n"); } + if (is_markdown) + return; + // See if the colon is followed by a " [" and if so, dim the contents of [ ]. if (first_normal > 0 && line.size() > first_normal + 2 && @@ -221,19 +246,23 @@ OutputString(line.substr(first_normal) + "\n"); } -void PrintLongHelp(const std::string& text) { +void PrintLongHelp(const std::string& text, const std::string& tag) { EnsureInitialized(); bool first_header = true; bool in_body = false; + std::size_t empty_lines = 0; for (const std::string& line : base::SplitString( text, "\n", base::KEEP_WHITESPACE, base::SPLIT_WANT_ALL)) { // Check for a heading line. if (!line.empty() && line[0] != ' ') { + // New paragraph, just skip any trailing empty lines. + empty_lines = 0; + if (is_markdown) { // GN's block-level formatting is converted to markdown as follows: - // * The first heading is treated as an H2. - // * Subsequent heading are treated as H3s. + // * The first heading is treated as an H3. + // * Subsequent heading are treated as H4s. // * Any other text is wrapped in a code block and displayed as-is. // // Span-level formatting (the decorations) is converted inside @@ -244,10 +273,18 @@ } if (first_header) { - OutputString("## ", DECORATION_NONE); + std::string the_tag = tag; + if (the_tag.size() == 0) { + if (line.substr(0, 2) == "gn") { + the_tag = line.substr(3, line.substr(3).find(' ')); + } else { + the_tag = line.substr(0, line.find(':')); + } + } + OutputString("### <a name=\"" + the_tag + "\"></a>", DECORATION_NONE); first_header = false; } else { - OutputString("### ", DECORATION_NONE); + OutputString("#### ", DECORATION_NONE); } } @@ -257,13 +294,26 @@ chars_to_highlight = line.size(); OutputString(line.substr(0, chars_to_highlight), DECORATION_YELLOW); - OutputString(line.substr(chars_to_highlight) + "\n"); + OutputString(line.substr(chars_to_highlight)); + OutputString("\n"); continue; } else if (is_markdown && !line.empty() && !in_body) { OutputString("```\n", DECORATION_NONE); in_body = true; } + // We buffer empty lines, so we can skip them if needed + // (i.e. new paragraph body, end of final paragraph body). + if (in_body && is_markdown) { + if (!line.empty() && empty_lines != 0) { + OutputString(std::string(empty_lines, '\n')); + empty_lines = 0; + } else if (line.empty()) { + ++empty_lines; + continue; + } + } + // Check for a comment. TextDecoration dec = DECORATION_NONE; for (const auto& elem : line) { @@ -280,6 +330,6 @@ } if (is_markdown && in_body) - OutputString("\n```\n"); + OutputString("```\n"); }
diff --git a/tools/gn/standard_out.h b/tools/gn/standard_out.h index 9ccbe52..f2bb733b 100644 --- a/tools/gn/standard_out.h +++ b/tools/gn/standard_out.h
@@ -19,6 +19,12 @@ void OutputString(const std::string& output, TextDecoration dec = DECORATION_NONE); +// If printing markdown, this generates table-of-contents entries with +// links to the actual help; otherwise, prints a one-line description. +void PrintSectionHelp(const std::string& line, + const std::string& topic, + const std::string& tag); + // Prints a line for a command, assuming there is a colon. Everything before // the colon is the command (and is highlighted). After the colon if there is // a square bracket, the contents of the bracket is dimmed. @@ -30,6 +36,6 @@ // - Lines beginning with non-whitespace are highlighted up to the first // colon (or the whole line if not). // - Lines whose first non-whitespace character is a # are dimmed. -void PrintLongHelp(const std::string& text); +void PrintLongHelp(const std::string& text, const std::string& tag = ""); #endif // TOOLS_GN_STANDARD_OUT_H_
diff --git a/tools/gn/value.cc b/tools/gn/value.cc index b5e21f0..0afbc7d 100644 --- a/tools/gn/value.cc +++ b/tools/gn/value.cc
@@ -73,7 +73,7 @@ scope_value_ = other.scope_value_->MakeClosure(); } -Value::Value(Value&& other) = default; +Value::Value(Value&& other) noexcept = default; Value::~Value() { }
diff --git a/tools/gn/value.h b/tools/gn/value.h index 0428818e..3ce0117f 100644 --- a/tools/gn/value.h +++ b/tools/gn/value.h
@@ -43,7 +43,7 @@ Value(const ParseNode* origin, std::unique_ptr<Scope> scope); Value(const Value& other); - Value(Value&& other); + Value(Value&& other) noexcept; ~Value(); Value& operator=(const Value& other);
diff --git a/tools/gn/visual_studio_writer.cc b/tools/gn/visual_studio_writer.cc index 6e0b1bd..aa01d821 100644 --- a/tools/gn/visual_studio_writer.cc +++ b/tools/gn/visual_studio_writer.cc
@@ -39,7 +39,7 @@ struct SemicolonSeparatedWriter { void operator()(const std::string& value, std::ostream& out) const { - out << value + ';'; + out << XmlEscape(value) + ';'; } }; @@ -71,10 +71,13 @@ const char kToolsetVersionVs2013[] = "v120"; // Visual Studio 2013 const char kToolsetVersionVs2015[] = "v140"; // Visual Studio 2015 +const char kToolsetVersionVs2017[] = "v141"; // Visual Studio 2017 const char kProjectVersionVs2013[] = "12.0"; // Visual Studio 2013 const char kProjectVersionVs2015[] = "14.0"; // Visual Studio 2015 +const char kProjectVersionVs2017[] = "15.0"; // Visual Studio 2015 const char kVersionStringVs2013[] = "Visual Studio 2013"; // Visual Studio 2013 const char kVersionStringVs2015[] = "Visual Studio 2015"; // Visual Studio 2015 +const char kVersionStringVs2017[] = "Visual Studio 2017"; // Visual Studio 2017 const char kWindowsKitsVersion[] = "10"; // Windows 10 SDK const char kWindowsKitsIncludeVersion[] = "10.0.14393.0"; // Windows 10 SDK @@ -273,6 +276,11 @@ toolset_version_ = kToolsetVersionVs2015; version_string_ = kVersionStringVs2015; break; + case Version::Vs2017: + project_version_ = kProjectVersionVs2017; + toolset_version_ = kToolsetVersionVs2017; + version_string_ = kVersionStringVs2017; + break; default: NOTREACHED() << "Not a valid Visual Studio Version: " << version; }
diff --git a/tools/gn/visual_studio_writer.h b/tools/gn/visual_studio_writer.h index 639be09e..17935731 100644 --- a/tools/gn/visual_studio_writer.h +++ b/tools/gn/visual_studio_writer.h
@@ -28,7 +28,8 @@ public: enum Version { Vs2013 = 1, // Visual Studio 2013 - Vs2015 // Visual Studio 2015 + Vs2015, // Visual Studio 2015 + Vs2017 // Visual Studio 2017 }; // Writes Visual Studio project and solution files. |sln_name| is the optional
diff --git a/tools/gn/xcode_object.cc b/tools/gn/xcode_object.cc index 9d574a5..b8c8502 100644 --- a/tools/gn/xcode_object.cc +++ b/tools/gn/xcode_object.cc
@@ -244,6 +244,8 @@ return "PBXAggregateTarget"; case PBXBuildFileClass: return "PBXBuildFile"; + case PBXContainerItemProxyClass: + return "PBXContainerItemProxy"; case PBXFileReferenceClass: return "PBXFileReference"; case PBXFrameworksBuildPhaseClass: @@ -258,6 +260,8 @@ return "PBXShellScriptBuildPhase"; case PBXSourcesBuildPhaseClass: return "PBXSourcesBuildPhase"; + case PBXTargetDependencyClass: + return "PBXTargetDependency"; case XCBuildConfigurationClass: return "XCBuildConfiguration"; case XCConfigurationListClass: @@ -323,6 +327,11 @@ PBXTarget::~PBXTarget() {} +void PBXTarget::AddDependency(std::unique_ptr<PBXTargetDependency> dependency) { + DCHECK(dependency); + dependencies_.push_back(std::move(dependency)); +} + std::string PBXTarget::Name() const { return name_; } @@ -330,9 +339,10 @@ void PBXTarget::Visit(PBXObjectVisitor& visitor) { PBXObject::Visit(visitor); configurations_->Visit(visitor); - for (const auto& build_phase : build_phases_) { + for (const auto& dependency : dependencies_) + dependency->Visit(visitor); + for (const auto& build_phase : build_phases_) build_phase->Visit(visitor); - } } // PBXAggregateTarget --------------------------------------------------------- @@ -399,6 +409,37 @@ out << "};\n"; } +// PBXContainerItemProxy ------------------------------------------------------ +PBXContainerItemProxy::PBXContainerItemProxy(const PBXProject* project, + const PBXTarget* target) + : project_(project), target_(target) {} + +PBXContainerItemProxy::~PBXContainerItemProxy() {} + +PBXObjectClass PBXContainerItemProxy::Class() const { + return PBXContainerItemProxyClass; +} + +void PBXContainerItemProxy::Visit(PBXObjectVisitor& visitor) { + PBXObject::Visit(visitor); +} + +std::string PBXContainerItemProxy::Name() const { + return "PBXContainerItemProxy"; +} + +void PBXContainerItemProxy::Print(std::ostream& out, unsigned indent) const { + const std::string indent_str(indent, '\t'); + const IndentRules rules = {true, 0}; + out << indent_str << Reference() << " = {"; + PrintProperty(out, rules, "isa", ToString(Class())); + PrintProperty(out, rules, "containerPortal", project_); + PrintProperty(out, rules, "proxyType", 1u); + PrintProperty(out, rules, "remoteGlobalIDString", target_); + PrintProperty(out, rules, "remoteInfo", target_->Name()); + out << indent_str << "};\n"; +} + // PBXFileReference ----------------------------------------------------------- PBXFileReference::PBXFileReference(const std::string& name, @@ -604,7 +645,7 @@ PrintProperty(out, rules, "buildConfigurationList", configurations_); PrintProperty(out, rules, "buildPhases", build_phases_); PrintProperty(out, rules, "buildRules", EmptyPBXObjectVector()); - PrintProperty(out, rules, "dependencies", EmptyPBXObjectVector()); + PrintProperty(out, rules, "dependencies", dependencies_); PrintProperty(out, rules, "name", name_); PrintProperty(out, rules, "productName", product_name_); PrintProperty(out, rules, "productReference", product_reference_); @@ -843,6 +884,33 @@ out << indent_str << "};\n"; } +PBXTargetDependency::PBXTargetDependency( + const PBXTarget* target, + std::unique_ptr<PBXContainerItemProxy> container_item_proxy) + : target_(target), container_item_proxy_(std::move(container_item_proxy)) {} + +PBXTargetDependency::~PBXTargetDependency() {} + +PBXObjectClass PBXTargetDependency::Class() const { + return PBXTargetDependencyClass; +} +std::string PBXTargetDependency::Name() const { + return "PBXTargetDependency"; +} +void PBXTargetDependency::Visit(PBXObjectVisitor& visitor) { + PBXObject::Visit(visitor); + container_item_proxy_->Visit(visitor); +} +void PBXTargetDependency::Print(std::ostream& out, unsigned indent) const { + const std::string indent_str(indent, '\t'); + const IndentRules rules = {false, indent + 1}; + out << indent_str << Reference() << " = {\n"; + PrintProperty(out, rules, "isa", ToString(Class())); + PrintProperty(out, rules, "target", target_); + PrintProperty(out, rules, "targetProxy", container_item_proxy_); + out << indent_str << "};\n"; +} + // XCBuildConfiguration ------------------------------------------------------- XCBuildConfiguration::XCBuildConfiguration(const std::string& name,
diff --git a/tools/gn/xcode_object.h b/tools/gn/xcode_object.h index a6ab32ad..c695dbbe 100644 --- a/tools/gn/xcode_object.h +++ b/tools/gn/xcode_object.h
@@ -33,6 +33,7 @@ // Those values needs to stay sorted in alphabetic order. PBXAggregateTargetClass, PBXBuildFileClass, + PBXContainerItemProxyClass, PBXFileReferenceClass, PBXFrameworksBuildPhaseClass, PBXGroupClass, @@ -40,6 +41,7 @@ PBXProjectClass, PBXShellScriptBuildPhaseClass, PBXSourcesBuildPhaseClass, + PBXTargetDependencyClass, XCBuildConfigurationClass, XCConfigurationListClass, }; @@ -50,8 +52,9 @@ class PBXAggregateTarget; class PBXBuildFile; -class PBXFileReference; class PBXBuildPhase; +class PBXContainerItemProxy; +class PBXFileReference; class PBXFrameworksBuildPhase; class PBXGroup; class PBXNativeTarget; @@ -60,6 +63,7 @@ class PBXShellScriptBuildPhase; class PBXSourcesBuildPhase; class PBXTarget; +class PBXTargetDependency; class XCBuildConfiguration; class XCConfigurationList; @@ -122,13 +126,16 @@ const PBXAttributes& attributes); ~PBXTarget() override; - // PXBObject implementation. + void AddDependency(std::unique_ptr<PBXTargetDependency> dependency); + + // PBXObject implementation. std::string Name() const override; void Visit(PBXObjectVisitor& visitor) override; protected: std::unique_ptr<XCConfigurationList> configurations_; std::vector<std::unique_ptr<PBXBuildPhase>> build_phases_; + std::vector<std::unique_ptr<PBXTargetDependency>> dependencies_; PBXSourcesBuildPhase* source_build_phase_; std::string name_; @@ -146,7 +153,7 @@ const PBXAttributes& attributes); ~PBXAggregateTarget() override; - // PXBObject implementation. + // PBXObject implementation. PBXObjectClass Class() const override; void Print(std::ostream& out, unsigned indent) const override; @@ -163,7 +170,7 @@ const CompilerFlags compiler_flag); ~PBXBuildFile() override; - // PXBObject implementation. + // PBXObject implementation. PBXObjectClass Class() const override; std::string Name() const override; void Print(std::ostream& out, unsigned indent) const override; @@ -176,6 +183,25 @@ DISALLOW_COPY_AND_ASSIGN(PBXBuildFile); }; +// PBXContainerItemProxy ------------------------------------------------------ +class PBXContainerItemProxy : public PBXObject { + public: + PBXContainerItemProxy(const PBXProject* project, const PBXTarget* target); + ~PBXContainerItemProxy() override; + + // PBXObject implementation. + PBXObjectClass Class() const override; + std::string Name() const override; + void Visit(PBXObjectVisitor& visitor) override; + void Print(std::ostream& out, unsigned indent) const override; + + private: + const PBXProject* project_; + const PBXTarget* target_; + + DISALLOW_COPY_AND_ASSIGN(PBXContainerItemProxy); +}; + // PBXFileReference ----------------------------------------------------------- class PBXFileReference : public PBXObject { @@ -372,6 +398,27 @@ DISALLOW_COPY_AND_ASSIGN(PBXSourcesBuildPhase); }; +// PBXTargetDependency ----------------------------------------------------- +class PBXTargetDependency : public PBXObject { + public: + PBXTargetDependency( + const PBXTarget* target, + std::unique_ptr<PBXContainerItemProxy> container_item_proxy); + ~PBXTargetDependency() override; + + // PBXObject implementation. + PBXObjectClass Class() const override; + std::string Name() const override; + void Visit(PBXObjectVisitor& visitor) override; + void Print(std::ostream& out, unsigned indent) const override; + + private: + const PBXTarget* target_; + std::unique_ptr<PBXContainerItemProxy> container_item_proxy_; + + DISALLOW_COPY_AND_ASSIGN(PBXTargetDependency); +}; + // XCBuildConfiguration ------------------------------------------------------- class XCBuildConfiguration : public PBXObject {
diff --git a/tools/gn/xcode_writer.cc b/tools/gn/xcode_writer.cc index 41af6289b..c41e4f1 100644 --- a/tools/gn/xcode_writer.cc +++ b/tools/gn/xcode_writer.cc
@@ -33,6 +33,7 @@ using TargetToFileList = std::unordered_map<const Target*, Target::FileList>; using TargetToTarget = std::unordered_map<const Target*, const Target*>; +using TargetToPBXTarget = std::unordered_map<const Target*, PBXTarget*>; const char kEarlGreyFileNameIdentifier[] = "egtest.mm"; const char kXCTestFileNameIdentifier[] = "xctest.mm"; @@ -404,7 +405,7 @@ new PBXProject("products", config_name, source_path, attributes)); SourceDir source_dir("//"); - // Add all source files for indexing. + // Add all source files for indexing, both private and public. std::vector<SourceFile> sources; for (const Target* target : all_targets) { for (const SourceFile& source : target->sources()) { @@ -413,6 +414,16 @@ sources.push_back(source); } + + if (target->all_headers_public()) + continue; + + for (const SourceFile& source : target->public_headers()) { + if (IsStringInOutputDir(build_settings->build_dir(), source.value())) + continue; + + sources.push_back(source); + } } // Sort sources to ensure determinisn of the project file generation and @@ -450,6 +461,8 @@ DCHECK_EQ(xctest_application_targets.size(), xctest_files_per_application_target.size()); + TargetToPBXTarget bundle_target_to_pbxtarget; + std::string build_path; std::unique_ptr<base::Environment> env(base::Environment::Create()); @@ -495,6 +508,8 @@ target->bundle_data().product_type(), GetBuildScript(target->label().name(), ninja_extra_args, env.get()), extra_attributes); + bundle_target_to_pbxtarget.insert( + std::make_pair(target, native_target)); if (!IsXCTestModuleTarget(target)) continue; @@ -525,6 +540,31 @@ } } + // Add corresponding application target as dependency of xctest module target + // so that application target is re-compiled when compiling xctest module + // target. + for (const Target* target : targets) { + if (target->output_type() != Target::CREATE_BUNDLE) + continue; + if (!IsXCTestModuleTarget(target)) + continue; + + const Target* application_target = + FindXCTestApplicationTarget(target, targets); + PBXTarget* application_pbxtarget = + bundle_target_to_pbxtarget[application_target]; + DCHECK(application_pbxtarget); + PBXTarget* xctest_module_pbxtarget = bundle_target_to_pbxtarget[target]; + DCHECK(xctest_module_pbxtarget); + + std::unique_ptr<PBXContainerItemProxy> container_item_proxy( + new PBXContainerItemProxy(main_project.get(), application_pbxtarget)); + std::unique_ptr<PBXTargetDependency> dependency(new PBXTargetDependency( + application_pbxtarget, std::move(container_item_proxy))); + + xctest_module_pbxtarget->AddDependency(std::move(dependency)); + } + projects_.push_back(std::move(main_project)); }
diff --git a/tools/gn/xml_element_writer.cc b/tools/gn/xml_element_writer.cc index fcf34b28..bb0d232 100644 --- a/tools/gn/xml_element_writer.cc +++ b/tools/gn/xml_element_writer.cc
@@ -81,3 +81,35 @@ return out_; } + +std::string XmlEscape(const std::string& value) { + std::string result; + for (char c : value) { + switch (c) { + case '\n': + result += " "; + break; + case '\r': + result += " "; + break; + case '\t': + result += "	"; + break; + case '"': + result += """; + break; + case '<': + result += "<"; + break; + case '>': + result += ">"; + break; + case '&': + result += "&"; + break; + default: + result += c; + } + } + return result; +}
diff --git a/tools/gn/xml_element_writer.h b/tools/gn/xml_element_writer.h index 8a83df0a..01346d23 100644 --- a/tools/gn/xml_element_writer.h +++ b/tools/gn/xml_element_writer.h
@@ -120,4 +120,6 @@ out_, tag, attribute_name, attribute_value_writer, indent_ + 2)); } +std::string XmlEscape(const std::string& value); + #endif // TOOLS_GN_XML_ELEMENT_WRITER_H_
diff --git a/tools/gn/xml_element_writer_unittest.cc b/tools/gn/xml_element_writer_unittest.cc index 93dfd47..cc21c4bb 100644 --- a/tools/gn/xml_element_writer_unittest.cc +++ b/tools/gn/xml_element_writer_unittest.cc
@@ -84,3 +84,10 @@ } EXPECT_EQ("<foo bar=\"baz\">Hello world!</foo>\n", out.str()); } + +TEST(XmlElementWriter, TestXmlEscape) { + std::string input = "\r \n \t & < > \""; + std::string output = XmlEscape(input); + std::string expected = " 	 & < > ""; + EXPECT_EQ(expected, output); +}
diff --git a/tools/grit/grit/testdata/substitute_tmpl.grd b/tools/grit/grit/testdata/substitute_tmpl.grd new file mode 100644 index 0000000..be7b6017 --- /dev/null +++ b/tools/grit/grit/testdata/substitute_tmpl.grd
@@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- --> +<grit + base_dir="." + source_lang_id="en" + tc_project="GoogleDesktopWindowsClient" + latest_public_release="0" + current_release="1" + enc_check="möl"> + <outputs> + <output filename="resource.h" type="rc_header" /> + <output filename="en_${name}_resources.rc" type="rc_all" lang="en" /> + <output filename="sv_${name}_resources.rc" type="rc_all" lang="sv" /> + </outputs> + <translations> + <file path="substitute.xmb" lang="sv" /> + </translations> + <release seq="1" allow_pseudo="false"> + <messages first_id="8192"> + <message name="IDS_COPYRIGHT_GOOGLE_LONG" sub_variable="true" desc="Gadget copyright notice. Needs to be updated every year."> + Copyright 2008 Google Inc. All Rights Reserved. + </message> + <message name="IDS_NEWS_PANEL_COPYRIGHT"> + Google Desktop News gadget +[IDS_COPYRIGHT_GOOGLE_LONG] +View news that is personalized based on the articles you read. + +For example, if you read lots of sports news, you'll see more sports articles. If you read technology news less often, you'll see fewer of those articles. + </message> + </messages> + </release> +</grit>
diff --git a/tools/grit/grit/tool/build.py b/tools/grit/grit/tool/build.py index cab2b37..d2c9ff16 100755 --- a/tools/grit/grit/tool/build.py +++ b/tools/grit/grit/tool/build.py
@@ -352,7 +352,7 @@ else: for output in self.res.GetOutputFiles(): output.output_filename = os.path.abspath(os.path.join( - self.output_directory, output.GetFilename())) + self.output_directory, output.GetOutputFilename())) # If there are whitelisted names, tag the tree once up front, this way # while looping through the actual output, it is just an attribute check. @@ -360,7 +360,7 @@ self.AddWhitelistTags(self.res, self.whitelist_names) for output in self.res.GetOutputFiles(): - self.VerboseOut('Creating %s...' % output.GetFilename()) + self.VerboseOut('Creating %s...' % output.GetOutputFilename()) # Microsoft's RC compiler can only deal with single-byte or double-byte # files (no UTF-8), so we make all RC files UTF-16 to support all @@ -451,7 +451,8 @@ # Compare the absolute path names, sorted. asserted = sorted([os.path.abspath(i) for i in assert_output_files]) actual = sorted([ - os.path.abspath(os.path.join(self.output_directory, i.GetFilename())) + os.path.abspath(os.path.join(self.output_directory, + i.GetOutputFilename())) for i in self.res.GetOutputFiles()]) if asserted != actual: @@ -519,7 +520,7 @@ # Get the first output file relative to the depdir. outputs = self.res.GetOutputFiles() output_file = os.path.join(self.output_directory, - outputs[0].GetFilename()) + outputs[0].GetOutputFilename()) output_file = os.path.relpath(output_file, depdir) # The path prefix to prepend to dependencies in the depfile.
diff --git a/tools/grit/grit/tool/build_unittest.py b/tools/grit/grit/tool/build_unittest.py index 952eff9..1750bfc 100755 --- a/tools/grit/grit/tool/build_unittest.py +++ b/tools/grit/grit/tool/build_unittest.py
@@ -114,6 +114,36 @@ '-a', os.path.abspath( os.path.join(output_dir, 'resource.h'))])) + def testAssertTemplateOutputs(self): + output_dir = tempfile.mkdtemp() + class DummyOpts(object): + def __init__(self): + self.input = util.PathFromRoot('grit/testdata/substitute_tmpl.grd') + self.verbose = False + self.extra_verbose = False + + # Incomplete output file list should fail. + builder_fail = build.RcBuilder() + self.failUnlessEqual(2, + builder_fail.Run(DummyOpts(), [ + '-o', output_dir, + '-E', 'name=foo', + '-a', os.path.abspath( + os.path.join(output_dir, 'en_foo_resources.rc'))])) + + # Complete output file list should succeed. + builder_ok = build.RcBuilder() + self.failUnlessEqual(0, + builder_ok.Run(DummyOpts(), [ + '-o', output_dir, + '-E', 'name=foo', + '-a', os.path.abspath( + os.path.join(output_dir, 'en_foo_resources.rc')), + '-a', os.path.abspath( + os.path.join(output_dir, 'sv_foo_resources.rc')), + '-a', os.path.abspath( + os.path.join(output_dir, 'resource.h'))])) + def _verifyWhitelistedOutput(self, filename, whitelisted_ids,
diff --git a/tools/grit/grit_rule.gni b/tools/grit/grit_rule.gni index d437ee1..367ea816 100644 --- a/tools/grit/grit_rule.gni +++ b/tools/grit/grit_rule.gni
@@ -53,7 +53,7 @@ # unique, since this can cause files from multiple grit targets to # overwrite each other. # -# output_name (optiona) +# output_name (optional) # Provide an alternate base name for the generated files, like the .d # files. Normally these are based on the target name and go in the # output_dir, but if multiple targets with the same name end up in @@ -64,7 +64,7 @@ # Defaults to output_dir # # use_qualified_include (optional) -# If set, output_dir is not added to include_dirs. +# If set to false, output_dir is added to include_dirs. # # configs (optional) # List of additional configs to be applied to the generated target. @@ -351,7 +351,7 @@ # (like "mycomponent/foo.h"). This config sets up the include path. grit_config = target_name + "_grit_config" config(grit_config) { - if (!defined(invoker.use_qualified_include) || + if (defined(invoker.use_qualified_include) && !invoker.use_qualified_include) { include_dirs = [ output_dir ] }
diff --git a/tools/gritsettings/translation_expectations.pyl b/tools/gritsettings/translation_expectations.pyl index 552de7407..6b59db8 100644 --- a/tools/gritsettings/translation_expectations.pyl +++ b/tools/gritsettings/translation_expectations.pyl
@@ -27,6 +27,7 @@ "chrome/app/generated_resources.grd", "chrome/app/google_chrome_strings.grd", "chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings.grd", + "chrome/browser/resources/chromeos/select_to_speak/strings/select_to_speak_strings.grd", "components/components_chromium_strings.grd", "components/components_google_chrome_strings.grd", "components/components_strings.grd",
diff --git a/tools/gypv8sh.py b/tools/gypv8sh.py index d1f246c..e6d655f 100755 --- a/tools/gypv8sh.py +++ b/tools/gypv8sh.py
@@ -45,15 +45,6 @@ (v8_shell, mock_js, test_api, js2webui, test_type, inputfile, inputrelfile, cxxoutfile, jsoutfile) = args cmd = [v8_shell] - icudatafile = os.path.join(os.path.dirname(v8_shell), 'icudtl.dat') - if os.path.exists(icudatafile): - cmd.extend(['--icu-data-file=%s' % icudatafile]) - v8nativesfile = os.path.join(os.path.dirname(v8_shell), 'natives_blob.bin') - if opts.external == 'y' and os.path.exists(v8nativesfile): - cmd.extend(['--natives_blob=%s' % v8nativesfile]) - v8snapshotfile = os.path.join(os.path.dirname(v8_shell), 'snapshot_blob.bin') - if opts.external == 'y' and os.path.exists(v8snapshotfile): - cmd.extend(['--snapshot_blob=%s' % v8snapshotfile]) arguments = [js2webui, inputfile, inputrelfile, opts.deps_js, cxxoutfile, test_type] cmd.extend(['-e', "arguments=" + json.dumps(arguments), mock_js,
diff --git a/tools/ipc_fuzzer/OWNERS b/tools/ipc_fuzzer/OWNERS index 66e501b..1f569281 100644 --- a/tools/ipc_fuzzer/OWNERS +++ b/tools/ipc_fuzzer/OWNERS
@@ -2,4 +2,4 @@ mbarbella@chromium.org tsepez@chromium.org -# COMPONENT: Tools +# COMPONENT: Tools>Stability>Libfuzzer
diff --git a/tools/ipc_fuzzer/fuzzer/BUILD.gn b/tools/ipc_fuzzer/fuzzer/BUILD.gn index 35adabd..f278110 100644 --- a/tools/ipc_fuzzer/fuzzer/BUILD.gn +++ b/tools/ipc_fuzzer/fuzzer/BUILD.gn
@@ -20,6 +20,9 @@ deps = [ "//tools/ipc_fuzzer/message_lib:ipc_message_lib", ] + public_deps = [ + "//ipc", + ] if (is_asan && is_chromeos) { # Compiling fuzzer.cc with ASan takes too long, see # http://crbug.com/360158.
diff --git a/tools/ipc_fuzzer/fuzzer/fuzzer.cc b/tools/ipc_fuzzer/fuzzer/fuzzer.cc index eac733f..ad0b28c95 100644 --- a/tools/ipc_fuzzer/fuzzer/fuzzer.cc +++ b/tools/ipc_fuzzer/fuzzer/fuzzer.cc
@@ -12,6 +12,7 @@ #include "base/macros.h" #include "base/memory/shared_memory_handle.h" #include "base/strings/string_util.h" +#include "base/values.h" #include "build/build_config.h" #include "ipc/ipc_message.h" #include "ipc/ipc_message_utils.h" @@ -537,8 +538,7 @@ char tmp[200]; size_t bin_length = RandInRange(sizeof(tmp)); fuzzer->FuzzData(tmp, bin_length); - p->Set(index, - base::BinaryValue::CreateWithCopiedBuffer(tmp, bin_length)); + p->Set(index, base::Value::CreateWithCopiedBuffer(tmp, bin_length)); break; } case base::Value::Type::DICTIONARY: { @@ -607,8 +607,7 @@ size_t bin_length = RandInRange(sizeof(tmp)); fuzzer->FuzzData(tmp, bin_length); p->SetWithoutPathExpansion( - property, - base::BinaryValue::CreateWithCopiedBuffer(tmp, bin_length)); + property, base::Value::CreateWithCopiedBuffer(tmp, bin_length)); break; } case base::Value::Type::DICTIONARY: { @@ -810,7 +809,7 @@ template <> struct FuzzTraits<content::WebCursor> { static bool Fuzz(content::WebCursor* p, Fuzzer* fuzzer) { - content::WebCursor::CursorInfo info; + content::CursorInfo info; p->GetCursorInfo(&info); // |type| enum is not validated on de-serialization, so pick random value.
diff --git a/tools/ipc_fuzzer/message_lib/BUILD.gn b/tools/ipc_fuzzer/message_lib/BUILD.gn index 6ee6480..90ee0bc9 100644 --- a/tools/ipc_fuzzer/message_lib/BUILD.gn +++ b/tools/ipc_fuzzer/message_lib/BUILD.gn
@@ -11,7 +11,6 @@ "//chrome/common", "//chrome/common/safe_browsing:proto", "//components/network_hints/common", - "//components/pdf/common", "//components/spellcheck/common", "//components/tracing", "//content/child",
diff --git a/tools/ipc_fuzzer/message_lib/all_messages.h b/tools/ipc_fuzzer/message_lib/all_messages.h index ba130c0..f69b497 100644 --- a/tools/ipc_fuzzer/message_lib/all_messages.h +++ b/tools/ipc_fuzzer/message_lib/all_messages.h
@@ -19,7 +19,6 @@ #include "components/nacl/common/nacl_host_messages.h" #endif #include "components/network_hints/common/network_hints_message_generator.h" -#include "components/pdf/common/pdf_message_generator.h" #include "components/spellcheck/common/spellcheck_message_generator.h" #include "components/tracing/common/tracing_messages.h" #include "content/common/all_messages.h"
diff --git a/tools/ipc_fuzzer/message_replay/BUILD.gn b/tools/ipc_fuzzer/message_replay/BUILD.gn index 591b700..13ab40e 100644 --- a/tools/ipc_fuzzer/message_replay/BUILD.gn +++ b/tools/ipc_fuzzer/message_replay/BUILD.gn
@@ -5,10 +5,12 @@ executable("ipc_fuzzer_replay") { configs += [ "//tools/ipc_fuzzer:ipc_fuzzer_tool_config" ] deps = [ - "//ipc", "//mojo/edk/system", "//tools/ipc_fuzzer/message_lib:ipc_message_lib", ] + public_deps = [ + "//ipc", + ] sources = [ "replay.cc", "replay_process.cc",
diff --git a/tools/json_comment_eater/json_comment_eater.py b/tools/json_comment_eater/json_comment_eater.py index d61ece2..17a1525 100755 --- a/tools/json_comment_eater/json_comment_eater.py +++ b/tools/json_comment_eater/json_comment_eater.py
@@ -21,13 +21,12 @@ '''Finds the next token in |tokens| that occurs in |string| from |start|. Returns a tuple (index, token key). ''' - min_index, min_key = (-1, None) - for k in tokens: - index = string.find(k, start) - if index != -1 and (min_index == -1 or index < min_index): - min_index, min_key = (index, k) - return (min_index, min_key) + for index, item in enumerate(string, start): + for k in tokens: + if (string[index:index + len(k)] == k): + return (index, k) + return (-1, None) def _ReadString(input, start, output): output.append('"')
diff --git a/tools/json_schema_compiler/cc_generator.py b/tools/json_schema_compiler/cc_generator.py index 26cab363..0cde6cab 100644 --- a/tools/json_schema_compiler/cc_generator.py +++ b/tools/json_schema_compiler/cc_generator.py
@@ -46,6 +46,7 @@ .Append('#include "base/memory/ptr_util.h"') .Append('#include "base/strings/string_number_conversions.h"') .Append('#include "base/strings/utf_string_conversions.h"') + .Append('#include "base/values.h"') .Append('#include "%s/%s.h"' % (self._namespace.source_file_dir, self._namespace.short_filename)) .Append('#include <set>') @@ -638,7 +639,7 @@ vardot = var + '->' else: vardot = var + '.' - return ('base::BinaryValue::CreateWithCopiedBuffer(' + return ('base::Value::CreateWithCopiedBuffer(' '%sdata(), %ssize())' % (vardot, vardot)) elif underlying_type.property_type == PropertyType.ARRAY: return '%s' % self._util_cc_helper.CreateValueFromArray( @@ -887,7 +888,7 @@ dst_var, failure_value)) elif underlying_type.property_type == PropertyType.BINARY: - (c.Append('const base::BinaryValue* binary_value = NULL;') + (c.Append('const base::Value* binary_value = NULL;') .Sblock('if (!%(src_var)s->IsType(base::Value::Type::BINARY)) {') .Concat(self._GenerateError( '"\'%%(key)s\': expected binary, got " + ' + @@ -898,7 +899,7 @@ (c.Eblock('}') .Sblock('else {') .Append(' binary_value =') - .Append(' static_cast<const base::BinaryValue*>(%(src_var)s);') + .Append(' static_cast<const base::Value*>(%(src_var)s);') ) if is_ptr: (c.Append('%(dst_var)s.reset(new std::vector<char>(') @@ -946,7 +947,8 @@ .Concat(self._GenerateStringToEnumConversion(item_type, '(it)', 'tmp', - failure_value)) + failure_value, + is_ptr=False)) .Append('%s%spush_back(tmp);' % (dst_var, accessor)) .Eblock('}') ) @@ -956,7 +958,8 @@ type_, src_var, dst_var, - failure_value): + failure_value, + is_ptr=True): """Returns Code that converts a string type in |src_var| to an enum with type |type_| in |dst_var|. In the generated code, if |src_var| is not a valid enum name then the function will return |failure_value|. @@ -968,11 +971,14 @@ cpp_type_namespace = '' if type_.namespace != self._namespace: cpp_type_namespace = '%s::' % type_.namespace.unix_name + accessor = '->' if is_ptr else '.' (c.Append('std::string %s;' % enum_as_string) - .Sblock('if (!%s->GetAsString(&%s)) {' % (src_var, enum_as_string)) + .Sblock('if (!%s%sGetAsString(&%s)) {' % (src_var, + accessor, + enum_as_string)) .Concat(self._GenerateError( '"\'%%(key)s\': expected string, got " + ' + - self._util_cc_helper.GetValueTypeString('%%(src_var)s', True))) + self._util_cc_helper.GetValueTypeString('%%(src_var)s', is_ptr))) .Append('return %s;' % failure_value) .Eblock('}') .Append('%s = %sParse%s(%s);' % (dst_var,
diff --git a/tools/json_schema_compiler/cpp_bundle_generator.py b/tools/json_schema_compiler/cpp_bundle_generator.py index 88e0f36..a6531b0 100644 --- a/tools/json_schema_compiler/cpp_bundle_generator.py +++ b/tools/json_schema_compiler/cpp_bundle_generator.py
@@ -32,10 +32,12 @@ # Return a copy so that we don't pollute the global api object, which may be # used elsewhere. ret = copy.deepcopy(schema) - _RemoveKey(ret, "description", basestring) - _RemoveKey(ret, "compiler_options", dict) - _RemoveKey(ret, "nodoc", bool) - _RemoveKey(ret, "noinline_doc", bool) + _RemoveKey(ret, 'description', basestring) + _RemoveKey(ret, 'compiler_options', dict) + _RemoveKey(ret, 'nodoc', bool) + _RemoveKey(ret, 'nocompile', bool) + _RemoveKey(ret, 'noinline_doc', bool) + _RemoveKey(ret, 'jsexterns', object) return ret def _PrefixSchemaWithNamespace(schema): @@ -360,7 +362,7 @@ c.Append('std::map<std::string, const char*> schemas;') c.Eblock('};') c.Append() - c.Append('base::LazyInstance<Static> g_lazy_instance;') + c.Append('base::LazyInstance<Static>::DestructorAtExit g_lazy_instance;') c.Append() c.Append('} // namespace') c.Append()
diff --git a/tools/json_schema_compiler/js_externs_generator_test.py b/tools/json_schema_compiler/js_externs_generator_test.py index 88c2a09f..49462b2 100755 --- a/tools/json_schema_compiler/js_externs_generator_test.py +++ b/tools/json_schema_compiler/js_externs_generator_test.py
@@ -63,6 +63,8 @@ callback BazGreekCallback = void(Baz baz, Greek greek); + callback OptionalParamCallback = void(optional Qux qux); + interface Functions { // Does something exciting! And what's more, this is a multiline function // comment! It goes onto multiple lines! @@ -75,6 +77,8 @@ static void bazGreek(optional BazGreekCallback callback); [deprecated="Use a new method."] static DOMString returnString(); + + static void optionalParam(optional OptionalParamCallback callback); }; interface Events { @@ -205,6 +209,12 @@ chrome.fakeApi.returnString = function() {}; /** + * @param {function((!chrome.fakeApi.Qux|undefined)):void=} callback + * @see https://developer.chrome.com/extensions/fakeApi#method-optionalParam + */ +chrome.fakeApi.optionalParam = function(callback) {}; + +/** * Fired when we realize it's a trap! * @type {!ChromeEvent} * @see https://developer.chrome.com/extensions/fakeApi#event-onTrapDetected
diff --git a/tools/json_schema_compiler/js_util.py b/tools/json_schema_compiler/js_util.py index e563b88..e043f2e 100644 --- a/tools/json_schema_compiler/js_util.py +++ b/tools/json_schema_compiler/js_util.py
@@ -118,7 +118,13 @@ c = Code() c.Append('function(') for i, param in enumerate(function.params): - c.Concat(self._TypeToJsType(namespace_name, param.type_), new_line=False) + t = self._TypeToJsType(namespace_name, param.type_) + if param.optional: + c.Append('(', new_line=False) + c.Concat(t, new_line=False) + c.Append('|undefined)', new_line=False) + else: + c.Concat(t, new_line = False) if i is not len(function.params) - 1: c.Append(', ', new_line=False, strip_right=False) c.Append('):', new_line=False)
diff --git a/tools/json_schema_compiler/json_schema_api.gni b/tools/json_schema_compiler/json_schema_api.gni index 6f4620e8..46cb996f1 100644 --- a/tools/json_schema_compiler/json_schema_api.gni +++ b/tools/json_schema_compiler/json_schema_api.gni
@@ -152,7 +152,8 @@ bundle_generator_schema_name = target_name + "_bundle_generator_schema" action(bundle_generator_schema_name) { script = compiler_script - inputs = compiler_sources + invoker.sources + uncompiled_sources + inputs = compiler_sources + invoker.sources + uncompiled_sources + + uncompiled_bundle_schema_sources outputs = [ "$target_gen_dir/generated_schemas.cc", "$target_gen_dir/generated_schemas.h",
diff --git a/tools/json_schema_compiler/test/error_generation_unittest.cc b/tools/json_schema_compiler/test/error_generation_unittest.cc index e55ecb98..9c22682 100644 --- a/tools/json_schema_compiler/test/error_generation_unittest.cc +++ b/tools/json_schema_compiler/test/error_generation_unittest.cc
@@ -100,8 +100,7 @@ EXPECT_TRUE(TestFunction::Params::Create(*params_value, &error)); } { - std::unique_ptr<base::ListValue> params_value = - List(base::Value::CreateNullValue().release()); + std::unique_ptr<base::ListValue> params_value = List(new Value()); base::string16 error; EXPECT_FALSE(TestFunction::Params::Create(*params_value, &error)); EXPECT_TRUE(EqualsUtf16("'num' is required", error));
diff --git a/tools/json_schema_compiler/test/simple_api_unittest.cc b/tools/json_schema_compiler/test/simple_api_unittest.cc index 29d7637..54c773f2 100644 --- a/tools/json_schema_compiler/test/simple_api_unittest.cc +++ b/tools/json_schema_compiler/test/simple_api_unittest.cc
@@ -4,6 +4,7 @@ #include "tools/json_schema_compiler/test/simple_api.h" +#include "base/memory/ptr_util.h" #include "testing/gtest/include/gtest/gtest.h" using namespace test::api::simple_api; @@ -77,7 +78,7 @@ TEST(JsonSchemaCompilerSimpleTest, OptionalParamsTakingNull) { { std::unique_ptr<base::ListValue> params_value(new base::ListValue()); - params_value->Append(base::Value::CreateNullValue()); + params_value->Append(base::MakeUnique<base::Value>()); std::unique_ptr<OptionalString::Params> params( OptionalString::Params::Create(*params_value)); EXPECT_TRUE(params.get()); @@ -98,7 +99,7 @@ TEST(JsonSchemaCompilerSimpleTest, OptionalBeforeRequired) { { std::unique_ptr<base::ListValue> params_value(new base::ListValue()); - params_value->Append(base::Value::CreateNullValue()); + params_value->Append(base::MakeUnique<base::Value>()); params_value->AppendString("asdf"); std::unique_ptr<OptionalBeforeRequired::Params> params( OptionalBeforeRequired::Params::Create(*params_value));
diff --git a/tools/json_schema_compiler/util.cc b/tools/json_schema_compiler/util.cc index 9f4286a7..983dc66 100644 --- a/tools/json_schema_compiler/util.cc +++ b/tools/json_schema_compiler/util.cc
@@ -69,7 +69,7 @@ } bool PopulateItem(const base::Value& from, std::vector<char>* out) { - const base::BinaryValue* binary = nullptr; + const base::Value* binary = nullptr; if (!from.GetAsBinary(&binary)) return false; out->assign(binary->GetBuffer(), binary->GetBuffer() + binary->GetSize()); @@ -79,7 +79,7 @@ bool PopulateItem(const base::Value& from, std::vector<char>* out, base::string16* error) { - const base::BinaryValue* binary = nullptr; + const base::Value* binary = nullptr; if (!from.GetAsBinary(&binary)) return ReportError(from, base::Value::Type::BINARY, error); out->assign(binary->GetBuffer(), binary->GetBuffer() + binary->GetSize()); @@ -134,8 +134,7 @@ } void AddItemToList(const std::vector<char>& from, base::ListValue* out) { - out->Append( - base::BinaryValue::CreateWithCopiedBuffer(from.data(), from.size())); + out->Append(base::Value::CreateWithCopiedBuffer(from.data(), from.size())); } void AddItemToList(const std::unique_ptr<base::Value>& from,
diff --git a/tools/json_schema_compiler/util.h b/tools/json_schema_compiler/util.h index d7862ce..8d206a66 100644 --- a/tools/json_schema_compiler/util.h +++ b/tools/json_schema_compiler/util.h
@@ -102,7 +102,7 @@ out->clear(); T item; for (const auto& value : list) { - if (!PopulateItem(*value, &item)) + if (!PopulateItem(value, &item)) return false; // T might not be movable, but in that case it should be copyable, and this // will still work. @@ -121,7 +121,7 @@ out->clear(); T item; for (const auto& value : list) { - if (!PopulateItem(*value, &item, error)) + if (!PopulateItem(value, &item, error)) return false; out->push_back(std::move(item)); }
diff --git a/tools/licenses.py b/tools/licenses.py index b5b68ff..97600d4 100755 --- a/tools/licenses.py +++ b/tools/licenses.py
@@ -18,8 +18,10 @@ import argparse import cgi import os +import shutil import subprocess import sys +import tempfile # TODO(agrieve): Move build_utils.WriteDepFile into a non-android directory. _REPOSITORY_ROOT = os.path.dirname(os.path.dirname(__file__)) @@ -358,7 +360,7 @@ readme_path = os.path.join(root, path, 'README.chromium') if not os.path.exists(readme_path): raise LicenseError("missing README.chromium or licenses.py " - "SPECIAL_CASES entry") + "SPECIAL_CASES entry in %s" % path) for line in open(readme_path): line = line.strip() @@ -462,12 +464,42 @@ return FilterDirsWithFiles(third_party_dirs, root) +# Many builders do not contain 'gn' in their PATH, so use the GN binary from +# //buildtools. +def _GnBinary(): + exe = 'gn' + if sys.platform == 'linux2': + subdir = 'linux64' + elif sys.platform == 'darwin': + subdir = 'mac' + elif sys.platform == 'win32': + subdir, exe = 'win', 'gn.exe' + else: + raise RuntimeError("Unsupported platform '%s'." % sys.platform) + + return os.path.join(_REPOSITORY_ROOT, 'buildtools', subdir, exe) + + def FindThirdPartyDeps(gn_out_dir, gn_target): if not gn_out_dir: raise RuntimeError("--gn-out-dir is required if --gn-target is used.") - gn_deps = subprocess.check_output(["gn", "desc", gn_out_dir, gn_target, - "deps", "--as=buildfile", "--all"]) + # Generate gn project in temp directory and use it to find dependencies. + # Current gn directory cannot be used when we run this script in a gn action + # rule, because gn doesn't allow recursive invocations due to potential side + # effects. + tmp_dir = None + try: + tmp_dir = tempfile.mkdtemp(dir = gn_out_dir) + shutil.copy(os.path.join(gn_out_dir, "args.gn"), tmp_dir) + subprocess.check_output([_GnBinary(), "gen", tmp_dir]) + gn_deps = subprocess.check_output([ + _GnBinary(), "desc", tmp_dir, gn_target, + "deps", "--as=buildfile", "--all"]) + finally: + if tmp_dir and os.path.exists(tmp_dir): + shutil.rmtree(tmp_dir) + third_party_deps = set() for build_dep in gn_deps.split(): if ("third_party" in build_dep and @@ -568,8 +600,16 @@ escape=False) if output_file: - with open(output_file, 'w') as output: - output.write(template_contents) + changed = True + try: + old_output = open(output_file, 'r').read() + if old_output == template_contents: + changed = False + except: + pass + if changed: + with open(output_file, 'w') as output: + output.write(template_contents) else: print template_contents @@ -589,6 +629,53 @@ return True +def _ReadFile(path): + """Reads a file from disk. + Args: + path: The path of the file to read, relative to the root of the + repository. + Returns: + The contents of the file as a string. + """ + with open(os.path.join(_REPOSITORY_ROOT, path), 'rb') as f: + return f.read() + + +def GenerateLicenseFile(output_file, gn_out_dir, gn_target): + """Generate a plain-text LICENSE file which can be used when you ship a part + of Chromium code (specified by gn_target) as a stand-alone library + (e.g., //ios/web_view). + + The LICENSE file contains licenses of both Chromium and third-party + libraries which gn_target depends on. """ + + third_party_dirs = FindThirdPartyDeps(gn_out_dir, gn_target) + + # Start with Chromium's LICENSE file. + content = [_ReadFile('LICENSE')] + + # Add necessary third_party. + for directory in sorted(third_party_dirs): + metadata = ParseDir( + directory, _REPOSITORY_ROOT, require_license_file=True) + content.append('-' * 20) + content.append(directory.split('/')[-1]) + content.append('-' * 20) + license_file = metadata['License File'] + if license_file and license_file != NOT_SHIPPED: + content.append(_ReadFile(license_file)) + + content_text = '\n'.join(content) + + if output_file: + with open(output_file, 'w') as output: + output.write(content_text) + else: + print content_text + + return True + + def main(): parser = argparse.ArgumentParser() parser.add_argument('--file-template', @@ -601,7 +688,8 @@ help='GN output directory for scanning dependencies.') parser.add_argument('--gn-target', help='GN target to scan for dependencies.') - parser.add_argument('command', choices=['help', 'scan', 'credits']) + parser.add_argument('command', + choices=['help', 'scan', 'credits', 'license_file']) parser.add_argument('output_file', nargs='?') build_utils.AddDepfileOption(parser) args = parser.parse_args() @@ -614,6 +702,10 @@ args.output_file, args.target_os, args.gn_out_dir, args.gn_target, args.depfile): return 1 + elif args.command == 'license_file': + if not GenerateLicenseFile( + args.output_file, args.gn_out_dir, args.gn_target): + return 1 else: print __doc__ return 1
diff --git a/tools/mb/OWNERS b/tools/mb/OWNERS index 2140fa5..f7dae03 100644 --- a/tools/mb/OWNERS +++ b/tools/mb/OWNERS
@@ -1,4 +1,8 @@ -brettw@chromium.org -phajdan.jr@chromium.org dpranke@chromium.org +jbudorick@chromium.org +phajdan.jr@chromium.org scottmg@chromium.org +tansell@chromium.org + +# TEAM: infra-dev@chromium.org +# COMPONENT: Build
diff --git a/tools/mb/mb.py b/tools/mb/mb.py index 917f3c6..1aea7a384 100755 --- a/tools/mb/mb.py +++ b/tools/mb/mb.py
@@ -748,6 +748,11 @@ if 'cros_passthrough' in mixin_vals: vals['cros_passthrough'] = mixin_vals['cros_passthrough'] + if 'args_file' in mixin_vals: + if vals['args_file']: + raise MBErr('args_file specified multiple times in mixins ' + 'for %s on %s' % (self.args.builder, self.args.master)) + vals['args_file'] = mixin_vals['args_file'] if 'gn_args' in mixin_vals: if vals['gn_args']: vals['gn_args'] += ' ' + mixin_vals['gn_args'] @@ -1059,15 +1064,16 @@ isolate_map = self.ReadIsolateMap() android = 'target_os="android"' in vals['gn_args'] - ozone = 'use_ozone=true' in vals['gn_args'] - chromeos = 'target_os="chromeos"' in vals['gn_args'] # This should be true if tests with type='windowed_test_launcher' are # expected to run using xvfb. For example, Linux Desktop, X11 CrOS and - # Ozone CrOS builds. + # Ozone CrOS builds. Note that one Ozone build can be used to run differen + # backends. Currently, tests are executed for the headless and X11 backends + # and both can run under Xvfb. + # TODO(tonikitoo,msisov,fwang): Find a way to run tests for the Wayland + # backend. use_xvfb = (self.platform == 'linux2' and - not android and - ((not ozone) or (ozone and chromeos))) + not android) asan = 'is_asan=true' in vals['gn_args'] msan = 'is_msan=true' in vals['gn_args'] @@ -1086,14 +1092,12 @@ output_path=None) if android and test_type != "script": - # TODO(crbug.com/693203): Reenable logcat logdog uploading when outage - # has been resolved. cmdline = [ - self.PathJoin('bin', 'run_%s' % target), - '--logcat-output-file', '${ISOLATED_OUTDIR}/logcats', + '../../build/android/test_wrapper/logdog_wrapper.py', + '--target', target, '--target-devices-file', '${SWARMING_BOT_FILE}', - '-v' - ] + '--logdog-bin-cmd', '../../bin/logdog_butler', + '--logcat-output-file', '${ISOLATED_OUTDIR}/logcats'] elif use_xvfb and test_type == 'windowed_test_launcher': extra_files = [ '../../testing/test_env.py',
diff --git a/tools/mb/mb_config.pyl b/tools/mb/mb_config.pyl index 4ac66145..79009a2 100644 --- a/tools/mb/mb_config.pyl +++ b/tools/mb/mb_config.pyl
@@ -14,7 +14,7 @@ # below). MB uses this dict to look up which config to use for a given bot. 'masters': { 'chromeos.chrome': { - 'amd64-generic Trusty (Informational)': 'cros_chrome_sdk', + 'chrome-tot-chromeos-amd64-generic': 'cros_chrome_sdk', 'Chrome4CROS Packages': 'chromeos_with_codecs_release_bot', 'Linux ChromeOS Buildspec Tests': 'chromeos_with_codecs_release_bot', }, @@ -105,7 +105,8 @@ 'CFI Linux CF': 'cfi_full_cfi_diag_release_static', 'CFI Linux ToT': 'cfi_full_clang_tot_release_static', 'CFI Linux': 'cfi_release_static', - 'CFI Linux Full': 'cfi_full_release_static', + 'CFI Linux Full': 'cfi_thin_lto_full_release_static_use_lld', + 'CFI ThinLTO Linux ToT': 'cfi_thin_lto_clang_tot_full_symbols_release_static_use_lld', 'Chromium Linux Goma Canary': 'release_bot', 'Chromium Linux Goma Canary': 'release_bot', 'Chromium Linux Goma Canary (clobber)': 'release_bot', @@ -119,6 +120,7 @@ 'Chromium Mac 10.9 Goma Canary (clobber)': 'release_bot', 'Chromium Mac 10.9 Goma Canary (dbg)': 'debug_bot', 'Chromium Mac 10.9 Goma Canary (dbg)(clobber)': 'debug_bot', + 'Chromium Mac Goma Canary LocalOutputCache': 'release_bot', 'Chromium Win PGO Builder': { '1': 'official_optimize_chrome_pgo_phase_1_x86', '2': 'official_optimize_chrome_pgo_phase_2_x86', @@ -142,6 +144,7 @@ 'CrWinClangGoma': 'clang_official_optimize_release_bot_minimal_symbols_x86', 'CrWinGoma': 'release_bot_x86', 'CrWinGoma(dll)': 'shared_release_bot_x86', + 'CrWinGoma(loc)': 'shared_release_bot_x86', 'ClangToTAndroidASan': 'android_clang_tot_asan', 'ClangToTAndroid (dbg)': 'android_clang_tot_dbg', 'ClangToTAndroid': 'android_clang_tot_release', @@ -169,10 +172,10 @@ 'CrWinAsanCov': 'asan_clang_edge_fuzzer_static_v8_heap_x86_full_symbols_release', 'CrWinClang(shared)': 'clang_minimal_symbols_shared_release_bot_x86', 'CrWinClang64(dbg)': 'win_clang_debug_bot', - 'CrWinClangLLD': 'clang_tot_official_minimal_symbols_static_use_lld_x86', - 'CrWinClangLLD64': 'clang_tot_minimal_symbols_shared_release_use_lld', - 'CrWinClngLLD64dbg': 'clang_tot_minimal_symbols_shared_debug_use_lld', - 'CrWinClngLLDdbg': 'clang_tot_minimal_symbols_shared_debug_use_lld_x86', + 'CrWinClangLLD': 'clang_tot_official_static_use_lld_x86', + 'CrWinClangLLD64': 'clang_tot_shared_release_use_lld', + 'CrWinClngLLD64dbg': 'clang_tot_full_symbols_shared_debug_use_lld', + 'CrWinClngLLDdbg': 'clang_tot_full_symbols_shared_debug_use_lld_x86', 'EarlGreyiOS': 'ios', 'GomaCanaryiOS': 'ios', 'ios-simulator': 'ios', @@ -181,8 +184,8 @@ 'MD Top Chrome ChromeOS non-material': 'chromeos_with_codecs_debug_bot', 'MD Top Chrome Win material': 'debug_bot', 'MD Top Chrome Linux material': 'debug_bot', - 'LTO Linux': 'official_goma_lto', - 'LTO Linux Perf': 'official_goma_lto', + 'LTO Linux': 'official_goma_thin_lto_use_lld', + 'LTO Linux Perf': 'official_goma_thin_lto_use_lld', 'Libfuzzer Upload Linux ASan': 'release_libfuzzer_asan', 'Libfuzzer Upload Linux ASan Debug': 'debug_libfuzzer_asan', 'Libfuzzer Upload Linux MSan': 'release_libfuzzer_msan', @@ -194,7 +197,6 @@ 'Linux deterministic (dbg)': 'debug_bot', 'Linux remote_run Builder': 'release_bot', 'Linux remote_run Tester': 'release_bot', - 'Linux V8 API Stability': 'release_bot', 'Mac deterministic': 'release_bot_mac_strip', 'Mac deterministic (dbg)': 'debug_bot', 'Mojo ChromiumOS': 'chromeos_with_codecs_ozone_release_trybot', @@ -205,10 +207,6 @@ 'Site Isolation Win': 'release_trybot_x86', 'ThinLTO Linux ToT': 'thin_lto_clang_tot_full_symbols_release_static_use_lld', 'UBSanVptr Linux': 'ubsan_vptr_release_bot', - 'WebKit Linux - TraceWrappables': 'debug_bot', - 'WebKit Linux - WPTServe': 'release_bot', - 'WebKit Mac - WPTServe': 'release_bot', - 'WebKit Win - WPTServe': 'release_bot_x86', 'WebKit Linux - RandomOrder': 'release_bot', 'WebKit Mac - RandomOrder': 'release_bot', 'WebKit Win - RandomOrder': 'release_bot_x86', @@ -241,7 +239,7 @@ 'Android Release (Nexus 6P)': 'android_release_trybot_arm64', 'Android Release (Nexus 9)': 'android_release_trybot_arm64', 'Android Release (Pixel C)': 'android_release_trybot_arm64', - 'Android Release (NVIDIA Shield)': 'android_release_trybot', + 'Android Release (NVIDIA Shield TV)': 'android_release_trybot_arm64', 'GPU Linux Builder (dbg)': 'gpu_fyi_tests_debug_trybot', 'GPU Linux Builder': 'gpu_fyi_tests_release_trybot', 'GPU Mac Builder': 'gpu_fyi_tests_release_trybot', @@ -266,14 +264,10 @@ 'Android Tests': 'android_release_bot_minimal_symbols', 'Cast Android (dbg)': 'android_cast_debug_static_bot', 'Cast Linux': 'cast_release_bot', + 'Cast Audio Linux': 'cast_audio_release_bot', 'Linux Builder (dbg)': 'debug_bot', 'Linux Builder (dbg)(32)': 'debug_bot_x86', 'Linux Builder': 'release_bot', - # Trusty bots. - 'Cast Linux Trusty': 'cast_release_bot', - 'Linux Builder Trusty (dbg)': 'debug_bot', - 'Linux Builder Trusty (dbg)(32)': 'debug_bot_x86', - 'Linux Builder Trusty': 'release_bot', 'Deterministic Linux': 'release_bot', }, @@ -314,21 +308,12 @@ 'chromium.memory': { 'Linux ASan LSan Builder': 'asan_lsan_release_trybot', 'Linux Chromium OS ASan LSan Builder': 'asan_lsan_chromeos_release_trybot', + 'Linux ChromiumOS MSan Builder': 'chromeos_msan_release_bot', + 'Linux MSan Builder': 'msan_release_bot', 'Linux TSan Builder': 'tsan_disable_nacl_release_bot', 'Mac ASan 64 Builder': 'asan_full_symbols_disable_nacl_release_bot_dcheck_always_on', }, - 'chromium.memory.fyi': { - 'Chromium Linux ChromeOS MSan Builder': 'chromeos_msan_release_bot', - 'Chromium Linux MSan Builder': 'msan_release_bot', - }, - - 'chromium.memory.full': { - 'Chromium Linux ChromeOS MSan Builder': 'chromeos_msan_release_bot', - 'Chromium Linux MSan Builder': 'msan_release_bot', - 'Chromium Linux TSan Builder': 'tsan_disable_nacl_release_bot', - }, - 'chromium.perf': { 'Android Builder': 'official_goma_minimal_symbols_android', 'Android arm64 Builder': 'official_goma_minimal_symbols_android_arm64', @@ -348,7 +333,8 @@ }, 'chromium.swarm': { - 'Android Swarm': 'android_without_codecs_release_bot_minimal_symbols', + 'Android N5 Swarm': 'android_release_bot_minimal_symbols', + 'Android N5X Swarm': 'android_release_bot_minimal_symbols_arm64', 'Linux Swarm': 'release_bot', 'Mac Swarm': 'release_bot_mac_strip', 'Windows Swarm': 'release_bot_x86', @@ -367,13 +353,12 @@ 'client.v8.chromium': { 'Linux - Future': 'v8_future_release_bot', 'Linux - Future (dbg)': 'v8_future_debug_bot', + 'Linux V8 API Stability': 'release_bot', }, 'client.v8.fyi': { 'Android Builder': 'official_goma_minimal_symbols_android', - 'Chromium ASAN - debug': 'asan_lsan_edge_debug_bot', - 'Chromium ASAN (symbolized)': 'asan_lsan_release_bot', - 'Chromium Win SyzyASAN': 'syzyasan_no_pch_release_x86', + 'Android Release (Nexus 5X)': 'gpu_tests_deqp_android_release_trybot_arm64', 'Linux ASAN Builder': 'asan_lsan_release_bot', 'Linux Debug Builder': 'debug_bot', 'Linux Release (NVIDIA)': 'gpu_tests_release_trybot', @@ -399,6 +384,7 @@ 'WebKit Mac Builder (dbg)': 'debug_bot', 'WebKit Mac Builder': 'release_bot', 'WebKit Mac10.11 (retina)': 'release_bot', + 'WebKit Mac10.12': 'release_bot', 'WebKit Mac10.9': 'release_bot', 'WebKit Win Builder (dbg)': 'debug_bot_x86', 'WebKit Win Builder': 'release_bot_x86', @@ -438,8 +424,10 @@ }, 'official.desktop': { + 'linux64': 'official', 'mac64': 'official', - 'precise64': 'official', + 'mac64-recipes': 'official', + 'precise64': 'official_six_concurrent_links', # Currently the official bots set mini_installer_official_deps=1 # but it's not clear if that's actually used anywhere. @@ -456,15 +444,21 @@ '1': 'official_chrome_pgo_phase_1', '2': 'official_chrome_pgo_phase_2', }, + # TODO(mmoss): Remove this once official recipes are working and this + # just becomes the regular "win64-pgo" builder. + 'win64-pgo-recipes': { + '1': 'official_chrome_pgo_phase_1', + '2': 'official_chrome_pgo_phase_2', + }, }, 'official.desktop.continuous': { 'mac beta': 'official', 'mac stable': 'official', 'mac trunk': 'official', - 'precise64 beta': 'official', - 'precise64 stable': 'official', - 'precise64 trunk': 'official', + 'precise64 beta': 'official_six_concurrent_links', + 'precise64 stable': 'official_six_concurrent_links', + 'precise64 trunk': 'official_six_concurrent_links', 'win beta': 'official_six_concurrent_links', 'win stable': 'official_six_concurrent_links', 'win trunk': 'official_six_concurrent_links', @@ -488,6 +482,7 @@ 'mac10.10_blink_rel': 'release_bot_minimal_symbols', 'mac10.11_blink_rel': 'release_bot_minimal_symbols', 'mac10.11_retina_blink_rel': 'release_bot_minimal_symbols', + 'mac10.12_blink_rel': 'release_bot_minimal_symbols', 'win7_blink_compile_dbg': 'debug_trybot_x86', 'win7_blink_compile_rel': 'release_bot_x86', 'win7_blink_dbg': 'debug_trybot_x86', @@ -539,6 +534,7 @@ 'Chromium Linux Codesearch Builder': 'codesearch', 'ChromiumOS Codesearch Builder': 'codesearch', 'cast_shell_linux': 'cast_release_trybot', + 'cast_shell_audio_linux': 'cast_audio_release_trybot', 'chromeos_amd64-generic_chromium_compile_only_ng': 'cros_chrome_sdk', 'chromeos_daisy_chromium_compile_only_ng': 'cros_chrome_sdk', 'chromeos_x86-generic_chromium_compile_only_ng': 'cros_chrome_sdk', @@ -565,6 +561,8 @@ 'linux_chromium_gn_upload': 'gn_linux_upload', 'linux_chromium_headless_rel': 'headless_linux_release_trybot', 'linux_chromium_ozone_compile_only_ng': 'ozone_linux_release_trybot', + 'linux_chromium_ozone_ng': 'ozone_linux_release_trybot', + 'linux_layout_tests_slimming_paint_v2': 'release_trybot', # This is intentionally a release_bot and not a release_trybot; # enabling DCHECKs seems to cause flaky failures that don't show up @@ -575,38 +573,17 @@ 'linux_chromium_tsan_rel_ng': 'tsan_disable_nacl_release_trybot', 'linux_chromium_ubsan_rel_ng': 'ubsan_vptr_release_trybot', - # This is 'release_bot' rather than 'release_trybot' because + # These are 'release_bot' rather than 'release_trybot' because # 'release_trybot' includes 'dcheck_always_on', which might cause # some layout test results to be different than for normal release # builds (and we only store baselines for release builds). - 'linux_layout_tests_slimming_paint_v2': 'release_bot', + 'linux_layout_tests_layout_ng': 'release_bot', 'linux_nacl_sdk_build': 'release_bot', 'linux_nacl_sdk': 'release_bot', 'linux_optional_gpu_tests_rel': 'gpu_fyi_tests_release_trybot', 'linux_site_isolation': 'release_trybot', 'linux_upload_clang': 'release_bot', - - # Trusty trybot - 'cast_shell_linux_trusty': 'cast_release_trybot', - 'linux_arm_trusty': 'release_trybot_arm', - 'linux_chromium_asan_rel_ng_trusty': 'asan_lsan_release_trybot', - 'linux_chromium_browser_side_navigation_rel_trusty': 'release_trybot', - 'linux_chromium_chromeos_asan_rel_ng_trusty': 'asan_lsan_chromeos_release_trybot', - 'linux_chromium_chromeos_compile_dbg_ng_trusty': 'chromeos_with_codecs_debug_trybot', - 'linux_chromium_chromeos_compile_rel_ng_trusty': 'chromeos_with_codecs_release_trybot', - 'linux_chromium_chromeos_dbg_ng_trusty': 'chromeos_with_codecs_debug_trybot', - 'linux_chromium_chromeos_rel_ng_trusty': 'chromeos_with_codecs_release_trybot', - 'linux_chromium_clobber_rel_ng_trusty': 'release_trybot', - 'linux_chromium_compile_dbg_32_ng_trusty': 'debug_trybot_x86', - 'linux_chromium_compile_dbg_ng_trusty': 'debug_trybot', - 'linux_chromium_compile_rel_ng_trusty': 'release_trybot', - 'linux_chromium_dbg_32_ng_trusty': 'debug_trybot_x86', - 'linux_chromium_dbg_ng_trusty': 'debug_trybot', - 'linux_chromium_rel_ng_trusty': 'gpu_tests_release_trybot', - 'linux_chromium_tsan_rel_ng_trusty': 'tsan_disable_nacl_release_trybot', - 'linux_optional_gpu_tests_rel_trusty': 'gpu_fyi_tests_release_trybot', - 'linux_site_isolation_trusty': 'release_trybot', }, 'tryserver.chromium.mac': { @@ -1003,6 +980,14 @@ 'cast', 'release_trybot', ], + 'cast_audio_release_bot': [ + 'cast', 'cast_audio', 'release_bot', + ], + + 'cast_audio_release_trybot': [ + 'cast', 'cast_audio', 'release_trybot', + ], + 'cfi_full_cfi_diag_release_static': [ 'cfi_full', 'cfi_diag', 'release', 'static', ], @@ -1011,10 +996,6 @@ 'cfi_full', 'clang_tot', 'release', 'static', ], - 'cfi_full_release_static': [ - 'cfi_full', 'release', 'static', - ], - 'cfi_full_release_static_dcheck_always_on': [ 'cfi_full', 'release', 'static', 'dcheck_always_on', ], @@ -1023,6 +1004,14 @@ 'cfi', 'release', 'static', ], + 'cfi_thin_lto_clang_tot_full_symbols_release_static_use_lld': [ + 'cfi', 'thin_lto', 'clang_tot', 'full_symbols', 'release', 'static', 'use_lld', + ], + + 'cfi_thin_lto_full_release_static_use_lld': [ + 'cfi', 'thin_lto', 'release', 'static', 'use_lld', + ], + 'chrome_with_codecs_blink_logging_release_trybot': [ 'chrome_with_codecs', 'blink_logging', 'release_trybot', ], @@ -1048,11 +1037,11 @@ ], 'chromeos_with_codecs_ozone_release_bot': [ - 'chromeos_with_codecs', 'ozone', 'default_ozone_platform_x11', 'release_bot', + 'chromeos_with_codecs', 'ozone', 'release_bot', ], 'chromeos_with_codecs_ozone_release_trybot': [ - 'chromeos_with_codecs', 'ozone', 'default_ozone_platform_x11', 'release_trybot', + 'chromeos_with_codecs', 'ozone', 'release_trybot', ], 'chromeos_with_codecs_release_bot': [ @@ -1121,28 +1110,26 @@ 'clang_tot', 'minimal_symbols', 'shared', 'debug', ], - 'clang_tot_minimal_symbols_shared_debug_use_lld': [ - 'clang_tot', 'minimal_symbols', 'shared', 'debug', 'use_lld', + 'clang_tot_full_symbols_shared_debug_use_lld': [ + 'clang_tot', 'full_symbols', 'shared', 'debug', 'use_lld', ], - 'clang_tot_minimal_symbols_shared_debug_use_lld_x86': [ - 'clang_tot', 'minimal_symbols', 'shared', 'debug', 'use_lld', 'x86', - ], - - 'clang_tot_minimal_symbols_shared_debug': [ - 'clang_tot', 'minimal_symbols', 'shared', 'debug', + 'clang_tot_full_symbols_shared_debug_use_lld_x86': [ + 'clang_tot', 'full_symbols', 'shared', 'debug', 'use_lld', 'x86', ], 'clang_tot_minimal_symbols_shared_debug_x86': [ 'clang_tot', 'minimal_symbols', 'shared', 'debug', 'x86', ], - 'clang_tot_minimal_symbols_shared_release_use_lld': [ - 'clang_tot', 'minimal_symbols', 'shared', 'release', 'use_lld', + 'clang_tot_shared_release_use_lld': [ + # TODO(crbug.com/706492): Enable symbols when LLD makes PDBs. + 'clang_tot', 'no_symbols', 'shared', 'release', 'use_lld', ], - 'clang_tot_official_minimal_symbols_static_use_lld_x86': [ - 'clang_tot', 'official', 'minimal_symbols', 'static', 'release', 'use_lld', 'x86', + 'clang_tot_official_static_use_lld_x86': [ + # TODO(crbug.com/706492): Enable symbols when LLD makes PDBs. + 'clang_tot', 'no_symbols', 'official', 'static', 'release', 'use_lld', 'x86', ], 'clang_tot_minimal_symbols_shared_release': [ @@ -1362,8 +1349,8 @@ 'official', 'goma', 'chromeos', ], - 'official_goma_lto': [ - 'official', 'goma', 'lto', + 'official_goma_thin_lto_use_lld': [ + 'official', 'goma', 'thin_lto', 'use_lld', ], 'official_goma_minimal_symbols_android': [ @@ -1599,6 +1586,10 @@ 'gn_args': 'is_chromecast=true', }, + 'cast_audio': { + 'gn_args': 'is_cast_audio_only=true enable_webrtc=false' + }, + 'cfi': { 'gn_args': 'is_cfi=true', }, @@ -1637,7 +1628,7 @@ }, 'clang_tot': { - 'gn_args': 'llvm_force_head_revision=true clang_use_chrome_plugins=false enable_nocompile_tests=false', + 'gn_args': 'llvm_force_head_revision=true clang_use_chrome_plugins=false', 'mixins': ['clang'], }, @@ -1690,10 +1681,6 @@ 'mixins': ['debug_bot', 'minimal_symbols'], }, - 'default_ozone_platform_x11': { - 'gn_args': 'ozone_platform="x11"', - }, - 'disable_nacl': { 'gn_args': 'enable_nacl=false', }, @@ -1840,9 +1827,10 @@ 'ozone_linux': { 'gn_args': ('ozone_auto_platforms=false ozone_platform_wayland=true ' + 'ozone_platform="x11" ' 'ozone_platform_x11=true ozone_platform_gbm=true ' 'enable_package_mash_services=true use_ash=false ' - 'use_jessie_sysroot=true use_xkbcommon=true'), + 'use_xkbcommon=true'), }, 'pdf_xfa': { @@ -1924,7 +1912,10 @@ }, 'v8_future': { - 'gn_args': 'v8_enable_future=true', + # TODO(machenbach): Switch back to v8_enable_future=true when + # turbofan+ignition are stable. + # http://crbug.com/682617 + 'gn_args': 'v8_disable_turbo=true', }, 'v8_heap': {
diff --git a/tools/mb/mb_unittest.py b/tools/mb/mb_unittest.py index c5780ee..690b5a2b 100755 --- a/tools/mb/mb_unittest.py +++ b/tools/mb/mb_unittest.py
@@ -118,9 +118,13 @@ 'fake_gyp_builder': 'gyp_debug', 'fake_gn_args_bot': '//build/args/bots/fake_master/fake_gn_args_bot.gn', 'fake_multi_phase': { 'phase_1': 'gn_phase_1', 'phase_2': 'gn_phase_2'}, + 'fake_args_file': 'args_file_goma', + 'fake_args_file_twice': 'args_file_twice', }, }, 'configs': { + 'args_file_goma': ['args_file', 'goma'], + 'args_file_twice': ['args_file', 'args_file'], 'gyp_rel_bot': ['gyp', 'rel', 'goma'], 'gn_debug_goma': ['gn', 'debug', 'goma'], 'gyp_debug': ['gyp', 'debug', 'fake_feature1'], @@ -143,6 +147,9 @@ 'gn_args': 'use_goma=true', 'gyp_defines': 'goma=1', }, + 'args_file': { + 'args_file': '//build/args/fake.gn', + }, 'phase_1': { 'gn_args': 'phase=1', 'gyp_args': 'phase=1', @@ -335,6 +342,19 @@ mbw.files['/fake_src/out/Debug/args.gn'], 'import("//build/args/bots/fake_master/fake_gn_args_bot.gn")\n') + def test_gn_gen_args_file_mixins(self): + mbw = self.fake_mbw() + self.check(['gen', '-m', 'fake_master', '-b', 'fake_args_file', + '//out/Debug'], mbw=mbw, ret=0) + + self.assertEqual( + mbw.files['/fake_src/out/Debug/args.gn'], + ('import("//build/args/fake.gn")\n' + 'use_goma = true\n')) + + mbw = self.fake_mbw() + self.check(['gen', '-m', 'fake_master', '-b', 'fake_args_file_twice', + '//out/Debug'], mbw=mbw, ret=1) def test_gn_gen_fails(self): mbw = self.fake_mbw()
diff --git a/tools/md_browser/.gitignore b/tools/md_browser/.gitignore new file mode 100644 index 0000000..0d20b648 --- /dev/null +++ b/tools/md_browser/.gitignore
@@ -0,0 +1 @@ +*.pyc
diff --git a/tools/md_browser/OWNERS b/tools/md_browser/OWNERS index 3fc266c..5279ad8 100644 --- a/tools/md_browser/OWNERS +++ b/tools/md_browser/OWNERS
@@ -1,2 +1,5 @@ dpranke@chromium.org nodir@chromium.org + +# TEAM: infra-dev@chromium.org +# COMPONENT: Build
diff --git a/tools/md_browser/base.css b/tools/md_browser/base.css new file mode 100644 index 0000000..2a560847 --- /dev/null +++ b/tools/md_browser/base.css
@@ -0,0 +1,517 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Common styles and definitions. */ + +@import "//fonts.googleapis.com/css?family=Open+Sans:300,400,700&subset=latin,cyrillic-ext,greek-ext,cyrillic,greek,vietnamese,latin-ext"; +@import "//fonts.googleapis.com/css?family=Source+Code+Pro"; +*, +*::after, +*::before { + box-sizing: border-box; + margin: 0; + padding: 0; +} +h1, h2, h3, h4, h5, h6 { + font-weight: normal; + margin: .25em 0 .5em; +} +h1 { + font-size: 2em; +} +h2 { + font-size: 1.5em; +} +h3 { + font-size: 1.3em; +} +h4, h5, h6 { + font-size: 14px; + font-style: italic; +} +ul, ol { + list-style: none; +} + +/* Utility classes */ + +.u-sha1 { + background-color: #f1f2f3; + color: #000; + font-size: 13px; +} +.u-pre { + font-size: 10pt; + font-weight: 500; + white-space: pre; +} +.u-lineNum { + border-right: 1px solid #f1f2f3; + color: #666; + display: inline-block; + min-width: 3em; + text-align: right; +} +.u-noSelect { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.u-monospace { + font-family: 'Source Code Pro', monospace; +} + +/* Common.soy */ + +.Site { + background: #fff; + color: #000; + display: -ms-flexbox; + display: flex; + font: 14px/1.54 'Open Sans', sans-serif; + min-height: 100vh; + -ms-flex-direction: column; + flex-direction: column; +} +.Site-header, +.Site-footer { + background: #eee; + -ms-flex: none; + flex: none; +} +.Site-header--withNavbar { + background: #fff; +} +.Site-content { + -ms-flex: 1 0 auto; + flex: 1 0 auto; + padding: 20px; +} +.Container { + margin: 0 auto; + max-width: 980px; +} +.Container--fullWidth { + max-width: none; +} +.Header, +.Footer { + -ms-flex-align: center; + align-items: center; + display: -ms-flexbox; + display: flex; + padding: 20px; +} +.Site-header--withNavbar .Header { + max-width: 980px; + margin: 0 auto; + padding: 10px 0; +} +.Header-title, +.Header-image { + display: -ms-flexbox; + display: flex; + -ms-flex: 1; + flex: 1; +} +.Header-anchor { + color: #666; + font-size: 32px; + font-weight: 300; + text-decoration: none; +} +.Header-anchorLogo { + display: inline-block; + margin-right: 10px; + vertical-align: middle; +} +.Header-nav { + background: #eee; + padding: 15px 0; +} +.Header-menu { + display: -ms-flexbox; + display: flex; + -ms-flex-pack: end; + justify-content: flex-end; +} +.Header-menuItem { + color: #00e; + display: inline-block; + margin-left: 15px; +} +.Header-menuItem--noAction { + color: inherit; +} +.Breadcrumbs { + font-size: 18px; + margin-bottom: 20px; +} +.Breadcrumbs-crumb { + color: #00e; +} +.Breadcrumbs-crumb:last-child { + color: #000; + font-weight: bold; +} +.Footer { + color: #666; +} +.Footer-poweredBy { + -ms-flex: 1; + flex: 1; +} +.Footer-formats, +.Footer-links { + display: -ms-flexbox; + display: flex; + -ms-flex-pack: end; + justify-content: flex-end; +} +.Footer-formatsItem { + display: inline-block; +} +.Footer-formatsItem:first-child { + margin-right: 20px; +} +.Footer-link { + display: inline-block; + margin-left: 10px; +} +.RepoList-item { + display: -ms-flexbox; + display: flex; + left: -10px; + padding: 5px 0 5px 10px; + position: relative; + white-space: nowrap; + width: calc(100% + 20px); +} +.RepoList-item:link, +.RepoList-item:visited { + text-decoration: none; +} +.RepoList-item:hover { + background: #eee; +} +.RepoList-item--header { + font-weight: bold; + margin: 0; +} +.RepoList-item--header:hover { + background: #fff; +} +.RepoList-itemName, +.RepoList-itemDescription { + display: inline-block; +} +.RepoList-itemName { + margin-right: 10px; + min-width: 25%; + text-decoration: underline; +} +.RepoList-item--header > .RepoList-itemName { + text-decoration: none; +} +.RepoList-itemDescription { + color: #000; + -ms-flex: 1; + flex: 1; + overflow: hidden; + text-overflow: ellipsis; +} + +/* RepositoryIndex.soy */ + +.RepoDescription { + margin: 10px 0; +} +.RepoMirroredFrom { + margin: 10px 0; + color: #666; +} +.CloneRepo { + background: #eee; + margin-bottom: 20px; + padding: 10px; +} +.CloneRepo-title { + margin-bottom: 2px; +} +.CloneRepo-command { + border: 1px solid #ccc; + border-radius: 4px; + display: block; + font-size: inherit; + padding: 10px; + width: 100%; +} +.RepoShortlog { + display: -ms-flexbox; + display: flex; +} +.RepoShortlog-refs { + -ms-flex: none !important; + flex: none !important; + width: 20%; +} +.RepoShortlog-refs > .RefList:first-child { + margin: 0; +} +.RepoShortlog-log { + -ms-flex: 1; + flex: 1; + width: 80%; +} +.RepoIndexDoc { + border-top: 1px solid #ddd; + margin-top: 20px; + padding-top: 5px; +} + +/* RefList.soy */ + +.Refs {} +.RefList { + margin: 15px 0; +} +.RefList-title { + margin: 0; +} +.RefList-items {} +.RefList-item { + padding: 2px 0; +} + +/* LogDetail.soy */ + +.LogNav { + margin: 10px 0; + text-align: center; +} +.CommitLog {} +.CommitLog-item { + padding: 2px 0; +} +.CommitLog-item--oneline:hover { + background: #eee; +} +.CommitLog-item--full { + margin-bottom: 20px; +} +.CommitLog-item--empty { + padding: 10px 0; + text-align: center; +} +.CommitLog-sha1 { + border-radius: 3px; + display: inline-block; + margin-right: 3px; + padding: 2px 4px; + text-align: center; +} +.CommitLog-time { + color: #666; +} +.CommitLog-branchLabel { + color: #dd4b39; +} +.CommitLog-tagLabel { + color: #093; +} +.CommitLog-rename { + font-size: 0.9em; + display: block; + padding-left: 5px; +} + +/* ObjectDetail.soy */ + +.Metadata { + margin-bottom: 15px; +} +.Metadata-title { + font-weight: bold; + padding-right: 10px; + text-align: right; +} +.MetadataMessage { + background-color: #fafafa; + border: 1px solid #ccc; + color: #000; + margin: 0; + padding: 12px; + white-space: pre-wrap; +} +.DiffTree { + margin: 10px 0 5px; +} +.DiffTree-action { + margin-left: .5em; +} +.DiffTree-action--add { + color: #060; +} +.DiffTree-action--delete { + color: #600; +} +.DiffTree-action--rename, +.DiffTree-action--copy { + color: #006; +} +.DiffSummary {} +.TreeDetail-sha1, +.BlobSha1 { + margin: 10px 0; + padding: 5px 10px; +} +.FileList { + margin-left: 25px; +} +.FileList-item { + padding: 1px 0; + position: relative; +} +.FileList-item:hover { + background: #eee; +} +.FileList-item::before { + left: -22px; + position: absolute; + top: 4px; +} +.FileList-itemLink { + display: block; +} +/* Tree icons are taken from the public domain Tango icons: + * http://tango.freedesktop.org/Tango_Icon_Library + * Compressed with pngcrush -brute -rem tEXt -rem tIME -rem iTXt -rem zTXt */ +.FileList-item--gitTree::before { + /* places/folder.png */ + content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAAb5JREFUOMulkr1KA0EQgGdvTwwnYmER0gQsrFKmSy+pLESw9Qm0F/ICNnba+h6iEOuAEWslKJKTOyJJvIT72d1xZuOFC0giOLA77O7Mt/PnNptN+I+49Xr9GhH3f3mb0v1ht9vtLAUYYw5ItkgDL3KyD8PhcLvdbl/WarXT3DjLMnAcR/f7/YfxeKwtgC5RKQVhGILWeg4hQ6hUKjWyucmhLFEUuWR3QYBWAZABQ9i5CCmXy16pVALP80BKaaG+70MQBLvzFMjRKKXh8j6FSYKF7ITdEWLa4/ktokN74wiqjSMpnVcbQZqmEJHz+ckeCPFjWKwULpyspAqhdXVXdcnZcPjsIgn+2BsVA8jVYuWlgJ3yBj0icgq2uoK+lg4t+ZvLomSKamSQ4AI5BcMADtMhyNoSgNIISUaFNtwlazcDcBc4gjjVwCWid2usCWroYEhnaqbzFJLUzAHIXRDChXCcQP8zhkSZ5eNLgHAUzwDcRu4CoIRn/wsGUQIIy4Vr9TH6SYFCNzw4nALn5627K4vIttOUOwfa5YnrDYzt/9OLv9I5l8kk5hZ3XLO20b7tbR7zHLy/BX8G0IeBEM7ZN1NGIaFUaKLgAAAAAElFTkSuQmCC); +} +.FileList-item--symlink::before { + /* actions/edit-redo.png */ + content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAABZUlEQVQ4y2NgIAL4zWL7D8TGDOQCqAEg7Ey2Aes+58AMcSSkmB2I3YB4HhCfh9kOMoCgIUAJMyDe2D+b58jKe553133M+r/uU/b/zV+L/y97n/i/+JIYbkOAAl5AfGLNTde/69+n/1/4MuD/gtsqKBhkALIh5S0M1jDN2kC8a+UNt/8b36f+X3JP5f/0u1pwjeuvS8E1g3DpZQm4ITAD5s09ZPBq49uE/0vvq4E1gPCJC5z/yy+IoGgG4a5HJqjeCJ3Pc2vjy+T/ux4Y/j99Rfz/7GtK/xfeUkbBN+8pY9cMAkFzuT5uepPy/+w1lf+TF3L/Q4p3OD5zRQ67Zlg873vk9n/mMlaQ5EcgLgZiA2R5nJphCjbfNP8LVeCBJyUa40xpO+5afQXS/8jKC0DJg+uPKx+bOJf1HDYXEJPW46JW8LcduKYzbdZMph4gn4ccQxSAOAuIo4FYdvsKFpYdK1iYCekDACq5JXDHGJhDAAAAAElFTkSuQmCC); +} +.FileList-item--regularFile::before { + /* mimetypes/text-x-generic.png */ + content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAtElEQVQ4ja2TSw7CIBRFu0r3wyIYsAMHDl1CC92IDqC0wAbQi4Fo5VOMJGcAyT33vQEDY+xCCPGdnIZ48NB7kPkSLMvipZQBpVQC70Br7Y0xZQGC4zj6aZoCnPMPhBBtwb41NoN1XesCBHPNhyfI7fziFu6HJti3IgS0vrcFuZ3Btm2JpmC/M5jnOdEU5JoRstYmigKES80x7JyrC+IE7+1xAoSrgp//AqX02vsbn5nz8K/zAP9CzjbgFoHjAAAAAElFTkSuQmCC); +} +.FileList-item--executableFile::before { + /* mimetypes/text-x-script.png */ + content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA7ADsAOwdIxY2AAAACXBIWXMAAAsTAAALEwEAmpwYAAABOklEQVQ4T5WTTYqDQBBGPdKcZnIJdy7EVRByBQPi0iwHAlGT0YBHcG82kkV2VnffoKar7FYzIQYLPtqffq+rEJ04jn/CMMSV+XZs0YO1RcyLoO/7MdAD9gAI8wiK+CyYA0IDFABhrmFBAHNYbwYTIxFyWN8KwAiEmIEaknqVUposCoBBGE8cIGUipUKp5IJAzOe2JxI0pG1b3Gw2+Hg8FjoQzy0rLVAavt0GuGkaXrfb7avAzs0CNcHtDD4ejwzTve/7X/9GGFqn2QmkDmzbBJ9OJ8yyDNM0Rdd1J8mzgDqQPDNJLFwUBZ7PZ7xcLizwPI9gfj+NYAX2k+kx7vc7byrLEquqwuv1ivv9HpMk4ec6Uwfvqus63lzXNeZ5zoIRpoqiKP/09wVBwNDhcOB1t9v9OmuLTnw62dQfVIHPYx/I/0kAAAAASUVORK5CYII=); +} +.FileList-item--gitlink::before { + /* emblems/emblem-symbolic-link.png */ + content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAABO0lEQVQ4T7WT3U6EMBCF92m99yGMZuODGL01eueyXqjvwc+WUlooUPkfZxq3sQEvJLHJSQvlfDOnDbub/dUFCrZof3t9uaPF1kFeBwjD8E+apukfAVEUQRzHkCQJJKfEznES43tUGP0OIOMheIGn50e4f7izCo4H4GkKDEXPBIviCIZh8AFkfv94g5Qx4Jw7AOn4Grh1iqATdrUAEJmxFLIsgzzPQSnpQc4SIkMIh7ZtfQCjys6soNQlVFW1AEgpQWQCjDE+gHIKIaxZo7mu69UOiqJwRXxAxnFDQllS5XUzSeO+kmoJoOzUni41NE1tM9JBTdMII85d14FpjI2lihUA9wCNA8zzDOM4WkBjvgFqrQO8ulzmNgLl/8SPyTT0WL3vLLBGsNZ6HUBV1tT3vROd/Fk/AZt/Z/J+AUN8ayghXmezAAAAAElFTkSuQmCC); +} +.FileContents { + border-collapse: collapse; + border-spacing: 0; + margin: 10px 0; +} +.FileContents-line { + border: none; +} +.FileContents-lineNum { + padding-right: 10px; + width: 1%; +} +/* Used to prevent copying the line number. */ +.FileContents-lineNum::before { + color: #aaa; + content: attr(data-line-number); + cursor: pointer; +} +.FileContents-lineContents { + line-height: 1.3em; + min-height: 1em; + padding-left: 10px; +} +.FileContents-lineContents:target { + background: #cfd8dc; +} +.InlineReadme { + border-top: 1px solid #ddd; + margin: 10px 0; + padding: 7px 0; +} +.InlineReadme-path { + color: #666; +} + +/* BlameDetail.soy */ + +.Blame { + border-collapse: collapse; + font-size: 8pt; + margin: 0 auto; +} +.Blame-region--bg1 { + background: #fff; +} +.Blame-region--bg2 { + background: #f1f2f3; +} +.Blame-sha1, +.Blame-author, +.Blame-time, +.Blame-regionLink { + font-size: 8pt; + padding: 0 3px; + white-space: nowrap; +} +.Blame-regionLink { + text-align: right; +} +.Blame-lineNum .u-lineNum { + padding: 0 8px; + text-align: right; +} +.Blame-lineNum:hover { + text-decoration: underline; +} +.Blame-lineContent { + font-size: 9pt; + line-height: 1.3em; + padding: 0 8px; +} + +/* DiffDetail.soy */ + +.Diff { + margin: 10px 0; +} +.Diff-fileIndex { + color: #444; + font-weight: bold; +} +.Diff-unified { + border-bottom: 1px solid #ddd; + border-top: 1px solid #ddd; + padding: 10px 0; +} +.Diff-hunk { + color: #00c; +} +.Diff-delete { + color: #c00; +} +.Diff-insert { + color: #080; +}
diff --git a/tools/md_browser/doc.css b/tools/md_browser/doc.css index 93ea5fc..3006d29d 100644 --- a/tools/md_browser/doc.css +++ b/tools/md_browser/doc.css
@@ -1,173 +1,130 @@ /** - * Copyright 2015 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. + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -/* This file is cloned from - * https://gerrit.googlesource.com/gitiles/+/master/gitiles-servlet/src/main/resources/com/google/gitiles/static/doc.css - */ - -html.doc-page, .doc { - font-family: arial,sans-serif; -} -.doc-page body { - margin: 0; -} - -.banner { - min-height: 44px; - margin: 0; - padding: 14px 15px 13px; - border-bottom: 1px solid #eee; -} -.banner h1, .banner h2 { - float: left; - font-size: 32px; - font-weight: 300; - line-height: 1.375; - margin: 0; -} -.banner img { - margin: -1px 10px -4px 0px; - vertical-align: middle; -} -.banner a, .banner a:hover { - text-decoration: none; -} -.banner, .banner a:link, .banner a:visited { - color: #777; -} -.banner h2:before { - border-right: 1px solid #eee; - content: ""; - float: left; - height: 44px; - margin: 0 12px 0 14px; -} - -.nav, .footer-line { - color: #333; - padding: 0 15px; - background: #eee; -} -.nav ul { - list-style: none; - margin: 0; - padding: 6px 0; -} -.nav li { - float: left; - font-size: 14px; - line-height: 1.43; - margin: 0 20px 0 0; - padding: 6px 0; -} -.nav li a, .footer-line a { - color: #7a7af9; -} -.nav li a:hover { - color: #0000f9; -} -.banner:after, .nav ul:after, .cols:after { - clear: both; - content: ""; - display: block; -} - -.nav-aux, .doc { - max-width: 978px; -} -.nav-aux, .doc-page .doc { - margin: auto; -} - -.footer-break { - clear: both; - margin: 120px 0 0 0; -} -.footer-line { - font-size: 13px; - line-height: 30px; - height: 30px; -} -.footer-line ul { - list-style: none; - margin: 0; - padding: 0; -} -.footer-line li { - display: inline; -} -.footer-line li+li:before { - content: "·"; - padding: 0 5px; -} -.footer-line .nav-aux { - position: relative; -} -.gitiles-att { - color: #A0ADCC; - position: absolute; - top: 0; - right: 0; -} -.gitiles-att a { - font-style: italic; -} - /* Markdown rendered in /+doc/ or tree view page . */ -.doc { - color: #444; - font-size: 13px; - line-height: normal; +.Site-Content--markdown { + padding-top: 0; } - +.Header-nav ul { + max-width: 980px; + margin: 0 auto; +} +.Header-nav li { + display: inline-block; + margin-right: 15px; +} .doc h1, .doc h2, .doc h3, .doc h4, .doc h5, .doc h6 { - font-family: "open sans",arial,sans-serif; - font-weight: bold; - color: #444; - height: auto; - white-space: normal; - overflow: visible; - margin: 0.67em 0 0.67em 0; + font-weight: normal; + margin: 1.236em 0 .618em; +} +.doc.RepoIndexDoc h1 { + margin-top: .25em; } .doc h1 { - font-size: 20px; - margin: 0.67em 0 0.67em 0; + font-size: 2em; } .doc h2 { - font-size: 16px; - margin: 0.67em 0 0.67em 0; + font-size: 1.5em; } .doc h3 { - font-size: 14px; - margin: 0.67em 0 0.67em 0; + font-size: 1.3em; } -.doc h4 { - font-size: 13px; - margin: 1em 0 1em 0; -} -.doc h5 { - font-size: 13px; - margin: 1.3em 0 1.3em 0; -} +.doc h4, +.doc h5, .doc h6 { - font-size: 13px; - margin: 1.6em 0 1.6em 0; + font-size: 14px; + font-style: italic; } - -.doc a { text-decoration: none; } -.doc a:link { color: #245dc1; } -.doc a:visited { color: #7759ae; } -.doc a:hover { text-decoration: underline; } - +.doc hr { + border: none; + border-top: 1px solid #aaa; + display: block; + margin-top: 25px; +} +.doc a { + text-decoration: none; +} +.doc a:link { + color: #245dc1; +} +.doc a:visited { + color: #7759ae; +} +.doc a:hover { + text-decoration: underline; +} +.doc a.h { + display: inline-block; + font-weight: normal; + width: 1.5em; + margin-left: -1.5em; + margin-top: -1em; + margin-bottom: -1em; +} +.doc a.h:link, +.doc a.h:visited { + color: #444; +} +.doc a.h:focus { + outline: none; +} +.doc a.h:hover { + text-decoration: none; +} +.doc a.h span { + display: inline-block; + width: 1.5em; +} +.doc h1:hover a.h span:before, +.doc h2:hover a.h span:before, +.doc h3:hover a.h span:before, +.doc h4:hover a.h span:before, +.doc h5:hover a.h span:before, +.doc h6:hover a.h span:before { + content: '#'; + font-weight: normal; + color: #AAA; +} +.doc h1:hover a:hover.h span:before, +.doc h2:hover a:hover.h span:before, +.doc h3:hover a:hover.h span:before, +.doc h4:hover a:hover.h span:before, +.doc h5:hover a:hover.h span:before, +.doc h6:hover a:hover.h span:before { + text-decoration: underline; +} +.doc h1:hover a:visited.h span:before, +.doc h2:hover a:visited.h span:before, +.doc h3:hover a:visited.h span:before, +.doc h4:hover a:visited.h span:before, +.doc h5:hover a:visited.h span:before, +.doc h6:hover a:visited.h span:before { + color: #AAA; +} .doc ul, .doc ol { margin: 10px 10px 10px 30px; padding: 0; } - +.doc ul { + list-style-type: disc; +} +.doc ol { + list-style-type: decimal; +} .doc img { border: 0; max-width: 100%; @@ -179,7 +136,6 @@ iframe.noborder { border: 0; } - .doc em { font-weight: normal; font-style: italic; @@ -188,22 +144,33 @@ font-weight: bold; color: inherit; } - +.doc p { + margin: 10px 0; +} +.doc blockquote { + background-color: #fffde7; + border-left: 2px solid #fab700; + padding: 2px 10px 2px 10px; +} .doc pre { - border: 1px solid silver; - background: #fafafa; - margin: 0 2em 0 2em; - padding: 2px; + padding: 12px; + font-size: 10pt; + background-color: #fafafa; + border: 1px solid #ccc; + overflow-x: auto; } -.doc code, .doc .code { - color: #060; - font: 13px/1.54 "courier new",courier,monospace; +.doc code { + padding: 2px 4px; + background-color: #F5F5F5; + border: transparent; + border-radius: 4px; } - +.doc .code { + font-family: 'Source Code Pro', monospace; +} .doc dl dt { margin-top: 1em; } - .doc table { border-collapse: collapse; border-spacing: 0; @@ -211,7 +178,8 @@ .doc th { text-align: center; } -.doc th, .doc td { +.doc th, +.doc td { border: 1px solid #eee; padding: 4px 12px; vertical-align: top; @@ -219,31 +187,33 @@ .doc th { background-color: #f5f5f5; } - .toc { margin-top: 30px; } .toc-aux { - padding: 2px; background: #f9f9f9; border: 1px solid #f2f2f2; - border-radius: 4px; } .toc h2 { margin: 0 0 5px 0; } .toc ul { - margin: 0 0 0 30px; + margin: 10px 10px 10px 30px; } .toc ul li { margin-left: 0px; list-style: disc; } +.toc ul ul { + margin-top: 0; + margin-bottom: 0; +} .toc ul ul li { list-style: circle; } - -.note, .promo, .aside { +.note, +.promo, +.aside { border: 1px solid; border-radius: 4px; margin: 10px 0; @@ -271,15 +241,18 @@ .aside p:last-child { margin-bottom: 0; } - .cols { margin: 0 -1.533%; width: 103.067%; } .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 { - float: left; + display: inline-block; margin: 0 1.488% 20px; + vertical-align: top; +} +.cols h1, .cols h2, .cols h3, .cols h4, .cols h5, .cols h6 { + margin: .67em 0; } .col-1 { width: 5.357%; } .col-2 { width: 13.690%; } @@ -293,6 +266,4 @@ .col-10 { width: 80.357%; } .col-11 { width: 88.690%; } .col-12 { width: 97.024%; } -.cols hr { - width: 80%; -} +.cols hr { width: 80%; }
diff --git a/tools/md_browser/footer.html b/tools/md_browser/footer.html index 8aab624..f16e3d3 100644 --- a/tools/md_browser/footer.html +++ b/tools/md_browser/footer.html
@@ -1,8 +1,12 @@ -<div class="footer-break"></div> -<div class="footer-line"> -<div class="nav-aux"> -<div class="gitiles-att"></div> </div> </div> +<footer class="Site-footer"> + <div class="Footer"> + <div class="Footer-poweredBy"> + Powered by <a href="https://chromium.googlesource.com/chromium/src/+/master/tools/md_browser">md_browser</a> + </div> + </div> +</footer> + </body> </html>
diff --git a/tools/md_browser/gitiles_autolink.py b/tools/md_browser/gitiles_autolink.py new file mode 100644 index 0000000..5cfeb213 --- /dev/null +++ b/tools/md_browser/gitiles_autolink.py
@@ -0,0 +1,28 @@ +# Copyright 2017 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. + +"""Implements Gitiles' simpler auto linking. + +This extention auto links basic URLs that aren't bracketed by <...>. + +https://gerrit.googlesource.com/gitiles/+/master/gitiles-servlet/src/main/java/com/google/gitiles/Linkifier.java +""" + +from markdown.inlinepatterns import (AutolinkPattern, Pattern) +from markdown.extensions import Extension + + +AUTOLINK_RE = r'([Hh][Tt][Tt][Pp][Ss]?://[^>]*)' + + +class _GitilesSmartQuotesExtension(Extension): + """Add Gitiles' simpler linkifier to Markdown.""" + def extendMarkdown(self, md, md_globals): + md.inlinePatterns.add('gitilesautolink', + AutolinkPattern(AUTOLINK_RE, md), + '<autolink') + + +def makeExtension(*args, **kwargs): + return _GitilesSmartQuotesExtension(*args, **kwargs)
diff --git a/tools/md_browser/gitiles_smart_quotes.py b/tools/md_browser/gitiles_smart_quotes.py new file mode 100644 index 0000000..502a245 --- /dev/null +++ b/tools/md_browser/gitiles_smart_quotes.py
@@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 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. + +"""Implements Gitiles' smart quotes. + +This extention converts dumb quotes into smart quotes like Gitiles: + +https://gerrit.googlesource.com/gitiles/+/master/gitiles-servlet/src/main/java/com/google/gitiles/doc/SmartQuotedExtension.java +""" + +from markdown.inlinepatterns import Pattern +from markdown.extensions import Extension + + +class _GitilesSmartQuotesPattern(Pattern): + """Process Gitiles' dumb->smart quotes.""" + + QUOTES = { + '"': (u'“', u'”'), + "'": (u'‘', u'’'), + } + + def handleMatch(self, m): + lq, rq = self.QUOTES[m.group(2)] + return u'%s%s%s' % (lq, m.group(3), rq) + + +class _GitilesSmartQuotesExtension(Extension): + """Add Gitiles' smart quotes to Markdown.""" + def extendMarkdown(self, md, md_globals): + md.inlinePatterns.add('gitilessmartquotes', + _GitilesSmartQuotesPattern(r"""(['"])([^\2]+)\2"""), + '<emphasis') + + +def makeExtension(*args, **kwargs): + return _GitilesSmartQuotesExtension(*args, **kwargs)
diff --git a/tools/md_browser/header.html b/tools/md_browser/header.html index 1493ec3..5d25a2a 100644 --- a/tools/md_browser/header.html +++ b/tools/md_browser/header.html
@@ -1,8 +1,14 @@ <!DOCTYPE HTML PUBLIC "-//W3CDTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> -<html class="doc-page"> +<html> <head> <meta charset="UTF-8" /> +<link rel="stylesheet" type="text/css" href="/base.css" /> <link rel="stylesheet" type="text/css" href="/doc.css" /> +<link rel="stylesheet" type="text/css" href="/prettify.css" /> </head> -<body> -<div class="doc"> +<body class="Site"> +<header class="Site-header"> + <div class="Header"></div> +</header> +<div class="Site-content Site-Content--markdown"> +<div class="Container">
diff --git a/tools/md_browser/md_browser.py b/tools/md_browser/md_browser.py index d423c66..8ed40573 100755 --- a/tools/md_browser/md_browser.py +++ b/tools/md_browser/md_browser.py
@@ -130,14 +130,22 @@ if not full_path.startswith(self.server.top_level): self._DoUnknown() - elif path == '/doc.css': - self._DoCSS('doc.css') + elif path in ('/base.css', '/doc.css', '/prettify.css'): + self._DoCSS(path[1:]) elif not os.path.exists(full_path): self._DoNotFound() elif path.lower().endswith('.md'): self._DoMD(path) elif os.path.exists(full_path + '/README.md'): self._DoMD(path + '/README.md') + elif path.lower().endswith('.png'): + self._DoImage(full_path, 'image/png') + elif path.lower().endswith('.jpg'): + self._DoImage(full_path, 'image/jpeg') + elif os.path.isdir(full_path): + self._DoDirListing(full_path) + elif os.path.exists(full_path): + self._DoRawSourceFile(full_path) else: self._DoUnknown() @@ -147,7 +155,9 @@ 'markdown.extensions.fenced_code', 'markdown.extensions.tables', 'markdown.extensions.toc', + 'gitiles_autolink', 'gitiles_ext_blocks', + 'gitiles_smart_quotes', ] extension_configs = { 'markdown.extensions.toc': { @@ -159,6 +169,7 @@ md = markdown.Markdown(extensions=extensions, extension_configs=extension_configs, + tab_length=2, output_format='html4') has_a_single_h1 = (len([line for line in contents.splitlines() @@ -172,11 +183,38 @@ try: self._WriteHeader('text/html') self._WriteTemplate('header.html') + self.wfile.write('<div class="doc">') self.wfile.write(md_fragment) + self.wfile.write('</div>') self._WriteTemplate('footer.html') except: raise + def _DoRawSourceFile(self, full_path): + self._WriteHeader('text/html') + self._WriteTemplate('header.html') + + self.wfile.write('<table class="FileContents">') + with open(full_path) as fp: + # Escape html over the entire file at once. + data = fp.read().replace( + '&', '&').replace( + '<', '<').replace( + '>', '>').replace( + '"', '"') + for i, line in enumerate(data.splitlines()): + self.wfile.write( + ('<tr class="u-pre u-monospace FileContents-line">' + '<td class="u-lineNum u-noSelect FileContents-lineNum">' + '<a name="%(num)s" ' + 'onclick="window.location.hash=%(quot)s#%(num)s%(quot)s">' + '%(num)s</a></td>' + '<td class="FileContents-lineContents">%(line)s</td></tr>') + % {'num': i, 'quot': "'", 'line': line}) + self.wfile.write('</table>') + + self._WriteTemplate('footer.html') + def _DoCSS(self, template): self._WriteHeader('text/css') self._WriteTemplate(template) @@ -186,10 +224,49 @@ self.wfile.write('<html><body>%s not found</body></html>' % self.path) def _DoUnknown(self): - self._WriteHeader('text/html') + self._WriteHeader('text/html', status_code=501) self.wfile.write('<html><body>I do not know how to serve %s.</body>' '</html>' % self.path) + def _DoDirListing(self, full_path): + self._WriteHeader('text/html') + self._WriteTemplate('header.html') + self.wfile.write('<div class="doc">') + + self.wfile.write('<div class="Breadcrumbs">\n') + self.wfile.write('<a class="Breadcrumbs-crumb">%s</a>\n' % self.path) + self.wfile.write('</div>\n') + + for _, dirs, files in os.walk(full_path): + for f in sorted(files): + if f.startswith('.'): + continue + if f.endswith('.md'): + bold = ('<b>', '</b>') + else: + bold = ('', '') + self.wfile.write('<a href="%s/%s">%s%s%s</a><br/>\n' % + (self.path.rstrip('/'), f, bold[0], f, bold[1])) + + self.wfile.write('<br/>\n') + + for d in sorted(dirs): + if d.startswith('.'): + continue + self.wfile.write('<a href="%s/%s">%s/</a><br/>\n' % + (self.path.rstrip('/'), d, d)) + + break + + self.wfile.write('</div>') + self._WriteTemplate('footer.html') + + def _DoImage(self, full_path, mime_type): + self._WriteHeader(mime_type) + with open(full_path) as f: + self.wfile.write(f.read()) + f.close() + def _Read(self, relpath, relative_to=None): if relative_to is None: relative_to = self.server.top_level
diff --git a/tools/md_browser/prettify.css b/tools/md_browser/prettify.css new file mode 100644 index 0000000..d44b3a2 --- /dev/null +++ b/tools/md_browser/prettify.css
@@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} \ No newline at end of file
diff --git a/tools/md_browser/update-css.sh b/tools/md_browser/update-css.sh new file mode 100755 index 0000000..cfb097e --- /dev/null +++ b/tools/md_browser/update-css.sh
@@ -0,0 +1,14 @@ +#!/bin/bash +# Copyright 2017 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. + +URL_BASE='https://gerrit.googlesource.com/gitiles/+/HEAD/gitiles-servlet/src/main/resources/com/google/gitiles/static' + +# Quickly pull down the latest gitiles css files. +for css in base doc prettify/prettify; do + output="${css#*/}.css" + url="${URL_BASE}/${css}.css?format=TEXT" + echo "Updating ${output}" + curl "${url}" | base64 -d >"${output}" +done
diff --git a/tools/metrics/BUILD.gn b/tools/metrics/BUILD.gn new file mode 100644 index 0000000..01b1653 --- /dev/null +++ b/tools/metrics/BUILD.gn
@@ -0,0 +1,38 @@ +# Copyright 2017 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. + +copy("histograms_xml") { + sources = [ + "histograms/histograms.xml", + ] + outputs = [ + "$root_out_dir/histograms.xml", + ] +} + +copy("actions_xml") { + sources = [ + "actions/actions.xml", + ] + outputs = [ + "$root_out_dir/actions.xml", + ] +} + +copy("rappor_xml") { + sources = [ + "rappor/rappor.xml", + ] + outputs = [ + "$root_out_dir/rappor.xml", + ] +} + +group("metrics_metadata") { + deps = [ + ":actions_xml", + ":histograms_xml", + ":rappor_xml", + ] +}
diff --git a/tools/metrics/OWNERS b/tools/metrics/OWNERS index cf5b92c1..559d7b21 100644 --- a/tools/metrics/OWNERS +++ b/tools/metrics/OWNERS
@@ -4,3 +4,5 @@ jwd@chromium.org mpearson@chromium.org rkaplow@chromium.org + +# COMPONENT: Internals>Metrics
diff --git a/tools/metrics/actions/actions.xml b/tools/metrics/actions/actions.xml index cc2df0bf..be61786 100644 --- a/tools/metrics/actions/actions.xml +++ b/tools/metrics/actions/actions.xml
@@ -1116,6 +1116,66 @@ </description> </action> +<action name="Android.ChromeHome.Closed"> + <owner>mdjones@chromium.org</owner> + <owner>twellington@chromium.org</owner> + <description>User closed the Chrome Home bottom sheet.</description> +</action> + +<action name="Android.ChromeHome.FullState"> + <owner>mdjones@chromium.org</owner> + <owner>twellington@chromium.org</owner> + <description> + User put the Chrome Home bottom sheet in the fully-open state. + </description> +</action> + +<action name="Android.ChromeHome.HalfState"> + <owner>mdjones@chromium.org</owner> + <owner>twellington@chromium.org</owner> + <description> + User put the Chrome Home bottom sheet in the half-open state. + </description> +</action> + +<action name="Android.ChromeHome.Opened"> + <owner>mdjones@chromium.org</owner> + <owner>twellington@chromium.org</owner> + <description>User opened the Chrome Home bottom sheet.</description> +</action> + +<action name="Android.ChromeHome.ShowBookmarks"> + <owner>mdjones@chromium.org</owner> + <owner>twellington@chromium.org</owner> + <description>User showed the bookmarks bottom sheet content.</description> +</action> + +<action name="Android.ChromeHome.ShowDownloads"> + <owner>mdjones@chromium.org</owner> + <owner>twellington@chromium.org</owner> + <description>User showed the downloads bottom sheet content.</description> +</action> + +<action name="Android.ChromeHome.ShowHistory"> + <owner>mdjones@chromium.org</owner> + <owner>twellington@chromium.org</owner> + <description>User showed the history bottom sheet content.</description> +</action> + +<action name="Android.ChromeHome.ShowIncognitoHome"> + <owner>mdjones@chromium.org</owner> + <owner>twellington@chromium.org</owner> + <description> + User showed the incognito bottom sheet content in the "Home" tab. + </description> +</action> + +<action name="Android.ChromeHome.ShowSuggestions"> + <owner>mdjones@chromium.org</owner> + <owner>twellington@chromium.org</owner> + <description>User showed the suggestions bottom sheet content.</description> +</action> + <action name="Android.ContentDetectorActivated"> <owner>twellington@chromium.org</owner> <description> @@ -1357,7 +1417,7 @@ <owner>mariakhomenko@chromium.org</owner> <owner>tedchoc@chromium.org</owner> <description> - An instant app was launched from the website settings popup. + An instant app was launched from the page info popup. </description> </action> @@ -3295,6 +3355,38 @@ <description>Please enter the description of this user action.</description> </action> +<action name="ContentSuggestions.NotificationsPreferenceOff"> + <owner>dgn@chromium.org</owner> + <owner>finkm@chromium.org</owner> + <description> + The user turned off the content suggestions notifications in the settings. + </description> +</action> + +<action name="ContentSuggestions.NotificationsPreferenceOn"> + <owner>dgn@chromium.org</owner> + <owner>finkm@chromium.org</owner> + <description> + The user turned on the content suggestions notifications in the settings. + </description> +</action> + +<action name="ContentSuggestions.RemoteSuggestionsPreferenceOff"> + <owner>dgn@chromium.org</owner> + <owner>finkm@chromium.org</owner> + <description> + The user turned off remote content suggestions in the settings. + </description> +</action> + +<action name="ContentSuggestions.RemoteSuggestionsPreferenceOn"> + <owner>dgn@chromium.org</owner> + <owner>finkm@chromium.org</owner> + <description> + The user turned on remote content suggestions in the settings. + </description> +</action> + <action name="ContextualSearch.BackPressClose"> <owner>donnd@chromium.org</owner> <description> @@ -3513,6 +3605,7 @@ <action name="CreateShortcut"> <owner>Please list the metric's owners. Add more owner tags as needed.</owner> <description>Please enter the description of this user action.</description> + <obsolete>Deprecated as of 04/2017 (replaced by CreateHostedApp).</obsolete> </action> <action name="CredentialManager_AccountChooser_Accepted"> @@ -3566,6 +3659,14 @@ <description>Close button of the CustomTabActivity was clicked.</description> </action> +<action name="CustomTabs.CloseButtonClicked.DownloadsUI"> + <owner>shaktisahu@chromium.org</owner> + <description> + The user has clicked on the back arrow while viewing downloaded media on + Android. + </description> +</action> + <action name="CustomTabs.StartedInitially"> <owner>tedchoc@chromium.org</owner> <description>A CustomTabActivity was stared for the first time.</description> @@ -3597,11 +3698,27 @@ <description>Please enter the description of the metric.</description> </action> +<action name="CustomTabsCustomActionButtonClick.DownloadsUI.Share"> + <owner>shaktisahu@chromium.org</owner> + <description> + The user has clicked on the share button while viewing downloaded media on + Android. + </description> +</action> + <action name="CustomTabsMenuCustomMenuItem"> <owner>Please list the metric's owners. Add more owner tags as needed.</owner> <description>Please enter the description of the metric.</description> </action> +<action name="CustomTabsMenuCustomMenuItem.DownloadsUI.OpenWith"> + <owner>shaktisahu@chromium.org</owner> + <description> + The user has selected Open With from the menu while viewing downloaded media + on Android. + </description> +</action> + <action name="CustomTabsMenuFindInPage"> <owner>Please list the metric's owners. Add more owner tags as needed.</owner> <description>Please enter the description of the metric.</description> @@ -4384,6 +4501,7 @@ <action name="FirstRunDef_Accept"> <owner>Please list the metric's owners. Add more owner tags as needed.</owner> <description>Please enter the description of this user action.</description> + <obsolete>Deprecated 02/2017.</obsolete> </action> <action name="Flash.JavaScriptUsed" not_user_triggered="true"> @@ -8994,11 +9112,29 @@ <description>The user entered fullscreen mode from the controls.</description> </action> +<action name="Media.Controls.EnterFullscreen.EmbeddedExperience"> + <owner>shaktisahu@chromium.org</owner> + <description> + The user has entered fullscreen mode from the controls. Recorded only for + downloaded media on Android and is a subset of + Media.Controls.EnterFullscreen. + </description> +</action> + <action name="Media.Controls.ExitFullscreen"> <owner>mlamouri@chromium.org</owner> <description>The user left fullscreen mode from the controls.</description> </action> +<action name="Media.Controls.ExitFullscreen.EmbeddedExperience"> + <owner>shaktisahu@chromium.org</owner> + <description> + The user has left fullscreen mode from the controls. Recorded only for + downloaded media on Android and is a subset of + Media.Controls.ExitFullscreen. + </description> +</action> + <action name="Media.Controls.Mute"> <owner>mlamouri@chromium.org</owner> <description>The user muted a media element from the controls.</description> @@ -9429,6 +9565,21 @@ <obsolete>Deprecated as of at least 2017/02/28.</obsolete> </action> +<action name="MobileClipboardChanged"> + <owner>jif@chromium.org</owner> + <owner>mpearson@chromium.org</owner> + <description> + Emitted when Chrome detects that the clipboard contains new content. + + On iOS: this occurs either when Chrome enters the foreground and notices + that the content of the clipboard changed, or when the users selects the + omnibox and Chrome notices that the content of the clipboard changed. + + On Android: this occurs when Chrome starts up or when the clipboard changes + while Chrome is running (in the foreground or not). + </description> +</action> + <action name="MobileComeToForeground"> <owner>tedchoc@chromium.org</owner> <description> @@ -9699,6 +9850,11 @@ <obsolete>This menu item was never added to the app menu.</obsolete> </action> +<action name="MobileMenuDataSaverOpened"> + <owner>megjablon@chromium.org</owner> + <description>User opened the data saver item in the app menu.</description> +</action> + <action name="MobileMenuDirectShare"> <owner>aurimas@chromium.org</owner> <description> @@ -9803,6 +9959,11 @@ </description> </action> +<action name="MobileMenuReportAnIssue"> + <owner>rohitrao@chromium.org</owner> + <description>User pressed 'Report an Issue' in the app menu.</description> +</action> + <action name="MobileMenuRequestDesktopSite"> <owner>aurimas@chromium.org</owner> <description> @@ -9810,6 +9971,11 @@ </description> </action> +<action name="MobileMenuRequestMobileSite"> + <owner>liaoyuke@chromium.org</owner> + <description>User pressed 'Request Mobile Site' in the app menu.</description> +</action> + <action name="MobileMenuSettings"> <owner>aurimas@chromium.org</owner> <description>User pressed 'Settings' in the app menu.</description> @@ -9938,6 +10104,14 @@ <description>Please enter the description of this user action.</description> </action> +<action name="MobileNTPOpenedInNewTab"> + <owner>fhorschig@chromium.org</owner> + <description> + The user manually created a New Tab Page (NTP) in a new tab that has not + been shown before. This includes the initial tab (when starting Chrome). + </description> +</action> + <action name="MobileNTPRecentlyClosed"> <owner>Please list the metric's owners. Add more owner tags as needed.</owner> <description>Please enter the description of this user action.</description> @@ -9995,11 +10169,18 @@ <action name="MobileOmniboxClipboardChanged"> <owner>jif@chromium.org</owner> <description> - Emitted when Chrome detects that the clipboard contains a new URL. This - occurs either when Chrome enters the foreground and notices that the content - of the clipboard changed, or when the clipboard changes while Chrome is in - the foreground. + Emitted when Chrome detects that the clipboard contains a new URL. + + On iOS: this occurs either when Chrome enters the foreground and notices + that the content of the clipboard changed, or when the clipboard changes + while Chrome is in the foreground. + + On Android: this occurs when Chrome starts up or when the clipboard changes + while Chrome is running (in the foreground or not). </description> + <obsolete> + Replaced with MobileOmniboxClipboardChanged in April 2017. + </obsolete> </action> <action name="MobileOmniboxDeleteGesture"> @@ -10261,6 +10442,14 @@ <description>Please enter the description of this user action.</description> </action> +<action name="MobileStartup.MainIntent.NTPCreatedDueToInactivity"> + <owner>tedchoc@chromium.org</owner> + <description> + An ACTION_MAIN intent was received by Chrome and an NTP was created due to + the time elapsed since Chrome was last visited. + </description> +</action> + <action name="MobileStartup.MainIntentReceived"> <owner>tedchoc@chromium.org</owner> <description> @@ -10269,6 +10458,38 @@ </description> </action> +<action name="MobileStartup.MainIntentReceived.After12Hours"> + <owner>tedchoc@chromium.org</owner> + <description> + An ACTION_MAIN intent was received by Chrome after the user had not used + Chrome for 12 hours but fewer than 24 hours. + </description> +</action> + +<action name="MobileStartup.MainIntentReceived.After1Hour"> + <owner>tedchoc@chromium.org</owner> + <description> + An ACTION_MAIN intent was received by Chrome after the user had not used + Chrome for 1 hour but fewer than 6 hours. + </description> +</action> + +<action name="MobileStartup.MainIntentReceived.After24Hours"> + <owner>tedchoc@chromium.org</owner> + <description> + An ACTION_MAIN intent was received by Chrome after the user had not used + Chrome for 24 hours. + </description> +</action> + +<action name="MobileStartup.MainIntentReceived.After6Hours"> + <owner>tedchoc@chromium.org</owner> + <description> + An ACTION_MAIN intent was received by Chrome after the user had not used + Chrome for 6 hours but fewer than 12 hours. + </description> +</action> + <action name="MobileTabClobbered"> <owner>Please list the metric's owners. Add more owner tags as needed.</owner> <description>Please enter the description of this user action.</description> @@ -10410,13 +10631,13 @@ <action name="MobileWebsiteSettingsOpenedFromMenu"> <owner>tedchoc@chromium.org</owner> - <description>Website Settings opened via the menu.</description> + <description>Page Info opened via the menu.</description> </action> <action name="MobileWebsiteSettingsOpenedFromToolbar"> <owner>tedchoc@chromium.org</owner> <description> - Website Settings opened via the toolbar page info (i.e. https lock) icon. + Page Info opened via the toolbar page info (i.e. https lock) icon. </description> </action> @@ -13653,6 +13874,15 @@ <obsolete>Deprecated due to NPAPI removal.</obsolete> </action> +<action name="Precache.Fetch.Begin" not_user_triggered="true"> + <owner>twifkak@chromium.org</owner> + <owner>jamartin@chromium.org</owner> + <description> + A precache fetch was initiated, having met all the necessary preconditions. + This occurs when precache is in either Enabled or Control mode. + </description> +</action> + <action name="Precache.Fetch.IntentReceived" not_user_triggered="true"> <owner>twifkak@chromium.org</owner> <owner>bengr@chromium.org</owner> @@ -14325,6 +14555,42 @@ <description>Please enter the description of this user action.</description> </action> +<action name="SettingsResetPrompt_Accepted"> + <owner>alito@chromium.org</owner> + <description>The user accepted the settings reset prompt.</description> +</action> + +<action name="SettingsResetPrompt_Canceled"> + <owner>alito@chromium.org</owner> + <description> + The user clicked the cancel button in the settings reset prompt dialog. + </description> +</action> + +<action name="SettingsResetPrompt_Declined"> + <owner>alito@chromium.org</owner> + <description>The user declined the settings reset prompt.</description> + <obsolete> + Deprecated in M59 in April 2017 and replaced by SettingsResetPrompt_Canceled + and SettingsResetPrompt_Dismissed. + </obsolete> +</action> + +<action name="SettingsResetPrompt_Dismissed"> + <owner>alito@chromium.org</owner> + <description> + The user dismissed the settings reset prompt, for example by clicking the x + in the top right corner or pressing the Escape key. + </description> +</action> + +<action name="SettingsResetPrompt_Shown"> + <owner>alito@chromium.org</owner> + <description> + The settings reset dialog was displayed to the user. + </description> +</action> + <action name="Shelf_AlignmentSetBottom"> <owner>Please list the metric's owners. Add more owner tags as needed.</owner> <description>Please enter the description of this user action.</description> @@ -15123,6 +15389,20 @@ <description>Please enter the description of this user action.</description> </action> +<action name="StatusArea_CaretHighlightDisabled"> + <owner>minch@chromium.org</owner> + <description> + Ash system menu: Accessibility: Disable caret highlighting + </description> +</action> + +<action name="StatusArea_CaretHighlightEnabled"> + <owner>minch@chromium.org</owner> + <description> + Ash system menu: Accessibility: Enable caret highlighting + </description> +</action> + <action name="StatusArea_Cast_Detailed"> <owner>jdufault@chromium.org</owner> <description> @@ -15227,6 +15507,34 @@ <description>Please enter the description of this user action.</description> </action> +<action name="StatusArea_HighlightKeyboardFocusDisabled"> + <owner>minch@chromium.org</owner> + <description> + Ash system menu: Accessibility: Disable keyboard focus highlighting + </description> +</action> + +<action name="StatusArea_HighlightKeyboardFocusEnabled"> + <owner>minch@chromium.org</owner> + <description> + Ash system menu: Accessibility: Enable keyboard focus highlighting + </description> +</action> + +<action name="StatusArea_HighlightMouseCursorDisabled"> + <owner>minch@chromium.org</owner> + <description> + Ash system menu: Accessibility: Disable mouse cursor highlighting + </description> +</action> + +<action name="StatusArea_HighlightMouseCursorEnabled"> + <owner>minch@chromium.org</owner> + <description> + Ash system menu: Accessibility: Enable mouse cursor highlighting + </description> +</action> + <action name="StatusArea_IME_Detailed"> <owner>Please list the metric's owners. Add more owner tags as needed.</owner> <description>Please enter the description of this user action.</description> @@ -15262,6 +15570,16 @@ <description>Please enter the description of this user action.</description> </action> +<action name="StatusArea_MonoAudioDisabled"> + <owner>minch@chromium.org</owner> + <description>Ash system menu: Accessibility: Disable mono audio</description> +</action> + +<action name="StatusArea_MonoAudioEnabled"> + <owner>minch@chromium.org</owner> + <description>Ash system menu: Accessibility: Enable mono audio</description> +</action> + <action name="StatusArea_Network_ConnectConfigured"> <owner>Please list the metric's owners. Add more owner tags as needed.</owner> <description>Please enter the description of this user action.</description> @@ -15378,6 +15696,28 @@ <description>Please enter the description of this user action.</description> </action> +<action name="StatusArea_StickyKeysDisabled"> + <owner>minch@chromium.org</owner> + <description>Ash system menu: Accessibility: Disable sticky keys</description> +</action> + +<action name="StatusArea_StickyKeysEnabled"> + <owner>minch@chromium.org</owner> + <description>Ash system menu: Accessibility: Enable sticky keys</description> +</action> + +<action name="StatusArea_TapDraggingDisabled"> + <owner>minch@chromium.org</owner> + <description> + Ash system menu: Accessibility: Disable tap dragging + </description> +</action> + +<action name="StatusArea_TapDraggingEnabled"> + <owner>minch@chromium.org</owner> + <description>Ash system menu: Accessibility: Enable tap dragging</description> +</action> + <action name="StatusArea_Tracing_Default_Selected"> <owner>bruthig@chromium.org</owner> <owner>tbuckley@chromium.org</owner> @@ -15733,6 +16073,54 @@ <description>Please enter the description of this user action.</description> </action> +<action name="TodayExtension.ExtensionDismissed"> + <owner>olivierrobin@chromium.org</owner> + <description>Dismissed the Chrome Today extension.</description> +</action> + +<action name="TodayExtension.ExtensionDisplayed"> + <owner>olivierrobin@chromium.org</owner> + <description> + Displayed the notification center and display the Chrome Today extension. + </description> +</action> + +<action name="TodayExtension.ExtensionInitialized"> + <owner>olivierrobin@chromium.org</owner> + <description> + Displayed the notification center and initialize the Chrome Today extension. + </description> +</action> + +<action name="TodayExtension.NewTabPressed"> + <owner>olivierrobin@chromium.org</owner> + <description> + Tapped on the "New Tab" button in the Chrome Today extension. + </description> +</action> + +<action name="TodayExtension.OpenClipboardPressed"> + <owner>olivierrobin@chromium.org</owner> + <description> + Tapped on the "Open Copied Link" button in the Chrome Today + extension. + </description> +</action> + +<action name="TodayExtension.PhysicalWebPressed"> + <owner>olivierrobin@chromium.org</owner> + <description> + Tapped on physical web URL in the Chrome Today extension. + </description> +</action> + +<action name="TodayExtension.VoiceSearchPressed"> + <owner>olivierrobin@chromium.org</owner> + <description> + Tapped on the "Voice Search" button in the Chrome Today extension. + </description> +</action> + <action name="ToggleBold"> <owner>Please list the metric's owners. Add more owner tags as needed.</owner> <description>Please enter the description of this user action.</description> @@ -15898,6 +16286,7 @@ <action name="Unselect"> <owner>Please list the metric's owners. Add more owner tags as needed.</owner> <description>Please enter the description of this user action.</description> + <obsolete>Deprecated 03/2017 in issue 697756.</obsolete> </action> <action name="UpdateChrome">
diff --git a/tools/metrics/actions/pretty_print.py b/tools/metrics/actions/pretty_print.py new file mode 100755 index 0000000..0a1d6ed --- /dev/null +++ b/tools/metrics/actions/pretty_print.py
@@ -0,0 +1,20 @@ +#!/usr/bin/env python +# Copyright 2017 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. + +import logging +import os +import sys + +import extract_actions +sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'common')) +import presubmit_util + +def main(argv): + presubmit_util.DoPresubmitMain(argv, 'actions.xml', 'actions.old.xml', + 'pretty_print.py', extract_actions.UpdateXml) + + +if '__main__' == __name__: + sys.exit(main(sys.argv))
diff --git a/tools/metrics/common/models.py b/tools/metrics/common/models.py index dfae14e2..70cf90b 100644 --- a/tools/metrics/common/models.py +++ b/tools/metrics/common/models.py
@@ -76,17 +76,22 @@ extra_newlines: None or a triple of integers describing the number of newlines that should be printed (after_open, before_close, after_close) single_line: True iff this node may be squashed into a single line. + alphabetization: A (tag, keyfn) pair, which specifies the tag of the + children that should be sorted, and a function to get the sort key from + the xml node. """ __metaclass__ = abc.ABCMeta def __init__(self, tag, indent=True, extra_newlines=None, - single_line=False): + single_line=False, + alphabetization=None): self.tag = tag self.indent = indent self.extra_newlines = extra_newlines self.single_line = single_line + self.alphabetization = alphabetization @abc.abstractmethod def Unmarshall(self, node): @@ -369,7 +374,8 @@ if types[t].extra_newlines}, tags_that_dont_indent=[t for t in types if not types[t].indent], tags_that_allow_single_line=[t for t in types if types[t].single_line], - tags_alphabetization_rules={}) + tags_alphabetization_rules={t: types[t].alphabetization for t in types + if types[t].alphabetization}) def _ToXML(self, obj): """Converts an object into an XML document. @@ -393,4 +399,4 @@ Returns: A string containing pretty printed XML. """ - return self.GetPrintStyle().PrettyPrintNode(self._ToXML(obj)) + return self.GetPrintStyle().PrettyPrintXml(self._ToXML(obj))
diff --git a/tools/metrics/histograms/OWNERS b/tools/metrics/histograms/OWNERS index 8dcc2789..383ec3b 100644 --- a/tools/metrics/histograms/OWNERS +++ b/tools/metrics/histograms/OWNERS
@@ -2,11 +2,11 @@ per-file histograms.xml=set noparent per-file histograms.xml=file://tools/metrics/OWNERS -# EMEA-based reviewers for UseCounter histogram changes only. +# EMEA-based reviewers for Blink UseCounter histogram changes only. per-file histograms.xml=jochen@chromium.org per-file histograms.xml=mkwst@chromium.org -# APAC-based reviewers for UseCounter histogram changes only. +# APAC-based reviewers for Blink UseCounter histogram changes only. per-file histograms.xml=ericwilligers@chromium.org per-file histograms.xml=haraken@chromium.org
diff --git a/tools/metrics/histograms/PRESUBMIT.py b/tools/metrics/histograms/PRESUBMIT.py index 7d9e9ff..24b86aa 100644 --- a/tools/metrics/histograms/PRESUBMIT.py +++ b/tools/metrics/histograms/PRESUBMIT.py
@@ -12,22 +12,18 @@ """Checks that histograms.xml is pretty-printed and well-formatted.""" for f in input_api.AffectedTextFiles(): p = f.AbsoluteLocalPath() - if (input_api.basename(p) == 'histograms.xml' - and input_api.os_path.dirname(p) == input_api.PresubmitLocalPath()): - cwd = input_api.os_path.dirname(p) - exit_code = input_api.subprocess.call( - ['python', 'pretty_print.py', '--presubmit'], cwd=cwd) - if exit_code != 0: - return [output_api.PresubmitError( - 'histograms.xml is not formatted correctly; run %s/pretty_print.py ' - 'to fix' % input_api.PresubmitLocalPath())] + if input_api.basename(p) != 'histograms.xml': + continue + cwd = input_api.os_path.dirname(p) + if cwd != input_api.PresubmitLocalPath(): + continue - exit_code = input_api.subprocess.call( - ['python', 'validate_format.py'], cwd=cwd) - if exit_code != 0: - return [output_api.PresubmitError( - 'histograms.xml is not well formatted; run %s/validate_format.py ' - 'and fix the reported errors' % input_api.PresubmitLocalPath())] + exit_code = input_api.subprocess.call( + ['python', 'validate_format.py'], cwd=cwd) + if exit_code != 0: + return [output_api.PresubmitError( + 'histograms.xml is not well formatted; run %s/validate_format.py ' + 'and fix the reported errors' % cwd)] return []
diff --git a/tools/metrics/histograms/extract_histograms.py b/tools/metrics/histograms/extract_histograms.py index 7ed28318..6e53bc41 100644 --- a/tools/metrics/histograms/extract_histograms.py +++ b/tools/metrics/histograms/extract_histograms.py
@@ -54,6 +54,7 @@ """ +import bisect import copy import logging import xml.dom.minidom @@ -200,7 +201,6 @@ have_errors = True continue - last_int_value = None enum_dict = {} enum_dict['name'] = name enum_dict['values'] = {} @@ -208,11 +208,6 @@ for int_tag in enum.getElementsByTagName('int'): value_dict = {} int_value = int(int_tag.getAttribute('value')) - if last_int_value is not None and int_value < last_int_value: - logging.error('Enum %s int values %d and %d are not in numerical order', - name, last_int_value, int_value) - have_errors = True - last_int_value = int_value if int_value in enum_dict['values']: logging.error('Duplicate enum value %d for enum %s', int_value, name) have_errors = True @@ -221,6 +216,26 @@ value_dict['summary'] = _JoinChildNodes(int_tag) enum_dict['values'][int_value] = value_dict + enum_int_values = sorted(enum_dict['values'].keys()) + + last_int_value = None + for int_tag in enum.getElementsByTagName('int'): + int_value = int(int_tag.getAttribute('value')) + if last_int_value is not None and int_value < last_int_value: + logging.error('Enum %s int values %d and %d are not in numerical order', + name, last_int_value, int_value) + have_errors = True + left_item_index = bisect.bisect_left(enum_int_values, int_value) + if left_item_index == 0: + logging.warning('Insert value %d at the beginning', int_value) + else: + left_int_value = enum_int_values[left_item_index - 1] + left_label = enum_dict['values'][left_int_value]['label'] + logging.warning('Insert value %d after %d ("%s")', + int_value, left_int_value, left_label) + else: + last_int_value = int_value + summary_nodes = enum.getElementsByTagName('summary') if summary_nodes: enum_dict['summary'] = _NormalizeString(_JoinChildNodes(summary_nodes[0]))
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index da1f11b..d09ce59 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml
@@ -159,6 +159,15 @@ </summary> </histogram> +<histogram name="Accessibility.CrosLargeCursorSize" units="dip"> + <owner>yawano@chromium.org</owner> + <owner>lpalmaro@chromium.org</owner> + <summary> + Cursor size of the Chrome OS Large Cursor (checked once 45 secs after + startup). + </summary> +</histogram> + <histogram name="Accessibility.CrosScreenMagnifier" enum="BooleanEnabled"> <owner>dmazzoni@chromium.org</owner> <owner>kenjibaheux@google.com</owner> @@ -388,6 +397,15 @@ </summary> </histogram> +<histogram name="ActivityTracker.Collect.SystemSessionAnalysisStatus" + enum="ActivityTrackerSystemSessionAnalysisStatus"> + <owner>manzagop@chromium.org</owner> + <summary> + Status for the analysis of the system session state. Logged each time a + debug file is collected. + </summary> +</histogram> + <histogram name="ActivityTracker.Collect.TotalTime" units="ms"> <owner>manzagop@chromium.org</owner> <summary> @@ -414,6 +432,14 @@ </summary> </histogram> +<histogram name="ActivityTracker.Record.SetupTime" units="ms"> + <owner>manzagop@chromium.org</owner> + <summary> + Time spent setting up the stability debugging instrumentation. Logged once, + during setup of the stability debugging instrumentation. + </summary> +</histogram> + <histogram name="ActivityTracker.ThreadTrackers.Count" units="count"> <owner>bcwhite@chromium.org</owner> <summary> @@ -463,6 +489,36 @@ </summary> </histogram> +<histogram name="Android.ChromeHome.DurationOpen" units="ms"> + <owner>mdjones@chromium.org</owner> + <owner>twellington@chromium.org</owner> + <summary>The duration the Chrome Home bottom sheet was open.</summary> +</histogram> + +<histogram name="Android.ChromeHome.OpenReason" enum="ChromeHomeOpenReason"> + <owner>mdjones@chromium.org</owner> + <owner>twellington@chromium.org</owner> + <summary>The reason the bottom sheet was opened.</summary> +</histogram> + +<histogram name="Android.ChromeHome.TimeBetweenCloseAndNextOpen" units="ms"> + <owner>mdjones@chromium.org</owner> + <owner>twellington@chromium.org</owner> + <summary> + The time between the last time the Chrome Home bottom sheet was closed and + the next time it was opened. + </summary> +</histogram> + +<histogram name="Android.ChromeHome.TimeToFirstOpen" units="ms"> + <owner>mdjones@chromium.org</owner> + <owner>twellington@chromium.org</owner> + <summary> + The time between app creation and the first open of the Chrome Home bottom + sheet for this run of Chrome. + </summary> +</histogram> + <histogram name="Android.CustomFeedback.Category" enum="AndroidFeedbackCategory"> <owner>jwanda@chromium.org</owner> @@ -771,6 +827,14 @@ </summary> </histogram> +<histogram name="Android.RestoreResult" enum="AndroidRestoreResult"> + <owner>aberent@chromium.org</owner> + <summary> + Whether Chrome tried to restore its settings from a previous device or + installation, and what happened when it did. Only recorded on first run. + </summary> +</histogram> + <histogram name="Android.SeccompStatus.Prctl" enum="AndroidSeccompStatus"> <owner>rsesek@chromium.org</owner> <summary> @@ -1515,6 +1579,12 @@ <summary>Arc OptIn cancelation reason.</summary> </histogram> +<histogram name="Arc.OptInResult" enum="ArcOptInResult"> + <owner>elijahtaylor@google.com</owner> + <owner>khmel@google.com</owner> + <summary>Arc OptIn flow result.</summary> +</histogram> + <histogram name="Arc.OptInSilentAuthCode" enum="ArcOptInSilentAuthCode"> <owner>elijahtaylor@google.com</owner> <summary> @@ -1560,7 +1630,7 @@ <owner>alexchau@google.com</owner> <owner>phweiss@google.com</owner> <summary> - Elapsed time from click on "Sign in" to call to onSignInFailed for + Elapsed time from the signing in process start to call to onSignInFailed for managed users. </summary> </histogram> @@ -1569,7 +1639,7 @@ <owner>alexchau@google.com</owner> <owner>phweiss@google.com</owner> <summary> - Elapsed time from click on "Sign in" to call to onSignInFailed for + Elapsed time from the signing in process start to call to onSignInFailed for unmanaged users. </summary> </histogram> @@ -1578,7 +1648,7 @@ <owner>alexchau@google.com</owner> <owner>phweiss@google.com</owner> <summary> - Elapsed time from click on "Sign in" to successful call to + Elapsed time from the signing in process start to successful call to onSignInComplete for managed users. </summary> </histogram> @@ -1587,7 +1657,7 @@ <owner>alexchau@google.com</owner> <owner>phweiss@google.com</owner> <summary> - Elapsed time from click on "Sign in" to successful call to + Elapsed time from the signing in process start to successful call to onSignInComplete for unmanaged users. </summary> </histogram> @@ -1614,6 +1684,19 @@ </summary> </histogram> +<histogram name="ArcAuth.AccountCheckStatus" enum="ArcAuthAccountCheckStatus"> + <owner>elijahtaylor@google.com</owner> + <summary>The status of account check before GMS Sign-in.</summary> +</histogram> + +<histogram name="ArcAuth.AccountCheckTime" units="ms"> + <owner>elijahtaylor@chromium.org</owner> + <summary> + Elapsed time waiting for the account status check to be completed. This is + not recorded in case of account status check failure. + </summary> +</histogram> + <histogram name="ArcAuth.CheckinAttempts" units="attempts"> <owner>elijahtaylor@chromium.org</owner> <summary> @@ -1683,6 +1766,16 @@ </summary> </histogram> +<histogram name="Ash.Accelerators.Deprecated.ShowImeMenuBubble" + enum="DeprecatedAcceleratorUsage"> + <owner>afakhry@chromium.org</owner> + <summary> + Showing the IME menu bubble has two accelerators: - Alt+Shift+K which is + deprecated. - Search+Shift+K which is new. This histogram shows the number + of times each accelerator (deprecated and new) is used. + </summary> +</histogram> + <histogram name="Ash.Accelerators.Deprecated.ShowTaskManager" enum="DeprecatedAcceleratorUsage"> <owner>afakhry@chromium.org</owner> @@ -1852,6 +1945,16 @@ </summary> </histogram> +<histogram name="Ash.Rotation.AnimationSmoothness" units="%"> + <owner>wutao@chromium.org</owner> + <summary> + Relative smoothness of animations when rotating screen. 100% represents + ideally smooth 60 frames per second. 50% represents only 30 frames per + second is achieved during the animations. 0% should not happen. This metric + is recorded exactly once when the user rotates the screen. + </summary> +</histogram> + <histogram name="Ash.Shelf.Menu.NumItemsEnabledUponSelection" units="Count"> <owner>bruthig@google.com</owner> <owner>tdanderson@google.com</owner> @@ -2171,6 +2274,15 @@ </summary> </histogram> +<histogram name="Ash.Wallpaper.ColorExtractionResult" enum="BooleanSuccess"> + <owner>bruthig@chromium.org</owner> + <owner>tbuckley@chromium.org</owner> + <summary> + Tracks the success rate for wallpaper color extraction. Recorded each time + the wallpaper image changes. + </summary> +</histogram> + <histogram name="Ash.Wallpaper.CustomLayout" enum="WallpaperLayout"> <owner>xdai@chromium.org</owner> <summary> @@ -2208,6 +2320,17 @@ </summary> </histogram> +<histogram name="Ash.Wallpaper.TimeSpentResizing" units="ms"> + <owner>bruthig@chromium.org</owner> + <owner>tbuckley@chromium.org</owner> + <summary> + The time taken to resize wallpapers. Recorded once each time the wallpaper + changes (e.g. initial wallpaper loading at boot, switching user avatar at + login screen, switching between logged in users, user selects new wallpaper, + etc). + </summary> +</histogram> + <histogram name="Ash.Wallpaper.Type" enum="WallpaperType"> <owner>kuscher@google.com</owner> <summary>The wallpaper type. Recorded at user login.</summary> @@ -4127,6 +4250,51 @@ </summary> </histogram> +<histogram base="true" name="BackgroundFetch.EventDispatchFailure.Dispatch" + enum="ServiceWorkerStatusCode"> +<!-- Name completed by histogram_suffixes name="BackgroundFetchEvents" --> + + <owner>peter@chromium.org</owner> + <summary> + Records the Service Worker status code that caused a Background Fetch API + event to fail dispatching whilst trying to dispatch an event on the active + Service Worker. + </summary> +</histogram> + +<histogram base="true" name="BackgroundFetch.EventDispatchFailure.FindWorker" + enum="ServiceWorkerStatusCode"> +<!-- Name completed by histogram_suffixes name="BackgroundFetchEvents" --> + + <owner>peter@chromium.org</owner> + <summary> + Records the Service Worker status code that caused a Background Fetch API + event to fail dispatching whilst trying to find the Service Worker. + </summary> +</histogram> + +<histogram base="true" name="BackgroundFetch.EventDispatchFailure.StartWorker" + enum="ServiceWorkerStatusCode"> +<!-- Name completed by histogram_suffixes name="BackgroundFetchEvents" --> + + <owner>peter@chromium.org</owner> + <summary> + Records the Service Worker status code that caused a Background Fetch API + event to fail dispatching whilst trying to start the active Service Worker. + </summary> +</histogram> + +<histogram base="true" name="BackgroundFetch.EventDispatchResult" + enum="BackgroundFetchEventDispatchResult"> +<!-- Name completed by histogram_suffixes name="BackgroundFetchEvents" --> + + <owner>peter@chromium.org</owner> + <summary> + Records the result of dispatching one of the Background Fetch API events to + the Service Worker associated with the event. + </summary> +</histogram> + <histogram name="BackgroundMode.BackgroundApplicationsCount"> <owner>atwilson@chromium.org</owner> <owner>mvanouwerkerk@chromium.org</owner> @@ -4473,15 +4641,58 @@ <summary>Records whenever a Blimp tab toggles visibility.</summary> </histogram> +<histogram name="Blink.Binding.InitializeMainLocalWindowProxy" + units="microseconds"> + <owner>peria@chromium.org</owner> + <summary> + Time spent initializing LocalWindowProxy during a page loading in main + windows. + </summary> +</histogram> + +<histogram name="Blink.Binding.InitializeMainRemoteWindowProxy" + units="microseconds"> + <owner>peria@chromium.org</owner> + <summary> + Time spent initializing RemoteWindowProxy during a page loading in main + frame of OOPIF. + </summary> +</histogram> + <histogram name="Blink.Binding.InitializeMainWindowProxy" units="microseconds"> + <obsolete> + Deprecated as of 03/2017. This metric was split into two metrics depending + if it figures time for local window proxies or remote ones. + </obsolete> <owner>peria@chromium.org</owner> <summary> Time spent initializing WindowProxy during a page loading in main windows. </summary> </histogram> +<histogram name="Blink.Binding.InitializeNonMainLocalWindowProxy" + units="microseconds"> + <owner>peria@chromium.org</owner> + <summary> + Time spent initializing LocalWindowProxy during a page loading in non-main + windows, e.g. iframe. + </summary> +</histogram> + +<histogram name="Blink.Binding.InitializeNonMainRemoteWindowProxy" + units="microseconds"> + <owner>peria@chromium.org</owner> + <summary> + Time spent initializing RemoteWindowProxy during a page loading in OOPIF. + </summary> +</histogram> + <histogram name="Blink.Binding.InitializeNonMainWindowProxy" units="microseconds"> + <obsolete> + Deprecated as of 03/2017. This metric was split into two metrics depending + if it figures time for local window proxies or remote ones. + </obsolete> <owner>peria@chromium.org</owner> <summary> Time spent initializing WindowProxy during a page loading in non-main @@ -4939,6 +5150,9 @@ </histogram> <histogram name="Blink.RestoredCachedStyleSheet2" enum="StyleSheetCacheStatus"> + <obsolete> + Deprecated 04/2017. + </obsolete> <owner>kouhei@chromium.org</owner> <summary> On each link stylesheet tag resolve, record which cache Blink hit. @@ -5022,6 +5236,21 @@ </summary> </histogram> +<histogram name="Blink.UseCounter.AnimatedCSSProperties" + enum="MappedCSSProperties"> + <owner>rbyers@chromium.org</owner> + <summary> + Records usage of animated CSS properties used on a page, either statically + or dynamically, from the time the page is initialised to when it is closed + or navigated away from. Each property is counted at most once per page per + view. + </summary> + <details> + This histogram counts CSS properties only when they are animated by a CSS + Animation. Refer to Blink.UseCounter.CSSProperties for more details. + </details> +</histogram> + <histogram name="Blink.UseCounter.CSSProperties" enum="MappedCSSProperties"> <owner>rbyers@chromium.org</owner> <summary> @@ -5067,6 +5296,19 @@ </details> </histogram> +<histogram name="Blink.UseCounter.SVGImage.AnimatedCSSProperties" + enum="MappedCSSProperties"> + <owner>rbyers@chromium.org</owner> + <summary> + Like Blink.UseCounter.AnimatedCSSProperties but specifically for the case of + CSS properties used inside of an SVG image. + </summary> + <details> + This histogram counts usage of animated CSS properties only. Refer to + Blink.UseCounter.SVGImage.CSSProperties for details. + </details> +</histogram> + <histogram name="Blink.UseCounter.SVGImage.CSSProperties" enum="MappedCSSProperties"> <owner>rbyers@chromium.org</owner> @@ -5489,6 +5731,10 @@ </histogram> <histogram name="Bluetooth.Web.FunctionCall.Count" enum="WebBluetoothFunction"> + <obsolete> + Deprecated as of 3/2017. Replaced by using blink IDL annotation MeasureAs + which appear in Blink.UseCounter.Features. + </obsolete> <owner>jyasskin@chromium.org</owner> <owner>ortuno@chromium.org</owner> <owner>scheib@chromium.org</owner> @@ -6195,6 +6441,14 @@ </summary> </histogram> +<histogram name="Cast.Channel.Nonce" enum="CastNonceStatus"> + <owner>ryanchung@google.com</owner> + <summary> + Records whether the correct nonce challenge was in the Cast receiver's + response. + </summary> +</histogram> + <histogram name="Cast.Network.Down.Duration.In.Seconds" units="seconds"> <owner>cast-analytics@google.com</owner> <summary> @@ -6588,6 +6842,9 @@ </histogram> <histogram name="ChildProcess.HangRendererType" enum="RendererUnresponsiveType"> + <obsolete> + Deprecated 3/2017. + </obsolete> <owner>clamy@chromium.org</owner> <summary> What the browser was waiting for from the renderer when it was reported as @@ -7260,6 +7517,18 @@ </summary> </histogram> +<histogram name="Clipboard.ConstructedHasher" enum="BooleanSuccess"> + <obsolete> + Launched briefly in M-59 dev, then refactoring made obsolete. + </obsolete> + <owner>mpearson@chromium.org</owner> + <summary> + Whether Android's Clipboard.java successfully constructed a hasher to hash + clipboard entries. Recorded on construction of the class, which happens + only on startup. + </summary> +</histogram> + <histogram name="Clipboard.IncognitoUseCase" enum="ClipboardAction"> <obsolete> Deprecated as of 4/2013, experiment confirmed correctness of our patch. @@ -8004,6 +8273,30 @@ </summary> </histogram> +<histogram name="Compositing.SurfaceAggregator.SurfaceDrawQuad.MissingSurface"> + <owner>kylechar@chromium.org</owner> + <summary> + The number of SurfaceDrawQuads where the surface doesn't exist. This is + logged for each call to Aggregate(). + </summary> +</histogram> + +<histogram name="Compositing.SurfaceAggregator.SurfaceDrawQuad.NoActiveFrame"> + <owner>kylechar@chromium.org</owner> + <summary> + The number of SurfaceDrawQuads where the surface exists but doesn't have an + active CompositorFrame. This is logged for each call to Aggregate(). + </summary> +</histogram> + +<histogram name="Compositing.SurfaceAggregator.SurfaceDrawQuad.ValidSurface"> + <owner>kylechar@chromium.org</owner> + <summary> + The number of SurfaceDrawQuads where the surface exists and has an active + CompositorFrame. This is logged for each call to Aggregate(). + </summary> +</histogram> + <histogram name="Conflicts.ConfirmedBadModules" units="modules"> <owner>chrisha@chromium.org</owner> <summary> @@ -8259,6 +8552,9 @@ Count of how often a specific content type has a content settings exception defined for a file: scheme with no path (i.e., wildcard path). Recorded once per exception at browser start. + + Note: The values of this metric collected for Chrome 49 (early 2016) are + innacurate and should not be trusted. crbug.com/589255. </summary> </histogram> @@ -8269,6 +8565,9 @@ Count of how often a specific content type has a content settings exception defined for a file: scheme with a valid, non-empty path. Recorded once per exception at browser start. + + Note: The values of this metric collected for Chrome 49 (early 2016) are + innacurate and should not be trusted. crbug.com/589255. </summary> </histogram> @@ -8900,12 +9199,26 @@ <summary>For each cookie added to the store, record it's type(s).</summary> </histogram> +<histogram name="CopylessPaste.ExtractionFailedUs" units="microseconds"> + <owner>wychen@chromium.org</owner> + <summary> + The time spent on scanning the document in the main frame to extract the + metadata. The metadata would be used to feed Icing for CopylessPaste feature + on Android. This only counts pages with failed or empty JSON extraction. + </summary> +</histogram> + +<histogram name="CopylessPaste.ExtractionStatus" enum="ExtractionStatus"> + <owner>wychen@chromium.org</owner> + <summary>The error status of metadata extraction for AppIndexing.</summary> +</histogram> + <histogram name="CopylessPaste.ExtractionUs" units="microseconds"> <owner>wychen@chromium.org</owner> <summary> The time spent on scanning the document in the main frame to extract the metadata. The metadata would be used to feed Icing for CopylessPaste feature - on Android. + on Android. This only counts pages with successful JSON extraction. </summary> </histogram> @@ -9247,6 +9560,14 @@ <owner>lizeb@chromium.org</owner> <summary> Time between the intent arrival to a Custom Tab and the first navigation + start, if the navigation is successful. Non-"Herb" mode. + </summary> +</histogram> + +<histogram name="CustomTabs.IntentToFirstCommitNavigationTime3" units="ms"> + <owner>lizeb@chromium.org</owner> + <summary> + Time between the intent arrival to a Custom Tab and the first navigation commit, if the navigation is successful. Similar in principle to Startup.FirstCommitNavigationTime. Non-"Herb" mode. </summary> @@ -10176,6 +10497,15 @@ </summary> </histogram> +<histogram name="DataUsage.PageLoadSequence" units="Count"> + <owner>rajendrant@chromium.org</owner> + <owner>bengr@chromium.org</owner> + <summary> + Records the sequence number of the page load within a data usage tracking + session. Logged for each navigation in the tracking session. + </summary> +</histogram> + <histogram name="DataUsage.Perf.MatchingRuleFirstFetchDuration" units="ms"> <owner>bengr@chromium.org</owner> <owner>rajendrant@chromium.org</owner> @@ -10305,6 +10635,26 @@ </summary> </histogram> +<histogram name="DataUsage.TrackingSessionEndReason" + enum="DataUsageTrackingSessionEndReason"> + <owner>rajendrant@chromium.org</owner> + <owner>bengr@chromium.org</owner> + <summary> + The reason for ending the data usage tracking session. Logged when the + tracking session ends. + </summary> +</histogram> + +<histogram name="DataUsage.TrackingSessionStartReason" + enum="DataUsageTrackingSessionStartReason"> + <owner>rajendrant@chromium.org</owner> + <owner>bengr@chromium.org</owner> + <summary> + The reason for starting the data usage tracking session. Logged when the + tracking session was started. + </summary> +</histogram> + <histogram name="DataUsage.UIAction" enum="DataUsageUIAction"> <owner>bengr@chromium.org</owner> <owner>megjablon@chromium.org</owner> @@ -10323,6 +10673,16 @@ </summary> </histogram> +<histogram name="DataUse.AllServices.Background" enum="DataUseServices"> + <owner>rajendrant@chromium.org</owner> + <owner>bengr@chromium.org</owner> + <summary> + The total background data use of Chrome's services broken down by service + name. It is logged only in Android when the URLRequest of a service + completes. + </summary> +</histogram> + <histogram name="DataUse.AppTabState" units="bytes"> <owner>rajendrant@chromium.org</owner> <owner>bengr@chromium.org</owner> @@ -10383,12 +10743,31 @@ </summary> </histogram> +<histogram name="DataUse.FavIcon.Downstream" units="bytes"> + <owner>rajendrant@chromium.org</owner> + <owner>bengr@chromium.org</owner> + <summary> + Records the downstream network data use of favicon requests. Logged when the + request is completed or redirected. Zero bytes are recorded when the request + is served from cache. + </summary> +</histogram> + +<histogram name="DataUse.FavIcon.Downstream.Non200Response" units="bytes"> + <owner>rajendrant@chromium.org</owner> + <owner>bengr@chromium.org</owner> + <summary> + Records the downstream network data use of favicon requests with non 200 + response code. Logged when the request is completed or redirected. + </summary> +</histogram> + <histogram name="DataUse.MessageSize" units="bytes"> <owner>amohammadkhan@chromium.org</owner> <owner>bengr@chromium.org</owner> <summary> - The request and reponse size of the messages exchanged by a service. It is - logged when the URLReqeust of a service is completed. The service name is + The request and response size of the messages exchanged by a service. It is + logged when the URLRequest of a service is completed. The service name is added as a suffix to this histogram name. </summary> </histogram> @@ -10397,7 +10776,7 @@ <owner>amohammadkhan@chromium.org</owner> <owner>bengr@chromium.org</owner> <summary> - The request and reponse size of the messages exchanged by all the services. + The request and response size of the messages exchanged by all the services. Whenever a URLRequest of a service is completed, the number of exchanged bytes is logged in this histogram. The buckets in this histogram are services, so it makes it possible to compare the use of different services @@ -10407,6 +10786,16 @@ </summary> </histogram> +<histogram name="DataUse.PageTransition.UserTraffic" + enum="DataUsePageTransition" units="bytes"> + <owner>rajendrant@chromium.org</owner> + <owner>bengr@chromium.org</owner> + <summary> + Data use of user traffic by different core page transition types. Recorded + when the URL request finishes. + </summary> +</histogram> + <histogram name="DataUse.Sync.Download.Bytes" enum="SyncModelTypes"> <owner>amohammadkhan@chromium.org</owner> <owner>bengr@chromium.org</owner> @@ -10663,6 +11052,29 @@ </summary> </histogram> +<histogram name="DelayNavigationThrottle.Delay.Actual" units="ms"> + <owner>bmcquade@chromium.org</owner> + <summary> + The actual delay added to main frame navigations by DelayNavigationThrottle. + </summary> +</histogram> + +<histogram name="DelayNavigationThrottle.Delay.Delta" units="ms"> + <owner>bmcquade@chromium.org</owner> + <summary> + The absolute delta between the specified and actual delays added to main + frame navigations by DelayNavigationThrottle. + </summary> +</histogram> + +<histogram name="DelayNavigationThrottle.Delay.Specified" units="ms"> + <owner>bmcquade@chromium.org</owner> + <summary> + The specified delay added to main frame navigations by + DelayNavigationThrottle. + </summary> +</histogram> + <histogram name="DesktopIOSPromotion.DismissalReason" enum="DesktopIOSPromotionDismissalReason"> <owner>mrefaat@chromium.org</owner> @@ -11299,6 +11711,13 @@ </summary> </histogram> +<histogram name="Dialog.Creation" enum="DialogName"> + <owner>pdyson@chromium.org</owner> + <summary> + Counts the number times various types of dialog boxes are created. + </summary> +</histogram> + <histogram name="DirectWrite.Fonts.BuildCache.File.Size" units="KB"> <owner>shrikant@chromium.org</owner> <summary> @@ -12444,24 +12863,50 @@ <summary>Number of certs loaded from domain bound cert database.</summary> </histogram> +<histogram name="DomainBoundCerts.DBLoadStatus" + enum="DomainBoundCerts.DBLoadStatus"> + <owner>nharper@chromium.org</owner> + <summary> + The status of loading the Channel ID database from disk. This histogram + records why the database failed to load, or that it loaded successfully. + </summary> +</histogram> + <histogram name="DomainBoundCerts.DBLoadTime" units="ms"> <owner>mattm@chromium.org</owner> <summary>Time spent loading domain bound cert database.</summary> </histogram> <histogram name="DomainBoundCerts.DBSizeInKB" units="KB"> + <obsolete> + Removed 4/2017. + </obsolete> <owner>mattm@chromium.org</owner> <summary> The size, on disk, of the domain bound cert database as it is being loaded. </summary> </histogram> +<histogram name="DomainBoundCerts.DBVersion"> + <owner>nharper@chromium.org</owner> + <summary> + The version number of the Channel ID database (before any migrations are + run). + </summary> +</histogram> + <histogram name="DomainBoundCerts.GenerateCertTime" units="ms"> + <obsolete> + Removed 4/2017. + </obsolete> <owner>mattm@chromium.org</owner> <summary>Time spent generating a domain bound cert.</summary> </histogram> <histogram name="DomainBoundCerts.GetCertTime" units="ms"> + <obsolete> + Removed 4/2017. + </obsolete> <owner>mattm@chromium.org</owner> <summary> Combined time for GetDomainBoundCert retrieval (both synchronous and @@ -12470,6 +12915,9 @@ </histogram> <histogram name="DomainBoundCerts.GetCertTimeAsync" units="ms"> + <obsolete> + Removed 4/2017. + </obsolete> <owner>mattm@chromium.org</owner> <summary> Time for asynchronous retrieval (from the GetDomainBoundCert call until @@ -12478,6 +12926,9 @@ </histogram> <histogram name="DomainBoundCerts.GetCertTimeSync" units="ms"> + <obsolete> + Removed 4/2017. + </obsolete> <owner>mattm@chromium.org</owner> <summary>Time for synchronous GetDomainBoundCert cert retrieval.</summary> </histogram> @@ -12506,6 +12957,9 @@ </histogram> <histogram name="DomainBoundCerts.TaskMaxWaitTime" units="ms"> + <obsolete> + Removed 4/2017. + </obsolete> <owner>mattm@chromium.org</owner> <summary> Longest time spent by requests waiting for load of domain bound cert @@ -12514,6 +12968,9 @@ </histogram> <histogram name="DomainBoundCerts.TaskWaitCount"> + <obsolete> + Removed 4/2017. + </obsolete> <owner>mattm@chromium.org</owner> <summary> Number of requests that waited for load of domain bound cert database. @@ -12936,6 +13393,20 @@ </summary> </histogram> +<histogram name="Doodle.ConfigDownloadOutcome" + enum="DoodleConfigDownloadOutcome"> + <owner>treib@chromium.org</owner> + <summary>Outcome of downloading the Doodle config.</summary> +</histogram> + +<histogram name="Doodle.ConfigDownloadTime" units="ms"> + <owner>treib@chromium.org</owner> + <summary> + The time it took to download the Doodle config. Recorded only if the + download succeeded and the received data was parsed without errors. + </summary> +</histogram> + <histogram name="Download.AcceptRangesBytes.KBytes" units="KB"> <owner>asanka@chromium.org</owner> <summary>The length of downloads for serves that accept byte ranges.</summary> @@ -13016,6 +13487,27 @@ </summary> </histogram> +<histogram name="Download.BandwidthWithoutParallelStreamsBytesPerSecond" + units="bytes/second"> + <owner>qinmin@chromium.org</owner> + <summary> + For parallel downloading, average disk bandwidth seen when only 1 stream is + actively downloading the content. Other streams may have already finished, + or have not been created yet. If a download was ever paused, this is not + recorded. + </summary> +</histogram> + +<histogram name="Download.BandwidthWithParallelStreamsBytesPerSecond" + units="bytes/second"> + <owner>qinmin@chromium.org</owner> + <summary> + For parallel downloading, average disk bandwidth seen when parallel streams + are downloading the content. If a download was ever paused, this is not + recorded. + </summary> +</histogram> + <histogram name="Download.ClearAllSize"> <obsolete> Deprecated 1/2017. @@ -13042,6 +13534,9 @@ </histogram> <histogram name="Download.ContentType" enum="DownloadContentType"> + <obsolete> + Deprecated 03/2017, and replaced by Download.Start.ContentType. + </obsolete> <owner>asanka@chromium.org</owner> <summary>Content types that are downloaded.</summary> </histogram> @@ -13223,6 +13718,29 @@ </summary> </histogram> +<histogram name="Download.EstimatedTimeSavedWithParallelDownload" units="ms"> + <owner>qinmin@chromium.org</owner> + <summary> + Estimated time saved on a download when parallel downloading is enabled. To + estimate this, the time spent on a download is classified into two + categories. The fist category has only one stream active, while other + streams are either finished, not started, or failed. And the second category + has multiple streams active. By calculating the average bandwidth during the + first category, a rough estimation on the time it will save is obtained by + assuming all the bytes downloaded during the second category are downloaded + by only one stream. If a download is ever paused, this is not recorded. + </summary> +</histogram> + +<histogram name="Download.EstimatedTimeWastedWithParallelDownload" units="ms"> + <owner>qinmin@chromium.org</owner> + <summary> + Similar to Download.EstimatedTimeSavedWithParallelDownload, but this + estimates the time wasted on a download when parallel downloading is + enabled. + </summary> +</histogram> + <histogram name="Download.FeedbackDialogEnabled" enum="BooleanEnabled"> <owner>asanka@chromium.org</owner> <summary> @@ -13471,6 +13989,44 @@ </summary> </histogram> +<histogram name="Download.ParallelDownload.CreationEvent" + enum="ParallelDownloadCreationEvent"> + <owner>xingliu@chromium.org</owner> + <summary> + When parallel downloading feature is enabled, a download may be created as + parallel download or fall back to normal download based on various factors. + Records the total number of parallel and non-parallel downloads created when + parallel downloading feature is enabled. Also records the reason why a + parallel download falls back to normal download. The reasons are not + mutually exclusive. + </summary> +</histogram> + +<histogram name="Download.ParallelDownload.RemainingTimeWhenBuildingRequests" + units="seconds"> + <owner>qinmin@chromium.org</owner> + <summary> + Records the remaining download time when building parallel requests. + </summary> +</histogram> + +<histogram name="Download.ParallelDownloadAddStreamSuccess" + enum="BooleanSuccess"> + <owner>xingliu@chromium.org</owner> + <summary> + Records if the byte stream reader of a subsequent request is successfully + added to the download sink. + </summary> +</histogram> + +<histogram name="Download.ParallelDownloadRequestCount" units="requests"> + <owner>xingliu@chromium.org</owner> + <summary> + The total number of requests sent for a parallel download, including the + initial request. + </summary> +</histogram> + <histogram name="Download.PotentialBandwidth" units="Bytes/second"> <obsolete> Deprecated January 2017. @@ -13564,6 +14120,19 @@ </summary> </histogram> +<histogram name="Download.Start.ContentType" enum="DownloadContentType"> + <owner>shaktisahu@chromium.org</owner> + <summary>Content types of the downloads.</summary> +</histogram> + +<histogram name="Download.Start.ContentType.NormalProfile" + enum="DownloadContentType"> + <owner>shaktisahu@chromium.org</owner> + <summary> + Content types of the downloads that are started in non-incognito profile. + </summary> +</histogram> + <histogram name="Download.TargetConnectionSecurity" enum="DownloadConnectionSecurity"> <owner>jialiul@chromium.org</owner> @@ -15079,6 +15648,16 @@ </summary> </histogram> +<histogram name="Event.FractionOfTimeWithoutUserInput" units="%"> + <owner>tdresser@chromium.org</owner> + <owner>progressive-web-metrics@chromium.org</owner> + <summary> + For each 10 second window, reports the fraction of the time there was no + user input. We consider there to be no user input if we haven't received any + events for > 50ms. + </summary> +</histogram> + <histogram name="Event.FrameEventRouting.NoGestureTarget"> <owner>wjmaclean@chromium.org</owner> <summary> @@ -17656,6 +18235,10 @@ <histogram name="Extensions.DisabledUIUserResponse" enum="ExtensionDisabledUIUserResponse"> + <obsolete> + Deprecated 03/2017 because miscounting IGNORE histogram entry. This error is + fixed with DisabledUIUserResponse2. + </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <summary> User response to the dialog shown when an extension is disabled due to an @@ -17663,8 +18246,23 @@ </summary> </histogram> +<histogram name="Extensions.DisabledUIUserResponse2" + enum="ExtensionDisabledUIUserResponse"> + <owner>catmullings@chromium.org</owner> + <summary> + User response to the dialog shown when an extension is disabled due to an + update requiring more permissions. A count is recorded when the user takes + an action on the dialog (re-enable or remove the extension) or ignores the + dialog. + </summary> +</histogram> + <histogram name="Extensions.DisabledUIUserResponseRemoteInstall" enum="ExtensionDisabledUIUserResponse"> + <obsolete> + Deprecated 03/2017 because miscounting IGNORE histogram entry. This error is + fixed with DisabledUIUserResponseRemoteInstall2. + </obsolete> <owner>mek@chromium.org</owner> <summary> User response to the dialog shown when an extension is disabled due to it @@ -17672,6 +18270,17 @@ </summary> </histogram> +<histogram name="Extensions.DisabledUIUserResponseRemoteInstall2" + enum="ExtensionDisabledUIUserResponse"> + <owner>catmullings@chromium.org</owner> + <summary> + User response to the dialog shown when an extension is disabled due to it + having been installed remotely. A count is recorded when the user takes an + action on the dialog (re-enable or remove the extension) or ignores the + dialog. + </summary> +</histogram> + <histogram name="Extensions.DisableReason" enum="ExtensionDisableReason"> <owner>asargent@chromium.org</owner> <summary> @@ -18389,6 +18998,16 @@ </summary> </histogram> +<histogram name="Extensions.InjectedScriptExecutionTime" units="ms"> + <owner>ksakamoto@chromium.org</owner> + <summary> + Time taken to execute all scripts for one location within an extension. + Recorded every time content scripts injected by extensions are executed. + Unlike Extensions.InjectScriptTime, this includes execution time of + asynchronously injected scripts. + </summary> +</histogram> + <histogram name="Extensions.InjectEnd_BlockingScriptCount"> <owner>rdevlin.cronin@chromium.org</owner> <summary> @@ -18404,7 +19023,8 @@ <histogram name="Extensions.InjectEnd_Time" units="ms"> <owner>rdevlin.cronin@chromium.org</owner> <summary> - Time taken to inject all scripts at document end by extensions. + Time taken to inject all scripts at document end by extensions. Not reported + if scripts are executed asynchronously. </summary> </histogram> @@ -18423,11 +19043,15 @@ <histogram name="Extensions.InjectIdle_Time" units="ms"> <owner>rdevlin.cronin@chromium.org</owner> <summary> - Time taken to inject all scripts at document idle by extensions. + Time taken to inject all scripts at document idle by extensions. Not + reported if scripts are executed asynchronously. </summary> </histogram> <histogram name="Extensions.InjectScriptTime" units="ms"> + <obsolete> + Deprecated 03/2017 in favor of Extensions.InjectedScriptExecutionTime. + </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <summary>Time taken to inject all scripts by extensions.</summary> </histogram> @@ -18452,7 +19076,8 @@ <histogram name="Extensions.InjectStart_Time" units="ms"> <owner>rdevlin.cronin@chromium.org</owner> <summary> - Time taken to inject css/scripts at document start by extensions. + Time taken to inject css/scripts at document start by extensions. Not + reported if scripts are executed asynchronously. </summary> </histogram> @@ -19502,6 +20127,18 @@ </summary> </histogram> +<histogram name="Extensions.ShouldAllowOpenURL.Failure.Scheme" + enum="ShouldAllowOpenURLFailureScheme"> + <owner>alexmos@chromium.org</owner> + <summary> + When the web-accessible resource check in + ChromeContentBrowserClientExtensionsPart::ShouldAllowOpenURL fails, this + records the scheme of the SiteInstance that initiated the blocked load. This + check is performed on navigations that utilize the OpenURL path as well as + on transfers. + </summary> +</histogram> + <histogram name="Extensions.StartupDelay" units="ms"> <owner>asargent@chromium.org</owner> <summary>The time one extension delays network requests at startup.</summary> @@ -19902,6 +20539,23 @@ </summary> </histogram> +<histogram name="Favicons.LargeIconService.DownloadedSize" units="pixels"> + <owner>jkrcal@chromium.org</owner> + <summary> + Records the size (concretely the width) in pixel of the favicon downloaded + from Google favicon server (size 0 denotes that download has failed). + </summary> +</histogram> + +<histogram name="Favicons.LargeIconService.FallbackSize" units="pixels"> + <owner>jkrcal@chromium.org</owner> + <summary> + Records the size (concretely the width) in pixel of the favicon that is used + to generate a fallback style in the case when large enough favicon is not + available (size 0 denotes that no favicon is available at all). + </summary> +</histogram> + <histogram name="FileBrowser.CloudImport.UserAction" enum="CloudImportUserAction"> <owner>smckay@google.com</owner> @@ -20872,6 +21526,42 @@ <summary>Http response codes in NetworkLocationRequest.</summary> </histogram> +<histogram base="true" name="Geolocation.SettingsDialog.AcceptEvent" + enum="GeolocationSettingsDialogBackOff"> + <owner>benwells@chromium.org</owner> + <summary> + Records the backoff level when the Location Settings Dialog is accepted by + the user. + </summary> +</histogram> + +<histogram base="true" name="Geolocation.SettingsDialog.DenyEvent" + enum="GeolocationSettingsDialogBackOff"> + <owner>benwells@chromium.org</owner> + <summary> + Records the backoff level when the Location Settings Dialog is rejected by + the user. + </summary> +</histogram> + +<histogram base="true" name="Geolocation.SettingsDialog.ShowEvent" + enum="GeolocationSettingsDialogBackOff"> + <owner>benwells@chromium.org</owner> + <summary> + Records the backoff level when the Location Settings Dialog is shown to the + user. + </summary> +</histogram> + +<histogram base="true" name="Geolocation.SettingsDialog.SuppressEvent" + enum="GeolocationSettingsDialogBackOff"> + <owner>benwells@chromium.org</owner> + <summary> + Records the backoff level when the Location Settings Dialog is suppressed + due to backoff. + </summary> +</histogram> + <histogram name="Geolocation.Timeout"> <owner>mvanouwerkerk@chromium.org</owner> <summary> @@ -20917,6 +21607,16 @@ </summary> </histogram> +<histogram name="GeolocationDisclosure.PostDisclosureDSESetting" + enum="BooleanAllowed"> + <owner>benwells@chromium.org</owner> + <summary> + Records the geolocation default search engine setting after the search + geolocation disclosure has been shown and won't be shown again. This metric + is only recorded once per client. + </summary> +</histogram> + <histogram name="GeolocationDisclosure.PostDisclosurePermission" enum="PermissionStatus"> <obsolete> @@ -20940,6 +21640,16 @@ </summary> </histogram> +<histogram name="GeolocationDisclosure.PreDisclosureDSESetting" + enum="BooleanAllowed"> + <owner>benwells@chromium.org</owner> + <summary> + Records the geolocation default search engine setting immediately before the + search geolocation disclosure has been shown. This metric is only recorded + once per client. + </summary> +</histogram> + <histogram name="GeolocationDisclosure.PreDisclosurePermission" enum="PermissionStatus"> <obsolete> @@ -21309,6 +22019,39 @@ </summary> </histogram> +<histogram name="GPU.DirectComposition.CompositionMode" + enum="DxgiFramePresentationMode"> + <owner>jbauman@chromium.org</owner> + <summary> + How the Desktop Window Manager presented Chrome's DirectComposition layers + to the screen. + </summary> +</histogram> + +<histogram name="GPU.DirectComposition.FramesSinceColorSpaceChange" + units="frames"> + <owner>jbauman@chromium.org</owner> + <summary> + How many frames since the last time the layer color format was changed. + </summary> +</histogram> + +<histogram name="GPU.DirectComposition.OverlaysSupported" + enum="BooleanOverlaySupported"> + <owner>jbauman@chromium.org</owner> + <summary>True if Chrome will try to use DirectComposition overlays.</summary> +</histogram> + +<histogram name="GPU.DirectComposition.OverlaysUsed" enum="BooleanOverlayUsage"> + <owner>jbauman@chromium.org</owner> + <summary>Whether or not a frame displays an overlay.</summary> +</histogram> + +<histogram name="GPU.DirectComposition.SwapchainFormat" enum="SwapchainFormat"> + <owner>jbauman@chromium.org</owner> + <summary>What type of swapchain was actually created for an overlay.</summary> +</histogram> + <histogram name="GPU.DoLinkProgramTime" units="ms"> <owner>jmadill@chromium.org</owner> <summary> @@ -21806,6 +22549,9 @@ </histogram> <histogram name="History.FaviconsRecoveredPercentage" units="%"> + <obsolete> + No longer tracked as of March 2017. + </obsolete> <owner>rpop@google.com</owner> <summary> Size of the recovered Favicons database relative to the original corrupt @@ -21817,6 +22563,9 @@ </histogram> <histogram name="History.FaviconsRecoveredRowsFaviconBitmaps"> + <obsolete> + No longer tracked as of March 2017. + </obsolete> <owner>rpop@google.com</owner> <summary> Rows recovered from [favicon_bitmaps] table in Favicons recovery. @@ -21824,11 +22573,17 @@ </histogram> <histogram name="History.FaviconsRecoveredRowsFavicons"> + <obsolete> + No longer tracked as of March 2017. + </obsolete> <owner>rpop@google.com</owner> <summary>Rows recovered from [favicons] table in Favicons recovery.</summary> </histogram> <histogram name="History.FaviconsRecoveredRowsIconMapping"> + <obsolete> + No longer tracked as of March 2017. + </obsolete> <owner>rpop@google.com</owner> <summary> Rows recovered from [icon_mapping] table in Favicons recovery. @@ -21836,6 +22591,9 @@ </histogram> <histogram name="History.FaviconsRecovery" enum="HistoryFaviconsRecoveryEnum"> + <obsolete> + No longer tracked as of March 2017. + </obsolete> <owner>rpop@google.com</owner> <summary> Track results of SQLite database recovery code in thumbnail_database.cc. @@ -22389,6 +23147,10 @@ <histogram name="HttpCache.ExternallyConditionalized" enum="ExternallyConditionalizedType"> + <obsolete> + stale-while-revalidate implementation removed for now, see + https://crbug.com/700568. + </obsolete> <owner>ricea@chromium.org</owner> <summary> Count of the number of external (ie. from Blink) conditionalized requests, @@ -24003,6 +24765,14 @@ </summary> </histogram> +<histogram name="IOS.ShareExtension.Source" + enum="IOSShareExtensionReceivedEntrySource"> + <owner>olivierrobin@chromium.org</owner> + <summary> + The source application that sent the external command to Chrome. + </summary> +</histogram> + <histogram name="IOS.Spotlight.Action" enum="IOSSpotlightAction"> <owner>olivierrobin@chromium.org</owner> <summary>The Spotlight Action pressed by the user.</summary> @@ -24486,6 +25256,15 @@ </summary> </histogram> +<histogram name="LibraryLoader.LoadNativeLibraryWindows" + enum="LoadLibraryResultCategory"> + <owner>chengx@chromium.org</owner> + <summary> + This metric records the LoadLibraryExW and LoadLibraryW Windows API call + results, which are used in native_library_win.cc. + </summary> +</histogram> + <histogram name="LibraryLoader.NativeLibraryHack" enum="BooleanUsage"> <obsolete> Deprecated as of 11/2014, removed from code. @@ -25052,6 +25831,9 @@ </histogram> <histogram name="Media.Android.NumMediaServerCrashes"> + <obsolete> + Deprecated as of 04/2017 + </obsolete> <owner>qinmin@chromium.org</owner> <summary> Android: Number of consecutive media server crashes monitored before it is @@ -25062,6 +25844,9 @@ <histogram name="Media.Android.ThrottleInfobarResponse" enum="ThrottleInfobarResponse"> + <obsolete> + Deprecated as of 04/2017 + </obsolete> <owner>qinmin@chromium.org</owner> <summary> Android: The distribution of responses to the media throttle infobar prompt. @@ -26154,6 +26939,15 @@ </summary> </histogram> +<histogram name="Media.EME.IsIncognito" enum="BooleanIncognito"> + <owner>xhwang@chromium.org</owner> + <summary> + Whether a given WebMediaPlayer instance, with a CDM attached, is played in + an incognito window or in ChromeOS guest mode. Players that never started + playback are excluded. Recorded once at time of player destruction. + </summary> +</histogram> + <histogram name="Media.EME.KeySystemSupport.Widevine" enum="MediaKeySystemSupportStatus"> <obsolete> @@ -26588,6 +27382,15 @@ </summary> </histogram> +<histogram name="Media.MediaElement.ContentTypeParseable" + enum="ContentTypeParseableResult"> + <owner>jrummell@chromium.org</owner> + <summary> + Whether the content type provided to HTMLMediaElement would parse with + ParsedContentType or not. + </summary> +</histogram> + <histogram name="Media.MicrophoneMuted" enum="MicrophoneMuteResult"> <owner>henrika@chromium.org</owner> <summary> @@ -27105,6 +27908,99 @@ </summary> </histogram> +<histogram name="Media.Session.UserAction" enum="MediaSessionUserAction"> + <owner>media-dev@chromium.org</owner> + <owner>zqzhang@chromium.org</owner> + <summary> + The number of times user interacts with MediaSession sorted by action type. + </summary> +</histogram> + +<histogram base="true" name="Media.Timeline.DragGestureDuration" units="ms"> +<!-- Name completed by histogram_suffixes name="MediaTimelineWidths" --> + + <owner>johnme@chromium.org</owner> + <owner>media-dev@chromium.org</owner> + <summary> + The duration of the user gesture (how long their finger is down), recorded + at the end of each drag gesture. This histogram is split according to the + width of the slider track in CSS px - see histogram name suffix. + </summary> +</histogram> + +<histogram base="true" name="Media.Timeline.DragPercent" + enum="MediaTimelinePercent"> +<!-- Name completed by histogram_suffixes name="MediaTimelineWidths" --> + + <owner>johnme@chromium.org</owner> + <owner>media-dev@chromium.org</owner> + <summary> + The net distance the media scrubber moved, recorded at the end of each drag + gesture, as a percentage of the width of the slider track. This histogram is + split according to the width of the slider track in CSS px - see histogram + name suffix. + </summary> +</histogram> + +<histogram base="true" name="Media.Timeline.DragSumAbsTimeDelta" + enum="MediaTimelineAbsTimeDelta"> +<!-- Name completed by histogram_suffixes name="MediaTimelineWidths" --> + + <owner>johnme@chromium.org</owner> + <owner>media-dev@chromium.org</owner> + <summary> + The sum of absolute distances the media scrubber incrementally moved, + recorded at the end of each drag gesture, each measured as the change in + media current time. If the scrubber was dragged back and forth before being + released, this will be larger than the value recorded for + Media.Timeline.DragTimeDelta (and may even be larger than the media + duration), otherwise it will be the same as DragTimeDelta. This histogram is + split according to the width of the slider track in CSS px - see histogram + name suffix. + </summary> +</histogram> + +<histogram base="true" name="Media.Timeline.DragTimeDelta" + enum="MediaTimelineTimeDelta"> +<!-- Name completed by histogram_suffixes name="MediaTimelineWidths" --> + + <owner>johnme@chromium.org</owner> + <owner>media-dev@chromium.org</owner> + <summary> + The net distance the media scrubber moved, recorded at the end of each drag + gesture, measured as the change in media current time. This histogram is + split according to the width of the slider track in CSS px - see histogram + name suffix. + </summary> +</histogram> + +<histogram base="true" name="Media.Timeline.SeekType" + enum="MediaTimelineSeekType"> +<!-- Name completed by histogram_suffixes name="MediaTimelineWidths" --> + + <owner>johnme@chromium.org</owner> + <owner>media-dev@chromium.org</owner> + <summary> + The type of user gesture, recorded at the end of each input sequence. For + example holding down the right arrow key with the scrubber focused will only + be logged as a single event. This histogram is split according to the width + of the slider track in CSS px - see histogram name suffix. + </summary> +</histogram> + +<histogram name="Media.Timeline.Width" units="CSS px"> +<!-- Name completed by histogram_suffixes name="MediaElementConfigurations" --> + + <owner>johnme@chromium.org</owner> + <owner>media-dev@chromium.org</owner> + <summary> + The width of the media timeline track in CSS pixels, recorded the first time + a media element with controls starts playing (strictly speaking, it's the + width in CSS pixels ignoring CSS transforms, multiplied by pageZoomFactor, + but deliberately ignoring pinch zoom's pageScaleFactor). + </summary> +</histogram> + <histogram name="Media.TimeToPipelineStarted" units="ms"> <obsolete> Removed from code 2014/6/18. @@ -27212,6 +28108,10 @@ <histogram name="Media.Video.Autoplay.Muted.Attribute.OffscreenDuration" units="ms"> + <obsolete> + Deprecated as autoplay muted video by attributed is paused when going + offscreen since https://crbug.com/683141. + </obsolete> <owner>avayvod@chromium.org</owner> <owner>mlamouri@chromium.org</owner> <owner>zqzhang@chromium.org</owner> @@ -27514,6 +28414,47 @@ <summary>Pixel format used in HTML5 video. Emitted on video load.</summary> </histogram> +<histogram name="Media.VideoPersistence.AttemptResult" + enum="VideoPersistenceAttemptResult"> + <owner>mlamouri@chromium.org</owner> + <owner>peconn@chromium.org</owner> + <owner>zqzhang@chromium.org</owner> + <summary> + Every time a video persistence session could be triggered, it records the + result of the attempt. + </summary> +</histogram> + +<histogram name="Media.VideoPersistence.ControlsType" + enum="VideoPersistenceControlsType"> + <owner>mlamouri@chromium.org</owner> + <owner>zqzhang@chromium.org</owner> + <summary> + Record the type of controls a persisted video is using. This is recorded + every time a video enters persistence mode + </summary> +</histogram> + +<histogram name="Media.VideoPersistence.Duration" units="ms"> + <owner>mlamouri@chromium.org</owner> + <owner>peconn@chromium.org</owner> + <owner>zqzhang@chromium.org</owner> + <summary> + Records the length during which a video was in a persistent state. It is + recorded once per video persistence session. + </summary> +</histogram> + +<histogram name="Media.VideoPersistence.EndReason" + enum="VideoPersistenceEndReason"> + <owner>mlamouri@chromium.org</owner> + <owner>peconn@chromium.org</owner> + <owner>zqzhang@chromium.org</owner> + <summary> + Records the reason why a video persistence session has ended. + </summary> +</histogram> + <histogram name="Media.VideoPixelFormat" enum="VideoPixelFormat"> <obsolete> Replaced by Media.VideoFormat 05/2015. @@ -28102,6 +29043,15 @@ </summary> </histogram> +<histogram name="Memory.Experimental.Browser.PurgedMemory" units="MB"> + <owner>bashi@chromium.org</owner> + <summary> + Amount of reclaimed memory (in terms of the private working set size) after + a purge request on the browser process. Recorded 2 seconds after the purge + request. + </summary> +</histogram> + <histogram base="true" name="Memory.Experimental.Renderer" units="MB"> <!-- Name completed by histogram_suffixes name="RendererMemoryAllocator" --> @@ -28109,6 +29059,32 @@ <summary>The renderer process's memory usage after a page load.</summary> </histogram> +<histogram name="Memory.Experimental.Renderer.LoadsInMainFrameDuringUptime" + units="loads"> + <owner>keishi@chromium.org</owner> + <summary> + The number of loads in a main frame during the lifetime of a render process + (excludes extensions). Emitted when the processes quits. + </summary> +</histogram> + +<histogram name="Memory.Experimental.Renderer.PurgedMemory" units="MB"> + <owner>bashi@chromium.org</owner> + <summary> + Amount of reclaimed memory (in terms of + Memory.Experimental.Renderer.TotalAllocated) after a purge request on a + renderer process. Recorded 2 seconds after the purge request. + </summary> +</histogram> + +<histogram name="Memory.Experimental.Renderer.Uptime" units="ms"> + <owner>keishi@chromium.org</owner> + <summary> + The uptime of a render process in time ticks (excludes extensions). Emitted + when the processes quits. + </summary> +</histogram> + <histogram name="Memory.Extension" units="KB"> <owner>hajimehoshi@chromium.org</owner> <owner>kenjibaheux@google.com</owner> @@ -28273,6 +29249,28 @@ </summary> </histogram> +<histogram base="true" name="Memory.OpenFDs" units="files"> +<!-- Name completed by histogram_suffixes name="MemoryFDsBroswerGpuAndRendererProcess" and name="MemoryFDsAllProcesses" --> + + <owner>dcastagna@chromium.org</owner> + <owner>primiano@chromium.org</owner> + <summary> + The total number of open file descriptors opened per process. Recorded once + per UMA ping. + </summary> +</histogram> + +<histogram base="true" name="Memory.OpenFDsSoftLimit" units="files"> +<!-- Name completed by histogram_suffixes name="MemoryFDsBroswerGpuAndRendererProcess" --> + + <owner>dcastagna@chromium.org</owner> + <owner>primiano@chromium.org</owner> + <summary> + The limit of open file descriptors that can be opened per process. Recorded + once per UMA ping. + </summary> +</histogram> + <histogram name="Memory.OtherProcessCount" units="processes"> <owner>hajimehoshi@chromium.org</owner> <owner>kenjibaheux@google.com</owner> @@ -29147,6 +30145,19 @@ </summary> </histogram> +<histogram name="MobileDownload.Notification.FixingSummaryLeak" + enum="BooleanForegroundNotification"> + <owner>dtrainor@chromium.org</owner> + <summary> + Android: Records the situation where we try to fix a standalone downloads + summary notification, which shouldn't be visible to the user. True if the + notification was a foreground notification, in which case we can't dismiss + it and need to attempt a more drastic workaround. False if it was a normal + notification and we can dismiss it easily (this is okay and expected + behavior in some scenarios). + </summary> +</histogram> + <histogram name="MobileFre.Progress" enum="MobileFreProgress"> <owner>gogerald@chromium.org</owner> <summary> @@ -29233,6 +30244,21 @@ </summary> </histogram> +<histogram name="MobileOmnibox.PressedClipboardSuggestionAge" units="ms"> + <owner>jif@chromium.org</owner> + <owner>mpearson@chromium.org</owner> + <summary> + When a user presses an omnibox suggestion based on the content of the + clipboard, this histograms records how long ago Chrome detected a change in + the clipboard. + + Intended to be compared to Omnibox.ClipboardSuggestionShownAge. + + If Chrome never detected a change to the clipboard, no clipboard suggestion + is shown, meaning this histogram will never be emitted to. + </summary> +</histogram> + <histogram name="MobileStartup.MainIntentAction" enum="MobileStartingAction"> <owner>mariakhomenko@chromium.org</owner> <summary> @@ -29620,6 +30646,14 @@ </summary> </histogram> +<histogram name="MPArch.RWH_HangMonitorUnresponsive" units="ms"> + <owner>amaralp@chromium.org</owner> + <summary> + The length of time the renderer is unresponsive according to the hang + monitor. Recorded when the renderer regains responsiveness. + </summary> +</histogram> + <histogram name="MPArch.RWH_InputEventDelta" units="ms"> <obsolete> renamed MPArch.IIR_InputEventDelta. @@ -30298,6 +31332,9 @@ </histogram> <histogram name="Navigation.FrameHasEmbeddedCredentials" enum="Boolean"> + <obsolete> + Deprecated 03/2017 in Issue 703460. + </obsolete> <owner>palmer@chromium.org</owner> <owner>cbentzel@chromium.org</owner> <summary> @@ -30305,6 +31342,15 @@ </summary> </histogram> +<histogram name="Navigation.IOSWKWebViewSlowFastBackForward" + enum="BackForwardNavigationType"> + <owner>eugenebut@chromium.org</owner> + <summary> + Counts slow/fast back/forward WKWebView navigations on iOS. Fast navigation + is a back/forward navigation done with WKBackForwardList. + </summary> +</histogram> + <histogram name="Navigation.IsMobileOptimized" enum="BooleanIsMobileOptimized"> <owner>cjhopman@chromium.org</owner> <owner>nyquist@chromium.org</owner> @@ -30315,6 +31361,9 @@ </histogram> <histogram name="Navigation.MainFrameHasEmbeddedCredentials" enum="Boolean"> + <obsolete> + Deprecated 03/2017 in Issue 703460. + </obsolete> <owner>palmer@chromium.org</owner> <owner>cbentzel@chromium.org</owner> <summary> @@ -33350,6 +34399,9 @@ </histogram> <histogram name="Net.Http2ResponseStatusHeader" enum="StatusHeader"> + <obsolete> + Removed in 2017 March. + </obsolete> <owner>bnc@chromium.org</owner> <summary>Format of :status header value in HTTP/2 response.</summary> </histogram> @@ -33606,6 +34658,11 @@ </summary> </histogram> +<histogram name="Net.HttpProxy.ConnectLatency" units="ms"> + <owner>tbansal@chromium.org</owner> + <summary>Time taken to establish the connection to the HTTP proxy.</summary> +</histogram> + <histogram name="Net.HttpProxySocketRequestTime" units="ms"> <obsolete> Deprecated as of 10/2016. @@ -33731,6 +34788,30 @@ </summary> </histogram> +<histogram name="Net.HttpStreamFactoryJob.Alt.NextState" + enum="HttpStreamFactoryJobState"> + <owner>xunjieli@chromium.org</owner> + <summary>Reports the next state that the Alternative Job is in.</summary> +</histogram> + +<histogram name="Net.HttpStreamFactoryJob.Alt.State" + enum="HttpStreamFactoryJobState"> + <owner>xunjieli@chromium.org</owner> + <summary>Reports the state that the Alternative Job is in.</summary> +</histogram> + +<histogram name="Net.HttpStreamFactoryJob.Main.NextState" + enum="HttpStreamFactoryJobState"> + <owner>xunjieli@chromium.org</owner> + <summary>Reports the next state that the Main Job is in.</summary> +</histogram> + +<histogram name="Net.HttpStreamFactoryJob.Main.State" + enum="HttpStreamFactoryJobState"> + <owner>xunjieli@chromium.org</owner> + <summary>Reports the state that the Main Job is in.</summary> +</histogram> + <histogram name="Net.HttpStreamFactoryJob.StreamReadyCallbackTime" units="ms"> <owner>zhongyi@chromium.org</owner> <summary>Time it takes for OnStreamReadyCallback to be called.</summary> @@ -33849,6 +34930,53 @@ </summary> </histogram> +<histogram name="Net.JobControllerSet.CountOfJobController" + units="job_controllers"> + <owner>zhongyi@chromium.org</owner> + <summary> + This counts number of all the job controllers that are still alive if the + count is a multiple of 100: 100, 200, 300, etc. + </summary> +</histogram> + +<histogram name="Net.JobControllerSet.CountOfJobControllerAtShutDown" + units="job_controllers"> + <owner>zhongyi@chromium.org</owner> + <summary> + This counts number of all the job controllers that are still alive. + </summary> +</histogram> + +<histogram name="Net.JobControllerSet.CountOfNonPreconnectAltJob" + units="alt_jobs"> + <owner>zhongyi@chromium.org</owner> + <summary> + This counts number of alternative jobs which are still alive. + </summary> +</histogram> + +<histogram name="Net.JobControllerSet.CountOfNonPreconnectMainJob" + units="main_jobs"> + <owner>zhongyi@chromium.org</owner> + <summary>This counts number of main jobs which are still alive.</summary> +</histogram> + +<histogram name="Net.JobControllerSet.CountOfPendingRequest" units="requests"> + <owner>zhongyi@chromium.org</owner> + <summary> + This counts number of HttpStreamFactoryImpl::Request which are still alive. + </summary> +</histogram> + +<histogram name="Net.JobControllerSet.CountOfPreconnect" + units="job_controllers"> + <owner>zhongyi@chromium.org</owner> + <summary> + This counts number of job controllers which are used for preconnect and are + still alive. + </summary> +</histogram> + <histogram name="Net.LoadPrefetch.Pattern" enum="PrefetchStatus"> <owner>droger@chromium.org</owner> <owner>mattcary@chromium.org</owner> @@ -35643,7 +36771,7 @@ <histogram name="Net.QuicSession.ReadError" enum="NetErrorCodes"> <owner>rch@chromium.org</owner> <summary> - The network error code returned when attempting to read to a QUIC + The network error code returned when attempting to read from a QUIC connection. </summary> </histogram> @@ -35881,6 +37009,15 @@ </summary> </histogram> +<histogram name="Net.QuicSession.WriteError.HandshakeConfirmed" + enum="NetErrorCodes"> + <owner>rch@chromium.org</owner> + <summary> + The network error code returned when attempting to write to a QUIC + connection after the handshake has been confirmed. + </summary> +</histogram> + <histogram name="Net.QuicStreamFactory.BadPacketLossEvents5" enum="QuicBadPacketLossEvents"> <owner>rtenneti@chromium.org</owner> @@ -36048,6 +37185,9 @@ <histogram name="Net.ResourceLoader.InliningStatus" enum="ResourceLoaderInliningStatus"> + <obsolete> + This experiment was turned down, see https://crbug.com/703188. + </obsolete> <owner>tzik@chromium.org</owner> <summary> Counts whether the chunk inlining is applicable or not to a resource @@ -36814,6 +37954,22 @@ </summary> </histogram> +<histogram name="Net.SSL_Connection_Error_Google" enum="NetErrorCodes"> + <owner>svaldez@chromium.org</owner> + <summary> + Counts of specific error codes returned when opening an SSL connection for + google.com and any subdomain of it. + </summary> +</histogram> + +<histogram name="Net.SSL_Connection_Error_TLS13Experiment" enum="NetErrorCodes"> + <owner>svaldez@chromium.org</owner> + <summary> + Counts of specific error codes returned when opening an SSL connection for + an endpoint we are using in the initial TLS 1.3 deployment. + </summary> +</histogram> + <histogram name="Net.SSL_Connection_Latency" units="ms"> <obsolete> Replaced by Net.SSL_Connection_Latency_2 on 2014-10-21. @@ -36929,6 +38085,14 @@ </summary> </histogram> +<histogram name="Net.SSL_Connection_Latency_TLS13Experiment" units="ms"> + <owner>svaldez@chromium.org</owner> + <summary> + Time from when the Connect() starts until it completes for a set of domains + that we are using in the initial TLS 1.3 deployment. + </summary> +</histogram> + <histogram name="Net.SSL_Connection_PostQuantum_Negotiated" enum="BooleanSupported"> <obsolete> @@ -37234,6 +38398,22 @@ </summary> </histogram> +<histogram name="Net.SSLVersionInterferenceError" enum="NetErrorCodes"> + <owner>davidben@chromium.org</owner> + <summary> + For each detected SSL version interference, what network error the original + failed connection reported. + </summary> +</histogram> + +<histogram name="Net.SSLVersionInterferenceProbeTrigger" enum="NetErrorCodes"> + <owner>davidben@chromium.org</owner> + <summary> + For each SSL version interference probe, what network error triggered it. + Probes are only triggered for a small set of network errors. + </summary> +</histogram> + <histogram name="Net.TCP_Connection_Idle_Sockets"> <obsolete> Deprecated 04/2016 as doesn't have data nor owner. @@ -37621,6 +38801,35 @@ <summary>True if a URLRequest's referrer is empty or valid when set.</summary> </histogram> +<histogram name="Net.ValidDNSName" enum="Boolean"> + <owner>palmer@chromium.org</owner> + <summary> + True if a DNS name contains only characters for which + |net::IsValidLabelCharacter| returns true. Used to see if we can deprecate + and remove support for arbitrary bytes in DNS names. This histogram is + recorded when converting dotted DNS names into DNS query form, in + preparation for issuing a DNS request. + </summary> +</histogram> + +<histogram name="Net.WebSocket.DataUse.Downstream" units="bytes"> + <owner>rajendrant@chromium.org</owner> + <owner>bengr@chromium.org</owner> + <summary> + Records the downstream data use of WebSockets. Logged on every read + operation in the WebSocket. + </summary> +</histogram> + +<histogram name="Net.WebSocket.DataUse.Upstream" units="bytes"> + <owner>rajendrant@chromium.org</owner> + <owner>bengr@chromium.org</owner> + <summary> + Records the upstream data use of WebSockets. Logged on every write operation + in the WebSocket. + </summary> +</histogram> + <histogram name="Net.WebSocket.DeflateMode" enum="WebSocketNewPerMessageDeflateContextTakeoverMode"> <owner>yhirano@chromium.org</owner> @@ -40315,6 +41524,24 @@ </summary> </histogram> +<histogram name="NewTabPage.ContentSuggestions.ArticleFaviconFetchResult" + enum="FaviconFetchResult"> + <owner>jkrcal@chromium.org</owner> + <summary> + Android: Result of fetching a favicon for an article suggestion on the New + Tab Page. + </summary> +</histogram> + +<histogram name="NewTabPage.ContentSuggestions.ArticleFaviconFetchTime" + units="ms"> + <owner>jkrcal@chromium.org</owner> + <summary> + Android: Time it takes to fetch a favicon for an article suggestion on the + New Tab Page. + </summary> +</histogram> + <histogram name="NewTabPage.ContentSuggestions.BackgroundFetchTrigger" enum="BackgroundFetchTrigger"> <owner>jkrcal@chromium.org</owner> @@ -40545,6 +41772,17 @@ </summary> </histogram> +<histogram name="NewTabPage.ContentSuggestions.Preferences.RemoteSuggestions" + enum="BooleanEnabled"> + <owner>dgn@chromium.org</owner> + <owner>finkm@chromium.org</owner> + <summary> + Whether content suggestions from the remote service are enabled. It is + recored at startup. Note: This histogram is not specific to the New Tab + Page. + </summary> +</histogram> + <histogram name="NewTabPage.ContentSuggestions.Shown" units="index"> <owner>treib@chromium.org</owner> <summary> @@ -40616,6 +41854,38 @@ </summary> </histogram> +<histogram base="true" + name="NewTabPage.ContentSuggestions.TimeUntilFirstSoftTrigger" units="ms"> + <owner>jkrcal@chromium.org</owner> + <summary> + Android: The time since the last fetch, recorded upon the first soft fetch + trigger. The first soft trigger does not necessarily cause a fetch (if it + comes before the end of the respective scheduling interval). This metric is + recorded at most once (per lifetime of a Chrome instance) after each fetch. + This is used to understand how changing scheduling intervals will impact + traffic of background fetches. + </summary> +</histogram> + +<histogram base="true" + name="NewTabPage.ContentSuggestions.TimeUntilPersistentFetch" units="ms"> + <owner>jkrcal@chromium.org</owner> + <summary> + Android: The time since the last fetch, recorded upon a persistent fetch. + This is used to understand what are the real persistent fetching intervals + in the wild. + </summary> +</histogram> + +<histogram base="true" name="NewTabPage.ContentSuggestions.TimeUntilSoftFetch" + units="ms"> + <owner>jkrcal@chromium.org</owner> + <summary> + Android: The time since the last fetch, recorded upon a soft fetch. This is + used to understand what are the real soft fetching intervals in the wild. + </summary> +</histogram> + <histogram name="NewTabPage.ContentSuggestions.UIUpdateResult" enum="ContentSuggestionsUIUpdateResult"> <obsolete> @@ -40698,6 +41968,10 @@ </histogram> <histogram name="NewTabPage.IconsColor"> + <obsolete> + Deprecated 2017-04, replaced by NewTabPage.TileType and + NewTabPage.SuggestionsImpression.IconsColor. + </obsolete> <owner>newt@chromium.org</owner> <summary> The number of most visited tiles on the new tab page that are displayed @@ -40707,6 +41981,10 @@ </histogram> <histogram name="NewTabPage.IconsGray"> + <obsolete> + Deprecated 2017-04, replaced by NewTabPage.TileType and + NewTabPage.SuggestionsImpression.IconsGray. + </obsolete> <owner>newt@chromium.org</owner> <summary> The number of most visited tiles on the new tab page that are displayed as @@ -40715,6 +41993,10 @@ </histogram> <histogram name="NewTabPage.IconsReal"> + <obsolete> + Deprecated 2017-04, replaced by NewTabPage.TileType and + NewTabPage.SuggestionsImpression.IconsReal. + </obsolete> <owner>newt@chromium.org</owner> <summary> The number of most visited tiles on the new tab page that are displayed with @@ -40789,7 +42071,7 @@ <owner>ianwen@chromium.org</owner> <summary> Histogram tracking how many users click on the static logo or animated logo - on NTP. + on NTP. Android and iOS only. </summary> </histogram> @@ -40799,22 +42081,41 @@ <summary> Outcome of downloading search provider's logos. It measures whether download/parsing is successful, revalidation and parsing work properly, etc. - Android only. + Android and iOS only. </summary> </histogram> <histogram name="NewTabPage.LogoDownloadTime" units="ms"> <owner>ianwen@chromium.org</owner> <summary> - The amount of time it takes to download the static logo. Android only. + The amount of time it took to download the static logo. This includes + requests where there was no logo, or where an existing logo was revalidated + (so no new image data was downloaded), but it does not include failed + requests. Android and iOS only. + </summary> +</histogram> + +<histogram name="NewTabPage.LogoImageDownloaded" enum="BooleanFromHTTPCache"> + <owner>treib@chromium.org</owner> + <summary> + A logo image (static or CTA) was downloaded. Recorded only when the image + was downloaded and decoded without errors. </summary> </histogram> <histogram name="NewTabPage.LogoShown" enum="NewTabPageLogoShown"> <owner>ianwen@chromium.org</owner> <summary> - Histogram tracking how many static logos and animated logos are shown to - users. + The number of static logos and animated logos shown to users. Android and + iOS only. + </summary> +</histogram> + +<histogram name="NewTabPage.LogoShownTime" units="ms"> + <owner>treib@chromium.org</owner> + <summary> + The amount of time between opening an NTP and the logo appearing. Only + recorded when there is a logo, and only recorded once per NTP. Android only. </summary> </histogram> @@ -41667,20 +42968,20 @@ </summary> </histogram> -<histogram name="NewTabPage.TileType" enum="MostVisitedTileType"> - <owner>newt@chromium.org</owner> +<histogram name="NewTabPage.TileType" enum="NTPTileVisualType"> + <owner>mastiz@chromium.org</owner> <summary> The visual type of each most visited tile displayed on the new tab page, e.g. actual thumbnail or placeholder thumbnail. This is recorded for each - most visited item when the NTP is opened. Only measured on Android. + most visited item when the NTP is opened. </summary> </histogram> -<histogram name="NewTabPage.TileTypeClicked" enum="MostVisitedTileType"> - <owner>newt@chromium.org</owner> +<histogram name="NewTabPage.TileTypeClicked" enum="NTPTileVisualType"> + <owner>mastiz@chromium.org</owner> <summary> The visual type of the most visited item that the user clicked on, e.g. - actual thumbnail or placeholder thumbnail. Only measured on Android. + actual thumbnail or placeholder thumbnail. </summary> </histogram> @@ -42051,6 +43352,16 @@ </summary> </histogram> +<histogram name="Notifications.XPCConnectionEvent" enum="XPCConnectionEvent"> + <owner>miguelg@chromium.org</owner> + <owner>rsesek@chromium.org</owner> + <summary> + Mac only. Records the different events of a Notification XPC connection. + These are recorded by monitoring the different error callbacks provided by + the XPC connection object. + </summary> +</histogram> + <histogram name="NQE.Accuracy.DownstreamThroughputKbps.EstimatedObservedDiff" units="kbps"> <owner>tbansal@chromium.org</owner> @@ -42699,6 +44010,12 @@ <summary>Result of servicing requests that may contain offline page.</summary> </histogram> +<histogram name="OfflinePages.Background.BackgroundLoadingFailedCode" + enum="NetErrorCodes"> + <owner>chili@chromium.org</owner> + <summary>The error codes that caused a page load failure.</summary> +</histogram> + <histogram name="OfflinePages.Background.CctApiDisableStatus" enum="OfflinePagesCctApiPrerenderAllowedStatus"> <owner>petewil@chromium.org</owner> @@ -42758,6 +44075,14 @@ </summary> </histogram> +<histogram name="OfflinePages.Background.FinalSavePageResult" + enum="OfflinePagesBackgroundSavePageResult"> + <owner>chili@chromium.org</owner> + <summary> + Status code of background offlining requests at the final step. + </summary> +</histogram> + <histogram name="OfflinePages.Background.ImmediateStart.AvailableRequestCount"> <owner>dougarnett@chromium.org</owner> <summary> @@ -43419,6 +44744,18 @@ </summary> </histogram> +<histogram name="OfflinePages.TabRestore" enum="OfflinePagesTabRestoreType"> + <owner>carlosk@chromium.org</owner> + <summary> + Tracks the reload of contents of an existing tab that is being restored + either because that tab is being presented for the first time after Chrome + was restarted or because its contents were discarded. All buckets are + mutually exclusive (adding up all reported values amounts to the total + number of tracked tab restores). This metric is focused on last_n offline + pages and is exclusive to Chrome on Android. + </summary> +</histogram> + <histogram name="OfflinePages.TotalPageSize" units="MB"> <owner>fgorski@chromium.org</owner> <owner>jianli@chromium.org</owner> @@ -43540,7 +44877,11 @@ <summary> The number of times each omnibox suggestion answer type (e.g., weather, sports score) was received and parsed successfully. Can be normalized with - Omnibox.AnswerParseSuccess. + the count of emits to Omnibox.SuggestRequest.Success.GoogleResponseTime, + which counts all successful suggest responses from Google, not just those + with answers attached. Note that GoogleResponseTime is technically off given + that it will still count cases where we fail to extract, deserialize, or + parse the response. But these cases are rare to non-existent. </summary> </histogram> @@ -43564,6 +44905,46 @@ </summary> </histogram> +<histogram name="Omnibox.ClipboardSuggestionShownAge" units="ms"> + <owner>mpearson@chromium.org</owner> + <summary> + Recorded every time the omnibox is focussed and a recent URL from the user's + clipboard is suggested. The value indicates the estimated age of the + clipboard. (If Chrome observed the clipboard modification, this age is + exact. If Chrome did not observe the modification, then it's a conservative + estimate: the last time Chrome observed a clipboard modification, which is + certainly older than the current clipboard. If Chrome never observed a + clipboard modification, no clipboard suggestion is shown, meaning this + histogram will never be emitted to.) + + Intended to be compared with MobileOmnibox.PressedClipboardSuggestionAge. + </summary> +</histogram> + +<histogram name="Omnibox.ClipboardSuggestionShownWithCurrentURL" + enum="BooleanPresent"> + <owner>mpearson@chromium.org</owner> + <summary> + Recorded every time the omnibox is focussed and a recent URL from the user's + clipboard is suggested. The value indicates whether the current URL was + shown (which would appear above the clipboard URL suggestion) or was absent + (which ought to only happen when the omnibox is empty / the user is on the + NTP). + + On Android, the total count for this histogram can be usefully compared with + the count of the user action FocusLocation in order to determine the rate at + which a clipboard URL suggestion is shown in the omnibox. To determine the + same rate on iOS, one needs to compare this histogram's count with the sum + of the user actions MobileFocusedOmniboxOnNtp, MobileFocusedFakeboxOnNtp, + and MobileFocusedOmniboxNotOnNtp. + + Furthermore, on either platform, this histogram's count can be usefully + compared with the count in the clipboard bucket of the + Omnibox.SuggestionUsed.Provider histogram to determine the clickthrough rate + on these suggestions. + </summary> +</histogram> + <histogram name="Omnibox.CutOrCopyAllText" units="count"> <owner>mpearson@chromium.org</owner> <summary> @@ -43995,6 +45376,65 @@ </summary> </histogram> +<histogram + name="Omnibox.SuggestionUsed.Search.Experimental.ForegroundToFirstMeaningfulPaint.Prerender" + units="ms"> + <owner>lpy@chromium.org</owner> + <owner>mpearson@chromium.org</owner> + <summary> + Measures the time from the page first appearing in the foreground to its + first meaningful paint. Only recorded on navigations that use a prerender + that is to a search query suggestion selected from the omnibox. + </summary> +</histogram> + +<histogram + name="Omnibox.SuggestionUsed.Search.Experimental.NavigationToFirstMeaningfulPaint" + units="ms"> + <owner>lpy@chromium.org</owner> + <owner>mpearson@chromium.org</owner> + <summary> + Measures the time from navigation start to first meaningful paint. Only + recorded for a search query suggestion selected from the omnibox. + </summary> +</histogram> + +<histogram + name="Omnibox.SuggestionUsed.Search.ForegroundToFirstContentfulPaint.Prerender" + units="ms"> + <owner>lpy@chromium.org</owner> + <owner>mpearson@chromium.org</owner> + <summary> + Measures the time from the page first appearing in the foreground to its + first contentful paint. Only recorded on navigations that use a prerender + that is to a search query suggestion selected from the omnibox. + </summary> +</histogram> + +<histogram + name="Omnibox.SuggestionUsed.Search.NavigationToFirstContentfulPaint" + units="ms"> + <owner>lpy@chromium.org</owner> + <owner>mpearson@chromium.org</owner> + <summary> + Measures the time from navigation start to first contentful paint. Only + recorded for a search query suggestion selected from the omnibox. + </summary> +</histogram> + +<histogram + name="Omnibox.SuggestionUsed.Search.NavigationToFirstForeground.Prerender" + units="ms"> + <owner>lpy@chromium.org</owner> + <owner>mpearson@chromium.org</owner> + <summary> + Measures the time from a page being navigated to in prerender to it first + showing up in foreground. Only recorded on navigations that used a prerender + that was to a search query suggestion selected from the omnibox. This is + only recorded on pages that experience a first contentful paint. + </summary> +</histogram> + <histogram name="Omnibox.SuggestionUsed.SearchVsUrl" enum="OmniboxSummarizedResultType"> <owner>mpearson@google.com</owner> @@ -44004,6 +45444,64 @@ </summary> </histogram> +<histogram + name="Omnibox.SuggestionUsed.URL.Experimental.ForegroundToFirstMeaningfulPaint.Prerender" + units="ms"> + <owner>lpy@chromium.org</owner> + <owner>mpearson@chromium.org</owner> + <summary> + Measures the time from the page first appearing in the foreground to its + first meaningful paint. Only recorded on navigations that use a prerender + that is to a URL suggestion selected from the omnibox. + </summary> +</histogram> + +<histogram + name="Omnibox.SuggestionUsed.URL.Experimental.NavigationToFirstMeaningfulPaint" + units="ms"> + <owner>lpy@chromium.org</owner> + <owner>mpearson@chromium.org</owner> + <summary> + Measures the time from navigation start to first meaningful paint. Only + recorded for a URL suggestion selected from the omnibox. + </summary> +</histogram> + +<histogram + name="Omnibox.SuggestionUsed.URL.ForegroundToFirstContentfulPaint.Prerender" + units="ms"> + <owner>lpy@chromium.org</owner> + <owner>mpearson@chromium.org</owner> + <summary> + Measures the time from the page first appearing in the foreground to its + first contentful paint. Only recorded on navigations that use a prerender + that is to a URL suggestion selected from the omnibox. + </summary> +</histogram> + +<histogram name="Omnibox.SuggestionUsed.URL.NavigationToFirstContentfulPaint" + units="ms"> + <owner>lpy@chromium.org</owner> + <owner>mpearson@chromium.org</owner> + <summary> + Measures the time from navigation start to first contentful paint. Only + recorded for a URL suggestion selected from the omnibox. + </summary> +</histogram> + +<histogram + name="Omnibox.SuggestionUsed.URL.NavigationToFirstForeground.Prerender" + units="ms"> + <owner>lpy@chromium.org</owner> + <owner>mpearson@chromium.org</owner> + <summary> + Measures the time from a page being navigated to in prerender to it first + showing up in foreground. Only recorded on navigations that used a prerender + that was to a URL suggestion selected from the omnibox. This is only + recorded on pages that experience a first contentful paint. + </summary> +</histogram> + <histogram name="Omnibox.SuggestRequest.Failure.GoogleResponseTime" units="ms"> <owner>mpearson@chromium.org</owner> <summary> @@ -44920,6 +46418,33 @@ </summary> </histogram> +<histogram name="PageLoad.Clients.DelayNavigation.Delay.Actual" units="ms"> + <owner>bmcquade@chromium.org</owner> + <summary> + The actual delay added to page loads by DelayNavigationThrottle, for page + loads that started in the foreground and reached first paint in the + foreground. + </summary> +</histogram> + +<histogram name="PageLoad.Clients.DelayNavigation.Delay.Delta" units="ms"> + <owner>bmcquade@chromium.org</owner> + <summary> + The absolute delta between the specified and actual delays added to main + frame navigations by DelayNavigationThrottle, for page loads that started in + the foreground and reached first paint in the foreground. + </summary> +</histogram> + +<histogram name="PageLoad.Clients.DelayNavigation.Delay.Specified" units="ms"> + <owner>bmcquade@chromium.org</owner> + <summary> + The specified delay added to main frame navigations by + DelayNavigationThrottle, for page loads that started in the foreground and + reached first paint in the foreground. + </summary> +</histogram> + <histogram name="PageLoad.Clients.DocWrite.Block.Count" enum="Boolean"> <owner>bmcquade@chromium.org</owner> <summary> @@ -45385,6 +46910,30 @@ </summary> </histogram> +<histogram + name="PageLoad.Experimental.Renderer.FirstMeaningfulPaintDetector.FirstMeaningfulPaintOrdering" + enum="FirstMeaningfulPaintOrdering"> + <owner>ksakamoto@chromium.org</owner> + <summary> + Whether the two variants of First Meaningful Paint reported different + values, and if so, which one was reported first. + </summary> +</histogram> + +<histogram + name="PageLoad.Experimental.Renderer.FirstMeaningfulPaintDetector.HadNetworkQuiet" + enum="NetworkQuietStatus"> + <owner>ksakamoto@chromium.org</owner> + <summary> + Recorded when the page load reached network 0-quiet (no active network + connection for 0.5 seconds), or network 2-quiet (no more than 2 active + network connections for 2 seconds). + PageLoad.Experimental.PaintTiming.FirstMeaningfulPaintSignalStatus2 + histogram gives the fraction of page loads that had network 2-quiet, so it + can be used as a baseline. + </summary> +</histogram> + <histogram name="PageLoad.Experimental.TotalRequests.ParseStop" units="requests"> <owner>csharrison@chromium.org</owner> @@ -45470,6 +47019,12 @@ </summary> </histogram> +<histogram name="PageLoad.Internal.NavigationStartedInForeground" + enum="BooleanForeground"> + <owner>bmcquade@chromium.org</owner> + <summary>Whether a navigation started in the foreground.</summary> +</histogram> + <histogram name="PageLoad.Internal.PageLoadCompleted.AfterAppBackground" enum="BooleanStartedCompleted"> <owner>bmcquade@chromium.org</owner> @@ -45486,6 +47041,22 @@ </summary> </histogram> +<histogram name="PageLoad.Internal.PageLoadTimingStatus" + enum="PageLoadTimingStatus"> + <owner>bmcquade@chromium.org</owner> + <summary> + The status of PageLoadTiming structs received from the render process over + IPC. + </summary> +</histogram> + +<histogram name="PageLoad.Internal.Prerender" enum="BooleanHit"> + <owner>bmcquade@chromium.org</owner> + <summary> + Counts the number of prerender navigations. Only logs true values. + </summary> +</histogram> + <histogram name="PageLoad.Internal.ProvisionalAbortChainSize.ForwardBack" units="length"> <owner>csharrison@chromium.org</owner> @@ -46599,6 +48170,15 @@ </summary> </histogram> +<histogram name="PasswordManager.HttpPasswordMigrationMode" + enum="HttpPasswordMigrationMode"> + <owner>jdoerrie@chromium.org</owner> + <summary> + The mode of migration applied to HTTP passwords migrating to HTTPS. Recorded + on HTTPS password form load when there are no credentials saved. + </summary> +</histogram> + <histogram name="PasswordManager.ImportedPasswordsPerUserInCSV"> <owner>xunlu@chromium.org</owner> <owner>vabr@chromium.org</owner> @@ -47156,6 +48736,64 @@ </summary> </histogram> +<histogram name="PasswordProtection.NumberOfCachedVerdictBeforeShutdown" + units="count"> + <owner>jialiul@chromium.org</owner> + <owner>nparker@chromium.org</owner> + <summary> + Number of password protection verdicts stored in content settings of a + profile before this profile is destructed. + </summary> +</histogram> + +<histogram name="PasswordProtection.PasswordProtectionResponseOrErrorCode" + enum="CombinedHttpResponseAndNetErrorCode"> + <owner>jialiul@chromium.org</owner> + <owner>nparker@chromium.org</owner> + <summary> + Response or error codes for PasswordProtectionRequest. Logged after chrome + receives response of PasswordProtectionRequest from Safe Browsing service. + </summary> +</histogram> + +<histogram name="PasswordProtection.PasswordReuseEventVerdict" + enum="PasswordProtectionVerdict"> + <owner>jialiul@chromium.org</owner> + <owner>nparker@chromium.org</owner> + <summary> + Verdict types returned by Safe Browsing server for password reuse events. + </summary> +</histogram> + +<histogram name="PasswordProtection.RequestNetworkDuration" units="ms"> + <owner>jialiul@chromium.org</owner> + <owner>nparker@chromium.org</owner> + <summary> + The time it takes for PasswordProtectionService request. It is not recorded + for requests that were canceled. + </summary> +</histogram> + +<histogram name="PasswordProtection.RequestOutcome" + enum="PasswordProtectionRequestOutcome"> + <owner>jialiul@chromium.org</owner> + <owner>nparker@chromium.org</owner> + <summary> + Records the outcome of the password protection request, indicating if + request is sent out successfully or if it is skipped or canceled for some + reason. + </summary> +</histogram> + +<histogram name="PasswordProtection.UnfamiliarLoginPageVerdict" + enum="PasswordProtectionVerdict"> + <owner>jialiul@chromium.org</owner> + <owner>nparker@chromium.org</owner> + <summary> + Verdict types returned by Safe Browsing server for unfamiliar login pages. + </summary> +</histogram> + <histogram name="PaymentRequest.CanMakePayment.NotUsed.WithShowEffectOnCompletion" enum="PaymentRequestFlowCompletionStatus"> @@ -47166,7 +48804,8 @@ </summary> </histogram> -<histogram name="PaymentRequest.CanMakePayment.Usage" enum="Boolean"> +<histogram name="PaymentRequest.CanMakePayment.Usage" + enum="CanMakePaymentUsage"> <owner>sebsg@chromium.org</owner> <summary> Whether the merchant used the CanMakePayment method during a Payment @@ -47249,6 +48888,14 @@ </summary> </histogram> +<histogram name="PaymentRequest.CheckoutFunnel.SkippedShow" + enum="BooleanSkipped"> + <owner>sebsg@chromium.org</owner> + <summary> + When the Payment Request UI gets skipped to go directly to the payment app. + </summary> +</histogram> + <histogram name="PaymentRequest.NumberOfSelectionAdds"> <owner>sebsg@chromium.org</owner> <summary> @@ -51020,6 +52667,10 @@ </histogram> <histogram name="Power.BatteryDischargePercentPerHour" units="%"> + <obsolete> + Deprecated 02/2017 in favor of power benchmarks that have less variability + than data from users' machines. + </obsolete> <owner>jeremy@chromium.org</owner> <summary> The percentage of battery capacity used per hour relative to a full @@ -51046,6 +52697,10 @@ </histogram> <histogram name="Power.BatteryDischargeRate_15" units="%"> + <obsolete> + Deprecated 02/2017 in favor of power benchmarks that have less variability + than data from users' machines. + </obsolete> <owner>jeremy@chromium.org</owner> <summary> The percent of depleted battery capacity relative to a full battery over @@ -51060,6 +52715,10 @@ </histogram> <histogram name="Power.BatteryDischargeRate_30" units="%"> + <obsolete> + Deprecated 02/2017 in favor of power benchmarks that have less variability + than data from users' machines. + </obsolete> <owner>jeremy@chromium.org</owner> <summary> The percent of depleted battery capacity relative to a full battery over @@ -51074,6 +52733,10 @@ </histogram> <histogram name="Power.BatteryDischargeRate_5" units="%"> + <obsolete> + Deprecated 02/2017 in favor of power benchmarks that have less variability + than data from users' machines. + </obsolete> <owner>jeremy@chromium.org</owner> <summary> The percent of depleted battery capacity relative to a full battery over @@ -51749,6 +53412,28 @@ </summary> </histogram> +<histogram name="Precache.CacheStatus.NonPrefetch.NonTopHosts" + enum="HttpCachePattern"> + <owner>twifkak@chromium.org</owner> + <owner>jamartin@chromium.org</owner> + <summary> + Like Precache.CacheStatus.NonPrefetch, but only for requests with a referer + not in the user's top visited hosts. See History.TopHostsVisitsByRank for + details on the top hosts computation. + </summary> +</histogram> + +<histogram name="Precache.CacheStatus.NonPrefetch.TopHosts" + enum="HttpCachePattern"> + <owner>twifkak@chromium.org</owner> + <owner>jamartin@chromium.org</owner> + <summary> + Like Precache.CacheStatus.NonPrefetch, but only for requests with a referer + in the user's top visited hosts. See History.TopHostsVisitsByRank for + details on the top hosts computation. + </summary> +</histogram> + <histogram name="Precache.CacheStatus.Prefetch" enum="HttpCachePattern"> <owner>jamartin@chromium.org</owner> <owner>twifkak@chromium.org</owner> @@ -51824,6 +53509,15 @@ </summary> </histogram> +<histogram name="Precache.Fetch.ResponseBytes.Daily" units="bytes"> + <owner>twifkak@chromium.org</owner> + <summary> + The total number of response bytes in 24 hours received over the network + from all prefetch requests, including config, manifests, and resources. + Logged during the next precache run after the 24 hours has elapsed. + </summary> +</histogram> + <histogram name="Precache.Fetch.ResponseBytes.Network" units="bytes"> <owner>twifkak@chromium.org</owner> <owner>bengr@chromium.org</owner> @@ -51874,6 +53568,9 @@ </histogram> <histogram name="Precache.Latency.NonPrefetch" units="ms"> + <obsolete> + Deprecated March 7 2017. + </obsolete> <owner>twifkak@chromium.org</owner> <owner>bengr@chromium.org</owner> <summary> @@ -51883,6 +53580,9 @@ </histogram> <histogram name="Precache.Latency.NonPrefetch.NonTopHosts" units="ms"> + <obsolete> + Deprecated March 7 2017. + </obsolete> <owner>twifkak@chromium.org</owner> <owner>bengr@chromium.org</owner> <summary> @@ -51893,6 +53593,9 @@ </histogram> <histogram name="Precache.Latency.NonPrefetch.TopHosts" units="ms"> + <obsolete> + Deprecated March 7 2017. + </obsolete> <owner>twifkak@chromium.org</owner> <owner>bengr@chromium.org</owner> <summary> @@ -51903,6 +53606,9 @@ </histogram> <histogram name="Precache.Latency.Prefetch" units="ms"> + <obsolete> + Deprecated March 7 2017. + </obsolete> <owner>twifkak@chromium.org</owner> <owner>bengr@chromium.org</owner> <summary> @@ -52596,6 +54302,9 @@ </histogram> <histogram name="Prerender.PerceivedPLT" units="ms"> + <obsolete> + Deprecated 2017-03. + </obsolete> <owner>pasko@chromium.org</owner> <summary> Time from when a user navigates to a page to when it loads. Since the pages @@ -52607,6 +54316,9 @@ </histogram> <histogram name="Prerender.PerceivedPLTFirstAfterMiss" units="ms"> + <obsolete> + Deprecated 2017-03. + </obsolete> <owner>pasko@chromium.org</owner> <summary> Time from when a user navigates to a page to when it loads. Since the pages @@ -52619,6 +54331,9 @@ </histogram> <histogram name="Prerender.PerceivedPLTFirstAfterMissAnyOnly" units="ms"> + <obsolete> + Deprecated 2017-03. + </obsolete> <owner>pasko@chromium.org</owner> <summary> Time from when a user navigates to a page to when it loads. Since the pages @@ -52633,6 +54348,9 @@ </histogram> <histogram name="Prerender.PerceivedPLTFirstAfterMissBoth" units="ms"> + <obsolete> + Deprecated 2017-03. + </obsolete> <owner>pasko@chromium.org</owner> <summary> Time from when a user navigates to a page to when it loads. Since the pages @@ -52647,6 +54365,9 @@ </histogram> <histogram name="Prerender.PerceivedPLTFirstAfterMissNonOverlapping" units="ms"> + <obsolete> + Deprecated 2017-03. + </obsolete> <owner>pasko@chromium.org</owner> <summary> Time from when a user navigates to a page to when it loads. Since the pages @@ -52661,6 +54382,9 @@ <histogram name="Prerender.PerceivedPLTFirstAfterMissNonOverlappingOnly" units="ms"> + <obsolete> + Deprecated 2017-03. + </obsolete> <owner>pasko@chromium.org</owner> <summary> Time from when a user navigates to a page to when it loads. Since the pages @@ -52675,6 +54399,9 @@ </histogram> <histogram name="Prerender.PerceivedPLTMatched" units="ms"> + <obsolete> + Deprecated 2017-03. + </obsolete> <owner>pasko@chromium.org</owner> <summary> Time from when a user navigates to a page to when it loads. Since the pages @@ -52706,6 +54433,9 @@ </histogram> <histogram name="Prerender.PerceivedPLTWindowed" units="ms"> + <obsolete> + Deprecated 2017-03. + </obsolete> <owner>pasko@chromium.org</owner> <summary> Time from when a user navigates to a page to when it loads. Since the pages @@ -52718,6 +54448,9 @@ </histogram> <histogram name="Prerender.PerceivedPLTWindowNotMatched" units="ms"> + <obsolete> + Deprecated 2017-03. + </obsolete> <owner>pasko@chromium.org</owner> <summary> Time from when a user navigates to a page to when it loads. Since the pages @@ -52795,6 +54528,9 @@ </histogram> <histogram name="Prerender.PrerenderCountOf3Max"> + <obsolete> + Deprecated 2017-03. + </obsolete> <owner>pasko@chromium.org</owner> <summary> After launching a prerender, how many simultanious prerenders are recorded @@ -52803,6 +54539,9 @@ </histogram> <histogram name="Prerender.PrerenderNotSwappedInPLT" units="ms"> + <obsolete> + Deprecated 2017-03. + </obsolete> <owner>pasko@chromium.org</owner> <summary> For prerenders that finish loading before they are ever swapped in, their @@ -53061,12 +54800,11 @@ </summary> </histogram> -<histogram name="Previews.EligibilityReason.Offline" - enum="PreviewsEligibilityReason"> +<histogram name="Previews.EligibilityReason" enum="PreviewsEligibilityReason"> <owner>ryansturm@chromium.org</owner> <summary> - Whether an offline preview was allowed to be shown or the reason the preview - could not be shown to the user. + Whether a particular preview was allowed to be shown or the reason the + preview could not be shown to the user. </summary> </histogram> @@ -57307,7 +59045,15 @@ </summary> </histogram> -<histogram name="SafeBrowsing.Pref.Scout" enum="BooleanEnabled"> +<histogram name="SafeBrowsing.Pref.SawInterstitial" enum="Boolean"> + <owner>lpz@chromium.org</owner> + <summary> + Whether the current user has ever seen a security interstitial. Recorded for + all non-Incognito profiles on profile startup. + </summary> +</histogram> + +<histogram name="SafeBrowsing.Pref.Scout" enum="NullableBoolean"> <owner>lpz@chromium.org</owner> <summary> Tracks the Extended Reporting preference transition. Suffixes track which @@ -58084,7 +59830,7 @@ </histogram> <histogram name="SB2.AddPrefixes"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> The number of add prefixes stored in the database after the last update. </summary> @@ -58125,7 +59871,7 @@ <obsolete> Deprecated 12/2014. Moved to SB2.DatabaseSizeKilobytes.Browse. </obsolete> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> The size of the browsing SafeBrowsing database file on disk in kilobytes, after an update has occurred. @@ -58133,7 +59879,7 @@ </histogram> <histogram name="SB2.BuildFilter" units="ms"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> The time that it took to regenerate the filter after we have received all the update chunks. @@ -58153,7 +59899,7 @@ </histogram> <histogram name="SB2.BuildReadKilobytes" units="KB"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> The number of kilobytes read by the browser process during the filter generation phase. @@ -58161,7 +59907,7 @@ </histogram> <histogram name="SB2.BuildReadOperations"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> The number of read operations issued by the browser process during the filter generation phase. @@ -58181,7 +59927,7 @@ </histogram> <histogram name="SB2.BuildWriteKilobytes" units="KB"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> The number of kilobytes written by the browser process during the filter generation phase. @@ -58189,7 +59935,7 @@ </histogram> <histogram name="SB2.BuildWriteOperations"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> The number of write operations issued by the browser process during the filter generation phase. @@ -58197,7 +59943,7 @@ </histogram> <histogram name="SB2.ChunkInsert" units="ms"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> The time that it takes to write one redirect URL (which can contain multiple chunks) to the database. @@ -58205,14 +59951,14 @@ </histogram> <histogram name="SB2.ChunkRequest" units="ms"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> The network time between the request and response for a chunk. </summary> </histogram> <histogram name="SB2.ChunkSize" units="bytes"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary>The size of one chunk URL.</summary> </histogram> @@ -58226,7 +59972,7 @@ </histogram> <histogram name="SB2.DatabaseFailure" enum="SB2DatabaseFailure"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary>Track failures when updating the safe-browsing database.</summary> </histogram> @@ -58234,14 +59980,14 @@ <obsolete> Replaced by SB2.BrowseDatabaseKilobytes. </obsolete> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> The size of the SafeBrowsing database file on disk in kilobytes. </summary> </histogram> <histogram name="SB2.DatabaseOpen" units="ms"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> The time it takes to initialize the SafeBrowsing storage backend, in milliseconds. @@ -58258,7 +60004,7 @@ </histogram> <histogram name="SB2.DatabaseUpdateKilobytes" units="KB"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> The size of the update file before merging with the database file, in kilobytes. @@ -58266,7 +60012,7 @@ </histogram> <histogram name="SB2.Delay" units="ms"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> The time that SafeBrowsing actually delayed the browsing experience. It records the difference between the time when Chrome would have started @@ -58292,7 +60038,7 @@ </histogram> <histogram name="SB2.DownloadChecks" enum="SB2DownloadChecks"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> Records results of SafeBrowsing download check, including both url check and downloaded file hash check. @@ -58303,7 +60049,7 @@ <obsolete> Deprecated 12/2014. Moved to SB2.DatabaseSizeKilobytes.Download. </obsolete> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> The size of the downloads SafeBrowsing database file on disk in kilobytes, after an update has occurred. @@ -58316,19 +60062,19 @@ corresponding to a download, which may or may not correspond to the total duration of a download. </obsolete> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary>The time it takes for a download to finish.</summary> </histogram> <histogram name="SB2.DownloadHashCheckDuration" units="ms"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> The time it takes for SafeBrowsing to check hash of a download file. </summary> </histogram> <histogram name="SB2.DownloadUrlCheckDuration" units="ms"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary>The time it takes for SafeBrowsing to check a download url.</summary> </histogram> @@ -58365,7 +60111,7 @@ </histogram> <histogram name="SB2.FilterCheck" units="ms"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> The time that it took to check a URL against our in-memory filter. </summary> @@ -58380,7 +60126,7 @@ </histogram> <histogram name="SB2.FilterLoad" enum="SB2FilterLoad"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary>Which filter file the database loaded from disk.</summary> </histogram> @@ -58427,7 +60173,7 @@ </histogram> <histogram name="SB2.FormatEvent" enum="SB2FormatEvent"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> Collection of boolean events for SafeBrowsingFileStore instances. Includes corruptions detected, old versions detected, and various failures detected. @@ -58627,7 +60373,7 @@ </histogram> <histogram name="SB2.Network" units="ms"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> The time that it took to receive a response from the Google SafeBrowsing servers for a GetHash request. @@ -58638,12 +60384,12 @@ <obsolete> Deprecated 7/2014. No longer generated. </obsolete> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary>Size of v1 database deleted from client profile.</summary> </histogram> <histogram name="SB2.OutShardShifts"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> Indicates how sharded safe-browsing on-disk stores are. Values like 0 to 4 are reasonable. @@ -58701,7 +60447,7 @@ </histogram> <histogram name="SB2.PrefixSetBitsPerPrefix" units="bits"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> The size of the PrefixSet storage in bits, divided by the number of prefixes represented. Should almost always be 16. @@ -58723,12 +60469,12 @@ <obsolete> Deprecated 01/2014. Replaced by suffixed SB2.PrefixSetSizeKilobytes. </obsolete> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary>The size of one of the PrefixSet files in kilobytes.</summary> </histogram> <histogram name="SB2.PrefixSetLoad" units="ms"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary>Time to load one of the PrefixSet files.</summary> </histogram> @@ -58753,7 +60499,7 @@ </histogram> <histogram name="SB2.PrefixSetSizeKilobytes" units="KB"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> The size of one of the PrefixSet files in kilobytes. Logged after a database update has occurred and the PrefixSet has been flushed to disk (once a few @@ -58805,12 +60551,12 @@ </histogram> <histogram name="SB2.PrefixSetVersionRead"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary>Version read from one of the PrefixSet files.</summary> </histogram> <histogram name="SB2.PrefixSetWrite" units="ms"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary>Time to store one of the PrefixSet files.</summary> </histogram> @@ -58931,7 +60677,7 @@ <obsolete> Deprecated 12/2014. Merged into SB2.PrefixSetWrite. </obsolete> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> Time to store the Side Effect Free Whitelist PrefixSet file. Note: this histogram was intended to be stored as @@ -58945,7 +60691,7 @@ Deprecated 12/2014. Moved to SB2.DatabaseSizeKilobytes.SideEffectFreeWhitelist. </obsolete> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> The size of the Side Effect Free Whitelist SaafeBrowsing database file on disk in kilobytes, after an update has occurred. @@ -58957,7 +60703,7 @@ Deprecated 12/2014. Moved to SB2.PrefixSetSizeKilobytes.SideEffectFreeWhitelist. </obsolete> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> The size of the Side Effect Free Whitelist PrefixSet file in kilobytes, after an udpate has occurred. @@ -58968,7 +60714,7 @@ <obsolete> Deprecated 12/2014. Merged into SB2.PrefixSetLoad. </obsolete> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary>Time to load the Side Effect Free Whitelist PrefixSet file.</summary> </histogram> @@ -58977,24 +60723,24 @@ <obsolete> Deprecated 4/2015. </obsolete> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary>The instantiation status of the SideEffectFreeWhitelist.</summary> </histogram> <histogram name="SB2.StoreVersionRead"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary>Version read from the store file.</summary> </histogram> <histogram name="SB2.SubPrefixes"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> The number of sub prefixes stored in the database after the last update. </summary> </histogram> <histogram name="SB2.Update" units="ms"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> The time from the receipt of the update request to the receipt of the final update chunk. @@ -59002,17 +60748,17 @@ </histogram> <histogram name="SB2.UpdateRequestSize" units="bytes"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary>The payload size of update requests to the server.</summary> </histogram> <histogram name="SB2.UpdateResult" enum="SB2UpdateResult"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary>Result from trying to update the SafeBrowsing data.</summary> </histogram> <histogram name="SB2.UpdateSize" units="bytes"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary>The size of all the chunk URLs in an update response.</summary> </histogram> @@ -59039,7 +60785,7 @@ </histogram> <histogram name="SB2.UpdateUrls"> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary>The number of chunk URLs in an update response.</summary> </histogram> @@ -59047,7 +60793,7 @@ <obsolete> The operation this is tracking has been deleted as of 09/2014. </obsolete> - <owner>shess@chromium.org</owner> + <owner>vakh@chromium.org</owner> <summary> Older versions of the safe-browsing code incorrectly added additional SBPrefix items when receiving full hashes. This caused errors when @@ -60141,6 +61887,14 @@ </summary> </histogram> +<histogram name="Scheduling.BeginImplFrameLatency2" units="microseconds"> + <owner>stanisc@chromium.org</owner> + <summary> + The time from v-sync to when the main side actually starts the + BeginImplFrame. + </summary> +</histogram> + <histogram name="Scheduling.BeginMainFrameIntervalCritical" units="microseconds"> <obsolete> @@ -61285,6 +63039,9 @@ </histogram> <histogram name="Search.ContextualSearchDurationNonPrefetched" units="ms"> + <obsolete> + Discontinued on 2/2017 Due to data being buggy and not useful. + </obsolete> <owner>donnd@chromium.org</owner> <owner>twellington@chromium.org</owner> <summary> @@ -61294,6 +63051,9 @@ </histogram> <histogram name="Search.ContextualSearchDurationPrefetched" units="ms"> + <obsolete> + Discontinued on 2/2017 Due to data being buggy and not useful. + </obsolete> <owner>donnd@chromium.org</owner> <owner>twellington@chromium.org</owner> <summary> @@ -61444,6 +63204,9 @@ <histogram name="Search.ContextualSearchIconSpriteAnimated" enum="ContextualSearchIconSpriteAnimated"> + <obsolete> + Contextual Search icon sprite removed 04/2017. + </obsolete> <owner>donnd@chromium.org</owner> <owner>twellington@chromium.org</owner> <summary> @@ -61568,6 +63331,9 @@ <histogram name="Search.ContextualSearchPrefetchSummary" enum="ContextualSearchPrefetchSummary"> + <obsolete> + Discontinued on 2/2017 Due to data not being useful. + </obsolete> <owner>donnd@chromium.org</owner> <owner>twellington@chromium.org</owner> <summary> @@ -61890,6 +63656,9 @@ <histogram name="Search.ContextualSearchSerpLoadedOnClose" enum="ContextualSearchLoaded"> + <obsolete> + Removed 02/2017 because the data is no longer valuable. + </obsolete> <owner>donnd@chromium.org</owner> <owner>twellington@chromium.org</owner> <summary> @@ -62319,6 +64088,42 @@ </summary> </histogram> +<histogram name="ServiceWorker.BackgroundFetchAbortEvent.Time" units="ms"> + <owner>peter@chromium.org</owner> + <summary> + The time taken between dispatching a BackgroundFetchAbortEvent to a Service + Worker and receiving a message that it finished handling the event. Includes + the time for the waitUntil() promise to settle. + </summary> +</histogram> + +<histogram name="ServiceWorker.BackgroundFetchClickEvent.Time" units="ms"> + <owner>peter@chromium.org</owner> + <summary> + The time taken between dispatching a BackgroundFetchClickEvent to a Service + Worker and receiving a message that it finished handling the event. Includes + the time for the waitUntil() promise to settle. + </summary> +</histogram> + +<histogram name="ServiceWorker.BackgroundFetchedEvent.Time" units="ms"> + <owner>peter@chromium.org</owner> + <summary> + The time taken between dispatching a BackgroundFetchedEvent to a Service + Worker and receiving a message that it finished handling the event. Includes + the time for the waitUntil() promise to settle. + </summary> +</histogram> + +<histogram name="ServiceWorker.BackgroundFetchFailEvent.Time" units="ms"> + <owner>peter@chromium.org</owner> + <summary> + The time taken between dispatching a BackgroundFetchFailEvent to a Service + Worker and receiving a message that it finished handling the event. Includes + the time for the waitUntil() promise to settle. + </summary> +</histogram> + <histogram name="ServiceWorker.BackgroundSyncEvent.Time" units="ms"> <owner>jkarlin@chromium.org</owner> <summary> @@ -62659,6 +64464,9 @@ </histogram> <histogram name="ServiceWorker.NavigationHintPrecision" enum="BooleanEnabled"> + <obsolete> + This experiment was turned down, see https://crbug.com/616502. + </obsolete> <owner>horo@chromium.org</owner> <summary> The precision of the speculative launch of Service Workers for navigation @@ -62819,6 +64627,16 @@ </summary> </histogram> +<histogram name="ServiceWorker.Runtime" units="ms"> + <owner>falken@chromium.org</owner> + <summary> + The amount of time a service worker ran for (wall time). Starts recording + when the service worker finished starting, and stops when the service worker + finished stopping. Not recorded if DevTools was attached to the service + worker at some point while it was running. + </summary> +</histogram> + <histogram name="ServiceWorker.ScriptCachedMetadataSize" units="bytes"> <owner>horo@chromium.org</owner> <summary> @@ -64126,6 +65944,111 @@ </summary> </histogram> +<histogram name="SettingsResetPrompt.DelayBeforePromptParam" units="seconds"> + <owner>alito@chromium.org</owner> + <summary> + The feature parameter determining the amount of time to wait after startup + before attempting to show the settings reset prompt. Logged once after + startup. + </summary> +</histogram> + +<histogram name="SettingsResetPrompt.DialogShown" enum="BooleanShown"> + <owner>alito@chromium.org</owner> + <summary> + Indicates whether the settings reset prompt dialog was shown to the user. + </summary> +</histogram> + +<histogram name="SettingsResetPrompt.NumberOfExtensionsDisabled" + units="extensions"> + <owner>alito@chromium.org</owner> + <summary> + The number of extensions that were disabled after the user accepted the + settings reset prompt. + </summary> +</histogram> + +<histogram name="SettingsResetPrompt.NumberOfExtensionsToDisable" + units="extensions"> + <owner>alito@chromium.org</owner> + <summary> + The number of extensions that will be disabled if the user accepts the + settings reset prompt. Logged once after startup. + </summary> +</histogram> + +<histogram name="SettingsResetPrompt.PromptAccepted" enum="BooleanAccepted"> + <owner>alito@chromium.org</owner> + <summary> + Indicates whether the user accepted the settings reset prompt. + </summary> +</histogram> + +<histogram name="SettingsResetPrompt.PromptRequired" enum="BooleanRequired"> + <owner>alito@chromium.org</owner> + <summary> + Indicates whether the settings reset prompt should be shown to the user + based on the state of the user's settings. + </summary> +</histogram> + +<histogram name="SettingsResetPrompt.ResetState" + enum="SettingsResetPromptResetState"> + <owner>alito@chromium.org</owner> + <summary> + Indicates whether the settings reset prompt is enabled for the user's + setting, or the reason for it being disabled. Logged once after startup. + </summary> +</histogram> + +<histogram name="SettingsResetPrompt.SettingsReset" + enum="SettingsResetPromptSettingsReset"> + <owner>alito@chromium.org</owner> + <summary> + Indicates which settings were reset after the user accepted the settings + reset prompt. + </summary> +</histogram> + +<histogram name="SettingsResetPrompt.TimeUntilAccepted" units="ms"> + <owner>alito@chromium.org</owner> + <summary> + The time between the settings reset prompt dialog being shown and the user + accepting the prompt. + </summary> +</histogram> + +<histogram name="SettingsResetPrompt.TimeUntilCanceled" units="ms"> + <owner>alito@chromium.org</owner> + <summary> + The time between the settings reset prompt dialog being shown and the user + declining the prompt by clicking the cancel button. + </summary> +</histogram> + +<histogram name="SettingsResetPrompt.TimeUntilDeclined" units="ms"> + <obsolete> + Deprecated in M59 in April 2017 and replaced by + SettingsResetPrompt.TimeUntilCanceled and + SettingsResetPrompt.TimeUntilDismissed. + </obsolete> + <owner>alito@chromium.org</owner> + <summary> + The time between the settings reset prompt dialog being shown and the user + declining the prompt. + </summary> +</histogram> + +<histogram name="SettingsResetPrompt.TimeUntilDismissed" units="ms"> + <owner>alito@chromium.org</owner> + <summary> + The time between the settings reset prompt dialog being shown and the user + dismissing the prompt, for example by clicking on the 'x' in the dialog or + pressing the Escape key. + </summary> +</histogram> + <histogram name="Setup.Install.ApplyArchivePatchTime" units="ms"> <owner>grt@chromium.org</owner> <summary> @@ -64161,6 +66084,16 @@ </summary> </histogram> +<histogram name="Setup.Install.DeleteIExecuteCommandClassKey" + enum="BooleanDeletedOrNot"> + <owner>grt@chromium.org</owner> + <summary> + Hit following a successful install or update when the COM registration for + the legacy "IExecuteCommand" implementation class key is deleted + from the registry. + </summary> +</histogram> + <histogram name="Setup.Install.DeleteInstallExtensionCommand" enum="BooleanDeletedOrNot"> <owner>grt@chromium.org</owner> @@ -66834,6 +68767,20 @@ <summary>Version of pre-existing database at startup.</summary> </histogram> +<histogram name="Sqlite.Vfs" units="bytes"> + <owner>shess@chromium.org</owner> + <summary> + Buffer sizes passed to browser-process SQLite VFS functions. + </summary> +</histogram> + +<histogram name="Sqlite.Vfs_Events" enum="SqliteVfsEvents"> + <owner>shess@chromium.org</owner> + <summary> + I/O operations measured by browser-process SQLite VFS wrapper. + </summary> +</histogram> + <histogram name="Sqlite.Web.Error" enum="SqliteErrorCode"> <obsolete> Moved to Sqlite.Error.Web in M-27. @@ -66923,6 +68870,29 @@ </summary> </histogram> +<histogram name="Stability.Android.PendingMinidumpsOnStartup" units="minidumps"> + <owner>isherman@chromium.org</owner> + <summary> + The number of un-uploaded minidumps present in the Android Crash Reports + directory. Each minidump file (should) correspond to a crash. This is + recorded on startup, just prior to initiating uploading for these minidumps. + This is intended as a temporary metric, to be removed around M60: + http://crbug.com/699785 + </summary> +</histogram> + +<histogram name="Stability.Android.PendingMinidumpsOnStartup.SansLogcat" + units="minidumps"> + <owner>isherman@chromium.org</owner> + <summary> + The number of un-uploaded minidumps present in the Android Crash Reports + directory that do not yet have logcat output attached. Each minidump file + (should) correspond to a crash. This is recorded on startup, just prior to + initiating uploading for all pending minidumps. This is intended as a + temporary metric, to be removed around M60: http://crbug.com/699785 + </summary> +</histogram> + <histogram name="Stability.BadMessageTerminated.Chrome" enum="BadMessageReasonChrome"> <owner>nick@chromium.org</owner> @@ -68247,6 +70217,22 @@ </summary> </histogram> +<histogram name="Storage.IndexedDB.PutBlobSizeKB" units="KB"> + <owner>dmurph@chromium.org</owner> + <summary> + Records the size of a blob used in an IndexedDB add/put operation. Recorded + for every put operation that contains a blob. + </summary> +</histogram> + +<histogram name="Storage.IndexedDB.PutValidBlob" enum="Boolean"> + <owner>dmurph@chromium.org</owner> + <summary> + Records if a blob intended to be used in an IndexedDB add/put operation is a + valid blob. Recorded for every put operation that contains a blob. + </summary> +</histogram> + <histogram name="Style.AuthorStyleSheet.ParseTime" units="microseconds"> <owner>csharrison@chromium.org</owner> <summary> @@ -68286,6 +70272,16 @@ <summary>Microseconds spent in Document::updateStyle.</summary> </histogram> +<histogram name="SubresourceFilter.Actions" enum="SubresourceFilterActions"> + <owner>csharrison@chromium.org</owner> + <summary> + Counts of various UI and user action events related to the + SubresourceFilter. This will be triggered in response to Content Settings + changes, as well as when portions of the UI are shown or interacted with. + Main frame navigations are also tracked for ease of comparison and analysis. + </summary> +</histogram> + <histogram name="SubresourceFilter.DocumentLoad.Activation.CPUDuration" units="microseconds"> <owner>pkalinnikov@chromium.org</owner> @@ -68465,7 +70461,10 @@ <histogram name="SubresourceFilter.PageLoad.RedirectChainLength" units="urls"> <owner>melandory@chromium.org</owner> - <summary>Total length of the server redirects during the navigation.</summary> + <summary> + Total number of server redirects during the navigation. This histogram is + recorded in several for every list where subresource fiter is active. + </summary> </histogram> <histogram name="SubresourceFilter.PageLoad.RedirectChainMatchPattern" @@ -68477,7 +70476,10 @@ For example, for the redirect chain A-B-C-D metric tracks: 1. If initial URL (A) was on a Safe Browsing blacklist. 2. If any if middle urls (B, C) were on a Safe Browsing blacklist. 3. If committed URL (B) was on a Safe Browsing - blacklist. + blacklist. This histogram is recorded in several flavours: with prefix + SubresourceFilterOnly in case the redirect chain contains url from the Safe + Browsing SubresourceFilter list and without the prefix for all other + redirect chains. </summary> </histogram> @@ -68513,6 +70515,9 @@ </histogram> <histogram name="SubresourceFilter.Prompt.NumVisibility" enum="BooleanVisible"> + <obsolete> + Deprecated in favor of SubresourceFilter.Action + </obsolete> <owner>melandory@chromium.org</owner> <summary> Number of times Safebrowsing Subresource Filter decided to toggle visibility @@ -71724,6 +73729,14 @@ </details> </histogram> +<histogram name="TabsApi.RequestedWindowState" enum="RequestedWindowState"> + <owner>afakhry@chromium.org</owner> + <summary> + The requested window creation state from the tabs extensions API when it's + used to create a new window or update the state of an existing one. + </summary> +</histogram> + <histogram name="TaskScheduler.BlockShutdownTasksPostedDuringShutdown" units="tasks"> <owner>fdoray@chromium.org</owner> @@ -71974,6 +73987,11 @@ </summary> </histogram> +<histogram name="TouchBar.Default.Metrics" enum="DefaultTouchBarActions"> + <owner>spqchan@chromium.com</owner> + <summary>Tracks the usage of the default touch bar buttons.</summary> +</histogram> + <histogram name="Touchpad.Device" enum="TouchpadDeviceState"> <owner>pthammaiah@google.com</owner> <summary>Tracks touchpad device state.</summary> @@ -72063,6 +74081,13 @@ <owner>pthammaiah@google.com</owner> </histogram> +<histogram name="Touchscreen.TapDisambiguation" enum="TapDisambiguation"> + <owner>aelias@chromium.org</owner> + <summary> + How the user interacted with the tap disambiguation feature on Android. + </summary> +</histogram> + <histogram name="Touchscreen.TouchEventsEnabled" enum="TouchEventFeatureDetectionState"> <owner>tdresser@chromium.org</owner> @@ -72296,17 +74321,17 @@ <histogram name="Translate.LanguageVerification" enum="TranslateLanguageVerification"> - <owner>kenjibaheux@google.com</owner> + <owner>yyushkina@chromium.org</owner> <summary> - For each page load, measures whether the provided Content-Language header - matches the language determined by CLD. Beyond directly matching or - mismatching the Content-Language header, CLD can complement the - Content-Language. For example, suppose the Content-Language header - specifies 'zh' (general Chinese), a language code that the Translate server - does not support. In this case, CLD can detect a subcode like '-TW' or - '-CN', resulting in language codes 'zh-TW' and 'zh-CN', which the Translate - server supports. This is referred to as "complementing a language - subcode". + For each page load, measures whether the provided HTML language (i.e. the + page lang attribute if it exists, otherwise the header Content-Language + value) matches the language determined by CLD. Beyond directly matching or + mismatching the HTML language, CLD can complement the HTML language. For + example, suppose the HTML language is 'zh' (general Chinese), a language + code that the Translate server does not support. In this case, CLD can + detect a subcode like '-TW' or '-CN', resulting in language codes 'zh-TW' + and 'zh-CN', which the Translate server supports. This is referred to as + "complementing a language subcode". </summary> </histogram> @@ -72601,6 +74626,26 @@ </summary> </histogram> +<histogram name="UKM.LogUpload.Canceled.CellularConstraint" + enum="BooleanCanceled"> + <owner>holte@chromium.org</owner> + <owner>rkaplow@chromium.org</owner> + <summary> + Logs whether a log was not uploaded due to cellular log throttling logic. + Android only. + </summary> +</histogram> + +<histogram name="UKM.LogUpload.ResponseOrErrorCode" + enum="CombinedHttpResponseAndNetErrorCode"> + <owner>holte@chromium.org</owner> + <owner>rkaplow@chromium.org</owner> + <summary> + HTTP response codes and network errors encountered by UKM when attempting to + upload logs to the server. + </summary> +</histogram> + <histogram name="UKM.PersistentLogRecall.Status" enum="PersistedLogsLogReadStatus"> <owner>holte@chromium.org</owner> @@ -72641,6 +74686,9 @@ </histogram> <histogram name="UKM.Upload.ResponseCode" enum="HttpResponseCode"> + <obsolete> + Replaced by UKM.LogUpload.ResponseOrErrorCode + </obsolete> <owner>holte@chromium.org</owner> <owner>rkaplow@chromium.org</owner> <summary> @@ -72854,8 +74902,7 @@ <owner>asvitkine@chromium.org</owner> <summary> Measures how much time since application was first in foreground till crash - reporting was enabled via enablePotentialCrashUploading() as part of - deferred start up. Only logged on Android. + reporting was enabled as part of deferred start up. Only logged on Android. </summary> </histogram> @@ -73139,6 +75186,16 @@ </summary> </histogram> +<histogram name="UMA.LogUpload.ResponseOrErrorCode" + enum="CombinedHttpResponseAndNetErrorCode"> + <owner>holte@chromium.org</owner> + <owner>asvitkine@chromium.org</owner> + <summary> + HTTP response codes and network errors encountered by UMA when attempting to + upload logs to the server. + </summary> +</histogram> + <histogram name="UMA.LowEntropySourceValue"> <owner>asvitkine@chromium.org</owner> <summary> @@ -73378,6 +75435,9 @@ <histogram name="UMA.UploadResponseStatus.Protobuf" enum="UmaUploadResponseStatus"> + <obsolete> + Replaced by UMA.LogUpload.ResponseOrErrorCode + </obsolete> <owner>asvitkine@chromium.org</owner> <summary> For each upload to the protocol buffer (v2) UMA server, log whether the @@ -74104,6 +76164,14 @@ </summary> </histogram> +<histogram name="UserSessionManager.RestoreOnCrash.AccountIdValid" + enum="BooleanValid"> + <owner>msarda@chromium.org</owner> + <summary> + The result of restoring account id on Chrome restart after crash. + </summary> +</histogram> + <histogram name="UserSessionManager.UserPodsDisplay" enum="UserPodsDisplay"> <owner>achuith@chromium.org</owner> <summary> @@ -74112,6 +76180,20 @@ </summary> </histogram> +<histogram name="V8.ArrayBufferBigAllocations" units="MB"> + <owner>bradnelson@chromium.org</owner> + <owner>titzer@chromium.org</owner> + <owner>kschimpf@chromium.org</owner> + <summary>Number of bytes requested in an array buffer allocation.</summary> +</histogram> + +<histogram name="V8.ArrayBufferNewSizeFailures" units="MB"> + <owner>bradnelson@chromium.org</owner> + <owner>titzer@chromium.org</owner> + <owner>kschimpf@chromium.org</owner> + <summary>Array buffer sizes for which V8 failed to allocate memory.</summary> +</histogram> + <histogram name="V8.AsmWasmTranslationMicroSeconds" units="microseconds"> <owner>bradnelson@chromium.org</owner> <owner>titzer@chromium.org</owner> @@ -75594,6 +77676,17 @@ </summary> </histogram> +<histogram name="WebApk.Install.GooglePlayInstallResult" + enum="WebApkGooglePlayInstallResult"> + <owner>hanxi@chromium.org</owner> + <owner>pkotwicz@chromium.org</owner> + <owner>yfriedman@chromium.org</owner> + <summary> + Records whether installing a WebAPK from Google Play succeeded. If not, + records the reason that the install failed. + </summary> +</histogram> + <histogram name="WebApk.Install.GooglePlayInstallState" enum="WebApkGooglePlayInstallState"> <owner>hanxi@chromium.org</owner> @@ -75702,6 +77795,25 @@ </summary> </histogram> +<histogram name="Webapp.InstallabilityCheckStatus.MenuItemAddToHomescreen" + enum="InstallabilityCheckStatus"> + <owner>dominickn@chromium.org</owner> + <summary> + Records whether or not the check that a site is or isn't a Progressive Web + App (PWA) has completed when the user taps the add to homescreen menu item + on Android. + </summary> +</histogram> + +<histogram name="Webapp.InstallabilityCheckStatus.MenuOpen" + enum="InstallabilityCheckStatus"> + <owner>dominickn@chromium.org</owner> + <summary> + Records whether or not the check that a site is or isn't a Progressive Web + App (PWA) has completed when the user opens the menu on Android. + </summary> +</histogram> + <histogram name="Webapp.Splashscreen.BackgroundColor" enum="SplashscreenColorStatus"> <owner>mlamouri@chromium.org</owner> @@ -78243,6 +80355,14 @@ </summary> </histogram> +<histogram name="WebRTC.Video.AdaptChangesPerMinute" units="changes/minute"> + <owner>asapersson@chromium.org</owner> + <summary> + The average number of adaptation changes per minute for a sent video stream. + Recorded when a stream is removed. + </summary> +</histogram> + <histogram name="WebRTC.Video.AverageRoundTripTimeInMilliseconds" units="ms"> <owner>holmer@chromium.org</owner> <summary> @@ -79206,6 +81326,9 @@ <summary> Count of how often a specific content type (permission) is changed using the content settings menu. + + Note: The values of this metric collected for Chrome 49 (early 2016) are + innacurate and should not be trusted. crbug.com/589255. </summary> </histogram> @@ -79216,6 +81339,9 @@ <summary> Count of how often a specific content type (permission) is set to 'Allowed' using the content settings menu. + + Note: The values of this metric collected for Chrome 49 (early 2016) are + innacurate and should not be trusted. crbug.com/589255. </summary> </histogram> @@ -79226,6 +81352,9 @@ <summary> Count of how often a specific content type (permission) is set to 'Blocked' using the content settings menu. + + Note: The values of this metric collected for Chrome 49 (early 2016) are + innacurate and should not be trusted. crbug.com/589255. </summary> </histogram> @@ -79236,6 +81365,9 @@ <summary> Count of how often a specific content type (permission) is reset to the default value using the content settings menu. + + Note: The values of this metric collected for Chrome 49 (early 2016) are + innacurate and should not be trusted. crbug.com/589255. </summary> </histogram> @@ -79246,6 +81378,9 @@ <summary> Count of how often a specific content type (permission) is changed using the Origin Info dialog. + + Note: The values of this metric collected for Chrome 49 (early 2016) are + innacurate and should not be trusted. crbug.com/589255. </summary> </histogram> @@ -79256,6 +81391,9 @@ <summary> Count of how often a specific content type (permission) is set to 'Allowed' using the Origin Info dialog. + + Note: The values of this metric collected for Chrome 49 (early 2016) are + innacurate and should not be trusted. crbug.com/589255. </summary> </histogram> @@ -79266,6 +81404,9 @@ <summary> Count of how often a specific content type (permission) is set to 'Blocked' using the Origin Info dialog. + + Note: The values of this metric collected for Chrome 49 (early 2016) are + innacurate and should not be trusted. crbug.com/589255. </summary> </histogram> @@ -79278,7 +81419,10 @@ <owner>sashab@chromium.org</owner> <summary> Count of how often a specific content type (permission) is changed using the - Website Settings UI. + Page Info UI. + + Note: The values of this metric collected for Chrome 49 (early 2016) are + innacurate and should not be trusted. crbug.com/589255. </summary> </histogram> @@ -79552,6 +81696,47 @@ <summary>The type of category clicked in the Windows Jumplist</summary> </histogram> +<histogram name="WinJumplist.CreateIconFilesCount"> + <owner>chengx@chromium.org</owner> + <summary> + Count of jumplist icons that will be created per jumplist update. It is + recorded whenever UpdateJumpList() is called. + </summary> +</histogram> + +<histogram name="WinJumplist.CreateIconFilesDuration" units="ms"> + <owner>chengx@chromium.org</owner> + <summary> + Time spent in CreateIconFiles(). This method is called whenever there is a + jumplist update and the JumpListIcons folder is empty. + </summary> +</histogram> + +<histogram name="WinJumplist.DeleteDirectoryContentDuration" units="ms"> + <owner>chengx@chromium.org</owner> + <summary> + Time spent in DeleteDirectoryContentAndLogResults(). This method is to + delete the icon files in JumpListIcons folder. + </summary> +</histogram> + +<histogram name="WinJumplist.DeleteStatusJumpListIcons" + enum="JumplisticonsDeleteCategory"> + <owner>chengx@chromium.org</owner> + <summary> + This metric records the detailed delete result of JumpListIcons directory. + </summary> +</histogram> + +<histogram name="WinJumplist.DeleteStatusJumpListIconsOld" + enum="JumplisticonsDeleteCategory"> + <owner>chengx@chromium.org</owner> + <summary> + This metric records the detailed delete result of JumpListIconsOld + directory. + </summary> +</histogram> + <histogram name="WinJumplist.DetailedFolderMoveResults" enum="JumplistIconsDetailedFolderMoveCategory"> <obsolete> @@ -79571,6 +81756,9 @@ <histogram name="WinJumplist.DetailedFolderResults" enum="JumplistIconsDetailedFolderOperationCategory"> + <obsolete> + Obsolete 03/10/2017 as it is replaced by DetailedFolderResultsDeleteUpdated. + </obsolete> <owner>chengx@chromium.org</owner> <summary> This metric is recorded when folders JumpListIcons and JumpListIconsOld get @@ -79584,6 +81772,45 @@ </summary> </histogram> +<histogram name="WinJumplist.DetailedFolderResultsDeleteUpdated" + enum="JumplistIconsDetailedFolderOperationDeleteUpdatedCategory"> + <obsolete> + Obselete 03/20/2016. New metrics named WinJumplist.DeleteStatusJumpListIcons + and WinJumplist.DeleteStatusJumpListIconsOld are used instead. + </obsolete> + <owner>chengx@chromium.org</owner> + <summary> + This metric is recorded when folders JumpListIcons and JumpListIconsOld get + updated. These two folders are updated when tabs are closed, mostly visited + URLs get updated, etc. These two folders are updated as follows 1) + JumpListIconsOld with its content get deleted; 2) if step 1 succeeds, + JumpListIcons is renamed to JumpListIconsOld, 3) if any of the previous + steps fails, JumpListIcons is deleted, 4) A new JumpListIcons folder is + created if deletion of JumpListIcons' content succeeds (only fail to delete + the directory is okay). The status of these 4 file operations are put + together and recorded in this metric. The failure of any of these file + operations is suspected to be related to a known issue. + </summary> +</histogram> + +<histogram name="WinJumplist.DirectoryStatusJumpListIcons" + enum="JumpListIconsFolderExistOrEmptyCategory"> + <owner>chengx@chromium.org</owner> + <summary> + This metric records whether the folder JumpListIcons exists; and if it + does, whether it is empty or non-empty. + </summary> +</histogram> + +<histogram name="WinJumplist.DirectoryStatusJumpListIconsOld" + enum="JumpListIconsFolderExistOrEmptyCategory"> + <owner>chengx@chromium.org</owner> + <summary> + This metric records whether the folder JumpListIconsOld exists; and if + it does, whether it is empty or non-empty. + </summary> +</histogram> + <histogram name="WinJumplist.FolderMoveResults" enum="JumplistIconsFolderMoveCategory"> <obsolete> @@ -79619,6 +81846,34 @@ </summary> </histogram> +<histogram name="WinJumplist.UpdateJumpListDuration" units="ms"> + <owner>chengx@chromium.org</owner> + <summary> + Time spent in UpdateJumpList(). This method is called whenever there is a + jumplist update. + </summary> +</histogram> + +<histogram name="WinJumplistUpdater.AddCustomCategoryDuration" units="ms"> + <owner>chengx@chromium.org</owner> + <summary>Time spent in JumpListUpdater::AddCustomCategory.</summary> +</histogram> + +<histogram name="WinJumplistUpdater.AddTasksDuration" units="ms"> + <owner>chengx@chromium.org</owner> + <summary>Time spent in JumpListUpdater::AddTasks.</summary> +</histogram> + +<histogram name="WinJumplistUpdater.BeginUpdateDuration" units="ms"> + <owner>chengx@chromium.org</owner> + <summary>Time spent in JumpListUpdater::BeginUpdate.</summary> +</histogram> + +<histogram name="WinJumplistUpdater.CommitUpdateDuration" units="ms"> + <owner>chengx@chromium.org</owner> + <summary>Time spent in JumpListUpdater::CommitUpdate.</summary> +</histogram> + <histogram name="WinTimeTicks.FailedToChangeCores" enum="WindowsVersion"> <obsolete> Removed 01/2017. @@ -79686,6 +81941,18 @@ </summary> </histogram> +<histogram name="WorkerScheduler.WorkerThreadLoad" units="%"> + <owner>kinuko@chromium.org</owner> + <summary> + Worker thread load, i.e. percentage of time spent on running tasks. This + metric is emitted at most once per kWorkerThreadLoadTrackerReportingInterval + sec per worker thread amortized. E.g. if a worker ran a single task for X + seconds and then went to idle for Y seconds before it shuts down, and + assuming the interval rate was 1 sec, we get X samples for 100% and Y + samples for 0%. + </summary> +</histogram> + <histogram name="WorkerThread.DebuggerTask.Time" units="ms"> <owner>nhiroki@chromium.org</owner> <summary>The time taken for running a debugger task on WorkerThread.</summary> @@ -79696,6 +81963,15 @@ <summary>Records the exit code of WorkerThread.</summary> </histogram> +<histogram name="WorkerThread.Runtime" units="ms"> + <owner>kinuko@chromium.org</owner> + <summary> + The amount of time a worker thread ran for. Starts recording when a worker + scheduler for the thread is created, and stops when the scheduler is shut + down. + </summary> +</histogram> + <histogram name="WorkerThread.Task.Time" units="ms"> <owner>nhiroki@chromium.org</owner> <summary>The time taken for running a worker task on WorkerThread.</summary> @@ -80119,6 +82395,14 @@ <int value="2" label="Get stability file path failed"/> </enum> +<enum name="ActivityTrackerSystemSessionAnalysisStatus" type="int"> + <int value="0" label="Success"/> + <int value="1" label="Missing timestamp"/> + <int value="2" label="Missing analyzer"/> + <int value="3" label="Analysis failed"/> + <int value="4" label="Outside range"/> +</enum> + <enum name="ActivityTrackerWriteDumpStatus" type="int"> <int value="0" label="Sucess"/> <int value="1" label="Failed"/> @@ -80484,6 +82768,14 @@ <int value="3" label="LowMemory"/> </enum> +<enum name="AndroidRestoreResult" type="int"> + <int value="0" label="No restore attempted"/> + <int value="1" label="Restore successful"/> + <int value="2" label="Failed: Chrome already run locally"/> + <int value="3" label="Failed: Chrome startup failed"/> + <int value="4" label="Failed: Cannot sign in as previous user"/> +</enum> + <enum name="AndroidSeccompSandboxStatus" type="int"> <int value="0" label="Not Supported"/> <int value="1" label="Detection Failed"/> @@ -80606,6 +82898,7 @@ <int value="26" label="Site eligible, but banner creation failed"/> <int value="27" label="Url is not eligible for WebAPKs"/> <int value="28" label="Site loaded in incognito window (not reported)"/> + <int value="29" label="Service worker not offline capable"/> </enum> <enum name="AppBannersInstallEvent" type="int"> @@ -80826,6 +83119,14 @@ <int value="4" label="Outside of NTP (e.g. bookmarks bar)"/> </enum> +<enum name="ArcAuthAccountCheckStatus" type="int"> + <int value="0" label="Account is up to date"/> + <int value="1" label="New account"/> + <int value="2" label="Account needs reauth"/> + <int value="3" label="Account has unknown state"/> + <int value="4" label="Account check failed"/> +</enum> + <enum name="ArcIntentHandlerAction" type="int"> <summary>Defines Arc intent handler actions</summary> <int value="0" label="Error"/> @@ -80858,11 +83159,25 @@ <int value="0" label="Canceled by user"/> <int value="1" label="Unclassified failure"/> <int value="2" label="Network failure"/> - <int value="3" label="GMS Services are not available"/> + <int value="3" label="DEPRECATED: GMS Services are not available"/> <int value="4" label="DEPRECATED: Bad authentication returned by server"/> <int value="5" label="DEPRECATED: GMS Core is not available"/> <int value="6" label="Cloud provision flow failed"/> <int value="7" label="Android Management required"/> + <int value="8" label="Busy"/> +</enum> + +<enum name="ArcOptInResult" type="int"> + <summary> + Defines Arc OptIn flow states. Normally each OptIn flow reports 2-3 states; + Started should be accompined with Succeeded or Canceled. Optionally + Succeeded after retry or Canceled after error may be provided. + </summary> + <int value="0" label="Started"/> + <int value="1" label="Succeeded"/> + <int value="2" label="Succeeded after retry"/> + <int value="3" label="Canceled"/> + <int value="4" label="Canceled after error"/> </enum> <enum name="ArcOptInSilentAuthCode" type="int"> @@ -81260,6 +83575,9 @@ <int value="22" label="User joined maximum number of machines to the domain"/> <int value="23" label="kinit or smbclient failed to contact Key Distribution Center"/> + <int value="24" label="Kerberos credentials cache not found"/> + <int value="25" label="Kerberos ticket expired while renewing credentials"/> + <int value="26" label="klist exited with unspecified error"/> </enum> <enum name="AutocheckoutBubble" type="int"> @@ -81315,8 +83633,9 @@ </enum> <enum name="AutofillDeveloperEngagement" type="int"> - <int value="0" label="Fillable form parsed"/> - <int value="1" label="Includes type hints"/> + <int value="0" label="Fillable form parsed without type hints"/> + <int value="1" label="Fillable form parsed with type hints"/> + <int value="2" label="Includes UPI-VPA type hint"/> </enum> <enum name="AutofillDialogDismissalState" type="int"> @@ -81516,6 +83835,10 @@ <int value="0" label="Unknown"/> <int value="1" label="Match"/> <int value="2" label="Mismatch"/> + <int value="3" label="Match - Empty Data"/> + <int value="4" label="Match - Unknown Data"/> + <int value="5" label="Mismatch - Empty Data"/> + <int value="6" label="Mismatch - Unknown Data"/> </enum> <enum name="AutofillTypeQualityByFieldType" type="int"> @@ -81639,6 +83962,7 @@ <enum name="AutoplaySource" type="int"> <int value="0" label="autoplay attribute"/> <int value="1" label="play() method"/> + <int value="2" label="dual source"/> </enum> <enum name="AutoSigninFirstRun" type="int"> @@ -81647,6 +83971,20 @@ <int value="2" label="Ok, got it"/> </enum> +<enum name="BackForwardNavigationType" type="int"> + <int value="0" label="Fast back navigation with WKBackForwardList"/> + <int value="1" label="Slow back navigation"/> + <int value="2" label="Fast forward navigation with WKBackForwardList"/> + <int value="3" label="Slow forward navigation"/> +</enum> + +<enum name="BackgroundFetchEventDispatchResult" type="int"> + <int value="0" label="Success"/> + <int value="1" label="Cannot find worker"/> + <int value="2" label="Cannot start worker"/> + <int value="3" label="Cannot dispatch the event"/> +</enum> + <enum name="BackgroundFetchTrigger" type="int"> <int value="0" label="Wake-up of the persistent scheduler"/> <int value="1" label="NTP opened"/> @@ -81870,6 +84208,12 @@ <int value="159" label="RFH_DID_ADD_CONSOLE_MESSAGE_BAD_SEVERITY"/> <int value="160" label="AIRH_VOLUME_OUT_OF_RANGE"/> <int value="161" label="BDH_INVALID_DESCRIPTOR_ID"/> + <int value="162" label="RWH_INVALID_BEGIN_FRAME_ACK_DID_NOT_SWAP"/> + <int value="163" label="RWH_INVALID_BEGIN_FRAME_ACK_COMPOSITOR_FRAME"/> + <int value="164" label="BFSI_INVALID_TAG"/> + <int value="165" label="BFSI_INVALID_REQUESTS"/> + <int value="166" label="BFSI_INVALID_TITLE"/> + <int value="167" label="RWH_INVALID_FRAME_TOKEN"/> </enum> <enum name="BadMessageReasonExtensions" type="int"> @@ -82138,6 +84482,11 @@ <int value="1" label="Active"/> </enum> +<enum name="BooleanAllowed" type="int"> + <int value="0" label="Not Allowed"/> + <int value="1" label="Allowed"/> +</enum> + <enum name="BooleanAttempted" type="int"> <int value="0" label="Not Attempted"/> <int value="1" label="Attempted"/> @@ -82358,6 +84707,16 @@ <int value="1" label="Force Disabled"/> </enum> +<enum name="BooleanForeground" type="int"> + <int value="0" label="Background"/> + <int value="1" label="Foreground"/> +</enum> + +<enum name="BooleanForegroundNotification" type="int"> + <int value="0" label="Background Notification"/> + <int value="1" label="Foreground Notification"/> +</enum> + <enum name="BooleanForemost" type="int"> <int value="0" label="Tab was not foremost"/> <int value="1" label="Tab was foremost"/> @@ -82383,6 +84742,11 @@ <int value="1" label="From Address Book"/> </enum> +<enum name="BooleanFromHTTPCache" type="int"> + <int value="0" label="Downloaded from network"/> + <int value="1" label="HTTP cache hit"/> +</enum> + <enum name="BooleanGAIAWebViewFlow" type="int"> <int value="0" label="iframe-based flow"/> <int value="1" label="WebView-based flow"/> @@ -82478,6 +84842,11 @@ <int value="1" label="inappropriate_fallback alert"/> </enum> +<enum name="BooleanIncognito" type="int"> + <int value="0" label="Not Incognito"/> + <int value="1" label="Incognito"/> +</enum> + <enum name="BooleanInForeground" type="int"> <int value="0" label="Background"/> <int value="1" label="Foreground"/> @@ -82573,6 +84942,16 @@ <int value="1" label="Orphan"/> </enum> +<enum name="BooleanOverlaySupported" type="int"> + <int value="0" label="No overlays supported"/> + <int value="1" label="Supports overlays"/> +</enum> + +<enum name="BooleanOverlayUsage" type="int"> + <int value="0" label="No overlay"/> + <int value="1" label="Overlay"/> +</enum> + <enum name="BooleanPanelWasOpen" type="int"> <int value="0" label="Panel was closed"/> <int value="1" label="Panel was open"/> @@ -82653,6 +85032,11 @@ <int value="1" label="Requested"/> </enum> +<enum name="BooleanRequired" type="int"> + <int value="0" label="Not required"/> + <int value="1" label="Required"/> +</enum> + <enum name="BooleanReset" type="int"> <int value="0" label="Not reset"/> <int value="1" label="Reset"/> @@ -82828,6 +85212,7 @@ <int value="1" label="QUIC_STREAM_FACTORY"/> <int value="2" label="HTTP_STREAM_FACTORY_IMPL_JOB_ALT"/> <int value="3" label="HTTP_STREAM_FACTORY_IMPL_JOB_MAIN"/> + <int value="4" label="QUIC_HTTP_STREAM"/> </enum> <enum name="BrotliFilterDecodingStatus" type="int"> @@ -82922,6 +85307,11 @@ <int value="23" label="Too many RenderPassDrawQuads."/> </enum> +<enum name="CanMakePaymentUsage" type="int"> + <int value="0" label="Used"/> + <int value="1" label="Not Used"/> +</enum> + <enum name="CanvasContextType" type="int"> <int value="0" label="2d"/> <int value="1" label="(obsolete) webkit-3d"/> @@ -83104,6 +85494,12 @@ <int value="3" label="CertRevoked"/> </enum> +<enum name="CastNonceStatus" type="int"> + <int value="0" label="Match"/> + <int value="1" label="Mismatch"/> + <int value="2" label="Missing"/> +</enum> + <enum name="CastOverlayEvents" type="int"> <int value="0" label="Created"/> <int value="1" label="Shown"/> @@ -83232,6 +85628,12 @@ <int value="4" label="Initiated by Plugin Installer"/> </enum> +<enum name="ChromeHomeOpenReason" type="int"> + <int value="0" label="Swipe"/> + <int value="1" label="Omnibox Focus"/> + <int value="2" label="New Tab Creation"/> +</enum> + <enum name="ChromeNotifierServiceActionType" type="int"> <int value="0" label="Unknown"/> <int value="1" label="First service enabled"/> @@ -84326,6 +86728,8 @@ <int value="-202" label="CERT_AUTHORITY_INVALID"/> <int value="-201" label="CERT_DATE_INVALID"/> <int value="-200" label="CERT_COMMON_NAME_INVALID"/> + <int value="-175" label="SSL_VERSION_INTERFERENCE"/> + <int value="-174" label="READ_IF_READY_NOT_IMPLEMENTED"/> <int value="-173" label="WS_UPGRADE"/> <int value="-172" label="SSL_OBSOLETE_CIPHER"/> <int value="-171" label="CT_CONSISTENCY_PROOF_PARSING_FAILED"/> @@ -84764,6 +87168,8 @@ <int value="2" label="Clicked 'Always allow pop-ups from'"/> <int value="3" label="Clicked one of the list items"/> <int value="4" label="Clicked 'Manage pop-up blocking'"/> + <int value="5" label="Displayed popup-blocked infobar on mobile"/> + <int value="6" label="Clicked 'Always show on mobile'"/> </enum> <enum name="ContentSettingScheme" type="int"> @@ -84793,6 +87199,7 @@ <int value="4" label="Hidden (Chrome became frontmost)"/> <int value="5" label="Hidden (Category disabled)"/> <int value="6" label="Hidden (Content Suggestion Service shut down)"/> + <int value="7" label="Settings"/> </enum> <enum name="ContentSuggestionsNotificationsImpression" type="int"> @@ -84854,8 +87261,26 @@ <int value="22" label="App banner setting (Android only)"/> <int value="23" label="Site engagement setting"/> <int value="24" label="Durable storage setting"/> - <int value="25" label="Key generation setting"/> - <int value="26" label="Background sync setting"/> + <int value="25" label="Key generation setting [removed]"/> + <int value="26" label="Bluetooth guard setting"/> + <int value="27" label="Background sync setting"/> + <int value="28" label="Autoplay setting"/> + <int value="30" label="Important site info setting"/> + <int value="31" label="Permission autoblocker data setting"/> + <int value="32" label="Subresource filter setting"/> +</enum> + +<enum name="ContentTypeParseableResult" type="int"> + <int value="0" label="IsSupported returned and MIME type parseable"/> + <int value="1" label="MayBeSupported returned and MIME type parseable"/> + <int value="2" label="IsNotSupported returned and MIME type parseable"/> + <int value="3" + label="IsSupported returned and MIME type not parseable (should fail)"/> + <int value="4" + label="MayBeSupported returned and MIME type not parseable (should + fail)"/> + <int value="5" + label="IsNotSupported returned and MIME type not parseable (acceptable)"/> </enum> <enum name="ContextLostReason" type="int"> @@ -84910,6 +87335,10 @@ <int value="30" label="Call"/> <int value="31" label="Send text message"/> <int value="32" label="Copy phone number"/> + <int value="33" label="Open in new Chrome tab (CCT)"/> + <int value="34" label="Open in Chrome incognito tab (CCT)"/> + <int value="35" label="Open in browser (CCT)"/> + <int value="36" label="Open in Chrome (Fullscreen)"/> </enum> <enum name="ContextMenuSaveLinkType" type="int"> @@ -86270,6 +88699,18 @@ <int value="14" label="Snackbar promo link clicked, and the proxy was disabled"/> <int value="15" label="Snackbar promo dismissed (no action taken)"/> + <int value="16" + label="Arrived at settings menu by main menu item: entered off, exited + off"/> + <int value="17" + label="Arrived at settings menu by main menu item: entered off, exited + on"/> + <int value="18" + label="Arrived at settings menu by main menu item: entered on, exited + off"/> + <int value="19" + label="Arrived at settings menu by main menu item: entered on, exited + on"/> </enum> <enum name="DataUrlMimeType" type="int"> @@ -86287,6 +88728,22 @@ <int value="3" label="Lost"/> </enum> +<enum name="DataUsageTrackingSessionEndReason" type="int"> + <int value="0" label="Omnibox search navigation"/> + <int value="1" label="Omnibox navigation"/> + <int value="2" label="Bookmark navigation"/> + <int value="3" label="History navigation"/> +</enum> + +<enum name="DataUsageTrackingSessionStartReason" type="int"> + <int value="0" label="Package regex match in Custom Tab"/> + <int value="1" label="Omnibox search navigation"/> + <int value="2" label="Omnibox navigation"/> + <int value="3" label="Bookmark navigation"/> + <int value="4" label="Link navigation"/> + <int value="5" label="Page reload"/> +</enum> + <enum name="DataUsageUIAction" type="int"> <int value="0" label="Data use tracking started snackbar shown"/> <int value="1" @@ -86319,6 +88776,21 @@ <int value="12" label="Video - Tab in foreground"/> </enum> +<enum name="DataUsePageTransition" type="int"> + <summary>PageTransitions in ui/base/page_transition_types.h.</summary> + <int value="0" label="LINK"/> + <int value="1" label="TYPED"/> + <int value="2" label="AUTO_BOOKMARK"/> + <int value="3" label="SUBFRAME"/> + <int value="4" label="GENERATED"/> + <int value="5" label="AUTO_TOPLEVEL"/> + <int value="6" label="FORM_SUBMIT"/> + <int value="7" label="RELOAD"/> + <int value="8" label="KEYWORD"/> + <int value="9" label="FORWARD_BACK"/> + <int value="10" label="HOME_PAGE"/> +</enum> + <enum name="DataUseServices" type="int"> <int value="0" label="Not Tagged"/> <int value="1" label="Suggestions"/> @@ -86359,6 +88831,8 @@ <int value="36" label="NTPSnippets thumbnails"/> <int value="37" label="Doodle"/> <int value="38" label="UKM"/> + <int value="39" label="Payments"/> + <int value="40" label="LargeIconService"/> </enum> <enum name="DecodedImageOrientation" type="int"> @@ -86442,6 +88916,17 @@ <int value="8" label="DSP set to new engine with no previous value in prefs"/> </enum> +<enum name="DefaultTouchBarActions" type="int"> + <int value="0" label="Back"/> + <int value="1" label="Forward"/> + <int value="2" label="Stop"/> + <int value="3" label="Reload"/> + <int value="4" label="Home"/> + <int value="5" label="Search"/> + <int value="6" label="Star"/> + <int value="7" label="New Tab"/> +</enum> + <enum name="DefaultWebClientState" type="int"> <int value="0" label="Not default">Chrome is not the default web client.</int> <int value="1" label="Is default">Chrome is the default web client.</int> @@ -86579,6 +89064,8 @@ <int value="23" label="CPU profile node excluded"/> <int value="24" label="File picker file selected"/> <int value="25" label="Command menu command executed"/> + <int value="26" label="Change inspected node in elements panel"/> + <int value="27" label="Style rule copied"/> </enum> <enum name="DevToolsPanel" type="int"> @@ -86651,6 +89138,11 @@ <int value="22" label="SQLite Integrity Top Sites Test"/> </enum> +<enum name="DialogName" type="int"> + <int value="0" label="Unknown"/> + <int value="1" label="Translate"/> +</enum> + <enum name="DifferentPrimaryAccounts" type="int"> <int value="0" label="Primary Accounts the same"/> <int value="1" label="(obsolete) Primary Accounts different"/> @@ -86920,6 +89412,17 @@ <int value="2" label="Same Site Different Scheme Script"/> </enum> +<enum name="DomainBoundCerts.DBLoadStatus" type="int"> + <int value="0" label="Database path doesn't exist and couldn't be created"/> + <int value="1" label="Unable to open database"/> + <int value="2" label="Failed to migrate db to current version"/> + <int value="3" label="Invalid SELECT statement to load db"/> + <int value="4" label="Successfully created new db"/> + <int value="5" label="Successfully loaded existing db"/> + <int value="6" + label="Loaded existing db, but failed to load one or more keys"/> +</enum> + <enum name="DomainBoundCerts.GetCertResult" type="int"> <int value="0" label="SYNC_SUCCESS"/> <int value="1" label="ASYNC_SUCCESS"/> @@ -86956,6 +89459,21 @@ <int value="1" label="Failed over to another collector"/> </enum> +<enum name="DoodleConfigDownloadOutcome" type="int"> + <summary> + These values are defined in the DownloadOutcome enum in + components/doodle/doodle_service.h. + </summary> + <int value="0" label="New doodle"/> + <int value="1" label="Existing doodle was revalidated"/> + <int value="2" label="Existing doodle was updated"/> + <int value="3" label="No doodle today"/> + <int value="4" label="Received doodle was already expired"/> + <int value="5" label="Download failed"/> + <int value="6" label="Parsing failed"/> + <int value="7" label="Request ignored, min refresh interval not passed"/> +</enum> + <enum name="DoubleGetExperimentMethods" type="int"> <int value="0" label="POST"/> <int value="1" label="GET_CACHABLE"/> @@ -87045,6 +89563,10 @@ <int value="15" label="Supports ranges and strong ETag (Obsolete 11/2013)"/> <int value="16" label="No WebContents at interruption"/> <int value="17" label="Supports ranges and strong validation"/> + <int value="18" label="Uses parallel requests(Obsolete 3/2017)"/> + <int value="19" label="New downloads"/> + <int value="20" label="New downloads (normal profile only)"/> + <int value="21" label="Completed (normal profile only)"/> </enum> <enum name="DownloadDatabaseRecordDroppedType" type="int"> @@ -87574,6 +90096,13 @@ <int value="2" label="Unknown"/> </enum> +<enum name="DxgiFramePresentationMode" type="int"> + <int value="0" label="Composed"/> + <int value="1" label="Overlay"/> + <int value="2" label="None (Unknown)"/> + <int value="3" label="Composition Failure"/> +</enum> + <enum name="EAPInnerProtocol" type="int"> <int value="0" label="UNKNOWN"/> <int value="1" label="NONE"/> @@ -89315,6 +91844,8 @@ <int value="403" label="CLIPBOARD_ON_CLIPBOARD_DATA_CHANGED"/> <int value="404" label="VIRTUAL_KEYBOARD_PRIVATE_ON_KEYBOARD_CLOSED"/> <int value="405" label="FILE_MANAGER_PRIVATE_ON_APPS_UPDATED"/> + <int value="406" label="ACCESSIBILITY_PRIVATE_ON_TWO_FINGER_TOUCH_START"/> + <int value="407" label="ACCESSIBILITY_PRIVATE_ON_TWO_FINGER_TOUCH_STOP"/> </enum> <enum name="ExtensionFileWriteResult" type="int"> @@ -89578,7 +92109,7 @@ <int value="239" label="DOWNLOADS_SEARCH"/> <int value="240" label="FONTSETTINGS_CLEARFONT"/> <int value="241" label="WINDOWS_UPDATE"/> - <int value="242" label="BOOKMARKMANAGERPRIVATE_CANOPENNEWWINDOWS"/> + <int value="242" label="DELETED_BOOKMARKMANAGERPRIVATE_CANOPENNEWWINDOWS"/> <int value="243" label="SERIAL_FLUSH"/> <int value="244" label="BROWSERACTION_SETTITLE"/> <int value="245" label="BOOKMARKMANAGERPRIVATE_CANEDIT"/> @@ -90528,6 +93059,15 @@ <int value="1161" label="AUDIO_SETMUTE"/> <int value="1162" label="AUDIO_GETDEVICES"/> <int value="1163" label="VIRTUALKEYBOARD_RESTRICTFEATURES"/> + <int value="1164" label="NETWORKINGCASTPRIVATE_VERIFYDESTINATION"/> + <int value="1165" label="NETWORKINGCASTPRIVATE_VERIFYANDENCRYPTCREDENTIALS"/> + <int value="1166" label="NETWORKINGCASTPRIVATE_VERIFYANDENCRYPTDATA"/> + <int value="1167" label="NETWORKINGCASTPRIVATE_SETWIFITDLSENABLEDSTATE"/> + <int value="1168" label="NETWORKINGCASTPRIVATE_GETWIFITDLSSTATUS"/> + <int value="1169" label="ACCESSIBILITY_PRIVATE_DARKENSCREEN"/> + <int value="1170" label="WEBRTC_AUDIO_PRIVATE_SET_AUDIO_EXPERIMENTS"/> + <int value="1171" label="AUTOTESTPRIVATE_GETPLAYSTORESTATE"/> + <int value="1172" label="AUTOTESTPRIVATE_SETPLAYSTOREENABLED"/> </enum> <enum name="ExtensionIconState" type="int"> @@ -90953,6 +93493,7 @@ <int value="200" label="kClipboard"/> <int value="201" label="kNetworkingOnc"/> <int value="202" label="kVirtualKeyboard"/> + <int value="203" label="kNetworkingCastPrivate"/> </enum> <enum name="ExtensionServiceVerifyAllSuccess" type="int"> @@ -91081,6 +93622,14 @@ <int value="2" label="Cache entry validators don't match request"/> </enum> +<enum name="ExtractionStatus" type="int"> + <summary>The status of metadata extraction for Appindexing.</summary> + <int value="0" label="OK"/> + <int value="1" label="Empty result"/> + <int value="2" label="JSON parsing failure"/> + <int value="3" label="Wrong type in JSON top-level object"/> +</enum> + <enum name="Exynos5250LotIdEnum" type="int"> <int value="0" label="Fused device"/> <int value="1" label="Generic unfused device"/> @@ -91139,6 +93688,16 @@ </int> </enum> +<enum name="FaviconFetchResult" type="int"> + <int value="0" label="SUCCESS_CACHED"> + Success - favicon found in local cache + </int> + <int value="1" label="SUCCESS_FETCHED"> + Success - favicon fetched from the server + </int> + <int value="2" label="FAILURE">Failure - favicon not available</int> +</enum> + <enum name="FeatureObserver" type="int"> <!-- Generated from third_party/WebKit/Source/core/frame/UseCounter.h --> @@ -92349,7 +94908,7 @@ <int value="1184" label="DocumentCreateEventWheelEvent"/> <int value="1185" label="DocumentCreateEventMediaKeyEvent"/> <int value="1186" label="DocumentCreateEventTrackEvent"/> - <int value="1187" label="DocumentCreateEventWebKitAnimationEvent"/> + <int value="1187" label="OBSOLETE_DocumentCreateEventWebKitAnimationEvent"/> <int value="1188" label="DocumentCreateEventMutationEvents"/> <int value="1189" label="DocumentCreateEventOrientationEvent"/> <int value="1190" label="DocumentCreateEventSVGEvents"/> @@ -92726,7 +95285,7 @@ <int value="1556" label="WebAudioAutoplayCrossOriginIframe"/> <int value="1557" label="ScriptInvalidTypeOrLanguage"/> <int value="1558" label="VRGetDisplays"/> - <int value="1559" label="VRPresent"/> + <int value="1559" label="VRPresent (Obsolete)"/> <int value="1560" label="VRDeprecatedGetPose"/> <int value="1561" label="WebAudioAnalyserNode"/> <int value="1562" label="WebAudioAudioBuffer"/> @@ -93027,6 +95586,122 @@ <int value="1847" label="ScrollByTouch"/> <int value="1848" label="ScrollByWheel"/> <int value="1849" label="ScheduledActionIgnored"/> + <int value="1850" label="GetCanvas2DContextAttributes"/> + <int value="1851" label="V8HTMLInputElement_Capture_AttributeGetter"/> + <int value="1852" label="V8HTMLInputElement_Capture_AttributeSetter"/> + <int value="1853" label="HTMLMediaElementControlsListAttribute"/> + <int value="1854" label="HTMLMediaElementControlsListNoDownload"/> + <int value="1855" label="HTMLMediaElementControlsListNoFullscreen"/> + <int value="1856" label="HTMLMediaElementControlsListNoRemotePlayback"/> + <int value="1857" label="PointerEventClickRetargetCausedByCapture"/> + <int value="1858" label="VRDisplayIsConnected"/> + <int value="1859" label="VRDisplayResetPose"/> + <int value="1860" label="VRDisplayCapabilitiesHasOrientation"/> + <int value="1861" label="VRDisplayDisplayName"/> + <int value="1862" label="VREyeParametersOffset"/> + <int value="1863" label="VRPoseLinearVelocity"/> + <int value="1864" label="VRPoseLinearAcceleration"/> + <int value="1865" label="VRPoseAngularVelocity"/> + <int value="1866" label="VRPoseAngularAcceleration"/> + <int value="1867" label="CSSOverflowPaged"/> + <int value="1868" label="ChildSrcAllowedWorkerThatScriptSrcBlocked"/> + <int value="1869" label="HTMLTableElementPresentationAttributeBackground"/> + <int value="1870" label="V8Navigator_GetInstalledRelatedApps_Method"/> + <int value="1871" label="NamedAccessOnWindow_ChildBrowsingContext"/> + <int value="1872" + label="NamedAccessOnWindow_ChildBrowsingContext_CrossOriginNameMismatch"/> + <int value="1873" label="V0CustomElementsRegisterHTMLCustomTag"/> + <int value="1874" label="V0CustomElementsRegisterHTMLTypeExtension"/> + <int value="1875" label="V0CustomElementsRegisterSVGElement"/> + <int value="1876" label="V0CustomElementsRegisterEmbedderElement"/> + <int value="1877" label="V0CustomElementsCreateCustomTagElement"/> + <int value="1878" label="V0CustomElementsCreateTypeExtensionElement"/> + <int value="1879" label="V0CustomElementsConstruct"/> + <int value="1880" label="V8IDBObserver_Observe_Method"/> + <int value="1881" label="V8IDBObserver_Unobserve_Method"/> + <int value="1882" label="WebBluetoothRemoteCharacteristicGetDescriptor"/> + <int value="1883" label="WebBluetoothRemoteCharacteristicGetDescriptors"/> + <int value="1884" label="WebBluetoothRemoteCharacteristicReadValue"/> + <int value="1885" label="WebBluetoothRemoteCharacteristicWriteValue"/> + <int value="1886" label="WebBluetoothRemoteCharacteristicStartNotifications"/> + <int value="1887" label="WebBluetoothRemoteCharacteristicStopNotifications"/> + <int value="1888" label="WebBluetoothRemoteDescriptorReadValue"/> + <int value="1889" label="WebBluetoothRemoteDescriptorWriteValue"/> + <int value="1890" label="WebBluetoothRemoteServerConnect"/> + <int value="1891" label="WebBluetoothRemoteServerDisconnect"/> + <int value="1892" label="WebBluetoothRemoteServerGetPrimaryService"/> + <int value="1893" label="WebBluetoothRemoteServerGetPrimaryServices"/> + <int value="1894" label="WebBluetoothRemoteServiceGetCharacteristic"/> + <int value="1895" label="WebBluetoothRemoteServiceGetCharacteristics"/> + <int value="1896" label="HTMLContentElement"/> + <int value="1897" label="HTMLShadowElement"/> + <int value="1898" label="HTMLSlotElement"/> + <int value="1899" label="AccelerometerConstructor"/> + <int value="1900" label="AbsoluteOrientationSensorConstructor"/> + <int value="1901" label="AmbientLightSensorConstructor"/> + <int value="1902" label="GenericSensorOnActivate"/> + <int value="1903" label="GenericSensorOnChange"/> + <int value="1904" label="GenericSensorOnError"/> + <int value="1905" label="GenericSensorActivated"/> + <int value="1906" label="GyroscopeConstructor"/> + <int value="1907" label="MagnetometerConstructor"/> + <int value="1908" label="OrientationSensorPopulateMatrix"/> + <int value="1909" label="WindowOpenWithInvalidURL"/> + <int value="1910" label="CrossOriginMainFrameNulledNameAccessed"/> + <int value="1911" label="MenuItemElementIconAttribute"/> + <int value="1912" label="WebkitCSSMatrixSetMatrixValue"/> + <int value="1913" label="WebkitCSSMatrixConstructFromString"/> + <int value="1914" label="CanRequestURLHTTPContainingNewline"/> + <int value="1915" label="CanRequestURLNonHTTPContainingNewline"/> + <int value="1916" label="GetGamepads"/> + <int value="1917" label="V8SVGPathElement_GetPathSegAtLength_Method"/> + <int value="1918" label="MediaStreamConstraintsAudio"/> + <int value="1919" label="MediaStreamConstraintsAudioUnconstrained"/> + <int value="1920" label="MediaStreamConstraintsVideo"/> + <int value="1921" label="MediaStreamConstraintsVideoUnconstrained"/> + <int value="1922" label="MediaStreamConstraintsWidth"/> + <int value="1923" label="MediaStreamConstraintsHeight"/> + <int value="1924" label="MediaStreamConstraintsAspectRatio"/> + <int value="1925" label="MediaStreamConstraintsFrameRate"/> + <int value="1926" label="MediaStreamConstraintsFacingMode"/> + <int value="1927" label="MediaStreamConstraintsVolume"/> + <int value="1928" label="MediaStreamConstraintsSampleRate"/> + <int value="1929" label="MediaStreamConstraintsSampleSize"/> + <int value="1930" label="MediaStreamConstraintsEchoCancellation"/> + <int value="1931" label="MediaStreamConstraintsLatency"/> + <int value="1932" label="MediaStreamConstraintsChannelCount"/> + <int value="1933" label="MediaStreamConstraintsDeviceIdAudio"/> + <int value="1934" label="MediaStreamConstraintsDeviceIdVideo"/> + <int value="1935" label="MediaStreamConstraintsDisableLocalEcho"/> + <int value="1936" label="MediaStreamConstraintsGroupIdAudio"/> + <int value="1937" label="MediaStreamConstraintsGroupIdVideo"/> + <int value="1938" label="MediaStreamConstraintsVideoKind"/> + <int value="1939" label="MediaStreamConstraintsDepthNear"/> + <int value="1940" label="MediaStreamConstraintsDepthFar"/> + <int value="1941" label="MediaStreamConstraintsFocalLengthX"/> + <int value="1942" label="MediaStreamConstraintsFocalLengthY"/> + <int value="1943" label="MediaStreamConstraintsMediaStreamSourceAudio"/> + <int value="1944" label="MediaStreamConstraintsMediaStreamSourceVideo"/> + <int value="1945" label="MediaStreamConstraintsRenderToAssociatedSink"/> + <int value="1946" label="MediaStreamConstraintsHotwordEnabled"/> + <int value="1947" label="MediaStreamConstraintsGoogEchoCancellation"/> + <int value="1948" + label="MediaStreamConstraintsGoogExperimentalEchoCancellation"/> + <int value="1949" label="MediaStreamConstraintsGoogAutoGainControl"/> + <int value="1950" + label="MediaStreamConstraintsGoogExperimentalAutoGainControl"/> + <int value="1951" label="MediaStreamConstraintsGoogNoiseSuppression"/> + <int value="1952" label="MediaStreamConstraintsGoogHighpassFilter"/> + <int value="1953" label="MediaStreamConstraintsGoogTypingNoiseDetection"/> + <int value="1954" + label="MediaStreamConstraintsGoogExperimentalNoiseSuppression"/> + <int value="1955" label="MediaStreamConstraintsGoogBeamforming"/> + <int value="1956" label="MediaStreamConstraintsGoogArrayGeometry"/> + <int value="1957" label="MediaStreamConstraintsGoogAudioMirroring"/> + <int value="1958" label="MediaStreamConstraintsGoogDAEchoCancellation"/> + <int value="1959" label="MediaStreamConstraintsGoogNoiseReduction"/> + <int value="1960" label="MediaStreamConstraintsGoogPowerLineFrequency"/> + <int value="1961" label="ViewportFixedPositionUnderFilter"/> </enum> <enum name="FetchRequestMode" type="int"> @@ -93864,6 +96539,7 @@ <int value="4" label="File could not be memory-mapped by system."/> <int value="5" label="File has invalid contents."/> <int value="6" label="File could not be exclusively opened."/> + <int value="7" label="File contents internally deleted."/> </enum> <enum name="FileReaderSyncWorkerType" type="int"> @@ -93913,6 +96589,12 @@ <int value="20" label=".log"/> </enum> +<enum name="FirstMeaningfulPaintOrdering" type="int"> + <int value="0" label="FMP 0-quiet < FMP 2-quiet"/> + <int value="1" label="FMP 0-quiet > FMP 2-quiet"/> + <int value="2" label="FMP 0-quiet = FMP 2-quiet"/> +</enum> + <enum name="FirstMeaningfulPaintSignalStatus" type="int"> <int value="0" label="No input, network active"/> <int value="1" label="Had input, network active"/> @@ -95020,7 +97702,7 @@ <int value="5" label="Invalid parameters"/> <int value="6" label="Service unavailable"/> <int value="7" label="Internal server error"/> - <int value="8" label="HTTP reponse code not OK"/> + <int value="8" label="HTTP response code not OK"/> <int value="9" label="Unknown error"/> <int value="10" label="Reached maximum number of retries"/> <int value="11" label="Device registration error"/> @@ -95151,6 +97833,12 @@ <int value="5" label="User ignored the bar"/> </enum> +<enum name="GeolocationSettingsDialogBackOff" type="int"> + <int value="0" label="One week"/> + <int value="1" label="One month"/> + <int value="2" label="Three months"/> +</enum> + <enum name="GeopositionErrorCode" type="int"> <int value="0" label="There was no error"/> <int value="1" label="User denied use of geolocation"/> @@ -95532,6 +98220,9 @@ <enum name="HistoryFaviconsRecoveryEnum" type="int"> <summary>Error states noted in thumbnail_database.cc recovery code.</summary> + <obsolete> + History.FaviconsRecovery no longer tracked as of March 2017. + </obsolete> <int value="0" label="RECOVERY_EVENT_RECOVERED">Successful recovery.</int> <int value="1" label="RECOVERY_EVENT_FAILED_SCOPER"> sql::Recovery failed init. @@ -95630,7 +98321,7 @@ <int value="1" label="RECOVERY_EVENT_DEPRECATED"> Recovery found deprecated version and razed. </int> - <int value="2" label="RECOVERY_EVENT_FAILED_SCOPER"> + <int value="2" label="RECOVERY_EVENT_FAILED_SCOPER (obsolete Mar 2017)"> sql::Recovery failed init. </int> <int value="3" label="RECOVERY_EVENT_FAILED_META_VERSION"> @@ -95639,13 +98330,14 @@ <int value="4" label="RECOVERY_EVENT_FAILED_META_WRONG_VERSION"> Recovery meta table has an unexpected version. </int> - <int value="5" label="RECOVERY_EVENT_FAILED_META_INIT"> + <int value="5" label="RECOVERY_EVENT_FAILED_META_INIT (obsolete Mar 2017)"> Failed sql::MetaTable::Init(). </int> - <int value="6" label="RECOVERY_EVENT_FAILED_SCHEMA_INIT"> + <int value="6" label="RECOVERY_EVENT_FAILED_SCHEMA_INIT (obsolete Mar 2017)"> Failed to init target schema. </int> - <int value="7" label="RECOVERY_EVENT_FAILED_AUTORECOVER_THUMBNAILS"> + <int value="7" + label="RECOVERY_EVENT_FAILED_AUTORECOVER_THUMBNAILS (obsolete Mar 2017)"> Failed recovery on thumbnails table. </int> <int value="8" label="RECOVERY_EVENT_FAILED_COMMIT"> @@ -95867,6 +98559,15 @@ <int value="7" label="HEADER_HTTP_09_ON_REUSED_SOCKET"/> </enum> +<enum name="HttpPasswordMigrationMode" type="int"> + <int value="0" label="Moved"> + HTTP credentials were moved during migration to HTTPS + </int> + <int value="1" label="Copied"> + HTTP credentials were copied during migration to HTTPS + </int> +</enum> + <enum name="HttpPipelineStatus" type="int"> <int value="0" label="Success"/> <int value="1" label="Redirected"/> @@ -95938,6 +98639,8 @@ <int value="10" label="SET_SUPPORTS_QUIC"/> <int value="11" label="SET_SERVER_NETWORK_STATS"/> <int value="12" label="DETECTED_CORRUPTED_PREFS"/> + <int value="13" label="SET_QUIC_SERVER_INFO"/> + <int value="14" label="CLEAR_SERVER_NETWORK_STATS"/> </enum> <enum name="HttpSocketType" type="int"> @@ -95977,6 +98680,29 @@ </int> </enum> +<enum name="HttpStreamFactoryJobState" type="int"> + <summary> + State of HttpStreamFactoryJob. See net::HttpStreamFactoryImpl::Job::State + for more details + </summary> + <int value="0" label="START"/> + <int value="1" label="RESOLVE_PROXY"/> + <int value="2" label="RESOLVE_PROXY_COMPLETE"/> + <int value="3" label="WAIT"/> + <int value="4" label="WAIT_COMPLETE"/> + <int value="5" label="INIT_CONNECTION"/> + <int value="6" label="INIT_CONNECTION_COMPLETE"/> + <int value="7" label="WAITING_USER_ACTION"/> + <int value="8" label="RESTART_TUNNEL_AUTH"/> + <int value="9" label="RESTART_TUNNEL_AUTH_COMPLETE"/> + <int value="10" label="CREATE_STREAM"/> + <int value="11" label="CREATE_STREAM_COMPLETE"/> + <int value="12" label="DRAIN_BODY_FOR_AUTH_RESTART"/> + <int value="13" label="DRAIN_BODY_FOR_AUTH_RESTART_COMPLETE"/> + <int value="14" label="DONE"/> + <int value="15" label="NONE"/> +</enum> + <enum name="ICCProfileAnalyzeResult" type="int"> <int value="0" label="Extracted primary matrix and numerical transfer function"/> @@ -96404,7 +99130,7 @@ <int value="45" label="GOOGLE_API_KEYS_INFOBAR_DELEGATE"/> <int value="46" label="OBSOLETE_SYSTEM_INFOBAR_DELEGATE"/> <int value="47" label="SESSION_CRASHED_INFOBAR_DELEGATE"/> - <int value="48" label="WEBSITE_SETTINGS_INFOBAR_DELEGATE"/> + <int value="48" label="PAGE_INFO_INFOBAR_DELEGATE"/> <int value="49" label="AUTOFILL_CC_INFOBAR_DELEGATE"/> <int value="50" label="TRANSLATE_INFOBAR_DELEGATE"/> <int value="51" label="IOS_CHROME_SAVE_PASSWORD_INFOBAR_DELEGATE"/> @@ -96856,6 +99582,15 @@ <int value="35" label="Ran by google.com/intl/ (deprecated)"/> </enum> +<enum name="InstallabilityCheckStatus" type="int"> + <int value="0" label="Check not started"/> + <int value="1" label="Check terminated before it could finish"/> + <int value="2" label="Check not complete, site is not a PWA"/> + <int value="3" label="Check not complete, site is a PWA"/> + <int value="4" label="Check complete, site is not a PWA"/> + <int value="5" label="Check complete, site is a PWA"/> +</enum> + <enum name="InstallStatus" type="int"> <int value="0" label="FIRST_INSTALL_SUCCESS"/> <int value="1" label="INSTALL_REPAIRED"/> @@ -97016,7 +99751,7 @@ <enum name="InternalErrorLoadEvent" type="int"> <summary>Internal Errors in the page_load_metrics system</summary> - <int value="0" label="Invalid timing IPC sent from renderer"/> + <int value="0" label="Invalid timing IPC sent from renderer (deprecated)"/> <int value="1" label="IPC received while not tracking a relevant committed load"/> <int value="2" label="IPC received from a frame we navigated away from"/> @@ -97031,6 +99766,10 @@ <int value="8" label="Inter process TimeTicks skew"/> <int value="9" label="No commit or failed provisional load received"/> <int value="10" label="No page load end time recorded"/> + <int value="11" label="Timing IPC received from subframe"/> + <int value="12" label="Invalid timing IPC (invalid timing descendent)"/> + <int value="13" label="Invalid timing IPC (invalid behavior descendent)"/> + <int value="14" label="Invalid timing IPC (invalid timing)"/> </enum> <enum name="InterruptReason" type="int"> @@ -97074,6 +99813,11 @@ <int value="2" label="SubframeBlocked"/> </enum> +<enum name="IOSShareExtensionReceivedEntrySource" type="int"> + <int value="0" label="Unknown Application"/> + <int value="1" label="Chrome share extension"/> +</enum> + <enum name="IOSShareExtensionReceivedEntryType" type="int"> <int value="0" label="Invalid item"/> <int value="1" label="Cancelled item"/> @@ -97218,6 +99962,17 @@ </int> </enum> +<enum name="JumplisticonsDeleteCategory" type="int"> + <int value="0" label="Success"/> + <int value="1" label="Fail as directory name length exceeds MAX_PATH"/> + <int value="2" label="Fail as directory is read-only"/> + <int value="3" label="Fail as the input directory is actually a file"/> + <int value="4" label="Fail as sub-directory exists"/> + <int value="5" label="Fail to delete max files without attempt failures"/> + <int value="6" label="Fail as maximum attempt failures allowed are hit"/> + <int value="7" label="Fail to remove the raw directory"/> +</enum> + <enum name="JumplistIconsDetailedFolderMoveCategory" type="int"> <int value="0" label="DelTargetDir Succeed - MoveFileEx Succeed - CopyFile Succeed - @@ -97453,6 +100208,106 @@ label="Del Dest Fail - Mov Fail - Del Src Fail - Create Src Fail"/> </enum> +<enum name="JumplistIconsDetailedFolderOperationDeleteUpdatedCategory" + type="int"> + <int value="0" + label="Del Dest Succeed - Rename Succeed - Del Src Content Succeed - + Del Src Dir Succeed - Create Src Succeed"/> + <int value="1" + label="Del Dest Fail - Rename Succeed - Del Src Content Succeed - Del + Src Dir Succeed - Create Src Succeed"/> + <int value="2" + label="Del Dest Succeed - Rename Fail - Del Src Content Succeed - Del + Src Dir Succeed - Create Src Succeed"/> + <int value="3" + label="Del Dest Fail - Rename Fail - Del Src Content Succeed - Del Src + Dir Succeed - Create Src Succeed"/> + <int value="4" + label="Del Dest Succeed - Rename Succeed - Del Src Content Fail - Del + Src Dir Succeed - Create Src Succeed"/> + <int value="5" + label="Del Dest Fail - Rename Succeed - Del Src Content Fail - Del Src + Dir Succeed - Create Src Succeed"/> + <int value="6" + label="Del Dest Succeed - Rename Fail - Del Src Content Fail - Del Src + Dir Succeed - Create Src Succeed"/> + <int value="7" + label="Del Dest Fail - Rename Fail - Del Src Content Fail - Del Src Dir + Succeed - Create Src Succeed"/> + <int value="8" + label="Del Dest Succeed - Rename Succeed - Del Src Content Succeed - + Del Src Dir Fail - Create Src Succeed"/> + <int value="9" + label="Del Dest Fail - Rename Succeed - Del Src Content Succeed - Del + Src Dir Fail - Create Src Succeed"/> + <int value="10" + label="Del Dest Succeed - Rename Fail - Del Src Content Succeed - Del + Src Dir Fail - Create Src Succeed"/> + <int value="11" + label="Del Dest Fail - Rename Fail - Del Src Content Succeed - Del Src + Dir Fail - Create Src Succeed"/> + <int value="12" + label="Del Dest Succeed - Rename Succeed - Del Src Content Fail - Del + Src Dir Fail - Create Src Succeed"/> + <int value="13" + label="Del Dest Fail - Rename Succeed - Del Src Content Fail - Del Src + Dir Fail - Create Src Succeed"/> + <int value="14" + label="Del Dest Succeed - Rename Fail - Del Src Content Fail - Del Src + Dir Fail - Create Src Succeed"/> + <int value="15" + label="Del Dest Fail - Rename Fail - Del Src Content Fail - Del Src Dir + Fail - Create Src Succeed"/> + <int value="16" + label="Del Dest Succeed - Rename Succeed - Del Src Content Succeed - + Del Src Dir Succeed - Create Src Fail"/> + <int value="17" + label="Del Dest Fail - Rename Succeed - Del Src Content Succeed - Del + Src Dir Succeed - Create Src Fail"/> + <int value="18" + label="Del Dest Succeed - Rename Fail - Del Src Content Succeed - Del + Src Dir Succeed - Create Src Fail"/> + <int value="19" + label="Del Dest Fail - Rename Fail - Del Src Content Succeed - Del Src + Dir Succeed - Create Src Fail"/> + <int value="20" + label="Del Dest Succeed - Rename Succeed - Del Src Content Fail - Del + Src Dir Succeed - Create Src Fail"/> + <int value="21" + label="Del Dest Fail - Rename Succeed - Del Src Content Fail - Del Src + Dir Succeed - Create Src Fail"/> + <int value="22" + label="Del Dest Succeed - Rename Fail - Del Src Content Fail - Del Src + Dir Succeed - Create Src Fail"/> + <int value="23" + label="Del Dest Fail - Rename Fail - Del Src Content Fail - Del Src Dir + Succeed - Create Src Fail"/> + <int value="24" + label="Del Dest Succeed - Rename Succeed - Del Src Content Succeed - + Del Src Dir Fail - Create Src Fail"/> + <int value="25" + label="Del Dest Fail - Rename Succeed - Del Src Content Succeed - Del + Src Dir Fail - Create Src Fail"/> + <int value="26" + label="Del Dest Succeed - Rename Fail - Del Src Content Succeed - Del + Src Dir Fail - Create Src Fail"/> + <int value="27" + label="Del Dest Fail - Rename Fail - Del Src Content Succeed - Del Src + Dir Fail - Create Src Fail"/> + <int value="28" + label="Del Dest Succeed - Rename Succeed - Del Src Content Fail - Del + Src Dir Fail - Create Src Fail"/> + <int value="29" + label="Del Dest Fail - Rename Succeed - Del Src Content Fail - Del Src + Dir Fail - Create Src Fail"/> + <int value="30" + label="Del Dest Succeed - Rename Fail - Del Src Content Fail - Del Src + Dir Fail - Create Src Fail"/> + <int value="31" + label="Del Dest Fail - Rename Fail - Del Src Content Fail - Del Src Dir + Fail - Create Src Fail"/> +</enum> + <enum name="JumplisticonsfolderCategory" type="int"> <int value="0" label="Del Succeed - Mov Succeed - Create Succeed"/> <int value="1" label="Del Fail - Mov Succeed - Create Succeed"/> @@ -97464,6 +100319,12 @@ <int value="7" label="Del Fail - Mov Fail - Create Fail"/> </enum> +<enum name="JumpListIconsFolderExistOrEmptyCategory" type="int"> + <int value="0" label="Empty"/> + <int value="1" label="Non-Empty"/> + <int value="2" label="Doesn't exist"/> +</enum> + <enum name="JumplistIconsFolderMoveCategory" type="int"> <int value="0" label="Del Succeed - MaxPathCheck Succeed - MoveFileEx Succeed - @@ -97527,6 +100388,7 @@ <int value="3" label="Migration failed twice"/> <int value="4" label="Migration succeeded, Keychain cleaned up"/> <int value="5" label="Partial migration"/> + <int value="6" label="Migration stopped"/> </enum> <enum name="KioskLaunchError" type="int"> @@ -98163,6 +101025,7 @@ <int value="6" label="Menu item (PWA)"/> <int value="7" label="Menu item (standalone)"/> <int value="8" label="Menu item (shortcut)"/> + <int value="9" label="External intent"/> </enum> <enum name="LaunchIntentFlags" type="int"> @@ -98513,6 +101376,14 @@ <int value="23" label="Unnamed"/> </enum> +<enum name="LoadLibraryResultCategory" type="int"> + <int value="0" label="LoadLibraryExW Succeeded"/> + <int value="1" label="LoadLibraryExW Fail, LoadLibraryW Succeeded"/> + <int value="2" label="LoadLibraryExW Fail, LoadLibraryW Fail"/> + <int value="3" label="LoadLibraryExW Unavailable, LoadLibraryW Succeeded"/> + <int value="4" label="LoadLibraryExW Unavailable, LoadLibraryW Fail"/> +</enum> + <enum name="LoadType" type="int"> <int value="0" label="UNDEFINED_LOAD">Not yet initialized</int> <int value="1" label="RELOAD">User pressed reload</int> @@ -98560,7 +101431,8 @@ Values in LoginCustomFlags are: value=(uint32_t)MD5(label). This enum is verified by AboutFlagsHistogramTest unit test. To add a new entry, add it with any unique value and run test to compute valid -value. +value. After that run tools/metrics/histograms/validate_format.py to find out +where the value should be inserted to maintain ordering. Don't remove entries when removing a flag, they are still used to decode data from previous Chrome versions. --> @@ -98585,6 +101457,7 @@ <int value="-2099035488" label="enable-data-reduction-proxy-bypass-warning"/> <int value="-2098610409" label="disable-lcd-text"/> <int value="-2097515669" label="disable-cast"/> + <int value="-2091404586" label="TabStripKeyboardFocus:enabled"/> <int value="-2090484194" label="ContextualSearchUrlActions:disabled"/> <int value="-2083195884" label="enable-firewall-hole-punching"/> <int value="-2082042818" @@ -98618,9 +101491,11 @@ label="enable-search-button-in-omnibox-for-str-or-iip"/> <int value="-1999892428" label="force-ui-direction"/> <int value="-1998927516" label="enable-md-settings"/> + <int value="-1989747818" label="TabStripKeyboardFocus:disabled"/> <int value="-1985025593" label="file-manager-enable-new-gallery"/> <int value="-1980328793" label="trace-upload-url"/> <int value="-1972383451" label="disable-pinch"/> + <int value="-1972312724" label="OfflinePagesLoadSignalCollecting:enabled"/> <int value="-1972219399" label="NTPSaveToOffline:enabled"/> <int value="-1971086581" label="print-scaling"/> <int value="-1963427770" label="EmojiHandwritingVoiceInput:disabled"/> @@ -98632,6 +101507,7 @@ <int value="-1943507605" label="enable-new-video-renderer"/> <int value="-1941852572" label="floating-virtual-keyboard"/> <int value="-1940806558" label="enable-syncfs-directory-operation"/> + <int value="-1940291343" label="SpeculativeResourcePrefetching:enabled"/> <int value="-1938263248" label="enable-extension-info-dialog"/> <int value="-1937077699" label="http-form-warning"/> <int value="-1934673791" label="gl-composited-texture-quad-border"/> @@ -98639,6 +101515,8 @@ <int value="-1928198763" label="enable-async-dns"/> <int value="-1925117279" label="disable-quic-https"/> <int value="-1915854488" label="enable-offline-pages"/> + <int value="-1913801713" + label="UploadCrashReportsUsingJobScheduler:disabled"/> <int value="-1912999136" label="enable-automatic-password-saving:enabled"/> <int value="-1911153473" label="enable-easy-signin"/> <int value="-1907342706" label="ReadItLaterInMenu:disabled"/> @@ -98660,6 +101538,7 @@ <int value="-1867382602" label="WebRTC-H264WithOpenH264FFmpeg:enabled"/> <int value="-1867342522" label="MaterialDesignHistory:enabled"/> <int value="-1861814223" label="MidiManagerDynamicInstantiation:enabled"/> + <int value="-1856902397" label="LoadingWithMojo:enabled"/> <int value="-1849706663" label="enable-password-force-saving:disabled"/> <int value="-1847835522" label="disable-touch-adjustment"/> <int value="-1847776781" @@ -98681,6 +101560,7 @@ <int value="-1772172557" label="enable-osk-overscroll"/> <int value="-1767470652" label="out-of-process-pdf"/> <int value="-1751928267" label="disable-icon-ntp"/> + <int value="-1749176684" label="PauseBackgroundTabs:disabled"/> <int value="-1746767834" label="ssl-interstitial-v2-gray"/> <int value="-1740519217" label="disable-software-rasterizer"/> <int value="-1735643253" label="enable-display-list-2d-canvas"/> @@ -98708,11 +101588,13 @@ <int value="-1660972490" label="gpu-rasterization-msaa-sample-count"/> <int value="-1655535052" label="enable-pointer-events"/> <int value="-1654344175" label="disable-extension-info-dialog"/> + <int value="-1653838003" label="PauseBackgroundTabs:enabled"/> <int value="-1649778035" label="disable-clear-browsing-data-counters"/> <int value="-1648216169" label="NewOmniboxAnswerTypes:disabled"/> <int value="-1634154256" label="ZeroSuggestRedirectToChrome:enabled"/> <int value="-1631329950" label="ssl-version-max"/> <int value="-1630419335" label="enable-download-notification"/> + <int value="-1629748710" label="ash-enable-smooth-screen-rotation"/> <int value="-1624854957" label="enable-es3-apis"/> <int value="-1620568042" label="FeaturePolicy:disabled"/> <int value="-1619757314" label="touch-scrolling-mode"/> @@ -98728,9 +101610,11 @@ <int value="-1583728573" label="AutofillCreditCardSigninPromo:disabled"/> <int value="-1581724231" label="ModalPermissionPrompts:enabled"/> <int value="-1578295753" label="UserMediaScreenCapturing:disabled"/> + <int value="-1575554415" label="AndroidPaymentAppsFilter:enabled"/> <int value="-1572010356" label="enable-privet-v3"/> <int value="-1571841513" label="enable-devtools-experiments"/> <int value="-1559789642" label="RunAllFlashInAllowMode:enabled"/> + <int value="-1557527869" label="LoadingWithMojo:disabled"/> <int value="-1553477903" label="ash-disable-text-filtering-in-overview-mode"/> <int value="-1546903171" label="enable-touch-drag-drop"/> <int value="-1544248549" label="ArcUseAuthEndpoint:enabled"/> @@ -98755,6 +101639,7 @@ <int value="-1473136627" label="enable-web-payments"/> <int value="-1467332609" label="tab-management-experiment-type-anise"/> <int value="-1466990325" label="CrosCompUpdates:enabled"/> + <int value="-1463410070" label="IPH_DemoMode:enabled"/> <int value="-1460462432" label="disable-media-source"/> <int value="-1456004000" label="VrShell:disabled"/> <int value="-1443796945" label="OfflinePagesSharing:disabled"/> @@ -98772,6 +101657,8 @@ <int value="-1399419572" label="enable-app-list"/> <int value="-1396974542" label="UserMediaScreenCapturing:enabled"/> <int value="-1392562498" label="disable-origin-chip"/> + <int value="-1391693054" + label="ContentSuggestionsFaviconsFromNewServer:disabled"/> <int value="-1386966873" label="disable-mac-views-native-app-windows"/> <int value="-1377186702" label="DesktopIOSPromotion:disabled"/> <int value="-1375111024" label="enable-fixed-position-compositing"/> @@ -98779,6 +101666,7 @@ <int value="-1363709707" label="MaterialDesignHistory:disabled"/> <int value="-1358669137" label="enable-supervised-user-blacklist"/> <int value="-1357655121" label="enable-iframe-based-signin"/> + <int value="-1349896789" label="DelayNavigation:enabled"/> <int value="-1349872906" label="disallow-autofill-sync-credential-for-reauth"/> <int value="-1349532167" label="enable-wifi-credential-sync"/> @@ -98793,6 +101681,7 @@ <int value="-1310737697" label="MaterialDesignSettings:enabled"/> <int value="-1302904242" label="enable-navigation-tracing"/> <int value="-1289678848" label="SystemDownloadManager:enabled"/> + <int value="-1289373013" label="ui-show-layer-borders"/> <int value="-1285021473" label="save-page-as-mhtml"/> <int value="-1276912933" label="enable-quick-unlock-pin"/> <int value="-1271563519" label="enable-appcontainer"/> @@ -98815,6 +101704,7 @@ <int value="-1203742042" label="enable-gesture-selection"/> <int value="-1201183153" label="enable-centered-app-list"/> <int value="-1197035323" label="ZeroSuggestRedirectToChrome:disabled"/> + <int value="-1190174011" label="enable-hdr"/> <int value="-1184904651" label="enable-npapi"/> <int value="-1184480269" label="LsdPermissionPrompt:enabled"/> <int value="-1177802205" label="enable-hosted-app-quit-notification"/> @@ -98823,14 +101713,17 @@ <int value="-1176493523" label="enable-md-extensions"/> <int value="-1172572865" label="NTPShowGoogleGInOmnibox:enabled"/> <int value="-1172204005" label="enable-offline-auto-reload-visible-only"/> + <int value="-1162944097" label="enable-color-correct-rendering"/> <int value="-1161409696" label="MediaRemotingEncrypted:enabled"/> <int value="-1160026273" label="enable-web-notification-custom-layouts"/> <int value="-1159563774" label="enable-accessibility-script-injection"/> <int value="-1158993534" label="PrintScaling:enabled"/> + <int value="-1155543191" label="CopylessPaste:disabled"/> <int value="-1151766565" label="enable-fullscreen-tab-detaching"/> <int value="-1137442543" label="enable-slimming-paint"/> <int value="-1136627751" label="ignore-autocomplete-off-autofill"/> <int value="-1136509631" label="ssl-interstitial-v1"/> + <int value="-1132704128" label="AndroidPaymentAppsFilter:disabled"/> <int value="-1127996427" label="enable-files-details-panel"/> <int value="-1125133283" label="disable-threaded-scrolling"/> <int value="-1119700637" label="ui-disable-partial-swap"/> @@ -98844,15 +101737,18 @@ <int value="-1075156797" label="enable-brotli"/> <int value="-1075089382" label="enable-physical-web"/> <int value="-1073479583" label="ShowArcFilesApp:disabled"/> + <int value="-1067635248" label="SpeculativeResourcePrefetching:disabled"/> <int value="-1062119671" label="enable-password-force-saving"/> <int value="-1056310158" label="disable-memory-pressure-chromeos"/> <int value="-1052782474" label="enable-cloud-devices"/> <int value="-1052415111" label="malware-interstitial-v2"/> <int value="-1052219252" label="disable-captive-portal-bypass-proxy"/> <int value="-1045900007" label="NoCreditCardAbort:disabled"/> + <int value="-1045882995" label="UseNewDoodleApi:enabled"/> <int value="-1041650038" label="enable-forced-migration-to-tabbed-mode"/> <int value="-1039889738" label="NativeNotifications:enabled"/> <int value="-1039555838" label="GamepadExtensions:enabled"/> + <int value="-1034344165" label="V8NoTurbo:disabled"/> <int value="-1033738911" label="enable-mac-views-dialogs"/> <int value="-1028733699" label="MacViewsWebUIDialogs:disabled"/> <int value="-1022971520" label="enable-search-button-in-omnibox-for-str"/> @@ -98877,11 +101773,13 @@ <int value="-945806012" label="DownloadsUi:enabled"/> <int value="-938178614" label="enable-suggestions-with-substring-match"/> <int value="-933316841" label="enable-permissions-blacklist"/> + <int value="-928138978" label="IPH_DemoMode:disabled"/> <int value="-926422468" label="disable-embedded-shared-worker"/> <int value="-918900957" label="AutofillCreditCardAssist:disabled"/> <int value="-918618075" label="enable-service-worker"/> <int value="-914210146" label="enable-web-based-signin"/> <int value="-912456561" label="MidiManagerWinrt:enabled"/> + <int value="-909641013" label="DataReductionProxySiteBreakdown:enabled"/> <int value="-908421850" label="PointerEvent:enabled"/> <int value="-907234795" label="NewAudioRenderingMixingStrategy:disabled"/> <int value="-899334103" label="disable-fast-text-autosizing"/> @@ -98917,7 +101815,9 @@ <int value="-802348444" label="disable-site-engagement-service"/> <int value="-798187384" label="try-supported-channel-layouts"/> <int value="-795600188" label="disable-async-dns"/> + <int value="-790036192" label="overscroll-start-threshold"/> <int value="-780798969" label="disable-single-click-autofill"/> + <int value="-775321548" label="UseNewDoodleApi:disabled"/> <int value="-770319039" label="enable-touch-editing"/> <int value="-763759697" label="enable-audio-support-for-desktop-share"/> <int value="-759830869" label="enable-tab-discarding"/> @@ -98952,6 +101852,8 @@ <int value="-610411643" label="enable-printer-app-search"/> <int value="-606898702" label="MaterialDesignSettings:disabled"/> <int value="-604814313" label="enable-pinch"/> + <int value="-604269405" + label="ContentSuggestionsFaviconsFromNewServer:enabled"/> <int value="-604068396" label="disable-input-ime-api"/> <int value="-601384286" label="disable-contextual-search"/> <int value="-598050737" label="disable-es3-apis"/> @@ -98962,6 +101864,7 @@ <int value="-562274241" label="enable-extension-action-redesign"/> <int value="-560551550" label="use-memory-pressure-chromeos"/> <int value="-548082154" label="protect-sync-credential:disabled"/> + <int value="-541611402" label="OfflinePagesPrefetching:enabled"/> <int value="-536289234" label="ssl-interstitial-v2-colorful"/> <int value="-535208779" label="enable-native-cups"/> <int value="-531810064" label="saveas-menu-label"/> @@ -98981,6 +101884,7 @@ <int value="-488779992" label="blink-settings"/> <int value="-478462945" label="enable-ephemeral-apps"/> <int value="-475049740" label="disable-vr-shell"/> + <int value="-474806100" label="DataReductionProxyMainMenu:enabled"/> <int value="-474322576" label="disable-quick-unlock-pin"/> <int value="-472013317" label="WebRTC-H264WithOpenH264FFmpeg:disabled"/> <int value="-462205750" label="enable-service-worker-sync"/> @@ -98992,7 +101896,9 @@ <int value="-428599163" label="NTPDownloadSuggestions:enabled"/> <int value="-418868128" label="enable-experimental-web-platform-features"/> <int value="-410852857" label="ImprovedA2HS:disabled"/> + <int value="-405380243" label="enable-encryption-migration"/> <int value="-396994784" label="enable-vr-shell"/> + <int value="-396496344" label="ViewsTaskManager:enabled"/> <int value="-395606844" label="enable-site-settings"/> <int value="-387606010" label="ArcBootCompletedBroadcast:enabled"/> <int value="-385337473" label="enable-fast-unload"/> @@ -99000,6 +101906,7 @@ <int value="-378180863" label="disable-panels"/> <int value="-378033324" label="disable-win32k-renderer-lockdown"/> <int value="-364325011" label="enable-files-quick-view"/> + <int value="-364267715" label="disable-native-cups"/> <int value="-362022976" label="disable-quirks-client"/> <int value="-361948582" label="material-security-verbose"/> <int value="-360038744" label="invert-viewport-scroll-order"/> @@ -99034,12 +101941,15 @@ <int value="-277144896" label="enable-viewport-meta"/> <int value="-268357961" label="enable-feature-policy"/> <int value="-254887599" label="google-profile-info"/> + <int value="-250721831" label="AndroidAutofillAccessibility:disabled"/> <int value="-241353344" label="MidiManagerWinrt:disabled"/> <int value="-234966279" label="PointerEvent:disabled"/> <int value="-234687894" label="NonValidatingReloadOnRefreshContentV2:disabled"/> <int value="-231922000" label="enable-renderer-mojo-channel"/> + <int value="-216219963" label="ash-shelf-color-scheme"/> <int value="-213518852" label="protect-sync-credential:enabled"/> + <int value="-213214894" label="enable-chromevox-arc-support"/> <int value="-206393363" label="enable-scroll-prediction"/> <int value="-204355195" label="secondary-ui-md"/> <int value="-202007318" label="AndroidAIAFetching:enabled"/> @@ -99067,6 +101977,7 @@ <int value="-86788587" label="allow-autofill-sync-credential"/> <int value="-80353187" label="disable-display-color-calibration"/> <int value="-78035185" label="custom_summary"/> + <int value="-77872983" label="BookmarkAppsMac:disabled"/> <int value="-76631048" label="disable-offline-auto-reload-visible-only"/> <int value="-70595606" label="ash-enable-unified-desktop"/> <int value="-68877684" label="BackgroundVideoTrackOptimization:enabled"/> @@ -99079,6 +101990,7 @@ <int value="-48920737" label="enable-smooth-scrolling"/> <int value="-45532639" label="enable-default-media-session"/> <int value="-45074716" label="SystemDownloadManager:disabled"/> + <int value="-29847483" label="MemoryAblation:enabled"/> <int value="-23090520" label="disable-search-button-in-omnibox"/> <int value="-22544408" label="enable-video-player-chromecast-support"/> <int value="-16824589" label="ash-shelf-color"/> @@ -99095,6 +102007,7 @@ <int value="10458238" label="disable-print-preview-simplify"/> <int value="11698808" label="enable-dom-distiller-button-animation"/> <int value="27507364" label="apps-keep-chrome-alive"/> + <int value="31848187" label="ViewsTaskManager:disabled"/> <int value="33778663" label="OriginTrials:enabled"/> <int value="37024318" label="disable-affiliation-based-matching"/> <int value="44088203" label="ExpensiveBackgroundTimerThrottling:enabled"/> @@ -99137,6 +102050,7 @@ <int value="262382944" label="GuestViewCrossProcessFrames:disabled"/> <int value="266702296" label="disable-plugin-power-saver"/> <int value="270267831" label="enable-scripts-require-action"/> + <int value="272631627" label="BookmarkAppsMac:enabled"/> <int value="274103741" label="enable-ntp-popular-sites"/> <int value="278756320" label="disable-app-list-app-info"/> <int value="280644887" label="mash"/> @@ -99165,6 +102079,7 @@ <int value="379428799" label="security-chip-animation"/> <int value="385969127" label="disable-win32k-lockdown"/> <int value="387178525" label="VideoFullscreenOrientationLock:enabled"/> + <int value="388996324" label="CustomContextMenu:disabled"/> <int value="400322063" label="ash-disable-screen-orientation-lock"/> <int value="401983950" label="enable-spdy4"/> <int value="402143634" label="enable-search-button-in-omnibox-always"/> @@ -99182,6 +102097,7 @@ <int value="431691805" label="MediaDocumentDownloadButton:enabled"/> <int value="446316019" label="enable-threaded-compositing"/> <int value="451196246" label="disable-impl-side-painting"/> + <int value="453102772" label="OfflinePagesLoadSignalCollecting:disabled"/> <int value="455698038" label="disable-gesture-requirement-for-media-playback"/> <int value="457881889" label="enable-autoplay-muted-videos"/> @@ -99228,18 +102144,22 @@ <int value="624368375" label="OmniboxEntitySuggestions:enabled"/> <int value="625273056" label="disable-boot-animation"/> <int value="628302973" label="NTPSnippets:enabled"/> + <int value="628570445" label="AndroidAutofillAccessibility:enabled"/> <int value="630947363" label="touch-events"/> <int value="635971109" label="PrintPdfAsImage:disabled"/> <int value="636425179" label="mhtml-generator-option"/> <int value="637396292" label="AllBookmarks:enabled"/> <int value="643725031" label="disable-touch-feedback"/> <int value="644189071" label="PermissionsBlacklist:enabled"/> + <int value="644674603" label="DataReductionProxySiteBreakdown:disabled"/> <int value="646252875" label="ReadItLaterInMenu:enabled"/> <int value="646738320" label="disable-gesture-editing"/> <int value="650602639" label="enable-autofill-keyboard-accessory-view"/> + <int value="652561231" label="CustomContextMenu:enabled"/> <int value="683410401" label="enable-proximity-auth-bluetooth-low-energy-discovery"/> <int value="684806628" label="TranslateLanguageByULP:disabled"/> + <int value="685916283" label="enable-zip-archiver-on-file-manager"/> <int value="689489984" label="disable-zero-suggest"/> <int value="690185633" label="NonValidatingReloadOnNormalReload:disabled"/> <int value="691020108" label="NTPCondensedTileLayout:disabled"/> @@ -99276,6 +102196,7 @@ <int value="835018878" label="disable-quic"/> <int value="838887742" label="manual-enhanced-bookmarks"/> <int value="841343322" label="disable-new-korean-ime"/> + <int value="846951416" label="CopylessPaste:enabled"/> <int value="851085848" label="enable-settings-window"/> <int value="854730848" label="disable-app-info-dialog-mac"/> <int value="855746780" label="disable-physical-keyboard-autocorrect"/> @@ -99288,10 +102209,12 @@ <int value="880510010" label="enable-permissions-bubbles"/> <int value="884106779" label="supervised-user-safesites"/> <int value="887011602" label="enable-spelling-auto-correct"/> + <int value="902608487" label="AutofillUpstreamRequestCvcIfMissing:enabled"/> <int value="903267263" label="disable-offline-pages"/> <int value="908523940" label="PassiveEventListenersDueToFling:disabled"/> <int value="909439558" label="disable-device-discovery"/> <int value="916316159" label="disable-new-app-list-mixer"/> + <int value="926852901" label="DataReductionProxyMainMenu:disabled"/> <int value="929462705" label="disable-link-disambiguation-popup"/> <int value="935655516" label="password-import-export:disabled"/> <int value="936341613" label="OfflinePagesCT:disabled"/> @@ -99299,6 +102222,7 @@ <int value="938191241" label="VrShell:enabled"/> <int value="939554480" label="enable-credit-card-scan"/> <int value="939603162" label="BackgroundLoadingForDownloads:disabled"/> + <int value="941036016" label="ContentSuggestionsSettings:disabled"/> <int value="943319566" label="enable-intent-picker"/> <int value="952558794" label="enable-remote-assistance"/> <int value="980396200" label="enable-new-korean-ime"/> @@ -99316,6 +102240,7 @@ <int value="1033597574" label="disable-layer-squashing"/> <int value="1036068554" label="enable-android-pay-integration-v2"/> <int value="1043334401" label="disable-slimming-paint-invalidation"/> + <int value="1049885154" label="OfflinePagesPrefetching:disabled"/> <int value="1050048304" label="enable-font-cache-scaling"/> <int value="1050321458" label="new-profile-management"/> <int value="1054910800" label="enable-timezone-tracking-option"/> @@ -99367,6 +102292,7 @@ <int value="1205849612" label="enable-sync-synced-notifications"/> <int value="1209221384" label="enable-experimental-accessibility-features"/> <int value="1210343926" label="enable-drop-sync-credential"/> + <int value="1211284676" label="V8NoTurbo:enabled"/> <int value="1219628795" label="PrintScaling:disabled"/> <int value="1219826373" label="ServiceWorkerNavigationPreload:enabled"/> <int value="1220171692" label="SpeculativeLaunchServiceWorker:enabled"/> @@ -99388,6 +102314,7 @@ <int value="1276209777" label="ntp-switch-to-existing-tab"/> <int value="1279584261" label="enable-carrier-switching"/> <int value="1280614081" label="show-overdraw-feedback"/> + <int value="1283956865" label="force-tablet-mode"/> <int value="1283960113" label="disable-fixed-position-compositing"/> <int value="1291257442" label="TabsInCBD:disabled"/> <int value="1291966558" label="ScrollAnchoring:disabled"/> @@ -99430,8 +102357,10 @@ <int value="1416592483" label="ash-enable-mirrored-screen"/> <int value="1418054870" label="SpecialLocale:enabled"/> <int value="1421620678" label="simple-clear-browsing-data-support-string"/> + <int value="1435018419" label="AutofillUpstreamRequestCvcIfMissing:disabled"/> <int value="1441897340" label="AndroidSpellCheckerNonLowEnd:enabled"/> <int value="1442798825" label="enable-quic"/> + <int value="1442830837" label="MemoryAblation:disabled"/> <int value="1454363479" label="disable-storage-manager"/> <int value="1458583431" label="arc-use-auth-endpoint"/> <int value="1459529277" label="disable-text-input-focus-manager"/> @@ -99439,6 +102368,7 @@ <int value="1460958818" label="NTPForeignSessionsSuggestions:enabled"/> <int value="1465624446" label="disable-zero-copy"/> <int value="1466380480" label="enable-device-discovery-notifications"/> + <int value="1466502102" label="DelayNavigation:disabled"/> <int value="1469407485" label="disable-accelerated-2d-canvas"/> <int value="1479248574" label="disable-voice-input"/> <int value="1481562816" label="disable-password-link"/> @@ -99447,6 +102377,7 @@ <int value="1490043732" label="enable-fill-on-account-select"/> <int value="1490255042" label="enable-overlay-scrollbar"/> <int value="1495341532" label="disable-mtp-write-support"/> + <int value="1496135626" label="UploadCrashReportsUsingJobScheduler:enabled"/> <int value="1496571153" label="enable-webapk"/> <int value="1497924954" label="js-flags"/> <int value="1499163193" label="PostScriptPrinting:disabled"/> @@ -99464,6 +102395,8 @@ <int value="1579461102" label="MemoryCoordinator:disabled"/> <int value="1586022426" label="AutofillCreditCardAssist:enabled"/> <int value="1589341623" label="disable-easy-unlock"/> + <int value="1594247626" label="ContentSuggestionsSettings:enabled"/> + <int value="1605611615" label="enable-webrtc-srtp-aes-gcm"/> <int value="1612446645" label="enable-weak-memorycache"/> <int value="1612871297" label="WebPayments:disabled"/> <int value="1612974229" label="allow-insecure-localhost"/> @@ -99544,6 +102477,7 @@ <int value="1906942630" label="enable-easy-unlock"/> <int value="1915178511" label="disable-blink-features"/> <int value="1927259098" label="TranslateLanguageByULP:enabled"/> + <int value="1928407249" label="NewPhotoPicker:enabled"/> <int value="1930901873" label="disable-sync-app-list"/> <int value="1931309368" label="fill-on-account-select:disabled"/> <int value="1939413645" label="enable-invalid-cert-collection"/> @@ -99553,6 +102487,7 @@ <int value="1951466218" label="enable-data-reduction-proxy-lite-page"/> <int value="1955677113" label="trace-export-events-to-etw"/> <int value="1958387645" label="ScanCardsInWebPayments:enabled"/> + <int value="1960169775" label="NewPhotoPicker:disabled"/> <int value="1961425320" label="force-qtkit"/> <int value="1964816410" label="AndroidPayIntegrationV2:enabled"/> <int value="1966730288" label="disable-threaded-compositing"/> @@ -100383,7 +103318,7 @@ <int value="516" label="font-display"/> <int value="517" label="contain"/> <int value="518" label="d"/> - <int value="519" label="snap-height"/> + <int value="519" label="line-height-step"/> <int value="520" label="break-after"/> <int value="521" label="break-before"/> <int value="522" label="break-inside"/> @@ -100420,7 +103355,10 @@ <int value="553" label="min-block-size"/> <int value="554" label="max-inline-size"/> <int value="555" label="max-block-size"/> - <int value="556" label="line-break"/> + <int value="556" label="alias-line-break"/> + <int value="557" label="place-content"/> + <int value="558" label="place-items"/> + <int value="559" label="transform-box"/> </enum> <enum name="MappedEditingCommands" type="int"> @@ -100802,6 +103740,7 @@ <int value="15" label="EnableMdnsDiscovery"/> <int value="16" label="UpdateMediaSinks"/> <int value="17" label="SearchSinks"/> + <int value="18" label="ProvideSinks"/> </enum> <enum name="MediaRouteProviderWakeup" type="int"> @@ -100866,6 +103805,18 @@ <int value="4" label="System Transient Duck"/> </enum> +<enum name="MediaSessionUserAction" type="int"> + <int value="0" label="Play"/> + <int value="1" label="Play (default handler)"/> + <int value="2" label="Pause"/> + <int value="3" label="Pause (default handler)"/> + <int value="4" label="Stop (default handler)"/> + <int value="5" label="Previous track"/> + <int value="6" label="Next track"/> + <int value="7" label="Seek backward"/> + <int value="8" label="Seek forward"/> +</enum> + <enum name="MediaStreamRequestResult" type="int"> <int value="0" label="Ok"/> <int value="1" label="Permission Denied"/> @@ -100888,6 +103839,149 @@ <int value="2" label="Pending Media Tracks"/> </enum> +<enum name="MediaTimelineAbsTimeDelta" type="int"> + <int value="0" label="[0, 1ms)"/> + <int value="1" label="[1ms, 16ms)"/> + <int value="2" label="[16ms, 32ms)"/> + <int value="3" label="[32ms, 64ms)"/> + <int value="4" label="[64ms, 128ms)"/> + <int value="5" label="[128ms, 256ms)"/> + <int value="6" label="[256ms, 512ms)"/> + <int value="7" label="[512ms, 1s)"/> + <int value="8" label="[1s, 2s)"/> + <int value="9" label="[2s, 4s)"/> + <int value="10" label="[4s, 8s)"/> + <int value="11" label="[8s, 15s)"/> + <int value="12" label="[15s, 30s)"/> + <int value="13" label="[30s, 1m)"/> + <int value="14" label="[1m, 2m)"/> + <int value="15" label="[2m, 4m)"/> + <int value="16" label="[4m, 8m)"/> + <int value="17" label="[8m, 15m)"/> + <int value="18" label="[15m, 30m)"/> + <int value="19" label="[30m, 1h)"/> + <int value="20" label="[1h, 2h)"/> + <int value="21" label="[2h, 4h)"/> + <int value="22" label="[4h, 8h)"/> + <int value="23" label="[8h, 16h)"/> + <int value="24" label="[16h, inf)"/> +</enum> + +<enum name="MediaTimelinePercent" type="int"> + <int value="0" label="[-100.0%, -90.0%]"/> + <int value="1" label="(-90.0%, -80.0%]"/> + <int value="2" label="(-80.0%, -70.0%]"/> + <int value="3" label="(-70.0%, -60.0%]"/> + <int value="4" label="(-60.0%, -50.0%]"/> + <int value="5" label="(-50.0%, -45.0%]"/> + <int value="6" label="(-45.0%, -40.0%]"/> + <int value="7" label="(-40.0%, -35.0%]"/> + <int value="8" label="(-35.0%, -30.0%]"/> + <int value="9" label="(-30.0%, -25.0%]"/> + <int value="10" label="(-25.0%, -20.0%]"/> + <int value="11" label="(-20.0%, -15.0%]"/> + <int value="12" label="(-15.0%, -10.0%]"/> + <int value="13" label="(-10.0%, -7.0%]"/> + <int value="14" label="(-7.0%, -5.0%]"/> + <int value="15" label="(-5.0%, -3.0%]"/> + <int value="16" label="(-3.0%, -2.0%]"/> + <int value="17" label="(-2.0%, -1.5%]"/> + <int value="18" label="(-1.5%, -1.0%]"/> + <int value="19" label="(-1.0%, -0.7%]"/> + <int value="20" label="(-0.7%, -0.5%]"/> + <int value="21" label="(-0.5%, -0.3%]"/> + <int value="22" label="(-0.3%, -0.2%]"/> + <int value="23" label="(-0.2%, -0.1%]"/> + <int value="24" label="(-0.1%, 0%)"/> + <int value="25" label="[0%, 0%]"/> + <int value="26" label="(0%, 0.1%)"/> + <int value="27" label="[0.1%, 0.2%)"/> + <int value="28" label="[0.2%, 0.3%)"/> + <int value="29" label="[0.3%, 0.5%)"/> + <int value="30" label="[0.5%, 0.7%)"/> + <int value="31" label="[0.7%, 1.0%)"/> + <int value="32" label="[1.0%, 1.5%)"/> + <int value="33" label="[1.5%, 2.0%)"/> + <int value="34" label="[2.0%, 3.0%)"/> + <int value="35" label="[3.0%, 5.0%)"/> + <int value="36" label="[5.0%, 7.0%)"/> + <int value="37" label="[7.0%, 10.0%)"/> + <int value="38" label="[10.0%, 15.0%)"/> + <int value="39" label="[15.0%, 20.0%)"/> + <int value="40" label="[20.0%, 25.0%)"/> + <int value="41" label="[25.0%, 30.0%)"/> + <int value="42" label="[30.0%, 35.0%)"/> + <int value="43" label="[35.0%, 40.0%)"/> + <int value="44" label="[40.0%, 45.0%)"/> + <int value="45" label="[45.0%, 50.0%)"/> + <int value="46" label="[50.0%, 60.0%)"/> + <int value="47" label="[60.0%, 70.0%)"/> + <int value="48" label="[70.0%, 80.0%)"/> + <int value="49" label="[80.0%, 90.0%)"/> + <int value="50" label="[90.0%, 100.0%]"/> +</enum> + +<enum name="MediaTimelineSeekType" type="int"> + <int value="0" label="Click"/> + <int value="1" label="Drag from current position"/> + <int value="2" label="Drag from elsewhere"/> + <int value="3" label="Keyboard arrow key"/> + <int value="4" label="Keyboard page up/down key"/> + <int value="5" label="Keyboard home/end key"/> +</enum> + +<enum name="MediaTimelineTimeDelta" type="int"> + <int value="0" label="(-inf, -16h]"/> + <int value="1" label="(-16h, -8h]"/> + <int value="2" label="(-8h, -4h]"/> + <int value="3" label="(-4h, -2h]"/> + <int value="4" label="(-2h, -1h]"/> + <int value="5" label="(-1h, -30m]"/> + <int value="6" label="(-30m, -15m]"/> + <int value="7" label="(-15m, -8m]"/> + <int value="8" label="(-8m, -4m]"/> + <int value="9" label="(-4m, -2m]"/> + <int value="10" label="(-2m, -1m]"/> + <int value="11" label="(-1m, -30s]"/> + <int value="12" label="(-30s, -15s]"/> + <int value="13" label="(-15s, -8s]"/> + <int value="14" label="(-8s, -4s]"/> + <int value="15" label="(-4s, -2s]"/> + <int value="16" label="(-2s, -1s]"/> + <int value="17" label="(-1s, -512ms]"/> + <int value="18" label="(-512ms, -256ms]"/> + <int value="19" label="(-256ms, -128ms]"/> + <int value="20" label="(-128ms, -64ms]"/> + <int value="21" label="(-64ms, -32ms]"/> + <int value="22" label="(-32ms, -16ms]"/> + <int value="23" label="(-16ms, 0)"/> + <int value="24" label="[0, 0]"/> + <int value="25" label="(0, 16ms)"/> + <int value="26" label="[16ms, 32ms)"/> + <int value="27" label="[32ms, 64ms)"/> + <int value="28" label="[64ms, 128ms)"/> + <int value="29" label="[128ms, 256ms)"/> + <int value="30" label="[256ms, 512ms)"/> + <int value="31" label="[512ms, 1s)"/> + <int value="32" label="[1s, 2s)"/> + <int value="33" label="[2s, 4s)"/> + <int value="34" label="[4s, 8s)"/> + <int value="35" label="[8s, 15s)"/> + <int value="36" label="[15s, 30s)"/> + <int value="37" label="[30s, 1m)"/> + <int value="38" label="[1m, 2m)"/> + <int value="39" label="[2m, 4m)"/> + <int value="40" label="[4m, 8m)"/> + <int value="41" label="[8m, 15m)"/> + <int value="42" label="[15m, 30m)"/> + <int value="43" label="[30m, 1h)"/> + <int value="44" label="[1h, 2h)"/> + <int value="45" label="[2h, 4h)"/> + <int value="46" label="[4h, 8h)"/> + <int value="47" label="[8h, 16h)"/> + <int value="48" label="[16h, inf)"/> +</enum> + <enum name="MediaTypePredictionResult" type="int"> <int value="0" label="All correct"/> <int value="1" label="All incorrect"/> @@ -101152,29 +104246,6 @@ <int value="11" label="11"/> </enum> -<enum name="MostVisitedTileType" type="int"> - <summary>The visual type of a most visited tile on the new tab page.</summary> - <int value="0" label="None">The icon or thumbnail hasn't loaded yet.</int> - <int value="1" label="IconReal"> - The item displays a site's actual favicon or touch icon. - </int> - <int value="2" label="IconColor"> - The item displays a color derived from the site's favicon or touch icon. - </int> - <int value="3" label="IconDefault"> - The item displays a default gray box in place of an icon. - </int> - <int value="4" label="ThumbnailLocal"> - The item displays a locally-captured thumbnail of the site content. - </int> - <int value="5" label="ThumbnailServer"> - The item displays a server-provided thumbnail of the site content. - </int> - <int value="6" label="ThumbnailDefault"> - The item displays a default graphic in place of a thumbnail. - </int> -</enum> - <enum name="MotionEventToolType" type="int"> <summary>The type of tool that triggers a pointer-type MotionEvent.</summary> <int value="0" label="Unknown">Unknown tool type.</int> @@ -101682,6 +104753,8 @@ <int value="171" label="CT_CONSISTENCY_PROOF_PARSING_FAILED"/> <int value="172" label="SSL_OBSOLETE_CIPHER"/> <int value="173" label="WS_UPGRADE"/> + <int value="174" label="READ_IF_READY_NOT_IMPLEMENTED"/> + <int value="175" label="SSL_VERSION_INTERFERENCE"/> <int value="200" label="CERT_COMMON_NAME_INVALID"/> <int value="201" label="CERT_DATE_INVALID"/> <int value="202" label="CERT_AUTHORITY_INVALID"/> @@ -101868,6 +104941,17 @@ <int value="5" label="SDCHPossible"/> <int value="6" label="Invalid"/> <int value="7" label="None"/> + <int value="8" label="Rejected"> + Unlike other values, this one is reported from HttpNetworkTransaction in a + case when an unadvertised, but known encoding appears in a + "Content-Encoding" header, and is thus not comparable with the + other values, which are potentially returned from cached entries. + </int> + <int value="9" label="Unknown"> + Reported from URLRequestHttpJob::SetUpSourceStream when an unknown encoding + appears in a "Content-Encoding" header. Despite being reported in + this histogram, this does not cause a CONTENT_DECODING_FAILED error. + </int> </enum> <enum name="NetInternalsUiFeature" type="int"> @@ -102207,6 +105291,11 @@ <int value="6" label="Channel Type Change"/> </enum> +<enum name="NetworkQuietStatus" type="int"> + <int value="0" label="Had network 0-quiet for 0.5 seconds"/> + <int value="1" label="Had network 2-quiet for 2 seconds"/> +</enum> + <enum name="NetworkSecurityType" type="int"> <summary> The security types come from the connman_service_security enum in @@ -102573,6 +105662,7 @@ <int value="6" label="Error in obtaining oauth access token"/> <int value="7" label="Out of interactive quota - deprecated"/> <int value="8" label="Out of non-interactive quota - deprecated"/> + <int value="9" label="No API key available"/> </enum> <enum name="NTPSnippetsState" type="int"> @@ -102604,6 +105694,37 @@ <int value="3" label="Too few URLs, didn't flip tiles 1 and 4"/> </enum> +<enum name="NTPTileVisualType" type="int"> + <summary>The visual type of a most visited tile on the new tab page.</summary> + <int value="0" label="None">The icon or thumbnail hasn't loaded yet.</int> + <int value="1" label="IconReal"> + The item displays a site's actual favicon or touch icon. + </int> + <int value="2" label="IconColor"> + The item displays a color derived from the site's favicon or touch icon. + </int> + <int value="3" label="IconDefault"> + The item displays a default gray box in place of an icon. + </int> + <int value="4" label="DeprecatedThumbnailLocal"> + Deprecated: The item displays a locally-captured thumbnail of the site + content. + </int> + <int value="5" label="DeprecatedThumbnailServer"> + Deprecated: The item displays a server-provided thumbnail of the site + content. + </int> + <int value="6" label="DeprecatedThumbnailDefault"> + Deprecated: The item displays a default graphic in place of a thumbnail. + </int> + <int value="7" label="Thumbnail"> + The item displays a thumbnail of the page. + </int> + <int value="8" label="ThumbnailFailed"> + The item displays a default gray box in place of a thumbnail. + </int> +</enum> + <enum name="NTSTATUS" type="int"> <int value="-1073741818" label="0xC0000006 - STATUS_IN_PAGE_ERROR"/> <int value="-1073741808" label="0xC0000010 - STATUS_INVALID_DEVICE_REQUEST"/> @@ -102621,6 +105742,15 @@ <int value="0" label="0x00000000 - STATUS_SUCCESS"/> </enum> +<enum name="NullableBoolean" type="int"> + <summary> + A Nullable Boolean can True, False or Null (ie: unset or absent). + </summary> + <int value="0" label="False"/> + <int value="1" label="True"/> + <int value="2" label="Null"/> +</enum> + <enum name="OAuth2LoginAccountRevokedMigrationState" type="int"> <int value="0" label="Account ID migration not started"/> <int value="1" label="Account ID migration in progress"/> @@ -102682,6 +105812,21 @@ <int value="12" label="Loading not accepted"/> <int value="13" label="Queue update failed"/> <int value="14" label="Background scheduler canceled processing"/> + <int value="15" label="Saved after timeout on last retry"/> +</enum> + +<enum name="OfflinePagesBackgroundSavePageResult" type="int"> +<!-- Generated from components/offline_pages/core/background/request_notifier.h --> + + <int value="0" label="Success"/> + <int value="1" label="Loading failure"/> + <int value="2" label="Loading canceled"/> + <int value="3" label="Foreground canceled"/> + <int value="4" label="Save failed"/> + <int value="5" label="Expired"/> + <int value="6" label="Retry count exceeded"/> + <int value="7" label="Start count exceeded"/> + <int value="8" label="Removed"/> </enum> <enum name="OfflinePagesCctApiPrerenderAllowedStatus" type="int"> @@ -102746,6 +105891,8 @@ <int value="6" label="Already exists"/> <int value="7" label="Skipped"/> <int value="8" label="Security certificate error"/> + <int value="9" label="Error page detected"/> + <int value="10" label="Interstitial page detected"/> </enum> <enum name="OfflinePagesSharedPageWasOffline" type="int"> @@ -102753,6 +105900,55 @@ <int value="1" label="Offline"/> </enum> +<enum name="OfflinePagesTabRestoreType" type="int"> + <int value="0" label="While online"> + Tab was successfully restored while the device was online. Can help assess + the potential benefit of allowing loading from offline pages even when the + device is online. + </int> + <int value="1" label="While online, can't be saved for offline usage"> + Tab was successfully restored while the device was online but in a context + that wouldn't allow it to be saved as an offline page: not HTTP/HTTPS or in + an incognito tab. + </int> + <int value="2" label="While online, to an offline page"> + Tab was successfully restored to a non-last_n offline page while the device + was online. This will happen when a tab is specifically loading a downloaded + offline page. + </int> + <int value="3" label="While online, to an offline page saved by last_n"> + Tab was successfully restored to a last_n offline page while the device was + online. This will only happen if/when loading of last_n pages is allowed in + online situations. + </int> + <int value="4" label="While offline"> + Tab was successfully restored while the device was offline. The page was + most probably loaded from cache without revalidation. + </int> + <int value="5" label="While offline, can't be saved for offline usage"> + Tab was successfully restored while the device was offline but in a context + that wouldn't have allowed it to be saved as an offline page: not HTTP/HTTPS + or in an incognito tab. This includes tab restores to the NTP or other + chrome: pages. + </int> + <int value="6" label="While offline, to an offline page"> + Tab was successfully restored to a non-last_n offline page while the device + was offline. This will happen when a tab had an associated offline page that + was not saved by last_n. + </int> + <int value="7" label="While offline, to an offline page saved by last_n"> + Tab was successfully restored to a last_n offline page while the device was + offline. + </int> + <int value="8" label="Failed"> + Tab failed being restored and an error page was presented. This represents + any kind of failure and not only dino pages. + </int> + <int value="9" label="Crashed"> + The tab's renderer process crashed while it was being restored. + </int> +</enum> + <enum name="OfflineStatus" type="int"> <obsolete> Deprecated 4/2015. @@ -102785,6 +105981,8 @@ <int value="2" label="via space in middle"/> <int value="3" label="keyboard shortcut"/> <int value="4" label="question mark"/> + <int value="5" label="mouse click on hint view"/> + <int value="6" label="tap gesture on hint view"/> </enum> <enum name="OmniboxInputType" type="int"> @@ -103082,6 +106280,7 @@ <int value="6" label="Malformed"/> <int value="7" label="WrongVersion"/> <int value="8" label="FeatureDisabled"/> + <int value="9" label="TokenDisabled"/> </enum> <enum name="OSAgnosticErrno" type="int"> @@ -103296,10 +106495,14 @@ touchpad vs. touch screen). </summary> <int value="0" label="None">Did not scroll</int> - <int value="1" label="Forward">Scrolled forward using touchpad</int> - <int value="2" label="Back">Scrolled back using touchpad</int> - <int value="3" label="Forward">Scrolled forward using touch screen</int> - <int value="4" label="Back">Scrolled back using touch screen</int> + <int value="1" label="Forward Touchpad">Scrolled forward using touchpad</int> + <int value="2" label="Back Touchpad">Scrolled back using touchpad</int> + <int value="3" label="Forward Touch Screen"> + Scrolled forward using touch screen + </int> + <int value="4" label="Back Touch Screen"> + Scrolled back using touch screen + </int> </enum> <enum name="P2PLookupResult" type="int"> @@ -103348,6 +106551,30 @@ <int value="5" label="Successful first layout (backgrounded)"/> </enum> +<enum name="PageLoadTimingStatus" type="int"> + <summary>Status of PageLoadTimings received from the render process</summary> + <int value="0" label="Valid"/> + <int value="1" label="Empty timing"/> + <int value="2" label="Null navigation start"/> + <int value="3" label="Script load longer than parse duration"/> + <int value="4" label="Script execution longer than parse duration"/> + <int value="5" + label="Script load from doc.write longer than total script load"/> + <int value="6" + label="Script execution from doc.write longer than total script + execution"/> + <int value="7" label="Invalid order - response start / parse start"/> + <int value="8" label="Invalid order - parse start / parse stop"/> + <int value="9" label="Invalid order - parse stop / dom content loaded"/> + <int value="10" label="Invalid order - dom content loaded / load"/> + <int value="11" label="Invalid order - parse start / first layout"/> + <int value="12" label="Invalid order - first layout / first paint"/> + <int value="13" label="Invalid order - first paint / first text paint"/> + <int value="14" label="Invalid order - first paint / first image paint"/> + <int value="15" label="Invalid order - first paint / first contentful paint"/> + <int value="16" label="Invalid order - first paint / first meaningful paint"/> +</enum> + <enum name="PageScaleFactorRange" type="int"> <int value="0" label="<25%"/> <int value="1" label="25-49%"/> @@ -103526,6 +106753,18 @@ <int value="1" label="HRTF"/> </enum> +<enum name="ParallelDownloadCreationEvent" type="int"> + <int value="0" label="Parallel download started"/> + <int value="1" label="Fall back to normal download"/> + <int value="2" label="No strong validators response headers"/> + <int value="3" label="No accept range header"/> + <int value="4" label="No content length header"/> + <int value="5" label="File size does not meet the requirement."/> + <int value="6" label="HTTP connection type mismatch."/> + <int value="7" + label="Remaining download time does not meet the requirement."/> +</enum> + <enum name="ParsedCookieStatus" type="int"> <obsolete> Deprecated as of 9/2013. Experiment to measure control characters in cookies @@ -104145,6 +107384,28 @@ <int value="12" label="Clicked the link passwords.google.com"/> </enum> +<enum name="PasswordProtectionRequestOutcome" type="int"> + <int value="0" label="Unknown"/> + <int value="1" label="Succeeded"/> + <int value="2" label="Canceled"/> + <int value="3" label="Timed out"/> + <int value="4" label="Matched whitelist"/> + <int value="5" label="Response already cached"/> + <int value="6" label="Not extended reporting user"/> + <int value="7" label="Incognito"/> + <int value="8" label="Request malformed"/> + <int value="9" label="Fetch failed"/> + <int value="10" label="Response malformed"/> + <int value="11" label="Service destroyed"/> +</enum> + +<enum name="PasswordProtectionVerdict" type="int"> + <int value="0" label="Verdict not specified"/> + <int value="1" label="Safe"/> + <int value="2" label="Low reputation"/> + <int value="3" label="Phishing"/> +</enum> + <enum name="PasswordReusePasswordFieldDetected" type="int"> <int value="0" label="No password field"/> <int value="1" label="Has password field"/> @@ -104189,12 +107450,15 @@ <enum name="PaymentRequestFlowCompletionStatus" type="int"> <int value="0" label="Completed"/> - <int value="1" label="Aborted"/> + <int value="1" label="User Aborted"/> + <int value="2" label="Other Aborted"/> </enum> <enum name="PaymentRequestNoShowReason" type="int"> <int value="0" label="NoMatchingPaymentMethod"/> <int value="1" label="NoSupportedPaymentMethod"/> + <int value="2" label="ConcurrentRequests"/> + <int value="3" label="ReasonOther"/> </enum> <enum name="PaymentRequestPaymentMethods" type="int"> @@ -104375,6 +107639,7 @@ <int value="1360443600" label="PPB_OpenGLES2FramebufferMultisample;1.0"/> <int value="1374404330" label="PPB_BrokerTrusted;0.3"/> <int value="1374976378" label="PPB_OpenGLES2Query;1.0"/> + <int value="1388412013" label="PPB_AudioOutput(Dev);0.1"/> <int value="1423820530" label="PPB_ContentDecryptor_Private;0.14"/> <int value="1437724812" label="PPB_AudioConfig;1.0"/> <int value="1443771913" label="PPB_NetAddress;1.0"/> @@ -104453,6 +107718,7 @@ <int value="0" label="NOT_EMBARGOED"/> <int value="1" label="BLACKLISTED"/> <int value="2" label="REPEATED_DISMISSALS"/> + <int value="3" label="REPEATED_IGNORES"/> </enum> <enum name="PermissionRequestType" type="int"> @@ -104469,6 +107735,7 @@ <int value="10" label="PERMISSION_BUBBLE_PERMISSION_PROTECTED_MEDIA_IDENTIFIER"/> <int value="11" label="PERMISSION_BUBBLE_PERMISSION_PUSH_MESSAGING"/> + <int value="12" label="PERMISSION_BUBBLE_PERMISSION_FLASH"/> </enum> <enum name="PermissionStatus" type="int"> @@ -105314,6 +108581,7 @@ <int value="2" label="Infobar dismissed by user"/> <int value="3" label="Infobar dismissed by navigation"/> <int value="4" label="Infobar dismissed by reload"/> + <int value="5" label="Infobar dismissed by tab closure"/> </enum> <enum name="PreviewsUserOptedOut" type="int"> @@ -106168,6 +109436,7 @@ <int value="3" label="Registration not found"/> <int value="4" label="Registration not found (no incognito push service)"/> <int value="5" label="Unable to retrieve the public key"/> + <int value="6" label="Storage corrupt"/> </enum> <enum name="PushRegistrationStatus" type="int"> @@ -106189,13 +109458,15 @@ <enum name="PushUnregistrationReason" type="int"> <int value="0" label="Unknown"/> - <int value="1" label="JavaScript API"/> + <int value="1" label="unsubscribe() JavaScript API"/> <int value="2" label="Permission revoked"/> <int value="3" label="Incoming message app id was unknown"/> <int value="4" label="Incoming message origin no longer has permission"/> <int value="5" label="Incoming message Service Worker not found"/> <int value="6" label="GCM Store reset due to corruption"/> <int value="7" label="Service Worker unregistered"/> + <int value="8" label="subscribe() storage corrupt"/> + <int value="9" label="getSubscription() storage corrupt"/> </enum> <enum name="PushUnregistrationStatus" type="int"> @@ -106386,6 +109657,9 @@ <int value="92" label="MULTIPATH_PATH_NOT_ACTIVE"/> <int value="93" label="TOO_MANY_FRAME_GAPS"/> <int value="94" label="UNSUPPORTED_PROOF_DEMAND"/> + <int value="95" label="STREAM_SEQUENCER_INVALID_STATE"/> + <int value="96" label="TOO_MANY_SESSIONS_ON_SERVER"/> + <int value="97" label="HEADERS_STREAM_DATA_DECOMPRESS_FAILURE"/> </enum> <enum name="QuicHandshakeFailureReason" type="int"> @@ -106740,12 +110014,15 @@ </enum> <enum name="RendererUnresponsiveType" type="int"> + <obsolete> + Deprecated 3/2017. + </obsolete> <int value="0" label="Unknown"/> <int value="1" label="Pending in-flight events"/> <int value="2" label="Waiting for dialog closed"/> <int value="3" label="Suppressed dialogs in unload events"/> <int value="4" label="During BeforeUnload"/> - <int value="5" label="During Unload (obsolete)"/> + <int value="5" label="During Unload"/> <int value="6" label="While closing the page"/> </enum> @@ -106880,6 +110157,15 @@ <int value="7" label="Unknown"/> </enum> +<enum name="RequestedWindowState" type="int"> + <int value="0" label="Invalid"/> + <int value="1" label="Normal window state"/> + <int value="2" label="Minimized window state"/> + <int value="3" label="Maximized window state"/> + <int value="4" label="Fullscreen window state"/> + <int value="5" label="Docked window state"/> +</enum> + <enum name="RequestMediaKeySystemAccessStatus" type="int"> <int value="0" label="Requested"/> <int value="1" label="Supported"/> @@ -108275,6 +111561,10 @@ <int value="20" label="NAVIGATION_HINT_LINK_TAP_DOWN"/> <int value="21" label="EXTERNAL_REQUEST"/> <int value="22" label="PAYMENT_REQUEST"/> + <int value="23" label="BACKGROUND_FETCH_ABORT"/> + <int value="24" label="BACKGROUND_FETCH_CLICK"/> + <int value="25" label="BACKGROUND_FETCH_FAIL"/> + <int value="26" label="BACKGROUND_FETCHED"/> </enum> <enum name="ServiceWorkerPreparationType" type="int"> @@ -108521,6 +111811,21 @@ <int value="9" label="Bad time_between_prompts_seconds param"/> </enum> +<enum name="SettingsResetPromptResetState" type="int"> + <int value="1" label="Reset required"/> + <int value="2" label="Domain not matched, no reset required"/> + <int value="3" label="Already prompted for setting, no reset required"/> + <int value="4" label="Recently prompted, no reset required"/> + <int value="5" label="Other setting requires reset, no reset required"/> + <int value="6" label="Policy detected, no reset required"/> +</enum> + +<enum name="SettingsResetPromptSettingsReset" type="int"> + <int value="1" label="Homepage"/> + <int value="2" label="Default search engine"/> + <int value="3" label="Startup URLs"/> +</enum> + <enum name="SettingsSections" type="int"> <summary> A collection of sections from chrome://settings. Used for metrics about @@ -108716,6 +112021,31 @@ <int value="3" label="Resource is not web-accessible (most common)"/> </enum> +<enum name="ShouldAllowOpenURLFailureScheme" type="int"> +<!-- Generated from chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc --> + + <int value="0" label="SCHEME_UNKNOWN"/> + <int value="1" label="SCHEME_EMPTY"/> + <int value="2" label="SCHEME_HTTP"/> + <int value="3" label="SCHEME_HTTPS"/> + <int value="4" label="SCHEME_FILE"/> + <int value="5" label="SCHEME_FTP"/> + <int value="6" label="SCHEME_DATA"/> + <int value="7" label="SCHEME_JAVASCRIPT"/> + <int value="8" label="SCHEME_ABOUT"/> + <int value="9" label="SCHEME_CHROME"/> + <int value="10" label="SCHEME_DEVTOOLS"/> + <int value="11" label="SCHEME_GUEST"/> + <int value="12" label="SCHEME_VIEWSOURCE"/> + <int value="13" label="SCHEME_CHROME_SEARCH"/> + <int value="14" label="SCHEME_CHROME_NATIVE"/> + <int value="15" label="SCHEME_DOM_DISTILLER"/> + <int value="16" label="SCHEME_CHROME_EXTENSION"/> + <int value="17" label="SCHEME_CONTENT"/> + <int value="18" label="SCHEME_BLOB"/> + <int value="19" label="SCHEME_FILESYSTEM"/> +</enum> + <enum name="ShutdownReason" type="int"> <summary> The reason that the Chrome OS power manager shut down or rebooted the @@ -108891,6 +112221,9 @@ The credentials are being transfered to a new profile, so the old one is signed out. </int> + <int value="7" label="Authentication failed with force signin"> + Signed out because credentials are invalid and force-sign-in is enabled. + </int> </enum> <enum name="SigninSource" type="int"> @@ -109125,9 +112458,11 @@ <int value="2" label="Mouse down"/> <int value="3" label="Tap gesture"/> <int value="4" label="Scroll (mouse wheel or touch)"/> - <int value="5" label="Media (foreground tab)"/> - <int value="6" label="Media (background tab)"/> + <int value="5" label="Media (background tab)"/> + <int value="6" label="Media (foreground tab)"/> <int value="7" label="Webapp shortcut launch"/> + <int value="8" label="First daily engagement"/> + <int value="9" label="Notification interaction"/> </enum> <enum name="SiteIsolationMimeType" type="int"> @@ -109771,6 +113106,10 @@ Autorecover failed setup with NOTADB, then successfully deleted the unrecoverable db and verified that it now works. </int> + <int value="32" label="RECOVERY_FAILED_AUTORECOVERDB_META_VERSION"> + Autorecover failed because required version information was missing from the + [meta] table. + </int> </enum> <enum name="SqliteStatsEnum" type="int"> @@ -109847,6 +113186,21 @@ <int value="5" label="DEPRECATION_RAZE_FAILED">Raze failed.</int> </enum> +<enum name="SqliteVfsEvents" type="int"> + <summary>I/O events from browser-process SQLite VFS wrapper.</summary> + <int value="0" label="VFS_OPEN">Calls to xOpen().</int> + <int value="1" label="VFS_DELETE">Calls to xDelete().</int> + <int value="2" label="VFS_ACCESS">Calls to xAccess().</int> + <int value="3" label="VFS_FULLPATHNAME">Calls to xFullPath().</int> + <int value="4" label="VFS_IO_CLOSE">Calls to xClose().</int> + <int value="5" label="VFS_IO_READ">Calls to xRead().</int> + <int value="6" label="VFS_IO_WRITE">Calls to xWrite().</int> + <int value="7" label="VFS_IO_TRUNCATE">Calls to xTruncate().</int> + <int value="8" label="VFS_IO_SYNC">Calls to xSync().</int> + <int value="9" label="VFS_IO_FILESIZE">Calls to xFileSize().</int> + <int value="10" label="VFS_IO_FETCH">Calls to xFetch().</int> +</enum> + <enum name="SRIResourceIntegrityMismatchEvent" type="int"> <int value="0" label="CHECKING_FOR_INTEGRITY_MISMATCH"/> <int value="1" label="REFETCH_DUE_TO_INTEGRITY_MISMATCH"/> @@ -109993,44 +113347,24 @@ reason to believe that the system clock was behind. Methods of detecting clock inaccuracy have changed over time. </int> - <int value="2" - label="WWW_SUBDOMAIN_MATCH: Difference between the URL and the DNS is - www"> - This cause is recorded if the ssl error is CERT_COMMON_NAME_INVALID and the - hostname differs from one of the DNS names in the certificate (CN or SANs) - only by the presence or absence of the single-label prefix "www". - This case is not recored if the host name is not a known TLD. + <int value="2" label="WWW_SUBDOMAIN_MATCH: (Deprecated)"> + (Deprecated in favor of WWW_SUBDOMAIN_MATCH2) </int> - <int value="3" label="SUBDOMAIN_MATCH: The URL is a subdomain of the DNS"> - This cause is recorded if the ssl error is CERT_COMMON_NAME_INVALID and the - difference between the URL and the DNS name is not "www". This - case is not recorded if the host name is not a known TLD. + <int value="3" label="SUBDOMAIN_MATCH: (Deprecated)"> + (Deprecated in favor of SUBDOMAIN_MATCH2) </int> - <int value="4" - label="SUBDOMAIN_INVERSE_MATCH: The DNS is a subdomain of the URL"> - This cause is recorded if the ssl error is CERT_COMMON_NAME_INVALID and the - difference between the DNS name and the URL is not "www". This - case is not recorded if the host name is not a known TLD. + <int value="4" label="SUBDOMAIN_INVERSE_MATCH: (Deprecated)"> + (Deprecated in favor of SUBDOMAIN_INVERSE_MATCH2) </int> - <int value="5" - label="SUBDOMAIN_OUTSIDE_WILDCARD: The URL is outside the scope of the - wildcard certificate"> - This cause is recorded only if the ssl error is CERT_COMMON_NAME_INVALID, we - have received a wildcard certificate and the scope of a wildcard certificate - is too narrow for the hostname. This case is not recorded if the host name - is not a known TLD. + <int value="5" label="SUBDOMAIN_OUTSIDE_WILDCARD: (Deprecated)"> + (Deprecated in favor of SUBDOMAIN_OUTSIDE_WILDCARD2) </int> <int value="6" label="HOST_NAME_NOT_KNOWN_TLD: The host name is not a known TLD"> This cause is recorded only for CERT_COMMON_NAME_INVALID errors. </int> - <int value="7" - label="LIKELY_MULTI_TENANT_HOSTING: The certificate is a shared - certificate"> - This cause is recorded only for CERT_COMMON_NAME_INVALID errors. It is - possible that this error overlaps with others but it is not likely because - of the heuristics which decide as to what constitutes a shared certificate. - In cases of overlap, we emit to only one bucket. + <int value="7" label="LIKELY_MULTI_TENANT_HOSTING: (Deprecated)"> + (Deprecated in favor of LIKELY_MULTI_TENANT_HOSTING2) </int> <int value="8" label="LOCALHOST: The user is trying to connect to local host"> This cause is recorded only for CERT_AUTHORITY_INVALID errors. @@ -110050,12 +113384,56 @@ <int value="12" label="EXPIRED_RECENTLY: Cert expired within last 28 days."> </int> - <int value="13" - label="LIKELY_SAME_DOMAIN: Cert likely belongs to the same domain"> + <int value="13" label="LIKELY_SAME_DOMAIN: (Deprecated)"> + (Deprecated in favor of LIKELY_SAME_DOMAIN2) + </int> + <int value="14" label="NO_SUBJECT_ALT_NAME: Cert lacks SubjectAltName"> + This case is recorded if the SSL error is CERT_COMMON_NAME_INVALID error and + the certificate does not specify any DNS names in a SubjectAltName + extension. (Chrome 58 deprecated matching hostnames to the SubjectCN Field.) + </int> + <int value="15" + label="WWW_SUBDOMAIN_MATCH2: Difference between the URL and the DNS is + www"> + This cause is recorded if the SSL error is CERT_COMMON_NAME_INVALID and the + hostname differs from one of the DNS names in the certificate (SANs) only by + the presence or absence of the single-label prefix "www". This + case is not recorded if the host name is not a known TLD. + </int> + <int value="16" label="SUBDOMAIN_MATCH2: The URL is a subdomain of the DNS"> + This cause is recorded if the SSL error is CERT_COMMON_NAME_INVALID, the URL + hostname is a subdomain of a DNS name in the certificate, and the difference + between the URL and the DNS name is not "www". This case is not + recorded if the host name is not a known TLD. + </int> + <int value="17" + label="SUBDOMAIN_INVERSE_MATCH2: The DNS is a subdomain of the URL"> + This cause is recorded if the SSL error is CERT_COMMON_NAME_INVALID, a DNS + name in the certificate is a subdomain of the URL hostname, and the + difference between the DNS name and the URL is not "www". This + case is not recorded if the host name is not a known TLD. + </int> + <int value="18" + label="SUBDOMAIN_OUTSIDE_WILDCARD2: The URL is outside the scope of the + wildcard certificate"> + This cause is recorded only if the SSL error is CERT_COMMON_NAME_INVALID, we + have received a wildcard certificate and the scope of a wildcard certificate + is too narrow for the hostname. This case is not recorded if the host name + is not a known TLD. + </int> + <int value="19" + label="LIKELY_MULTI_TENANT_HOSTING2: The certificate is a shared + certificate"> + This cause is recorded only for CERT_COMMON_NAME_INVALID errors where the + certificate contains numerous unrelated DNS names. This case is not recorded + if the host name is not a known TLD. + </int> + <int value="20" + label="LIKELY_SAME_DOMAIN2: Cert likely belongs to the same domain"> This case is recorded if the SSL error is CERT_COMMON_NAME_INVALID error and the hostname in request URL has the same domain (effective TLD + 1 label) as - the common name or at least one of the subject alternative names in - certificate. This case is not recorded if the host name is not a known tld. + a SubjectAltName in the certificate. This case is not recorded if the host + name is not a known TLD. </int> </enum> @@ -110065,11 +113443,12 @@ <int value="2" label="SHOW_CAPTIVE_PORTAL_INTERSTITIAL_OVERRIDABLE"/> <int value="3" label="SHOW_SSL_INTERSTITIAL_NONOVERRIDABLE"/> <int value="4" label="SHOW_SSL_INTERSTITIAL_OVERRIDABLE"/> - <int value="5" label="WWW_MISMATCH_FOUND"/> + <int value="5" label="WWW_MISMATCH_FOUND (Deprecated)"/> <int value="6" label="WWW_MISMATCH_URL_AVAILABLE"/> <int value="7" label="WWW_MISMATCH_URL_NOT_AVAILABLE"/> <int value="8" label="SHOW_BAD_CLOCK"/> <int value="9" label="CAPTIVE_PORTAL_CERT_FOUND"/> + <int value="10" label="WWW_MISMATCH_FOUND_IN_SAN"/> </enum> <enum name="SSLErrorTypes" type="int"> @@ -110316,6 +113695,19 @@ <int value="2" label="MemoryCached StyleSheetContents was reused"/> </enum> +<enum name="SubresourceFilterActions" type="int"> + <int value="0" label="New Navigation"/> + <int value="1" label="UI Shown"/> + <int value="2" label="Details shown"/> + <int value="3" label="Learn more clicked"/> + <int value="4" label="Content setting blocked from UI"/> + <int value="5" label="Content setting allowed"/> + <int value="6" label="Content setting blocked"/> + <int value="7" label="Content setting allowed (global)"/> + <int value="8" label="Content setting blocked (global)"/> + <int value="9" label="Content setting wildcard update"/> +</enum> + <enum name="SubresourceFilterActivationDecision" type="int"> <int value="0" label="Unknown"/> <int value="1" label="Activated"/> @@ -110660,6 +114052,11 @@ <int value="3" label="Attempted"/> </enum> +<enum name="SwapchainFormat" type="int"> + <int value="0" label="B8G8R8A8"/> + <int value="1" label="YUY2"/> +</enum> + <enum name="SwReporterRunningTimeRegistryError" type="int"> <int value="0" label="No error"/> <int value="1" label="Registry key invalid"/> @@ -110880,6 +114277,7 @@ <int value="36" label="Arc Package"/> <int value="37" label="Printers"/> <int value="38" label="Reading List"/> + <int value="39" label="User Events"/> </enum> <enum name="SyncModelTypeStoreInitResult" type="int"> @@ -111025,6 +114423,7 @@ <int value="0" label="Downloads - Files"/> <int value="1" label="Downloads - Pages"/> <int value="2" label="Close Incognito Tabs"/> + <int value="3" label="Content Suggestion"/> </enum> <enum name="TabBackgroundLoadStatus" type="int"> @@ -111112,6 +114511,15 @@ <int value="1" label="Undelayed Tap"/> </enum> +<enum name="TapDisambiguation" type="int"> + <int value="0" label="Other"/> + <int value="1" label="Back Button"/> + <int value="2" label="Tapped Outside"/> + <int value="3" label="Tapped Inside (deprecated)"/> + <int value="4" label="Tapped Inside, Same Node"/> + <int value="5" label="Tapped Inside, Different Node"/> +</enum> + <enum name="TcpSocketStatus" type="int"> <int value="0" label="Unknown"/> <int value="1" label="Fast Connection Return"/> @@ -111633,6 +115041,7 @@ <int value="0" label="Not dropped"/> <int value="1" label="Recording disabled"/> <int value="2" label="Max hit"/> + <int value="3" label="Not whitelisted"/> </enum> <enum name="UmaCleanExitConsistency" type="int"> @@ -112329,6 +115738,33 @@ <int value="2" label="Landscape"/> </enum> +<enum name="VideoPersistenceAttemptResult" type="int"> + <int value="0" label="Success"/> + <int value="1" label="No system support"/> + <int value="2" label="No feature"/> + <int value="3" label="No activity support"/> + <int value="4" label="Already running"/> + <int value="5" label="Restarting"/> + <int value="6" label="Finishing"/> + <int value="7" label="No WebContents"/> + <int value="8" label="No video"/> +</enum> + +<enum name="VideoPersistenceControlsType" type="int"> + <int value="0" label="Native controls"/> + <int value="1" label="Custom controls"/> +</enum> + +<enum name="VideoPersistenceEndReason" type="int"> + <int value="0" label="Resume"/> + <int value="1" label="Navigation"/> + <int value="2" label="Close"/> + <int value="3" label="Crash"/> + <int value="4" label="New tab"/> + <int value="5" label="Reparent"/> + <int value="6" label="Left fullscreen"/> +</enum> + <enum name="VideoPixelFormat" type="int"> <obsolete> Deprecated as of 05/2015. Substituted by VideoFormat. @@ -112612,11 +116048,26 @@ <int value="4" label="Session, Warmup"/> </enum> +<enum name="WebApkGooglePlayInstallResult" type="int"> + <int value="0" label="Success"/> + <int value="1" label="Install delegate unavailable"/> + <int value="2" label="Failed to connect to Google Play Install Service"/> + <int value="3" label="Caller verification failure"/> + <int value="4" label="Policy violation"/> + <int value="5" label="Play install API disabled"/> + <int value="6" label="Request to Play install API failed"/> + <int value="7" label="Download cancelled"/> + <int value="8" label="Download error"/> + <int value="9" label="Install error"/> + <int value="10" label="Install timed out"/> +</enum> + <enum name="WebApkGooglePlayInstallState" type="int"> <int value="0" label="Play installation supported."/> <int value="1" label="Play installation disabled for other reason."/> <int value="2" label="Google Play Services unavailable."/> - <int value="3" label="Play installation disabled by variations."/> + <int value="3" + label="(Deprecated in M59) Play installation disabled by variations."/> <int value="4" label="Play installation disabled by Play."/> </enum> @@ -112680,13 +116131,6 @@ <int value="7" label="Auth Rejected"/> <int value="8" label="Auth Timeout"/> <int value="9" label="Unsupported Device"/> - <int value="10" label="Invalid Attribute Length"/> - <int value="11" label="Congested Connection"/> - <int value="12" label="Insufficient Encryption"/> - <int value="13" label="Invalid Offset"/> - <int value="14" label="Read Not Permitted"/> - <int value="15" label="Unsupported Request"/> - <int value="16" label="Write Not Permitted"/> </enum> <enum name="WebBluetoothFunction" type="int"> @@ -113889,6 +117333,11 @@ <int value="1" label="XMLHttpRequestSendArrayBufferView"/> </enum> +<enum name="XPCConnectionEvent" type="int"> + <int value="0" label="Interrupted"/> + <int value="1" label="Invalidated"/> +</enum> + <enum name="YoungGenerationHandling" type="int"> <int value="0" label="Regular Scavenge"/> <int value="1" label="Scavenge using fast promotion mode"/> @@ -114202,6 +117651,17 @@ <affected-histogram name="Autofill.UnmaskPrompt.Duration"/> </histogram_suffixes> +<histogram_suffixes name="BackgroundFetchEvents" separator="."> + <suffix name="AbortEvent" label="BackgroundFetchAbortEvent"/> + <suffix name="ClickEvent" label="BackgroundFetchClickEvent"/> + <suffix name="FailEvent" label="BackgroundFetchFailEvent"/> + <suffix name="FetchedEvent" label="BackgroundFetchedEvent"/> + <affected-histogram name="BackgroundFetch.EventDispatchFailure.Dispatch"/> + <affected-histogram name="BackgroundFetch.EventDispatchFailure.FindWorker"/> + <affected-histogram name="BackgroundFetch.EventDispatchFailure.StartWorker"/> + <affected-histogram name="BackgroundFetch.EventDispatchResult"/> +</histogram_suffixes> + <histogram_suffixes name="BadBlockCounts" separator="."> <suffix name="Backupsys" label="backupsys partition"/> <suffix name="Bbt" label="bbt partition"/> @@ -114682,6 +118142,7 @@ <suffix name="Browser"/> <suffix name="Renderer"/> <affected-histogram name="Scheduling.ActivateDuration2"/> + <affected-histogram name="Scheduling.BeginImplFrameLatency2"/> <affected-histogram name="Scheduling.BeginMainFrameIntervalCritical2"/> <affected-histogram name="Scheduling.BeginMainFrameIntervalNotCritical2"/> <affected-histogram name="Scheduling.BeginMainFrameQueueDurationCritical2"/> @@ -114869,6 +118330,7 @@ <suffix name="Articles" label="Articles for you"/> <suffix name="ForeignTabs" label="Open tabs on other devices"/> <suffix name="Experimental" label="Experimental"/> + <suffix name="ReadingList" label="Reading List entries"/> <affected-histogram name="NewTabPage.ContentSuggestions.CountOnNtpOpened"/> <affected-histogram name="NewTabPage.ContentSuggestions.DismissedUnvisited"/> <affected-histogram name="NewTabPage.ContentSuggestions.DismissedVisited"/> @@ -115314,6 +118776,7 @@ <suffix name="NetworkErrorProxyCertificateInvalid" label="Bypass due to invalid proxy certificate"/> <suffix name="NetworkErrorOther" label="Bypass due to any network error"/> + <suffix name="URLRedirectCycle" label="Bypass due to URL redirect cycle"/> <affected-histogram name="DataReductionProxy.BypassedBytes"/> </histogram_suffixes> @@ -115546,7 +119009,11 @@ </obsolete> </suffix> <suffix name="omnibox" label="Triggered from the omnibox."/> - <suffix name="wash" label="Multiple sources could have triggered."/> + <suffix name="wash" label="Multiple sources could have triggered."> + <obsolete> + Deprecated April 2017 + </obsolete> + </suffix> <suffix name="web" label="Link triggered prerender."/> <suffix name="webcross" label="Link triggered prerender, rel=prerender, cross domain."/> @@ -115865,7 +119332,7 @@ <affected-histogram name="DNS.ResolveSuccess"/> </histogram_suffixes> -<histogram_suffixes name="DocsSpecific" separator=""> +<histogram_suffixes name="DocsSpecific" separator="."> <suffix name="Docs" label="Only for docs.google.com"/> <affected-histogram name="appcache.MainResourceResponseRetrieval"/> <affected-histogram name="appcache.SubResourceResponseRetrieval"/> @@ -116172,6 +119639,15 @@ <affected-histogram name="PLT.PT_StartToFinish"/> </histogram_suffixes> +<histogram_suffixes name="GeolocationSettingsDialogSource"> + <suffix name="DSE" label="Default search engine"/> + <suffix name="NonDSE" label="Non-default search engine"/> + <affected-histogram name="Geolocation.SettingsDialog.AcceptEvent"/> + <affected-histogram name="Geolocation.SettingsDialog.DenyEvent"/> + <affected-histogram name="Geolocation.SettingsDialog.ShowEvent"/> + <affected-histogram name="Geolocation.SettingsDialog.SuppressEvent"/> +</histogram_suffixes> + <histogram_suffixes name="GLApisWithErrorReporting"> <suffix name="TexImage2D" label="All GL APIs that allocate a 2D texture."/> <suffix name="TexImage3D" label="All GL APIs that allocate a 3D texture."/> @@ -116643,6 +120119,7 @@ <affected-histogram name="ChromeGeneratedCustomTab.IntentToFirstCommitNavigationTime2"/> <affected-histogram name="CustomTabs.IntentToFirstCommitNavigationTime2"/> + <affected-histogram name="CustomTabs.IntentToFirstCommitNavigationTime3"/> <affected-histogram name="Startup.FirstCommitNavigationTime2"/> </histogram_suffixes> @@ -116801,7 +120278,6 @@ label="ChromiumWritableFile::SyncParent"/> <affected-histogram name="LevelDBEnv.IDB.IOError.BFE"/> <affected-histogram name="LevelDBEnv.IOError.BFE"/> - <affected-histogram name="LevelDBEnv.LocalStorage.IOError.BFE"/> <affected-histogram name="LevelDBEnv.ServiceWorker.IOError.BFE"/> <affected-histogram name="WebCore.IndexedDB.LevelDBOpenErrors.BFE"/> <affected-histogram name="WebCore.IndexedDB.LevelDBReadErrors.BFE"/> @@ -116829,7 +120305,6 @@ label="This histogram shows the limit when open failed for reasons other than exceeding the limit."/> <affected-histogram name="LevelDBEnv.IDB.MaxFDs"/> - <affected-histogram name="LevelDBEnv.LocalStorage.MaxFDs"/> <affected-histogram name="LevelDBEnv.MaxFDs"/> <affected-histogram name="LevelDBEnv.ServiceWorker.MaxFDs"/> </histogram_suffixes> @@ -116851,8 +120326,6 @@ <suffix name="CreateDir" label="CreateDir"/> <affected-histogram name="LevelDBEnv.IDB.RetryRecoveredFromErrorIn"/> <affected-histogram name="LevelDBEnv.IDB.TimeUntilSuccessFor"/> - <affected-histogram name="LevelDBEnv.LocalStorage.RetryRecoveredFromErrorIn"/> - <affected-histogram name="LevelDBEnv.LocalStorage.TimeUntilSuccessFor"/> <affected-histogram name="LevelDBEnv.RetryRecoveredFromErrorIn"/> <affected-histogram name="LevelDBEnv.ServiceWorker.RetryRecoveredFromErrorIn"/> @@ -116872,8 +120345,6 @@ <histogram_suffixes name="LevelDBEnvTypes" separator="." ordering="prefix"> <suffix name="IDB" label="Restricted to IndexedDB LevelDB environments"/> - <suffix name="LocalStorage" - label="Restricted to LocalStorage LevelDB environments"/> <suffix name="ServiceWorker" label="Restricted to ServiceWorker LevelDB environments"/> <affected-histogram name="LevelDBEnv.IOError"/> @@ -117015,6 +120486,14 @@ <affected-histogram name="Media.AudioOutputController"/> </histogram_suffixes> +<histogram_suffixes name="MediaElementConfigurations" separator="."> + <suffix name="InlinePortrait"/> + <suffix name="InlineLandscape"/> + <suffix name="FullscreenPortrait"/> + <suffix name="FullscreenLandscape"/> + <affected-histogram name="Media.Timeline.Width"/> +</histogram_suffixes> + <histogram_suffixes name="MediaPipelineStatusForStreams" separator="."> <suffix name="AudioVideo.Other" label="PipelineStatus for the codecs that dont have an explicit metric."/> @@ -117065,6 +120544,20 @@ <affected-histogram name="Media.PipelineStatus"/> </histogram_suffixes> +<histogram_suffixes name="MediaTimelineWidths" separator="."> + <suffix name="32_47"/> + <suffix name="48_79"/> + <suffix name="80_127"/> + <suffix name="128_255"/> + <suffix name="256_511"/> + <suffix name="512_inf"/> + <affected-histogram name="Media.Timeline.DragGestureDuration"/> + <affected-histogram name="Media.Timeline.DragPercent"/> + <affected-histogram name="Media.Timeline.DragSumAbsTimeDelta"/> + <affected-histogram name="Media.Timeline.DragTimeDelta"/> + <affected-histogram name="Media.Timeline.SeekType"/> +</histogram_suffixes> + <histogram_suffixes name="MediaVideoCaptureManagerTime" separator="."> <suffix name="StartDeviceTime" label="Measures the time taken for DoStartDeviceOnDeviceThread()."/> @@ -117091,6 +120584,9 @@ label="Watch time for SRC media with only an audio track."/> <suffix name="Audio.EME" label="Watch time for EME media with only an audio track."/> + <suffix name="Audio.EmbeddedExperience" + label="Watch time for downloaded media on Android with only an audio + track."/> <suffix name="AudioVideo.All" label="Watch time for all media with both an audio and video track."/> <suffix name="AudioVideo.AC" @@ -117105,6 +120601,30 @@ label="Watch time for SRC media with both an audio and video track."/> <suffix name="AudioVideo.EME" label="Watch time for EME media with both an audio and video track."/> + <suffix name="AudioVideo.EmbeddedExperience" + label="Watch time for downloaded media on Android with both an audio + and video track."/> + <suffix name="AudioVideo.Background.All" + label="Background watch time for all media with both an audio and video + track."/> + <suffix name="AudioVideo.Background.AC" + label="Background watch time for all media with both an audio and video + track on AC power."/> + <suffix name="AudioVideo.Background.Battery" + label="Background watch time for all media with both an audio and video + track on battery power."/> + <suffix name="AudioVideo.Background.MSE" + label="Background watch time for MSE media with both an audio and video + track."/> + <suffix name="AudioVideo.Background.SRC" + label="Background watch time for SRC media with both an audio and video + track."/> + <suffix name="AudioVideo.Background.EME" + label="Background watch time for EME media with both an audio and video + track."/> + <suffix name="AudioVideo.Background.EmbeddedExperience" + label="Background watch time for downloaded media on Android with both + an audio and video track."/> <affected-histogram name="Media.WatchTime"/> </histogram_suffixes> @@ -117116,6 +120636,32 @@ <affected-histogram name="Media.WebMediaPlayerImpl.Memory"/> </histogram_suffixes> +<histogram_suffixes name="MemoryFDsAllProcesses" separator="." + ordering="prefix"> + <suffix name="Browser" label="Browser process"/> + <suffix name="Gpu" label="GPU process"/> + <suffix name="RendererAll" label="Renderer process"/> + <suffix name="Chrome" label="chrome:// renderer process"/> + <suffix name="Extension" label="Extension process"/> + <suffix name="NativeClient" label="Native client process"/> + <suffix name="NativeClientBroker" label="Native client broker process"/> + <suffix name="PeperPlugin" label="Pepper plugin process"/> + <suffix name="PepperPluginBroker" label="Pepper plugin broker process"/> + <suffix name="Renderer" label="Renderer process"/> + <suffix name="SandboxHelper" label="Sandbox helper process"/> + <suffix name="Utility" label="Utility process"/> + <suffix name="Zygote" label="Zygot process"/> + <affected-histogram name="Memory.OpenFDs"/> +</histogram_suffixes> + +<histogram_suffixes name="MemoryFDsBroswerGpuAndRendererProcess" separator="." + ordering="prefix"> + <suffix name="Browser" label="Browser process"/> + <suffix name="Gpu" label="GPU process"/> + <suffix name="RendererAll" label="Renderer process"/> + <affected-histogram name="Memory.OpenFDsSoftLimit"/> +</histogram_suffixes> + <histogram_suffixes name="MemoryStateTransition" separator="."> <suffix name="NormalToThrottled"/> <suffix name="NormalToSuspended"/> @@ -118538,6 +122084,29 @@ <affected-histogram name="Net.RequestTime2.Success"/> </histogram_suffixes> +<histogram_suffixes name="NetHttpContentLengthType" separator="."> + <suffix name="Http"/> + <suffix name="Https"/> + <suffix name="Video"/> + <affected-histogram name="Net.HttpContentLength"/> +</histogram_suffixes> + +<histogram_suffixes name="NetHttpProxyConnectLatencySecure" separator="."> + <owner>tbansal@chromium.org</owner> + <suffix name="Insecure" label="Insecure proxy"/> + <suffix name="Secure" label="Secure proxy"/> + <affected-histogram name="Net.HttpProxy.ConnectLatency"/> +</histogram_suffixes> + +<histogram_suffixes name="NetHttpProxyConnectLatencySuccess" separator="."> + <owner>tbansal@chromium.org</owner> + <suffix name="Error" label="Connection to proxy resulted in an error"/> + <suffix name="Success" label="Connection to proxy was successful"/> + <suffix name="TimedOut" label="Connection to proxy timed out"/> + <affected-histogram name="Net.HttpProxy.ConnectLatency.Insecure"/> + <affected-histogram name="Net.HttpProxy.ConnectLatency.Secure"/> +</histogram_suffixes> + <histogram_suffixes name="NetProxyResolverExecutionTime"> <suffix name="UrlOver2K" label="URL length was over 2K"/> <suffix name="UrlOver4K" label="URL length was over 4K"/> @@ -119023,6 +122592,8 @@ </histogram_suffixes> <histogram_suffixes name="OfflinePagesNamespace" separator="."> + <affected-histogram + name="OfflinePages.Background.BackgroundLoadingFailedCode"/> <suffix name="bookmark" label="Offline bookmark cache"/> <suffix name="last_n" label="Offline recent pages"/> <suffix name="async_loading" label="Offline async loaded pages"/> @@ -119031,6 +122602,7 @@ <suffix name="ntp_suggestions" label="Offline ntp suggestions"/> <affected-histogram name="OfflinePages.Background.EffectiveConnectionType.SavePageLater"/> + <affected-histogram name="OfflinePages.Background.FinalSavePageResult"/> <affected-histogram name="OfflinePages.Background.OfflinerRequestStatus"/> <affected-histogram name="OfflinePages.Background.TimeToCanceled"/> <affected-histogram name="OfflinePages.Background.TimeToSaved"/> @@ -119234,6 +122806,10 @@ <suffix name="AfterPaint" label="Limited to the duration of time starting after first paint, for page loads that reached first paint."/> + <affected-histogram + name="PageLoad.Clients.FromGoogleSearch.PageTiming.ForegroundDuration"/> + <affected-histogram + name="PageLoad.Clients.SubresourceFilter.PageTiming.ForegroundDuration"/> <affected-histogram name="PageLoad.PageTiming.ForegroundDuration"/> </histogram_suffixes> @@ -119249,6 +122825,9 @@ <histogram_suffixes name="PageLoadMetricsClientsAmpCachePages" separator="." ordering="prefix"> + <obsolete> + Deprecated in favor of PageLoad.Clients.AMPCache2.*. + </obsolete> <suffix name="Clients.AMPCache" label="PageLoadMetrics that are a result of a navigations to an AMP cache page. Same page navigations are not tracked."/> @@ -119262,6 +122841,21 @@ <affected-histogram name="PageLoad.ParseTiming.NavigationToParseStart"/> </histogram_suffixes> +<histogram_suffixes name="PageLoadMetricsClientsAmpCachePages2" separator="." + ordering="prefix"> + <suffix name="Clients.AMPCache2" + label="PageLoadMetrics that are a result of a navigations to an AMP + cache page. Same page navigations are not tracked."/> + <affected-histogram + name="PageLoad.DocumentTiming.NavigationToDOMContentLoadedEventFired"/> + <affected-histogram name="PageLoad.DocumentTiming.NavigationToFirstLayout"/> + <affected-histogram + name="PageLoad.DocumentTiming.NavigationToLoadEventFired"/> + <affected-histogram + name="PageLoad.PaintTiming.NavigationToFirstContentfulPaint"/> + <affected-histogram name="PageLoad.ParseTiming.NavigationToParseStart"/> +</histogram_suffixes> + <histogram_suffixes name="PageLoadMetricsClientsCssScanner" separator="." ordering="prefix"> <suffix name="Clients.CssScanner" @@ -119419,6 +123013,7 @@ name="PageLoad.Experimental.AbortTiming.Stop.AfterPaint.BeforeInteraction"/> <affected-histogram name="PageLoad.Experimental.AbortTiming.Stop.BeforeCommit"/> + <affected-histogram name="PageLoad.PageTiming.ForegroundDuration"/> <affected-histogram name="PageLoad.PaintTiming.NavigationToFirstContentfulPaint"/> <affected-histogram name="PageLoad.PaintTiming.NavigationToFirstImagePaint"/> @@ -119430,6 +123025,16 @@ <affected-histogram name="PageLoad.ParseTiming.ParseDuration"/> </histogram_suffixes> +<histogram_suffixes name="PageLoadMetricsClientsMedia" separator="." + ordering="prefix"> + <suffix name="Clients.MediaPageLoad" + label="PageLoadMetrics for page loads that involved playing a media + element."/> + <affected-histogram name="PageLoad.Experimental.Bytes.Cache"/> + <affected-histogram name="PageLoad.Experimental.Bytes.Network"/> + <affected-histogram name="PageLoad.Experimental.Bytes.Total"/> +</histogram_suffixes> + <histogram_suffixes name="PageLoadMetricsClientsOfflinePages" separator="." ordering="prefix"> <suffix name="Clients.Previews.OfflinePages" @@ -119564,10 +123169,19 @@ name="PageLoad.Experimental.PaintTiming.NavigationToFirstMeaningfulPaint"/> <affected-histogram name="PageLoad.Experimental.PaintTiming.ParseStartToFirstMeaningfulPaint"/> + <affected-histogram name="PageLoad.PageTiming.ForegroundDuration"/> <affected-histogram name="PageLoad.PaintTiming.NavigationToFirstContentfulPaint"/> <affected-histogram name="PageLoad.PaintTiming.ParseStartToFirstContentfulPaint"/> + <affected-histogram + name="PageLoad.ParseTiming.ParseBlockedOnScriptExecution"/> + <affected-histogram + name="PageLoad.ParseTiming.ParseBlockedOnScriptExecutionFromDocumentWrite"/> + <affected-histogram name="PageLoad.ParseTiming.ParseBlockedOnScriptLoad"/> + <affected-histogram + name="PageLoad.ParseTiming.ParseBlockedOnScriptLoadFromDocumentWrite"/> + <affected-histogram name="PageLoad.ParseTiming.ParseDuration"/> </histogram_suffixes> <histogram_suffixes name="PageLoadMetricsClientsTabRestore" separator="." @@ -119589,11 +123203,37 @@ URL box, etc)."/> <affected-histogram name="PageLoad.Clients.SubresourceFilter.ActivationDecision"/> + <affected-histogram name="PageLoad.Experimental.Bytes.Cache"/> + <affected-histogram name="PageLoad.Experimental.Bytes.Network"/> + <affected-histogram name="PageLoad.Experimental.Bytes.Total"/> <affected-histogram name="PageLoad.PaintTiming.NavigationToFirstContentfulPaint"/> <affected-histogram name="PageLoad.ParseTiming.NavigationToParseStart"/> </histogram_suffixes> +<histogram_suffixes name="PageLoadMetricsMediaPlayed" separator="."> + <suffix name="MediaPlayed" label="Limited to pages where media was played."/> + <affected-histogram + name="PageLoad.Clients.SubresourceFilter.Experimental.Bytes.Cache"/> + <affected-histogram + name="PageLoad.Clients.SubresourceFilter.Experimental.Bytes.Network"/> + <affected-histogram + name="PageLoad.Clients.SubresourceFilter.Experimental.Bytes.Total"/> + <affected-histogram + name="PageLoad.Clients.SubresourceFilter.Experimental.CompletedResources.Cache"/> + <affected-histogram + name="PageLoad.Clients.SubresourceFilter.Experimental.CompletedResources.Network"/> + <affected-histogram + name="PageLoad.Clients.SubresourceFilter.Experimental.CompletedResources.Total"/> +</histogram_suffixes> + +<histogram_suffixes name="PageLoadMetricsNoCommit" separator="."> + <suffix name="NoCommit" label="Limited to page loads that did not commit."/> + <affected-histogram + name="PageLoad.Clients.FromGoogleSearch.PageTiming.ForegroundDuration"/> + <affected-histogram name="PageLoad.PageTiming.ForegroundDuration"/> +</histogram_suffixes> + <histogram_suffixes name="PageLoadMetricsNoEndTime" separator="."> <suffix name="NoEndTime" label="The page load had no recorded end time, so an end time was @@ -119604,6 +123244,23 @@ name="PageLoad.Experimental.PageTiming.NavigationToPageEnd"/> </histogram_suffixes> +<histogram_suffixes name="PageLoadMetricsNoMediaPlayed" separator="."> + <suffix name="NoMediaPlayed" + label="Limited to pages where no media was played."/> + <affected-histogram + name="PageLoad.Clients.SubresourceFilter.Experimental.Bytes.Cache"/> + <affected-histogram + name="PageLoad.Clients.SubresourceFilter.Experimental.Bytes.Network"/> + <affected-histogram + name="PageLoad.Clients.SubresourceFilter.Experimental.Bytes.Total"/> + <affected-histogram + name="PageLoad.Clients.SubresourceFilter.Experimental.CompletedResources.Cache"/> + <affected-histogram + name="PageLoad.Clients.SubresourceFilter.Experimental.CompletedResources.Network"/> + <affected-histogram + name="PageLoad.Clients.SubresourceFilter.Experimental.CompletedResources.Total"/> +</histogram_suffixes> + <histogram_suffixes name="PageLoadMetricsUserGesture" separator="."> <suffix name="UserGesture" label="Restricted to pages loaded via a user gesture."/> @@ -119742,6 +123399,18 @@ <affected-histogram name="Renderer4.BeginToFinishDoc"/> </histogram_suffixes> +<histogram_suffixes name="ParallelDownload" separator="."> + <suffix name="ParallelDownload" + label="Download that supports parallel requests."/> + <affected-histogram name="Download.Counts"/> + <affected-histogram name="Download.InterruptedAtEndReason"/> + <affected-histogram name="Download.InterruptedOverrunBytes"/> + <affected-histogram name="Download.InterruptedReason"/> + <affected-histogram name="Download.InterruptedReceivedSizeK"/> + <affected-histogram name="Download.InterruptedTotalSizeK"/> + <affected-histogram name="Download.InterruptedUnderrunBytes"/> +</histogram_suffixes> + <histogram_suffixes name="PasswordCustomPassphrase" separator="."> <suffix name="WithCustomPassphrase"/> <suffix name="WithoutCustomPassphrase"/> @@ -120332,6 +124001,12 @@ <affected-histogram name="Prerender.TimeUntilUsed2"/> </histogram_suffixes> +<histogram_suffixes name="Previews.Types" separator="."> + <suffix name="Offline" label="Offline previews"/> + <suffix name="ClientLoFi" label="Client LoFi previews"/> + <affected-histogram name="Previews.EligibilityReason"/> +</histogram_suffixes> + <histogram_suffixes name="ProcessType" separator="."> <suffix name="BrowserProcess" label="Browser Process"/> <suffix name="RendererProcess" @@ -120547,6 +124222,7 @@ label="Malware interstitial referrer attribution."/> <suffix name="UwsInterstitialAttribution" label="UwS interstitial referrer attribution."/> + <suffix name="PasswordEventAttribution"/> <affected-histogram name="SafeBrowsing.ReferrerAttributionResult"/> <affected-histogram name="SafeBrowsing.ReferrerHasInvalidTabID"/> <affected-histogram name="SafeBrowsing.ReferrerURLChainSize"/> @@ -120738,7 +124414,11 @@ label="Sliced for resources smaller than 512kB and larger than 32kB."/> <suffix name="Over_512kB" label="Sliced for resources larger than 512kB."/> <suffix name="InliningApplicable" - label="Resources that the chunk inlining is applicable."/> + label="Resources that the chunk inlining is applicable."> + <obsolete> + This experiment was turned down, see https://crbug.com/703188. + </obsolete> + </suffix> <affected-histogram name="Net.ResourceLoader.ResponseStartToEnd"/> </histogram_suffixes> @@ -121008,6 +124688,7 @@ <histogram_suffixes name="SafeBrowsingScoutPrefValues" separator="."> <suffix name="SBER1Pref" label="Value of the legacy Extended Reporting pref"/> <suffix name="SBER2Pref" label="Value of the new Extended Reporting pref"/> + <affected-histogram name="SafeBrowsing.Pref.SawInterstitial"/> <affected-histogram name="SafeBrowsing.Pref.Scout.NoScoutGroup"/> <affected-histogram name="SafeBrowsing.Pref.Scout.ScoutGroup"/> <affected-histogram name="SafeBrowsing.Pref.Scout.SetPref"/> @@ -121241,11 +124922,23 @@ <suffix name="UNKNOWN" label="UNKNOWN"/> <suffix name="FOREIGN_FETCH" label="FOREIGN_FETCH"/> <suffix name="NAVIGATION_HINT_LINK_MOUSE_DOWN" - label="NAVIGATION_HINT_LINK_MOUSE_DOWN"/> + label="NAVIGATION_HINT_LINK_MOUSE_DOWN"> + <obsolete> + This experiment was turned down, see https://crbug.com/616502. + </obsolete> + </suffix> <suffix name="NAVIGATION_HINT_LINK_TAP_UNCONFIRMED" - label="NAVIGATION_HINT_LINK_TAP_UNCONFIRMED"/> + label="NAVIGATION_HINT_LINK_TAP_UNCONFIRMED"> + <obsolete> + This experiment was turned down, see https://crbug.com/616502. + </obsolete> + </suffix> <suffix name="NAVIGATION_HINT_LINK_TAP_DOWN" - label="NAVIGATION_HINT_LINK_TAP_DOWN"/> + label="NAVIGATION_HINT_LINK_TAP_DOWN"> + <obsolete> + This experiment was turned down, see https://crbug.com/616502. + </obsolete> + </suffix> <affected-histogram name="ServiceWorker.EventDispatchingDelay"/> <affected-histogram name="ServiceWorker.StartWorker.StatusByPurpose"/> <affected-histogram name="ServiceWorker.StartWorker.Time_DuringStartup"/> @@ -121261,6 +124954,9 @@ </histogram_suffixes> <histogram_suffixes name="ServiceWorker.NavigationHint" separator="."> + <obsolete> + This experiment was turned down, see https://crbug.com/616502. + </obsolete> <suffix name="LINK_MOUSE_DOWN" label="LINK_MOUSE_DOWN"/> <suffix name="LINK_TAP_UNCONFIRMED" label="LINK_TAP_UNCONFIRMED"/> <suffix name="LINK_TAP_DOWN" label="LINK_TAP_DOWN"/> @@ -121269,7 +124965,11 @@ <histogram_suffixes name="ServiceWorker.NavigationHintLatency"> <suffix name="IsRunningNavigationHintTask" - label="Starting a service worker for a navigation hint."/> + label="Starting a service worker for a navigation hint."> + <obsolete> + This experiment was turned down, see https://crbug.com/616502. + </obsolete> + </suffix> <affected-histogram name="Event.Latency.TouchToFirstScrollUpdateSwapBegin"/> <affected-histogram name="Event.Latency.TouchToScrollUpdateSwapBegin"/> </histogram_suffixes> @@ -121449,6 +125149,13 @@ <affected-histogram name="SessionRestore.ForegroundTabFirstPaint3"/> </histogram_suffixes> +<histogram_suffixes name="SettingsResetPromptSettingType"> + <suffix name="DefaultSearch" label="Reset state for default search engine."/> + <suffix name="StartupUrls" label="Reset state for startup URLs."/> + <suffix name="Homepage" label="Reset state for homepage."/> + <affected-histogram name="SettingsResetPrompt.ResetState"/> +</histogram_suffixes> + <histogram_suffixes name="SetupInstallTimes" separator="."> <suffix name="background" label="Background; lowered priority."/> <affected-histogram name="Setup.Install.ApplyArchivePatchTime"/> @@ -121648,7 +125355,12 @@ <suffix name="Activity" label="Activity"/> <suffix name="Affiliation" label="Affiliation"/> <suffix name="AppCache" label="AppCache"/> - <suffix name="BookmarkImages" label="BookmarkImages"/> + <suffix name="BackgroundRequestQueue" label="BackgroundRequestQueue"/> + <suffix name="BookmarkImages" label="BookmarkImages"> + <obsolete> + Deprecated as of 2016-1 (http://crrev.com/372327). + </obsolete> + </suffix> <suffix name="Cookie" label="Cookie"/> <suffix name="DatabaseTracker" label="DatabaseTracker"/> <suffix name="DomainBoundCerts" label="DomainBoundCerts"/> @@ -121656,12 +125368,17 @@ <suffix name="History" label="History"/> <suffix name="OfflinePageMetadata" label="OfflinePageMetadata"/> <suffix name="Passwords" label="Passwords"/> + <suffix name="Precache" label="Precache"/> <suffix name="Predictor" label="Predictor"/> <suffix name="PreviewsOptOut" label="PreviewsOptOut"/> <suffix name="Quota" label="Quota"/> <suffix name="Shortcuts" label="Shortcuts"/> <suffix name="SyncDirectory" label="SyncDirectory"/> - <suffix name="Text" label="Text (obsolete 7/24/13)"/> + <suffix name="Text" label="Text (obsolete 7/24/13)"> + <obsolete> + Deprecated as of 2013-07. + </obsolete> + </suffix> <suffix name="Thumbnail" label="Thumbnail"/> <suffix name="TopSites" label="TopSites"/> <suffix name="Web" label="Web"/> @@ -121675,6 +125392,14 @@ <affected-histogram name="Sqlite.Version"/> </histogram_suffixes> +<histogram_suffixes name="SqliteVfsOperations" separator="_"> + <owner>shess@chromium.org</owner> + <suffix name="Fetch" label="fetch"/> + <suffix name="Read" label="read"/> + <suffix name="Write" label="write"/> + <affected-histogram name="Sqlite.Vfs"/> +</histogram_suffixes> + <histogram_suffixes name="SSLFalseStart"> <obsolete> Removed 2011-06-01. @@ -121795,6 +125520,16 @@ <affected-histogram name="WebRTC.Stun.SuccessPercent.UnknownNAT"/> </histogram_suffixes> +<histogram_suffixes name="SubresourceFilterOnlyExperiment" separator="."> + <suffix name="SocialEngineeringAdsInterstitial" + label="social eng ad blacklist pattern"/> + <suffix name="PhishingInterstitial" label="phishing blacklist pattern"/> + <suffix name="SubresourceFilterOnly" label="subresource filter only patern"/> + <affected-histogram name="SubresourceFilter.PageLoad.RedirectChainLength"/> + <affected-histogram + name="SubresourceFilter.PageLoad.RedirectChainMatchPattern"/> +</histogram_suffixes> + <histogram_suffixes name="SyncModelType" separator="."> <suffix name="APP" label="APP"/> <suffix name="APP_LIST" label="APP_LIST"/> @@ -121830,6 +125565,7 @@ <suffix name="PRIORITY_PREFERENCE" label="PRIORITY_PREFERENCE"/> <suffix name="THEME" label="THEME"/> <suffix name="TYPED_URL" label="TYPED_URL"/> + <suffix name="USER_EVENT" label="USER_EVENT"/> <suffix name="WIFI_CREDENTIAL" label="WIFI_CREDENTIAL"/> <affected-histogram name="Sync.ModelTypeCount"/> </histogram_suffixes> @@ -122095,6 +125831,24 @@ <affected-histogram name="Setup.Install.LzmaUnPackStatus"/> </histogram_suffixes> +<histogram_suffixes name="UserClasses" separator="."> + <suffix name="RareNTPUser" label="Rare NTP user"/> + <suffix name="ActiveNTPUser" label="Active NTP user"/> + <suffix name="ActiveSuggestionsConsumer" label="Active suggestions consumer"/> + <affected-histogram + name="NewTabPage.ContentSuggestions.TimeUntilFirstSoftTrigger"/> + <affected-histogram + name="NewTabPage.ContentSuggestions.TimeUntilPersistentFetch"/> + <affected-histogram name="NewTabPage.ContentSuggestions.TimeUntilSoftFetch"/> +</histogram_suffixes> + +<histogram_suffixes name="UserScriptRunLocation" separator="."> + <suffix name="DocumentStart" label="Scripts with run_at: document_start."/> + <suffix name="DocumentEnd" label="Scripts with run_at: document_end."/> + <suffix name="DocumentIdle" label="Scripts with run_at: document_idle."/> + <affected-histogram name="Extensions.InjectedScriptExecutionTime"/> +</histogram_suffixes> + <histogram_suffixes name="V8SpecialApps" separator="."> <suffix name="calendar" label="Custom histogram for Calendar"/> <suffix name="docs" label="Custom histogram for Google Docs and Drive"/> @@ -122111,6 +125865,27 @@ <affected-histogram name="V8.MemoryHeapUsed"/> </histogram_suffixes> +<histogram_suffixes name="V8WasmSeparateAsmAndWasm" separator="."> + <suffix name="asm" label="This histogram contains results for asm.js"/> + <suffix name="wasm" label="This histogram contains results for WASM modules"/> + <affected-histogram name="V8.WasmCompileModuleMicroSeconds"/> + <affected-histogram name="V8.WasmDecodeFunctionMicroSeconds"/> + <affected-histogram name="V8.WasmDecodeModuleMicroSeconds"/> + <affected-histogram name="V8.WasmDecodeModulePeakMemoryBytes"/> + <affected-histogram name="V8.WasmFunctionSizeBytes"/> + <affected-histogram name="V8.WasmFunctionsPerModule"/> + <affected-histogram name="V8.WasmInstantiateModuleMicroSeconds"/> + <affected-histogram name="V8.WasmMaxMemPagesCount"/> + <affected-histogram name="V8.WasmMinMemPagesCount"/> + <affected-histogram name="V8.WasmModuleSizeBytes"/> +</histogram_suffixes> + +<histogram_suffixes name="VideoAdaptationReason" separator="."> + <suffix name="Cpu" label="Adapt reason: cpu."/> + <suffix name="Quality" label="Adapt reason: quality."/> + <affected-histogram name="WebRTC.Video.AdaptChangesPerMinute"/> +</histogram_suffixes> + <histogram_suffixes name="VideoEncodedQpStats" separator="."> <suffix name="H264" label="Video codec: H264. QP range: 0-51. No spatial layers."/> @@ -122276,7 +126051,11 @@ <suffix name="Copy"/> <suffix name="Paste"/> <suffix name="CreateHostedApp"/> - <suffix name="CreateShortcuts"/> + <suffix name="CreateShortcuts"> + <obsolete> + Deprecated as of 04/2017. Replaced by Bookmark Apps (CreateHostedApp). + </obsolete> + </suffix> <suffix name="ManageExtensions"/> <suffix name="TaskManager"/> <suffix name="ClearBrowsingData"/>
diff --git a/tools/metrics/histograms/presubmit_scheme_histograms.py b/tools/metrics/histograms/presubmit_scheme_histograms.py new file mode 100644 index 0000000..4adccb98 --- /dev/null +++ b/tools/metrics/histograms/presubmit_scheme_histograms.py
@@ -0,0 +1,31 @@ +# Copyright 2017 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. + +"""Check to see if the ShouldAllowOpenURLFailureScheme enum in histograms.xml +needs to be updated. This can be called from a chromium PRESUBMIT.py to ensure +updates to the enum in chrome_content_browser_client_extensions_part.cc also +include the generated changes to histograms.xml. +""" + +import update_histogram_enum + +def PrecheckShouldAllowOpenURLEnums(input_api, output_api): + source_file = 'chrome/browser/extensions/' \ + 'chrome_content_browser_client_extensions_part.cc' + + affected_files = (f.LocalPath() for f in input_api.AffectedFiles()) + if source_file not in affected_files: + return [] + + if update_histogram_enum.HistogramNeedsUpdate( + histogram_enum_name='ShouldAllowOpenURLFailureScheme', + source_enum_path=source_file, + start_marker='^enum ShouldAllowOpenURLFailureScheme {', + end_marker='^SCHEME_LAST'): + return [output_api.PresubmitPromptWarning( + 'ShouldAllowOpenURLFailureScheme has been updated but histogram.xml ' + 'does not appear to be updated.\nPlease run:\n' + ' python tools/metrics/histograms/' + 'update_should_allow_open_url_histograms.py\n')] + return []
diff --git a/tools/metrics/histograms/update_histogram_enum.py b/tools/metrics/histograms/update_histogram_enum.py index db9037f..7c21823 100644 --- a/tools/metrics/histograms/update_histogram_enum.py +++ b/tools/metrics/histograms/update_histogram_enum.py
@@ -38,7 +38,8 @@ def ReadHistogramValues(filename, start_marker, end_marker): - """Returns a dictionary of enum values, read from a C++ file. + """Returns a dictionary of enum values and a pair of labels that have the same + enum values, read from a C++ file. Args: filename: The unix-style path (relative to src/) of the file to open. @@ -75,13 +76,16 @@ label = m.group(1) else: continue + # If two enum labels have the same value + if enum_value in result: + return result, (result[enum_value], label) result[enum_value] = label enum_value += 1 else: if START_REGEX.match(line): inside_enum = True enum_value = 0 - return result + return result, None def CreateEnumItemNode(document, value, label): @@ -180,12 +184,14 @@ end_marker: A regular expression that matches the end of the C++ enum. """ Log('Reading histogram enum definition from "{0}".'.format(source_enum_path)) - source_enum_values = ReadHistogramValues(source_enum_path, start_marker, - end_marker) + source_enum_values, duplicated_values = ReadHistogramValues( + source_enum_path, start_marker, end_marker) + if duplicated_values: + return False, duplicated_values (xml, new_xml) = _GetOldAndUpdatedXml(histogram_enum_name, source_enum_values, source_enum_path) - return xml != new_xml + return xml != new_xml, None def UpdateHistogramFromDict(histogram_enum_name, source_enum_values, @@ -221,8 +227,8 @@ """ Log('Reading histogram enum definition from "{0}".'.format(source_enum_path)) - source_enum_values = ReadHistogramValues(source_enum_path, start_marker, - end_marker) + source_enum_values, ignored = ReadHistogramValues(source_enum_path, + start_marker, end_marker) UpdateHistogramFromDict(histogram_enum_name, source_enum_values, source_enum_path)
diff --git a/tools/metrics/histograms/update_should_allow_open_url_histograms.py b/tools/metrics/histograms/update_should_allow_open_url_histograms.py new file mode 100644 index 0000000..2b16c4f --- /dev/null +++ b/tools/metrics/histograms/update_should_allow_open_url_histograms.py
@@ -0,0 +1,27 @@ +# Copyright 2017 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. + +"""Updates the ShouldAllowOpenURLFailureScheme enum in histograms.xml file with +values read from chrome_content_browser_client_extensions_part.cc. + +If the file was pretty-printed, the updated version is pretty-printed too. +""" + +import os +import sys + +from update_histogram_enum import UpdateHistogramEnum + +if __name__ == '__main__': + if len(sys.argv) > 1: + print >>sys.stderr, 'No arguments expected!' + sys.stderr.write(__doc__) + sys.exit(1) + + source_file = 'chrome/browser/extensions/' \ + 'chrome_content_browser_client_extensions_part.cc' + UpdateHistogramEnum(histogram_enum_name='ShouldAllowOpenURLFailureScheme', + source_enum_path=source_file, + start_marker='^enum ShouldAllowOpenURLFailureScheme {', + end_marker='^SCHEME_LAST')
diff --git a/tools/metrics/histograms/update_use_counter_feature_enum.py b/tools/metrics/histograms/update_use_counter_feature_enum.py index a2493c8..45a369b 100755 --- a/tools/metrics/histograms/update_use_counter_feature_enum.py +++ b/tools/metrics/histograms/update_use_counter_feature_enum.py
@@ -38,7 +38,8 @@ END_MARKER = '^NumberOfFeatures' if options.dashboard: - enum_dict = ReadHistogramValues(source_path, START_MARKER, END_MARKER) + enum_dict, ignored = ReadHistogramValues(source_path, START_MARKER, + END_MARKER) PrintEnumForDashboard(enum_dict) else: UpdateHistogramEnum(
diff --git a/tools/metrics/rappor/rappor.xml b/tools/metrics/rappor/rappor.xml index 032092f..9e90e2042 100644 --- a/tools/metrics/rappor/rappor.xml +++ b/tools/metrics/rappor/rappor.xml
@@ -1362,6 +1362,17 @@ </summary> </rappor-metric> +<rappor-metric name="Media.Video.Autoplay.Muted.DualSource.Frame" + type="ETLD_PLUS_ONE"> + <owner>avayvod@chromium.org</owner> + <owner>mlamouri@chromium.org</owner> + <owner>zqzhang@chromium.org</owner> + <summary> + The eTLD+1 of the frame URL that has an autoplay muted video by both + attribute and play() method. + </summary> +</rappor-metric> + <rappor-metric name="Media.Video.Autoplay.Muted.PlayMethod.Frame" type="ETLD_PLUS_ONE"> <owner>avayvod@chromium.org</owner> @@ -1373,6 +1384,16 @@ </summary> </rappor-metric> +<rappor-metric name="Media.VideoPersistence.TopFrame" type="ETLD_PLUS_ONE"> + <owner>mlamouri@chromium.org</owner> + <owner>peconn@chromium.org</owner> + <owner>zqzhang@chromium.org</owner> + <summary> + The eTLD+1 of the top frame of the tab when a video persistence session is + initialized. + </summary> +</rappor-metric> + <rappor-metric name="NTP.ExplicitUserAction.PageNavigation.NTPTileClick" type="UMA_RAPPOR_TYPE"> <owner>knn@chromium.org</owner>
diff --git a/tools/metrics/ukm/OWNERS b/tools/metrics/ukm/OWNERS new file mode 100644 index 0000000..227946e --- /dev/null +++ b/tools/metrics/ukm/OWNERS
@@ -0,0 +1,3 @@ +# Metrics changes should always be reviewed by owners. +per-file ukm.xml=file://tools/metrics/OWNERS +per-file ukm.xml=set noparent
diff --git a/tools/metrics/ukm/PRESUBMIT.py b/tools/metrics/ukm/PRESUBMIT.py new file mode 100644 index 0000000..41c5426 --- /dev/null +++ b/tools/metrics/ukm/PRESUBMIT.py
@@ -0,0 +1,35 @@ +# Copyright 2017 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. + +"""Presubmit script for ukm.xml. + +See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts +for more details on the presubmit API built into gcl. +""" + +UKM_XML = 'ukm.xml' + + +def CheckChange(input_api, output_api): + """Checks that ukm.xml is pretty-printed and well-formatted.""" + for f in input_api.AffectedTextFiles(): + p = f.AbsoluteLocalPath() + if (input_api.basename(p) == UKM_XML + and input_api.os_path.dirname(p) == input_api.PresubmitLocalPath()): + cwd = input_api.os_path.dirname(p) + exit_code = input_api.subprocess.call( + ['python', 'pretty_print.py', '--presubmit'], cwd=cwd) + if exit_code != 0: + return [output_api.PresubmitError( + '%s is not formatted correctly; run %s/pretty_print.py to fix' % + (UKM_XML, input_api.PresubmitLocalPath()))] + return [] + + +def CheckChangeOnUpload(input_api, output_api): + return CheckChange(input_api, output_api) + + +def CheckChangeOnCommit(input_api, output_api): + return CheckChange(input_api, output_api)
diff --git a/tools/metrics/ukm/model.py b/tools/metrics/ukm/model.py new file mode 100644 index 0000000..f0c7ebe --- /dev/null +++ b/tools/metrics/ukm/model.py
@@ -0,0 +1,61 @@ +# Copyright 2017 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. +# """Model objects for ukm.xml contents.""" + +import os +import sys + +sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'common')) +import models + +# Model definitions for ukm.xml content +_OBSOLETE_TYPE = models.TextNodeType('obsolete') +_OWNER_TYPE = models.TextNodeType('owner', single_line=True) +_SUMMARY_TYPE = models.TextNodeType('summary') + +_LOWERCASE_NAME_FN = lambda n: n.attributes['name'].value.lower() + +_METRIC_TYPE = models.ObjectNodeType( + 'metric', + attributes=[('name', unicode)], + children=[ + models.ChildType('obsolete', _OBSOLETE_TYPE, False), + models.ChildType('owners', _OWNER_TYPE, True), + models.ChildType('summary', _SUMMARY_TYPE, False), + ]) + +_EVENT_TYPE = models.ObjectNodeType( + 'event', + alphabetization=('metric', _LOWERCASE_NAME_FN), + attributes=[('name', unicode)], + extra_newlines=(1, 1, 1), + children=[ + models.ChildType('obsolete', _OBSOLETE_TYPE, False), + models.ChildType('owners', _OWNER_TYPE, True), + models.ChildType('summary', _SUMMARY_TYPE, False), + models.ChildType('metrics', _METRIC_TYPE, True), + ]) + +_UKM_CONFIGURATION_TYPE = models.ObjectNodeType( + 'ukm-configuration', + extra_newlines=(2, 1, 1), + indent=False, + children=[ + models.ChildType('events', _EVENT_TYPE, True), + ]) + +UKM_XML_TYPE = models.DocumentType(_UKM_CONFIGURATION_TYPE) + +def UpdateXML(original_xml): + """Parses the original xml and return a pretty printed version. + + Args: + original_xml: A string containing the original xml file contents. + + Returns: + A pretty-printed xml string, or None if the config contains errors. + """ + config = UKM_XML_TYPE.Parse(original_xml) + + return UKM_XML_TYPE.PrettyPrint(config)
diff --git a/tools/metrics/ukm/pretty_print.py b/tools/metrics/ukm/pretty_print.py new file mode 100755 index 0000000..8398ed3 --- /dev/null +++ b/tools/metrics/ukm/pretty_print.py
@@ -0,0 +1,21 @@ +#!/usr/bin/env python +# Copyright 2017 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. + +import os +import sys + +import model +sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'common')) +import presubmit_util + + + +def main(argv): + presubmit_util.DoPresubmitMain(argv, 'ukm.xml', 'ukm.old.xml', + 'pretty_print.py', model.UpdateXML) + + +if '__main__' == __name__: + sys.exit(main(sys.argv))
diff --git a/tools/metrics/ukm/pretty_print_test.py b/tools/metrics/ukm/pretty_print_test.py new file mode 100755 index 0000000..8f23cd7f --- /dev/null +++ b/tools/metrics/ukm/pretty_print_test.py
@@ -0,0 +1,42 @@ +#!/usr/bin/env python +# Copyright 2017 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. + +import unittest + +import model + + +PRETTY_XML = """ +<!-- Comment1 --> + +<ukm-configuration> + +<event name="Event1"> + <owner>owner@chromium.org</owner> + <summary> + Event1 summary. + </summary> + <metric name="Metric1"> + <owner>owner2@chromium.org</owner> + <summary> + Metric1 summary. + </summary> + </metric> + <metric name="Metric2"/> +</event> + +</ukm-configuration> +""".strip() + + +class UkmXmlTest(unittest.TestCase): + + def testIsPretty(self): + result = model.UpdateXML(PRETTY_XML) + self.assertMultiLineEqual(PRETTY_XML, result.strip()) + + +if __name__ == '__main__': + unittest.main()
diff --git a/tools/metrics/ukm/ukm.xml b/tools/metrics/ukm/ukm.xml new file mode 100644 index 0000000..541f1f6 --- /dev/null +++ b/tools/metrics/ukm/ukm.xml
@@ -0,0 +1,215 @@ +<!-- +Copyright 2017 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. +--> + +<!-- +This file is used to generate a comprehensive list of Chrome UKM metrics +along with a detailed description for each metric. +--> + +<ukm-configuration> + +<event name="Autofill.CardUploadDecision"> + <owner>sebsg@chromium.org</owner> + <metric name="UploadDecision"> + <summary> + Whether the upload was proposed to the user or the reason why it was not. + </summary> + </metric> +</event> + +<event name="Autofill.DeveloperEngagement"> + <owner>csashi@google.com</owner> + <summary> + Recorded when we parse a form to log whether developer has used autocomplete + markup or UPI-VPA hints. + </summary> + <metric name="DeveloperEngagement"/> +</event> + +<event name="Autofill.FormSubmitted"> + <owner>csashi@google.com</owner> + <summary> + Recorded when user submits a form. + </summary> + <metric name="AutofillFormSubmittedState"> + <summary> + Whether form's fields were all autofilled, some fields were autofilled, or + none of the field were autofilled. See |AutofillFormSubmittedState|. + </summary> + </metric> + <metric name="MillisecondsSinceFormLoaded"> + <summary> + Time since form parse. + </summary> + </metric> +</event> + +<event name="Autofill.InteractedWithForm"> + <owner>csashi@google.com</owner> + <summary> + Recorded when we parse a form to log form metadata and autofill settings + that apply to all subsequent events for this form. + </summary> + <metric name="IsForCreditCard"> + <summary> + True for credit card forms, false for address/profile forms. + </summary> + </metric> + <metric name="LocalRecordTypeCount"> + <summary> + Number of local credit cards or local autofill profiles. + </summary> + </metric> + <metric name="ServerRecordTypeCount"> + <summary> + Number of masked and full server credit cards or server autofill profiles. + </summary> + </metric> +</event> + +<event name="Autofill.SuggestionsShown"> + <owner>csashi@google.com</owner> + <metric name="MillisecondsSinceFormLoaded"> + <summary> + Time since form parse. + </summary> + </metric> +</event> + +<event name="Autofill.SelectedMaskedServerCard"> + <owner>csashi@google.com</owner> + <metric name="MillisecondsSinceFormLoaded"> + <summary> + Time since form parse. + </summary> + </metric> +</event> + +<event name="Autofill.SuggestionFilled"> + <owner>csashi@google.com</owner> + <summary> + Recorded when user selects a suggestion and we fill the form with that + suggestion. + </summary> + <metric name="MillisecondsSinceFormLoaded"> + <summary> + Time since form parse. + </summary> + </metric> + <metric name="RecordType"> + <summary> + Whether the suggestion was from a local card/autofill profile or from a + server card/autofill profile. + </summary> + </metric> +</event> + +<event name="Autofill.TextFieldDidChange"> + <owner>csashi@google.com</owner> + <summary> + Recorded when user edits a text field. The text field may have been + autofilled. + </summary> + <metric name="FieldTypeGroup"> + <summary> + Field's |FieldTypeGroup|. See |AutofillType.group()|. + </summary> + </metric> + <metric name="HeuristicType"> + <summary> + Field's |ServerFieldType| based on heuristics. See + |AutofillField.heuristic_type()|. + </summary> + </metric> + <metric name="HtmlFieldMode"> + <summary> + Whether the field's autocomplete hint specified 'billing' or 'shipping'. + See |AutofillField.html_mode()|. + </summary> + </metric> + <metric name="HtmlFieldType"> + <summary> + Field's autocomplete field type hint. See |AutofillField.html_type()|. + </summary> + </metric> + <metric name="IsAutofilled"> + <summary> + True whether field was autofilled. See |AutofillField.is_autofilled|. + </summary> + </metric> + <metric name="MillisecondsSinceFormLoaded"> + <summary> + Time since form parse. + </summary> + </metric> + <metric name="ServerType"> + <summary> + Field's |ServerFieldType| returned by server. See + |AutofillField.server_type()|. + </summary> + </metric> +</event> + +<event name="PageLoad"> + <owner>bmcquade@chromium.org</owner> + <summary> + Recorded when Pageload observer events fire. + </summary> + <metric name="DocumentTiming.NavigationToDOMContentLoadedEventFired"> + <summary> + Time from navigation to dom content loaded in ms. + </summary> + </metric> + <metric name="DocumentTiming.NavigationToLoadEventFired"/> + <metric name="Experimental.PaintTiming.NavigationToFirstMeaningfulPaint"/> + <metric name="Navigation.PageTransition"/> + <metric name="Net.EffectiveConnectionType.OnNavigationStart"/> + <metric name="Net.ErrorCode.OnFailedProvisionalLoad"/> + <metric name="PageTiming.ForegroundDuration"/> + <metric name="PageTiming.NavigationToFailedProvisionalLoad"/> + <metric name="PaintTiming.NavigationToFirstContentfulPaint"/> + <metric name="ParseTiming.NavigationToParseStart"> + <summary> + Time from navigation to parse start in ms. + </summary> + </metric> +</event> + +<event name="PaymentRequest.CheckoutEvents"> + <owner>sebsg@chromium.org</owner> + <metric name="CompletionsStatus"> + <summary> + How the Payment Request ended. Values defined in the CompletionStatus enum + of components/payments/core/journey_logger.h. + </summary> + </metric> + <metric name="Events"> + <summary> + Bitfield representing the events that occurred during the Payment Request. + Values defined in the Event enum of + components/payments/core/journey_logger.h. + </summary> + </metric> +</event> + +<event name="Translate"> + <owner>hamelphi@chromium.org</owner> + <summary> + Metrics related to a Translate event. These metrics are described in + TranslateEventProto. + </summary> + <metric name="AcceptCount"/> + <metric name="Country"/> + <metric name="DeclineCount"/> + <metric name="EventType"/> + <metric name="IgnoreCount"/> + <metric name="RankerResponse"/> + <metric name="RankerVersion"/> + <metric name="SourceLanguage"/> + <metric name="TargetLanguage"/> +</event> + +</ukm-configuration>
diff --git a/tools/origin_trials/check_token.py b/tools/origin_trials/check_token.py new file mode 100755 index 0000000..99a5dfa --- /dev/null +++ b/tools/origin_trials/check_token.py
@@ -0,0 +1,220 @@ +#!/usr/bin/env python +# Copyright (c) 2017 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. + +"""Utility for validating and inspecting origin trial tokens + +usage: check_token.py [-h] [--use-chrome-key | + --use-test-key | + --private-key-file KEY_FILE] + "base64-encoded token" + +Run "check_token.py -h" for more help on usage. +""" +import argparse +import base64 +from datetime import datetime +import json +import os +import struct +import sys +import time + +script_dir = os.path.dirname(os.path.realpath(__file__)) +sys.path.insert(0, os.path.join(script_dir, 'third_party', 'ed25519')) +import ed25519 + +# Version is a 1-byte field at offset 0. +# - To support version-dependent formats, the version number must be the first +# first part of the token. +VERSION_OFFSET = 0 +VERSION_SIZE = 1 + +# These constants define the Version 2 field sizes and offsets. +# Contents are: version|signature|payload length|payload +SIGNATURE_OFFSET = VERSION_OFFSET + VERSION_SIZE +SIGNATURE_SIZE = 64 +PAYLOAD_LENGTH_OFFSET = SIGNATURE_OFFSET + SIGNATURE_SIZE +PAYLOAD_LENGTH_SIZE = 4 +PAYLOAD_OFFSET = PAYLOAD_LENGTH_OFFSET + PAYLOAD_LENGTH_SIZE + +# This script only supports Version 2 tokens. +VERSION2 = "\x02" + +# Chrome public key, used by default to validate signatures +# - Copied from chrome/common/origin_trials/chrome_origin_trial_policy.cc +CHROME_PUBLIC_KEY = [ + 0x7c, 0xc4, 0xb8, 0x9a, 0x93, 0xba, 0x6e, 0xe2, 0xd0, 0xfd, 0x03, + 0x1d, 0xfb, 0x32, 0x66, 0xc7, 0x3b, 0x72, 0xfd, 0x54, 0x3a, 0x07, + 0x51, 0x14, 0x66, 0xaa, 0x02, 0x53, 0x4e, 0x33, 0xa1, 0x15, +] + +# Default key file, relative to script_dir. +DEFAULT_KEY_FILE = 'eftest.key' + + +class OverrideKeyFileAction(argparse.Action): + def __init__(self, option_strings, dest, **kwargs): + super(OverrideKeyFileAction, self).__init__( + option_strings, dest, **kwargs) + def __call__(self, parser, namespace, values, option_string=None): + setattr(namespace, "use_chrome_key", None) + setattr(namespace, self.dest, values) + +def main(): + parser = argparse.ArgumentParser( + description="Inspect origin trial tokens") + parser.add_argument("token", + help="Token to be checked (must be Base64 encoded)") + + key_group = parser.add_mutually_exclusive_group() + key_group.add_argument("--use-chrome-key", + help="Validate token using the real Chrome public key", + dest="use_chrome_key", + action="store_true") + key_group.add_argument("--use-test-key", + help="Validate token using the eftest.key", + dest="use_chrome_key", + action="store_false") + key_group.add_argument("--key-file", + help="Ed25519 private key file to validate the token", + dest="key_file", + action=OverrideKeyFileAction) + parser.set_defaults(use_chrome_key=False) + + args = parser.parse_args() + + # Figure out which public key to use: Chrome, test key (default option), or + # key file provided on command line. + public_key = None + private_key_file = None + if (args.use_chrome_key is None): + private_key_file = args.key_file + else: + if (args.use_chrome_key): + public_key = "".join(chr(x) for x in CHROME_PUBLIC_KEY) + else: + # Use the test key, relative to this script. + private_key_file = os.path.join(script_dir, DEFAULT_KEY_FILE) + + # If not using the Chrome public key, extract the public key from either the + # test key file, or the private key file provided on the command line. + if public_key is None: + try: + key_file = open(os.path.expanduser(private_key_file), mode="rb") + except IOError as exc: + print "Unable to open key file: %s" % private_key_file + print "(%s)" % exc + sys.exit(1) + + private_key = key_file.read(64) + + # Validate that the key file read was a proper Ed25519 key -- running the + # publickey method on the first half of the key should return the second + # half. + if (len(private_key) < 64 or + ed25519.publickey(private_key[:32]) != private_key[32:]): + print "Unable to use the specified private key file." + sys.exit(1) + + public_key = private_key[32:] + + try: + token_contents = base64.b64decode(args.token) + except TypeError as exc: + print "Error decoding the token (%s)" % exc + sys.exit(1) + + + # Only version 2 currently supported. + if (len(token_contents) < (VERSION_OFFSET + VERSION_SIZE)): + print "Token is malformed - too short." + sys.exit(1) + + version = token_contents[VERSION_OFFSET:(VERSION_OFFSET + VERSION_SIZE)] + if (version != VERSION2): + # Convert the version string to a number + version_number = 0 + for x in version: + version_number <<= 8 + version_number += ord(x) + print "Token has wrong version: %d" % version_number + sys.exit(1) + + # Token must be large enough to contain a version, signature, and payload + # length. + minimum_token_length = PAYLOAD_LENGTH_OFFSET + PAYLOAD_LENGTH_SIZE + if (len(token_contents) < minimum_token_length): + print "Token is malformed - too short: %d bytes, minimum is %d" % \ + (len(token_contents), minimum_token_length) + sys.exit(1) + + # Extract the length of the signed data (Big-endian). + # (unpack returns a tuple). + payload_length = struct.unpack_from(">I", token_contents, + PAYLOAD_LENGTH_OFFSET)[0] + + # Validate that the stated length matches the actual payload length. + actual_payload_length = len(token_contents) - PAYLOAD_OFFSET + if (payload_length != actual_payload_length): + print "Token is %d bytes, expected %d" % (actual_payload_length, + payload_length) + sys.exit(1) + + # Extract the version-specific contents of the token. + # Contents are: version|signature|payload length|payload + signature = token_contents[SIGNATURE_OFFSET:PAYLOAD_LENGTH_OFFSET] + + # The data which is covered by the signature is (version + length + payload). + signed_data = version + token_contents[PAYLOAD_LENGTH_OFFSET:] + + # Validate the signature on the data. + try: + ed25519.checkvalid(signature, signed_data, public_key) + except Exception as exc: + print "Signature invalid (%s)" % exc + sys.exit(1) + + try: + payload = token_contents[PAYLOAD_OFFSET:].decode('utf-8') + except UnicodeError as exc: + print "Unable to decode token contents (%s)" % exc + sys.exit(1) + + try: + token_data = json.loads(payload) + except Exception as exc: + print "Unable to parse payload (%s)" % exc + print "Payload: %s" % payload + sys.exit(1) + + print + print "Token data: %s" % token_data + print + + # Extract the required fields + for field in ["origin", "feature", "expiry"]: + if not token_data.has_key(field): + print "Token is missing required field: %s" % field + sys.exit(1) + + origin = token_data["origin"] + trial_name = token_data["feature"] + expiry = token_data["expiry"] + + # Extract the optional fields + is_subdomain = token_data.get("isSubdomain") + + # Output the token details + print "Token details:" + print " Origin: %s" % origin + print " Is Subdomain: %s" % is_subdomain + print " Feature: %s" % trial_name + print " Expiry: %d (%s UTC)" % (expiry, datetime.utcfromtimestamp(expiry)) + print " Signature: %s" % ", ".join('0x%02x' % ord(x) for x in signature) + print " Signature (Base64): %s" % base64.b64encode(signature) + print + +if __name__ == "__main__": + main()
diff --git a/tools/origin_trials/generate_token.py b/tools/origin_trials/generate_token.py index 35ca521..ea52984 100755 --- a/tools/origin_trials/generate_token.py +++ b/tools/origin_trials/generate_token.py
@@ -180,6 +180,7 @@ print " Feature: %s" % args.trial_name print " Expiry: %d (%s UTC)" % (expiry, datetime.utcfromtimestamp(expiry)) print " Signature: %s" % ", ".join('0x%02x' % ord(x) for x in signature) + print " Signature (Base64): %s" % base64.b64encode(signature) print # Output the properly-formatted token.
diff --git a/tools/perf/OWNERS b/tools/perf/OWNERS index 596f984..e89141fb 100644 --- a/tools/perf/OWNERS +++ b/tools/perf/OWNERS
@@ -1,11 +1,11 @@ -achuith@chromium.org -aiolos@chromium.org -dtu@chromium.org -eakuefner@chromium.org +charliea@chromium.org nednguyen@google.com -skyostil@chromium.org sullivan@chromium.org -zhenw@chromium.org + +# For changes related to ChromeOS. +achuith@chromium.org + +# For changes related to generate_perf_json. eyaich@chromium.org # Simple rubberstamp-only oilpan-related changes. @@ -16,13 +16,3 @@ # For page_cycler and loading benchmarks related changes. kouhei@chromium.org - -# emeritus: -# marja@chromium.org -# nduca@chromium.org -# petrcermak@chromium.org -# qyearsley@chromium.org -# tonyg@chromium.org - -# TEAM: benchmarking-dev@chromium.org -# COMPONENT: Speed>Benchmarking
diff --git a/tools/perf/PRESUBMIT.py b/tools/perf/PRESUBMIT.py index 13815ee7..5c02969 100644 --- a/tools/perf/PRESUBMIT.py +++ b/tools/perf/PRESUBMIT.py
@@ -32,10 +32,13 @@ chromium_src_dir, 'third_party', 'catapult', 'telemetry') experimental_dir = input_api.os_path.join( chromium_src_dir, 'third_party', 'catapult', 'experimental') + tracing_dir = input_api.os_path.join( + chromium_src_dir, 'third_party', 'catapult', 'tracing') return [ telemetry_dir, input_api.os_path.join(telemetry_dir, 'third_party', 'mock'), experimental_dir, + tracing_dir, ] @@ -51,7 +54,7 @@ perf_dir = input_api.PresubmitLocalPath() out, return_code = _RunArgs([ input_api.python_executable, - input_api.os_path.join(perf_dir, 'generate_perf_json.py'), + input_api.os_path.join(perf_dir, 'generate_perf_data'), '--validate-only'], input_api) if return_code: results.append(output_api.PresubmitError(
diff --git a/tools/perf/benchmark.csv b/tools/perf/benchmark.csv new file mode 100644 index 0000000..4a0565a8 --- /dev/null +++ b/tools/perf/benchmark.csv
@@ -0,0 +1,211 @@ +AUTOGENERATED FILE DO NOT EDIT +See //tools/perf/generate_perf_data.py to make changes +Benchmark name,Individual owners,Component +angle_perftests,jmadill@chromium.org, +battor.steady_state,charliea@chromium.org, +battor.trivial_pages,charliea@chromium.org, +blink_perf.bindings,"yukishiino@chromium.org, bashi@chromium.org, haraken@chromium.org", +blink_perf.blink_gc,, +blink_perf.canvas,junov@chromium.org, +blink_perf.css,rune@opera.com, +blink_perf.dom,"yukishiino@chromium.org, bashi@chromium.org, haraken@chromium.org", +blink_perf.events,hayato@chromium.org, +blink_perf.layout,eae@chromium.org, +blink_perf.paint,wangxianzhu@chromium.org, +blink_perf.parser,"yukishiino@chromium.org, bashi@chromium.org, haraken@chromium.org", +blink_perf.pywebsocket,"tyoshino@chromium.org, yhirano@chromium.org", +blink_perf.shadow_dom,hayato@chromium.org, +blink_perf.svg,"kouhei@chromium.org, fs@opera.com", +blink_perf.xml_http_request,"tyoshino@chromium.org, hiroshige@chromium.org", +blink_style.key_mobile_sites,, +blink_style.polymer,, +blink_style.top_25,, +blob_storage.blob_storage,, +cc_perftests,enne@chromium.org, +dromaeo.cssqueryjquery,"yukishiino@chromium.org, bashi@chromium.org, haraken@chromium.org", +dromaeo.domcoreattr,"yukishiino@chromium.org, bashi@chromium.org, haraken@chromium.org", +dromaeo.domcoremodify,"yukishiino@chromium.org, bashi@chromium.org, haraken@chromium.org", +dromaeo.domcorequery,"yukishiino@chromium.org, bashi@chromium.org, haraken@chromium.org", +dromaeo.domcoretraverse,"yukishiino@chromium.org, bashi@chromium.org, haraken@chromium.org", +dromaeo.jslibattrjquery,"yukishiino@chromium.org, bashi@chromium.org, haraken@chromium.org", +dromaeo.jslibattrprototype,"yukishiino@chromium.org, bashi@chromium.org, haraken@chromium.org", +dromaeo.jslibeventjquery,"yukishiino@chromium.org, bashi@chromium.org, haraken@chromium.org", +dromaeo.jslibeventprototype,"yukishiino@chromium.org, bashi@chromium.org, haraken@chromium.org", +dromaeo.jslibmodifyjquery,"yukishiino@chromium.org, bashi@chromium.org, haraken@chromium.org", +dromaeo.jslibmodifyprototype,"yukishiino@chromium.org, bashi@chromium.org, haraken@chromium.org", +dromaeo.jslibstylejquery,"yukishiino@chromium.org, bashi@chromium.org, haraken@chromium.org", +dromaeo.jslibstyleprototype,"yukishiino@chromium.org, bashi@chromium.org, haraken@chromium.org", +dromaeo.jslibtraversejquery,"yukishiino@chromium.org, bashi@chromium.org, haraken@chromium.org", +dromaeo.jslibtraverseprototype,"yukishiino@chromium.org, bashi@chromium.org, haraken@chromium.org", +dummy_benchmark.noisy_benchmark_1,, +dummy_benchmark.stable_benchmark_1,, +gpu_perftests,reveman@chromium.org, +gpu_times.gpu_rasterization.key_mobile_sites_smooth,, +gpu_times.gpu_rasterization.top_25_smooth,, +gpu_times.key_mobile_sites_smooth,, +gpu_times.top_25_smooth,, +image_decoding.image_decoding_measurement,"cblume@chromium.org, reveman@chromium.org", +jetstream,"bmeurer@chromium.org, mvstanton@chromium.org", +jitter,jaydasika@chromium.org, +kraken,"bmeurer@chromium.org, mvstanton@chromium.org", +load_library_perf_tests,, +loading.cluster_telemetry,, +loading.mobile,"kouhei@chromium.org, ksakamoto@chromium.org", +media.android.tough_video_cases,, +media.android.tough_video_cases_tbmv2,"johnchen@chromium.org, crouleau@chromium.org",Internals>Media +media.chromeOS.tough_video_cases,, +media.chromeOS4kOnly.tough_video_cases,, +media.media_cns_cases,"crouleau@chromium.org, videostack-eng@google.com", +media.mse_cases,"crouleau@chromium.org, videostack-eng@google.com", +media.tough_video_cases,, +media.tough_video_cases_extra,"crouleau@chromium.org, videostack-eng@google.com", +media.tough_video_cases_tbmv2,"johnchen@chromium.org, crouleau@chromium.org",Internals>Media +media_perftests,crouleau@chromium.org, +memory.blink_memory_mobile,bashi@chromium.org, +memory.desktop,erikchen@chromium.org, +memory.dual_browser_test,perezju@chromium.org, +memory.long_running_dual_browser_test,perezju@chromium.org, +memory.long_running_idle_gmail_background_tbmv2,ulan@chromium.org, +memory.long_running_idle_gmail_tbmv2,ulan@chromium.org, +memory.top_10_mobile,perezju@chromium.org, +memory.top_10_mobile_stress,perezju@chromium.org, +octane,"bmeurer@chromium.org, mvstanton@chromium.org", +oilpan_gc_times.blink_perf_stress,, +oilpan_gc_times.key_silk_cases,, +oilpan_gc_times.sync_scroll.key_mobile_sites_smooth,, +oilpan_gc_times.tough_animation_cases,peria@chromium.org, +oortonline,, +oortonline_tbmv2,, +page_cycler_v2.basic_oopif,nasko@chromium.org, +page_cycler_v2.intl_ar_fa_he,"kouhei@chromium.org, ksakamoto@chromium.org", +page_cycler_v2.intl_es_fr_pt-BR,"kouhei@chromium.org, ksakamoto@chromium.org", +page_cycler_v2.intl_hi_ru,"kouhei@chromium.org, ksakamoto@chromium.org", +page_cycler_v2.intl_ja_zh,"kouhei@chromium.org, ksakamoto@chromium.org", +page_cycler_v2.intl_ko_th_vi,"kouhei@chromium.org, ksakamoto@chromium.org", +page_cycler_v2.top_10_mobile,"kouhei@chromium.org, ksakamoto@chromium.org", +page_cycler_v2.tough_layout_cases,"kouhei@chromium.org, ksakamoto@chromium.org", +page_cycler_v2.typical_25,"kouhei@chromium.org, ksakamoto@chromium.org", +page_cycler_v2_site_isolation.basic_oopif,nasko@chromium.org, +performance_browser_tests,"hubbe@chromium.org, justinlin@chromium.org, miu@chromium.org", +power.android_acceptance,perezju@chromium.org, +power.idle_platform,, +power.steady_state,, +power.top_10,, +power.top_25,, +power.tough_ad_cases,skyostil@chromium.org, +power.trivial_pages,erikchen@chromium.org, +power.typical_10_mobile,perezju@chromium.org, +power.typical_10_mobile_reload,, +rasterize_and_record_micro.key_mobile_sites,, +rasterize_and_record_micro.key_silk_cases,vmpstr@chromium.org, +rasterize_and_record_micro.partial_invalidation,, +rasterize_and_record_micro.polymer,, +rasterize_and_record_micro.top_25,, +repaint.gpu_rasterization.key_mobile_sites_repaint,"wkorman@chromium.org, vmpstr@chromium.org", +repaint.key_mobile_sites_repaint,"wkorman@chromium.org, vmpstr@chromium.org", +resource_sizes,"agrieve@chromium.org, rnephew@chromium.org, perezju@chromium.org", +robohornet_pro,, +scheduler.tough_scheduling_cases,"skyostil@chromium.org, brianderson@chromium.org", +service_worker.service_worker,horo@chromium.org, +service_worker.service_worker_micro_benchmark,horo@chromium.org, +sizes (linux),thestig@chromium.org, +sizes (mac),tapted@chromium.org, +sizes (win),grt@chromium.org, +smoothness.desktop_tough_pinch_zoom_cases,ericrk@chromium.org, +smoothness.gpu_rasterization.polymer,vmiura@chromium.org, +smoothness.gpu_rasterization.top_25_smooth,vmiura@chromium.org, +smoothness.gpu_rasterization.tough_filters_cases,senorblanco@chromium.org, +smoothness.gpu_rasterization.tough_path_rendering_cases,senorblanco@chromium.org, +smoothness.gpu_rasterization.tough_pinch_zoom_cases,ericrk@chromium.org, +smoothness.gpu_rasterization.tough_scrolling_cases,ericrk@chromium.org, +smoothness.gpu_rasterization_and_decoding.image_decoding_cases,cblume@chromium.org, +smoothness.image_decoding_cases,cblume@chromium.org, +smoothness.key_desktop_move_cases,ssid@chromium.org, +smoothness.key_mobile_sites_smooth,"vmiura@chromium.org, tdresser@chromium.org", +smoothness.key_silk_cases,ajuma@chromium.org, +smoothness.maps,"kbr@chromium.org, zmo@chromium.org", +smoothness.pathological_mobile_sites,picksi@chromium.org, +smoothness.scrolling_tough_ad_cases,skyostil@chromium.org, +smoothness.simple_mobile_sites,vmiura@chromium.org, +smoothness.sync_scroll.key_mobile_sites_smooth,"tdresser@chromium.org, rbyers@chromium.org", +smoothness.top_25_smooth,vmiura@chromium.org, +smoothness.tough_ad_cases,skyostil@chromium.org, +smoothness.tough_animation_cases,alancutter@chromium.org, +smoothness.tough_canvas_cases,junov@chromium.org, +smoothness.tough_filters_cases,senorblanco@chromium.org, +smoothness.tough_image_decode_cases,, +smoothness.tough_path_rendering_cases,senorblanco@chromium.org, +smoothness.tough_pinch_zoom_cases,bokan@chromium.org, +smoothness.tough_scrolling_cases,reveman@chromium.org, +smoothness.tough_texture_upload_cases,vmiura@chromium.org, +smoothness.tough_webgl_ad_cases,skyostil@chromium.org, +smoothness.tough_webgl_cases,"kbr@chromium.org, zmo@chromium.org", +spaceport,junov@chromium.org, +speedometer,"bmeurer@chromium.org, mvstanton@chromium.org", +speedometer-classic,hablich@chromium.org, +speedometer-turbo,hablich@chromium.org, +start_with_ext.cold.blank_page,, +start_with_ext.warm.blank_page,, +start_with_url.cold.startup_pages,pasko@chromium.org, +start_with_url.warm.startup_pages,pasko@chromium.org, +startup.cold.blank_page,, +startup.large_profile.cold.blank_page,, +startup.large_profile.warm.blank_page,, +startup.warm.blank_page,, +startup.warm.chrome_signin,, +storage.indexeddb_endure,cmumford@chromium.org, +storage.indexeddb_endure_tracing,cmumford@chromium.org, +sunspider,"bmeurer@chromium.org, mvstanton@chromium.org", +system_health.common_desktop,"charliea@chromium.org, nednguyen@chromium.org", +system_health.common_mobile,"charliea@chromium.org, nednguyen@chromium.org", +system_health.memory_desktop,perezju@chromium.org, +system_health.memory_mobile,perezju@chromium.org, +system_health.webview_startup,"perezju@chromium.org, torne@chromium.org", +system_health.webview_startup_multiprocess,, +tab_switching.typical_25,vovoy@chromium.org,OS>Performance +text_selection.character,mfomitchev@chromium.org, +text_selection.direction,mfomitchev@chromium.org, +thread_times.key_hit_test_cases,, +thread_times.key_idle_power_cases,skyostil@chromium.org, +thread_times.key_mobile_sites_smooth,, +thread_times.key_noop_cases,, +thread_times.key_silk_cases,vmiura@chromium.org, +thread_times.polymer,ykyyip@chromium.org, +thread_times.simple_mobile_sites,vmiura@chromium.org, +thread_times.tough_compositor_cases,vmiura@chromium.org, +thread_times.tough_scrolling_cases,tdresser@chromium.org, +tracing.tracing_with_background_memory_infra,ssid@chromium.org, +tracing.tracing_with_debug_overhead,"oysteine@chromium.org, nednguyen@chromium.org, zhenw@chromium.org", +tracing_perftests,"kkraynov@chromium.org, primiano@chromium.org", +v8.browsing_desktop,ulan@chromium.org, +v8.browsing_desktop_classic,hablich@chromium.org, +v8.browsing_desktop_turbo,mvstaton@chromium.org, +v8.browsing_mobile,ulan@chromium.org, +v8.browsing_mobile_classic,hablich@chromium.org, +v8.browsing_mobile_turbo,mvstaton@chromium.org, +v8.detached_context_age_in_gc,, +v8.google,hablich@chromium.org, +v8.infinite_scroll-classic_tbmv2,hablich@chromium.org, +v8.infinite_scroll-turbo_tbmv2,mvstaton@chromium.org, +v8.infinite_scroll_tbmv2,ulan@chromium.org, +v8.key_mobile_sites_smooth,"hpayer@chromium.org, rmcilroy@chromium.org", +v8.mobile_infinite_scroll-classic_tbmv2,hablich@chromium.org, +v8.mobile_infinite_scroll-turbo_tbmv2,mvstaton@chromium.org, +v8.mobile_infinite_scroll_tbmv2,ulan@chromium.org, +v8.runtime_stats.top_25,cbruni@chromium.org, +v8.runtimestats.browsing_desktop,mythria@chromium.org, +v8.runtimestats.browsing_desktop_classic,hablich@chromium.org, +v8.runtimestats.browsing_desktop_turbo,mythria@chromium.org, +v8.runtimestats.browsing_mobile,mythria@chromium.org, +v8.runtimestats.browsing_mobile_classic,hablich@chromium.org, +v8.runtimestats.browsing_mobile_turbo,mythria@chromium.org, +v8.todomvc,jochen@chromium.org, +v8.todomvc-classic,hablich@chromium.org, +v8.todomvc-turbo,mvstaton@chromium.org, +v8.top_25_smooth,"hpayer@chromium.org, rmcilroy@chromium.org", +webrtc.datachannel,phoglund@chromium.org, +webrtc.getusermedia,, +webrtc.peerconnection,, +webrtc.stress,"ehmaldonado@chromium.org, phoglund@chromium.org", +webrtc.webrtc_smoothness,qiangchen@chromium.org, +webrtc.webrtc_smoothness_tbmv2,"ehmaldonado@chromium.org, phoglund@chromium.org, qiangchen@chromium.org",
diff --git a/tools/perf/benchmarks/battor.py b/tools/perf/benchmarks/battor.py index 49ff8c13..092b13c 100644 --- a/tools/perf/benchmarks/battor.py +++ b/tools/perf/benchmarks/battor.py
@@ -36,21 +36,8 @@ return True -# android: See battor.android.tough_video_cases below -# win8: crbug.com/531618 -# crbug.com/565180: Only include cases that report time_to_play -# Taken directly from media benchmark. -@benchmark.Disabled('android', 'win8') -class BattOrToughVideoCases(_BattOrBenchmark): - """Obtains media metrics for key user scenarios.""" - page_set = page_sets.ToughVideoCasesPageSet - - @classmethod - def Name(cls): - return 'battor.tough_video_cases' - - @benchmark.Enabled('mac') +@benchmark.Owner(emails=['charliea@chromium.org']) class BattOrTrivialPages(_BattOrBenchmark): def CreateStorySet(self, options): @@ -62,6 +49,7 @@ return 'battor.trivial_pages' @benchmark.Enabled('mac') +@benchmark.Owner(emails=['charliea@chromium.org']) class BattOrSteadyStatePages(_BattOrBenchmark): def CreateStorySet(self, options):
diff --git a/tools/perf/benchmarks/blink_perf.py b/tools/perf/benchmarks/blink_perf.py index 9fb9e09..fc2b6f8 100644 --- a/tools/perf/benchmarks/blink_perf.py +++ b/tools/perf/benchmarks/blink_perf.py
@@ -184,6 +184,9 @@ self.platform.StartLocalServer(pywebsocket_server.PywebsocketServer()) +@benchmark.Owner(emails=['yukishiino@chromium.org', + 'bashi@chromium.org', + 'haraken@chromium.org']) class BlinkPerfBindings(_BlinkPerfBenchmark): tag = 'bindings' subdir = 'Bindings' @@ -203,6 +206,7 @@ subdir = 'BlinkGC' +@benchmark.Owner(emails=['rune@opera.com']) class BlinkPerfCSS(_BlinkPerfBenchmark): tag = 'css' subdir = 'CSS' @@ -211,6 +215,7 @@ @benchmark.Disabled('android', # http://crbug.com/685320 'android-webview', # http://crbug.com/593200 'reference') # http://crbug.com/576779 +@benchmark.Owner(emails=['junov@chromium.org']) class BlinkPerfCanvas(_BlinkPerfBenchmark): tag = 'canvas' subdir = 'Canvas' @@ -232,17 +237,22 @@ return story_set +@benchmark.Owner(emails=['yukishiino@chromium.org', + 'bashi@chromium.org', + 'haraken@chromium.org']) class BlinkPerfDOM(_BlinkPerfBenchmark): tag = 'dom' subdir = 'DOM' +@benchmark.Owner(emails=['hayato@chromium.org']) class BlinkPerfEvents(_BlinkPerfBenchmark): tag = 'events' subdir = 'Events' @benchmark.Disabled('win8') # http://crbug.com/462350 +@benchmark.Owner(emails=['eae@chromium.org']) class BlinkPerfLayout(_BlinkPerfBenchmark): tag = 'layout' subdir = 'Layout' @@ -252,6 +262,7 @@ return cls.IsSvelte(possible_browser) # http://crbug.com/551950 +@benchmark.Owner(emails=['wangxianzhu@chromium.org']) class BlinkPerfPaint(_BlinkPerfBenchmark): test = _BlinkPerfPaintMeasurement tag = 'paint' @@ -263,23 +274,33 @@ @benchmark.Disabled('win') # crbug.com/488493 +@benchmark.Owner(emails=['yukishiino@chromium.org', + 'bashi@chromium.org', + 'haraken@chromium.org']) class BlinkPerfParser(_BlinkPerfBenchmark): tag = 'parser' subdir = 'Parser' +@benchmark.Owner(emails=['kouhei@chromium.org', 'fs@opera.com']) class BlinkPerfSVG(_BlinkPerfBenchmark): tag = 'svg' subdir = 'SVG' +@benchmark.Owner(emails=['hayato@chromium.org']) class BlinkPerfShadowDOM(_BlinkPerfBenchmark): tag = 'shadow_dom' subdir = 'ShadowDOM' + @classmethod + def ShouldDisable(cls, possible_browser): # http://crbug.com/702319 + return possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X' + # This benchmark is for local testing, doesn't need to run on bots. @benchmark.Disabled('all') +@benchmark.Owner(emails=['tyoshino@chromium.org', 'hiroshige@chromium.org']) class BlinkPerfXMLHttpRequest(_BlinkPerfBenchmark): tag = 'xml_http_request' subdir = 'XMLHttpRequest' @@ -289,6 +310,7 @@ #@benchmark.Disabled('win', 'chromeos') # Disabling on remaining platforms due to heavy flake https://crbug.com/646938 @benchmark.Disabled('all') +@benchmark.Owner(emails=['tyoshino@chromium.org', 'yhirano@chromium.org']) class BlinkPerfPywebsocket(_BlinkPerfBenchmark): """The blink_perf.pywebsocket tests measure turn-around-time of 10MB send/receive for XHR, Fetch API and WebSocket. We might ignore < 10%
diff --git a/tools/perf/benchmarks/dromaeo.py b/tools/perf/benchmarks/dromaeo.py index 2eaaca3..86be999 100644 --- a/tools/perf/benchmarks/dromaeo.py +++ b/tools/perf/benchmarks/dromaeo.py
@@ -125,6 +125,9 @@ return ps +@benchmark.Owner(emails=['yukishiino@chromium.org', + 'bashi@chromium.org', + 'haraken@chromium.org']) class DromaeoDomCoreAttr(_DromaeoBenchmark): """Dromaeo DOMCore attr JavaScript benchmark. @@ -138,6 +141,9 @@ return 'dromaeo.domcoreattr' +@benchmark.Owner(emails=['yukishiino@chromium.org', + 'bashi@chromium.org', + 'haraken@chromium.org']) class DromaeoDomCoreModify(_DromaeoBenchmark): """Dromaeo DOMCore modify JavaScript benchmark. @@ -151,6 +157,9 @@ return 'dromaeo.domcoremodify' +@benchmark.Owner(emails=['yukishiino@chromium.org', + 'bashi@chromium.org', + 'haraken@chromium.org']) class DromaeoDomCoreQuery(_DromaeoBenchmark): """Dromaeo DOMCore query JavaScript benchmark. @@ -164,6 +173,9 @@ return 'dromaeo.domcorequery' +@benchmark.Owner(emails=['yukishiino@chromium.org', + 'bashi@chromium.org', + 'haraken@chromium.org']) class DromaeoDomCoreTraverse(_DromaeoBenchmark): """Dromaeo DOMCore traverse JavaScript benchmark. @@ -177,6 +189,9 @@ return 'dromaeo.domcoretraverse' +@benchmark.Owner(emails=['yukishiino@chromium.org', + 'bashi@chromium.org', + 'haraken@chromium.org']) class DromaeoJslibAttrJquery(_DromaeoBenchmark): """Dromaeo JSLib attr jquery JavaScript benchmark. @@ -195,6 +210,9 @@ # http://crbug.com/634055 (Android One). return cls.IsSvelte(possible_browser) +@benchmark.Owner(emails=['yukishiino@chromium.org', + 'bashi@chromium.org', + 'haraken@chromium.org']) class DromaeoJslibAttrPrototype(_DromaeoBenchmark): """Dromaeo JSLib attr prototype JavaScript benchmark. @@ -209,6 +227,9 @@ return 'dromaeo.jslibattrprototype' +@benchmark.Owner(emails=['yukishiino@chromium.org', + 'bashi@chromium.org', + 'haraken@chromium.org']) class DromaeoJslibEventJquery(_DromaeoBenchmark): """Dromaeo JSLib event jquery JavaScript benchmark. @@ -223,6 +244,9 @@ return 'dromaeo.jslibeventjquery' +@benchmark.Owner(emails=['yukishiino@chromium.org', + 'bashi@chromium.org', + 'haraken@chromium.org']) class DromaeoJslibEventPrototype(_DromaeoBenchmark): """Dromaeo JSLib event prototype JavaScript benchmark. @@ -241,6 +265,9 @@ # android: http://crbug.com/503138 # linux: http://crbug.com/583075 @benchmark.Disabled('win-reference', 'android', 'linux') +@benchmark.Owner(emails=['yukishiino@chromium.org', + 'bashi@chromium.org', + 'haraken@chromium.org']) class DromaeoJslibModifyJquery(_DromaeoBenchmark): """Dromaeo JSLib modify jquery JavaScript benchmark. @@ -255,6 +282,9 @@ return 'dromaeo.jslibmodifyjquery' +@benchmark.Owner(emails=['yukishiino@chromium.org', + 'bashi@chromium.org', + 'haraken@chromium.org']) class DromaeoJslibModifyPrototype(_DromaeoBenchmark): """Dromaeo JSLib modify prototype JavaScript benchmark. @@ -269,6 +299,9 @@ return 'dromaeo.jslibmodifyprototype' +@benchmark.Owner(emails=['yukishiino@chromium.org', + 'bashi@chromium.org', + 'haraken@chromium.org']) class DromaeoJslibStyleJquery(_DromaeoBenchmark): """Dromaeo JSLib style jquery JavaScript benchmark. @@ -283,6 +316,9 @@ return 'dromaeo.jslibstylejquery' +@benchmark.Owner(emails=['yukishiino@chromium.org', + 'bashi@chromium.org', + 'haraken@chromium.org']) class DromaeoJslibStylePrototype(_DromaeoBenchmark): """Dromaeo JSLib style prototype JavaScript benchmark. @@ -297,6 +333,9 @@ return 'dromaeo.jslibstyleprototype' +@benchmark.Owner(emails=['yukishiino@chromium.org', + 'bashi@chromium.org', + 'haraken@chromium.org']) class DromaeoJslibTraverseJquery(_DromaeoBenchmark): """Dromaeo JSLib traverse jquery JavaScript benchmark. @@ -312,6 +351,9 @@ return 'dromaeo.jslibtraversejquery' +@benchmark.Owner(emails=['yukishiino@chromium.org', + 'bashi@chromium.org', + 'haraken@chromium.org']) class DromaeoJslibTraversePrototype(_DromaeoBenchmark): """Dromaeo JSLib traverse prototype JavaScript benchmark. @@ -325,6 +367,9 @@ return 'dromaeo.jslibtraverseprototype' +@benchmark.Owner(emails=['yukishiino@chromium.org', + 'bashi@chromium.org', + 'haraken@chromium.org']) class DromaeoCSSQueryJquery(_DromaeoBenchmark): """Dromaeo CSS Query jquery JavaScript benchmark.
diff --git a/tools/perf/benchmarks/image_decoding.py b/tools/perf/benchmarks/image_decoding.py index 60b23a96..c1681f3 100644 --- a/tools/perf/benchmarks/image_decoding.py +++ b/tools/perf/benchmarks/image_decoding.py
@@ -3,11 +3,13 @@ # found in the LICENSE file. from core import perf_benchmark +from telemetry import benchmark from measurements import image_decoding import page_sets +@benchmark.Owner(emails=['cblume@chromium.org', 'reveman@chromium.org']) class ImageDecodingToughImageCases(perf_benchmark.PerfBenchmark): test = image_decoding.ImageDecoding # TODO: Rename this page set to tough_image_cases.py
diff --git a/tools/perf/benchmarks/indexeddb_perf.py b/tools/perf/benchmarks/indexeddb_perf.py index 4955798..e8799f5 100644 --- a/tools/perf/benchmarks/indexeddb_perf.py +++ b/tools/perf/benchmarks/indexeddb_perf.py
@@ -20,14 +20,10 @@ """ import json -import os -from core import path_util from core import perf_benchmark from telemetry import benchmark -from telemetry import page as page_module -from telemetry import story from telemetry.page import legacy_page_test from telemetry.value import scalar @@ -93,23 +89,7 @@ @benchmark.Disabled('linux') # crbug.com/677972 -class IndexedDbOriginal(perf_benchmark.PerfBenchmark): - """Chromium's IndexedDB Performance tests.""" - test = _IndexedDbMeasurement - - @classmethod - def Name(cls): - return 'indexeddb_perf' - - def CreateStorySet(self, options): - indexeddb_dir = os.path.join(path_util.GetChromiumSrcDir(), 'chrome', - 'test', 'data', 'indexeddb') - ps = story.StorySet(base_dir=indexeddb_dir) - ps.AddStory(page_module.Page('file://perf_test.html', ps, ps.base_dir)) - return ps - - -@benchmark.Disabled('linux') # crbug.com/677972 +@benchmark.Owner(emails=['cmumford@chromium.org']) class IndexedDbOriginalSectioned(perf_benchmark.PerfBenchmark): """Chromium's IndexedDB Performance tests.""" test = _IndexedDbMeasurement @@ -121,6 +101,7 @@ @benchmark.Disabled('linux') # crbug.com/677972 +@benchmark.Owner(emails=['cmumford@chromium.org']) class IndexedDbTracing(perf_benchmark.PerfBenchmark): """IndexedDB Performance tests that use tracing.""" page_set = page_sets.IndexedDBEndurePageSet
diff --git a/tools/perf/benchmarks/jetstream.py b/tools/perf/benchmarks/jetstream.py index 1231481..fb30892 100644 --- a/tools/perf/benchmarks/jetstream.py +++ b/tools/perf/benchmarks/jetstream.py
@@ -77,6 +77,7 @@ @benchmark.Disabled('android') +@benchmark.Owner(emails=['bmeurer@chromium.org', 'mvstanton@chromium.org']) class Jetstream(perf_benchmark.PerfBenchmark): test = _JetstreamMeasurement
diff --git a/tools/perf/benchmarks/jitter.py b/tools/perf/benchmarks/jitter.py index 206c71b..65baa96 100644 --- a/tools/perf/benchmarks/jitter.py +++ b/tools/perf/benchmarks/jitter.py
@@ -4,6 +4,7 @@ from core import perf_benchmark +from telemetry import benchmark from telemetry.timeline import chrome_trace_category_filter from telemetry.web_perf import timeline_based_measurement from telemetry.web_perf.metrics import jitter_timeline @@ -15,6 +16,7 @@ TIMELINE_REQUIRED_CATEGORY = 'blink.console' +@benchmark.Owner(emails=['jaydasika@chromium.org']) class Jitter(perf_benchmark.PerfBenchmark): """Timeline based measurement benchmark for jitter."""
diff --git a/tools/perf/benchmarks/kraken.py b/tools/perf/benchmarks/kraken.py index 3d90902..1715f62 100644 --- a/tools/perf/benchmarks/kraken.py +++ b/tools/perf/benchmarks/kraken.py
@@ -9,6 +9,7 @@ from core import perf_benchmark +from telemetry import benchmark from telemetry import page as page_module from telemetry.page import legacy_page_test from telemetry import story @@ -115,6 +116,7 @@ '(http://krakenbenchmark.mozilla.org/)')) +@benchmark.Owner(emails=['bmeurer@chromium.org', 'mvstanton@chromium.org']) class Kraken(perf_benchmark.PerfBenchmark): """Mozilla's Kraken JavaScript benchmark.
diff --git a/tools/perf/benchmarks/loading.py b/tools/perf/benchmarks/loading.py index 167f4eb..7dd52ea 100644 --- a/tools/perf/benchmarks/loading.py +++ b/tools/perf/benchmarks/loading.py
@@ -14,6 +14,7 @@ @benchmark.Enabled('android') +@benchmark.Owner(emails=['kouhei@chromium.org', 'ksakamoto@chromium.org']) class LoadingMobile(perf_benchmark.PerfBenchmark): """ A benchmark measuring loading performance of mobile sites. """
diff --git a/tools/perf/benchmarks/media.py b/tools/perf/benchmarks/media.py index c5c6ba6..f37ce44 100644 --- a/tools/perf/benchmarks/media.py +++ b/tools/perf/benchmarks/media.py
@@ -6,8 +6,10 @@ from telemetry import benchmark from telemetry.page import legacy_page_test +from telemetry.timeline import chrome_trace_category_filter from telemetry.value import list_of_scalar_values from telemetry.value import scalar +from telemetry.web_perf import timeline_based_measurement from measurements import media import page_sets @@ -40,7 +42,7 @@ # android: See media.android.tough_video_cases below # crbug.com/565180: Only include cases that report time_to_play @benchmark.Disabled('android') -class Media(perf_benchmark.PerfBenchmark): +class MediaToughVideoCases(perf_benchmark.PerfBenchmark): """Obtains media metrics for key user scenarios.""" test = media.Media page_set = page_sets.ToughVideoCasesPageSet @@ -50,8 +52,40 @@ return 'media.tough_video_cases' +class _MediaTBMv2Benchmark(perf_benchmark.PerfBenchmark): + page_set = page_sets.ToughVideoCasesPageSet + + def CreateTimelineBasedMeasurementOptions(self): + category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter() + + # 'toplevel' category provides CPU time slices used by # cpuTimeMetric. + category_filter.AddIncludedCategory('toplevel') + + # 'rail' category is used by powerMetric to attribute different period of + # time to different activities, such as video_animation, etc. + category_filter.AddIncludedCategory('rail') + + options = timeline_based_measurement.Options(category_filter) + options.config.enable_battor_trace = True + options.SetTimelineBasedMetrics(['powerMetric', 'cpuTimeMetric']) + return options + + +@benchmark.Owner(emails=['johnchen@chromium.org', 'crouleau@chromium.org'], + component='Internals>Media') +@benchmark.Disabled('android') +class MediaToughVideoCasesTBMv2(_MediaTBMv2Benchmark): + """Obtains media metrics using TBMv2. + Will eventually replace MediaToughVideoCases class.""" + + @classmethod + def Name(cls): + return 'media.tough_video_cases_tbmv2' + + # crbug.com/565180: Only include cases that don't report time_to_play @benchmark.Disabled('android') +@benchmark.Owner(emails=['crouleau@chromium.org', 'videostack-eng@google.com']) class MediaExtra(perf_benchmark.PerfBenchmark): """Obtains extra media metrics for key user scenarios.""" test = media.Media @@ -63,6 +97,7 @@ @benchmark.Disabled('android', 'mac') +@benchmark.Owner(emails=['crouleau@chromium.org', 'videostack-eng@google.com']) class MediaNetworkSimulation(perf_benchmark.PerfBenchmark): """Obtains media metrics under different network simulations.""" test = media.Media @@ -74,12 +109,11 @@ @benchmark.Disabled('l', 'android-webview') # WebView: crbug.com/419689. -class MediaAndroid(perf_benchmark.PerfBenchmark): +class MediaAndroidToughVideoCases(perf_benchmark.PerfBenchmark): """Obtains media metrics for key user scenarios on Android.""" test = media.Media tag = 'android' page_set = page_sets.ToughVideoCasesPageSet - # Exclude is_4k and 50 fps media files (garden* & crowd*). options = {'story_tag_filter_exclude': 'is_4k,is_50fps'} @classmethod @@ -93,6 +127,33 @@ return 'media.android.tough_video_cases' +@benchmark.Owner(emails=['johnchen@chromium.org', 'crouleau@chromium.org'], + component='Internals>Media') +@benchmark.Enabled('android') +@benchmark.Disabled('l', 'android-webview') # WebView: crbug.com/419689. +class MediaAndroidToughVideoCasesTBMv2(_MediaTBMv2Benchmark): + """Obtains media metrics for key user scenarios on Android using TBMv2. + Will eventually replace MediaAndroidToughVideoCases class.""" + + tag = 'android' + options = {'story_tag_filter_exclude': 'is_4k,is_50fps'} + + @classmethod + def ShouldDisable(cls, possible_browser): + return cls.IsSvelte(possible_browser) + + @classmethod + def Name(cls): + return 'media.android.tough_video_cases_tbmv2' + + def SetExtraBrowserOptions(self, options): + # By default, Chrome on Android does not allow autoplay + # of media: it requires a user gesture event to start a video. + # The following option works around that. + options.AppendExtraBrowserArgs( + ['--disable-gesture-requirement-for-media-playback']) + + @benchmark.Enabled('chromeos') class MediaChromeOS4kOnly(perf_benchmark.PerfBenchmark): """Benchmark for media performance on ChromeOS using only is_4k test content. @@ -130,6 +191,7 @@ @benchmark.Disabled('android-webview') # crbug.com/419689 +@benchmark.Owner(emails=['crouleau@chromium.org', 'videostack-eng@google.com']) class MediaSourceExtensions(perf_benchmark.PerfBenchmark): """Obtains media metrics for key media source extensions functions.""" test = _MSEMeasurement
diff --git a/tools/perf/benchmarks/memory.py b/tools/perf/benchmarks/memory.py index d669a12..d5b2122 100644 --- a/tools/perf/benchmarks/memory.py +++ b/tools/perf/benchmarks/memory.py
@@ -51,7 +51,34 @@ options.clear_sytem_cache_for_browser_and_profile_on_start = True +@benchmark.Enabled('mac') +@benchmark.Enabled('win') +@benchmark.Owner(emails=['erikchen@chromium.org']) +class MemoryBenchmarkTrivialSitesDesktop(_MemoryInfra): + """Measure memory usage on trivial sites.""" + options = {'pageset_repeat': 5} + + def CreateStorySet(self, options): + return page_sets.TrivialSitesStorySet(wait_in_seconds=0, + measure_memory=True) + + @classmethod + def Name(cls): + return 'memory.desktop' + + @classmethod + def ShouldTearDownStateAfterEachStoryRun(cls): + return True + + @classmethod + def ValueCanBeAddedPredicate(cls, value, is_first_result): + # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard + # is able to cope with the data load generated by TBMv2 metrics. + return not _IGNORED_STATS_RE.search(value.name) + + @benchmark.Enabled('android') # catapult:#3176 +@benchmark.Owner(emails=['perezju@chromium.org']) class MemoryBenchmarkTop10Mobile(_MemoryInfra): """Measure foreground/background memory on top 10 mobile page set. @@ -77,6 +104,7 @@ @benchmark.Enabled('android') # catapult:#3176 +@benchmark.Owner(emails=['perezju@chromium.org']) class MemoryBenchmarkTop10MobileStress(MemoryBenchmarkTop10Mobile): """Run top 10 mobile page set without closing/restarting the browser. @@ -96,6 +124,7 @@ # Benchmark disabled by default. Force to run with --also-run-disabled-tests. @benchmark.Disabled('all') +@benchmark.Owner(emails=['perezju@chromium.org']) class DualBrowserBenchmark(_MemoryInfra): """Measures memory usage while interacting with two different browsers. @@ -123,6 +152,7 @@ # Benchmark disabled by default. Force to run with --also-run-disabled-tests. @benchmark.Disabled('all') +@benchmark.Owner(emails=['perezju@chromium.org']) class LongRunningDualBrowserBenchmark(_MemoryInfra): """Measures memory during prolonged usage of alternating browsers. @@ -152,6 +182,7 @@ @benchmark.Enabled('android') # catapult:#3176 +@benchmark.Owner(emails=['bashi@chromium.org']) class RendererMemoryBlinkMemoryMobile(_MemoryInfra): """Timeline based benchmark for measuring memory consumption on mobile sites on which blink's memory consumption is relatively high. @@ -216,6 +247,7 @@ return 'v8' in value.name +@benchmark.Owner(emails=['ulan@chromium.org']) class MemoryLongRunningIdleGmail(_MemoryV8Benchmark): """Use (recorded) real world web sites and measure memory consumption of long running idle Gmail page """ @@ -234,6 +266,7 @@ @benchmark.Enabled('has tabs') # http://crbug.com/612210 +@benchmark.Owner(emails=['ulan@chromium.org']) class MemoryLongRunningIdleGmailBackground(_MemoryV8Benchmark): """Use (recorded) real world web sites and measure memory consumption of long running idle Gmail page """
diff --git a/tools/perf/benchmarks/octane.py b/tools/perf/benchmarks/octane.py index 95b6894..6245c334 100644 --- a/tools/perf/benchmarks/octane.py +++ b/tools/perf/benchmarks/octane.py
@@ -15,6 +15,7 @@ from core import perf_benchmark +from telemetry import benchmark from telemetry import page as page_module from telemetry.page import legacy_page_test from telemetry import story @@ -131,6 +132,7 @@ 'benchmark collection.')) +@benchmark.Owner(emails=['bmeurer@chromium.org', 'mvstanton@chromium.org']) class Octane(perf_benchmark.PerfBenchmark): """Google's Octane JavaScript benchmark.
diff --git a/tools/perf/benchmarks/oilpan_gc_times.py b/tools/perf/benchmarks/oilpan_gc_times.py index b2b6d4a6..91711d5 100644 --- a/tools/perf/benchmarks/oilpan_gc_times.py +++ b/tools/perf/benchmarks/oilpan_gc_times.py
@@ -28,6 +28,7 @@ @benchmark.Disabled('android') # crbug.com/589567 +@benchmark.Owner(emails=['peria@chromium.org']) class OilpanGCTimesSmoothnessAnimation(perf_benchmark.PerfBenchmark): test = oilpan_gc_times.OilpanGCTimesForSmoothness page_set = page_sets.ToughAnimationCasesPageSet
diff --git a/tools/perf/benchmarks/page_cycler_v2.py b/tools/perf/benchmarks/page_cycler_v2.py index 49b5077..6df6021a 100644 --- a/tools/perf/benchmarks/page_cycler_v2.py +++ b/tools/perf/benchmarks/page_cycler_v2.py
@@ -64,6 +64,7 @@ @benchmark.Disabled('win10') @benchmark.Disabled('android') # crbug.com/654217 +@benchmark.Owner(emails=['kouhei@chromium.org', 'ksakamoto@chromium.org']) class PageCyclerV2Typical25(_PageCyclerV2): """Page load time benchmark for a 25 typical web pages. @@ -81,6 +82,7 @@ cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) +@benchmark.Owner(emails=['kouhei@chromium.org', 'ksakamoto@chromium.org']) class PageCyclerV2IntlArFaHe(_PageCyclerV2): """Page load time for a variety of pages in Arabic, Farsi and Hebrew. @@ -97,6 +99,7 @@ cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) +@benchmark.Owner(emails=['kouhei@chromium.org', 'ksakamoto@chromium.org']) class PageCyclerV2IntlEsFrPtBr(_PageCyclerV2): """Page load time for a pages in Spanish, French and Brazilian Portuguese. @@ -113,6 +116,7 @@ cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) +@benchmark.Owner(emails=['kouhei@chromium.org', 'ksakamoto@chromium.org']) class PageCyclerV2IntlHiRu(_PageCyclerV2): """Page load time benchmark for a variety of pages in Hindi and Russian. @@ -130,6 +134,7 @@ @benchmark.Disabled('android') # crbug.com/666898 +@benchmark.Owner(emails=['kouhei@chromium.org', 'ksakamoto@chromium.org']) class PageCyclerV2IntlJaZh(_PageCyclerV2): """Page load time benchmark for a variety of pages in Japanese and Chinese. @@ -145,6 +150,7 @@ cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) +@benchmark.Owner(emails=['kouhei@chromium.org', 'ksakamoto@chromium.org']) class PageCyclerV2IntlKoThVi(_PageCyclerV2): """Page load time for a variety of pages in Korean, Thai and Vietnamese. @@ -162,6 +168,7 @@ @benchmark.Enabled('android') +@benchmark.Owner(emails=['kouhei@chromium.org', 'ksakamoto@chromium.org']) class PageCyclerV2Top10Mobile(_PageCyclerV2): """Page load time benchmark for the top 10 mobile web pages. @@ -178,6 +185,7 @@ cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) +@benchmark.Owner(emails=['kouhei@chromium.org', 'ksakamoto@chromium.org']) class PageCyclerV2ToughLayoutCases(_PageCyclerV2): """Page loading for the slowest layouts observed in the Alexa top 1 million. @@ -195,6 +203,7 @@ @benchmark.Disabled('reference', 'android') +@benchmark.Owner(emails=['nasko@chromium.org']) class PageCyclerV2BasicOopifIsolated(_PageCyclerV2): """ A benchmark measuring performance of out-of-process iframes. """ page_set = page_sets.OopifBasicPageSet @@ -211,6 +220,7 @@ cache_temperature.PCV1_COLD, cache_temperature.PCV1_WARM]) @benchmark.Disabled('android') +@benchmark.Owner(emails=['nasko@chromium.org']) class PageCyclerV2BasicOopif(_PageCyclerV2): """ A benchmark measuring performance of the out-of-process iframes page set, without running in out-of-process iframes mode.. """
diff --git a/tools/perf/benchmarks/power.py b/tools/perf/benchmarks/power.py index 31507bd..7cc17e1 100644 --- a/tools/perf/benchmarks/power.py +++ b/tools/perf/benchmarks/power.py
@@ -4,13 +4,15 @@ from core import perf_benchmark -from benchmarks import silk_flags from measurements import power import page_sets from telemetry import benchmark +from telemetry.timeline import chrome_trace_category_filter +from telemetry.web_perf import timeline_based_measurement @benchmark.Enabled('android') +@benchmark.Owner(emails=['perezju@chromium.org']) class PowerAndroidAcceptance(perf_benchmark.PerfBenchmark): """Android power acceptance test.""" test = power.Power @@ -25,6 +27,7 @@ @benchmark.Enabled('android') +@benchmark.Owner(emails=['perezju@chromium.org']) class PowerTypical10Mobile(perf_benchmark.PerfBenchmark): """Android typical 10 mobile power test.""" test = power.Power @@ -52,6 +55,7 @@ # @benchmark.Enabled('android') @benchmark.Disabled('all') @benchmark.Disabled('android-webview') # http://crbug.com/622300 +@benchmark.Owner(emails=['skyostil@chromium.org']) class PowerToughAdCases(perf_benchmark.PerfBenchmark): """Android power test with tough ad pages.""" test = power.Power @@ -87,37 +91,6 @@ return 'power.typical_10_mobile_reload' -@benchmark.Enabled('android') -class PowerGpuRasterizationTypical10Mobile(perf_benchmark.PerfBenchmark): - """Measures power on key mobile sites with GPU rasterization.""" - tag = 'gpu_rasterization' - test = power.Power - page_set = page_sets.Typical10MobilePageSet - - def SetExtraBrowserOptions(self, options): - silk_flags.CustomizeBrowserOptionsForGpuRasterization(options) - options.full_performance_mode = False - - @classmethod - def Name(cls): - return 'power.gpu_rasterization.typical_10_mobile' - - @classmethod - def ShouldDisable(cls, possible_browser): - # http://crbug.com/563968 - if cls.IsSvelte(possible_browser): - return True - - - # http://crbug.com/593973 - if (possible_browser.browser_type == 'reference' and - possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X'): - return True - - # http://crbug.com/671631 - return possible_browser.platform.GetDeviceTypeName() == 'Nexus 9' - - @benchmark.Enabled('mac') class PowerTop10(perf_benchmark.PerfBenchmark): """Top 10 quiescent power test.""" @@ -133,22 +106,6 @@ @benchmark.Enabled('mac') -class PowerGpuRasterizationTop10(perf_benchmark.PerfBenchmark): - """Top 10 quiescent power test with GPU rasterization enabled.""" - tag = 'gpu_rasterization' - test = power.QuiescentPower - page_set = page_sets.Top10QuiescentPageSet - - def SetExtraBrowserOptions(self, options): - silk_flags.CustomizeBrowserOptionsForGpuRasterization(options) - options.full_performance_mode = False - - @classmethod - def Name(cls): - return 'power.gpu_rasterization.top_10' - - -@benchmark.Enabled('mac') class PowerTop25(perf_benchmark.PerfBenchmark): """Top 25 quiescent power test.""" test = power.QuiescentPower @@ -182,20 +139,7 @@ @benchmark.Enabled('mac') -class PowerGpuRasterizationTop25(PowerTop25): - """Top 25 quiescent power test with GPU rasterization enabled.""" - tag = 'gpu_rasterization' - - def SetExtraBrowserOptions(self, options): - silk_flags.CustomizeBrowserOptionsForGpuRasterization(options) - options.full_performance_mode = False - - @classmethod - def Name(cls): - return 'power.gpu_rasterization.top_25' - - -@benchmark.Enabled('mac') +@benchmark.Owner(emails=['erikchen@chromium.org']) class PowerScrollingTrivialPage(perf_benchmark.PerfBenchmark): """Measure power consumption for some very simple pages.""" test = power.QuiescentPower @@ -205,6 +149,7 @@ def Name(cls): return 'power.trivial_pages' + @benchmark.Enabled('mac') class PowerSteadyStatePages(perf_benchmark.PerfBenchmark): """Measure power consumption for real web sites in steady state (no user @@ -215,3 +160,42 @@ @classmethod def Name(cls): return 'power.steady_state' + + +class IdlePlatformBenchmark(perf_benchmark.PerfBenchmark): + """Idle platform benchmark. + + This benchmark just starts up tracing agents and lets the platform sit idle. + Our power benchmarks are prone to noise caused by other things running on the + system. This benchmark is intended to help find the sources of noise. + """ + def CreateTimelineBasedMeasurementOptions(self): + options = timeline_based_measurement.Options( + chrome_trace_category_filter.ChromeTraceCategoryFilter()) + # Enable CPU tracing when the bug is resolved. + # https://github.com/catapult-project/catapult/issues/3463 + options.config.enable_battor_trace = True + # Atrace tracing agent autodetects if its android and only runs if it is. + options.config.enable_atrace_trace = True + options.config.enable_chrome_trace = False + options.SetTimelineBasedMetrics([ + 'clockSyncLatencyMetric', + 'powerMetric', + 'tracingMetric' + ]) + return options + + @classmethod + def ShouldDisable(cls, possible_browser): + return not possible_browser.platform.HasBattOrConnected() + + def CreateStorySet(self, options): + return page_sets.IdleStorySet() + + @classmethod + def ShouldTearDownStateAfterEachStoryRun(cls): + return True + + @classmethod + def Name(cls): + return 'power.idle_platform'
diff --git a/tools/perf/benchmarks/rasterize_and_record_micro.py b/tools/perf/benchmarks/rasterize_and_record_micro.py index 40bb2e6..103b06e0 100644 --- a/tools/perf/benchmarks/rasterize_and_record_micro.py +++ b/tools/perf/benchmarks/rasterize_and_record_micro.py
@@ -73,6 +73,7 @@ @benchmark.Disabled('all') # http://crbug.com/610424 +@benchmark.Owner(emails=['vmpstr@chromium.org']) class RasterizeAndRecordMicroKeySilkCases(_RasterizeAndRecordMicro): """Measures rasterize and record performance on the silk sites.
diff --git a/tools/perf/benchmarks/repaint.py b/tools/perf/benchmarks/repaint.py index 92cdd52..52270c1c 100644 --- a/tools/perf/benchmarks/repaint.py +++ b/tools/perf/benchmarks/repaint.py
@@ -45,6 +45,7 @@ @benchmark.Disabled('all') +@benchmark.Owner(emails=['wkorman@chromium.org', 'vmpstr@chromium.org']) class RepaintKeyMobileSites(_Repaint): """Measures repaint performance on the key mobile sites. @@ -58,6 +59,7 @@ # crbug.com/502179 @benchmark.Enabled('android') @benchmark.Disabled('all') +@benchmark.Owner(emails=['wkorman@chromium.org', 'vmpstr@chromium.org']) class RepaintGpuRasterizationKeyMobileSites(_Repaint): """Measures repaint performance on the key mobile sites with forced GPU rasterization.
diff --git a/tools/perf/benchmarks/scheduler.py b/tools/perf/benchmarks/scheduler.py index d084e1b..08cd700 100644 --- a/tools/perf/benchmarks/scheduler.py +++ b/tools/perf/benchmarks/scheduler.py
@@ -10,6 +10,7 @@ @benchmark.Disabled('reference') # crbug.com/549428 +@benchmark.Owner(emails=['skyostil@chromium.org', 'brianderson@chromium.org']) class SchedulerToughSchedulingCases(perf_benchmark.PerfBenchmark): """Measures rendering statistics while interacting with pages that have challenging scheduling properties.
diff --git a/tools/perf/benchmarks/service_worker.py b/tools/perf/benchmarks/service_worker.py index 390bab5..7d5acb9d 100644 --- a/tools/perf/benchmarks/service_worker.py +++ b/tools/perf/benchmarks/service_worker.py
@@ -158,6 +158,7 @@ results.current_page, key, value['units'], value['value'])) +@benchmark.Owner(emails=['horo@chromium.org']) class ServiceWorkerPerfTest(perf_benchmark.PerfBenchmark): """Performance test of pages using ServiceWorker. @@ -175,6 +176,7 @@ @benchmark.Disabled('android-webview') # http://crbug.com/653924 +@benchmark.Owner(emails=['horo@chromium.org']) class ServiceWorkerMicroBenchmarkPerfTest(perf_benchmark.PerfBenchmark): """This test is a microbenchmark of service worker.
diff --git a/tools/perf/benchmarks/skpicture_printer.py b/tools/perf/benchmarks/skpicture_printer.py index 38c6bc4..09a844d 100644 --- a/tools/perf/benchmarks/skpicture_printer.py +++ b/tools/perf/benchmarks/skpicture_printer.py
@@ -26,6 +26,7 @@ # Disabled because we do not plan on running this SKP benchmark on the perf # waterfall any time soon. @benchmark.Disabled('all') +@benchmark.Owner(emails=['rmistry@chromium.org']) class SkpicturePrinter(perf_benchmark.PerfBenchmark): @classmethod
diff --git a/tools/perf/benchmarks/smoothness.py b/tools/perf/benchmarks/smoothness.py index fe9f50b..733eb12 100644 --- a/tools/perf/benchmarks/smoothness.py +++ b/tools/perf/benchmarks/smoothness.py
@@ -37,6 +37,7 @@ return True +@benchmark.Owner(emails=['vmiura@chromium.org']) class SmoothnessTop25(_Smoothness): """Measures rendering statistics while scrolling down the top 25 web pages. @@ -61,6 +62,7 @@ return False +@benchmark.Owner(emails=['senorblanco@chromium.org']) class SmoothnessToughFiltersCases(_Smoothness): """Measures frame rate and a variety of other statistics. @@ -84,6 +86,7 @@ return False +@benchmark.Owner(emails=['senorblanco@chromium.org']) class SmoothnessToughPathRenderingCases(_Smoothness): """Tests a selection of pages with SVG and 2D Canvas paths. @@ -96,6 +99,7 @@ @benchmark.Disabled('android') # crbug.com/526901 +@benchmark.Owner(emails=['junov@chromium.org']) class SmoothnessToughCanvasCases(_Smoothness): """Measures frame rate and a variety of other statistics. @@ -113,6 +117,7 @@ @benchmark.Disabled('android') # crbug.com/373812 @benchmark.Disabled('win-reference') # crbug.com/612810 +@benchmark.Owner(emails=['kbr@chromium.org', 'zmo@chromium.org']) class SmoothnessToughWebGLCases(_Smoothness): page_set = page_sets.ToughWebglCasesPageSet @@ -123,6 +128,7 @@ @benchmark.Disabled('win') # http://crbug.com/692663 @benchmark.Disabled('android-webview') # http://crbug.com/653933 +@benchmark.Owner(emails=['kbr@chromium.org', 'zmo@chromium.org']) class SmoothnessMaps(perf_benchmark.PerfBenchmark): page_set = page_sets.MapsPageSet @@ -133,6 +139,7 @@ @benchmark.Disabled('android', 'mac') # crbug.com/567802 +@benchmark.Owner(emails=['ssid@chromium.org']) class SmoothnessKeyDesktopMoveCases(_Smoothness): page_set = page_sets.KeyDesktopMoveCasesPageSet @@ -147,6 +154,7 @@ @benchmark.Enabled('android') +@benchmark.Owner(emails=['vmiura@chromium.org', 'tdresser@chromium.org']) class SmoothnessKeyMobileSites(_Smoothness): """Measures rendering statistics while scrolling down the key mobile sites. @@ -166,6 +174,7 @@ @benchmark.Disabled('android') # crbug.com/589580 @benchmark.Disabled('android-reference') # crbug.com/588786 @benchmark.Disabled('mac') # crbug.com/563615 +@benchmark.Owner(emails=['alancutter@chromium.org']) class SmoothnessToughAnimationCases(_Smoothness): test = smoothness.SmoothnessWithRestart page_set = page_sets.ToughAnimationCasesPageSet @@ -182,6 +191,7 @@ @benchmark.Enabled('android') +@benchmark.Owner(emails=['ajuma@chromium.org']) class SmoothnessKeySilkCases(_Smoothness): """Measures rendering statistics for the key silk cases without GPU rasterization. @@ -203,6 +213,7 @@ @benchmark.Enabled('android') +@benchmark.Owner(emails=['vmiura@chromium.org']) class SmoothnessGpuRasterizationTop25(_Smoothness): """Measures rendering statistics for the top 25 with GPU rasterization. """ @@ -225,6 +236,7 @@ # Although GPU rasterization is enabled on Mac, it is blacklisted for certain # path cases, so it is still valuable to run both the GPU and non-GPU versions # of this benchmark on Mac. +@benchmark.Owner(emails=['senorblanco@chromium.org']) class SmoothnessGpuRasterizationToughPathRenderingCases(_Smoothness): """Tests a selection of pages with SVG and 2D canvas paths with GPU rasterization. @@ -243,6 +255,7 @@ # With GPU Raster enabled on Mac, there's no reason to run this benchmark in # addition to SmoothnessFiltersCases. @benchmark.Disabled('mac') +@benchmark.Owner(emails=['senorblanco@chromium.org']) class SmoothnessGpuRasterizationFiltersCases(_Smoothness): """Tests a selection of pages with SVG and CSS filter effects with GPU rasterization. @@ -264,6 +277,7 @@ @benchmark.Enabled('android') +@benchmark.Owner(emails=['tdresser@chromium.org', 'rbyers@chromium.org']) class SmoothnessSyncScrollKeyMobileSites(_Smoothness): """Measures rendering statistics for the key mobile sites with synchronous (main thread) scrolling. @@ -285,6 +299,7 @@ @benchmark.Enabled('android') +@benchmark.Owner(emails=['vmiura@chromium.org']) class SmoothnessSimpleMobilePages(_Smoothness): """Measures rendering statistics for simple mobile sites page set. """ @@ -296,6 +311,7 @@ @benchmark.Disabled('all') # http://crbug.com/631015 +@benchmark.Owner(emails=['bokan@chromium.org']) class SmoothnessToughPinchZoomCases(_Smoothness): """Measures rendering statistics for pinch-zooming in the tough pinch zoom cases. @@ -316,6 +332,7 @@ @benchmark.Enabled('mac') +@benchmark.Owner(emails=['ericrk@chromium.org']) class SmoothnessDesktopToughPinchZoomCases(_Smoothness): """Measures rendering statistics for pinch-zooming in the tough pinch zoom cases. Uses lower zoom levels customized for desktop limits. @@ -331,6 +348,7 @@ # because of http://crbug.com/610021 # @benchmark.Enabled('android') @benchmark.Disabled('all') +@benchmark.Owner(emails=['ericrk@chromium.org']) class SmoothnessGpuRasterizationToughPinchZoomCases(_Smoothness): """Measures rendering statistics for pinch-zooming in the tough pinch zoom cases with GPU rasterization. @@ -352,6 +370,7 @@ @benchmark.Enabled('android') +@benchmark.Owner(emails=['vmiura@chromium.org']) class SmoothnessGpuRasterizationPolymer(_Smoothness): """Measures rendering statistics for the Polymer cases with GPU rasterization. """ @@ -366,6 +385,7 @@ return 'smoothness.gpu_rasterization.polymer' +@benchmark.Owner(emails=['reveman@chromium.org']) class SmoothnessToughScrollingCases(_Smoothness): page_set = page_sets.ToughScrollingCasesPageSet @@ -382,6 +402,7 @@ return 'smoothness.tough_scrolling_cases' @benchmark.Disabled('all') # crbug.com/667489 +@benchmark.Owner(emails=['ericrk@chromium.org']) class SmoothnessGpuRasterizationToughScrollingCases(_Smoothness): tag = 'gpu_rasterization' test = smoothness.Smoothness @@ -406,6 +427,7 @@ @benchmark.Disabled('android') # http://crbug.com/610015 +@benchmark.Owner(emails=['cblume@chromium.org']) class SmoothnessImageDecodingCases(_Smoothness): """Measures decoding statistics for jpeg images. """ @@ -425,6 +447,7 @@ @benchmark.Disabled('android') # http://crbug.com/513699 +@benchmark.Owner(emails=['cblume@chromium.org']) class SmoothnessGpuImageDecodingCases(_Smoothness): """Measures decoding statistics for jpeg images with GPU rasterization. """ @@ -442,6 +465,7 @@ @benchmark.Enabled('android') +@benchmark.Owner(emails=['picksi@chromium.org']) class SmoothnessPathologicalMobileSites(_Smoothness): """Measures task execution statistics while scrolling pathological sites. """ @@ -459,6 +483,7 @@ return False +@benchmark.Owner(emails=['vmiura@chromium.org']) class SmoothnessToughTextureUploadCases(_Smoothness): page_set = page_sets.ToughTextureUploadCasesPageSet @@ -467,6 +492,7 @@ return 'smoothness.tough_texture_upload_cases' +@benchmark.Owner(emails=['skyostil@chromium.org']) class SmoothnessToughAdCases(_Smoothness): """Measures rendering statistics while displaying advertisements.""" page_set = page_sets.SyntheticToughAdCasesPageSet @@ -489,6 +515,7 @@ # http://crbug.com/522619 (mac/win) # http://crbug.com/683247 (android/linux) @benchmark.Disabled('win', 'mac', 'android', 'linux') +@benchmark.Owner(emails=['skyostil@chromium.org']) class SmoothnessScrollingToughAdCases(_Smoothness): """Measures rendering statistics while scrolling advertisements.""" page_set = page_sets.ScrollingToughAdCasesPageSet @@ -503,6 +530,7 @@ return 'smoothness.scrolling_tough_ad_cases' +@benchmark.Owner(emails=['skyostil@chromium.org']) class SmoothnessToughWebGLAdCases(_Smoothness): """Measures rendering statistics while scrolling advertisements.""" page_set = page_sets.SyntheticToughWebglAdCasesPageSet
diff --git a/tools/perf/benchmarks/spaceport.py b/tools/perf/benchmarks/spaceport.py index 46f3b39..cd80b078 100644 --- a/tools/perf/benchmarks/spaceport.py +++ b/tools/perf/benchmarks/spaceport.py
@@ -104,6 +104,7 @@ # crbug.com/166703: This test frequently times out on Windows. @benchmark.Disabled('mac', 'win', 'linux', 'android') # crbug.com/525112 +@benchmark.Owner(emails=['junov@chromium.org']) class Spaceport(perf_benchmark.PerfBenchmark): """spaceport.io's PerfMarks benchmark.
diff --git a/tools/perf/benchmarks/speedometer.py b/tools/perf/benchmarks/speedometer.py index b4b12bf..3740d14 100644 --- a/tools/perf/benchmarks/speedometer.py +++ b/tools/perf/benchmarks/speedometer.py
@@ -91,6 +91,7 @@ keychain_metric.KeychainMetric().AddResults(tab, results) +@benchmark.Owner(emails=['bmeurer@chromium.org', 'mvstanton@chromium.org']) class Speedometer(perf_benchmark.PerfBenchmark): test = SpeedometerMeasurement @@ -109,17 +110,8 @@ return ps -@benchmark.Disabled('reference') # crbug.com/579546 -class SpeedometerIgnition(Speedometer): - def SetExtraBrowserOptions(self, options): - super(SpeedometerIgnition, self).SetExtraBrowserOptions(options) - v8_helper.EnableIgnition(options) - - @classmethod - def Name(cls): - return 'speedometer-ignition' - - +@benchmark.Owner(emails=['hablich@chromium.org']) +@benchmark.Disabled('all') class SpeedometerTurbo(Speedometer): def SetExtraBrowserOptions(self, options): super(SpeedometerTurbo, self).SetExtraBrowserOptions(options) @@ -128,3 +120,14 @@ @classmethod def Name(cls): return 'speedometer-turbo' + + +@benchmark.Owner(emails=['hablich@chromium.org']) +class SpeedometerClassic(Speedometer): + def SetExtraBrowserOptions(self, options): + super(SpeedometerClassic, self).SetExtraBrowserOptions(options) + v8_helper.EnableClassic(options) + + @classmethod + def Name(cls): + return 'speedometer-classic'
diff --git a/tools/perf/benchmarks/start_with_url.py b/tools/perf/benchmarks/start_with_url.py index cb42df9..64804f40 100644 --- a/tools/perf/benchmarks/start_with_url.py +++ b/tools/perf/benchmarks/start_with_url.py
@@ -33,6 +33,7 @@ @benchmark.Enabled('has tabs') @benchmark.Enabled('android') @benchmark.Disabled('chromeos', 'linux', 'mac', 'win') +@benchmark.Owner(emails=['pasko@chromium.org']) class StartWithUrlColdTBM(_StartupPerfBenchmark): """Measures time to start Chrome cold with startup URLs.""" @@ -57,6 +58,7 @@ @benchmark.Enabled('android') @benchmark.Disabled('android-reference') # crbug.com/588786 @benchmark.Disabled('chromeos', 'linux', 'mac', 'win') +@benchmark.Owner(emails=['pasko@chromium.org']) class StartWithUrlWarmTBM(_StartupPerfBenchmark): """Measures stimetime to start Chrome warm with startup URLs."""
diff --git a/tools/perf/benchmarks/startup.py b/tools/perf/benchmarks/startup.py index 74b1f3b..0f11502 100644 --- a/tools/perf/benchmarks/startup.py +++ b/tools/perf/benchmarks/startup.py
@@ -61,7 +61,8 @@ @benchmark.Disabled('reference', # http://crbug.com/476882 'android', # http://crbug.com/481919 - 'yosemite', # http://crbug.com/605485 + 'yosemite', # http://crbug.com/605485 + 'mac', # http://crbug.com/700843 'content-shell') # No pregenerated profiles. class StartupLargeProfileColdBlankPage(_StartupCold): """Measures cold startup time with a large profile.""" @@ -82,7 +83,9 @@ @benchmark.Disabled('reference', # http://crbug.com/476882 'android', # http://crbug.com/481919 - 'yosemite', # http://crbug.com/605485 + 'yosemite', # http://crbug.com/605485 + 'mac', # http://crbug.com/700843 + 'win', # http://crbug.com/704137 'content-shell') # No pregenerated profiles. class StartupLargeProfileWarmBlankPage(_StartupWarm): """Measures warm startup time with a large profile."""
diff --git a/tools/perf/benchmarks/sunspider.py b/tools/perf/benchmarks/sunspider.py index 888e194..b8abd29 100644 --- a/tools/perf/benchmarks/sunspider.py +++ b/tools/perf/benchmarks/sunspider.py
@@ -7,6 +7,7 @@ from core import perf_benchmark +from telemetry import benchmark from telemetry import page as page_module from telemetry.page import legacy_page_test from telemetry import story @@ -126,6 +127,7 @@ 'in sunspider')) +@benchmark.Owner(emails=['bmeurer@chromium.org', 'mvstanton@chromium.org']) class Sunspider(perf_benchmark.PerfBenchmark): """Apple's SunSpider JavaScript benchmark.
diff --git a/tools/perf/benchmarks/system_health.py b/tools/perf/benchmarks/system_health.py index 3c0fcc33..cf84b15 100644 --- a/tools/perf/benchmarks/system_health.py +++ b/tools/perf/benchmarks/system_health.py
@@ -39,6 +39,7 @@ options.config.chrome_trace_config.category_filter.AddFilterString('rail') options.config.enable_battor_trace = True options.config.enable_chrome_trace = True + options.config.enable_cpu_trace = True options.SetTimelineBasedMetrics([ 'clockSyncLatencyMetric', 'powerMetric', @@ -57,11 +58,8 @@ def ShouldTearDownStateAfterEachStoryRun(cls): return True - @classmethod - def Name(cls): - return 'system_health.common_%s' % cls.PLATFORM - +@benchmark.Owner(emails=['charliea@chromium.org', 'nednguyen@chromium.org']) class DesktopCommonSystemHealth(_CommonSystemHealthBenchmark): """Desktop Chrome Energy System Health Benchmark.""" PLATFORM = 'desktop' @@ -70,11 +68,22 @@ def ShouldDisable(cls, possible_browser): return possible_browser.platform.GetDeviceTypeName() != 'Desktop' + @classmethod + def Name(cls): + return 'system_health.common_desktop' + + @benchmark.Enabled('android') +@benchmark.Owner(emails=['charliea@chromium.org', 'nednguyen@chromium.org']) class MobileCommonSystemHealth(_CommonSystemHealthBenchmark): """Mobile Chrome Energy System Health Benchmark.""" PLATFORM = 'mobile' + @classmethod + def Name(cls): + return 'system_health.common_mobile' + + class _MemorySystemHealthBenchmark(perf_benchmark.PerfBenchmark): """Chrome Memory System Health Benchmark. @@ -105,16 +114,13 @@ return True @classmethod - def Name(cls): - return 'system_health.memory_%s' % cls.PLATFORM - - @classmethod def ValueCanBeAddedPredicate(cls, value, is_first_result): # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard # is able to cope with the data load generated by TBMv2 metrics. return not _IGNORED_STATS_RE.search(value.name) +@benchmark.Owner(emails=['perezju@chromium.org']) class DesktopMemorySystemHealth(_MemorySystemHealthBenchmark): """Desktop Chrome Memory System Health Benchmark.""" PLATFORM = 'desktop' @@ -123,8 +129,13 @@ def ShouldDisable(cls, possible_browser): return possible_browser.platform.GetDeviceTypeName() != 'Desktop' + @classmethod + def Name(cls): + return 'system_health.memory_desktop' + @benchmark.Enabled('android') +@benchmark.Owner(emails=['perezju@chromium.org']) class MobileMemorySystemHealth(_MemorySystemHealthBenchmark): """Mobile Chrome Memory System Health Benchmark.""" PLATFORM = 'mobile' @@ -138,8 +149,13 @@ # - avoiding the bug. options.clear_sytem_cache_for_browser_and_profile_on_start = True + @classmethod + def Name(cls): + return 'system_health.memory_mobile' + @benchmark.Enabled('android-webview') +@benchmark.Owner(emails=['perezju@chromium.org', 'torne@chromium.org']) class WebviewStartupSystemHealthBenchmark(perf_benchmark.PerfBenchmark): """Webview startup time benchmark
diff --git a/tools/perf/benchmarks/system_health_smoke_test.py b/tools/perf/benchmarks/system_health_smoke_test.py index 407993d..2930e282 100644 --- a/tools/perf/benchmarks/system_health_smoke_test.py +++ b/tools/perf/benchmarks/system_health_smoke_test.py
@@ -32,10 +32,10 @@ _DISABLED_TESTS = frozenset({ + # crbug.com/702455 + 'benchmarks.system_health_smoke_test.SystemHealthBenchmarkSmokeTest.system_health.memory_desktop.browse:media:youtube', # pylint: disable=line-too-long # crbug.com/637230 'benchmarks.system_health_smoke_test.SystemHealthBenchmarkSmokeTest.system_health.memory_desktop.browse:news:cnn', # pylint: disable=line-too-long - # crbug.com/666293 - 'benchmarks.system_health_smoke_test.SystemHealthBenchmarkSmokeTest.system_health.memory_mobile.browse:media:youtube', # pylint: disable=line-too-long # Permenently disabled from smoke test for being long-running. 'benchmarks.system_health_smoke_test.SystemHealthBenchmarkSmokeTest.system_health.memory_mobile.long_running:tools:gmail-foreground', # pylint: disable=line-too-long 'benchmarks.system_health_smoke_test.SystemHealthBenchmarkSmokeTest.system_health.memory_mobile.long_running:tools:gmail-background', # pylint: disable=line-too-long @@ -49,12 +49,18 @@ # crbug.com/ 'benchmarks.system_health_smoke_test.SystemHealthBenchmarkSmokeTest.system_health.memory_desktop.browse:news:nytimes', # pylint: disable=line-too-long + # crbug.com/688190 + 'benchmarks.system_health_smoke_test.SystemHealthBenchmarkSmokeTest.system_health.memory_mobile.browse:news:washingtonpost', # pylint: disable=line-too-long + # crbug.com/696824 'benchmarks.system_health_smoke_test.SystemHealthBenchmarkSmokeTest.system_health.memory_desktop.load:news:qq', # pylint: disable=line-too-long # crbug.com/698006 'benchmarks.system_health_smoke_test.SystemHealthBenchmarkSmokeTest.system_health.memory_desktop.load:tools:drive', # pylint: disable=line-too-long 'benchmarks.system_health_smoke_test.SystemHealthBenchmarkSmokeTest.system_health.memory_desktop.load:tools:gmail', # pylint: disable=line-too-long + + # crbug.com/699966 + 'benchmarks.system_health_smoke_test.SystemHealthBenchmarkSmokeTest.system_health.memory_desktop.multitab:misc:typical24', # pylint: disable=line-too-long }) @@ -147,8 +153,14 @@ # Since none of our system health benchmarks creates stories based on # command line options, it should be ok to pass options=None to # CreateStorySet. - for story_to_smoke_test in ( - benchmark_class().CreateStorySet(options=None).stories): + stories_set = benchmark_class().CreateStorySet(options=None) + + # Prefetch WPR archive needed by the stories set to avoid race condition + # when feching them when tests are run in parallel. + # See crbug.com/700426 for more details. + stories_set.wpr_archive_info.DownloadArchivesIfNeeded() + + for story_to_smoke_test in stories_set.stories: suite.addTest( _GenerateSmokeTestCase(benchmark_class, story_to_smoke_test))
diff --git a/tools/perf/benchmarks/tab_switching.py b/tools/perf/benchmarks/tab_switching.py index 6962989c..a451fec 100644 --- a/tools/perf/benchmarks/tab_switching.py +++ b/tools/perf/benchmarks/tab_switching.py
@@ -9,31 +9,10 @@ from telemetry import benchmark +@benchmark.Owner(emails=['vovoy@chromium.org'], + component='OS>Performance') @benchmark.Enabled('has tabs') -@benchmark.Disabled('android') # http://crbug.com/460084 -@benchmark.Disabled('mac-reference') # http://crbug.com/634378 -class TabSwitchingTop10(perf_benchmark.PerfBenchmark): - """This test records the MPArch.RWH_TabSwitchPaintDuration histogram. - - The histogram is a measure of the time between when a tab was requested to be - shown, and when first paint occurred. The script opens 10 pages in different - tabs, waits for them to load, and then switches to each tab and records the - metric. The pages were chosen from Alexa top ranking sites. - """ - test = tab_switching.TabSwitching - page_set = page_sets.Top10PageSet - - @classmethod - def Name(cls): - return 'tab_switching.top_10' - - @classmethod - def ShouldTearDownStateAfterEachStoryRun(cls): - return False - - -@benchmark.Enabled('has tabs') -@benchmark.Disabled('mac-reference') # http://crbug.com/612774 +@benchmark.Disabled('mac') # http://crbug.com/612774 @benchmark.Disabled('android') # http://crbug.com/460084 class TabSwitchingTypical25(perf_benchmark.PerfBenchmark): """This test records the MPArch.RWH_TabSwitchPaintDuration histogram. @@ -46,7 +25,8 @@ test = tab_switching.TabSwitching def CreateStorySet(self, options): - return page_sets.Typical25PageSet(run_no_page_interactions=True) + return page_sets.SystemHealthStorySet(platform='desktop', + case='multitab:misc') @classmethod def Name(cls): @@ -55,74 +35,3 @@ @classmethod def ShouldTearDownStateAfterEachStoryRun(cls): return False - - -@benchmark.Disabled('android') # http://crbug.com/460084 -@benchmark.Disabled('mac-reference') # http://crbug.com/634360 -@benchmark.Enabled('has tabs') -class TabSwitchingFiveBlankTabs(perf_benchmark.PerfBenchmark): - """This test records the MPArch.RWH_TabSwitchPaintDuration histogram. - - The histogram is a measure of the time between when a tab was requested to be - shown, and when first paint occurred. The script opens 5 blank pages in - different tabs, waits for them to load, and then switches to each tab and - records the metric. Blank pages are use to detect unnecessary idle wakeups. - """ - test = tab_switching.TabSwitching - page_set = page_sets.FiveBlankPagesPageSet - options = {'pageset_repeat': 10} - - @classmethod - def Name(cls): - return 'tab_switching.five_blank_pages' - - @classmethod - def ShouldTearDownStateAfterEachStoryRun(cls): - return False - - -@benchmark.Enabled('has tabs') -# http://crbug.com/460084, http://crbug.com/488067, http://crbug.com/634347 -# win: http://crbug.com/677311 -@benchmark.Disabled('android', 'linux', 'mac-reference', 'win') -class TabSwitchingToughEnergyCases(perf_benchmark.PerfBenchmark): - """This test records the MPArch.RWH_TabSwitchPaintDuration histogram. - - The histogram is a measure of the time between when a tab was requested to be - shown, and when first paint occurred. The script opens each page in a - different tab, waits for them to load, and then switches to each tab and - records the metric. The pages were written by hand to stress energy usage. - """ - test = tab_switching.TabSwitching - page_set = page_sets.ToughEnergyCasesPageSet - options = {'pageset_repeat': 10} - - @classmethod - def Name(cls): - return 'tab_switching.tough_energy_cases' - - @classmethod - def ShouldTearDownStateAfterEachStoryRun(cls): - return False - - -@benchmark.Enabled('has tabs') -@benchmark.Disabled('android') # http://crbug.com/460084 -class TabSwitchingToughImageCases(perf_benchmark.PerfBenchmark): - """This test records the MPArch.RWH_TabSwitchPaintDuration histogram. - - The histogram is a measure of the time between when a tab was requested to be - shown, and when first paint occurred. The script opens each page in different - tabs, waits for them to load, and then switches to each tab and records the - metric. The pages were chosen by hand to stress the image decoding system. - """ - test = tab_switching.TabSwitching - page_set = page_sets.ToughImageCasesPageSet - - @classmethod - def Name(cls): - return 'tab_switching.tough_image_cases' - - @classmethod - def ShouldTearDownStateAfterEachStoryRun(cls): - return False
diff --git a/tools/perf/benchmarks/text_selection.py b/tools/perf/benchmarks/text_selection.py index 17c7141..da2fbf5 100644 --- a/tools/perf/benchmarks/text_selection.py +++ b/tools/perf/benchmarks/text_selection.py
@@ -38,6 +38,7 @@ # See crbug.com/519044 @benchmark.Disabled('all') +@benchmark.Owner(emails=['mfomitchev@chromium.org']) class TextSelectionDirection(_TextSelection): """Measure text selection metrics while dragging a touch selection handle on a subset of top ten mobile sites and using the 'direction' touch selection @@ -53,6 +54,7 @@ # See crbug.com/519044 @benchmark.Disabled('all') +@benchmark.Owner(emails=['mfomitchev@chromium.org']) class TextSelectionCharacter(_TextSelection): """Measure text selection metrics while dragging a touch selection handle on a subset of top ten mobile sites and using the 'character' touch selection
diff --git a/tools/perf/benchmarks/thread_times.py b/tools/perf/benchmarks/thread_times.py index bdbd50c..59ce362 100644 --- a/tools/perf/benchmarks/thread_times.py +++ b/tools/perf/benchmarks/thread_times.py
@@ -34,6 +34,7 @@ @benchmark.Enabled('android') +@benchmark.Owner(emails=['vmiura@chromium.org']) class ThreadTimesKeySilkCases(_ThreadTimes): """Measures timeline metrics while performing smoothness action on key silk cases.""" @@ -69,6 +70,7 @@ @benchmark.Enabled('android') +@benchmark.Owner(emails=['vmiura@chromium.org']) class ThreadTimesSimpleMobileSites(_ThreadTimes): """Measures timeline metric using smoothness action on simple mobile sites http://www.chromium.org/developers/design-documents/rendering-benchmarks""" @@ -79,6 +81,7 @@ return 'thread_times.simple_mobile_sites' +@benchmark.Owner(emails=['vmiura@chromium.org']) class ThreadTimesCompositorCases(_ThreadTimes): """Measures timeline metrics while performing smoothness action on tough compositor cases, using software rasterization. @@ -96,6 +99,7 @@ @benchmark.Enabled('android') +@benchmark.Owner(emails=['ykyyip@chromium.org']) class ThreadTimesPolymer(_ThreadTimes): """Measures timeline metrics while performing smoothness action on Polymer cases.""" @@ -107,6 +111,7 @@ @benchmark.Enabled('android') +@benchmark.Owner(emails=['skyostil@chromium.org']) class ThreadTimesKeyIdlePowerCases(_ThreadTimes): """Measures timeline metrics for sites that should be idle in foreground and background scenarios. The metrics are per-second rather than per-frame.""" @@ -138,6 +143,7 @@ return 'per_frame' not in value.name and 'mean_frame' not in value.name +@benchmark.Owner(emails=['tdresser@chromium.org']) class ThreadTimesToughScrollingCases(_ThreadTimes): """Measure timeline metrics while performing smoothness action on tough scrolling cases."""
diff --git a/tools/perf/benchmarks/tracing.py b/tools/perf/benchmarks/tracing.py index 71adb584..805ccdf 100644 --- a/tools/perf/benchmarks/tracing.py +++ b/tools/perf/benchmarks/tracing.py
@@ -12,6 +12,9 @@ import page_sets +@benchmark.Owner(emails=['oysteine@chromium.org', + 'nednguyen@chromium.org', + 'zhenw@chromium.org']) class TracingWithDebugOverhead(perf_benchmark.PerfBenchmark): page_set = page_sets.Top10PageSet @@ -30,6 +33,7 @@ # TODO(ssid): Enable on reference builds once stable browser starts supporting # background mode memory-infra. crbug.com/621195. @benchmark.Disabled('reference') +@benchmark.Owner(emails=['ssid@chromium.org']) class TracingWithBackgroundMemoryInfra(perf_benchmark.PerfBenchmark): """Measures the overhead of background memory-infra dumps""" page_set = page_sets.Top10PageSet
diff --git a/tools/perf/benchmarks/v8.py b/tools/perf/benchmarks/v8.py index 6f95a71..f835c10 100644 --- a/tools/perf/benchmarks/v8.py +++ b/tools/perf/benchmarks/v8.py
@@ -30,6 +30,7 @@ @benchmark.Disabled('win') # crbug.com/416502 +@benchmark.Owner(emails=['hpayer@chromium.org', 'rmcilroy@chromium.org']) class V8Top25(perf_benchmark.PerfBenchmark): """Measures V8 GC metrics on the while scrolling down the top 25 web pages. @@ -38,16 +39,12 @@ page_set = page_sets.V8Top25SmoothPageSet @classmethod - def ShouldDisable(cls, possible_browser): # http://crbug.com/597656 - return (possible_browser.browser_type == 'reference' and - possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X') - - @classmethod def Name(cls): return 'v8.top_25_smooth' @benchmark.Enabled('android') +@benchmark.Owner(emails=['hpayer@chromium.org', 'rmcilroy@chromium.org']) class V8KeyMobileSites(perf_benchmark.PerfBenchmark): """Measures V8 GC metrics on the while scrolling down key mobile sites. @@ -59,11 +56,6 @@ def Name(cls): return 'v8.key_mobile_sites_smooth' - @classmethod - def ShouldDisable(cls, possible_browser): # http://crbug.com/597656 - return (possible_browser.browser_type == 'reference' and - possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X') - class V8DetachedContextAgeInGC(perf_benchmark.PerfBenchmark): """Measures the number of GCs needed to collect a detached context. @@ -96,19 +88,31 @@ v8_helper.AppendJSFlags(options, '--heap-growing-percent=10') def CreateTimelineBasedMeasurementOptions(self): - v8_categories = [ - 'blink.console', 'disabled-by-default-v8.gc', - 'renderer.scheduler', 'v8', 'webkit.console'] - smoothness_categories = [ - 'webkit.console', 'blink.console', 'benchmark', 'trace_event_overhead'] - memory_categories = ['blink.console', 'disabled-by-default-memory-infra'] + categories = [ + # Disable all categories by default. + '-*', + # Memory categories. + 'disabled-by-default-memory-infra', + # EQT categories. + 'blink.user_timing', + 'loading', + 'navigation', + 'toplevel', + # V8 categories. + 'blink.console', + 'disabled-by-default-v8.compile', + 'disabled-by-default-v8.gc', + 'renderer.scheduler', + 'v8', + 'webkit.console' + ] category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter( - ','.join(['-*'] + v8_categories + - smoothness_categories + memory_categories)) + ','.join(categories)) options = timeline_based_measurement.Options(category_filter) # TODO(ulan): Add frame time discrepancy once it is ported to TBMv2, # see crbug.com/606841. - options.SetTimelineBasedMetrics(['v8AndMemoryMetrics']) + options.SetTimelineBasedMetrics([ + 'expectedQueueingTimeMetric', 'v8AndMemoryMetrics']) # Setting an empty memory dump config disables periodic dumps. options.config.chrome_trace_config.SetMemoryDumpConfig( chrome_trace_config.MemoryDumpConfig()) @@ -116,13 +120,14 @@ @classmethod def ValueCanBeAddedPredicate(cls, value, _): - return 'v8' in value.name + return ('v8' in value.name) or ('eqt' in value.name) @classmethod def ShouldTearDownStateAfterEachStoryRun(cls): return True +@benchmark.Owner(emails=['jochen@chromium.org']) class V8TodoMVC(perf_benchmark.PerfBenchmark): """Measures V8 Execution metrics on the TodoMVC examples.""" page_set = page_sets.TodoMVCPageSet @@ -144,20 +149,8 @@ def ShouldTearDownStateAfterEachStoryRun(cls): return True - -class V8TodoMVCIgnition(V8TodoMVC): - """Measures V8 Execution metrics on the TodoMVC examples using ignition.""" - page_set = page_sets.TodoMVCPageSet - - def SetExtraBrowserOptions(self, options): - super(V8TodoMVCIgnition, self).SetExtraBrowserOptions(options) - v8_helper.EnableIgnition(options) - - @classmethod - def Name(cls): - return 'v8.todomvc-ignition' - - +@benchmark.Disabled('all') +@benchmark.Owner(emails=['mvstaton@chromium.org']) class V8TodoMVCTurbo(V8TodoMVC): """Measures V8 Execution metrics on the TodoMVC examples using Ignition+TurboFan.""" @@ -173,30 +166,35 @@ return 'v8.todomvc-turbo' +@benchmark.Owner(emails=['hablich@chromium.org']) +class V8TodoMVCClassic(V8TodoMVC): + """Measures V8 Execution metrics on the TodoMVC examples + using the Classic pipeline.""" + page_set = page_sets.TodoMVCPageSet + + def SetExtraBrowserOptions(self, options): + super(V8TodoMVCClassic, self).SetExtraBrowserOptions(options) + v8_helper.EnableClassic(options) + + @classmethod + def Name(cls): + return 'v8.todomvc-classic' + + +@benchmark.Owner(emails=['ulan@chromium.org']) class V8InfiniteScroll(_InfiniteScrollBenchmark): """Measures V8 GC metrics and memory usage while scrolling the top web pages. http://www.chromium.org/developers/design-documents/rendering-benchmarks""" - page_set = page_sets.InfiniteScrollPageSet + page_set = page_sets.InfiniteScrollStorySet @classmethod def Name(cls): return 'v8.infinite_scroll_tbmv2' - -class V8InfiniteScrollIgnition(V8InfiniteScroll): - """Measures V8 GC metrics using Ignition.""" - - def SetExtraBrowserOptions(self, options): - super(V8InfiniteScrollIgnition, self).SetExtraBrowserOptions(options) - v8_helper.EnableIgnition(options) - - @classmethod - def Name(cls): - return 'v8.infinite_scroll-ignition_tbmv2' - - +@benchmark.Disabled('all') +@benchmark.Owner(emails=['mvstaton@chromium.org']) class V8InfiniteScrollTurbo(V8InfiniteScroll): """Measures V8 GC metrics using Ignition+TurboFan.""" @@ -209,25 +207,35 @@ return 'v8.infinite_scroll-turbo_tbmv2' +@benchmark.Owner(emails=['hablich@chromium.org']) +class V8InfiniteScrollClassic(V8InfiniteScroll): + """Measures V8 GC metrics using the Classic pipeline.""" + + def SetExtraBrowserOptions(self, options): + super(V8InfiniteScrollClassic, self).SetExtraBrowserOptions(options) + v8_helper.EnableClassic(options) + + @classmethod + def Name(cls): + return 'v8.infinite_scroll-classic_tbmv2' + + @benchmark.Enabled('android') +@benchmark.Owner(emails=['ulan@chromium.org']) class V8MobileInfiniteScroll(_InfiniteScrollBenchmark): """Measures V8 GC metrics and memory usage while scrolling the top mobile web pages. http://www.chromium.org/developers/design-documents/rendering-benchmarks""" - page_set = page_sets.MobileInfiniteScrollPageSet + page_set = page_sets.MobileInfiniteScrollStorySet @classmethod def Name(cls): return 'v8.mobile_infinite_scroll_tbmv2' - @classmethod - def ShouldDisable(cls, possible_browser): # http://crbug.com/597656 - return (possible_browser.browser_type == 'reference' and - possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X') - -@benchmark.Enabled('android') +@benchmark.Disabled('all') # was enabled only on android +@benchmark.Owner(emails=['mvstaton@chromium.org']) class V8MobileInfiniteScrollTurbo(V8MobileInfiniteScroll): """Measures V8 GC metrics and memory usage while scrolling the top mobile web pages and running Ignition+TurboFan. @@ -242,6 +250,22 @@ return 'v8.mobile_infinite_scroll-turbo_tbmv2' +@benchmark.Enabled('android') +@benchmark.Owner(emails=['hablich@chromium.org']) +class V8MobileInfiniteScrollClassic(V8MobileInfiniteScroll): + """Measures V8 GC metrics and memory usage while scrolling the top mobile + web pages and running the Classic pipeline. + http://www.chromium.org/developers/design-documents/rendering-benchmarks""" + + def SetExtraBrowserOptions(self, options): + super(V8MobileInfiniteScrollClassic, self).SetExtraBrowserOptions(options) + v8_helper.EnableClassic(options) + + @classmethod + def Name(cls): + return 'v8.mobile_infinite_scroll-classic_tbmv2' + +@benchmark.Owner(emails=['hablich@chromium.org']) class V8Adword(perf_benchmark.PerfBenchmark): """Measures V8 Execution metrics on the Adword page.""" @@ -325,6 +349,7 @@ @benchmark.Disabled('android', 'win', 'reference') # crbug.com/664318 +@benchmark.Owner(emails=['cbruni@chromium.org']) class V8Top25RuntimeStats(_Top25RuntimeStats): """Runtime Stats benchmark for a 25 top V8 web pages.
diff --git a/tools/perf/benchmarks/v8_browsing.py b/tools/perf/benchmarks/v8_browsing.py index 9cbbf73..bf51f66 100644 --- a/tools/perf/benchmarks/v8_browsing.py +++ b/tools/perf/benchmarks/v8_browsing.py
@@ -42,8 +42,14 @@ '-*', # Memory categories. 'disabled-by-default-memory-infra', + # EQT categories. + 'blink.user_timing', + 'loading', + 'navigation', + 'toplevel', # V8 categories. 'blink.console', + 'disabled-by-default-v8.compile', 'disabled-by-default-v8.gc', 'renderer.scheduler', 'v8', @@ -61,17 +67,14 @@ memory_dump_config = chrome_trace_config.MemoryDumpConfig() memory_dump_config.AddTrigger('light', 1000) options.config.chrome_trace_config.SetMemoryDumpConfig(memory_dump_config) - options.SetTimelineBasedMetrics(['v8AndMemoryMetrics']) + options.SetTimelineBasedMetrics([ + 'expectedQueueingTimeMetric', 'v8AndMemoryMetrics']) return options def CreateStorySet(self, options): return page_sets.SystemHealthStorySet(platform=self.PLATFORM, case='browse') @classmethod - def Name(cls): - return 'v8.browsing_%s%s' % (cls.PLATFORM, cls.TEST_SUFFIX) - - @classmethod def ValueCanBeAddedPredicate(cls, value, is_first_result): # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard # is able to cope with the data load generated by TBMv2 metrics. @@ -81,8 +84,8 @@ if 'v8-gc' in value.name: return (_V8_GC_HIGH_LEVEL_STATS_RE.search(value.name) and not _IGNORED_V8_STATS_RE.search(value.name)) - # Allow all other non-GC metrics. - return 'v8' in value.name + # Allow all other metrics. + return True @classmethod def ShouldTearDownStateAfterEachStoryRun(cls): @@ -105,6 +108,11 @@ # UE categories requred by runtimeStatsTotalMetric to bucket # runtimeStats by UE. 'rail', + # EQT categories. + 'blink.user_timing', + 'loading', + 'navigation', + 'toplevel', # V8 categories. 'blink.console', 'disabled-by-default-v8.gc', @@ -122,17 +130,14 @@ memory_dump_config.AddTrigger('light', 1000) options.config.chrome_trace_config.SetMemoryDumpConfig(memory_dump_config) - options.SetTimelineBasedMetrics(['runtimeStatsTotalMetric', 'gcMetric']) + options.SetTimelineBasedMetrics([ + 'expectedQueueingTimeMetric', 'runtimeStatsTotalMetric', 'gcMetric']) return options def CreateStorySet(self, options): return page_sets.SystemHealthStorySet(platform=self.PLATFORM, case='browse') @classmethod - def Name(cls): - return 'v8.runtimestats.browsing_%s%s' % (cls.PLATFORM, cls.TEST_SUFFIX) - - @classmethod def ShouldTearDownStateAfterEachStoryRun(cls): return True @@ -156,72 +161,109 @@ return possible_browser.platform.GetDeviceTypeName() == 'Desktop' +@benchmark.Owner(emails=['ulan@chromium.org']) class V8DesktopBrowsingBenchmark(_V8DesktopBrowsingBenchmark): PLATFORM = 'desktop' - TEST_SUFFIX = '' + + @classmethod + def Name(cls): + return 'v8.browsing_desktop' +@benchmark.Owner(emails=['ulan@chromium.org']) @benchmark.Disabled('reference') # http://crbug.com/628631 class V8MobileBrowsingBenchmark(_V8MobileBrowsingBenchmark): PLATFORM = 'mobile' - TEST_SUFFIX = '' + + @classmethod + def Name(cls): + return 'v8.browsing_mobile' -class V8DesktopIgnitionBrowsingBenchmark(_V8DesktopBrowsingBenchmark): - PLATFORM = 'desktop' - TEST_SUFFIX = '_ignition' - - def SetExtraBrowserOptions(self, options): - super(V8DesktopIgnitionBrowsingBenchmark, self).SetExtraBrowserOptions( - options) - v8_helper.EnableIgnition(options) - - +@benchmark.Disabled('reference') # http://crbug.com/700390 +@benchmark.Disabled('all') +@benchmark.Owner(emails=['mvstaton@chromium.org']) class V8DesktopTurboBrowsingBenchmark(_V8DesktopBrowsingBenchmark): PLATFORM = 'desktop' - TEST_SUFFIX = '_turbo' def SetExtraBrowserOptions(self, options): super(V8DesktopTurboBrowsingBenchmark, self).SetExtraBrowserOptions( options) v8_helper.EnableTurbo(options) + @classmethod + def Name(cls): + return 'v8.browsing_desktop_turbo' -@benchmark.Disabled('reference') # http://crbug.com/628631 -class V8MobileIgnitionBrowsingBenchmark(_V8MobileBrowsingBenchmark): - PLATFORM = 'mobile' - TEST_SUFFIX = '_ignition' - - def SetExtraBrowserOptions(self, options): - super(V8MobileIgnitionBrowsingBenchmark, self).SetExtraBrowserOptions( - options) - v8_helper.EnableIgnition(options) @benchmark.Disabled('reference') # http://crbug.com/628631 +@benchmark.Disabled('all') +@benchmark.Owner(emails=['mvstaton@chromium.org']) class V8MobileTurboBrowsingBenchmark(_V8MobileBrowsingBenchmark): PLATFORM = 'mobile' - TEST_SUFFIX = '_turbo' def SetExtraBrowserOptions(self, options): super(V8MobileTurboBrowsingBenchmark, self).SetExtraBrowserOptions( options) + v8_helper.EnableTurbo(options) + + @classmethod + def Name(cls): + return 'v8.browsing_mobile_turbo' +@benchmark.Disabled('reference') # http://crbug.com/700390 +@benchmark.Owner(emails=['hablich@chromium.org']) +class V8DesktopClassicBrowsingBenchmark(_V8DesktopBrowsingBenchmark): + PLATFORM = 'desktop' + + def SetExtraBrowserOptions(self, options): + super(V8DesktopClassicBrowsingBenchmark, self).SetExtraBrowserOptions( + options) + v8_helper.EnableClassic(options) + + @classmethod + def Name(cls): + return 'v8.browsing_desktop_classic' + + +@benchmark.Disabled('reference') # http://crbug.com/628631 +@benchmark.Owner(emails=['hablich@chromium.org']) +class V8MobileClassicBrowsingBenchmark(_V8MobileBrowsingBenchmark): + PLATFORM = 'mobile' + + def SetExtraBrowserOptions(self, options): + super(V8MobileClassicBrowsingBenchmark, self).SetExtraBrowserOptions( + options) + v8_helper.EnableClassic(options) + + @classmethod + def Name(cls): + return 'v8.browsing_mobile_classic' + + +@benchmark.Owner(emails=['mythria@chromium.org']) +@benchmark.Disabled('win') # http://crbug.com/704197 class V8RuntimeStatsDesktopBrowsingBenchmark( _V8RuntimeStatsBrowsingBenchmark): PLATFORM = 'desktop' - TEST_SUFFIX = '' @classmethod def ShouldDisable(cls, possible_browser): return possible_browser.platform.GetDeviceTypeName() != 'Desktop' + @classmethod + def Name(cls): + return 'v8.runtimestats.browsing_desktop' + +@benchmark.Disabled('reference') # http://crbug.com/700390 +@benchmark.Disabled('all') +@benchmark.Owner(emails=['mythria@chromium.org']) class V8RuntimeStatsDesktopTurboBrowsingBenchmark( _V8RuntimeStatsBrowsingBenchmark): PLATFORM = 'desktop' - TEST_SUFFIX = '_turbo' def SetExtraBrowserOptions(self, options): super(V8RuntimeStatsDesktopTurboBrowsingBenchmark, @@ -232,23 +274,54 @@ def ShouldDisable(cls, possible_browser): return possible_browser.platform.GetDeviceTypeName() != 'Desktop' + @classmethod + def Name(cls): + return 'v8.runtimestats.browsing_desktop_turbo' + + +@benchmark.Disabled('reference', # http://crbug.com/700390 + 'win') # http://crbug.com/704197 +@benchmark.Owner(emails=['hablich@chromium.org']) +class V8RuntimeStatsDesktopClassicBrowsingBenchmark( + _V8RuntimeStatsBrowsingBenchmark): + PLATFORM = 'desktop' + + def SetExtraBrowserOptions(self, options): + super(V8RuntimeStatsDesktopClassicBrowsingBenchmark, + self).SetExtraBrowserOptions(options) + v8_helper.EnableClassic(options) + + @classmethod + def ShouldDisable(cls, possible_browser): + return possible_browser.platform.GetDeviceTypeName() != 'Desktop' + + @classmethod + def Name(cls): + return 'v8.runtimestats.browsing_desktop_classic' + + @benchmark.Disabled('reference') # http://crbug.com/694658 +@benchmark.Owner(emails=['mythria@chromium.org']) class V8RuntimeStatsMobileBrowsingBenchmark( _V8RuntimeStatsBrowsingBenchmark): PLATFORM = 'mobile' - TEST_SUFFIX = '' @classmethod def ShouldDisable(cls, possible_browser): return possible_browser.platform.GetDeviceTypeName() == 'Desktop' + @classmethod + def Name(cls): + return 'v8.runtimestats.browsing_mobile' + @benchmark.Disabled('reference') # http://crbug.com/694658 +@benchmark.Disabled('all') +@benchmark.Owner(emails=['mythria@chromium.org']) class V8RuntimeStatsMobileTurboBrowsingBenchmark( _V8RuntimeStatsBrowsingBenchmark): PLATFORM = 'mobile' - TEST_SUFFIX = '_turbo' def SetExtraBrowserOptions(self, options): super(V8RuntimeStatsMobileTurboBrowsingBenchmark, @@ -259,3 +332,26 @@ def ShouldDisable(cls, possible_browser): return possible_browser.platform.GetDeviceTypeName() == 'Desktop' + @classmethod + def Name(cls): + return 'v8.runtimestats.browsing_mobile_turbo' + + +@benchmark.Disabled('reference') # http://crbug.com/694658 +@benchmark.Owner(emails=['hablich@chromium.org']) +class V8RuntimeStatsMobileClassicBrowsingBenchmark( + _V8RuntimeStatsBrowsingBenchmark): + PLATFORM = 'mobile' + + def SetExtraBrowserOptions(self, options): + super(V8RuntimeStatsMobileClassicBrowsingBenchmark, + self).SetExtraBrowserOptions(options) + v8_helper.EnableClassic(options) + + @classmethod + def ShouldDisable(cls, possible_browser): + return possible_browser.platform.GetDeviceTypeName() == 'Desktop' + + @classmethod + def Name(cls): + return 'v8.runtimestats.browsing_mobile_classic'
diff --git a/tools/perf/benchmarks/v8_helper.py b/tools/perf/benchmarks/v8_helper.py index 6eb8d4d..c2eccf55 100644 --- a/tools/perf/benchmarks/v8_helper.py +++ b/tools/perf/benchmarks/v8_helper.py
@@ -5,15 +5,14 @@ _JS_FLAGS_SWITCH = '--js-flags=' -def EnableIgnition(options): - AppendJSFlags(options, '--ignition-staging') - - def EnableTurbo(options): - AppendJSFlags(options, '--ignition-staging') AppendJSFlags(options, '--turbo') +def EnableClassic(options): + AppendJSFlags(options, '--no-turbo') + + def AppendJSFlags(options, js_flags): existing_js_flags = '' # There should be only one occurence of --js-flags in the browser flags. When
diff --git a/tools/perf/benchmarks/webrtc.py b/tools/perf/benchmarks/webrtc.py index d9388a7..de21783 100644 --- a/tools/perf/benchmarks/webrtc.py +++ b/tools/perf/benchmarks/webrtc.py
@@ -41,6 +41,7 @@ return 'webrtc.peerconnection' +@benchmark.Owner(emails=['phoglund@chromium.org']) class WebrtcDataChannel(_Webrtc): """Measures WebRtc DataChannel loopback.""" page_set = page_sets.WebrtcDatachannelPageSet @@ -50,7 +51,7 @@ return 'webrtc.datachannel' -@benchmark.Disabled('android') # http://crbug.com/663802 +@benchmark.Owner(emails=['ehmaldonado@chromium.org', 'phoglund@chromium.org']) class WebrtcStressTest(perf_benchmark.PerfBenchmark): """Measures WebRtc CPU and GPU usage with multiple peer connections.""" page_set = page_sets.WebrtcStresstestPageSet @@ -71,6 +72,7 @@ # capture. See http://crbug.com/603232. @benchmark.Disabled('reference') @benchmark.Disabled('android') # http://crbug.com/610019 +@benchmark.Owner(emails=['qiangchen@chromium.org']) class WebrtcRendering(perf_benchmark.PerfBenchmark): """Specific time measurements (e.g. fps, smoothness) for WebRtc rendering.""" @@ -91,3 +93,33 @@ @classmethod def Name(cls): return 'webrtc.webrtc_smoothness' + + +# WebrtcRenderingTBMv2 must be a PerfBenchmark, and not a _Webrtc, because it is +# a timeline-based metric. +@benchmark.Owner(emails=['ehmaldonado@chromium.org', + 'phoglund@chromium.org', + 'qiangchen@chromium.org']) +class WebrtcRenderingTBMv2(perf_benchmark.PerfBenchmark): + """Specific time measurements (e.g. fps, smoothness) for WebRtc rendering.""" + + page_set = page_sets.WebrtcRenderingPageSet + + def CreateTimelineBasedMeasurementOptions(self): + category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter( + filter_string='webrtc,toplevel') + options = timeline_based_measurement.Options(category_filter) + options.SetTimelineBasedMetrics([ + 'cpuTimeMetric', + 'expectedQueueingTimeMetric', + 'webrtcRenderingMetric', + ]) + return options + + def SetExtraBrowserOptions(self, options): + options.AppendExtraBrowserArgs('--use-fake-device-for-media-stream') + options.AppendExtraBrowserArgs('--use-fake-ui-for-media-stream') + + @classmethod + def Name(cls): + return 'webrtc.webrtc_smoothness_tbmv2'
diff --git a/tools/perf/chrome_telemetry_build/BUILD.gn b/tools/perf/chrome_telemetry_build/BUILD.gn index 8914f3c..98f28d9 100644 --- a/tools/perf/chrome_telemetry_build/BUILD.gn +++ b/tools/perf/chrome_telemetry_build/BUILD.gn
@@ -4,70 +4,6 @@ import("//build/config/compiler/compiler.gni") -if (is_win) { - action("copy_cdb_to_output") { - script = "//build/win/copy_cdb_to_output.py" - inputs = [ - script, - ] - outputs = [ - "$root_out_dir/cdb/cdb.exe", - "$root_out_dir/cdb/dbgeng.dll", - "$root_out_dir/cdb/dbghelp.dll", - "$root_out_dir/cdb/dbgmodel.dll", - "$root_out_dir/cdb/winext/ext.dll", - "$root_out_dir/cdb/winext/uext.dll", - "$root_out_dir/cdb/winxp/exts.dll", - "$root_out_dir/cdb/winxp/ntsdexts.dll", - "$root_out_dir/cdb/api-ms-win-core-console-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-core-datetime-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-core-debug-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-core-errorhandling-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-core-file-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-core-file-l1-2-0.dll", - "$root_out_dir/cdb/api-ms-win-core-file-l2-1-0.dll", - "$root_out_dir/cdb/api-ms-win-core-handle-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-core-heap-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-core-interlocked-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-core-libraryloader-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-core-localization-l1-2-0.dll", - "$root_out_dir/cdb/api-ms-win-core-memory-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-core-namedpipe-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-core-processenvironment-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-core-processthreads-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-core-processthreads-l1-1-1.dll", - "$root_out_dir/cdb/api-ms-win-core-profile-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-core-rtlsupport-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-core-string-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-core-synch-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-core-synch-l1-2-0.dll", - "$root_out_dir/cdb/api-ms-win-core-sysinfo-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-core-timezone-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-core-util-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-crt-conio-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-crt-convert-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-crt-environment-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-crt-filesystem-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-crt-heap-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-crt-locale-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-crt-math-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-crt-multibyte-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-crt-private-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-crt-process-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-crt-runtime-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-crt-stdio-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-crt-string-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-crt-time-l1-1-0.dll", - "$root_out_dir/cdb/api-ms-win-crt-utility-l1-1-0.dll", - "$root_out_dir/cdb/ucrtbase.dll", - ] - args = [ - rebase_path("$root_out_dir/cdb", root_out_dir), - current_cpu, - ] - } -} - group("telemetry_chrome_test") { testonly = true @@ -108,7 +44,7 @@ if (is_win && (symbol_level == 1 || symbol_level == 2)) { data_deps += [ - ":copy_cdb_to_output", + "//build/win:copy_cdb_to_output", "//third_party/crashpad/crashpad/tools:crashpad_database_util", ]
diff --git a/tools/perf/chrome_telemetry_build/telemetry_binary_manager.isolate b/tools/perf/chrome_telemetry_build/telemetry_binary_manager.isolate deleted file mode 100644 index 8d7d8f5c..0000000 --- a/tools/perf/chrome_telemetry_build/telemetry_binary_manager.isolate +++ /dev/null
@@ -1,15 +0,0 @@ -# Copyright 2015 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. -{ - 'conditions': [ - ['OS=="android" or OS=="linux" or OS=="mac" or OS=="win"', { - 'variables': { - 'files': [ - # Chromium local path information for Telemetry's binary_manager. - './', - ], - }, - }], - ] -}
diff --git a/tools/perf/desktop_benchmark_avg_times.json b/tools/perf/core/desktop_benchmark_avg_times.json similarity index 100% rename from tools/perf/desktop_benchmark_avg_times.json rename to tools/perf/core/desktop_benchmark_avg_times.json
diff --git a/tools/perf/generate_perf_json.py b/tools/perf/core/perf_data_generator.py similarity index 76% rename from tools/perf/generate_perf_json.py rename to tools/perf/core/perf_data_generator.py index 49e739f0..b4b42eca 100755 --- a/tools/perf/generate_perf_json.py +++ b/tools/perf/core/perf_data_generator.py
@@ -4,18 +4,23 @@ # found in the LICENSE file. """Script to generate chromium.perf.json and chromium.perf.fyi.json in -the src/testing/buildbot directory. Maintaining these files by hand is -too unwieldy. +the src/testing/buildbot directory and benchmark.csv in the src/tools/perf +directory. Maintaining these files by hand is too unwieldy. """ import argparse +import collections +import csv import json import os +import re import sys +import sets from chrome_telemetry_build import chromium_config sys.path.append(chromium_config.GetTelemetryDir()) from telemetry import benchmark as benchmark_module +from telemetry import decorators from telemetry.core import discover from telemetry.util import bot_utils @@ -57,18 +62,19 @@ 'script': 'gtest_perf_test.py', 'testers': { 'chromium.perf': [ - { - 'name': 'Android Nexus5 Perf', - 'shards': [2] - }, - { - 'name': 'Android Nexus6 Perf', - 'shards': [2] - }, - { - 'name': 'Android Nexus7v2 Perf', - 'shards': [2] - }, + # crbug.com/698831 + # { + # 'name': 'Android Nexus5 Perf', + # 'shards': [2] + # }, + # { + # 'name': 'Android Nexus6 Perf', + # 'shards': [2] + # }, + # { + # 'name': 'Android Nexus7v2 Perf', + # 'shards': [2] + # }, { 'name': 'Android Nexus9 Perf', 'shards': [2] @@ -251,7 +257,8 @@ 'os': 'Windows-10-10240', 'device_ids': [ 'build117-b1', 'build118-b1', - 'build119-b1', 'build120-b1', 'build121-b1' + 'build119-b1', 'build120-b1', + 'build180-b4' # Added in https://crbug.com/695613 ] } ]) @@ -462,7 +469,8 @@ 'build150-m1', 'build151-m1', 'build152-m1' ], 'perf_tests': [ - ('cc_perftests', 2), + # crbug.com/698831 + # ('cc_perftests', 2), ('load_library_perf_tests', 2), ('tracing_perftests', 2), ('media_perftests', 3)] @@ -473,7 +481,8 @@ def generate_isolate_script_entry(swarming_dimensions, test_args, - isolate_name, step_name, override_compile_targets=None, + isolate_name, step_name, ignore_task_failure, + override_compile_targets=None, swarming_timeout=None): result = { 'args': test_args, @@ -487,8 +496,9 @@ # Always say this is true regardless of whether the tester # supports swarming. It doesn't hurt. 'can_use_on_swarming_builders': True, - 'expiration': 21600, + 'expiration': 10 * 60 * 60, # 10 hour timeout for now (crbug.com/699312) 'hard_timeout': swarming_timeout if swarming_timeout else 7200, + 'ignore_task_failure': ignore_task_failure, 'io_timeout': 3600, 'dimension_sets': swarming_dimensions, } @@ -511,15 +521,20 @@ # When this is enabled on more than just windows machines we will need # --device=android + ignore_task_failure = False step_name = benchmark_name if browser == 'reference': test_args.append('--output-trace-tag=_ref') step_name += '.reference' + # We ignore the failures on reference builds since there is little we can do + # to fix them except waiting for the reference build to update. + ignore_task_failure = True return generate_isolate_script_entry( - swarming_dimensions, test_args, 'telemetry_perf_tests', - step_name, ['telemetry_perf_tests'], - swarming_timeout=BENCHMARK_SWARMING_TIMEOUTS.get(benchmark_name)) + swarming_dimensions, test_args, 'telemetry_perf_tests', + step_name, ignore_task_failure=ignore_task_failure, + override_compile_targets=['telemetry_perf_tests'], + swarming_timeout=BENCHMARK_SWARMING_TIMEOUTS.get(benchmark_name)) def script_test_enabled_on_tester(master, test, tester_name, shard): @@ -559,13 +574,14 @@ def generate_cplusplus_isolate_script_test(dimension): return [ generate_isolate_script_entry( - [get_swarming_dimension(dimension, shard)], [], name, name) + [get_swarming_dimension(dimension, shard)], [], name, name, + ignore_task_failure=False) for name, shard in dimension['perf_tests'] ] -def generate_telemetry_tests( - tester_config, benchmarks, benchmark_sharding_map, use_whitelist): +def generate_telemetry_tests(tester_config, benchmarks, benchmark_sharding_map, + use_whitelist, benchmark_ref_build_blacklist): isolated_scripts = [] # First determine the browser that you need based on the tester browser_name = '' @@ -608,13 +624,15 @@ swarming_dimensions, benchmark.Name(), browser_name) isolated_scripts.append(test) # Now create another executable for this benchmark on the reference browser - reference_test = generate_telemetry_test( - swarming_dimensions, benchmark.Name(),'reference') - isolated_scripts.append(reference_test) - if current_shard == (num_shards - 1): - current_shard = 0 - else: - current_shard += 1 + # if it is not blacklisted from running on the reference browser. + if benchmark.Name() not in benchmark_ref_build_blacklist: + reference_test = generate_telemetry_test( + swarming_dimensions, benchmark.Name(),'reference') + isolated_scripts.append(reference_test) + if current_shard == (num_shards - 1): + current_shard = 0 + else: + current_shard += 1 return isolated_scripts @@ -652,6 +670,12 @@ 'Win 10 High-DPI Perf', ] +# List of benchmarks that are to never be run with reference builds. +BENCHMARK_REF_BUILD_BLACKLIST = [ + 'power.idle_platform', +] + + def current_benchmarks(use_whitelist): benchmarks_dir = os.path.join(src_dir(), 'tools', 'perf', 'benchmarks') top_level_dir = os.path.dirname(benchmarks_dir) @@ -680,7 +704,7 @@ runtime_list = [] benchmark_avgs = {} new_benchmarks = [] - timing_file_path = os.path.join(src_dir(), 'tools', 'perf', + timing_file_path = os.path.join(src_dir(), 'tools', 'perf', 'core', 'desktop_benchmark_avg_times.json') # Load in the avg times as calculated on Nov 1st, 2016 with open(timing_file_path) as f: @@ -752,7 +776,8 @@ if name in LEGACY_DEVICE_AFFIINITY_ALGORITHM: sharding_map = None isolated_scripts = generate_telemetry_tests( - config, benchmark_list, sharding_map, use_whitelist) + config, benchmark_list, sharding_map, use_whitelist, + BENCHMARK_REF_BUILD_BLACKLIST) # Generate swarmed non-telemetry tests if present if config['swarming_dimensions'][0].get('perf_tests', False): isolated_scripts += generate_cplusplus_isolate_script_test( @@ -777,7 +802,7 @@ tests[name] = config tests['AAAAA1 AUTOGENERATED FILE DO NOT EDIT'] = {} - tests['AAAAA2 See //tools/perf/generate_perf_json.py to make changes'] = {} + tests['AAAAA2 See //tools/perf/generate_perf_data.py to make changes'] = {} return tests @@ -787,34 +812,151 @@ return os.path.join(buildbot_dir, filename) -def tests_are_up_to_date(waterfall): - tests = generate_all_tests(waterfall) - tests_data = json.dumps(tests, indent=2, separators=(',', ': '), - sort_keys=True) - config_file = get_json_config_file_for_waterfall(waterfall) - with open(config_file, 'r') as fp: - config_data = fp.read().strip() - return tests_data == config_data +def tests_are_up_to_date(waterfalls): + up_to_date = True + all_tests = {} + for w in waterfalls: + tests = generate_all_tests(w) + tests_data = json.dumps(tests, indent=2, separators=(',', ': '), + sort_keys=True) + config_file = get_json_config_file_for_waterfall(w) + with open(config_file, 'r') as fp: + config_data = fp.read().strip() + all_tests.update(tests) + up_to_date &= tests_data == config_data + verify_all_tests_in_benchmark_csv(all_tests, + get_all_waterfall_benchmarks_metadata()) + return up_to_date -def update_all_tests(waterfall): - tests = generate_all_tests(waterfall) - config_file = get_json_config_file_for_waterfall(waterfall) - with open(config_file, 'w') as fp: - json.dump(tests, fp, indent=2, separators=(',', ': '), sort_keys=True) - fp.write('\n') +def update_all_tests(waterfalls): + all_tests = {} + for w in waterfalls: + tests = generate_all_tests(w) + config_file = get_json_config_file_for_waterfall(w) + with open(config_file, 'w') as fp: + json.dump(tests, fp, indent=2, separators=(',', ': '), sort_keys=True) + fp.write('\n') + all_tests.update(tests) + verify_all_tests_in_benchmark_csv(all_tests, + get_all_waterfall_benchmarks_metadata()) def src_dir(): file_path = os.path.abspath(__file__) - return os.path.dirname(os.path.dirname(os.path.dirname(file_path))) + return os.path.dirname(os.path.dirname( + os.path.dirname(os.path.dirname(file_path)))) + + +BenchmarkMetadata = collections.namedtuple( + 'BenchmarkMetadata', 'emails component') +NON_TELEMETRY_BENCHMARKS = { + 'angle_perftests': BenchmarkMetadata('jmadill@chromium.org', None), + 'cc_perftests': BenchmarkMetadata('enne@chromium.org', None), + 'gpu_perftests': BenchmarkMetadata('reveman@chromium.org', None), + 'tracing_perftests': BenchmarkMetadata( + 'kkraynov@chromium.org, primiano@chromium.org', None), + 'load_library_perf_tests': BenchmarkMetadata(None, None), + 'media_perftests': BenchmarkMetadata('crouleau@chromium.org', None), + 'performance_browser_tests': BenchmarkMetadata( + 'hubbe@chromium.org, justinlin@chromium.org, miu@chromium.org', None) +} + + +# If you change this dictionary, run tools/perf/generate_perf_data +NON_WATERFALL_BENCHMARKS = { + 'sizes (mac)': BenchmarkMetadata('tapted@chromium.org', None), + 'sizes (win)': BenchmarkMetadata('grt@chromium.org', None), + 'sizes (linux)': BenchmarkMetadata('thestig@chromium.org', None), + 'resource_sizes': BenchmarkMetadata( + 'agrieve@chromium.org, rnephew@chromium.org, perezju@chromium.org', + None) +} + + +# Returns a dictionary mapping waterfall benchmark name to benchmark owner +# metadata +def get_all_waterfall_benchmarks_metadata(): + return get_all_benchmarks_metadata(NON_TELEMETRY_BENCHMARKS) + + +def get_all_benchmarks_metadata(metadata): + benchmark_list = current_benchmarks(False) + + for benchmark in benchmark_list: + emails = decorators.GetEmails(benchmark) + if emails: + emails = ', '.join(emails) + metadata[benchmark.Name()] = BenchmarkMetadata( + emails, decorators.GetComponent(benchmark)) + return metadata + + +def verify_all_tests_in_benchmark_csv(tests, benchmark_metadata): + benchmark_names = sets.Set(benchmark_metadata) + test_names = sets.Set() + for t in tests: + scripts = [] + if 'isolated_scripts' in tests[t]: + scripts = tests[t]['isolated_scripts'] + elif 'scripts' in tests[t]: + scripts = tests[t]['scripts'] + else: + assert('Android Compile' == t + or 'Android arm64 Compile' == t + or t.startswith('AAAAA')), 'Unknown test data %s' % t + for s in scripts: + name = s['name'] + name = re.sub('\\.reference$', '', name) + test_names.add(name) + + error_messages = [] + for test in benchmark_names - test_names: + error_messages.append('Remove ' + test + ' from NON_TELEMETRY_BENCHMARKS') + for test in test_names - benchmark_names: + error_messages.append('Add ' + test + ' to NON_TELEMETRY_BENCHMARKS') + + assert benchmark_names == test_names, ('Please update ' + 'NON_TELEMETRY_BENCHMARKS as below:\n' + '\n'.join(error_messages)) + + +def update_benchmark_csv(): + """Updates go/chrome-benchmarks. + + Updates telemetry/perf/benchmark.csv containing the current benchmark names, + owners, and components. + """ + header_data = [['AUTOGENERATED FILE DO NOT EDIT'], + ['See //tools/perf/generate_perf_data.py to make changes'], + ['Benchmark name', 'Individual owners', 'Component'] + ] + + csv_data = [] + all_benchmarks = NON_TELEMETRY_BENCHMARKS + all_benchmarks.update(NON_WATERFALL_BENCHMARKS) + benchmark_metadata = get_all_benchmarks_metadata(all_benchmarks) + for benchmark_name in benchmark_metadata: + csv_data.append([ + benchmark_name, + benchmark_metadata[benchmark_name].emails, + benchmark_metadata[benchmark_name].component + ]) + + csv_data = sorted(csv_data, key=lambda b: b[0]) + csv_data = header_data + csv_data + + perf_dir = os.path.join(src_dir(), 'tools', 'perf') + benchmark_file = os.path.join(perf_dir, 'benchmark.csv') + with open(benchmark_file, 'wb') as f: + writer = csv.writer(f, lineterminator="\n") + writer.writerows(csv_data) def main(args): parser = argparse.ArgumentParser( - description=('Generate perf test\' json config. This need to be done ' - 'anytime you add/remove any existing benchmarks in ' - 'tools/perf/benchmarks.')) + description=('Generate perf test\' json config and benchmark.csv. ' + 'This needs to be done anytime you add/remove any existing' + 'benchmarks in tools/perf/benchmarks.')) parser.add_argument( '--validate-only', action='store_true', default=False, help=('Validate whether the perf json generated will be the same as the ' @@ -828,18 +970,15 @@ fyi_waterfall['name'] = 'chromium.perf.fyi' if options.validate_only: - if tests_are_up_to_date(fyi_waterfall) and tests_are_up_to_date(waterfall): + if tests_are_up_to_date([fyi_waterfall, waterfall]): print 'All the perf JSON config files are up-to-date. \\o/' return 0 else: print ('The perf JSON config files are not up-to-date. Please run %s ' 'without --validate-only flag to update the perf JSON ' - 'configs.') % sys.argv[0] + 'configs and benchmark.csv.') % sys.argv[0] return 1 else: - update_all_tests(fyi_waterfall) - update_all_tests(waterfall) + update_all_tests([fyi_waterfall, waterfall]) + update_benchmark_csv() return 0 - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:]))
diff --git a/tools/perf/core/perf_data_generator_unittest.py b/tools/perf/core/perf_data_generator_unittest.py new file mode 100644 index 0000000..4301ffa --- /dev/null +++ b/tools/perf/core/perf_data_generator_unittest.py
@@ -0,0 +1,142 @@ +# Copyright 2017 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. +import unittest + +from core import perf_data_generator +from core.perf_data_generator import BenchmarkMetadata + +from telemetry import benchmark + + +class PerfDataGeneratorTest(unittest.TestCase): + def setUp(self): + # Test config can be big, so set maxDiff to None to see the full comparision + # diff when assertEquals fails. + self.maxDiff = None + + def testVerifyAllTestsInBenchmarkCsvPassesWithCorrectInput(self): + tests = { + 'AAAAA1 AUTOGENERATED': {}, + 'Android Nexus5 Perf (2)': { + 'scripts': [ + {'name': 'benchmark_name_1'}, + {'name': 'benchmark_name_2'} + ] + }, + 'Linux Perf': { + 'isolated_scripts': [ + {'name': 'benchmark_name_2.reference'}, + {'name': 'benchmark_name_3'} + ] + } + } + benchmarks = { + 'benchmark_name_1': BenchmarkMetadata(None, None), + 'benchmark_name_2': BenchmarkMetadata(None, None), + 'benchmark_name_3': BenchmarkMetadata(None, None) + } + + perf_data_generator.verify_all_tests_in_benchmark_csv(tests, benchmarks) + + + def testVerifyAllTestsInBenchmarkCsvCatchesMismatchedTests(self): + tests = { + 'Android Nexus5 Perf (2)': { + 'scripts': [ + {'name': 'benchmark_name_1'}, + {'name': 'benchmark_name_2'} + ] + } + } + benchmarks = { + 'benchmark_name_2': BenchmarkMetadata(None, None), + 'benchmark_name_3': BenchmarkMetadata(None, None), + } + + with self.assertRaises(AssertionError) as context: + perf_data_generator.verify_all_tests_in_benchmark_csv(tests, benchmarks) + exception = context.exception.message + self.assertTrue('Add benchmark_name_1' in exception) + self.assertTrue('Remove benchmark_name_3' in exception) + + + def testVerifyAllTestsInBenchmarkCsvFindsFakeTest(self): + tests = {'Random fake test': {}} + benchmarks = { + 'benchmark_name_1': BenchmarkMetadata(None, None) + } + + with self.assertRaises(AssertionError) as context: + perf_data_generator.verify_all_tests_in_benchmark_csv(tests, benchmarks) + self.assertTrue('Unknown test' in context.exception.message) + + def testGenerateTelemetryTestForNonReferenceBuild(self): + swarming_dimensions = [{'os': 'SkyNet', 'id': 'T-850', 'pool': 'T-RIP'}] + test = perf_data_generator.generate_telemetry_test( + swarming_dimensions, 'speedometer', 'release') + expected_generated_test = { + 'override_compile_targets': ['telemetry_perf_tests'], + 'args': ['speedometer', '-v', '--upload-results', + '--output-format=chartjson', '--browser=release'], + 'swarming': { + 'ignore_task_failure': False, + 'dimension_sets': [{'os': 'SkyNet', 'id': 'T-850', 'pool': 'T-RIP'}], + 'hard_timeout': 7200, + 'can_use_on_swarming_builders': True, + 'expiration': 36000, + 'io_timeout': 3600, + }, + 'name': 'speedometer', + 'isolate_name': 'telemetry_perf_tests', + } + self.assertEquals(test, expected_generated_test) + + def testGenerateTelemetryTestForReferenceBuild(self): + swarming_dimensions = [{'os': 'SkyNet', 'id': 'T-850', 'pool': 'T-RIP'}] + test = perf_data_generator.generate_telemetry_test( + swarming_dimensions, 'speedometer', 'reference') + expected_generated_test = { + 'override_compile_targets': ['telemetry_perf_tests'], + 'args': ['speedometer', '-v', '--upload-results', + '--output-format=chartjson', '--browser=reference', + '--output-trace-tag=_ref'], + 'swarming': { + 'ignore_task_failure': True, + 'dimension_sets': [{'os': 'SkyNet', 'id': 'T-850', 'pool': 'T-RIP'}], + 'hard_timeout': 7200, + 'can_use_on_swarming_builders': True, + 'expiration': 36000, + 'io_timeout': 3600, + }, + 'name': 'speedometer.reference', + 'isolate_name': 'telemetry_perf_tests', + } + self.assertEquals(test, expected_generated_test) + + def testGenerateTelemetryTestsBlacklistedReferenceBuildTest(self): + class BlacklistedBenchmark(benchmark.Benchmark): + @classmethod + def Name(cls): + return 'blacklisted' + + class NotBlacklistedBenchmark(benchmark.Benchmark): + @classmethod + def Name(cls): + return 'not_blacklisted' + + swarming_dimensions = [ + {'os': 'SkyNet', 'id': 'T-850', 'pool': 'T-RIP', 'device_ids': ['a']} + ] + test_config = { + 'platform': 'android', + 'swarming_dimensions': swarming_dimensions, + } + benchmarks = [BlacklistedBenchmark, NotBlacklistedBenchmark] + tests = perf_data_generator.generate_telemetry_tests( + test_config, benchmarks, None, False, ['blacklisted']) + + generated_test_names = set(t['name'] for t in tests) + self.assertEquals( + generated_test_names, + {'blacklisted', 'not_blacklisted', 'not_blacklisted.reference'})
diff --git a/tools/perf/core/stacktrace_unittest.py b/tools/perf/core/stacktrace_unittest.py index a9d2744c..7c2df429 100644 --- a/tools/perf/core/stacktrace_unittest.py +++ b/tools/perf/core/stacktrace_unittest.py
@@ -31,8 +31,9 @@ # Some platforms do not support full stack traces, this test requires only # minimal symbols to be available. - @decorators.Enabled('mac', 'linux', 'win') - @decorators.Disabled('snowleopard') + # Disabled on win due to crbug.com/706328. + @decorators.Enabled('mac', 'linux') + @decorators.Disabled('snowleopard', 'win') def testCrashMinimalSymbols(self): with self.assertRaises(exceptions.DevtoolsTargetCrashException) as c: self._tab.Navigate('chrome://crash', timeout=5)
diff --git a/tools/perf/core/trybot_command.py b/tools/perf/core/trybot_command.py index afa50059..ddd9e21 100644 --- a/tools/perf/core/trybot_command.py +++ b/tools/perf/core/trybot_command.py
@@ -3,12 +3,16 @@ # found in the LICENSE file. import argparse +import base64 +import gzip +import io import json import logging import os import platform import subprocess import tempfile +import urllib import urllib2 @@ -86,6 +90,12 @@ } } +_MILO_MASTER_ENDPOINT = ('https://luci-milo.appspot.com/prpc/milo.Buildbot/' + 'GetCompressedMasterJSON') + +_MILO_RESPONSE_PREFIX = ')]}\'\n' + + assert not set(DEFAULT_TRYBOTS) & set(EXCLUDED_BOTS), ( 'A trybot cannot present in both Default as well as Excluded bots lists.') @@ -96,6 +106,31 @@ return '(ERROR) Perf Try Job: %s' % self.args[0] +def _ProcessMiloData(data): + if not data.startswith(_MILO_RESPONSE_PREFIX): + return None + data = data[len(_MILO_RESPONSE_PREFIX):] + + try: + response_data = json.loads(data) + except Exception: + return None + + try: + decoded_data = base64.b64decode(response_data.get('data')) + except Exception: + return None + + try: + with io.BytesIO(decoded_data) as compressed_file: + with gzip.GzipFile(fileobj=compressed_file) as decompressed_file: + data_json = decompressed_file.read() + except Exception: + return None + + return json.loads(data_json) + + def _GetTrybotList(builders): builders = ['%s' % bot.replace('_perf_bisect', '').replace('_', '-') for bot in builders] @@ -195,10 +230,14 @@ def _GetBuilderList(cls): if not cls._builders: try: - f = urllib2.urlopen( - ('https://build.chromium.org/p/tryserver.chromium.perf/json/' - 'builders'), - timeout=5) + headers = { + 'Accept': 'application/json', + 'Content-Type': 'application/json', + } + values = {'name': 'tryserver.chromium.perf'} + data = urllib.urlencode(values) + req = urllib2.Request(_MILO_MASTER_ENDPOINT, None, headers) + f = urllib2.urlopen(req, json.dumps(values), timeout=10) # In case of any kind of exception, allow tryjobs to use default trybots. # Possible exception are ssl.SSLError, urllib2.URLError, # socket.timeout, socket.error. @@ -208,7 +247,8 @@ 'information, tryjob will use default trybots.') cls._builders = DEFAULT_TRYBOTS else: - builders = json.loads(f.read()).keys() + data = _ProcessMiloData(f.read()) + builders = data.get('builders', {}).keys() # Exclude unsupported bots like win xp and some dummy bots. cls._builders = [bot for bot in builders if bot not in EXCLUDED_BOTS]
diff --git a/tools/perf/core/trybot_command_unittest.py b/tools/perf/core/trybot_command_unittest.py index 7bca1481..e04055e 100644 --- a/tools/perf/core/trybot_command_unittest.py +++ b/tools/perf/core/trybot_command_unittest.py
@@ -2,6 +2,9 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse +import base64 +import io +import gzip import json import logging import os @@ -78,8 +81,19 @@ return builders def _MockTryserverJson(self, bots_dict): + data_to_compress = json.dumps({'builders': bots_dict}) + + with io.BytesIO() as dst: + with gzip.GzipFile(fileobj=dst, mode='wb') as src: + src.write(data_to_compress) + compressed_data = dst.getvalue() + + milo_data = {'data': base64.b64encode(compressed_data)} + milo_data = json.dumps(milo_data) + milo_data = trybot_command._MILO_RESPONSE_PREFIX + milo_data + data = mock.Mock() - data.read.return_value = json.dumps(bots_dict) + data.read.return_value = milo_data self._urllib2_mock.urlopen.return_value = data def _MockTempFile(self, issue, issue_url):
diff --git a/tools/perf/docs/apk_size_regressions.md b/tools/perf/docs/apk_size_regressions.md index cb10fe2..a196e80 100644 --- a/tools/perf/docs/apk_size_regressions.md +++ b/tools/perf/docs/apk_size_regressions.md
@@ -25,27 +25,19 @@ ### What to do once the commit is identified: * If the code seems to justify the size increase: - 1. Annotate the code review with the following (replacing **bold** parts): + * Annotate the code review with the following (replacing **bold** parts): > FYI - this added **20kb** to Chrome on Android. No action is required > (unless you can think of an obvious way to reduce the overhead). > > Link to size graph: [https://chromeperf.appspot.com/report?sid=cfc29eed1238fd38fb5e6cf83bdba6c619be621b606e03e5dfc2e99db14c418b&rev=**440074**](https://chromeperf.appspot.com/report?sid=cfc29eed1238fd38fb5e6cf83bdba6c619be621b606e03e5dfc2e99db14c418b&rev=440074) - 2. Add an entry to - [this spreadsheet](https://docs.google.com/spreadsheets/d/1GrRkszV7Oy5pVsaMb5Eb6s8izW9t4dElBxIH3iGq93o/edit#gid=1894856744) - to document the increase (also Update the "Themes / Thoughts" tab if - applicable). * If the code might not justify the size increase: - 1. File a bug and assign to the author to follow-up. + * File a bug and assign to the author to follow-up. * Change the bug's title from X% to XXkb * Paste in link to commit or review URL that is at fault. * Paste in link to [https://chromium.googlesource.com/chromium/src/+/master/tools/perf/docs/apk_size_regressions.md#Debugging-Apk-Size-Increase](https://chromium.googlesource.com/chromium/src/+/master/tools/perf/docs/apk_size_regressions.md#Debugging-Apk-Size-Increase). * Remove label: `Restrict-View-Google` - * Add label: `binary-size` * TODO(agrieve): [https://github.com/catapult-project/catapult/issues/3150](Change bug template to match these instructions) - 2. Add an entry to - [this spreadsheet](https://docs.google.com/spreadsheets/d/1GrRkszV7Oy5pVsaMb5Eb6s8izW9t4dElBxIH3iGq93o/edit#gid=1894856744) - to document the increase. # Debugging Apk Size Increase @@ -56,8 +48,7 @@ * Refer to the chromeperf link that should have been posted to your code review (see above). - * Alternatively, refer to "Apk Size" section here: - [https://goto.google.com/clank/dashboards](https://goto.google.com/clank/dashboards) (*googler only*). + * Alternatively, refer to [go/chrome-binary-size](https://goto.google.com/chrome-binary-size) (*googler only*). ## Step 2: Reproduce build results locally
diff --git a/tools/perf/docs/perf_bot_sheriffing.md b/tools/perf/docs/perf_bot_sheriffing.md index d6145fc..ab28765 100644 --- a/tools/perf/docs/perf_bot_sheriffing.md +++ b/tools/perf/docs/perf_bot_sheriffing.md
@@ -344,7 +344,7 @@ `--isolated-script-test-chartjson-output=/b/s/w/ioFB73Qz/chartjson-output.json` flags to be a local path 6. Example with tmp as locally created dir: - `/usr/bin/python ../../testing/scripts/run_telemetry_benchmark_as_googletest.py ../../tools/perf/run_benchmark indexeddb_perf -v --upload-results --output-format=chartjson --browser=release --isolated-script-test-output=tmp/output.json --isolated-script-test-chartjson-output=tmp/chartjson-output.json` + `/usr/bin/python ../../testing/scripts/run_telemetry_benchmark_as_googletest.py ../../tools/perf/run_benchmark speedometer -v --upload-results --output-format=chartjson --browser=release --isolated-script-test-output=tmp/output.json --isolated-script-test-chartjson-output=tmp/chartjson-output.json` * ssh into swarming bot and run test on that machine 1. NOTE: this should be a last resort since it will cause a fifth of the benchmarks to continuously fail on the waterfall @@ -444,7 +444,7 @@ ### Disabling Other Tests Non-telemetry tests are configured in [chromium.perf.json](https://code.google.com/p/chromium/codesearch#chromium/src/testing/buildbot/chromium.perf.json) **But do not manually edit this file.** -Update tools/perf/generate_perf_json.py to disable the test and rerun script to +Update tools/perf/generate_perf_data.py to disable the test and rerun script to generate the new chromium.perf.json file. You can TBR any of the per-file OWNERS, but please do **not** submit with NOTRY=true.
diff --git a/tools/perf/generate_perf_data b/tools/perf/generate_perf_data new file mode 100755 index 0000000..fe0c73c --- /dev/null +++ b/tools/perf/generate_perf_data
@@ -0,0 +1,12 @@ +#!/usr/bin/env python +# Copyright 2017 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. + +import sys + +from core import perf_data_generator + + +if __name__ == '__main__': + sys.exit(perf_data_generator.main(sys.argv[1:]))
diff --git a/tools/perf/measurements/clock_domain_test.py b/tools/perf/measurements/clock_domain_test.py index 596439f..b24b23f4 100644 --- a/tools/perf/measurements/clock_domain_test.py +++ b/tools/perf/measurements/clock_domain_test.py
@@ -4,8 +4,9 @@ from telemetry import benchmark from telemetry.testing import tab_test_case -from telemetry.timeline import trace_data from telemetry.timeline import tracing_config +from tracing.trace_data import trace_data + def GetSyncEvents(trace_part): return [x for x in trace_part if x['ph'] == 'c']
diff --git a/tools/perf/measurements/smoothness.py b/tools/perf/measurements/smoothness.py index 77301a6..90e58db0 100644 --- a/tools/perf/measurements/smoothness.py +++ b/tools/perf/measurements/smoothness.py
@@ -34,6 +34,7 @@ super(Smoothness, self).__init__(needs_browser_restart_after_each_page) self._results_wrapper = _CustomResultsWrapper() self._tbm = None + self._results = None @classmethod def CustomizeBrowserOptions(cls, options): @@ -58,11 +59,12 @@ self._tbm.WillRunStory(tab.browser.platform) def ValidateAndMeasurePage(self, _, tab, results): + self._results = results self._tbm.Measure(tab.browser.platform, results) def DidRunPage(self, platform): if self._tbm: - self._tbm.DidRunStory(platform) + self._tbm.DidRunStory(platform, self._results) class Repaint(Smoothness):
diff --git a/tools/perf/measurements/tab_switching.py b/tools/perf/measurements/tab_switching.py index dd64dfa..5b8868e 100644 --- a/tools/perf/measurements/tab_switching.py +++ b/tools/perf/measurements/tab_switching.py
@@ -10,114 +10,44 @@ Power usage is also measured. """ -import json -import time - -from telemetry.core import util from telemetry.page import legacy_page_test from telemetry.value import histogram from telemetry.value import histogram_util from metrics import keychain_metric -from metrics import power - -# TODO: Revisit this test once multitab support is finalized. class TabSwitching(legacy_page_test.LegacyPageTest): - - # Amount of time to measure, in seconds. - SAMPLE_TIME = 30 - def __init__(self): super(TabSwitching, self).__init__() - self.first_page_in_storyset = True - self._power_metric = None + self._first_histogram = None def CustomizeBrowserOptions(self, options): keychain_metric.KeychainMetric.CustomizeBrowserOptions(options) - options.AppendExtraBrowserArgs([ - '--enable-stats-collection-bindings' - ]) - # Enable background networking so we can test its impact on power usage. - options.disable_background_networking = False - power.PowerMetric.CustomizeBrowserOptions(options) + options.AppendExtraBrowserArgs(['--enable-stats-collection-bindings']) - def WillStartBrowser(self, platform): - self.first_page_in_storyset = True - self._power_metric = power.PowerMetric(platform, TabSwitching.SAMPLE_TIME) - - def TabForPage(self, page, browser): - del page # unused - if self.first_page_in_storyset: - # The initial browser window contains a single tab, navigate that tab - # rather than creating a new one. - self.first_page_in_storyset = False - return browser.tabs[0] - - return browser.tabs.New() - - def StopBrowserAfterPage(self, browser, page): - # Restart the browser after the last page in the pageset. - return len(browser.tabs) >= len(page.story_set.stories) - - def ValidateAndMeasurePage(self, page, tab, results): - """On the last tab, cycle through each tab that was opened and then record - a single histogram for the tab switching metric.""" - browser = tab.browser - if len(browser.tabs) != len(page.story_set.stories): - return - - if browser.tabs < 2: - raise Exception('Should have at least two tabs for tab switching') - - # Measure power usage of tabs after quiescence. - util.WaitFor(tab.HasReachedQuiescence, 60) - - if browser.platform.CanMonitorPower(): - self._power_metric.Start(page, tab) - time.sleep(TabSwitching.SAMPLE_TIME) - self._power_metric.Stop(page, tab) - self._power_metric.AddResults(tab, results,) - + @classmethod + def _GetTabSwitchHistogram(cls, tab_to_switch): histogram_name = 'MPArch.RWH_TabSwitchPaintDuration' histogram_type = histogram_util.BROWSER_HISTOGRAM - display_name = 'MPArch_RWH_TabSwitchPaintDuration' - first_histogram = histogram_util.GetHistogram( - histogram_type, histogram_name, tab) - prev_histogram = first_histogram + return histogram_util.GetHistogram( + histogram_type, histogram_name, tab_to_switch) - for tab_to_switch in browser.tabs: - tab_to_switch.Activate() - def _IsDone(): - # pylint: disable=W0640 - cur_histogram = histogram_util.GetHistogram( - histogram_type, histogram_name, tab_to_switch) - diff_histogram = histogram_util.SubtractHistogram( - cur_histogram, prev_histogram) - # TODO(deanliao): Add SubtractHistogramRawValue to process histogram - # object instead of JSON string. - diff_histogram_count = json.loads(diff_histogram).get('count', 0) - return diff_histogram_count > 0 - util.WaitFor(_IsDone, 30) + def DidNavigateToPage(self, page, tab): + """record the starting histogram""" + self._first_histogram = self._GetTabSwitchHistogram(tab) - # We need to get histogram again instead of getting cur_histogram as - # variables modified inside inner function cannot be retrieved. However, - # inner function can see external scope's variables. - prev_histogram = histogram_util.GetHistogram( - histogram_type, histogram_name, tab_to_switch) - - last_histogram = prev_histogram + def ValidateAndMeasurePage(self, page, tab, results): + """record the ending histogram for the tab switching metric.""" + last_histogram = self._GetTabSwitchHistogram(tab) total_diff_histogram = histogram_util.SubtractHistogram(last_histogram, - first_histogram) + self._first_histogram) + + display_name = 'MPArch_RWH_TabSwitchPaintDuration' results.AddSummaryValue( histogram.HistogramValue(None, display_name, 'ms', - raw_value_json=total_diff_histogram, - important=False)) + raw_value_json=total_diff_histogram, + important=False)) keychain_metric.KeychainMetric().AddResults(tab, results) - - def DidRunPage(self, platform): - del platform # unused - self._power_metric.Close()
diff --git a/tools/perf/measurements/tab_switching_unittest.py b/tools/perf/measurements/tab_switching_unittest.py index 79efbb1..1e130e4 100644 --- a/tools/perf/measurements/tab_switching_unittest.py +++ b/tools/perf/measurements/tab_switching_unittest.py
@@ -3,12 +3,15 @@ # found in the LICENSE file. import contextlib +from measurements import tab_switching +import mock +from page_sets.system_health import multi_tab_stories +from telemetry import benchmark +from telemetry import story as story_module from telemetry.internal.results import page_test_results from telemetry.testing import page_test_test_case - -from measurements import tab_switching - -import mock +from telemetry.testing import options_for_unittests +from telemetry.value import histogram class BrowserForTest(object): @@ -30,6 +33,12 @@ story.story_set = self self.stories.append(story) +INTEGRATION_TEST_TAB_COUNT = 3 + +class EmptyMultiTabStory(multi_tab_stories.MultiTabStory): + NAME = 'multitab:test:empty' + URL_LIST = ['about:blank'] * INTEGRATION_TEST_TAB_COUNT + URL = URL_LIST[0] class TabSwitchingUnittest(page_test_test_case.PageTestTestCase): @staticmethod @@ -63,22 +72,9 @@ # Mock histogram result to test _IsDone really works. expected_histogram = [ - # To get first_histogram for last tab (tab_1). + # DidNavigateToPage() calls GetHistogram() once '{"count": 0, "buckets": []}', - # First _IsDone check for tab_0. Retry. - '{"count": 0, "buckets": []}', - # Second _IsDone check for tab_0. Retry. - '{"count": 0, "buckets": []}', - # Third _IsDone check for tab_0. Pass. - '{"count": 1, "buckets": [{"low": 1, "high": 2, "count": 1}]}', - # To get prev_histogram. End of tab_0 loop. - '{"count": 1, "buckets": [{"low": 1, "high": 2, "count": 1}]}', - # First _IsDone check for tab_1. Retry. - '{"count": 1, "buckets": [{"low": 1, "high": 2, "count": 1}]}', - # Second _IsDone check for tab_1. Pass. - '{"count": 2, "buckets": [{"low": 1, "high": 2, "count": 1},' - '{"low": 2, "high": 3, "count": 1}]}', - # To get prev_histogram. End of tab_1 loop. + # ValidateAndMeasurePage() calls GetHistogram() once '{"count": 2, "buckets": [{"low": 1, "high": 2, "count": 1},' '{"low": 2, "high": 3, "count": 1}]}', ] @@ -88,10 +84,34 @@ mock.patch('telemetry.value.histogram_util.GetHistogram', mock_get_histogram), mock.patch('metrics.keychain_metric.KeychainMetric')): + measure.DidNavigateToPage(story_set.stories[0], browser.tabs[-1]) measure.ValidateAndMeasurePage(story_set.stories[0], browser.tabs[-1], page_test_results.PageTestResults()) self.assertEqual(len(expected_histogram), len(mock_get_histogram.mock_calls)) + # The last tab is passed to DidNavigateToPage() and + # ValidateAndMeasurePage() expected_calls = [mock.call(mock.ANY, mock.ANY, t) for t in - [tab_1] + [tab_0] * 4 + [tab_1] * 3] + [browser.tabs[-1]] * 2] self.assertEqual(expected_calls, mock_get_histogram.mock_calls) + + @benchmark.Enabled('has tabs') + @benchmark.Disabled('mac') + @benchmark.Disabled('android') + def testTabSwitching(self): + """IT of TabSwitching measurement and multi-tab story""" + ps = story_module.StorySet() + ps.AddStory(EmptyMultiTabStory(ps, False)) + measurement = tab_switching.TabSwitching() + options = options_for_unittests.GetCopy() + results = self.RunMeasurement(measurement, ps, options=options) + self.assertEquals(len(results.failures), 0) + + self.assertEquals(len(results.all_summary_values), 1) + summary = results.all_summary_values[0] + self.assertIsInstance(summary, histogram.HistogramValue) + self.assertEquals(summary.name, 'MPArch_RWH_TabSwitchPaintDuration') + histogram_count = sum([b.count for b in summary.buckets]) + self.assertEquals(histogram_count, INTEGRATION_TEST_TAB_COUNT) + histogram_mean = summary.GetRepresentativeNumber() + self.assertGreater(histogram_mean, 0)
diff --git a/tools/perf/page_sets/data/system_health_desktop.json b/tools/perf/page_sets/data/system_health_desktop.json index a542d44..c83df9d8 100644 --- a/tools/perf/page_sets/data/system_health_desktop.json +++ b/tools/perf/page_sets/data/system_health_desktop.json
@@ -172,7 +172,7 @@ "DEFAULT": "system_health_desktop_028.wpr" }, "multitab:misc:typical24": { - "DEFAULT": "system_health_desktop_048.wpr" + "DEFAULT": "system_health_desktop_049.wpr" }, "play:media:google_play_music": { "DEFAULT": "system_health_desktop_030.wpr" @@ -189,4 +189,4 @@ }, "description": "Describes the Web Page Replay archives for a story set. Don't edit by hand! Use record_wpr for updating.", "platform_specific": true -} +} \ No newline at end of file
diff --git a/tools/perf/page_sets/data/system_health_desktop_048.wpr.sha1 b/tools/perf/page_sets/data/system_health_desktop_048.wpr.sha1 deleted file mode 100644 index 4ff3d4e1..0000000 --- a/tools/perf/page_sets/data/system_health_desktop_048.wpr.sha1 +++ /dev/null
@@ -1 +0,0 @@ -420bd07a02c3966d5945cebf32417a5832764626
diff --git a/tools/perf/page_sets/data/system_health_desktop_049.wpr.sha1 b/tools/perf/page_sets/data/system_health_desktop_049.wpr.sha1 new file mode 100644 index 0000000..ef87891 --- /dev/null +++ b/tools/perf/page_sets/data/system_health_desktop_049.wpr.sha1
@@ -0,0 +1 @@ +fdf3c3844b38e9ff07fd3031b7c7f893867460a7 \ No newline at end of file
diff --git a/tools/perf/page_sets/data/system_health_mobile.json b/tools/perf/page_sets/data/system_health_mobile.json index e15b73f7..42ece62 100644 --- a/tools/perf/page_sets/data/system_health_mobile.json +++ b/tools/perf/page_sets/data/system_health_mobile.json
@@ -15,6 +15,12 @@ "background:tools:gmail": { "DEFAULT": "system_health_mobile_043.wpr" }, + "browse:chrome:newtab": { + "DEFAULT": "system_health_mobile_056.wpr" + }, + "browse:chrome:omnibox": { + "DEFAULT": "system_health_mobile_056.wpr" + }, "browse:media:facebook_photos": { "DEFAULT": "system_health_mobile_040.wpr" }, @@ -27,9 +33,15 @@ "browse:news:cnn": { "DEFAULT": "system_health_mobile_014.wpr" }, + "browse:news:cricbuzz": { + "DEFAULT": "system_health_mobile_055.wpr" + }, "browse:news:flipboard": { "DEFAULT": "system_health_mobile_025.wpr" }, + "browse:news:globo": { + "DEFAULT": "system_health_mobile_055.wpr" + }, "browse:news:hackernews": { "DEFAULT": "system_health_mobile_016.wpr" }, @@ -42,15 +54,36 @@ "browse:news:reddit": { "DEFAULT": "system_health_mobile_027.wpr" }, + "browse:news:toi": { + "DEFAULT": "system_health_mobile_055.wpr" + }, "browse:news:washingtonpost": { "DEFAULT": "system_health_mobile_021.wpr" }, + "browse:shopping:amazon": { + "DEFAULT": "system_health_mobile_053.wpr" + }, + "browse:shopping:avito": { + "DEFAULT": "system_health_mobile_053.wpr" + }, + "browse:shopping:flipkart": { + "DEFAULT": "system_health_mobile_061.wpr" + }, + "browse:shopping:lazada": { + "DEFAULT": "system_health_mobile_053.wpr" + }, "browse:social:facebook": { "DEFAULT": "system_health_mobile_028.wpr" }, + "browse:social:instagram": { + "DEFAULT": "system_health_mobile_060.wpr" + }, "browse:social:twitter": { "DEFAULT": "system_health_mobile_023.wpr" }, + "browse:tools:maps": { + "DEFAULT": "system_health_mobile_059.wpr" + }, "load:games:bubbles": { "DEFAULT": "system_health_mobile_005.wpr" }, @@ -96,6 +129,9 @@ "load:news:hackernews": { "DEFAULT": "system_health_mobile_008.wpr" }, + "load:news:irctc": { + "DEFAULT": "system_health_mobile_058.wpr" + }, "load:news:nytimes": { "DEFAULT": "system_health_mobile_009.wpr" }, @@ -183,4 +219,4 @@ }, "description": "Describes the Web Page Replay archives for a story set. Don't edit by hand! Use record_wpr for updating.", "platform_specific": true -} +} \ No newline at end of file
diff --git a/tools/perf/page_sets/data/system_health_mobile_053.wpr.sha1 b/tools/perf/page_sets/data/system_health_mobile_053.wpr.sha1 new file mode 100644 index 0000000..9770556 --- /dev/null +++ b/tools/perf/page_sets/data/system_health_mobile_053.wpr.sha1
@@ -0,0 +1 @@ +001da0e4ba7f6618bd6efa4d367855ce61732b24 \ No newline at end of file
diff --git a/tools/perf/page_sets/data/system_health_mobile_055.wpr.sha1 b/tools/perf/page_sets/data/system_health_mobile_055.wpr.sha1 new file mode 100644 index 0000000..ecebe9b --- /dev/null +++ b/tools/perf/page_sets/data/system_health_mobile_055.wpr.sha1
@@ -0,0 +1 @@ +d64c7abe22c189daffb3b6c3dd756d4c7ab275d5 \ No newline at end of file
diff --git a/tools/perf/page_sets/data/system_health_mobile_056.wpr.sha1 b/tools/perf/page_sets/data/system_health_mobile_056.wpr.sha1 new file mode 100644 index 0000000..36c128d --- /dev/null +++ b/tools/perf/page_sets/data/system_health_mobile_056.wpr.sha1
@@ -0,0 +1 @@ +32345576923d7120a04497fc53c9b62f73ff6e32 \ No newline at end of file
diff --git a/tools/perf/page_sets/data/system_health_mobile_058.wpr.sha1 b/tools/perf/page_sets/data/system_health_mobile_058.wpr.sha1 new file mode 100644 index 0000000..d57c92f --- /dev/null +++ b/tools/perf/page_sets/data/system_health_mobile_058.wpr.sha1
@@ -0,0 +1 @@ +303f12fd95c1bf6f261a45d296cb767d1bf99064 \ No newline at end of file
diff --git a/tools/perf/page_sets/data/system_health_mobile_059.wpr.sha1 b/tools/perf/page_sets/data/system_health_mobile_059.wpr.sha1 new file mode 100644 index 0000000..720f2364 --- /dev/null +++ b/tools/perf/page_sets/data/system_health_mobile_059.wpr.sha1
@@ -0,0 +1 @@ +0efb76b6711dd621240140b50f0f96300541689c \ No newline at end of file
diff --git a/tools/perf/page_sets/data/system_health_mobile_060.wpr.sha1 b/tools/perf/page_sets/data/system_health_mobile_060.wpr.sha1 new file mode 100644 index 0000000..8c331c3 --- /dev/null +++ b/tools/perf/page_sets/data/system_health_mobile_060.wpr.sha1
@@ -0,0 +1 @@ +1c49438de99cb8957e948269aeb306d452e2fc4d \ No newline at end of file
diff --git a/tools/perf/page_sets/data/system_health_mobile_061.wpr.sha1 b/tools/perf/page_sets/data/system_health_mobile_061.wpr.sha1 new file mode 100644 index 0000000..33ac293 --- /dev/null +++ b/tools/perf/page_sets/data/system_health_mobile_061.wpr.sha1
@@ -0,0 +1 @@ +4a7758fcbadbe1f78d91bdc272aa6782a261f0bd \ No newline at end of file
diff --git a/tools/perf/page_sets/data/tough_energy_cases.json b/tools/perf/page_sets/data/tough_energy_cases.json deleted file mode 100644 index 96ee290a..0000000 --- a/tools/perf/page_sets/data/tough_energy_cases.json +++ /dev/null
@@ -1,51 +0,0 @@ -{ - "archives": { - "http://codepen.io/testificate364/debug/DLbxg": { - "DEFAULT": "tough_energy_cases_004.wpr" - }, - "http://codepen.io/testificate364/debug/EFceH": { - "DEFAULT": "tough_energy_cases_004.wpr" - }, - "http://codepen.io/testificate364/debug/HdIgr": { - "DEFAULT": "tough_energy_cases_004.wpr" - }, - "http://codepen.io/testificate364/debug/Kvdxs": { - "DEFAULT": "tough_energy_cases_004.wpr" - }, - "http://codepen.io/testificate364/debug/fhKCg": { - "DEFAULT": "tough_energy_cases_004.wpr" - }, - "http://codepen.io/testificate364/debug/jetyn": { - "DEFAULT": "tough_energy_cases_004.wpr" - }, - "http://codepen.io/testificate364/debug/kFvpd": { - "DEFAULT": "tough_energy_cases_004.wpr" - }, - "http://codepen.io/testificate364/debug/lEhyw": { - "DEFAULT": "tough_energy_cases_004.wpr" - }, - "http://codepen.io/testificate364/debug/lJAiH": { - "DEFAULT": "tough_energy_cases_004.wpr" - }, - "http://codepen.io/testificate364/debug/nrbDc": { - "DEFAULT": "tough_energy_cases_004.wpr" - }, - "http://codepen.io/testificate364/debug/paJhg": { - "DEFAULT": "tough_energy_cases_004.wpr" - }, - "http://codepen.io/testificate364/debug/slBue": { - "DEFAULT": "tough_energy_cases_004.wpr" - }, - "http://codepen.io/testificate364/debug/yaosK": { - "DEFAULT": "tough_energy_cases_004.wpr" - }, - "http://codepen.io/testificate364/debug/zhgBD": { - "DEFAULT": "tough_energy_cases_004.wpr" - }, - "https://mail.google.com/mail/": { - "DEFAULT": "tough_energy_cases_004.wpr" - } - }, - "description": "Describes the Web Page Replay archives for a story set. Don't edit by hand! Use record_wpr for updating.", - "platform_specific": true -} \ No newline at end of file
diff --git a/tools/perf/page_sets/data/tough_energy_cases_000.wpr.sha1 b/tools/perf/page_sets/data/tough_energy_cases_000.wpr.sha1 deleted file mode 100644 index d142ec4..0000000 --- a/tools/perf/page_sets/data/tough_energy_cases_000.wpr.sha1 +++ /dev/null
@@ -1 +0,0 @@ -180e90be649ca9c37467322674a39e9bbfd60b74 \ No newline at end of file
diff --git a/tools/perf/page_sets/data/tough_energy_cases_002.wpr.sha1 b/tools/perf/page_sets/data/tough_energy_cases_002.wpr.sha1 deleted file mode 100644 index 0487eeb..0000000 --- a/tools/perf/page_sets/data/tough_energy_cases_002.wpr.sha1 +++ /dev/null
@@ -1 +0,0 @@ -a2748fdb786165080eef5c1f385abe3b5ad10d4a \ No newline at end of file
diff --git a/tools/perf/page_sets/data/webrtc_audio_cases.json b/tools/perf/page_sets/data/webrtc_audio_cases.json deleted file mode 100644 index 0bf2632..0000000 --- a/tools/perf/page_sets/data/webrtc_audio_cases.json +++ /dev/null
@@ -1,18 +0,0 @@ -{ - "archives": { - "audio_call_g722_10s": { - "DEFAULT": "webrtc_audio_cases_001.wpr" - }, - "audio_call_isac16k_10s": { - "DEFAULT": "webrtc_audio_cases_001.wpr" - }, - "audio_call_opus_10s": { - "DEFAULT": "webrtc_audio_cases_001.wpr" - }, - "audio_call_pcmu_10s": { - "DEFAULT": "webrtc_audio_cases_001.wpr" - } - }, - "description": "Describes the Web Page Replay archives for a story set. Don't edit by hand! Use record_wpr for updating.", - "platform_specific": true -} \ No newline at end of file
diff --git a/tools/perf/page_sets/data/webrtc_audio_cases_001.wpr.sha1 b/tools/perf/page_sets/data/webrtc_audio_cases_001.wpr.sha1 deleted file mode 100644 index 1db4a8f5..0000000 --- a/tools/perf/page_sets/data/webrtc_audio_cases_001.wpr.sha1 +++ /dev/null
@@ -1 +0,0 @@ -a3c4603628a18b154b1a3974e247ab19ce7c434e \ No newline at end of file
diff --git a/tools/perf/page_sets/data/webrtc_datachannel_cases.json b/tools/perf/page_sets/data/webrtc_datachannel_cases.json deleted file mode 100644 index 7681a19..0000000 --- a/tools/perf/page_sets/data/webrtc_datachannel_cases.json +++ /dev/null
@@ -1,9 +0,0 @@ -{ - "archives": { - "30s_datachannel_transfer": { - "DEFAULT": "webrtc_datachannel_cases_001.wpr" - } - }, - "description": "Describes the Web Page Replay archives for a story set. Don't edit by hand! Use record_wpr for updating.", - "platform_specific": true -} \ No newline at end of file
diff --git a/tools/perf/page_sets/data/webrtc_datachannel_cases_001.wpr.sha1 b/tools/perf/page_sets/data/webrtc_datachannel_cases_001.wpr.sha1 deleted file mode 100644 index 2e4d7b52f..0000000 --- a/tools/perf/page_sets/data/webrtc_datachannel_cases_001.wpr.sha1 +++ /dev/null
@@ -1 +0,0 @@ -10ce827228dbf11155df76f1623e5d4d74846dc9 \ No newline at end of file
diff --git a/tools/perf/page_sets/data/webrtc_getusermedia_cases.json b/tools/perf/page_sets/data/webrtc_getusermedia_cases.json deleted file mode 100644 index 73450d33..0000000 --- a/tools/perf/page_sets/data/webrtc_getusermedia_cases.json +++ /dev/null
@@ -1,9 +0,0 @@ -{ - "archives": { - "hd_local_stream_10s": { - "DEFAULT": "webrtc_getusermedia_cases_001.wpr" - } - }, - "description": "Describes the Web Page Replay archives for a story set. Don't edit by hand! Use record_wpr for updating.", - "platform_specific": true -} \ No newline at end of file
diff --git a/tools/perf/page_sets/data/webrtc_getusermedia_cases_001.wpr.sha1 b/tools/perf/page_sets/data/webrtc_getusermedia_cases_001.wpr.sha1 deleted file mode 100644 index 4bef0ce0..0000000 --- a/tools/perf/page_sets/data/webrtc_getusermedia_cases_001.wpr.sha1 +++ /dev/null
@@ -1 +0,0 @@ -ac30bfebcdedbcee7a4402e8f53b603adf4f7411 \ No newline at end of file
diff --git a/tools/perf/page_sets/data/webrtc_peerconnection_cases.json b/tools/perf/page_sets/data/webrtc_peerconnection_cases.json deleted file mode 100644 index c7bff693..0000000 --- a/tools/perf/page_sets/data/webrtc_peerconnection_cases.json +++ /dev/null
@@ -1,9 +0,0 @@ -{ - "archives": { - "720p_call_45s": { - "DEFAULT": "webrtc_peerconnection_cases_003.wpr" - } - }, - "description": "Describes the Web Page Replay archives for a story set. Don't edit by hand! Use record_wpr for updating.", - "platform_specific": true -} \ No newline at end of file
diff --git a/tools/perf/page_sets/data/webrtc_peerconnection_cases_003.wpr.sha1 b/tools/perf/page_sets/data/webrtc_peerconnection_cases_003.wpr.sha1 deleted file mode 100644 index ae94122..0000000 --- a/tools/perf/page_sets/data/webrtc_peerconnection_cases_003.wpr.sha1 +++ /dev/null
@@ -1 +0,0 @@ -0bbac3b371f4dae1495699ac2ec394f1163d7cb9 \ No newline at end of file
diff --git a/tools/perf/page_sets/data/webrtc_smoothness_cases.json b/tools/perf/page_sets/data/webrtc_smoothness_cases.json deleted file mode 100644 index d557394..0000000 --- a/tools/perf/page_sets/data/webrtc_smoothness_cases.json +++ /dev/null
@@ -1,12 +0,0 @@ -{ - "archives": { - "720p_call_45s": { - "DEFAULT": "webrtc_smoothness_cases_001.wpr" - }, - "canvas_capture_peer_connection": { - "DEFAULT": "webrtc_smoothness_cases_001.wpr" - } - }, - "description": "Describes the Web Page Replay archives for a story set. Don't edit by hand! Use record_wpr for updating.", - "platform_specific": true -} \ No newline at end of file
diff --git a/tools/perf/page_sets/data/webrtc_smoothness_cases_001.wpr.sha1 b/tools/perf/page_sets/data/webrtc_smoothness_cases_001.wpr.sha1 deleted file mode 100644 index 6ec76ac..0000000 --- a/tools/perf/page_sets/data/webrtc_smoothness_cases_001.wpr.sha1 +++ /dev/null
@@ -1 +0,0 @@ -c57b0b7001336cf5e62851757096bbbc46866b9f \ No newline at end of file
diff --git a/tools/perf/page_sets/data/webrtc_stresstest_cases.json b/tools/perf/page_sets/data/webrtc_stresstest_cases.json deleted file mode 100644 index e74ffe7..0000000 --- a/tools/perf/page_sets/data/webrtc_stresstest_cases.json +++ /dev/null
@@ -1,9 +0,0 @@ -{ - "archives": { - "multiple_peerconnections": { - "DEFAULT": "webrtc_stresstest_cases_001.wpr" - } - }, - "description": "Describes the Web Page Replay archives for a story set. Don't edit by hand! Use record_wpr for updating.", - "platform_specific": true -} \ No newline at end of file
diff --git a/tools/perf/page_sets/data/webrtc_stresstest_cases_000.wpr.sha1 b/tools/perf/page_sets/data/webrtc_stresstest_cases_000.wpr.sha1 deleted file mode 100644 index 05423ffb..0000000 --- a/tools/perf/page_sets/data/webrtc_stresstest_cases_000.wpr.sha1 +++ /dev/null
@@ -1 +0,0 @@ -a618ed5609bd3f2e4f0fc754a3c6457c82c75775 \ No newline at end of file
diff --git a/tools/perf/page_sets/data/webrtc_stresstest_cases_001.wpr.sha1 b/tools/perf/page_sets/data/webrtc_stresstest_cases_001.wpr.sha1 deleted file mode 100644 index e5d19566..0000000 --- a/tools/perf/page_sets/data/webrtc_stresstest_cases_001.wpr.sha1 +++ /dev/null
@@ -1 +0,0 @@ -dc4585717167caa2c3a014e9585b722d2d53cb0c \ No newline at end of file
diff --git a/tools/perf/page_sets/five_blank_pages.py b/tools/perf/page_sets/five_blank_pages.py deleted file mode 100644 index caca894..0000000 --- a/tools/perf/page_sets/five_blank_pages.py +++ /dev/null
@@ -1,23 +0,0 @@ -# Copyright 2014 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. -from telemetry.page import page as page_module -from telemetry import story - - -# The PageSet searches for pages relative to the directory the page class is -# defined in so we need to subclass here. -class BlankPage(page_module.Page): - def __init__(self, ps, prefix): - super(BlankPage, self).__init__('file://blank_page/blank_page.html', ps, - name=prefix+'_blank') - - -class FiveBlankPagesPageSet(story.StorySet): - - """ Five blank pages. """ - - def __init__(self): - super(FiveBlankPagesPageSet, self).__init__() - for i in xrange(5): - self.AddStory(BlankPage(self, str(i)))
diff --git a/tools/perf/page_sets/idle_platform.py b/tools/perf/page_sets/idle_platform.py new file mode 100644 index 0000000..b25af54 --- /dev/null +++ b/tools/perf/page_sets/idle_platform.py
@@ -0,0 +1,50 @@ +# Copyright 2017 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. +import time + +from telemetry.page import shared_page_state +from telemetry import story + + +class _IdleSharedState(shared_page_state.SharedPageState): + def __init__(self, test, finder_options, story_set): + super(_IdleSharedState, self).__init__(test, finder_options, story_set) + self._current_story = None + + def WillRunStory(self, current_story): + self._current_story = current_story + assert self.platform.tracing_controller.is_tracing_running + + def RunStory(self, _): + self._current_story.Run(self) + + def DidRunStory(self, _): + self._current_story = None + + +class _IdleStory(story.Story): + def __init__(self, name, duration): + super(_IdleStory, self).__init__( + shared_state_class=_IdleSharedState, name=name) + self._duration = duration + # https://github.com/catapult-project/catapult/issues/3489 + # Even though there is no actual url being used, it is required for + # uploading results using the --upload-results flag. Remove url when + # it is no longer needed. + self._url = name + + def Run(self, shared_state): + time.sleep(self._duration) + + @property + def url(self): + return self._url + + +class IdleStorySet(story.StorySet): + def __init__(self): + super(IdleStorySet, self).__init__() + self.AddStory(_IdleStory('IdleStory_10s', 10)) + self.AddStory(_IdleStory('IdleStory_60s', 60)) + self.AddStory(_IdleStory('IdleStory_120s', 120))
diff --git a/tools/perf/page_sets/infinite_scroll_cases.py b/tools/perf/page_sets/infinite_scroll_cases.py index 7930a6e..25221f0 100644 --- a/tools/perf/page_sets/infinite_scroll_cases.py +++ b/tools/perf/page_sets/infinite_scroll_cases.py
@@ -1,80 +1,157 @@ -# Copyright 2015 The Chromium Authors. All rights reserved. +# Copyright 2017 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. -from telemetry.page import page as page_module + +import sys + +from page_sets.login_helpers import facebook_login +from page_sets.system_health import platforms +from telemetry.core import discover +from telemetry.page import page from telemetry.page import shared_page_state from telemetry import story -TIME_TO_WAIT_BEFORE_STARTING_IN_SECONDS = 5 -SCROLL_TIMEOUT_IN_SECONDS = 120 +class _InfiniteScrollStory(page.Page): + """ Base class for infinite scroll stories.""" -# TODO(ulan): Remove this once crbug.com/541508 is fixed. -STARTUP_SCRIPT = ''' - window.WebSocket = undefined; - window.Worker = undefined; - window.performance = undefined;''' + NAME = NotImplemented + URL = NotImplemented + SUPPORTED_PLATFORMS = platforms.ALL_PLATFORMS + SCROLL_DISTANCE = 25000 + SCROLL_STEP = 1000 + MAX_SCROLL_RETRIES = 3 + TIME_BEFORE_SCROLL_RETRY_IN_SECONDS = 1 + TIME_TO_WAIT_BEFORE_STARTING_IN_SECONDS = 5 -class InfiniteScrollPage(page_module.Page): - def __init__(self, url, page_set, name, scroll_amount, delay, repeat, - credentials=None): - super(InfiniteScrollPage, self).__init__( - url=url, page_set=page_set, name=name, + def __init__(self, story_set): + super(_InfiniteScrollStory, self).__init__( + page_set=story_set, url=self.URL, name=self.NAME, shared_page_state_class=shared_page_state.SharedPageState, - credentials_path='data/credentials.json') - self.credentials = credentials - self.script_to_evaluate_on_commit = STARTUP_SCRIPT - self.scroll_amount = scroll_amount - self.delay = delay - self.repeat = repeat + credentials_path='data/credentials.json') + # TODO(ulan): Remove this once crbug.com/541508 is fixed. + self.script_to_evaluate_on_commit = ''' + window.WebSocket = undefined; + window.Worker = undefined; + window.performance = undefined;''' def RunPageInteractions(self, action_runner): - self._WaitAction(action_runner) - self._ScrollAction(action_runner, self.scroll_amount, self.delay, - self.repeat) - - def _ScrollAction(self, action_runner, scroll_amount, delay, repeat): - with action_runner.CreateInteraction('Begin'): - action_runner.tab.browser.DumpMemory() - with action_runner.CreateInteraction('Scrolling'): - action_runner.RepeatableBrowserDrivenScroll( - y_scroll_distance_ratio=scroll_amount, - repeat_delay_ms=delay, - repeat_count=repeat, - timeout=SCROLL_TIMEOUT_IN_SECONDS) - with action_runner.CreateInteraction('End'): - action_runner.tab.browser.DumpMemory() - - def _WaitAction(self, action_runner): with action_runner.CreateInteraction('Load'): action_runner.WaitForJavaScriptCondition( 'document.body != null && ' 'document.body.scrollHeight > window.innerHeight && ' '!document.body.addEventListener("touchstart", function() {})') with action_runner.CreateInteraction('Wait'): - action_runner.Wait(TIME_TO_WAIT_BEFORE_STARTING_IN_SECONDS) + action_runner.Wait(self.TIME_TO_WAIT_BEFORE_STARTING_IN_SECONDS) with action_runner.CreateInteraction('GC'): action_runner.ForceGarbageCollection() + with action_runner.CreateInteraction('Begin'): + action_runner.tab.browser.DumpMemory() + with action_runner.CreateInteraction('Scrolling'): + self._Scroll(action_runner, self.SCROLL_DISTANCE, self.SCROLL_STEP) + with action_runner.CreateInteraction('End'): + action_runner.tab.browser.DumpMemory() + def _Scroll(self, action_runner, distance, step_size): + """ This function scrolls the webpage by the given scroll distance in + multiple steps, where each step (except the last one) has the given size. -class InfiniteScrollPageSet(story.StorySet): - """ Top pages that can be scrolled for many pages. """ + If scrolling gets stuck, the functions retries scrolling MAX_SCROLL_RETRIES + times waiting TIME_BEFORE_SCROLL_RETRY_IN_SECONDS seconds between retries. + """ + remaining = distance - action_runner.EvaluateJavaScript('window.scrollY') + retry_count = 0 + # Scroll until the window.scrollY is within 1 pixel of the target distance. + while remaining > 1: + action_runner.ScrollPage(distance=min(remaining, step_size) + 1) + new_remaining = (distance - + action_runner.EvaluateJavaScript('window.scrollY')) + if remaining == new_remaining: + # Scrolling is stuck. This can happen if the page is loading + # resources. Give the page some time and retry scrolling. + if retry_count == self.MAX_SCROLL_RETRIES: + raise Exception('Scrolling stuck at %d' % remaining) + retry_count += 1 + action_runner.Wait(self.TIME_BEFORE_SCROLL_RETRY_IN_SECONDS) + else: + retry_count = 0 + remaining = new_remaining + +class DiscourseDesktopStory(_InfiniteScrollStory): + NAME = 'discourse' + URL = ('https://meta.discourse.org/t/the-official-discourse-tags-plugin' + + '-discourse-tagging/26482') + SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY + +class DiscourseMobileStory(_InfiniteScrollStory): + NAME = 'discourse' + URL = ('https://meta.discourse.org/t/the-official-discourse-tags-plugin' + + '-discourse-tagging/26482') + SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY + SCROLL_DISTANCE = 15000 + +class FacebookDesktopStory(_InfiniteScrollStory): + NAME = 'facebook' + URL = 'https://www.facebook.com/shakira' + SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY + +class FacebookMobileStory(_InfiniteScrollStory): + NAME = 'facebook' + URL = 'https://m.facebook.com/shakira' + SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY + def RunNavigateSteps(self, action_runner): + facebook_login.LoginWithMobileSite( + action_runner, 'facebook3', self.credentials_path) + super(FacebookMobileStory, self).RunNavigateSteps(action_runner) + +class FlickrDesktopStory(_InfiniteScrollStory): + NAME = 'flickr' + URL = 'https://www.flickr.com/explore' + SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY + +class FlickrMobileStory(_InfiniteScrollStory): + NAME = 'flickr' + URL = 'https://www.flickr.com/explore' + SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY + SCROLL_DISTANCE = 10000 + +class PinterestMobileStory(_InfiniteScrollStory): + NAME = 'pinterest' + URL = 'https://www.pinterest.com/all' + SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY + +class TumblrStory(_InfiniteScrollStory): + NAME = 'tumblr' + URL = 'http://techcrunch.tumblr.com/' + +class TwitterDesktopStory(_InfiniteScrollStory): + NAME = 'twitter' + URL = 'https://twitter.com/taylorswift13' + SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY + +class InfiniteScrollStorySet(story.StorySet): + """ Desktop story set. """ def __init__(self): - super(InfiniteScrollPageSet, self).__init__( + super(InfiniteScrollStorySet, self).__init__( archive_data_file='data/infinite_scroll.json', cloud_storage_bucket=story.PARTNER_BUCKET) - # The scroll distance is chosen such that the page can be scrolled - # continuously through the test without hitting the end of the page. - SCROLL_FAR = 60 - SCROLL_PAGE = 1 - pages = [ - ('https://www.facebook.com/shakira', 'facebook', SCROLL_FAR, 0, 0), - ('https://twitter.com/taylorswift13', 'twitter', SCROLL_PAGE, 10, 30), - ('http://techcrunch.tumblr.com/', 'tumblr', SCROLL_FAR, 0, 0), - ('https://www.flickr.com/explore', 'flickr', SCROLL_FAR, 0, 0), - ('https://meta.discourse.org/t/the-official-discourse-tags-plugin-discourse-tagging/26482', - 'discourse', SCROLL_PAGE, 10, 30) - ] - for (url, name, scroll_amount, delay, repeat) in pages: - self.AddStory( - InfiniteScrollPage(url, self, name, scroll_amount, delay, repeat)) + for story_class in _FindInfiniteScrollStoryClasses(platforms.DESKTOP): + self.AddStory(story_class(self)) + +class MobileInfiniteScrollStorySet(story.StorySet): + """ Mobile story set. """ + def __init__(self): + super(MobileInfiniteScrollStorySet, self).__init__( + archive_data_file='data/mobile_infinite_scroll.json', + cloud_storage_bucket=story.PARTNER_BUCKET) + for story_class in _FindInfiniteScrollStoryClasses(platforms.MOBILE): + self.AddStory(story_class(self)) + +def _FindInfiniteScrollStoryClasses(platform): + # Sort the classes by their names so that their order is stable and + # deterministic. + for unused_cls_name, cls in sorted(discover.DiscoverClassesInModule( + module=sys.modules[__name__], base_class=_InfiniteScrollStory, + index_by_class_name=True).iteritems()): + if platform in cls.SUPPORTED_PLATFORMS: + yield cls
diff --git a/tools/perf/page_sets/loading_mobile.py b/tools/perf/page_sets/loading_mobile.py index b60968d..d3030b8a 100644 --- a/tools/perf/page_sets/loading_mobile.py +++ b/tools/perf/page_sets/loading_mobile.py
@@ -91,32 +91,36 @@ 'http://www.localmoxie.com', 'http://www.dawn.com', 'http://www.thairath.co.th', - 'http://www.hashocean.com', - 'http://www.163.com', + # Disabled to avoid Nexus5X bot timeout crbug.com/702175 + # 'http://www.hashocean.com', + # 'http://www.163.com', ], cache_temperatures, traffic_settings) self.AddStories(['easy_ttfmp'], [ 'http://www.slideshare.net', 'http://www.bradesco.com.br', 'http://www.gsshop.com', - 'http://www.sbs.co.kr', - 'http://www.futura-sciences.com', + # Disabled to avoid Nexus5X bot timeout crbug.com/702175 + # 'http://www.sbs.co.kr', + # 'http://www.futura-sciences.com', ], cache_temperatures, traffic_settings) self.AddStories(['tough_tti'], [ 'http://www.thestar.com.my', 'http://www.58pic.com', 'http://www.hongkiat.com', - 'http://www.ebs.in', - 'http://www.ibicn.com', + # Disabled to avoid Nexus5X bot timeout crbug.com/702175 + # 'http://www.ebs.in', + # 'http://www.ibicn.com', ], cache_temperatures, traffic_settings) self.AddStories(['easy_tti'], [ 'http://www.dramaq.com.tw', 'http://www.locanto.in', 'http://www.francetvinfo.fr', - 'http://www.gfk.com', - 'http://www.mlsmatrix.com' + # Disabled to avoid Nexus5X bot timeout crbug.com/702175 + # 'http://www.gfk.com', + # 'http://www.mlsmatrix.com' ], cache_temperatures, traffic_settings) def AddStories(self, tags, urls, cache_temperatures, traffic_settings):
diff --git a/tools/perf/page_sets/mobile_infinite_scroll_cases.py b/tools/perf/page_sets/mobile_infinite_scroll_cases.py deleted file mode 100644 index adf4271..0000000 --- a/tools/perf/page_sets/mobile_infinite_scroll_cases.py +++ /dev/null
@@ -1,98 +0,0 @@ -# Copyright 2016 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. -from page_sets import mobile_facebook_page -from telemetry.page import page as page_module -from telemetry.page import shared_page_state -from telemetry import story - -TIME_TO_WAIT_BEFORE_STARTING_IN_SECONDS = 5 -SCROLL_TIMEOUT_IN_SECONDS = 120 - -# TODO(ulan): Remove this once crbug.com/541508 is fixed. -STARTUP_SCRIPT = ''' - window.WebSocket = undefined; - window.Worker = undefined; - window.performance = undefined;''' - -def _ScrollAction(action_runner, scroll_amount, delay, repeat): - with action_runner.CreateInteraction('Begin'): - action_runner.tab.browser.DumpMemory() - with action_runner.CreateInteraction('Scrolling'): - action_runner.RepeatableBrowserDrivenScroll( - y_scroll_distance_ratio=scroll_amount, - repeat_delay_ms=delay, - repeat_count=repeat, - timeout=SCROLL_TIMEOUT_IN_SECONDS) - with action_runner.CreateInteraction('End'): - action_runner.tab.browser.DumpMemory() - -def _WaitAction(action_runner): - with action_runner.CreateInteraction('Load'): - action_runner.WaitForJavaScriptCondition( - 'document.body != null && ' - 'document.body.scrollHeight > window.innerHeight && ' - '!document.body.addEventListener("touchstart", function() {})') - with action_runner.CreateInteraction('Wait'): - action_runner.Wait(TIME_TO_WAIT_BEFORE_STARTING_IN_SECONDS) - with action_runner.CreateInteraction('GC'): - action_runner.ForceGarbageCollection() - -class MobileInfiniteScrollPage(page_module.Page): - def __init__(self, url, page_set, name, scroll_amount, delay, repeat, - credentials=None): - super(MobileInfiniteScrollPage, self).__init__( - url=url, page_set=page_set, name=name, - shared_page_state_class=shared_page_state.SharedPageState, - credentials_path='data/credentials.json') - self.credentials = credentials - self.script_to_evaluate_on_commit = STARTUP_SCRIPT - self.scroll_amount = scroll_amount - self.delay = delay - self.repeat = repeat - - def RunPageInteractions(self, action_runner): - _WaitAction(action_runner) - _ScrollAction(action_runner, self.scroll_amount, self.delay, - self.repeat) - -class MobileInfiniteScrollFacebookPage(mobile_facebook_page.MobileFacebookPage): - def __init__(self, url, page_set, name, scroll_amount, delay, repeat): - super(MobileInfiniteScrollFacebookPage, self).__init__( - url=url, page_set=page_set, - shared_page_state_class=shared_page_state.SharedPageState, - name=name) - self.script_to_evaluate_on_commit = STARTUP_SCRIPT - self.scroll_amount = scroll_amount - self.delay = delay - self.repeat = repeat - - def RunPageInteractions(self, action_runner): - _WaitAction(action_runner) - _ScrollAction(action_runner, self.scroll_amount, self.delay, - self.repeat) - -class MobileInfiniteScrollPageSet(story.StorySet): - """ Top mobile pages that can be scrolled for many pages. """ - def __init__(self): - super(MobileInfiniteScrollPageSet, self).__init__( - archive_data_file='data/mobile_infinite_scroll.json', - cloud_storage_bucket=story.PARTNER_BUCKET) - # The scroll distance is chosen such that the page can be scrolled - # continuously through the test without hitting the end of the page. - SCROLL_FAR = 60 - SCROLL_PAGE = 1 - pages = [ - ('https://m.facebook.com/shakira', 'facebook', SCROLL_FAR, 0, 0), - ('https://www.pinterest.com/all', 'pinterest', SCROLL_FAR, 0, 0), - ('http://techcrunch.tumblr.com/', 'tumblr', SCROLL_FAR, 0, 0), - ('https://www.flickr.com/explore', 'flickr', SCROLL_FAR, 0, 0), - ('https://meta.discourse.org/t/the-official-discourse-tags-plugin-discourse-tagging/26482', - 'discourse', SCROLL_PAGE, 10, 30) - ] - self.AddStory( - MobileInfiniteScrollFacebookPage(pages[0][0], self, pages[0][1], - pages[0][2], pages[0][3], pages[0][4])) - for (url, name, scroll_amount, delay, repeat) in pages[1:]: - self.AddStory( - MobileInfiniteScrollPage(url, self, name, scroll_amount, delay, repeat))
diff --git a/tools/perf/page_sets/page_cycler_story.py b/tools/perf/page_sets/page_cycler_story.py index a5fabf1..bbef58a 100644 --- a/tools/perf/page_sets/page_cycler_story.py +++ b/tools/perf/page_sets/page_cycler_story.py
@@ -7,7 +7,6 @@ from telemetry.page import shared_page_state -_TTI_WAIT_TIME = 10 _NAVIGATION_TIMEOUT = 180 _WEB_CONTENTS_TIMEOUT = 180 @@ -31,4 +30,3 @@ def RunPageInteractions(self, action_runner): action_runner.tab.WaitForDocumentReadyStateToBeComplete( _WEB_CONTENTS_TIMEOUT) - action_runner.Wait(_TTI_WAIT_TIME)
diff --git a/tools/perf/page_sets/system_health/browsing_stories.py b/tools/perf/page_sets/system_health/browsing_stories.py index 0769b2e..e8a3c98 100644 --- a/tools/perf/page_sets/system_health/browsing_stories.py +++ b/tools/perf/page_sets/system_health/browsing_stories.py
@@ -51,19 +51,14 @@ self._WaitForNavigation(action_runner) -############################################################################## -# News browsing stories. -############################################################################## +class _ArticleBrowsingStory(_BrowsingStory): + """Abstract base class for user stories browsing news / shopping articles. - -class _NewsBrowsingStory(_BrowsingStory): - """Abstract base class for news user stories. - - A news story imitates browsing a news website: + An article browsing story imitates browsing a articles: 1. Load the main page. - 2. Open and scroll the first news item. + 2. Open and scroll the first article. 3. Go back to the main page and scroll it. - 4. Open and scroll the second news item. + 4. Open and scroll the second article. 5. Go back to the main page and scroll it. 6. etc. """ @@ -77,11 +72,11 @@ def _DidLoadDocument(self, action_runner): for i in xrange(self.ITEMS_TO_VISIT): self._NavigateToItem(action_runner, i) - self._ReadNewsItem(action_runner) + self._ReadNextArticle(action_runner) self._NavigateBack(action_runner) self._ScrollMainPage(action_runner) - def _ReadNewsItem(self, action_runner): + def _ReadNextArticle(self, action_runner): action_runner.tab.WaitForDocumentReadyStateToBeComplete() action_runner.Wait(self.ITEM_READ_TIME_IN_SECONDS/2.0) action_runner.RepeatableBrowserDrivenScroll( @@ -94,7 +89,12 @@ repeat_count=self.MAIN_PAGE_SCROLL_REPEAT) -class CnnStory(_NewsBrowsingStory): +############################################################################## +# News browsing stories. +############################################################################## + + +class CnnStory(_ArticleBrowsingStory): """The second top website in http://www.alexa.com/topsites/category/News""" NAME = 'browse:news:cnn' URL = 'http://edition.cnn.com/' @@ -103,7 +103,7 @@ TAGS = [story_tags.JAVASCRIPT_HEAVY] -class FacebookMobileStory(_NewsBrowsingStory): +class FacebookMobileStory(_ArticleBrowsingStory): NAME = 'browse:social:facebook' URL = 'https://www.facebook.com/rihanna' ITEM_SELECTOR = 'article ._5msj' @@ -111,9 +111,10 @@ # (crbug.com/631022) MAIN_PAGE_SCROLL_REPEAT = 1 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY + TAGS = [story_tags.EMERGING_MARKET] -class FacebookDesktopStory(_NewsBrowsingStory): +class FacebookDesktopStory(_ArticleBrowsingStory): NAME = 'browse:social:facebook' URL = 'https://www.facebook.com/rihanna' ITEM_SELECTOR = '._4-eo' @@ -123,7 +124,23 @@ SUPPORTED_PLATFORMS = platforms.NO_PLATFORMS -class FlipboardMobileStory(_NewsBrowsingStory): +class InstagramMobileStory(_ArticleBrowsingStory): + NAME = 'browse:social:instagram' + URL = 'https://www.instagram.com/badgalriri/' + ITEM_SELECTOR = '[class=\\"_8mlbc _vbtk2 _t5r8b\\"]' + ITEMS_TO_VISIT = 8 + + SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY + TAGS = [story_tags.EMERGING_MARKET] + + def _WaitForNavigation(self, action_runner): + action_runner.WaitForElement(text='load more comments') + + def _NavigateBack(self, action_runner): + action_runner.NavigateBack() + + +class FlipboardMobileStory(_ArticleBrowsingStory): NAME = 'browse:news:flipboard' URL = 'https://flipboard.com/explore' IS_SINGLE_PAGE_APP = True @@ -131,12 +148,8 @@ ITEM_SCROLL_REPEAT = 4 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY - @classmethod - def ShouldDisable(cls, possible_browser): - return possible_browser.platform.IsSvelte() # crbug.com/668097 - -class FlipboardDesktopStory(_NewsBrowsingStory): +class FlipboardDesktopStory(_ArticleBrowsingStory): NAME = 'browse:news:flipboard' URL = 'https://flipboard.com/explore' IS_SINGLE_PAGE_APP = True @@ -145,14 +158,14 @@ # crbug.com/657665 for win and mac -@decorators.Disabled('win', 'yosemite', 'elcapitan') -class HackerNewsStory(_NewsBrowsingStory): +@decorators.Disabled('win', 'mac') +class HackerNewsStory(_ArticleBrowsingStory): NAME = 'browse:news:hackernews' URL = 'https://news.ycombinator.com' ITEM_SELECTOR = '.athing .title > a' -class NytimesMobileStory(_NewsBrowsingStory): +class NytimesMobileStory(_ArticleBrowsingStory): """The third top website in http://www.alexa.com/topsites/category/News""" NAME = 'browse:news:nytimes' URL = 'http://mobile.nytimes.com' @@ -162,7 +175,7 @@ SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY -class NytimesDesktopStory(_NewsBrowsingStory): +class NytimesDesktopStory(_ArticleBrowsingStory): """The third top website in http://www.alexa.com/topsites/category/News""" NAME = 'browse:news:nytimes' URL = 'http://www.nytimes.com' @@ -172,7 +185,7 @@ # Desktop qq.com opens a news item in a separate tab, for which the back button # does not work. -class QqMobileStory(_NewsBrowsingStory): +class QqMobileStory(_ArticleBrowsingStory): NAME = 'browse:news:qq' URL = 'http://news.qq.com' ITEM_SELECTOR = '.list .full a' @@ -180,7 +193,7 @@ TAGS = [story_tags.INTERNATIONAL] -class RedditDesktopStory(_NewsBrowsingStory): +class RedditDesktopStory(_ArticleBrowsingStory): """The top website in http://www.alexa.com/topsites/category/News""" NAME = 'browse:news:reddit' URL = 'https://www.reddit.com/r/news/top/?sort=top&t=week' @@ -188,7 +201,7 @@ SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY -class RedditMobileStory(_NewsBrowsingStory): +class RedditMobileStory(_ArticleBrowsingStory): """The top website in http://www.alexa.com/topsites/category/News""" NAME = 'browse:news:reddit' URL = 'https://www.reddit.com/r/news/top/?sort=top&t=week' @@ -197,7 +210,7 @@ SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY -class TwitterMobileStory(_NewsBrowsingStory): +class TwitterMobileStory(_ArticleBrowsingStory): NAME = 'browse:social:twitter' URL = 'https://www.twitter.com/nasa' ITEM_SELECTOR = '.Tweet-text' @@ -206,7 +219,7 @@ @decorators.Disabled('win') # crbug.com/662971 -class TwitterDesktopStory(_NewsBrowsingStory): +class TwitterDesktopStory(_ArticleBrowsingStory): NAME = 'browse:social:twitter' URL = 'https://www.twitter.com/nasa' IS_SINGLE_PAGE_APP = True @@ -214,8 +227,7 @@ SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY -@decorators.Disabled('all') # crbug.com/688190 -class WashingtonPostMobileStory(_NewsBrowsingStory): +class WashingtonPostMobileStory(_ArticleBrowsingStory): """Progressive website""" NAME = 'browse:news:washingtonpost' URL = 'https://www.washingtonpost.com/pwa' @@ -243,7 +255,7 @@ @decorators.Disabled('win') # crbug.com/673775 -class GoogleDesktopStory(_NewsBrowsingStory): +class GoogleDesktopStory(_ArticleBrowsingStory): """ A typical google search story: _ Start at https://www.google.com/search?q=flower @@ -294,7 +306,7 @@ action_runner.ScrollPage() -class GoogleIndiaDesktopStory(_NewsBrowsingStory): +class GoogleIndiaDesktopStory(_ArticleBrowsingStory): """ A typical google search story in India: 1. Start at https://www.google.co.in/search?q=%E0%A4%AB%E0%A5%82%E0%A4%B2` @@ -381,8 +393,11 @@ ITEM_SELECTOR = '.Navbar-customAction' SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY IS_SINGLE_PAGE_APP = True + TAGS = [story_tags.EMERGING_MARKET] +# crbug.com/704197 for win and mac +@decorators.Disabled('win', 'mac') class ImgurDesktopStory(_MediaBrowsingStory): NAME = 'browse:media:imgur' URL = 'http://imgur.com/gallery/5UlBN' @@ -399,6 +414,7 @@ IS_SINGLE_PAGE_APP = True ITEM_SELECTOR_INDEX = 3 TAGS = [story_tags.JAVASCRIPT_HEAVY] + TAGS = [story_tags.EMERGING_MARKET] class YouTubeDesktopStory(_MediaBrowsingStory): @@ -423,6 +439,7 @@ SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY IS_SINGLE_PAGE_APP = True ITEM_SELECTOR_INDEX = 0 + TAGS = [story_tags.EMERGING_MARKET] class FacebookPhotosDesktopStory(_MediaBrowsingStory): @@ -486,3 +503,144 @@ '".Button.borderless.close.visible")') action_runner.ClickElement(element_function=x_element_function) action_runner.Wait(1) # Wait to make navigation realistic. + + +############################################################################## +# Emerging market browsing stories. +############################################################################## + + +@decorators.Disabled('android') # crbug.com/708300. +class BrowseFlipKartMobileStory(_ArticleBrowsingStory): + NAME = 'browse:shopping:flipkart' + URL = 'https://flipkart.com/search?q=Sunglasses' + SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY + TAGS = [story_tags.EMERGING_MARKET] + + ITEM_SELECTOR = '[style=\\"background-image: none;\\"]' + BACK_SELECTOR = '._3NH1qf' + ITEMS_TO_VISIT = 4 + IS_SINGLE_PAGE_APP = True + + def _WaitForNavigation(self, action_runner): + action_runner.WaitForElement(text='Details') + + def _NavigateBack(self, action_runner): + action_runner.ClickElement(selector=self.BACK_SELECTOR) + action_runner.WaitForElement(text="Sunglasses") + + +class BrowseAmazonMobileStory(_ArticleBrowsingStory): + NAME = 'browse:shopping:amazon' + URL = 'https://www.amazon.co.in/s/?field-keywords=Mobile' + SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY + TAGS = [story_tags.EMERGING_MARKET] + + ITEM_SELECTOR = '.aw-search-results' + ITEMS_TO_VISIT = 4 + + +class BrowseLazadaMobileStory(_ArticleBrowsingStory): + NAME = 'browse:shopping:lazada' + URL = 'https://www.lazada.co.id/catalog/?q=Wrist+watch' + SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY + TAGS = [story_tags.EMERGING_MARKET] + + ITEM_SELECTOR = '.merchandise__link' + ITEMS_TO_VISIT = 1 + + +class BrowseAvitoMobileStory(_ArticleBrowsingStory): + NAME = 'browse:shopping:avito' + URL = 'https://www.avito.ru/rossiya' + SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY + TAGS = [story_tags.EMERGING_MARKET] + + ITEM_SELECTOR = '.item-link' + ITEMS_TO_VISIT = 4 + + +class BrowseTOIMobileStory(_ArticleBrowsingStory): + NAME = 'browse:news:toi' + URL = 'http://m.timesofindia.com' + SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY + TAGS = [story_tags.EMERGING_MARKET] + + ITEMS_TO_VISIT = 4 + ITEM_SELECTOR = '.dummy-img' + + +class BrowseGloboMobileStory(_ArticleBrowsingStory): + NAME = 'browse:news:globo' + URL = 'http://www.globo.com' + SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY + TAGS = [story_tags.EMERGING_MARKET] + + ITEMS_TO_VISIT = 4 + ITEM_SELECTOR = '.hui-premium__title' + + +class BrowseCricBuzzMobileStory(_ArticleBrowsingStory): + NAME = 'browse:news:cricbuzz' + URL = 'http://m.cricbuzz.com' + SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY + TAGS = [story_tags.EMERGING_MARKET] + + ITEMS_TO_VISIT = 3 + ITEM_SELECTOR = '.list-content' + + + +############################################################################## +# Maps browsing stories. +############################################################################## + + +class GoogleMapsMobileStory(system_health_story.SystemHealthStory): + """Story that browses google maps mobile page + + This story searches for nearby restaurants on google maps website and finds + directions to a chosen restaurant from search results. + """ + NAME = 'browse:tools:maps' + URL = 'https://maps.google.com/' + SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY + TAGS = [story_tags.EMERGING_MARKET] + + _MAPS_SEARCH_BOX_SELECTOR = '.ml-searchbox-placeholder' + _RESTAURANTS_LOADED = '.ml-panes-categorical-list-results' + _SEARCH_NEW_AREA_SELECTOR = '.ml-reissue-search-button-inner' + _RESTAURANTS_LINK = '.ml-entity-list-item-info' + _DIRECTIONS_LINK = '[class="ml-button ml-inner-button-directions-fab"]' + _DIRECTIONS_LOADED = ('[class="ml-fab-inner ' + 'ml-button ml-button-navigation-fab"]') + _MAP_LAYER = '.ml-map' + + def _DidLoadDocument(self, action_runner): + # Submit search query. + self._ClickLink(self._MAPS_SEARCH_BOX_SELECTOR, action_runner) + action_runner.EnterText('restaurants near me') + action_runner.PressKey('Return') + action_runner.WaitForElement(selector=self._RESTAURANTS_LOADED) + action_runner.WaitForNetworkQuiescence() + action_runner.Wait(4) # User looking at restaurants + + # Open the restaurant list and select the first. + self._ClickLink(self._RESTAURANTS_LOADED, action_runner) + action_runner.WaitForElement(selector=self._RESTAURANTS_LINK) + action_runner.Wait(3) # User reads about restaurant + self._ClickLink(self._RESTAURANTS_LINK, action_runner) + action_runner.Wait(1) # Reading description + + # Open directions to the restaurant from Google. + self._ClickLink(self._DIRECTIONS_LINK, action_runner) + action_runner.Wait(0.5) + action_runner.EnterText('Google Mountain View') + action_runner.PressKey('Return') + action_runner.WaitForElement(selector=self._DIRECTIONS_LOADED) + action_runner.WaitForNetworkQuiescence() + action_runner.Wait(2) # Seeing direction + + def _ClickLink(self, selector, action_runner): + action_runner.WaitForElement(selector=selector) + action_runner.ClickElement(selector=selector)
diff --git a/tools/perf/page_sets/system_health/loading_stories.py b/tools/perf/page_sets/system_health/loading_stories.py index f3ab950..946e67d 100644 --- a/tools/perf/page_sets/system_health/loading_stories.py +++ b/tools/perf/page_sets/system_health/loading_stories.py
@@ -39,9 +39,10 @@ URL = 'https://search.yahoo.com/search;_ylt=?p=google' -class LoadAmazonStory(_LoadingStory): +class LoadAmazonDesktopStory(_LoadingStory): NAME = 'load:search:amazon' URL = 'https://www.amazon.com/s/?field-keywords=nexus' + SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY class LoadTaobaoDesktopStory(_LoadingStory): @@ -98,9 +99,10 @@ TAGS = [story_tags.INTERNATIONAL] -class LoadInstagramStory(_LoadingStory): +class LoadInstagramDesktopStory(_LoadingStory): NAME = 'load:social:instagram' URL = 'https://www.instagram.com/selenagomez/' + SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY class LoadPinterestStory(_LoadingStory): @@ -208,6 +210,14 @@ class LoadWikipediaStory(_LoadingStory): NAME = 'load:news:wikipedia' URL = 'https://en.wikipedia.org/wiki/Science' + TAGS = [story_tags.EMERGING_MARKET] + + +class LoadIrctcStory(_LoadingStory): + NAME = 'load:news:irctc' + URL = 'https://www.irctc.co.in' + SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY + TAGS = [story_tags.EMERGING_MARKET] ################################################################################ @@ -220,6 +230,7 @@ NAME = 'load:media:youtube' URL = 'https://www.youtube.com/watch?v=QGfhS1hfTWw&autoplay=false' PLATFORM_SPECIFIC = True + TAGS = [story_tags.EMERGING_MARKET] class LoadDailymotionStory(_LoadingStory): @@ -269,6 +280,7 @@ URL = ( 'https://m.facebook.com/rihanna/photos/a.207477806675.138795.10092511675/10153911739606676/?type=3&source=54&ref=page_internal') SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY + TAGS = [story_tags.EMERGING_MARKET] class LoadFacebookPhotosDesktopStory(_LoadingStory): @@ -331,11 +343,6 @@ action_runner.WaitForJavaScriptCondition( 'document.getElementById("apploadingdiv").style.height === "0px"') -class LoadMapsStory(_LoadingStory): - NAME = 'load:tools:maps' - URL = 'https://www.google.com/maps/place/London,+UK/' - - class LoadStackOverflowStory(_LoadingStory): NAME = 'load:tools:stackoverflow' URL = (
diff --git a/tools/perf/page_sets/system_health/multi_tab_stories.py b/tools/perf/page_sets/system_health/multi_tab_stories.py index f472a6be..a9ab0c7 100644 --- a/tools/perf/page_sets/system_health/multi_tab_stories.py +++ b/tools/perf/page_sets/system_health/multi_tab_stories.py
@@ -9,8 +9,10 @@ from page_sets.system_health import story_tags from page_sets.system_health import platforms +from telemetry import benchmark -class _MultiTabStory(system_health_story.SystemHealthStory): + +class MultiTabStory(system_health_story.SystemHealthStory): ABSTRACT_STORY = True def RunNavigateSteps(self, action_runner): @@ -37,7 +39,8 @@ tab.WaitForFrameToBeDisplayed() -class MultiTabTypical24Story(_MultiTabStory): +@benchmark.Disabled('all') # crbug.com/704197 +class MultiTabTypical24Story(MultiTabStory): NAME = 'multitab:misc:typical24' TAGS = [story_tags.TABS_SWITCHING] URL_LIST = [
diff --git a/tools/perf/page_sets/system_health/searching_stories.py b/tools/perf/page_sets/system_health/searching_stories.py index 329a0cb..a4cc8d3 100644 --- a/tools/perf/page_sets/system_health/searching_stories.py +++ b/tools/perf/page_sets/system_health/searching_stories.py
@@ -2,12 +2,18 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +from page_sets.system_health import platforms +from page_sets.system_health import story_tags from page_sets.system_health import system_health_story +from devil.android.sdk import keyevent # pylint: disable=import-error + +# TODO(ssid): Rename the search stories to browse stories crbug.com/708300. class SearchGoogleStory(system_health_story.SystemHealthStory): NAME = 'search:portal:google' URL = 'https://www.google.co.uk/' + TAGS = [story_tags.EMERGING_MARKET] _SEARCH_BOX_SELECTOR = 'input[aria-label="Search"]' _RESULT_SELECTOR = '.r > a[href*="wikipedia"]' @@ -33,3 +39,66 @@ action_runner.Wait(1) action_runner.TapElement(selector=self._RESULT_SELECTOR) action_runner.tab.WaitForDocumentReadyStateToBeComplete() + + +class SearchOmniboxStory(system_health_story.SystemHealthStory): + """Story that peforms search by using omnibox search provider + + Loads a website and enters a search query on omnibox and navigates to default + search provider (google). + """ + NAME = 'browse:chrome:omnibox' + URL = 'https://www.google.co.in' + SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY + TAGS = [story_tags.EMERGING_MARKET] + + def _DidLoadDocument(self, action_runner): + app_ui = action_runner.tab.browser.GetAppUi() + platform = action_runner.tab.browser.platform + app_ui.WaitForUiNode(resource_id='url_bar') + url_bar = app_ui.GetUiNode(resource_id='url_bar') + url_bar.Tap() + action_runner.Wait(1) # user wait before typing + platform.android_action_runner.InputText('drake') + action_runner.Wait(0.5) # user wait after typing + platform.android_action_runner.InputKeyEvent(keyevent.KEYCODE_ENTER) + + action_runner.WaitForNavigate() + action_runner.ScrollPage(use_touch=True, distance=500) + + +class MobileNewTabPageStory(system_health_story.SystemHealthStory): + """Story that loads new tab page and performs searches. + + For each of the search queries in |_SEARCH_TEXTS| below, this story does: + - enter the search query on the new tab page search box + - read results + - navigates back to new tab page + """ + + NAME = 'browse:chrome:newtab' + URL = 'chrome://newtab' + _SEARCH_TEXTS = ['does google know everything', + 'most famous paintings', + 'current weather', + 'best movies 2016', + 'how to tie a tie'] + + SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY + TAGS = [story_tags.EMERGING_MARKET] + + def _DidLoadDocument(self, action_runner): + app_ui = action_runner.tab.browser.GetAppUi() + platform = action_runner.tab.browser.platform + for keyword in self._SEARCH_TEXTS: + app_ui.WaitForUiNode(resource_id='search_box').Tap() + platform.android_action_runner.InputText(keyword) + platform.android_action_runner.InputKeyEvent(keyevent.KEYCODE_ENTER) + action_runner.WaitForNavigate() + action_runner.Wait(1.5) # Read results + action_runner.ScrollPage(use_touch=True) + action_runner.NavigateBack() + action_runner.WaitForNavigate() + + app_ui.WaitForUiNode(resource_id='menu_button').Tap() + app_ui.WaitForUiNode(resource_id='menu_item_text')
diff --git a/tools/perf/page_sets/system_health/story_tags.py b/tools/perf/page_sets/system_health/story_tags.py index 1c345f5..4458165 100644 --- a/tools/perf/page_sets/system_health/story_tags.py +++ b/tools/perf/page_sets/system_health/story_tags.py
@@ -12,12 +12,12 @@ # A story can have multiple tags. All the tags should be noun. AUDIO_PLAYBACK = Tag( - 'audio-playback', 'Story has audio playing.') + 'audio_playback', 'Story has audio playing.') CANVAS_ANIMATION = Tag( - 'canvas-animation', 'Story has animations that are implemented using ' + 'canvas_animation', 'Story has animations that are implemented using ' 'html5 canvas.') CSS_ANIMATION = Tag( - 'css-animation', 'Story has animations that are implemented using CSS.') + 'css_animation', 'Story has animations that are implemented using CSS.') EXTENSION = Tag( 'extension', 'Story has browser with extension installed.') IMAGES = Tag( @@ -25,23 +25,26 @@ INTERNATIONAL = Tag( 'international', 'Story has navigations to websites with content in non ' 'English languages.') +EMERGING_MARKET = Tag( + 'emerging_market', 'Story has significant usage in emerging markets with ' + 'low-end mobile devices and slow network connections.') JAVASCRIPT_HEAVY = Tag( - 'javascript-heavy', 'Story has navigations to websites with heavy usages ' + 'javascript_heavy', 'Story has navigations to websites with heavy usages ' 'of JavaScript. The story uses 20Mb+ memory for javascript and local ' 'run with "v8" category enabled also shows the trace has js slices across ' 'the whole run.') SCROLL = Tag( 'scroll', 'Story has scroll gestures & scroll animation.') PINCH_ZOOM = Tag( - 'pinch-zoom', 'Story has pinch zoom gestures & pinch zoom animation.') + 'pinch_zoom', 'Story has pinch zoom gestures & pinch zoom animation.') TABS_SWITCHING = Tag( - 'tabs-switching', 'Story has multi tabs and tabs switching action.') + 'tabs_switching', 'Story has multi tabs and tabs switching action.') VIDEO_PLAYBACK = Tag( - 'video-playback', 'Story has video playing.') + 'video_playback', 'Story has video playing.') WEBGL = Tag( 'webgl', 'Story has sites with heavy uses of WebGL.') WEB_STORAGE = Tag( - 'web-storage', 'Story has sites with heavy uses of Web storage.') + 'web_storage', 'Story has sites with heavy uses of Web storage.') def _ExtractAllTags():
diff --git a/tools/perf/page_sets/system_health/system_health_story.py b/tools/perf/page_sets/system_health/system_health_story.py index 5ae3fe1b..aea6f800 100644 --- a/tools/perf/page_sets/system_health/system_health_story.py +++ b/tools/perf/page_sets/system_health/system_health_story.py
@@ -39,6 +39,8 @@ """ def CanRunStory(self, story): + if self._finder_options.run_disabled_tests: + return True return story.CanRun(self.possible_browser)
diff --git a/tools/perf/page_sets/tough_energy_cases.py b/tools/perf/page_sets/tough_energy_cases.py deleted file mode 100644 index 215435c..0000000 --- a/tools/perf/page_sets/tough_energy_cases.py +++ /dev/null
@@ -1,129 +0,0 @@ -# Copyright 2014 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. -from telemetry.page import page as page_module -from telemetry import story - - -class ToughEnergyCasesPage(page_module.Page): - - def __init__(self, url, page_set): - super(ToughEnergyCasesPage, self).__init__( - url=url, page_set=page_set, credentials_path = 'data/credentials.json') - -class CodePenPage(ToughEnergyCasesPage): - - def __init__(self, url, page_set): - super(CodePenPage, self).__init__(url, page_set) - self.credentials = 'codepen' - - -class GooglePage(ToughEnergyCasesPage): - - def __init__(self, url, page_set): - super(GooglePage, self).__init__( - url=url, - page_set=page_set) - self.credentials = 'google2' - - def RunNavigateSteps(self, action_runner): - super(GooglePage, self).RunNavigateSteps(action_runner) - action_runner.WaitForJavaScriptCondition( - 'window.gmonkey !== undefined &&' - 'document.getElementById("gb") !== null') - - -class ToughEnergyCasesPageSet(story.StorySet): - """Pages for measuring Chrome power draw.""" - - def __init__(self): - super(ToughEnergyCasesPageSet, self).__init__( - archive_data_file='data/tough_energy_cases.json', - cloud_storage_bucket=story.PARTNER_BUCKET) - - # TODO: this part of the test is disabled because it fails when - # run with replay data and not with live data. See crbug.com/465692 - # for complete details. - # Why: productivity, top google properties - #self.AddStory(GooglePage('https://mail.google.com/mail/', self)) - - # Disabled: pegs CPU too much to get meaningful results. - # Why: Image constantly changed in the background, above the fold - # self.AddStory(CodePenPage( - # 'http://codepen.io/testificate364/debug/eIutG', self)) - - # Disabled: pegs CPU too much to get meaningful results. - # Why: Image constantly changed in the background, below the fold - # self.AddStory(CodePenPage( - # 'http://codepen.io/testificate364/debug/zcDdv', self)) - - # Why: CSS Animation, above the fold - self.AddStory(CodePenPage( - 'http://codepen.io/testificate364/debug/nrbDc', self)) - - # Why: CSS Animation, below the fold - self.AddStory(CodePenPage( - 'http://codepen.io/testificate364/debug/fhKCg', self)) - - # Why: requestAnimationFrame, above the fold - self.AddStory(CodePenPage( - 'http://codepen.io/testificate364/debug/paJhg',self)) - - # Why: requestAnimationFrame, below the fold - self.AddStory(CodePenPage( - 'http://codepen.io/testificate364/debug/yaosK', self)) - - # Why: setTimeout animation, above the fold - self.AddStory(CodePenPage( - 'http://codepen.io/testificate364/debug/DLbxg', self)) - - # Why: setTimeout animation, below the fold - self.AddStory(CodePenPage( - 'http://codepen.io/testificate364/debug/kFvpd', self)) - - # Why: setInterval animation, above the fold - self.AddStory(CodePenPage( - 'http://codepen.io/testificate364/debug/lEhyw', self)) - - # Why: setInterval animation, below the fold - self.AddStory(CodePenPage( - 'http://codepen.io/testificate364/debug/zhgBD', self)) - - # Why: Animated GIF, above the fold - self.AddStory(CodePenPage( - 'http://codepen.io/testificate364/debug/jetyn', self)) - - # Why: Animated GIF, below the fold - self.AddStory(CodePenPage( - 'http://codepen.io/testificate364/debug/Kvdxs', self)) - - # Why: HTML5 video, above the fold - self.AddStory(CodePenPage( - 'http://codepen.io/testificate364/debug/lJAiH', self)) - - # Why: HTML5 video, below the fold - self.AddStory(CodePenPage( - 'http://codepen.io/testificate364/debug/EFceH', self)) - - # Disabled: pegs CPU too much to get meaningful results. - # Why: PostMessage between frames, above the fold - # self.AddStory(CodePenPage( - # 'http://codepen.io/testificate364/debug/pgBHu', self)) - - # Disabled: pegs CPU too much to get meaningful results. - # Why: Asynchronous XHR continually running - # self.AddStory(CodePenPage( - # 'http://codepen.io/testificate364/debug/iwAfJ', self)) - - # Disabled: pegs CPU too much to get meaningful results. - # Why: Web Worker continually running - # self.AddStory(CodePenPage( - # 'http://codepen.io/testificate364/debug/ckItK', self)) - - # Why: flash video - self.AddStory(CodePenPage( - 'http://codepen.io/testificate364/debug/slBue', self)) - - # Why: Blank page in the foreground - self.AddStory(CodePenPage( - 'http://codepen.io/testificate364/debug/HdIgr', self))
diff --git a/tools/perf/page_sets/tough_energy_cases/Biang-order.gif b/tools/perf/page_sets/tough_energy_cases/Biang-order.gif deleted file mode 100644 index c0495b1..0000000 --- a/tools/perf/page_sets/tough_energy_cases/Biang-order.gif +++ /dev/null Binary files differ
diff --git a/tools/perf/page_sets/tough_energy_cases/above-fold-animated-gif.html b/tools/perf/page_sets/tough_energy_cases/above-fold-animated-gif.html deleted file mode 100644 index 24c47a9..0000000 --- a/tools/perf/page_sets/tough_energy_cases/above-fold-animated-gif.html +++ /dev/null
@@ -1,9 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -</head> -<body> - <!-- File from http://commons.wikimedia.org/wiki/File:Bi%C3%A1ng-order.gif --> - <img src="Biang-order.gif"> -</body> -</html>
diff --git a/tools/perf/page_sets/tough_energy_cases/below-fold-animated-gif.html b/tools/perf/page_sets/tough_energy_cases/below-fold-animated-gif.html deleted file mode 100644 index 6c4abb8..0000000 --- a/tools/perf/page_sets/tough_energy_cases/below-fold-animated-gif.html +++ /dev/null
@@ -1,11 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -</head> -<body> - <div style="height:5000px"> - </div> - <!-- File from http://commons.wikimedia.org/wiki/File:Bi%C3%A1ng-order.gif --> - <img src="Biang-order.gif"> -</body> -</html>
diff --git a/tools/perf/page_sets/tough_energy_cases/below-fold-flash.html b/tools/perf/page_sets/tough_energy_cases/below-fold-flash.html deleted file mode 100644 index 0712f0e..0000000 --- a/tools/perf/page_sets/tough_energy_cases/below-fold-flash.html +++ /dev/null
@@ -1,22 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -</head> -<body> - <div style="height:5000px"> - </div> - <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="550" height="400" id="test" align="middle"> - <param name="movie" value="test.swf"/> - <!--[if !IE]>--> - <object type="application/x-shockwave-flash" data="test.swf" width="550" height="400"> - <param name="movie" value="test.swf"/> - <!--<![endif]--> - <a href="http://www.adobe.com/go/getflash"> - <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player"/> - </a> - <!--[if !IE]>--> - </object> - <!--<![endif]--> - </object> -</body> -</html>
diff --git a/tools/perf/page_sets/tough_energy_cases/test.swf b/tools/perf/page_sets/tough_energy_cases/test.swf deleted file mode 100644 index 89529827..0000000 --- a/tools/perf/page_sets/tough_energy_cases/test.swf +++ /dev/null Binary files differ
diff --git a/tools/perf/page_sets/tough_image_cases.py b/tools/perf/page_sets/tough_image_cases.py deleted file mode 100644 index 256b90e9..0000000 --- a/tools/perf/page_sets/tough_image_cases.py +++ /dev/null
@@ -1,32 +0,0 @@ -# Copyright 2014 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. -from telemetry.page import page as page_module -from telemetry.page import shared_page_state -from telemetry import story - - -class ToughImageCasesPage(page_module.Page): - - def __init__(self, url, page_set): - super(ToughImageCasesPage, self).__init__( - url=url, page_set=page_set, - shared_page_state_class=shared_page_state.SharedDesktopPageState) - - -class ToughImageCasesPageSet(story.StorySet): - - """ A collection of image-heavy sites. """ - - def __init__(self): - super(ToughImageCasesPageSet, self).__init__() - - urls_list = [ - 'http://www.free-pictures-photos.com/aviation/airplane-306.jpg', - ('http://upload.wikimedia.org/wikipedia/commons/c/cb/' - 'General_history%2C_Alaska_Yukon_Pacific_Exposition%' - '2C_fully_illustrated_-_meet_me_in_Seattle_1909_-_Page_78.jpg') - ] - - for url in urls_list: - self.AddStory(ToughImageCasesPage(url, self))
diff --git a/tools/perf/page_sets/tough_video_cases.py b/tools/perf/page_sets/tough_video_cases.py index b163e27a..6ff629b15 100644 --- a/tools/perf/page_sets/tough_video_cases.py +++ b/tools/perf/page_sets/tough_video_cases.py
@@ -4,33 +4,49 @@ from telemetry.page import page as page_module from telemetry import story +_PAGE_TAGS_LIST = [ + # Audio codecs: + 'pcm', + 'mp3', + 'aac', + 'vorbis', + 'opus', + # Video codecs: + 'theora', + 'h264', + 'vp8', + 'vp9', + # Test types: + 'audio_video', + 'audio_only', + 'video_only', + # Other filter tags: + 'is_50fps', + 'is_4k', +] + class ToughVideoCasesPage(page_module.Page): - def __init__(self, url, page_set, tags=None): + def __init__(self, url, page_set, tags): + if tags: + for t in tags: + assert t in _PAGE_TAGS_LIST super(ToughVideoCasesPage, self).__init__( url=url, page_set=page_set, tags=tags) - def LoopMixedAudio(self, action_runner): - action_runner.PlayMedia(selector='#background_audio', - playing_event_timeout_in_seconds=60) - action_runner.LoopMedia(loop_count=50, selector='#mixed_audio') - - def LoopSingleAudio(self, action_runner): - action_runner.LoopMedia(loop_count=50, selector='#single_audio') - def PlayAction(self, action_runner): + # Play the media until it has finished or it times out. action_runner.PlayMedia(playing_event_timeout_in_seconds=60, ended_event_timeout_in_seconds=60) def SeekBeforeAndAfterPlayhead(self, action_runner, action_timeout_in_seconds=60): timeout = action_timeout_in_seconds - # Because an ended timeout is passed, this won't return until the media has - # played through. - action_runner.PlayMedia(playing_event_timeout_in_seconds=timeout, - ended_event_timeout_in_seconds=timeout) - # Wait 1 second for no reason in particular. + # Start the media playback. + action_runner.PlayMedia( + playing_event_timeout_in_seconds=timeout) + # Wait for 1 second so that we know the play-head is at ~1s. action_runner.Wait(1) # Seek to before the play-head location. action_runner.SeekMedia(seconds=0.5, timeout_in_seconds=timeout, @@ -45,7 +61,8 @@ def __init__(self, page_set): super(Page1, self).__init__( url='file://tough_video_cases/video.html?src=crowd.wav&type=audio', - page_set=page_set) + page_set=page_set, + tags=['pcm', 'audio_only']) self.add_browser_metrics = True @@ -58,7 +75,8 @@ def __init__(self, page_set): super(Page2, self).__init__( url='file://tough_video_cases/video.html?src=crowd.ogg&type=audio', - page_set=page_set) + page_set=page_set, + tags=['vorbis', 'audio_only']) self.add_browser_metrics = True @@ -68,13 +86,16 @@ class Page3(ToughVideoCasesPage): + # Note that ffprobe reports about this file: + # "[ogg @ 0x31a3ba0] Broken file, keyframe not correctly marked." + # This media file should probably be removed or replaced. def __init__(self, page_set): super(Page3, self).__init__( url='file://tough_video_cases/video.html?src=crowd1080.ogv', - page_set=page_set) + page_set=page_set, + tags=['is_50fps', 'theora', 'vorbis', 'audio_video']) self.add_browser_metrics = True - self.is_50fps = True def RunPageInteractions(self, action_runner): self.PlayAction(action_runner) @@ -85,7 +106,8 @@ def __init__(self, page_set): super(Page4, self).__init__( url='file://tough_video_cases/video.html?src=crowd1080.webm', - page_set=page_set, tags=['is_50fps']) + page_set=page_set, + tags=['is_50fps', 'vp8', 'vorbis', 'audio_video']) self.add_browser_metrics = True @@ -98,7 +120,8 @@ def __init__(self, page_set): super(Page5, self).__init__( url='file://tough_video_cases/video.html?src=crowd2160.ogv', - page_set=page_set, tags=['is_4k', 'is_50fps']) + page_set=page_set, + tags=['is_4k', 'is_50fps', 'theora', 'vorbis', 'audio_video']) self.add_browser_metrics = True @@ -111,7 +134,8 @@ def __init__(self, page_set): super(Page6, self).__init__( url='file://tough_video_cases/video.html?src=crowd2160.webm', - page_set=page_set, tags=['is_4k', 'is_50fps']) + page_set=page_set, + tags=['is_4k', 'is_50fps', 'vp8', 'vorbis', 'audio_video']) self.add_browser_metrics = True @@ -124,7 +148,8 @@ def __init__(self, page_set): super(Page7, self).__init__( url='file://tough_video_cases/video.html?src=tulip2.ogg&type=audio', - page_set=page_set) + page_set=page_set, + tags=['vorbis', 'audio_only']) self.add_browser_metrics = True @@ -137,7 +162,8 @@ def __init__(self, page_set): super(Page8, self).__init__( url='file://tough_video_cases/video.html?src=tulip2.wav&type=audio', - page_set=page_set) + page_set=page_set, + tags=['pcm', 'audio_only']) self.add_browser_metrics = True @@ -150,7 +176,8 @@ def __init__(self, page_set): super(Page9, self).__init__( url='file://tough_video_cases/video.html?src=tulip2.ogv', - page_set=page_set) + page_set=page_set, + tags=['theora', 'vorbis', 'audio_video']) self.add_browser_metrics = True @@ -163,7 +190,8 @@ def __init__(self, page_set): super(Page10, self).__init__( url='file://tough_video_cases/video.html?src=tulip2.webm', - page_set=page_set) + page_set=page_set, + tags=['vp8', 'vorbis', 'audio_video']) self.add_browser_metrics = True @@ -176,7 +204,8 @@ def __init__(self, page_set): super(Page11, self).__init__( url='file://tough_video_cases/video.html?src=crowd1080.mp4', - page_set=page_set, tags=['is_50fps']) + page_set=page_set, + tags=['is_50fps', 'h264', 'aac', 'audio_video']) self.add_browser_metrics = True @@ -189,7 +218,8 @@ def __init__(self, page_set): super(Page12, self).__init__( url='file://tough_video_cases/video.html?src=crowd2160.mp4', - page_set=page_set, tags=['is_4k', 'is_50fps']) + page_set=page_set, + tags=['is_4k', 'is_50fps', 'h264', 'aac', 'audio_video']) self.add_browser_metrics = True @@ -202,7 +232,8 @@ def __init__(self, page_set): super(Page13, self).__init__( url='file://tough_video_cases/video.html?src=tulip2.mp3&type=audio', - page_set=page_set) + page_set=page_set, + tags=['mp3', 'audio_only']) self.add_browser_metrics = True @@ -215,7 +246,8 @@ def __init__(self, page_set): super(Page14, self).__init__( url='file://tough_video_cases/video.html?src=tulip2.mp4', - page_set=page_set) + page_set=page_set, + tags=['h264', 'aac', 'audio_video']) self.add_browser_metrics = True @@ -228,7 +260,8 @@ def __init__(self, page_set): super(Page15, self).__init__( url='file://tough_video_cases/video.html?src=tulip2.m4a&type=audio', - page_set=page_set) + page_set=page_set, + tags=['aac', 'audio_only']) self.add_browser_metrics = True @@ -241,7 +274,8 @@ def __init__(self, page_set): super(Page16, self).__init__( url='file://tough_video_cases/video.html?src=garden2_10s.webm', - page_set=page_set, tags=['is_4k']) + page_set=page_set, + tags=['is_4k', 'vp8', 'vorbis', 'audio_video']) self.add_browser_metrics = True @@ -254,7 +288,8 @@ def __init__(self, page_set): super(Page17, self).__init__( url='file://tough_video_cases/video.html?src=garden2_10s.mp4', - page_set=page_set, tags=['is_4k']) + page_set=page_set, + tags=['is_4k', 'h264', 'aac', 'audio_video']) self.add_browser_metrics = True @@ -267,7 +302,8 @@ def __init__(self, page_set): super(Page18, self).__init__( url='file://tough_video_cases/video.html?src=garden2_10s.ogv', - page_set=page_set, tags=['is_4k']) + page_set=page_set, + tags=['is_4k', 'theora', 'vorbis', 'audio_video']) self.add_browser_metrics = True @@ -280,7 +316,8 @@ def __init__(self, page_set): super(Page19, self).__init__( url='file://tough_video_cases/video.html?src=tulip2.ogg&type=audio', - page_set=page_set) + page_set=page_set, + tags=['vorbis', 'audio_only']) self.skip_basic_metrics = True @@ -293,7 +330,8 @@ def __init__(self, page_set): super(Page20, self).__init__( url='file://tough_video_cases/video.html?src=tulip2.wav&type=audio', - page_set=page_set) + page_set=page_set, + tags=['pcm', 'audio_only']) self.skip_basic_metrics = True @@ -303,10 +341,14 @@ class Page21(ToughVideoCasesPage): + # Note that ffprobe reports about this file: + # "[ogg @ 0x39adba0] Broken file, keyframe not correctly marked." + # This media file should probably be removed or replaced. def __init__(self, page_set): super(Page21, self).__init__( url='file://tough_video_cases/video.html?src=tulip2.ogv', - page_set=page_set) + page_set=page_set, + tags=['theora', 'vorbis', 'audio_video']) self.skip_basic_metrics = True @@ -319,7 +361,8 @@ def __init__(self, page_set): super(Page22, self).__init__( url='file://tough_video_cases/video.html?src=tulip2.webm', - page_set=page_set) + page_set=page_set, + tags=['vp8', 'vorbis', 'audio_video']) self.skip_basic_metrics = True @@ -332,7 +375,8 @@ def __init__(self, page_set): super(Page23, self).__init__( url='file://tough_video_cases/video.html?src=tulip2.mp3&type=audio', - page_set=page_set) + page_set=page_set, + tags=['mp3', 'audio_only']) self.skip_basic_metrics = True @@ -345,7 +389,8 @@ def __init__(self, page_set): super(Page24, self).__init__( url='file://tough_video_cases/video.html?src=tulip2.mp4', - page_set=page_set) + page_set=page_set, + tags=['h264', 'aac', 'audio_video']) self.skip_basic_metrics = True @@ -358,7 +403,8 @@ def __init__(self, page_set): super(Page25, self).__init__( url='file://tough_video_cases/video.html?src=garden2_10s.webm', - page_set=page_set, tags=['is_4k']) + page_set=page_set, + tags=['is_4k', 'vp8', 'vorbis', 'audio_video']) self.skip_basic_metrics = True @@ -371,7 +417,8 @@ def __init__(self, page_set): super(Page26, self).__init__( url='file://tough_video_cases/video.html?src=garden2_10s.mp4', - page_set=page_set, tags=['is_4k']) + page_set=page_set, + tags=['is_4k', 'h264', 'aac', 'audio_video']) self.skip_basic_metrics = True @@ -384,7 +431,8 @@ def __init__(self, page_set): super(Page27, self).__init__( url='file://tough_video_cases/video.html?src=garden2_10s.ogv', - page_set=page_set, tags=['is_4k']) + page_set=page_set, + tags=['is_4k', 'theora', 'vorbis', 'audio_video']) self.skip_basic_metrics = True @@ -392,37 +440,13 @@ self.SeekBeforeAndAfterPlayhead(action_runner) -class Page28(ToughVideoCasesPage): - - def __init__(self, page_set): - super(Page28, self).__init__( - url='file://tough_video_cases/audio_playback.html?id=single_audio', - page_set=page_set) - - self.skip_basic_metrics = True - - def RunPageInteractions(self, action_runner): - self.LoopSingleAudio(action_runner) - - -class Page29(ToughVideoCasesPage): - - def __init__(self, page_set): - super(Page29, self).__init__( - url='file://tough_video_cases/audio_playback.html?id=mixed_audio', - page_set=page_set) - - self.skip_basic_metrics = True - - def RunPageInteractions(self, action_runner): - self.LoopMixedAudio(action_runner) - class Page30(ToughVideoCasesPage): def __init__(self, page_set): super(Page30, self).__init__( url='file://tough_video_cases/video.html?src=tulip2.vp9.webm', - page_set=page_set) + page_set=page_set, + tags=['vp9', 'opus', 'audio_video']) self.add_browser_metrics = True @@ -434,7 +458,8 @@ def __init__(self, page_set): super(Page31, self).__init__( url='file://tough_video_cases/video.html?src=tulip2.vp9.webm', - page_set=page_set) + page_set=page_set, + tags=['vp9', 'opus', 'audio_video']) self.skip_basic_metrics = True @@ -446,7 +471,8 @@ def __init__(self, page_set): super(Page32, self).__init__( url='file://tough_video_cases/video.html?src=crowd1080_vp9.webm', - page_set=page_set) + page_set=page_set, + tags=['vp9', 'video_only']) self.add_browser_metrics = True @@ -458,7 +484,8 @@ def __init__(self, page_set): super(Page33, self).__init__( url='file://tough_video_cases/video.html?src=crowd1080_vp9.webm', - page_set=page_set) + page_set=page_set, + tags=['vp9', 'video_only']) self.skip_basic_metrics = True @@ -470,7 +497,8 @@ def __init__(self, page_set): super(Page34, self).__init__( url='file://tough_video_cases/video.html?src=crowd720_vp9.webm', - page_set=page_set) + page_set=page_set, + tags=['vp9', 'video_only']) self.add_browser_metrics = True @@ -482,7 +510,8 @@ def __init__(self, page_set): super(Page35, self).__init__( url='file://tough_video_cases/video.html?src=crowd720_vp9.webm', - page_set=page_set) + page_set=page_set, + tags=['vp9', 'video_only']) self.skip_basic_metrics = True @@ -495,7 +524,8 @@ super(Page36, self).__init__( url=('file://tough_video_cases/video.html?src=' 'smpte_3840x2160_60fps_vp9.webm'), - page_set=page_set) + page_set=page_set, + tags=['is_4k', 'vp9', 'video_only']) self.add_browser_metrics = True @@ -507,8 +537,10 @@ def __init__(self, page_set): super(Page37, self).__init__( - url='file://tough_video_cases/video.html?src=crowd1080_vp9.webm&canvas=true', - page_set=page_set) + url=('file://tough_video_cases/video.html?src=crowd1080_vp9.webm&canvas=' + 'true'), + page_set=page_set, + tags=['vp9', 'video_only']) self.add_browser_metrics = True @@ -520,7 +552,8 @@ def __init__(self, page_set): super(Page38, self).__init__( url='file://tough_video_cases/video.html?src=tulip2.mp4&canvas=true', - page_set=page_set) + page_set=page_set, + tags=['h264', 'aac', 'audio_video']) self.add_browser_metrics = True @@ -531,8 +564,10 @@ def __init__(self, page_set): super(Page39, self).__init__( - url='file://tough_video_cases/video.html?src=garden2_10s.webm&canvas=true', - page_set=page_set, tags=['is_4k']) + url=('file://tough_video_cases/video.html?src=garden2_10s.webm&canvas=' + 'true'), + page_set=page_set, + tags=['is_4k', 'vp8', 'vorbis', 'audio_video']) self.add_browser_metrics = True @@ -541,24 +576,32 @@ class Page40(ToughVideoCasesPage): + # Note that ffprobe reports about this file: + # "[ogg @ 0x31a3ba0] Broken file, keyframe not correctly marked." + # This media file should probably be removed or replaced. def __init__(self, page_set): super(Page40, self).__init__( url='file://tough_video_cases/video.html?src=crowd1080.ogv&canvas=true', - page_set=page_set) + page_set=page_set, + tags=['is_50fps', 'theora', 'vorbis', 'audio_video']) self.add_browser_metrics = True - self.is_50fps = True def RunPageInteractions(self, action_runner): self.PlayAction(action_runner) class ToughVideoCasesPageSet(story.StorySet): """ - Description: Video Stack Perf benchmark that report time_to_play. + Description: Video Stack Perf pages that report time_to_play and many other + media-specific and generic metrics. """ def __init__(self): super(ToughVideoCasesPageSet, self).__init__( cloud_storage_bucket=story.PARTNER_BUCKET) + # TODO(crouleau): Pages 36 and 38 are in ToughVideoCasesPageSet even though + # they both report seek time instead of time_to_play. + # This may be a non-issue because we plan to merge these two page sets back + # together and use tags to allow teams to filter which pages they want. self.AddStory(Page1(self)) self.AddStory(Page2(self)) @@ -590,7 +633,7 @@ class ToughVideoCasesExtraPageSet(story.StorySet): """ - Description: Video Stack Perf benchmark that don't report time_to_play. + Description: Video Stack Perf pages that only report seek time. """ def __init__(self): super(ToughVideoCasesExtraPageSet, self).__init__( @@ -605,8 +648,6 @@ self.AddStory(Page25(self)) self.AddStory(Page26(self)) self.AddStory(Page27(self)) - self.AddStory(Page28(self)) - self.AddStory(Page29(self)) self.AddStory(Page31(self)) self.AddStory(Page33(self)) self.AddStory(Page35(self))
diff --git a/tools/perf/page_sets/tough_video_cases/audio_playback.html b/tools/perf/page_sets/tough_video_cases/audio_playback.html deleted file mode 100644 index c5ccbc8..0000000 --- a/tools/perf/page_sets/tough_video_cases/audio_playback.html +++ /dev/null
@@ -1,23 +0,0 @@ -<!DOCTYPE html> -<html> - <body> - <script> - function addAudio(id, file) { - var audio = document.createElement('audio'); - audio.src = file; - audio.loop = true; - audio.id = id; - document.body.appendChild(audio); - } - - function getIDFromURL() { - var query = window.location.search; - return query.substring(query.lastIndexOf("id=") + 3); - } - - addAudio('background_audio', 'pink_noise_20s.wav'); - // Main audio file is identified by an ID passed in the page-set. - addAudio(getIDFromURL(), 'pink_noise_140ms.wav'); - </script> - </body> -</html> \ No newline at end of file
diff --git a/tools/perf/page_sets/tough_video_cases/pink_noise_140ms.wav.sha1 b/tools/perf/page_sets/tough_video_cases/pink_noise_140ms.wav.sha1 deleted file mode 100644 index 839f387..0000000 --- a/tools/perf/page_sets/tough_video_cases/pink_noise_140ms.wav.sha1 +++ /dev/null
@@ -1 +0,0 @@ -16c54ce40621b7d4410554206529759607c16d70 \ No newline at end of file
diff --git a/tools/perf/page_sets/tough_video_cases/pink_noise_20s.wav.sha1 b/tools/perf/page_sets/tough_video_cases/pink_noise_20s.wav.sha1 deleted file mode 100644 index 0f9a50b1..0000000 --- a/tools/perf/page_sets/tough_video_cases/pink_noise_20s.wav.sha1 +++ /dev/null
@@ -1 +0,0 @@ -2f6874496d8dd0a7e13e60542c7143a245fea8ef \ No newline at end of file
diff --git a/tools/perf/page_sets/trivial_sites.py b/tools/perf/page_sets/trivial_sites.py index f67e3c5..ae951d7 100644 --- a/tools/perf/page_sets/trivial_sites.py +++ b/tools/perf/page_sets/trivial_sites.py
@@ -9,80 +9,96 @@ class _BasePage(page_module.Page): def __init__( - self, page_set, shared_page_state_class, url, name, wait_in_seconds): + self, page_set, shared_page_state_class, url, name, wait_in_seconds, + measure_memory): super(_BasePage, self).__init__( - url=url, page_set=page_set, name=name, - shared_page_state_class=shared_page_state_class) + url=url, page_set=page_set, name=name, + shared_page_state_class=shared_page_state_class) self._wait_in_seconds = wait_in_seconds + self.measure_memory = measure_memory def RunPageInteractions(self, action_runner): action_runner.Wait(self._wait_in_seconds) + if self.measure_memory: + action_runner.MeasureMemory(deterministic_mode=True) class TrivialScrollingPage(_BasePage): - def __init__(self, page_set, shared_page_state_class, wait_in_seconds): + def __init__(self, page_set, shared_page_state_class, wait_in_seconds, + measure_memory): super(TrivialScrollingPage, self).__init__( url='file://trivial_sites/trivial_scrolling_page.html', page_set=page_set, name=self.__class__.__name__ + shared_page_state_class.__name__, shared_page_state_class=shared_page_state_class, - wait_in_seconds=wait_in_seconds) + wait_in_seconds=wait_in_seconds, + measure_memory=measure_memory) class TrivialBlinkingCursorPage(_BasePage): - def __init__(self, page_set, shared_page_state_class, wait_in_seconds): + def __init__(self, page_set, shared_page_state_class, wait_in_seconds, + measure_memory): super(TrivialBlinkingCursorPage, self).__init__( url='file://trivial_sites/trivial_blinking_cursor.html', page_set=page_set, name=self.__class__.__name__ + shared_page_state_class.__name__, shared_page_state_class=shared_page_state_class, - wait_in_seconds=wait_in_seconds) + wait_in_seconds=wait_in_seconds, + measure_memory=measure_memory) class TrivialCanvasPage(_BasePage): - def __init__(self, page_set, shared_page_state_class, wait_in_seconds): + def __init__(self, page_set, shared_page_state_class, wait_in_seconds, + measure_memory): super(TrivialCanvasPage, self).__init__( url='file://trivial_sites/trivial_canvas.html', page_set=page_set, name=self.__class__.__name__ + shared_page_state_class.__name__, shared_page_state_class=shared_page_state_class, - wait_in_seconds=wait_in_seconds) + wait_in_seconds=wait_in_seconds, + measure_memory=measure_memory) class TrivialWebGLPage(_BasePage): - def __init__(self, page_set, shared_page_state_class, wait_in_seconds): + def __init__(self, page_set, shared_page_state_class, wait_in_seconds, + measure_memory): super(TrivialWebGLPage, self).__init__( url='file://trivial_sites/trivial_webgl.html', page_set=page_set, name=self.__class__.__name__ + shared_page_state_class.__name__, shared_page_state_class=shared_page_state_class, - wait_in_seconds=wait_in_seconds) + wait_in_seconds=wait_in_seconds, + measure_memory=measure_memory) class TrivialBlurAnimationPage(_BasePage): - def __init__(self, page_set, shared_page_state_class, wait_in_seconds): + def __init__(self, page_set, shared_page_state_class, wait_in_seconds, + measure_memory): super(TrivialBlurAnimationPage, self).__init__( url='file://trivial_sites/trivial_blur_animation.html', page_set=page_set, name=self.__class__.__name__ + shared_page_state_class.__name__, shared_page_state_class=shared_page_state_class, - wait_in_seconds=wait_in_seconds) + wait_in_seconds=wait_in_seconds, + measure_memory=measure_memory) class TrivialFullscreenVideoPage(_BasePage): - def __init__(self, page_set, shared_page_state_class, wait_in_seconds): + def __init__(self, page_set, shared_page_state_class, wait_in_seconds, + measure_memory): super(TrivialFullscreenVideoPage, self).__init__( url='file://trivial_sites/trivial_fullscreen_video.html', page_set=page_set, name=self.__class__.__name__ + shared_page_state_class.__name__, shared_page_state_class=shared_page_state_class, - wait_in_seconds=wait_in_seconds) + wait_in_seconds=wait_in_seconds, + measure_memory=measure_memory) def RunPageInteractions(self, action_runner): action_runner.PressKey("Return") @@ -91,32 +107,49 @@ class TrivialGifPage(_BasePage): - def __init__(self, page_set, shared_page_state_class, wait_in_seconds): + def __init__(self, page_set, shared_page_state_class, wait_in_seconds, + measure_memory): super(TrivialGifPage, self).__init__( url='file://trivial_sites/trivial_gif.html', page_set=page_set, name=self.__class__.__name__ + shared_page_state_class.__name__, shared_page_state_class=shared_page_state_class, - wait_in_seconds=wait_in_seconds) + wait_in_seconds=wait_in_seconds, + measure_memory=measure_memory) + + +class TrivialAnimationPage(_BasePage): + + def __init__(self, page_set, shared_page_state_class, wait_in_seconds, + measure_memory): + super(TrivialAnimationPage, self).__init__( + url='file://trivial_sites/trivial_animation.html', + page_set=page_set, + name=self.__class__.__name__ + shared_page_state_class.__name__, + shared_page_state_class=shared_page_state_class, + wait_in_seconds=wait_in_seconds, + measure_memory=measure_memory) class TrivialSitesStorySet(story.StorySet): def __init__(self, shared_state = shared_page_state.SharedPageState, - wait_in_seconds=0): + wait_in_seconds=0, measure_memory=False): # Wait is time to wait_in_seconds on page in seconds. super(TrivialSitesStorySet, self).__init__( cloud_storage_bucket=story.PUBLIC_BUCKET) self.AddStory(TrivialScrollingPage( - self, shared_state, wait_in_seconds)) + self, shared_state, wait_in_seconds, measure_memory)) self.AddStory(TrivialBlinkingCursorPage( - self, shared_state, wait_in_seconds)) + self, shared_state, wait_in_seconds, measure_memory)) self.AddStory(TrivialCanvasPage( - self, shared_state, wait_in_seconds)) + self, shared_state, wait_in_seconds, measure_memory)) self.AddStory(TrivialWebGLPage( - self, shared_state, wait_in_seconds)) + self, shared_state, wait_in_seconds, measure_memory)) self.AddStory(TrivialBlurAnimationPage( - self, shared_state, wait_in_seconds)) + self, shared_state, wait_in_seconds, measure_memory)) self.AddStory(TrivialFullscreenVideoPage( - self, shared_state, wait_in_seconds)) + self, shared_state, wait_in_seconds, measure_memory)) self.AddStory(TrivialGifPage( - self, shared_state, wait_in_seconds)) + self, shared_state, wait_in_seconds, measure_memory)) + self.AddStory(TrivialAnimationPage( + self, shared_state, wait_in_seconds, measure_memory))
diff --git a/tools/perf/page_sets/trivial_sites/trivial_animation.html b/tools/perf/page_sets/trivial_sites/trivial_animation.html new file mode 100644 index 0000000..712371d2 --- /dev/null +++ b/tools/perf/page_sets/trivial_sites/trivial_animation.html
@@ -0,0 +1,39 @@ +<!doctype html> +<!-- +Copyright 2017 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. +--> +<html> +<head> + <title>Trivial Animation</title> +</head> +<body> + <!-- The image is a 625 × 831 dark gray rect. --> + <img id="the_image" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAnEAAAM/CAMAAACJdnSiAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RDdFNEU2MkEwNzY1MTFFNzk0M0I4N0U2RDY3MDgxNjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RDdFNEU2MkIwNzY1MTFFNzk0M0I4N0U2RDY3MDgxNjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpCNzgzMEQ4OTA3NjUxMUU3OTQzQjg3RTZENjcwODE2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpCNzgzMEQ4QTA3NjUxMUU3OTQzQjg3RTZENjcwODE2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvC96s8AAAAGUExURTMzMwAAACOWWdUAAAIRSURBVHja7MExAQAAAMKg9U9tCU+gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnibAAPB3AAHlB06MAAAAAElFTkSuQmCC" /> +</body> +<script> + var image = null; + var offset = 0; + + function init() { + image = document.getElementById('the_image'); + image.style.position = 'relative'; + image.style.left = '0px'; + animate(); + } + + function animate() { + offset++; + if (offset > 500) { + offset = 0; + } + image.style.left = offset + 'px'; + + // Move the image 1pt every 16ms. + setTimeout(animate, 16); + } + + window.onload = init; +</script> +</html>
diff --git a/tools/perf/page_sets/update_webrtc_cases b/tools/perf/page_sets/update_webrtc_cases new file mode 100755 index 0000000..4bed428 --- /dev/null +++ b/tools/perf/page_sets/update_webrtc_cases
@@ -0,0 +1,155 @@ +#!/usr/bin/env python +# Copyright 2017 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. + +import argparse +import os +import re +import shutil +import subprocess +import sys +import tempfile +import urllib2 + + +SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) +DEFAULT_DESTINATION_DIR = os.path.join(SCRIPT_DIR, 'webrtc_cases') + +WEBRTC_GITHUB_URL = 'https://github.com/webrtc/' +TEST_PAGES_LOCATION_BY_REPO = { + 'test-pages': { + 'dirs': [ + 'src/canvas-capture', + 'src/multiple-peerconnections', + ], + }, + 'samples': { + 'dirs': [ + 'src/content/datachannel/datatransfer', + 'src/content/getusermedia/resolution', + 'src/content/peerconnection/constraints', + 'src/content/peerconnection/audio', + ], + 'files': [ + 'src/js/common.js', + ], + }, + 'adapter': { + 'files': [ + 'release/adapter.js', + ], + }, +} + +ADDED_SCRIPT_TAGS = ( + '<script src="%s.js"></script>\n' + '<script src="adapter.js"></script>\n' + '<script src="common.js"></script>\n' + '</body></html>' +) + +COPYRIGHT_NOTICE = [ + 'Copyright 2017 The Chromium Authors. All rights reserved.\n', + 'Use of this source code is governed by a BSD-style license that can be\n', + 'found in the LICENSE file.\n', +] + +COPYRIGHT_NOTICE_LENGTH = 8 +JS_COPYRIGHT_NOTICE = ' * '.join(['/*\n'] + COPYRIGHT_NOTICE) + ' */\n' +HTML_COPYRIGHT_NOTICE = ' * '.join(['<!--\n'] + COPYRIGHT_NOTICE) + '-->\n' + +STRIPPED_TAGS_RE = ('( *<meta.*?>\n?| *<link.*?>\n?|' + ' *<script.*>.*?</script>\n?|</body>.*?</html>)') + + +class TemporaryDirectory(object): + def __init__(self): + self._closed = False + self._name = None + self._name = tempfile.mkdtemp() + def __enter__(self): + return self._name + def __exit__(self, exc, value, tb): + if self._name and not self._closed: + shutil.rmtree(self._name) + self._closed = True + + +def CopyJSFile(origin, destination, has_copyright=True): + contents = [] + with open(origin) as input_file: + contents = input_file.readlines() + + if has_copyright: + contents = contents[COPYRIGHT_NOTICE_LENGTH:] + contents = [JS_COPYRIGHT_NOTICE] + contents + + with open(destination, 'w') as output_file: + output_file.writelines(contents) + + +def CopyHTMLFile(test_name, origin, destination): + contents = '' + with open(origin) as input_file: + contents = input_file.read() + + contents = re.sub(STRIPPED_TAGS_RE, '', contents, + flags=re.MULTILINE|re.DOTALL) + contents += ADDED_SCRIPT_TAGS % test_name + + contents = [line + '\n' for line in contents.split('\n')] + contents = (contents[:1] + [HTML_COPYRIGHT_NOTICE] + + contents[COPYRIGHT_NOTICE_LENGTH:]) + + with open(destination, 'w') as output_file: + output_file.writelines(contents) + + +def main(): + parser = argparse.ArgumentParser( + formatter_class=argparse.RawDescriptionHelpFormatter, + description=( + 'Update the WebRTC test pages.\n' + 'This script downloads the test pages from the WebRTC GitHub ' + 'repository and copies them to the DESTINATION directory after ' + 'processing them as follows: \n' + ' * Adds a copyright notice on top of the HTML and JS files.\n' + ' * Deletes the <meta> tags.\n' + ' * Discards the CSS files and corresponding link tags.\n' + ' * Discards the JS files and corresponding script tags except for ' + 'main.js, adapter.js and common.js.\n' + ' * Renames the index.html and main.js files for each test to ' + 'testname.html and testname.js.')) + + parser.add_argument('-d', '--destination', default=DEFAULT_DESTINATION_DIR, + type=str, help='Where to save the WebRTC test pages.') + + args = parser.parse_args() + + if not os.path.isdir(args.destination): + os.makedirs(args.destination) + + with TemporaryDirectory() as temp_dir: + for repo_name, test_dirs in TEST_PAGES_LOCATION_BY_REPO.items(): + p = subprocess.Popen(['git', 'clone', WEBRTC_GITHUB_URL + repo_name], + cwd=temp_dir) + p.wait() + + for test_dir in test_dirs.get('dirs', []): + test_dir = os.path.join(temp_dir, repo_name, test_dir) + test_name = os.path.basename(test_dir) + + CopyJSFile(os.path.join(test_dir, 'js', 'main.js'), + os.path.join(args.destination, test_name + '.js')) + CopyHTMLFile(test_name, os.path.join(test_dir, 'index.html'), + os.path.join(args.destination, test_name + '.html')) + + for test_file in test_dirs.get('files', []): + file_name = os.path.basename(test_file) + CopyJSFile(os.path.join(temp_dir, repo_name, test_file), + os.path.join(args.destination, file_name), False) + + +if __name__ == '__main__': + main()
diff --git a/tools/perf/page_sets/v8_top_25.py b/tools/perf/page_sets/v8_top_25.py index b1ad1d51..ed94ba38 100644 --- a/tools/perf/page_sets/v8_top_25.py +++ b/tools/perf/page_sets/v8_top_25.py
@@ -41,7 +41,7 @@ 'http://www.msn.com/ar-ae', 'http://www.bing.com/search?q=v8+engine', 'http://www.pinterest.com/categories/popular', - 'http://www.sina.com.cn', + # 'http://www.sina.com.cn', http://crbug.com/699579 'http://weibo.com', 'http://yandex.ru/search/?text=v8', 'http://www.wikiwand.com/en/hill',
diff --git a/tools/perf/page_sets/webrtc_cases.py b/tools/perf/page_sets/webrtc_cases.py index 41427d81..5d8f3f5 100644 --- a/tools/perf/page_sets/webrtc_cases.py +++ b/tools/perf/page_sets/webrtc_cases.py
@@ -7,14 +7,10 @@ from telemetry.page import page as page_module -WEBRTC_TEST_PAGES_URL = 'https://test.webrtc.org/manual/' -WEBRTC_GITHUB_SAMPLES_URL = 'https://webrtc.github.io/samples/src/content/' -MEDIARECORDER_GITHUB_URL = 'https://rawgit.com/cricdecyan/mediarecorder/master/' - - class WebrtcPage(page_module.Page): def __init__(self, url, page_set, name): + assert url.startswith('file://webrtc_cases/') super(WebrtcPage, self).__init__( url=url, page_set=page_set, name=name) @@ -28,7 +24,7 @@ def __init__(self, page_set): super(Page1, self).__init__( - url=WEBRTC_GITHUB_SAMPLES_URL + 'getusermedia/resolution/', + url='file://webrtc_cases/resolution.html', name='hd_local_stream_10s', page_set=page_set) @@ -42,7 +38,7 @@ def __init__(self, page_set): super(Page2, self).__init__( - url=WEBRTC_GITHUB_SAMPLES_URL + 'peerconnection/constraints/', + url='file://webrtc_cases/constraints.html', name='720p_call_45s', page_set=page_set) @@ -64,7 +60,7 @@ def __init__(self, page_set): super(Page3, self).__init__( - url=WEBRTC_GITHUB_SAMPLES_URL + 'datachannel/datatransfer', + url='file://webrtc_cases/datatransfer.html', name='30s_datachannel_transfer', page_set=page_set) @@ -81,7 +77,7 @@ def __init__(self, page_set): super(Page4, self).__init__( - url=WEBRTC_GITHUB_SAMPLES_URL + 'peerconnection/audio/?codec=OPUS', + url='file://webrtc_cases/audio.html?codec=OPUS', name='audio_call_opus_10s', page_set=page_set) @@ -96,7 +92,7 @@ def __init__(self, page_set): super(Page5, self).__init__( - url=WEBRTC_GITHUB_SAMPLES_URL + 'peerconnection/audio/?codec=G722', + url='file://webrtc_cases/audio.html?codec=G722', name='audio_call_g722_10s', page_set=page_set) @@ -111,7 +107,7 @@ def __init__(self, page_set): super(Page6, self).__init__( - url=WEBRTC_GITHUB_SAMPLES_URL + 'peerconnection/audio/?codec=PCMU', + url='file://webrtc_cases/audio.html?codec=PCMU', name='audio_call_pcmu_10s', page_set=page_set) @@ -126,7 +122,7 @@ def __init__(self, page_set): super(Page7, self).__init__( - url=WEBRTC_GITHUB_SAMPLES_URL + 'peerconnection/audio/?codec=ISAC_16K', + url='file://webrtc_cases/audio.html?codec=ISAC_16K', name='audio_call_isac16k_10s', page_set=page_set) @@ -140,17 +136,15 @@ """Why: Sets up a canvas capture stream connection to a peer connection.""" def __init__(self, page_set): - canvas_capure_html = 'canvascapture/canvas_capture_peerconnection.html' super(Page8, self).__init__( - url=MEDIARECORDER_GITHUB_URL + canvas_capure_html, + url='file://webrtc_cases/canvas-capture.html', name='canvas_capture_peer_connection', page_set=page_set) def RunPageInteractions(self, action_runner): with action_runner.CreateInteraction('Action_Canvas_PeerConnection', repeatable=False): - action_runner.ExecuteJavaScript('draw();') - action_runner.ExecuteJavaScript('doCanvasCaptureAndPeerConnection();') + action_runner.ClickElement('button[id="startButton"]') action_runner.Wait(10) @@ -159,7 +153,7 @@ def __init__(self, page_set): super(Page9, self).__init__( - url= WEBRTC_TEST_PAGES_URL + 'multiple-peerconnections/', + url='file://webrtc_cases/multiple-peerconnections.html', name='multiple_peerconnections', page_set=page_set) @@ -180,7 +174,6 @@ def __init__(self): super(WebrtcGetusermediaPageSet, self).__init__( - archive_data_file='data/webrtc_getusermedia_cases.json', cloud_storage_bucket=story.PUBLIC_BUCKET) self.AddStory(Page1(self)) @@ -191,7 +184,6 @@ def __init__(self): super(WebrtcStresstestPageSet, self).__init__( - archive_data_file='data/webrtc_stresstest_cases.json', cloud_storage_bucket=story.PUBLIC_BUCKET) self.AddStory(Page9(self)) @@ -202,7 +194,6 @@ def __init__(self): super(WebrtcPeerconnectionPageSet, self).__init__( - archive_data_file='data/webrtc_peerconnection_cases.json', cloud_storage_bucket=story.PUBLIC_BUCKET) self.AddStory(Page2(self)) @@ -213,7 +204,6 @@ def __init__(self): super(WebrtcDatachannelPageSet, self).__init__( - archive_data_file='data/webrtc_datachannel_cases.json', cloud_storage_bucket=story.PUBLIC_BUCKET) self.AddStory(Page3(self)) @@ -224,7 +214,6 @@ def __init__(self): super(WebrtcAudioPageSet, self).__init__( - archive_data_file='data/webrtc_audio_cases.json', cloud_storage_bucket=story.PUBLIC_BUCKET) self.AddStory(Page4(self)) @@ -238,7 +227,6 @@ def __init__(self): super(WebrtcRenderingPageSet, self).__init__( - archive_data_file='data/webrtc_smoothness_cases.json', cloud_storage_bucket=story.PARTNER_BUCKET) self.AddStory(Page2(self))
diff --git a/tools/perf/page_sets/webrtc_cases/adapter.js b/tools/perf/page_sets/webrtc_cases/adapter.js new file mode 100644 index 0000000..3af94d04 --- /dev/null +++ b/tools/perf/page_sets/webrtc_cases/adapter.js
@@ -0,0 +1,3035 @@ +/* + * Copyright 2017 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. + */ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.adapter = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ + /* eslint-env node */ +'use strict'; + +// SDP helpers. +var SDPUtils = {}; + +// Generate an alphanumeric identifier for cname or mids. +// TODO: use UUIDs instead? https://gist.github.com/jed/982883 +SDPUtils.generateIdentifier = function() { + return Math.random().toString(36).substr(2, 10); +}; + +// The RTCP CNAME used by all peerconnections from the same JS. +SDPUtils.localCName = SDPUtils.generateIdentifier(); + +// Splits SDP into lines, dealing with both CRLF and LF. +SDPUtils.splitLines = function(blob) { + return blob.trim().split('\n').map(function(line) { + return line.trim(); + }); +}; +// Splits SDP into sessionpart and mediasections. Ensures CRLF. +SDPUtils.splitSections = function(blob) { + var parts = blob.split('\nm='); + return parts.map(function(part, index) { + return (index > 0 ? 'm=' + part : part).trim() + '\r\n'; + }); +}; + +// Returns lines that start with a certain prefix. +SDPUtils.matchPrefix = function(blob, prefix) { + return SDPUtils.splitLines(blob).filter(function(line) { + return line.indexOf(prefix) === 0; + }); +}; + +// Parses an ICE candidate line. Sample input: +// candidate:702786350 2 udp 41819902 8.8.8.8 60769 typ relay raddr 8.8.8.8 +// rport 55996" +SDPUtils.parseCandidate = function(line) { + var parts; + // Parse both variants. + if (line.indexOf('a=candidate:') === 0) { + parts = line.substring(12).split(' '); + } else { + parts = line.substring(10).split(' '); + } + + var candidate = { + foundation: parts[0], + component: parts[1], + protocol: parts[2].toLowerCase(), + priority: parseInt(parts[3], 10), + ip: parts[4], + port: parseInt(parts[5], 10), + // skip parts[6] == 'typ' + type: parts[7] + }; + + for (var i = 8; i < parts.length; i += 2) { + switch (parts[i]) { + case 'raddr': + candidate.relatedAddress = parts[i + 1]; + break; + case 'rport': + candidate.relatedPort = parseInt(parts[i + 1], 10); + break; + case 'tcptype': + candidate.tcpType = parts[i + 1]; + break; + default: // Unknown extensions are silently ignored. + break; + } + } + return candidate; +}; + +// Translates a candidate object into SDP candidate attribute. +SDPUtils.writeCandidate = function(candidate) { + var sdp = []; + sdp.push(candidate.foundation); + sdp.push(candidate.component); + sdp.push(candidate.protocol.toUpperCase()); + sdp.push(candidate.priority); + sdp.push(candidate.ip); + sdp.push(candidate.port); + + var type = candidate.type; + sdp.push('typ'); + sdp.push(type); + if (type !== 'host' && candidate.relatedAddress && + candidate.relatedPort) { + sdp.push('raddr'); + sdp.push(candidate.relatedAddress); // was: relAddr + sdp.push('rport'); + sdp.push(candidate.relatedPort); // was: relPort + } + if (candidate.tcpType && candidate.protocol.toLowerCase() === 'tcp') { + sdp.push('tcptype'); + sdp.push(candidate.tcpType); + } + return 'candidate:' + sdp.join(' '); +}; + +// Parses an rtpmap line, returns RTCRtpCoddecParameters. Sample input: +// a=rtpmap:111 opus/48000/2 +SDPUtils.parseRtpMap = function(line) { + var parts = line.substr(9).split(' '); + var parsed = { + payloadType: parseInt(parts.shift(), 10) // was: id + }; + + parts = parts[0].split('/'); + + parsed.name = parts[0]; + parsed.clockRate = parseInt(parts[1], 10); // was: clockrate + // was: channels + parsed.numChannels = parts.length === 3 ? parseInt(parts[2], 10) : 1; + return parsed; +}; + +// Generate an a=rtpmap line from RTCRtpCodecCapability or +// RTCRtpCodecParameters. +SDPUtils.writeRtpMap = function(codec) { + var pt = codec.payloadType; + if (codec.preferredPayloadType !== undefined) { + pt = codec.preferredPayloadType; + } + return 'a=rtpmap:' + pt + ' ' + codec.name + '/' + codec.clockRate + + (codec.numChannels !== 1 ? '/' + codec.numChannels : '') + '\r\n'; +}; + +// Parses an a=extmap line (headerextension from RFC 5285). Sample input: +// a=extmap:2 urn:ietf:params:rtp-hdrext:toffset +SDPUtils.parseExtmap = function(line) { + var parts = line.substr(9).split(' '); + return { + id: parseInt(parts[0], 10), + uri: parts[1] + }; +}; + +// Generates a=extmap line from RTCRtpHeaderExtensionParameters or +// RTCRtpHeaderExtension. +SDPUtils.writeExtmap = function(headerExtension) { + return 'a=extmap:' + (headerExtension.id || headerExtension.preferredId) + + ' ' + headerExtension.uri + '\r\n'; +}; + +// Parses an ftmp line, returns dictionary. Sample input: +// a=fmtp:96 vbr=on;cng=on +// Also deals with vbr=on; cng=on +SDPUtils.parseFmtp = function(line) { + var parsed = {}; + var kv; + var parts = line.substr(line.indexOf(' ') + 1).split(';'); + for (var j = 0; j < parts.length; j++) { + kv = parts[j].trim().split('='); + parsed[kv[0].trim()] = kv[1]; + } + return parsed; +}; + +// Generates an a=ftmp line from RTCRtpCodecCapability or RTCRtpCodecParameters. +SDPUtils.writeFmtp = function(codec) { + var line = ''; + var pt = codec.payloadType; + if (codec.preferredPayloadType !== undefined) { + pt = codec.preferredPayloadType; + } + if (codec.parameters && Object.keys(codec.parameters).length) { + var params = []; + Object.keys(codec.parameters).forEach(function(param) { + params.push(param + '=' + codec.parameters[param]); + }); + line += 'a=fmtp:' + pt + ' ' + params.join(';') + '\r\n'; + } + return line; +}; + +// Parses an rtcp-fb line, returns RTCPRtcpFeedback object. Sample input: +// a=rtcp-fb:98 nack rpsi +SDPUtils.parseRtcpFb = function(line) { + var parts = line.substr(line.indexOf(' ') + 1).split(' '); + return { + type: parts.shift(), + parameter: parts.join(' ') + }; +}; +// Generate a=rtcp-fb lines from RTCRtpCodecCapability or RTCRtpCodecParameters. +SDPUtils.writeRtcpFb = function(codec) { + var lines = ''; + var pt = codec.payloadType; + if (codec.preferredPayloadType !== undefined) { + pt = codec.preferredPayloadType; + } + if (codec.rtcpFeedback && codec.rtcpFeedback.length) { + // FIXME: special handling for trr-int? + codec.rtcpFeedback.forEach(function(fb) { + lines += 'a=rtcp-fb:' + pt + ' ' + fb.type + + (fb.parameter && fb.parameter.length ? ' ' + fb.parameter : '') + + '\r\n'; + }); + } + return lines; +}; + +// Parses an RFC 5576 ssrc media attribute. Sample input: +// a=ssrc:3735928559 cname:something +SDPUtils.parseSsrcMedia = function(line) { + var sp = line.indexOf(' '); + var parts = { + ssrc: parseInt(line.substr(7, sp - 7), 10) + }; + var colon = line.indexOf(':', sp); + if (colon > -1) { + parts.attribute = line.substr(sp + 1, colon - sp - 1); + parts.value = line.substr(colon + 1); + } else { + parts.attribute = line.substr(sp + 1); + } + return parts; +}; + +// Extracts DTLS parameters from SDP media section or sessionpart. +// FIXME: for consistency with other functions this should only +// get the fingerprint line as input. See also getIceParameters. +SDPUtils.getDtlsParameters = function(mediaSection, sessionpart) { + var lines = SDPUtils.splitLines(mediaSection); + // Search in session part, too. + lines = lines.concat(SDPUtils.splitLines(sessionpart)); + var fpLine = lines.filter(function(line) { + return line.indexOf('a=fingerprint:') === 0; + })[0].substr(14); + // Note: a=setup line is ignored since we use the 'auto' role. + var dtlsParameters = { + role: 'auto', + fingerprints: [{ + algorithm: fpLine.split(' ')[0], + value: fpLine.split(' ')[1] + }] + }; + return dtlsParameters; +}; + +// Serializes DTLS parameters to SDP. +SDPUtils.writeDtlsParameters = function(params, setupType) { + var sdp = 'a=setup:' + setupType + '\r\n'; + params.fingerprints.forEach(function(fp) { + sdp += 'a=fingerprint:' + fp.algorithm + ' ' + fp.value + '\r\n'; + }); + return sdp; +}; +// Parses ICE information from SDP media section or sessionpart. +// FIXME: for consistency with other functions this should only +// get the ice-ufrag and ice-pwd lines as input. +SDPUtils.getIceParameters = function(mediaSection, sessionpart) { + var lines = SDPUtils.splitLines(mediaSection); + // Search in session part, too. + lines = lines.concat(SDPUtils.splitLines(sessionpart)); + var iceParameters = { + usernameFragment: lines.filter(function(line) { + return line.indexOf('a=ice-ufrag:') === 0; + })[0].substr(12), + password: lines.filter(function(line) { + return line.indexOf('a=ice-pwd:') === 0; + })[0].substr(10) + }; + return iceParameters; +}; + +// Serializes ICE parameters to SDP. +SDPUtils.writeIceParameters = function(params) { + return 'a=ice-ufrag:' + params.usernameFragment + '\r\n' + + 'a=ice-pwd:' + params.password + '\r\n'; +}; + +// Parses the SDP media section and returns RTCRtpParameters. +SDPUtils.parseRtpParameters = function(mediaSection) { + var description = { + codecs: [], + headerExtensions: [], + fecMechanisms: [], + rtcp: [] + }; + var lines = SDPUtils.splitLines(mediaSection); + var mline = lines[0].split(' '); + for (var i = 3; i < mline.length; i++) { // find all codecs from mline[3..] + var pt = mline[i]; + var rtpmapline = SDPUtils.matchPrefix( + mediaSection, 'a=rtpmap:' + pt + ' ')[0]; + if (rtpmapline) { + var codec = SDPUtils.parseRtpMap(rtpmapline); + var fmtps = SDPUtils.matchPrefix( + mediaSection, 'a=fmtp:' + pt + ' '); + // Only the first a=fmtp:<pt> is considered. + codec.parameters = fmtps.length ? SDPUtils.parseFmtp(fmtps[0]) : {}; + codec.rtcpFeedback = SDPUtils.matchPrefix( + mediaSection, 'a=rtcp-fb:' + pt + ' ') + .map(SDPUtils.parseRtcpFb); + description.codecs.push(codec); + // parse FEC mechanisms from rtpmap lines. + switch (codec.name.toUpperCase()) { + case 'RED': + case 'ULPFEC': + description.fecMechanisms.push(codec.name.toUpperCase()); + break; + default: // only RED and ULPFEC are recognized as FEC mechanisms. + break; + } + } + } + SDPUtils.matchPrefix(mediaSection, 'a=extmap:').forEach(function(line) { + description.headerExtensions.push(SDPUtils.parseExtmap(line)); + }); + // FIXME: parse rtcp. + return description; +}; + +// Generates parts of the SDP media section describing the capabilities / +// parameters. +SDPUtils.writeRtpDescription = function(kind, caps) { + var sdp = ''; + + // Build the mline. + sdp += 'm=' + kind + ' '; + sdp += caps.codecs.length > 0 ? '9' : '0'; // reject if no codecs. + sdp += ' UDP/TLS/RTP/SAVPF '; + sdp += caps.codecs.map(function(codec) { + if (codec.preferredPayloadType !== undefined) { + return codec.preferredPayloadType; + } + return codec.payloadType; + }).join(' ') + '\r\n'; + + sdp += 'c=IN IP4 0.0.0.0\r\n'; + sdp += 'a=rtcp:9 IN IP4 0.0.0.0\r\n'; + + // Add a=rtpmap lines for each codec. Also fmtp and rtcp-fb. + caps.codecs.forEach(function(codec) { + sdp += SDPUtils.writeRtpMap(codec); + sdp += SDPUtils.writeFmtp(codec); + sdp += SDPUtils.writeRtcpFb(codec); + }); + var maxptime = 0; + caps.codecs.forEach(function(codec) { + if (codec.maxptime > maxptime) { + maxptime = codec.maxptime; + } + }); + if (maxptime > 0) { + sdp += 'a=maxptime:' + maxptime + '\r\n'; + } + sdp += 'a=rtcp-mux\r\n'; + + caps.headerExtensions.forEach(function(extension) { + sdp += SDPUtils.writeExtmap(extension); + }); + // FIXME: write fecMechanisms. + return sdp; +}; + +// Parses the SDP media section and returns an array of +// RTCRtpEncodingParameters. +SDPUtils.parseRtpEncodingParameters = function(mediaSection) { + var encodingParameters = []; + var description = SDPUtils.parseRtpParameters(mediaSection); + var hasRed = description.fecMechanisms.indexOf('RED') !== -1; + var hasUlpfec = description.fecMechanisms.indexOf('ULPFEC') !== -1; + + // filter a=ssrc:... cname:, ignore PlanB-msid + var ssrcs = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:') + .map(function(line) { + return SDPUtils.parseSsrcMedia(line); + }) + .filter(function(parts) { + return parts.attribute === 'cname'; + }); + var primarySsrc = ssrcs.length > 0 && ssrcs[0].ssrc; + var secondarySsrc; + + var flows = SDPUtils.matchPrefix(mediaSection, 'a=ssrc-group:FID') + .map(function(line) { + var parts = line.split(' '); + parts.shift(); + return parts.map(function(part) { + return parseInt(part, 10); + }); + }); + if (flows.length > 0 && flows[0].length > 1 && flows[0][0] === primarySsrc) { + secondarySsrc = flows[0][1]; + } + + description.codecs.forEach(function(codec) { + if (codec.name.toUpperCase() === 'RTX' && codec.parameters.apt) { + var encParam = { + ssrc: primarySsrc, + codecPayloadType: parseInt(codec.parameters.apt, 10), + rtx: { + ssrc: secondarySsrc + } + }; + encodingParameters.push(encParam); + if (hasRed) { + encParam = JSON.parse(JSON.stringify(encParam)); + encParam.fec = { + ssrc: secondarySsrc, + mechanism: hasUlpfec ? 'red+ulpfec' : 'red' + }; + encodingParameters.push(encParam); + } + } + }); + if (encodingParameters.length === 0 && primarySsrc) { + encodingParameters.push({ + ssrc: primarySsrc + }); + } + + // we support both b=AS and b=TIAS but interpret AS as TIAS. + var bandwidth = SDPUtils.matchPrefix(mediaSection, 'b='); + if (bandwidth.length) { + if (bandwidth[0].indexOf('b=TIAS:') === 0) { + bandwidth = parseInt(bandwidth[0].substr(7), 10); + } else if (bandwidth[0].indexOf('b=AS:') === 0) { + bandwidth = parseInt(bandwidth[0].substr(5), 10); + } + encodingParameters.forEach(function(params) { + params.maxBitrate = bandwidth; + }); + } + return encodingParameters; +}; + +// parses http://draft.ortc.org/#rtcrtcpparameters* +SDPUtils.parseRtcpParameters = function(mediaSection) { + var rtcpParameters = {}; + + var cname; + // Gets the first SSRC. Note that with RTX there might be multiple + // SSRCs. + var remoteSsrc = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:') + .map(function(line) { + return SDPUtils.parseSsrcMedia(line); + }) + .filter(function(obj) { + return obj.attribute === 'cname'; + })[0]; + if (remoteSsrc) { + rtcpParameters.cname = remoteSsrc.value; + rtcpParameters.ssrc = remoteSsrc.ssrc; + } + + // Edge uses the compound attribute instead of reducedSize + // compound is !reducedSize + var rsize = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-rsize'); + rtcpParameters.reducedSize = rsize.length > 0; + rtcpParameters.compound = rsize.length === 0; + + // parses the rtcp-mux attrіbute. + // Note that Edge does not support unmuxed RTCP. + var mux = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-mux'); + rtcpParameters.mux = mux.length > 0; + + return rtcpParameters; +}; + +// parses either a=msid: or a=ssrc:... msid lines an returns +// the id of the MediaStream and MediaStreamTrack. +SDPUtils.parseMsid = function(mediaSection) { + var parts; + var spec = SDPUtils.matchPrefix(mediaSection, 'a=msid:'); + if (spec.length === 1) { + parts = spec[0].substr(7).split(' '); + return {stream: parts[0], track: parts[1]}; + } + var planB = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:') + .map(function(line) { + return SDPUtils.parseSsrcMedia(line); + }) + .filter(function(parts) { + return parts.attribute === 'msid'; + }); + if (planB.length > 0) { + parts = planB[0].value.split(' '); + return {stream: parts[0], track: parts[1]}; + } +}; + +SDPUtils.writeSessionBoilerplate = function() { + // FIXME: sess-id should be an NTP timestamp. + return 'v=0\r\n' + + 'o=thisisadapterortc 8169639915646943137 2 IN IP4 127.0.0.1\r\n' + + 's=-\r\n' + + 't=0 0\r\n'; +}; + +SDPUtils.writeMediaSection = function(transceiver, caps, type, stream) { + var sdp = SDPUtils.writeRtpDescription(transceiver.kind, caps); + + // Map ICE parameters (ufrag, pwd) to SDP. + sdp += SDPUtils.writeIceParameters( + transceiver.iceGatherer.getLocalParameters()); + + // Map DTLS parameters to SDP. + sdp += SDPUtils.writeDtlsParameters( + transceiver.dtlsTransport.getLocalParameters(), + type === 'offer' ? 'actpass' : 'active'); + + sdp += 'a=mid:' + transceiver.mid + '\r\n'; + + if (transceiver.rtpSender && transceiver.rtpReceiver) { + sdp += 'a=sendrecv\r\n'; + } else if (transceiver.rtpSender) { + sdp += 'a=sendonly\r\n'; + } else if (transceiver.rtpReceiver) { + sdp += 'a=recvonly\r\n'; + } else { + sdp += 'a=inactive\r\n'; + } + + if (transceiver.rtpSender) { + // spec. + var msid = 'msid:' + stream.id + ' ' + + transceiver.rtpSender.track.id + '\r\n'; + sdp += 'a=' + msid; + + // for Chrome. + sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].ssrc + + ' ' + msid; + if (transceiver.sendEncodingParameters[0].rtx) { + sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].rtx.ssrc + + ' ' + msid; + sdp += 'a=ssrc-group:FID ' + + transceiver.sendEncodingParameters[0].ssrc + ' ' + + transceiver.sendEncodingParameters[0].rtx.ssrc + + '\r\n'; + } + } + // FIXME: this should be written by writeRtpDescription. + sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].ssrc + + ' cname:' + SDPUtils.localCName + '\r\n'; + if (transceiver.rtpSender && transceiver.sendEncodingParameters[0].rtx) { + sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].rtx.ssrc + + ' cname:' + SDPUtils.localCName + '\r\n'; + } + return sdp; +}; + +// Gets the direction from the mediaSection or the sessionpart. +SDPUtils.getDirection = function(mediaSection, sessionpart) { + // Look for sendrecv, sendonly, recvonly, inactive, default to sendrecv. + var lines = SDPUtils.splitLines(mediaSection); + for (var i = 0; i < lines.length; i++) { + switch (lines[i]) { + case 'a=sendrecv': + case 'a=sendonly': + case 'a=recvonly': + case 'a=inactive': + return lines[i].substr(2); + default: + // FIXME: What should happen here? + } + } + if (sessionpart) { + return SDPUtils.getDirection(sessionpart); + } + return 'sendrecv'; +}; + +SDPUtils.getKind = function(mediaSection) { + var lines = SDPUtils.splitLines(mediaSection); + var mline = lines[0].split(' '); + return mline[0].substr(2); +}; + +SDPUtils.isRejected = function(mediaSection) { + return mediaSection.split(' ', 2)[1] === '0'; +}; + +// Expose public methods. +module.exports = SDPUtils; + +},{}],2:[function(require,module,exports){ +/* + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. + */ + /* eslint-env node */ + +'use strict'; + +// Shimming starts here. +(function() { + // Utils. + var utils = require('./utils'); + var logging = utils.log; + var browserDetails = utils.browserDetails; + // Export to the adapter global object visible in the browser. + module.exports.browserDetails = browserDetails; + module.exports.extractVersion = utils.extractVersion; + module.exports.disableLog = utils.disableLog; + + // Uncomment the line below if you want logging to occur, including logging + // for the switch statement below. Can also be turned on in the browser via + // adapter.disableLog(false), but then logging from the switch statement below + // will not appear. + // require('./utils').disableLog(false); + + // Browser shims. + var chromeShim = require('./chrome/chrome_shim') || null; + var edgeShim = require('./edge/edge_shim') || null; + var firefoxShim = require('./firefox/firefox_shim') || null; + var safariShim = require('./safari/safari_shim') || null; + + // Shim browser if found. + switch (browserDetails.browser) { + case 'chrome': + if (!chromeShim || !chromeShim.shimPeerConnection) { + logging('Chrome shim is not included in this adapter release.'); + return; + } + logging('adapter.js shimming chrome.'); + // Export to the adapter global object visible in the browser. + module.exports.browserShim = chromeShim; + + chromeShim.shimGetUserMedia(); + chromeShim.shimMediaStream(); + utils.shimCreateObjectURL(); + chromeShim.shimSourceObject(); + chromeShim.shimPeerConnection(); + chromeShim.shimOnTrack(); + chromeShim.shimGetSendersWithDtmf(); + break; + case 'firefox': + if (!firefoxShim || !firefoxShim.shimPeerConnection) { + logging('Firefox shim is not included in this adapter release.'); + return; + } + logging('adapter.js shimming firefox.'); + // Export to the adapter global object visible in the browser. + module.exports.browserShim = firefoxShim; + + firefoxShim.shimGetUserMedia(); + utils.shimCreateObjectURL(); + firefoxShim.shimSourceObject(); + firefoxShim.shimPeerConnection(); + firefoxShim.shimOnTrack(); + break; + case 'edge': + if (!edgeShim || !edgeShim.shimPeerConnection) { + logging('MS edge shim is not included in this adapter release.'); + return; + } + logging('adapter.js shimming edge.'); + // Export to the adapter global object visible in the browser. + module.exports.browserShim = edgeShim; + + edgeShim.shimGetUserMedia(); + utils.shimCreateObjectURL(); + edgeShim.shimPeerConnection(); + break; + case 'safari': + if (!safariShim) { + logging('Safari shim is not included in this adapter release.'); + return; + } + logging('adapter.js shimming safari.'); + // Export to the adapter global object visible in the browser. + module.exports.browserShim = safariShim; + + safariShim.shimGetUserMedia(); + break; + default: + logging('Unsupported browser!'); + } +})(); + +},{"./chrome/chrome_shim":3,"./edge/edge_shim":5,"./firefox/firefox_shim":7,"./safari/safari_shim":9,"./utils":10}],3:[function(require,module,exports){ + +/* + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. + */ + /* eslint-env node */ +'use strict'; +var logging = require('../utils.js').log; +var browserDetails = require('../utils.js').browserDetails; + +var chromeShim = { + shimMediaStream: function() { + window.MediaStream = window.MediaStream || window.webkitMediaStream; + }, + + shimOnTrack: function() { + if (typeof window === 'object' && window.RTCPeerConnection && !('ontrack' in + window.RTCPeerConnection.prototype)) { + Object.defineProperty(window.RTCPeerConnection.prototype, 'ontrack', { + get: function() { + return this._ontrack; + }, + set: function(f) { + var self = this; + if (this._ontrack) { + this.removeEventListener('track', this._ontrack); + this.removeEventListener('addstream', this._ontrackpoly); + } + this.addEventListener('track', this._ontrack = f); + this.addEventListener('addstream', this._ontrackpoly = function(e) { + // onaddstream does not fire when a track is added to an existing + // stream. But stream.onaddtrack is implemented so we use that. + e.stream.addEventListener('addtrack', function(te) { + var event = new Event('track'); + event.track = te.track; + event.receiver = {track: te.track}; + event.streams = [e.stream]; + self.dispatchEvent(event); + }); + e.stream.getTracks().forEach(function(track) { + var event = new Event('track'); + event.track = track; + event.receiver = {track: track}; + event.streams = [e.stream]; + this.dispatchEvent(event); + }.bind(this)); + }.bind(this)); + } + }); + } + }, + + shimGetSendersWithDtmf: function() { + if (typeof window === 'object' && window.RTCPeerConnection && + !('getSenders' in RTCPeerConnection.prototype) && + 'createDTMFSender' in RTCPeerConnection.prototype) { + RTCPeerConnection.prototype.getSenders = function() { + return this._senders; + }; + var origAddStream = RTCPeerConnection.prototype.addStream; + var origRemoveStream = RTCPeerConnection.prototype.removeStream; + + RTCPeerConnection.prototype.addStream = function(stream) { + var pc = this; + pc._senders = pc._senders || []; + origAddStream.apply(pc, [stream]); + stream.getTracks().forEach(function(track) { + pc._senders.push({ + track: track, + get dtmf() { + if (this._dtmf === undefined) { + if (track.kind === 'audio') { + this._dtmf = pc.createDTMFSender(track); + } else { + this._dtmf = null; + } + } + return this._dtmf; + } + }); + }); + }; + + RTCPeerConnection.prototype.removeStream = function(stream) { + var pc = this; + pc._senders = pc._senders || []; + origRemoveStream.apply(pc, [stream]); + stream.getTracks().forEach(function(track) { + var sender = pc._senders.find(function(s) { + return s.track === track; + }); + if (sender) { + pc._senders.splice(pc._senders.indexOf(sender), 1); // remove sender + } + }); + }; + } + }, + + shimSourceObject: function() { + if (typeof window === 'object') { + if (window.HTMLMediaElement && + !('srcObject' in window.HTMLMediaElement.prototype)) { + // Shim the srcObject property, once, when HTMLMediaElement is found. + Object.defineProperty(window.HTMLMediaElement.prototype, 'srcObject', { + get: function() { + return this._srcObject; + }, + set: function(stream) { + var self = this; + // Use _srcObject as a private property for this shim + this._srcObject = stream; + if (this.src) { + URL.revokeObjectURL(this.src); + } + + if (!stream) { + this.src = ''; + return undefined; + } + this.src = URL.createObjectURL(stream); + // We need to recreate the blob url when a track is added or + // removed. Doing it manually since we want to avoid a recursion. + stream.addEventListener('addtrack', function() { + if (self.src) { + URL.revokeObjectURL(self.src); + } + self.src = URL.createObjectURL(stream); + }); + stream.addEventListener('removetrack', function() { + if (self.src) { + URL.revokeObjectURL(self.src); + } + self.src = URL.createObjectURL(stream); + }); + } + }); + } + } + }, + + shimPeerConnection: function() { + // The RTCPeerConnection object. + if (!window.RTCPeerConnection) { + window.RTCPeerConnection = function(pcConfig, pcConstraints) { + // Translate iceTransportPolicy to iceTransports, + // see https://code.google.com/p/webrtc/issues/detail?id=4869 + // this was fixed in M56 along with unprefixing RTCPeerConnection. + logging('PeerConnection'); + if (pcConfig && pcConfig.iceTransportPolicy) { + pcConfig.iceTransports = pcConfig.iceTransportPolicy; + } + + return new webkitRTCPeerConnection(pcConfig, pcConstraints); + }; + window.RTCPeerConnection.prototype = webkitRTCPeerConnection.prototype; + // wrap static methods. Currently just generateCertificate. + if (webkitRTCPeerConnection.generateCertificate) { + Object.defineProperty(window.RTCPeerConnection, 'generateCertificate', { + get: function() { + return webkitRTCPeerConnection.generateCertificate; + } + }); + } + } + + var origGetStats = RTCPeerConnection.prototype.getStats; + RTCPeerConnection.prototype.getStats = function(selector, + successCallback, errorCallback) { + var self = this; + var args = arguments; + + // If selector is a function then we are in the old style stats so just + // pass back the original getStats format to avoid breaking old users. + if (arguments.length > 0 && typeof selector === 'function') { + return origGetStats.apply(this, arguments); + } + + // When spec-style getStats is supported, return those when called with + // either no arguments or the selector argument is null. + if (origGetStats.length === 0 && (arguments.length === 0 || + typeof arguments[0] !== 'function')) { + return origGetStats.apply(this, []); + } + + var fixChromeStats_ = function(response) { + var standardReport = {}; + var reports = response.result(); + reports.forEach(function(report) { + var standardStats = { + id: report.id, + timestamp: report.timestamp, + type: { + localcandidate: 'local-candidate', + remotecandidate: 'remote-candidate' + }[report.type] || report.type + }; + report.names().forEach(function(name) { + standardStats[name] = report.stat(name); + }); + standardReport[standardStats.id] = standardStats; + }); + + return standardReport; + }; + + // shim getStats with maplike support + var makeMapStats = function(stats) { + return new Map(Object.keys(stats).map(function(key) { + return[key, stats[key]]; + })); + }; + + if (arguments.length >= 2) { + var successCallbackWrapper_ = function(response) { + args[1](makeMapStats(fixChromeStats_(response))); + }; + + return origGetStats.apply(this, [successCallbackWrapper_, + arguments[0]]); + } + + // promise-support + return new Promise(function(resolve, reject) { + origGetStats.apply(self, [ + function(response) { + resolve(makeMapStats(fixChromeStats_(response))); + }, reject]); + }).then(successCallback, errorCallback); + }; + + // add promise support -- natively available in Chrome 51 + if (browserDetails.version < 51) { + ['setLocalDescription', 'setRemoteDescription', 'addIceCandidate'] + .forEach(function(method) { + var nativeMethod = RTCPeerConnection.prototype[method]; + RTCPeerConnection.prototype[method] = function() { + var args = arguments; + var self = this; + var promise = new Promise(function(resolve, reject) { + nativeMethod.apply(self, [args[0], resolve, reject]); + }); + if (args.length < 2) { + return promise; + } + return promise.then(function() { + args[1].apply(null, []); + }, + function(err) { + if (args.length >= 3) { + args[2].apply(null, [err]); + } + }); + }; + }); + } + + // promise support for createOffer and createAnswer. Available (without + // bugs) since M52: crbug/619289 + if (browserDetails.version < 52) { + ['createOffer', 'createAnswer'].forEach(function(method) { + var nativeMethod = RTCPeerConnection.prototype[method]; + RTCPeerConnection.prototype[method] = function() { + var self = this; + if (arguments.length < 1 || (arguments.length === 1 && + typeof arguments[0] === 'object')) { + var opts = arguments.length === 1 ? arguments[0] : undefined; + return new Promise(function(resolve, reject) { + nativeMethod.apply(self, [resolve, reject, opts]); + }); + } + return nativeMethod.apply(this, arguments); + }; + }); + } + + // shim implicit creation of RTCSessionDescription/RTCIceCandidate + ['setLocalDescription', 'setRemoteDescription', 'addIceCandidate'] + .forEach(function(method) { + var nativeMethod = RTCPeerConnection.prototype[method]; + RTCPeerConnection.prototype[method] = function() { + arguments[0] = new ((method === 'addIceCandidate') ? + RTCIceCandidate : RTCSessionDescription)(arguments[0]); + return nativeMethod.apply(this, arguments); + }; + }); + + // support for addIceCandidate(null or undefined) + var nativeAddIceCandidate = + RTCPeerConnection.prototype.addIceCandidate; + RTCPeerConnection.prototype.addIceCandidate = function() { + if (!arguments[0]) { + if (arguments[1]) { + arguments[1].apply(null); + } + return Promise.resolve(); + } + return nativeAddIceCandidate.apply(this, arguments); + }; + } +}; + + +// Expose public methods. +module.exports = { + shimMediaStream: chromeShim.shimMediaStream, + shimOnTrack: chromeShim.shimOnTrack, + shimGetSendersWithDtmf: chromeShim.shimGetSendersWithDtmf, + shimSourceObject: chromeShim.shimSourceObject, + shimPeerConnection: chromeShim.shimPeerConnection, + shimGetUserMedia: require('./getusermedia') +}; + +},{"../utils.js":10,"./getusermedia":4}],4:[function(require,module,exports){ +/* + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. + */ + /* eslint-env node */ +'use strict'; +var logging = require('../utils.js').log; +var browserDetails = require('../utils.js').browserDetails; + +// Expose public methods. +module.exports = function() { + var constraintsToChrome_ = function(c) { + if (typeof c !== 'object' || c.mandatory || c.optional) { + return c; + } + var cc = {}; + Object.keys(c).forEach(function(key) { + if (key === 'require' || key === 'advanced' || key === 'mediaSource') { + return; + } + var r = (typeof c[key] === 'object') ? c[key] : {ideal: c[key]}; + if (r.exact !== undefined && typeof r.exact === 'number') { + r.min = r.max = r.exact; + } + var oldname_ = function(prefix, name) { + if (prefix) { + return prefix + name.charAt(0).toUpperCase() + name.slice(1); + } + return (name === 'deviceId') ? 'sourceId' : name; + }; + if (r.ideal !== undefined) { + cc.optional = cc.optional || []; + var oc = {}; + if (typeof r.ideal === 'number') { + oc[oldname_('min', key)] = r.ideal; + cc.optional.push(oc); + oc = {}; + oc[oldname_('max', key)] = r.ideal; + cc.optional.push(oc); + } else { + oc[oldname_('', key)] = r.ideal; + cc.optional.push(oc); + } + } + if (r.exact !== undefined && typeof r.exact !== 'number') { + cc.mandatory = cc.mandatory || {}; + cc.mandatory[oldname_('', key)] = r.exact; + } else { + ['min', 'max'].forEach(function(mix) { + if (r[mix] !== undefined) { + cc.mandatory = cc.mandatory || {}; + cc.mandatory[oldname_(mix, key)] = r[mix]; + } + }); + } + }); + if (c.advanced) { + cc.optional = (cc.optional || []).concat(c.advanced); + } + return cc; + }; + + var shimConstraints_ = function(constraints, func) { + constraints = JSON.parse(JSON.stringify(constraints)); + if (constraints && constraints.audio) { + constraints.audio = constraintsToChrome_(constraints.audio); + } + if (constraints && typeof constraints.video === 'object') { + // Shim facingMode for mobile, where it defaults to "user". + var face = constraints.video.facingMode; + face = face && ((typeof face === 'object') ? face : {ideal: face}); + var getSupportedFacingModeLies = browserDetails.version < 59; + + if ((face && (face.exact === 'user' || face.exact === 'environment' || + face.ideal === 'user' || face.ideal === 'environment')) && + !(navigator.mediaDevices.getSupportedConstraints && + navigator.mediaDevices.getSupportedConstraints().facingMode && + !getSupportedFacingModeLies)) { + delete constraints.video.facingMode; + if (face.exact === 'environment' || face.ideal === 'environment') { + // Look for "back" in label, or use last cam (typically back cam). + return navigator.mediaDevices.enumerateDevices() + .then(function(devices) { + devices = devices.filter(function(d) { + return d.kind === 'videoinput'; + }); + var back = devices.find(function(d) { + return d.label.toLowerCase().indexOf('back') !== -1; + }) || (devices.length && devices[devices.length - 1]); + if (back) { + constraints.video.deviceId = face.exact ? {exact: back.deviceId} : + {ideal: back.deviceId}; + } + constraints.video = constraintsToChrome_(constraints.video); + logging('chrome: ' + JSON.stringify(constraints)); + return func(constraints); + }); + } + } + constraints.video = constraintsToChrome_(constraints.video); + } + logging('chrome: ' + JSON.stringify(constraints)); + return func(constraints); + }; + + var shimError_ = function(e) { + return { + name: { + PermissionDeniedError: 'NotAllowedError', + ConstraintNotSatisfiedError: 'OverconstrainedError' + }[e.name] || e.name, + message: e.message, + constraint: e.constraintName, + toString: function() { + return this.name + (this.message && ': ') + this.message; + } + }; + }; + + var getUserMedia_ = function(constraints, onSuccess, onError) { + shimConstraints_(constraints, function(c) { + navigator.webkitGetUserMedia(c, onSuccess, function(e) { + onError(shimError_(e)); + }); + }); + }; + + navigator.getUserMedia = getUserMedia_; + + // Returns the result of getUserMedia as a Promise. + var getUserMediaPromise_ = function(constraints) { + return new Promise(function(resolve, reject) { + navigator.getUserMedia(constraints, resolve, reject); + }); + }; + + if (!navigator.mediaDevices) { + navigator.mediaDevices = { + getUserMedia: getUserMediaPromise_, + enumerateDevices: function() { + return new Promise(function(resolve) { + var kinds = {audio: 'audioinput', video: 'videoinput'}; + return MediaStreamTrack.getSources(function(devices) { + resolve(devices.map(function(device) { + return {label: device.label, + kind: kinds[device.kind], + deviceId: device.id, + groupId: ''}; + })); + }); + }); + }, + getSupportedConstraints: function() { + return { + deviceId: true, echoCancellation: true, facingMode: true, + frameRate: true, height: true, width: true + }; + } + }; + } + + // A shim for getUserMedia method on the mediaDevices object. + // TODO(KaptenJansson) remove once implemented in Chrome stable. + if (!navigator.mediaDevices.getUserMedia) { + navigator.mediaDevices.getUserMedia = function(constraints) { + return getUserMediaPromise_(constraints); + }; + } else { + // Even though Chrome 45 has navigator.mediaDevices and a getUserMedia + // function which returns a Promise, it does not accept spec-style + // constraints. + var origGetUserMedia = navigator.mediaDevices.getUserMedia. + bind(navigator.mediaDevices); + navigator.mediaDevices.getUserMedia = function(cs) { + return shimConstraints_(cs, function(c) { + return origGetUserMedia(c).then(function(stream) { + if (c.audio && !stream.getAudioTracks().length || + c.video && !stream.getVideoTracks().length) { + stream.getTracks().forEach(function(track) { + track.stop(); + }); + throw new DOMException('', 'NotFoundError'); + } + return stream; + }, function(e) { + return Promise.reject(shimError_(e)); + }); + }); + }; + } + + // Dummy devicechange event methods. + // TODO(KaptenJansson) remove once implemented in Chrome stable. + if (typeof navigator.mediaDevices.addEventListener === 'undefined') { + navigator.mediaDevices.addEventListener = function() { + logging('Dummy mediaDevices.addEventListener called.'); + }; + } + if (typeof navigator.mediaDevices.removeEventListener === 'undefined') { + navigator.mediaDevices.removeEventListener = function() { + logging('Dummy mediaDevices.removeEventListener called.'); + }; + } +}; + +},{"../utils.js":10}],5:[function(require,module,exports){ +/* + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. + */ + /* eslint-env node */ +'use strict'; + +var SDPUtils = require('sdp'); +var browserDetails = require('../utils').browserDetails; + +// sort tracks such that they follow an a-v-a-v... +// pattern. +function sortTracks(tracks) { + var audioTracks = tracks.filter(function(track) { + return track.kind === 'audio'; + }); + var videoTracks = tracks.filter(function(track) { + return track.kind === 'video'; + }); + tracks = []; + while (audioTracks.length || videoTracks.length) { + if (audioTracks.length) { + tracks.push(audioTracks.shift()); + } + if (videoTracks.length) { + tracks.push(videoTracks.shift()); + } + } + return tracks; +} + +// Edge does not like +// 1) stun: +// 2) turn: that does not have all of turn:host:port?transport=udp +// 3) turn: with ipv6 addresses +// 4) turn: occurring muliple times +function filterIceServers(iceServers) { + var hasTurn = false; + iceServers = JSON.parse(JSON.stringify(iceServers)); + return iceServers.filter(function(server) { + if (server && (server.urls || server.url)) { + var urls = server.urls || server.url; + var isString = typeof urls === 'string'; + if (isString) { + urls = [urls]; + } + urls = urls.filter(function(url) { + var validTurn = url.indexOf('turn:') === 0 && + url.indexOf('transport=udp') !== -1 && + url.indexOf('turn:[') === -1 && + !hasTurn; + + if (validTurn) { + hasTurn = true; + return true; + } + return url.indexOf('stun:') === 0 && + browserDetails.version >= 14393; + }); + + delete server.url; + server.urls = isString ? urls[0] : urls; + return !!urls.length; + } + return false; + }); +} + +var edgeShim = { + shimPeerConnection: function() { + if (window.RTCIceGatherer) { + // ORTC defines an RTCIceCandidate object but no constructor. + // Not implemented in Edge. + if (!window.RTCIceCandidate) { + window.RTCIceCandidate = function(args) { + return args; + }; + } + // ORTC does not have a session description object but + // other browsers (i.e. Chrome) that will support both PC and ORTC + // in the future might have this defined already. + if (!window.RTCSessionDescription) { + window.RTCSessionDescription = function(args) { + return args; + }; + } + // this adds an additional event listener to MediaStrackTrack that signals + // when a tracks enabled property was changed. Workaround for a bug in + // addStream, see below. No longer required in 15025+ + if (browserDetails.version < 15025) { + var origMSTEnabled = Object.getOwnPropertyDescriptor( + MediaStreamTrack.prototype, 'enabled'); + Object.defineProperty(MediaStreamTrack.prototype, 'enabled', { + set: function(value) { + origMSTEnabled.set.call(this, value); + var ev = new Event('enabled'); + ev.enabled = value; + this.dispatchEvent(ev); + } + }); + } + } + + window.RTCPeerConnection = function(config) { + var self = this; + + var _eventTarget = document.createDocumentFragment(); + ['addEventListener', 'removeEventListener', 'dispatchEvent'] + .forEach(function(method) { + self[method] = _eventTarget[method].bind(_eventTarget); + }); + + this.onicecandidate = null; + this.onaddstream = null; + this.ontrack = null; + this.onremovestream = null; + this.onsignalingstatechange = null; + this.oniceconnectionstatechange = null; + this.onicegatheringstatechange = null; + this.onnegotiationneeded = null; + this.ondatachannel = null; + + this.localStreams = []; + this.remoteStreams = []; + this.getLocalStreams = function() { + return self.localStreams; + }; + this.getRemoteStreams = function() { + return self.remoteStreams; + }; + + this.localDescription = new RTCSessionDescription({ + type: '', + sdp: '' + }); + this.remoteDescription = new RTCSessionDescription({ + type: '', + sdp: '' + }); + this.signalingState = 'stable'; + this.iceConnectionState = 'new'; + this.iceGatheringState = 'new'; + + this.iceOptions = { + gatherPolicy: 'all', + iceServers: [] + }; + if (config && config.iceTransportPolicy) { + switch (config.iceTransportPolicy) { + case 'all': + case 'relay': + this.iceOptions.gatherPolicy = config.iceTransportPolicy; + break; + default: + // don't set iceTransportPolicy. + break; + } + } + this.usingBundle = config && config.bundlePolicy === 'max-bundle'; + + if (config && config.iceServers) { + this.iceOptions.iceServers = filterIceServers(config.iceServers); + } + this._config = config; + + // per-track iceGathers, iceTransports, dtlsTransports, rtpSenders, ... + // everything that is needed to describe a SDP m-line. + this.transceivers = []; + + // since the iceGatherer is currently created in createOffer but we + // must not emit candidates until after setLocalDescription we buffer + // them in this array. + this._localIceCandidatesBuffer = []; + }; + + window.RTCPeerConnection.prototype._emitGatheringStateChange = function() { + var event = new Event('icegatheringstatechange'); + this.dispatchEvent(event); + if (this.onicegatheringstatechange !== null) { + this.onicegatheringstatechange(event); + } + }; + + window.RTCPeerConnection.prototype._emitBufferedCandidates = function() { + var self = this; + var sections = SDPUtils.splitSections(self.localDescription.sdp); + // FIXME: need to apply ice candidates in a way which is async but + // in-order + this._localIceCandidatesBuffer.forEach(function(event) { + var end = !event.candidate || Object.keys(event.candidate).length === 0; + if (end) { + for (var j = 1; j < sections.length; j++) { + if (sections[j].indexOf('\r\na=end-of-candidates\r\n') === -1) { + sections[j] += 'a=end-of-candidates\r\n'; + } + } + } else { + sections[event.candidate.sdpMLineIndex + 1] += + 'a=' + event.candidate.candidate + '\r\n'; + } + self.localDescription.sdp = sections.join(''); + self.dispatchEvent(event); + if (self.onicecandidate !== null) { + self.onicecandidate(event); + } + if (!event.candidate && self.iceGatheringState !== 'complete') { + var complete = self.transceivers.every(function(transceiver) { + return transceiver.iceGatherer && + transceiver.iceGatherer.state === 'completed'; + }); + if (complete && self.iceGatheringStateChange !== 'complete') { + self.iceGatheringState = 'complete'; + self._emitGatheringStateChange(); + } + } + }); + this._localIceCandidatesBuffer = []; + }; + + window.RTCPeerConnection.prototype.getConfiguration = function() { + return this._config; + }; + + window.RTCPeerConnection.prototype.addStream = function(stream) { + if (browserDetails.version >= 15025) { + this.localStreams.push(stream); + } else { + // Clone is necessary for local demos mostly, attaching directly + // to two different senders does not work (build 10547). + // Fixed in 15025 (or earlier) + var clonedStream = stream.clone(); + stream.getTracks().forEach(function(track, idx) { + var clonedTrack = clonedStream.getTracks()[idx]; + track.addEventListener('enabled', function(event) { + clonedTrack.enabled = event.enabled; + }); + }); + this.localStreams.push(clonedStream); + } + this._maybeFireNegotiationNeeded(); + }; + + window.RTCPeerConnection.prototype.removeStream = function(stream) { + var idx = this.localStreams.indexOf(stream); + if (idx > -1) { + this.localStreams.splice(idx, 1); + this._maybeFireNegotiationNeeded(); + } + }; + + window.RTCPeerConnection.prototype.getSenders = function() { + return this.transceivers.filter(function(transceiver) { + return !!transceiver.rtpSender; + }) + .map(function(transceiver) { + return transceiver.rtpSender; + }); + }; + + window.RTCPeerConnection.prototype.getReceivers = function() { + return this.transceivers.filter(function(transceiver) { + return !!transceiver.rtpReceiver; + }) + .map(function(transceiver) { + return transceiver.rtpReceiver; + }); + }; + + // Determines the intersection of local and remote capabilities. + window.RTCPeerConnection.prototype._getCommonCapabilities = + function(localCapabilities, remoteCapabilities) { + var commonCapabilities = { + codecs: [], + headerExtensions: [], + fecMechanisms: [] + }; + + var findCodecByPayloadType = function(pt, codecs) { + pt = parseInt(pt, 10); + for (var i = 0; i < codecs.length; i++) { + if (codecs[i].payloadType === pt || + codecs[i].preferredPayloadType === pt) { + return codecs[i]; + } + } + }; + + var rtxCapabilityMatches = function(lRtx, rRtx, lCodecs, rCodecs) { + var lCodec = findCodecByPayloadType(lRtx.parameters.apt, lCodecs); + var rCodec = findCodecByPayloadType(rRtx.parameters.apt, rCodecs); + return lCodec && rCodec && + lCodec.name.toLowerCase() === rCodec.name.toLowerCase(); + }; + + localCapabilities.codecs.forEach(function(lCodec) { + for (var i = 0; i < remoteCapabilities.codecs.length; i++) { + var rCodec = remoteCapabilities.codecs[i]; + if (lCodec.name.toLowerCase() === rCodec.name.toLowerCase() && + lCodec.clockRate === rCodec.clockRate) { + if (lCodec.name.toLowerCase() === 'rtx' && + lCodec.parameters && rCodec.parameters.apt) { + // for RTX we need to find the local rtx that has a apt + // which points to the same local codec as the remote one. + if (!rtxCapabilityMatches(lCodec, rCodec, + localCapabilities.codecs, remoteCapabilities.codecs)) { + continue; + } + } + rCodec = JSON.parse(JSON.stringify(rCodec)); // deepcopy + // number of channels is the highest common number of channels + rCodec.numChannels = Math.min(lCodec.numChannels, + rCodec.numChannels); + // push rCodec so we reply with offerer payload type + commonCapabilities.codecs.push(rCodec); + + // determine common feedback mechanisms + rCodec.rtcpFeedback = rCodec.rtcpFeedback.filter(function(fb) { + for (var j = 0; j < lCodec.rtcpFeedback.length; j++) { + if (lCodec.rtcpFeedback[j].type === fb.type && + lCodec.rtcpFeedback[j].parameter === fb.parameter) { + return true; + } + } + return false; + }); + // FIXME: also need to determine .parameters + // see https://github.com/openpeer/ortc/issues/569 + break; + } + } + }); + + localCapabilities.headerExtensions + .forEach(function(lHeaderExtension) { + for (var i = 0; i < remoteCapabilities.headerExtensions.length; + i++) { + var rHeaderExtension = remoteCapabilities.headerExtensions[i]; + if (lHeaderExtension.uri === rHeaderExtension.uri) { + commonCapabilities.headerExtensions.push(rHeaderExtension); + break; + } + } + }); + + // FIXME: fecMechanisms + return commonCapabilities; + }; + + // Create ICE gatherer, ICE transport and DTLS transport. + window.RTCPeerConnection.prototype._createIceAndDtlsTransports = + function(mid, sdpMLineIndex) { + var self = this; + var iceGatherer = new RTCIceGatherer(self.iceOptions); + var iceTransport = new RTCIceTransport(iceGatherer); + iceGatherer.onlocalcandidate = function(evt) { + var event = new Event('icecandidate'); + event.candidate = {sdpMid: mid, sdpMLineIndex: sdpMLineIndex}; + + var cand = evt.candidate; + var end = !cand || Object.keys(cand).length === 0; + // Edge emits an empty object for RTCIceCandidateComplete‥ + if (end) { + // polyfill since RTCIceGatherer.state is not implemented in + // Edge 10547 yet. + if (iceGatherer.state === undefined) { + iceGatherer.state = 'completed'; + } + } else { + // RTCIceCandidate doesn't have a component, needs to be added + cand.component = iceTransport.component === 'RTCP' ? 2 : 1; + event.candidate.candidate = SDPUtils.writeCandidate(cand); + } + + // update local description. + var sections = SDPUtils.splitSections(self.localDescription.sdp); + if (!end) { + sections[event.candidate.sdpMLineIndex + 1] += + 'a=' + event.candidate.candidate + '\r\n'; + } else { + sections[event.candidate.sdpMLineIndex + 1] += + 'a=end-of-candidates\r\n'; + } + self.localDescription.sdp = sections.join(''); + var transceivers = self._pendingOffer ? self._pendingOffer : + self.transceivers; + var complete = transceivers.every(function(transceiver) { + return transceiver.iceGatherer && + transceiver.iceGatherer.state === 'completed'; + }); + + // Emit candidate if localDescription is set. + // Also emits null candidate when all gatherers are complete. + switch (self.iceGatheringState) { + case 'new': + if (!end) { + self._localIceCandidatesBuffer.push(event); + } + if (end && complete) { + self._localIceCandidatesBuffer.push( + new Event('icecandidate')); + } + break; + case 'gathering': + self._emitBufferedCandidates(); + if (!end) { + self.dispatchEvent(event); + if (self.onicecandidate !== null) { + self.onicecandidate(event); + } + } + if (complete) { + self.dispatchEvent(new Event('icecandidate')); + if (self.onicecandidate !== null) { + self.onicecandidate(new Event('icecandidate')); + } + self.iceGatheringState = 'complete'; + self._emitGatheringStateChange(); + } + break; + case 'complete': + // should not happen... currently! + break; + default: // no-op. + break; + } + }; + iceTransport.onicestatechange = function() { + self._updateConnectionState(); + }; + + var dtlsTransport = new RTCDtlsTransport(iceTransport); + dtlsTransport.ondtlsstatechange = function() { + self._updateConnectionState(); + }; + dtlsTransport.onerror = function() { + // onerror does not set state to failed by itself. + dtlsTransport.state = 'failed'; + self._updateConnectionState(); + }; + + return { + iceGatherer: iceGatherer, + iceTransport: iceTransport, + dtlsTransport: dtlsTransport + }; + }; + + // Start the RTP Sender and Receiver for a transceiver. + window.RTCPeerConnection.prototype._transceive = function(transceiver, + send, recv) { + var params = this._getCommonCapabilities(transceiver.localCapabilities, + transceiver.remoteCapabilities); + if (send && transceiver.rtpSender) { + params.encodings = transceiver.sendEncodingParameters; + params.rtcp = { + cname: SDPUtils.localCName + }; + if (transceiver.recvEncodingParameters.length) { + params.rtcp.ssrc = transceiver.recvEncodingParameters[0].ssrc; + } + transceiver.rtpSender.send(params); + } + if (recv && transceiver.rtpReceiver) { + // remove RTX field in Edge 14942 + if (transceiver.kind === 'video' + && transceiver.recvEncodingParameters + && browserDetails.version < 15019) { + transceiver.recvEncodingParameters.forEach(function(p) { + delete p.rtx; + }); + } + params.encodings = transceiver.recvEncodingParameters; + params.rtcp = { + cname: transceiver.cname + }; + if (transceiver.sendEncodingParameters.length) { + params.rtcp.ssrc = transceiver.sendEncodingParameters[0].ssrc; + } + transceiver.rtpReceiver.receive(params); + } + }; + + window.RTCPeerConnection.prototype.setLocalDescription = + function(description) { + var self = this; + var sections; + var sessionpart; + if (description.type === 'offer') { + // FIXME: What was the purpose of this empty if statement? + // if (!this._pendingOffer) { + // } else { + if (this._pendingOffer) { + // VERY limited support for SDP munging. Limited to: + // * changing the order of codecs + sections = SDPUtils.splitSections(description.sdp); + sessionpart = sections.shift(); + sections.forEach(function(mediaSection, sdpMLineIndex) { + var caps = SDPUtils.parseRtpParameters(mediaSection); + self._pendingOffer[sdpMLineIndex].localCapabilities = caps; + }); + this.transceivers = this._pendingOffer; + delete this._pendingOffer; + } + } else if (description.type === 'answer') { + sections = SDPUtils.splitSections(self.remoteDescription.sdp); + sessionpart = sections.shift(); + var isIceLite = SDPUtils.matchPrefix(sessionpart, + 'a=ice-lite').length > 0; + sections.forEach(function(mediaSection, sdpMLineIndex) { + var transceiver = self.transceivers[sdpMLineIndex]; + var iceGatherer = transceiver.iceGatherer; + var iceTransport = transceiver.iceTransport; + var dtlsTransport = transceiver.dtlsTransport; + var localCapabilities = transceiver.localCapabilities; + var remoteCapabilities = transceiver.remoteCapabilities; + + var rejected = mediaSection.split('\n', 1)[0] + .split(' ', 2)[1] === '0'; + + if (!rejected && !transceiver.isDatachannel) { + var remoteIceParameters = SDPUtils.getIceParameters( + mediaSection, sessionpart); + var remoteDtlsParameters = SDPUtils.getDtlsParameters( + mediaSection, sessionpart); + if (isIceLite) { + remoteDtlsParameters.role = 'server'; + } + + if (!self.usingBundle || sdpMLineIndex === 0) { + iceTransport.start(iceGatherer, remoteIceParameters, + isIceLite ? 'controlling' : 'controlled'); + dtlsTransport.start(remoteDtlsParameters); + } + + // Calculate intersection of capabilities. + var params = self._getCommonCapabilities(localCapabilities, + remoteCapabilities); + + // Start the RTCRtpSender. The RTCRtpReceiver for this + // transceiver has already been started in setRemoteDescription. + self._transceive(transceiver, + params.codecs.length > 0, + false); + } + }); + } + + this.localDescription = { + type: description.type, + sdp: description.sdp + }; + switch (description.type) { + case 'offer': + this._updateSignalingState('have-local-offer'); + break; + case 'answer': + this._updateSignalingState('stable'); + break; + default: + throw new TypeError('unsupported type "' + description.type + + '"'); + } + + // If a success callback was provided, emit ICE candidates after it + // has been executed. Otherwise, emit callback after the Promise is + // resolved. + var hasCallback = arguments.length > 1 && + typeof arguments[1] === 'function'; + if (hasCallback) { + var cb = arguments[1]; + window.setTimeout(function() { + cb(); + if (self.iceGatheringState === 'new') { + self.iceGatheringState = 'gathering'; + self._emitGatheringStateChange(); + } + self._emitBufferedCandidates(); + }, 0); + } + var p = Promise.resolve(); + p.then(function() { + if (!hasCallback) { + if (self.iceGatheringState === 'new') { + self.iceGatheringState = 'gathering'; + self._emitGatheringStateChange(); + } + // Usually candidates will be emitted earlier. + window.setTimeout(self._emitBufferedCandidates.bind(self), 500); + } + }); + return p; + }; + + window.RTCPeerConnection.prototype.setRemoteDescription = + function(description) { + var self = this; + var stream = new MediaStream(); + var receiverList = []; + var sections = SDPUtils.splitSections(description.sdp); + var sessionpart = sections.shift(); + var isIceLite = SDPUtils.matchPrefix(sessionpart, + 'a=ice-lite').length > 0; + this.usingBundle = SDPUtils.matchPrefix(sessionpart, + 'a=group:BUNDLE ').length > 0; + sections.forEach(function(mediaSection, sdpMLineIndex) { + var lines = SDPUtils.splitLines(mediaSection); + var mline = lines[0].substr(2).split(' '); + var kind = mline[0]; + var rejected = mline[1] === '0'; + var direction = SDPUtils.getDirection(mediaSection, sessionpart); + + var mid = SDPUtils.matchPrefix(mediaSection, 'a=mid:'); + if (mid.length) { + mid = mid[0].substr(6); + } else { + mid = SDPUtils.generateIdentifier(); + } + + // Reject datachannels which are not implemented yet. + if (kind === 'application' && mline[2] === 'DTLS/SCTP') { + self.transceivers[sdpMLineIndex] = { + mid: mid, + isDatachannel: true + }; + return; + } + + var transceiver; + var iceGatherer; + var iceTransport; + var dtlsTransport; + var rtpSender; + var rtpReceiver; + var sendEncodingParameters; + var recvEncodingParameters; + var localCapabilities; + + var track; + // FIXME: ensure the mediaSection has rtcp-mux set. + var remoteCapabilities = SDPUtils.parseRtpParameters(mediaSection); + var remoteIceParameters; + var remoteDtlsParameters; + if (!rejected) { + remoteIceParameters = SDPUtils.getIceParameters(mediaSection, + sessionpart); + remoteDtlsParameters = SDPUtils.getDtlsParameters(mediaSection, + sessionpart); + remoteDtlsParameters.role = 'client'; + } + recvEncodingParameters = + SDPUtils.parseRtpEncodingParameters(mediaSection); + + var cname; + // Gets the first SSRC. Note that with RTX there might be multiple + // SSRCs. + var remoteSsrc = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:') + .map(function(line) { + return SDPUtils.parseSsrcMedia(line); + }) + .filter(function(obj) { + return obj.attribute === 'cname'; + })[0]; + if (remoteSsrc) { + cname = remoteSsrc.value; + } + + var isComplete = SDPUtils.matchPrefix(mediaSection, + 'a=end-of-candidates', sessionpart).length > 0; + var cands = SDPUtils.matchPrefix(mediaSection, 'a=candidate:') + .map(function(cand) { + return SDPUtils.parseCandidate(cand); + }) + .filter(function(cand) { + return cand.component === '1'; + }); + if (description.type === 'offer' && !rejected) { + var transports = self.usingBundle && sdpMLineIndex > 0 ? { + iceGatherer: self.transceivers[0].iceGatherer, + iceTransport: self.transceivers[0].iceTransport, + dtlsTransport: self.transceivers[0].dtlsTransport + } : self._createIceAndDtlsTransports(mid, sdpMLineIndex); + + if (isComplete && (!self.usingBundle || sdpMLineIndex === 0)) { + transports.iceTransport.setRemoteCandidates(cands); + } + + localCapabilities = RTCRtpReceiver.getCapabilities(kind); + + // filter RTX until additional stuff needed for RTX is implemented + // in adapter.js + if (browserDetails.version < 15019) { + localCapabilities.codecs = localCapabilities.codecs.filter( + function(codec) { + return codec.name !== 'rtx'; + }); + } + + sendEncodingParameters = [{ + ssrc: (2 * sdpMLineIndex + 2) * 1001 + }]; + + if (direction === 'sendrecv' || direction === 'sendonly') { + rtpReceiver = new RTCRtpReceiver(transports.dtlsTransport, + kind); + + track = rtpReceiver.track; + receiverList.push([track, rtpReceiver]); + // FIXME: not correct when there are multiple streams but that + // is not currently supported in this shim. + stream.addTrack(track); + } + + // FIXME: look at direction. + if (self.localStreams.length > 0 && + self.localStreams[0].getTracks().length >= sdpMLineIndex) { + var localTrack; + if (kind === 'audio') { + localTrack = self.localStreams[0].getAudioTracks()[0]; + } else if (kind === 'video') { + localTrack = self.localStreams[0].getVideoTracks()[0]; + } + if (localTrack) { + // add RTX + if (browserDetails.version >= 15019 && kind === 'video') { + sendEncodingParameters[0].rtx = { + ssrc: (2 * sdpMLineIndex + 2) * 1001 + 1 + }; + } + rtpSender = new RTCRtpSender(localTrack, + transports.dtlsTransport); + } + } + + self.transceivers[sdpMLineIndex] = { + iceGatherer: transports.iceGatherer, + iceTransport: transports.iceTransport, + dtlsTransport: transports.dtlsTransport, + localCapabilities: localCapabilities, + remoteCapabilities: remoteCapabilities, + rtpSender: rtpSender, + rtpReceiver: rtpReceiver, + kind: kind, + mid: mid, + cname: cname, + sendEncodingParameters: sendEncodingParameters, + recvEncodingParameters: recvEncodingParameters + }; + // Start the RTCRtpReceiver now. The RTPSender is started in + // setLocalDescription. + self._transceive(self.transceivers[sdpMLineIndex], + false, + direction === 'sendrecv' || direction === 'sendonly'); + } else if (description.type === 'answer' && !rejected) { + transceiver = self.transceivers[sdpMLineIndex]; + iceGatherer = transceiver.iceGatherer; + iceTransport = transceiver.iceTransport; + dtlsTransport = transceiver.dtlsTransport; + rtpSender = transceiver.rtpSender; + rtpReceiver = transceiver.rtpReceiver; + sendEncodingParameters = transceiver.sendEncodingParameters; + localCapabilities = transceiver.localCapabilities; + + self.transceivers[sdpMLineIndex].recvEncodingParameters = + recvEncodingParameters; + self.transceivers[sdpMLineIndex].remoteCapabilities = + remoteCapabilities; + self.transceivers[sdpMLineIndex].cname = cname; + + if ((isIceLite || isComplete) && cands.length) { + iceTransport.setRemoteCandidates(cands); + } + if (!self.usingBundle || sdpMLineIndex === 0) { + iceTransport.start(iceGatherer, remoteIceParameters, + 'controlling'); + dtlsTransport.start(remoteDtlsParameters); + } + + self._transceive(transceiver, + direction === 'sendrecv' || direction === 'recvonly', + direction === 'sendrecv' || direction === 'sendonly'); + + if (rtpReceiver && + (direction === 'sendrecv' || direction === 'sendonly')) { + track = rtpReceiver.track; + receiverList.push([track, rtpReceiver]); + stream.addTrack(track); + } else { + // FIXME: actually the receiver should be created later. + delete transceiver.rtpReceiver; + } + } + }); + + this.remoteDescription = { + type: description.type, + sdp: description.sdp + }; + switch (description.type) { + case 'offer': + this._updateSignalingState('have-remote-offer'); + break; + case 'answer': + this._updateSignalingState('stable'); + break; + default: + throw new TypeError('unsupported type "' + description.type + + '"'); + } + if (stream.getTracks().length) { + self.remoteStreams.push(stream); + window.setTimeout(function() { + var event = new Event('addstream'); + event.stream = stream; + self.dispatchEvent(event); + if (self.onaddstream !== null) { + window.setTimeout(function() { + self.onaddstream(event); + }, 0); + } + + receiverList.forEach(function(item) { + var track = item[0]; + var receiver = item[1]; + var trackEvent = new Event('track'); + trackEvent.track = track; + trackEvent.receiver = receiver; + trackEvent.streams = [stream]; + self.dispatchEvent(trackEvent); + if (self.ontrack !== null) { + window.setTimeout(function() { + self.ontrack(trackEvent); + }, 0); + } + }); + }, 0); + } + if (arguments.length > 1 && typeof arguments[1] === 'function') { + window.setTimeout(arguments[1], 0); + } + return Promise.resolve(); + }; + + window.RTCPeerConnection.prototype.close = function() { + this.transceivers.forEach(function(transceiver) { + /* not yet + if (transceiver.iceGatherer) { + transceiver.iceGatherer.close(); + } + */ + if (transceiver.iceTransport) { + transceiver.iceTransport.stop(); + } + if (transceiver.dtlsTransport) { + transceiver.dtlsTransport.stop(); + } + if (transceiver.rtpSender) { + transceiver.rtpSender.stop(); + } + if (transceiver.rtpReceiver) { + transceiver.rtpReceiver.stop(); + } + }); + // FIXME: clean up tracks, local streams, remote streams, etc + this._updateSignalingState('closed'); + }; + + // Update the signaling state. + window.RTCPeerConnection.prototype._updateSignalingState = + function(newState) { + this.signalingState = newState; + var event = new Event('signalingstatechange'); + this.dispatchEvent(event); + if (this.onsignalingstatechange !== null) { + this.onsignalingstatechange(event); + } + }; + + // Determine whether to fire the negotiationneeded event. + window.RTCPeerConnection.prototype._maybeFireNegotiationNeeded = + function() { + // Fire away (for now). + var event = new Event('negotiationneeded'); + this.dispatchEvent(event); + if (this.onnegotiationneeded !== null) { + this.onnegotiationneeded(event); + } + }; + + // Update the connection state. + window.RTCPeerConnection.prototype._updateConnectionState = function() { + var self = this; + var newState; + var states = { + 'new': 0, + closed: 0, + connecting: 0, + checking: 0, + connected: 0, + completed: 0, + failed: 0 + }; + this.transceivers.forEach(function(transceiver) { + states[transceiver.iceTransport.state]++; + states[transceiver.dtlsTransport.state]++; + }); + // ICETransport.completed and connected are the same for this purpose. + states.connected += states.completed; + + newState = 'new'; + if (states.failed > 0) { + newState = 'failed'; + } else if (states.connecting > 0 || states.checking > 0) { + newState = 'connecting'; + } else if (states.disconnected > 0) { + newState = 'disconnected'; + } else if (states.new > 0) { + newState = 'new'; + } else if (states.connected > 0 || states.completed > 0) { + newState = 'connected'; + } + + if (newState !== self.iceConnectionState) { + self.iceConnectionState = newState; + var event = new Event('iceconnectionstatechange'); + this.dispatchEvent(event); + if (this.oniceconnectionstatechange !== null) { + this.oniceconnectionstatechange(event); + } + } + }; + + window.RTCPeerConnection.prototype.createOffer = function() { + var self = this; + if (this._pendingOffer) { + throw new Error('createOffer called while there is a pending offer.'); + } + var offerOptions; + if (arguments.length === 1 && typeof arguments[0] !== 'function') { + offerOptions = arguments[0]; + } else if (arguments.length === 3) { + offerOptions = arguments[2]; + } + + var tracks = []; + var numAudioTracks = 0; + var numVideoTracks = 0; + // Default to sendrecv. + if (this.localStreams.length) { + numAudioTracks = this.localStreams[0].getAudioTracks().length; + numVideoTracks = this.localStreams[0].getVideoTracks().length; + } + // Determine number of audio and video tracks we need to send/recv. + if (offerOptions) { + // Reject Chrome legacy constraints. + if (offerOptions.mandatory || offerOptions.optional) { + throw new TypeError( + 'Legacy mandatory/optional constraints not supported.'); + } + if (offerOptions.offerToReceiveAudio !== undefined) { + numAudioTracks = offerOptions.offerToReceiveAudio; + } + if (offerOptions.offerToReceiveVideo !== undefined) { + numVideoTracks = offerOptions.offerToReceiveVideo; + } + } + if (this.localStreams.length) { + // Push local streams. + this.localStreams[0].getTracks().forEach(function(track) { + tracks.push({ + kind: track.kind, + track: track, + wantReceive: track.kind === 'audio' ? + numAudioTracks > 0 : numVideoTracks > 0 + }); + if (track.kind === 'audio') { + numAudioTracks--; + } else if (track.kind === 'video') { + numVideoTracks--; + } + }); + } + // Create M-lines for recvonly streams. + while (numAudioTracks > 0 || numVideoTracks > 0) { + if (numAudioTracks > 0) { + tracks.push({ + kind: 'audio', + wantReceive: true + }); + numAudioTracks--; + } + if (numVideoTracks > 0) { + tracks.push({ + kind: 'video', + wantReceive: true + }); + numVideoTracks--; + } + } + // reorder tracks + tracks = sortTracks(tracks); + + var sdp = SDPUtils.writeSessionBoilerplate(); + var transceivers = []; + tracks.forEach(function(mline, sdpMLineIndex) { + // For each track, create an ice gatherer, ice transport, + // dtls transport, potentially rtpsender and rtpreceiver. + var track = mline.track; + var kind = mline.kind; + var mid = SDPUtils.generateIdentifier(); + + var transports = self.usingBundle && sdpMLineIndex > 0 ? { + iceGatherer: transceivers[0].iceGatherer, + iceTransport: transceivers[0].iceTransport, + dtlsTransport: transceivers[0].dtlsTransport + } : self._createIceAndDtlsTransports(mid, sdpMLineIndex); + + var localCapabilities = RTCRtpSender.getCapabilities(kind); + // filter RTX until additional stuff needed for RTX is implemented + // in adapter.js + if (browserDetails.version < 15019) { + localCapabilities.codecs = localCapabilities.codecs.filter( + function(codec) { + return codec.name !== 'rtx'; + }); + } + localCapabilities.codecs.forEach(function(codec) { + // work around https://bugs.chromium.org/p/webrtc/issues/detail?id=6552 + // by adding level-asymmetry-allowed=1 + if (codec.name === 'H264' && + codec.parameters['level-asymmetry-allowed'] === undefined) { + codec.parameters['level-asymmetry-allowed'] = '1'; + } + }); + + var rtpSender; + var rtpReceiver; + + // generate an ssrc now, to be used later in rtpSender.send + var sendEncodingParameters = [{ + ssrc: (2 * sdpMLineIndex + 1) * 1001 + }]; + if (track) { + // add RTX + if (browserDetails.version >= 15019 && kind === 'video') { + sendEncodingParameters[0].rtx = { + ssrc: (2 * sdpMLineIndex + 1) * 1001 + 1 + }; + } + rtpSender = new RTCRtpSender(track, transports.dtlsTransport); + } + + if (mline.wantReceive) { + rtpReceiver = new RTCRtpReceiver(transports.dtlsTransport, kind); + } + + transceivers[sdpMLineIndex] = { + iceGatherer: transports.iceGatherer, + iceTransport: transports.iceTransport, + dtlsTransport: transports.dtlsTransport, + localCapabilities: localCapabilities, + remoteCapabilities: null, + rtpSender: rtpSender, + rtpReceiver: rtpReceiver, + kind: kind, + mid: mid, + sendEncodingParameters: sendEncodingParameters, + recvEncodingParameters: null + }; + }); + if (this.usingBundle) { + sdp += 'a=group:BUNDLE ' + transceivers.map(function(t) { + return t.mid; + }).join(' ') + '\r\n'; + } + tracks.forEach(function(mline, sdpMLineIndex) { + var transceiver = transceivers[sdpMLineIndex]; + sdp += SDPUtils.writeMediaSection(transceiver, + transceiver.localCapabilities, 'offer', self.localStreams[0]); + }); + + this._pendingOffer = transceivers; + var desc = new RTCSessionDescription({ + type: 'offer', + sdp: sdp + }); + if (arguments.length && typeof arguments[0] === 'function') { + window.setTimeout(arguments[0], 0, desc); + } + return Promise.resolve(desc); + }; + + window.RTCPeerConnection.prototype.createAnswer = function() { + var self = this; + + var sdp = SDPUtils.writeSessionBoilerplate(); + if (this.usingBundle) { + sdp += 'a=group:BUNDLE ' + this.transceivers.map(function(t) { + return t.mid; + }).join(' ') + '\r\n'; + } + this.transceivers.forEach(function(transceiver) { + if (transceiver.isDatachannel) { + sdp += 'm=application 0 DTLS/SCTP 5000\r\n' + + 'c=IN IP4 0.0.0.0\r\n' + + 'a=mid:' + transceiver.mid + '\r\n'; + return; + } + // Calculate intersection of capabilities. + var commonCapabilities = self._getCommonCapabilities( + transceiver.localCapabilities, + transceiver.remoteCapabilities); + + sdp += SDPUtils.writeMediaSection(transceiver, commonCapabilities, + 'answer', self.localStreams[0]); + }); + + var desc = new RTCSessionDescription({ + type: 'answer', + sdp: sdp + }); + if (arguments.length && typeof arguments[0] === 'function') { + window.setTimeout(arguments[0], 0, desc); + } + return Promise.resolve(desc); + }; + + window.RTCPeerConnection.prototype.addIceCandidate = function(candidate) { + if (!candidate) { + for (var j = 0; j < this.transceivers.length; j++) { + this.transceivers[j].iceTransport.addRemoteCandidate({}); + if (this.usingBundle) { + return Promise.resolve(); + } + } + } else { + var mLineIndex = candidate.sdpMLineIndex; + if (candidate.sdpMid) { + for (var i = 0; i < this.transceivers.length; i++) { + if (this.transceivers[i].mid === candidate.sdpMid) { + mLineIndex = i; + break; + } + } + } + var transceiver = this.transceivers[mLineIndex]; + if (transceiver) { + var cand = Object.keys(candidate.candidate).length > 0 ? + SDPUtils.parseCandidate(candidate.candidate) : {}; + // Ignore Chrome's invalid candidates since Edge does not like them. + if (cand.protocol === 'tcp' && (cand.port === 0 || cand.port === 9)) { + return Promise.resolve(); + } + // Ignore RTCP candidates, we assume RTCP-MUX. + if (cand.component !== '1') { + return Promise.resolve(); + } + transceiver.iceTransport.addRemoteCandidate(cand); + + // update the remoteDescription. + var sections = SDPUtils.splitSections(this.remoteDescription.sdp); + sections[mLineIndex + 1] += (cand.type ? candidate.candidate.trim() + : 'a=end-of-candidates') + '\r\n'; + this.remoteDescription.sdp = sections.join(''); + } + } + if (arguments.length > 1 && typeof arguments[1] === 'function') { + window.setTimeout(arguments[1], 0); + } + return Promise.resolve(); + }; + + window.RTCPeerConnection.prototype.getStats = function() { + var promises = []; + this.transceivers.forEach(function(transceiver) { + ['rtpSender', 'rtpReceiver', 'iceGatherer', 'iceTransport', + 'dtlsTransport'].forEach(function(method) { + if (transceiver[method]) { + promises.push(transceiver[method].getStats()); + } + }); + }); + var cb = arguments.length > 1 && typeof arguments[1] === 'function' && + arguments[1]; + var fixStatsType = function(stat) { + return { + inboundrtp: 'inbound-rtp', + outboundrtp: 'outbound-rtp', + candidatepair: 'candidate-pair', + localcandidate: 'local-candidate', + remotecandidate: 'remote-candidate' + }[stat.type] || stat.type; + }; + return new Promise(function(resolve) { + // shim getStats with maplike support + var results = new Map(); + Promise.all(promises).then(function(res) { + res.forEach(function(result) { + Object.keys(result).forEach(function(id) { + result[id].type = fixStatsType(result[id]); + results.set(id, result[id]); + }); + }); + if (cb) { + window.setTimeout(cb, 0, results); + } + resolve(results); + }); + }); + }; + } +}; + +// Expose public methods. +module.exports = { + shimPeerConnection: edgeShim.shimPeerConnection, + shimGetUserMedia: require('./getusermedia') +}; + +},{"../utils":10,"./getusermedia":6,"sdp":1}],6:[function(require,module,exports){ +/* + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. + */ + /* eslint-env node */ +'use strict'; + +// Expose public methods. +module.exports = function() { + var shimError_ = function(e) { + return { + name: {PermissionDeniedError: 'NotAllowedError'}[e.name] || e.name, + message: e.message, + constraint: e.constraint, + toString: function() { + return this.name; + } + }; + }; + + // getUserMedia error shim. + var origGetUserMedia = navigator.mediaDevices.getUserMedia. + bind(navigator.mediaDevices); + navigator.mediaDevices.getUserMedia = function(c) { + return origGetUserMedia(c).catch(function(e) { + return Promise.reject(shimError_(e)); + }); + }; +}; + +},{}],7:[function(require,module,exports){ +/* + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. + */ + /* eslint-env node */ +'use strict'; + +var browserDetails = require('../utils').browserDetails; + +var firefoxShim = { + shimOnTrack: function() { + if (typeof window === 'object' && window.RTCPeerConnection && !('ontrack' in + window.RTCPeerConnection.prototype)) { + Object.defineProperty(window.RTCPeerConnection.prototype, 'ontrack', { + get: function() { + return this._ontrack; + }, + set: function(f) { + if (this._ontrack) { + this.removeEventListener('track', this._ontrack); + this.removeEventListener('addstream', this._ontrackpoly); + } + this.addEventListener('track', this._ontrack = f); + this.addEventListener('addstream', this._ontrackpoly = function(e) { + e.stream.getTracks().forEach(function(track) { + var event = new Event('track'); + event.track = track; + event.receiver = {track: track}; + event.streams = [e.stream]; + this.dispatchEvent(event); + }.bind(this)); + }.bind(this)); + } + }); + } + }, + + shimSourceObject: function() { + // Firefox has supported mozSrcObject since FF22, unprefixed in 42. + if (typeof window === 'object') { + if (window.HTMLMediaElement && + !('srcObject' in window.HTMLMediaElement.prototype)) { + // Shim the srcObject property, once, when HTMLMediaElement is found. + Object.defineProperty(window.HTMLMediaElement.prototype, 'srcObject', { + get: function() { + return this.mozSrcObject; + }, + set: function(stream) { + this.mozSrcObject = stream; + } + }); + } + } + }, + + shimPeerConnection: function() { + if (typeof window !== 'object' || !(window.RTCPeerConnection || + window.mozRTCPeerConnection)) { + return; // probably media.peerconnection.enabled=false in about:config + } + // The RTCPeerConnection object. + if (!window.RTCPeerConnection) { + window.RTCPeerConnection = function(pcConfig, pcConstraints) { + if (browserDetails.version < 38) { + // .urls is not supported in FF < 38. + // create RTCIceServers with a single url. + if (pcConfig && pcConfig.iceServers) { + var newIceServers = []; + for (var i = 0; i < pcConfig.iceServers.length; i++) { + var server = pcConfig.iceServers[i]; + if (server.hasOwnProperty('urls')) { + for (var j = 0; j < server.urls.length; j++) { + var newServer = { + url: server.urls[j] + }; + if (server.urls[j].indexOf('turn') === 0) { + newServer.username = server.username; + newServer.credential = server.credential; + } + newIceServers.push(newServer); + } + } else { + newIceServers.push(pcConfig.iceServers[i]); + } + } + pcConfig.iceServers = newIceServers; + } + } + return new mozRTCPeerConnection(pcConfig, pcConstraints); + }; + window.RTCPeerConnection.prototype = mozRTCPeerConnection.prototype; + + // wrap static methods. Currently just generateCertificate. + if (mozRTCPeerConnection.generateCertificate) { + Object.defineProperty(window.RTCPeerConnection, 'generateCertificate', { + get: function() { + return mozRTCPeerConnection.generateCertificate; + } + }); + } + + window.RTCSessionDescription = mozRTCSessionDescription; + window.RTCIceCandidate = mozRTCIceCandidate; + } + + // shim away need for obsolete RTCIceCandidate/RTCSessionDescription. + ['setLocalDescription', 'setRemoteDescription', 'addIceCandidate'] + .forEach(function(method) { + var nativeMethod = RTCPeerConnection.prototype[method]; + RTCPeerConnection.prototype[method] = function() { + arguments[0] = new ((method === 'addIceCandidate') ? + RTCIceCandidate : RTCSessionDescription)(arguments[0]); + return nativeMethod.apply(this, arguments); + }; + }); + + // support for addIceCandidate(null or undefined) + var nativeAddIceCandidate = + RTCPeerConnection.prototype.addIceCandidate; + RTCPeerConnection.prototype.addIceCandidate = function() { + if (!arguments[0]) { + if (arguments[1]) { + arguments[1].apply(null); + } + return Promise.resolve(); + } + return nativeAddIceCandidate.apply(this, arguments); + }; + + // shim getStats with maplike support + var makeMapStats = function(stats) { + var map = new Map(); + Object.keys(stats).forEach(function(key) { + map.set(key, stats[key]); + map[key] = stats[key]; + }); + return map; + }; + + var modernStatsTypes = { + inboundrtp: 'inbound-rtp', + outboundrtp: 'outbound-rtp', + candidatepair: 'candidate-pair', + localcandidate: 'local-candidate', + remotecandidate: 'remote-candidate' + }; + + var nativeGetStats = RTCPeerConnection.prototype.getStats; + RTCPeerConnection.prototype.getStats = function(selector, onSucc, onErr) { + return nativeGetStats.apply(this, [selector || null]) + .then(function(stats) { + if (browserDetails.version < 48) { + stats = makeMapStats(stats); + } + if (browserDetails.version < 53 && !onSucc) { + // Shim only promise getStats with spec-hyphens in type names + // Leave callback version alone; misc old uses of forEach before Map + try { + stats.forEach(function(stat) { + stat.type = modernStatsTypes[stat.type] || stat.type; + }); + } catch (e) { + if (e.name !== 'TypeError') { + throw e; + } + // Avoid TypeError: "type" is read-only, in old versions. 34-43ish + stats.forEach(function(stat, i) { + stats.set(i, Object.assign({}, stat, { + type: modernStatsTypes[stat.type] || stat.type + })); + }); + } + } + return stats; + }) + .then(onSucc, onErr); + }; + } +}; + +// Expose public methods. +module.exports = { + shimOnTrack: firefoxShim.shimOnTrack, + shimSourceObject: firefoxShim.shimSourceObject, + shimPeerConnection: firefoxShim.shimPeerConnection, + shimGetUserMedia: require('./getusermedia') +}; + +},{"../utils":10,"./getusermedia":8}],8:[function(require,module,exports){ +/* + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. + */ + /* eslint-env node */ +'use strict'; + +var logging = require('../utils').log; +var browserDetails = require('../utils').browserDetails; + +// Expose public methods. +module.exports = function() { + var shimError_ = function(e) { + return { + name: { + SecurityError: 'NotAllowedError', + PermissionDeniedError: 'NotAllowedError' + }[e.name] || e.name, + message: { + 'The operation is insecure.': 'The request is not allowed by the ' + + 'user agent or the platform in the current context.' + }[e.message] || e.message, + constraint: e.constraint, + toString: function() { + return this.name + (this.message && ': ') + this.message; + } + }; + }; + + // getUserMedia constraints shim. + var getUserMedia_ = function(constraints, onSuccess, onError) { + var constraintsToFF37_ = function(c) { + if (typeof c !== 'object' || c.require) { + return c; + } + var require = []; + Object.keys(c).forEach(function(key) { + if (key === 'require' || key === 'advanced' || key === 'mediaSource') { + return; + } + var r = c[key] = (typeof c[key] === 'object') ? + c[key] : {ideal: c[key]}; + if (r.min !== undefined || + r.max !== undefined || r.exact !== undefined) { + require.push(key); + } + if (r.exact !== undefined) { + if (typeof r.exact === 'number') { + r. min = r.max = r.exact; + } else { + c[key] = r.exact; + } + delete r.exact; + } + if (r.ideal !== undefined) { + c.advanced = c.advanced || []; + var oc = {}; + if (typeof r.ideal === 'number') { + oc[key] = {min: r.ideal, max: r.ideal}; + } else { + oc[key] = r.ideal; + } + c.advanced.push(oc); + delete r.ideal; + if (!Object.keys(r).length) { + delete c[key]; + } + } + }); + if (require.length) { + c.require = require; + } + return c; + }; + constraints = JSON.parse(JSON.stringify(constraints)); + if (browserDetails.version < 38) { + logging('spec: ' + JSON.stringify(constraints)); + if (constraints.audio) { + constraints.audio = constraintsToFF37_(constraints.audio); + } + if (constraints.video) { + constraints.video = constraintsToFF37_(constraints.video); + } + logging('ff37: ' + JSON.stringify(constraints)); + } + return navigator.mozGetUserMedia(constraints, onSuccess, function(e) { + onError(shimError_(e)); + }); + }; + + // Returns the result of getUserMedia as a Promise. + var getUserMediaPromise_ = function(constraints) { + return new Promise(function(resolve, reject) { + getUserMedia_(constraints, resolve, reject); + }); + }; + + // Shim for mediaDevices on older versions. + if (!navigator.mediaDevices) { + navigator.mediaDevices = {getUserMedia: getUserMediaPromise_, + addEventListener: function() { }, + removeEventListener: function() { } + }; + } + navigator.mediaDevices.enumerateDevices = + navigator.mediaDevices.enumerateDevices || function() { + return new Promise(function(resolve) { + var infos = [ + {kind: 'audioinput', deviceId: 'default', label: '', groupId: ''}, + {kind: 'videoinput', deviceId: 'default', label: '', groupId: ''} + ]; + resolve(infos); + }); + }; + + if (browserDetails.version < 41) { + // Work around http://bugzil.la/1169665 + var orgEnumerateDevices = + navigator.mediaDevices.enumerateDevices.bind(navigator.mediaDevices); + navigator.mediaDevices.enumerateDevices = function() { + return orgEnumerateDevices().then(undefined, function(e) { + if (e.name === 'NotFoundError') { + return []; + } + throw e; + }); + }; + } + if (browserDetails.version < 49) { + var origGetUserMedia = navigator.mediaDevices.getUserMedia. + bind(navigator.mediaDevices); + navigator.mediaDevices.getUserMedia = function(c) { + return origGetUserMedia(c).then(function(stream) { + // Work around https://bugzil.la/802326 + if (c.audio && !stream.getAudioTracks().length || + c.video && !stream.getVideoTracks().length) { + stream.getTracks().forEach(function(track) { + track.stop(); + }); + throw new DOMException('The object can not be found here.', + 'NotFoundError'); + } + return stream; + }, function(e) { + return Promise.reject(shimError_(e)); + }); + }; + } + navigator.getUserMedia = function(constraints, onSuccess, onError) { + if (browserDetails.version < 44) { + return getUserMedia_(constraints, onSuccess, onError); + } + // Replace Firefox 44+'s deprecation warning with unprefixed version. + console.warn('navigator.getUserMedia has been replaced by ' + + 'navigator.mediaDevices.getUserMedia'); + navigator.mediaDevices.getUserMedia(constraints).then(onSuccess, onError); + }; +}; + +},{"../utils":10}],9:[function(require,module,exports){ +/* + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. + */ +'use strict'; +var safariShim = { + // TODO: DrAlex, should be here, double check against LayoutTests + // shimOnTrack: function() { }, + + // TODO: once the back-end for the mac port is done, add. + // TODO: check for webkitGTK+ + // shimPeerConnection: function() { }, + + shimGetUserMedia: function() { + if (!navigator.getUserMedia) { + if (navigator.webkitGetUserMedia) { + navigator.getUserMedia = navigator.webkitGetUserMedia.bind(navigator); + } else if (navigator.mediaDevices && + navigator.mediaDevices.getUserMedia) { + navigator.getUserMedia = function(constraints, cb, errcb) { + navigator.mediaDevices.getUserMedia(constraints) + .then(cb, errcb); + }.bind(navigator); + } + } + } +}; + +// Expose public methods. +module.exports = { + shimGetUserMedia: safariShim.shimGetUserMedia + // TODO + // shimOnTrack: safariShim.shimOnTrack, + // shimPeerConnection: safariShim.shimPeerConnection +}; + +},{}],10:[function(require,module,exports){ +/* + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. + */ + /* eslint-env node */ +'use strict'; + +var logDisabled_ = true; + +// Utility methods. +var utils = { + disableLog: function(bool) { + if (typeof bool !== 'boolean') { + return new Error('Argument type: ' + typeof bool + + '. Please use a boolean.'); + } + logDisabled_ = bool; + return (bool) ? 'adapter.js logging disabled' : + 'adapter.js logging enabled'; + }, + + log: function() { + if (typeof window === 'object') { + if (logDisabled_) { + return; + } + if (typeof console !== 'undefined' && typeof console.log === 'function') { + console.log.apply(console, arguments); + } + } + }, + + /** + * Extract browser version out of the provided user agent string. + * + * @param {!string} uastring userAgent string. + * @param {!string} expr Regular expression used as match criteria. + * @param {!number} pos position in the version string to be returned. + * @return {!number} browser version. + */ + extractVersion: function(uastring, expr, pos) { + var match = uastring.match(expr); + return match && match.length >= pos && parseInt(match[pos], 10); + }, + + /** + * Browser detector. + * + * @return {object} result containing browser and version + * properties. + */ + detectBrowser: function() { + // Returned result object. + var result = {}; + result.browser = null; + result.version = null; + + // Fail early if it's not a browser + if (typeof window === 'undefined' || !window.navigator) { + result.browser = 'Not a browser.'; + return result; + } + + // Firefox. + if (navigator.mozGetUserMedia) { + result.browser = 'firefox'; + result.version = this.extractVersion(navigator.userAgent, + /Firefox\/(\d+)\./, 1); + } else if (navigator.webkitGetUserMedia) { + // Chrome, Chromium, Webview, Opera, all use the chrome shim for now + if (window.webkitRTCPeerConnection) { + result.browser = 'chrome'; + result.version = this.extractVersion(navigator.userAgent, + /Chrom(e|ium)\/(\d+)\./, 2); + } else { // Safari (in an unpublished version) or unknown webkit-based. + if (navigator.userAgent.match(/Version\/(\d+).(\d+)/)) { + result.browser = 'safari'; + result.version = this.extractVersion(navigator.userAgent, + /AppleWebKit\/(\d+)\./, 1); + } else { // unknown webkit-based browser. + result.browser = 'Unsupported webkit-based browser ' + + 'with GUM support but no WebRTC support.'; + return result; + } + } + } else if (navigator.mediaDevices && + navigator.userAgent.match(/Edge\/(\d+).(\d+)$/)) { // Edge. + result.browser = 'edge'; + result.version = this.extractVersion(navigator.userAgent, + /Edge\/(\d+).(\d+)$/, 2); + } else if (navigator.mediaDevices && + navigator.userAgent.match(/AppleWebKit\/(\d+)\./)) { + // Safari, with webkitGetUserMedia removed. + result.browser = 'safari'; + result.version = this.extractVersion(navigator.userAgent, + /AppleWebKit\/(\d+)\./, 1); + } else { // Default fallthrough: not supported. + result.browser = 'Not a supported browser.'; + return result; + } + + return result; + }, + + // shimCreateObjectURL must be called before shimSourceObject to avoid loop. + + shimCreateObjectURL: function() { + if (!(typeof window === 'object' && window.HTMLMediaElement && + 'srcObject' in window.HTMLMediaElement.prototype)) { + // Only shim CreateObjectURL using srcObject if srcObject exists. + return undefined; + } + + var nativeCreateObjectURL = URL.createObjectURL.bind(URL); + var nativeRevokeObjectURL = URL.revokeObjectURL.bind(URL); + var streams = new Map(), newId = 0; + + URL.createObjectURL = function(stream) { + if ('getTracks' in stream) { + var url = 'polyblob:' + (++newId); + streams.set(url, stream); + console.log('URL.createObjectURL(stream) is deprecated! ' + + 'Use elem.srcObject = stream instead!'); + return url; + } + return nativeCreateObjectURL(stream); + }; + URL.revokeObjectURL = function(url) { + nativeRevokeObjectURL(url); + streams.delete(url); + }; + + var dsc = Object.getOwnPropertyDescriptor(window.HTMLMediaElement.prototype, + 'src'); + Object.defineProperty(window.HTMLMediaElement.prototype, 'src', { + get: function() { + return dsc.get.apply(this); + }, + set: function(url) { + this.srcObject = streams.get(url) || null; + return dsc.set.apply(this, [url]); + } + }); + + var nativeSetAttribute = HTMLMediaElement.prototype.setAttribute; + HTMLMediaElement.prototype.setAttribute = function() { + if (arguments.length === 2 && + ('' + arguments[0]).toLowerCase() === 'src') { + this.srcObject = streams.get(arguments[1]) || null; + } + return nativeSetAttribute.apply(this, arguments); + }; + } +}; + +// Export. +module.exports = { + log: utils.log, + disableLog: utils.disableLog, + browserDetails: utils.detectBrowser(), + extractVersion: utils.extractVersion, + shimCreateObjectURL: utils.shimCreateObjectURL, + detectBrowser: utils.detectBrowser.bind(utils) +}; + +},{}]},{},[2])(2) +}); \ No newline at end of file
diff --git a/tools/perf/page_sets/webrtc_cases/audio.html b/tools/perf/page_sets/webrtc_cases/audio.html new file mode 100644 index 0000000..035888d --- /dev/null +++ b/tools/perf/page_sets/webrtc_cases/audio.html
@@ -0,0 +1,63 @@ +<!DOCTYPE html> +<!-- + * Copyright 2017 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. +--> +<html> +<head> + + + <base target="_blank"> + + <title>Peer connection: audio only</title> + + +</head> + +<body> + + <div id="container"> + + <h1><a href="//webrtc.github.io/samples/" title="WebRTC samples homepage">WebRTC samples</a> <span>Peer connection: audio only</span></h1> + + <div id="audio"> + <div> + <div class="label">Local audio:</div><audio id="audio1" autoplay controls muted></audio> + </div> + <div> + <div class="label">Remote audio:</div><audio id="audio2" autoplay controls></audio> + </div> + </div> + + <div id="buttons"> + <select id="codec"> + <!-- Codec values are matched with how they appear in the SDP. + For instance, opus matches opus/48000/2 in Chrome, and ISAC/16000 + matches 16K iSAC (but not 32K iSAC). --> + <option value="opus">Opus</option> + <option value="ISAC">iSAC 16K</option> + <option value="G722">G722</option> + <option value="PCMU">PCMU</option> + </select> + <button id="callButton">Call</button> + <button id="hangupButton">Hang Up</button> + </div> + <div class="graph-container" id="bitrateGraph"> + <div>Bitrate</div> + <canvas id="bitrateCanvas"></canvas> + </div> + <div class="graph-container" id="packetGraph"> + <div>Packets sent per second</div> + <canvas id="packetCanvas"></canvas> + </div> + + <a href="https://github.com/webrtc/samples/tree/gh-pages/src/content/peerconnection/audio" title="View source for this page on GitHub" id="viewSource">View source on GitHub</a> + + </div> + + +<script src="audio.js"></script> +<script src="adapter.js"></script> +<script src="common.js"></script> +</body></html>
diff --git a/tools/perf/page_sets/webrtc_cases/audio.js b/tools/perf/page_sets/webrtc_cases/audio.js new file mode 100644 index 0000000..2485837 --- /dev/null +++ b/tools/perf/page_sets/webrtc_cases/audio.js
@@ -0,0 +1,302 @@ +/* + * Copyright 2017 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. + */ + +'use strict'; + +var audio2 = document.querySelector('audio#audio2'); +var callButton = document.querySelector('button#callButton'); +var hangupButton = document.querySelector('button#hangupButton'); +var codecSelector = document.querySelector('select#codec'); +hangupButton.disabled = true; +callButton.onclick = call; +hangupButton.onclick = hangup; + +var pc1; +var pc2; +var localStream; + +var bitrateGraph; +var bitrateSeries; + +var packetGraph; +var packetSeries; + +var lastResult; + +var offerOptions = { + offerToReceiveAudio: 1, + offerToReceiveVideo: 0, + voiceActivityDetection: false +}; + +function gotStream(stream) { + hangupButton.disabled = false; + trace('Received local stream'); + localStream = stream; + var audioTracks = localStream.getAudioTracks(); + if (audioTracks.length > 0) { + trace('Using Audio device: ' + audioTracks[0].label); + } + pc1.addStream(localStream); + trace('Adding Local Stream to peer connection'); + + pc1.createOffer( + offerOptions + ).then( + gotDescription1, + onCreateSessionDescriptionError + ); + + bitrateSeries = new TimelineDataSeries(); + bitrateGraph = new TimelineGraphView('bitrateGraph', 'bitrateCanvas'); + bitrateGraph.updateEndDate(); + + packetSeries = new TimelineDataSeries(); + packetGraph = new TimelineGraphView('packetGraph', 'packetCanvas'); + packetGraph.updateEndDate(); +} + +function onCreateSessionDescriptionError(error) { + trace('Failed to create session description: ' + error.toString()); +} + +function call() { + callButton.disabled = true; + codecSelector.disabled = true; + trace('Starting call'); + var servers = null; + var pcConstraints = { + 'optional': [] + }; + pc1 = new RTCPeerConnection(servers, pcConstraints); + trace('Created local peer connection object pc1'); + pc1.onicecandidate = function(e) { + onIceCandidate(pc1, e); + }; + pc2 = new RTCPeerConnection(servers, pcConstraints); + trace('Created remote peer connection object pc2'); + pc2.onicecandidate = function(e) { + onIceCandidate(pc2, e); + }; + pc2.onaddstream = gotRemoteStream; + trace('Requesting local stream'); + navigator.mediaDevices.getUserMedia({ + audio: true, + video: false + }) + .then(gotStream) + .catch(function(e) { + alert('getUserMedia() error: ' + e.name); + }); +} + +function gotDescription1(desc) { + trace('Offer from pc1 \n' + desc.sdp); + pc1.setLocalDescription(desc).then( + function() { + desc.sdp = forceChosenAudioCodec(desc.sdp); + pc2.setRemoteDescription(desc).then( + function() { + pc2.createAnswer().then( + gotDescription2, + onCreateSessionDescriptionError + ); + }, + onSetSessionDescriptionError + ); + }, + onSetSessionDescriptionError + ); +} + +function gotDescription2(desc) { + trace('Answer from pc2 \n' + desc.sdp); + pc2.setLocalDescription(desc).then( + function() { + desc.sdp = forceChosenAudioCodec(desc.sdp); + pc1.setRemoteDescription(desc).then( + function() { + }, + onSetSessionDescriptionError + ); + }, + onSetSessionDescriptionError + ); +} + +function hangup() { + trace('Ending call'); + localStream.getTracks().forEach(function(track) { + track.stop(); + }); + pc1.close(); + pc2.close(); + pc1 = null; + pc2 = null; + hangupButton.disabled = true; + callButton.disabled = false; + codecSelector.disabled = false; +} + +function gotRemoteStream(e) { + audio2.srcObject = e.stream; + trace('Received remote stream'); +} + +function getOtherPc(pc) { + return (pc === pc1) ? pc2 : pc1; +} + +function getName(pc) { + return (pc === pc1) ? 'pc1' : 'pc2'; +} + +function onIceCandidate(pc, event) { + getOtherPc(pc).addIceCandidate(event.candidate) + .then( + function() { + onAddIceCandidateSuccess(pc); + }, + function(err) { + onAddIceCandidateError(pc, err); + } + ); + trace(getName(pc) + ' ICE candidate: \n' + (event.candidate ? + event.candidate.candidate : '(null)')); +} + +function onAddIceCandidateSuccess() { + trace('AddIceCandidate success.'); +} + +function onAddIceCandidateError(error) { + trace('Failed to add ICE Candidate: ' + error.toString()); +} + +function onSetSessionDescriptionError(error) { + trace('Failed to set session description: ' + error.toString()); +} + +function forceChosenAudioCodec(sdp) { + return maybePreferCodec(sdp, 'audio', 'send', codecSelector.value); +} + +// Copied from AppRTC's sdputils.js: + +// Sets |codec| as the default |type| codec if it's present. +// The format of |codec| is 'NAME/RATE', e.g. 'opus/48000'. +function maybePreferCodec(sdp, type, dir, codec) { + var str = type + ' ' + dir + ' codec'; + if (codec === '') { + trace('No preference on ' + str + '.'); + return sdp; + } + + trace('Prefer ' + str + ': ' + codec); + + var sdpLines = sdp.split('\r\n'); + + // Search for m line. + var mLineIndex = findLine(sdpLines, 'm=', type); + if (mLineIndex === null) { + return sdp; + } + + // If the codec is available, set it as the default in m line. + var codecIndex = findLine(sdpLines, 'a=rtpmap', codec); + console.log('codecIndex', codecIndex); + if (codecIndex) { + var payload = getCodecPayloadType(sdpLines[codecIndex]); + if (payload) { + sdpLines[mLineIndex] = setDefaultCodec(sdpLines[mLineIndex], payload); + } + } + + sdp = sdpLines.join('\r\n'); + return sdp; +} + +// Find the line in sdpLines that starts with |prefix|, and, if specified, +// contains |substr| (case-insensitive search). +function findLine(sdpLines, prefix, substr) { + return findLineInRange(sdpLines, 0, -1, prefix, substr); +} + +// Find the line in sdpLines[startLine...endLine - 1] that starts with |prefix| +// and, if specified, contains |substr| (case-insensitive search). +function findLineInRange(sdpLines, startLine, endLine, prefix, substr) { + var realEndLine = endLine !== -1 ? endLine : sdpLines.length; + for (var i = startLine; i < realEndLine; ++i) { + if (sdpLines[i].indexOf(prefix) === 0) { + if (!substr || + sdpLines[i].toLowerCase().indexOf(substr.toLowerCase()) !== -1) { + return i; + } + } + } + return null; +} + +// Gets the codec payload type from an a=rtpmap:X line. +function getCodecPayloadType(sdpLine) { + var pattern = new RegExp('a=rtpmap:(\\d+) \\w+\\/\\d+'); + var result = sdpLine.match(pattern); + return (result && result.length === 2) ? result[1] : null; +} + +// Returns a new m= line with the specified codec as the first one. +function setDefaultCodec(mLine, payload) { + var elements = mLine.split(' '); + + // Just copy the first three parameters; codec order starts on fourth. + var newLine = elements.slice(0, 3); + + // Put target payload first and copy in the rest. + newLine.push(payload); + for (var i = 3; i < elements.length; i++) { + if (elements[i] !== payload) { + newLine.push(elements[i]); + } + } + return newLine.join(' '); +} + +// query getStats every second +window.setInterval(function() { + if (!window.pc1) { + return; + } + window.pc1.getStats(null).then(function(res) { + res.forEach(function(report) { + var bytes; + var packets; + var now = report.timestamp; + if ((report.type === 'outboundrtp') || + (report.type === 'outbound-rtp') || + (report.type === 'ssrc' && report.bytesSent)) { + bytes = report.bytesSent; + packets = report.packetsSent; + if (lastResult && lastResult.get(report.id)) { + // calculate bitrate + var bitrate = 8 * (bytes - lastResult.get(report.id).bytesSent) / + (now - lastResult.get(report.id).timestamp); + + // append to chart + bitrateSeries.addPoint(now, bitrate); + bitrateGraph.setDataSeries([bitrateSeries]); + bitrateGraph.updateEndDate(); + + // calculate number of packets and append to chart + packetSeries.addPoint(now, packets - + lastResult.get(report.id).packetsSent); + packetGraph.setDataSeries([packetSeries]); + packetGraph.updateEndDate(); + } + } + }); + lastResult = res; + }); +}, 1000);
diff --git a/tools/perf/page_sets/webrtc_cases/canvas-capture.html b/tools/perf/page_sets/webrtc_cases/canvas-capture.html new file mode 100644 index 0000000..340c6e16 --- /dev/null +++ b/tools/perf/page_sets/webrtc_cases/canvas-capture.html
@@ -0,0 +1,26 @@ +<!DOCTYPE html> +<!-- + * Copyright 2017 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. +--> +<html><head> + <title>Canvas capture stream to peerConnection</title> +</head> +<body> + <div id="container"> + <h1>Canvas capture stream to peerConnection</h1> + + <canvas id="canvas" width=32 height=24></canvas> + <video id="remoteVideo" width=32 height=24 autoplay=""></video> + + <div> + <button id="startButton" class="green">Start test</button> + </div> + </div> + + +<script src="canvas-capture.js"></script> +<script src="adapter.js"></script> +<script src="common.js"></script> +</body></html>
diff --git a/tools/perf/page_sets/webrtc_cases/canvas-capture.js b/tools/perf/page_sets/webrtc_cases/canvas-capture.js new file mode 100644 index 0000000..ce7e11d3 --- /dev/null +++ b/tools/perf/page_sets/webrtc_cases/canvas-capture.js
@@ -0,0 +1,96 @@ +/* + * Copyright 2017 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. + */ +'use strict'; + +const DEFAULT_FRAME_RATE = 30; + +var canvas = document.getElementById('canvas'); +var context = canvas.getContext('2d'); + +var remoteVideo = document.getElementById('remoteVideo'); +var startButton = document.getElementById('startButton'); +startButton.onclick = start; + +var pc1; +var pc2; +var stream; + +function logError(err) { + console.error(err); +} + +// This function draws a red rectangle on the canvas using +// requestAnimationFrame(). +function draw() { + window.requestAnimationFrame(draw); + context.rect(0, 0, canvas.clientWidth, canvas.clientHeight); + var randomNumber = Math.random(); + var hue; + if (randomNumber < 0.33) + hue = 'red'; + else if (randomNumber < 0.66) + hue = 'green'; + else + hue = 'blue'; + context.fillStyle = hue; + context.fill(); +} + +function start() { + startButton.onclick = hangup; + startButton.className = 'red'; + startButton.innerHTML = 'Stop test'; + draw(); + stream = canvas.captureStream(DEFAULT_FRAME_RATE); + call(); +} + +function call() { + var servers = null; + pc1 = new RTCPeerConnection(servers); + pc1.onicecandidate = (event) => { + if (event.candidate) { + pc2.addIceCandidate(event.candidate); + } + }; + + pc2 = new RTCPeerConnection(servers); + pc2.onicecandidate = (event) => { + if (event.candidate) { + pc1.addIceCandidate(event.candidate); + } + }; + pc2.onaddstream = (event) => { + remoteVideo.srcObject = event.stream; + }; + + pc1.addStream(stream); + pc1.createOffer({ + offerToReceiveAudio: 1, + offerToReceiveVideo: 1 + }).then(onCreateOfferSuccess, logError); +} + +function onCreateOfferSuccess(desc) { + pc1.setLocalDescription(desc); + pc2.setRemoteDescription(desc); + pc2.createAnswer().then(onCreateAnswerSuccess, logError); +} + +function onCreateAnswerSuccess(desc) { + pc2.setLocalDescription(desc); + pc1.setRemoteDescription(desc); +} + +function hangup() { + pc1.close(); + pc2.close(); + pc1 = null; + pc2 = null; + startButton.onclick = start; + startButton.className = 'green'; + startButton.innerHTML = 'Start test'; +}
diff --git a/tools/perf/page_sets/webrtc_cases/common.js b/tools/perf/page_sets/webrtc_cases/common.js new file mode 100644 index 0000000..047a000 --- /dev/null +++ b/tools/perf/page_sets/webrtc_cases/common.js
@@ -0,0 +1,12 @@ +/* + * Copyright 2017 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. + */ + /* exported trace */ + +// Logging utility function. +function trace(arg) { + var now = (window.performance.now() / 1000).toFixed(3); + console.log(now + ': ', arg); +}
diff --git a/tools/perf/page_sets/webrtc_cases/constraints.html b/tools/perf/page_sets/webrtc_cases/constraints.html new file mode 100644 index 0000000..e094ae6da --- /dev/null +++ b/tools/perf/page_sets/webrtc_cases/constraints.html
@@ -0,0 +1,99 @@ +<!DOCTYPE html> +<!-- + * Copyright 2017 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. +--> +<html> +<head> + + + <base target="_blank"> + + <title>Constraints and statistics</title> + + +</head> + +<body> + + <div id="container"> + + <h1><a href="//webrtc.github.io/samples/" title="WebRTC samples homepage">WebRTC samples</a> <span>Constraints & statistics</span></h1> + + <section id="blurb"> + <p>This demo shows ways to use constraints and statistics in WebRTC applications.</p> + <p>Set camera constraints, and click <strong>Get media</strong> to (re)open the camera with these included. Click <strong>Connect</strong> to create a (local) peer connection. The RTCPeerConnection objects <code>localPeerConnection</code> and <code>remotePeerConnection</code> can be inspected from the console.</p> + <p>Setting a value to zero will remove that constraint. </p> + <p>The lefthand video shows the output of <code>getUserMedia()</code>; on the right is the video after being passed through the peer connection. The transmission bitrate is displayed below the righthand video.</p> + </section> + + <div> + <button id="getMedia">Get media</button> + <button id="connect" disabled>Connect</button> + <button id="hangup" disabled>Hang Up</button> + </div> + + + <section id="constraints"> + <div id="getUserMedia"> + <div class="input"> + <h2>Camera constraints</h2> + <div id="minWidth"> + <label>Min width <span>300</span>px:</label> + <input type="range" min="0" max="1920" value="300"> + </div> + <div id="maxWidth"> + <label>Max width <span>640</span>px:</label> + <input type="range" min="0" max="1920" value="640"> + </div> + <div id="minHeight"> + <label>Min height <span>200</span>px:</label> + <input type="range" min="0" max="1080" value="200"> + </div> + <div id="maxHeight"> + <label>Max height <span>480</span>px:</label> + <input type="range" min="0" max="1080" value="480"> + </div> + <div id="minFramerate"> + <label>Min frameRate <span>0</span>fps:</label> + <input type="range" min="0" max="60" value="0"> + </div> + <div id="maxFramerate"> + <label>Max frameRate <span>0</span>fps:</label> + <input type="range" min="0" max="60" value="0"> + </div> + </div> + <div id="getUserMediaConstraints" class="output"></div> + </div> + + </section> + + <section id="video"> + <div id="localVideo"> + <video autoplay muted></video> + <div></div> + </div> + <div id="remoteVideo"> + <video autoplay muted></video> + <div></div> + <div id="bitrate"></div> + <div id="peer"></div> + </div> + </section> + + <section id="statistics"> + <div id="senderStats"></div> + <div id="receiverStats"></div> + </section> + + <a href="https://github.com/webrtc/samples/tree/gh-pages/src/content/peerconnection/constraints" title="View source for this page on GitHub" id="viewSource">View source on GitHub</a> + + </div> + + + +<script src="constraints.js"></script> +<script src="adapter.js"></script> +<script src="common.js"></script> +</body></html>
diff --git a/tools/perf/page_sets/webrtc_cases/constraints.js b/tools/perf/page_sets/webrtc_cases/constraints.js new file mode 100644 index 0000000..16cf173 --- /dev/null +++ b/tools/perf/page_sets/webrtc_cases/constraints.js
@@ -0,0 +1,307 @@ +/* + * Copyright 2017 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. + */ +'use strict'; + +var getMediaButton = document.querySelector('button#getMedia'); +var connectButton = document.querySelector('button#connect'); +var hangupButton = document.querySelector('button#hangup'); + +getMediaButton.onclick = getMedia; +connectButton.onclick = createPeerConnection; +hangupButton.onclick = hangup; + +var minWidthInput = document.querySelector('div#minWidth input'); +var maxWidthInput = document.querySelector('div#maxWidth input'); +var minHeightInput = document.querySelector('div#minHeight input'); +var maxHeightInput = document.querySelector('div#maxHeight input'); +var minFramerateInput = document.querySelector('div#minFramerate input'); +var maxFramerateInput = document.querySelector('div#maxFramerate input'); + +minWidthInput.onchange = maxWidthInput.onchange = + minHeightInput.onchange = maxHeightInput.onchange = + minFramerateInput.onchange = maxFramerateInput.onchange = displayRangeValue; + +var getUserMediaConstraintsDiv = + document.querySelector('div#getUserMediaConstraints'); +var bitrateDiv = document.querySelector('div#bitrate'); +var peerDiv = document.querySelector('div#peer'); +var senderStatsDiv = document.querySelector('div#senderStats'); +var receiverStatsDiv = document.querySelector('div#receiverStats'); + +var localVideo = document.querySelector('div#localVideo video'); +var remoteVideo = document.querySelector('div#remoteVideo video'); +var localVideoStatsDiv = document.querySelector('div#localVideo div'); +var remoteVideoStatsDiv = document.querySelector('div#remoteVideo div'); + +var localPeerConnection; +var remotePeerConnection; +var localStream; +var bytesPrev; +var timestampPrev; + +main(); + +function main() { + displayGetUserMediaConstraints(); +} + +function hangup() { + trace('Ending call'); + localPeerConnection.close(); + remotePeerConnection.close(); + localPeerConnection = null; + remotePeerConnection = null; + + localStream.getTracks().forEach(function(track) { + track.stop(); + }); + localStream = null; + + hangupButton.disabled = true; + getMediaButton.disabled = false; +} + +function getMedia() { + getMediaButton.disabled = true; + if (localStream) { + localStream.getTracks().forEach(function(track) { + track.stop(); + }); + var videoTracks = localStream.getVideoTracks(); + for (var i = 0; i !== videoTracks.length; ++i) { + videoTracks[i].stop(); + } + } + navigator.mediaDevices.getUserMedia(getUserMediaConstraints()) + .then(gotStream) + .catch(function(e) { + var message = 'getUserMedia error: ' + e.name + '\n' + + 'PermissionDeniedError may mean invalid constraints.'; + alert(message); + console.log(message); + getMediaButton.disabled = false; + }); +} + +function gotStream(stream) { + connectButton.disabled = false; + console.log('GetUserMedia succeeded'); + localStream = stream; + localVideo.srcObject = stream; +} + +function getUserMediaConstraints() { + var constraints = {}; + constraints.audio = true; + constraints.video = {}; + if (minWidthInput.value !== '0') { + constraints.video.width = {}; + constraints.video.width.min = minWidthInput.value; + } + if (maxWidthInput.value !== '0') { + constraints.video.width = constraints.video.width || {}; + constraints.video.width.max = maxWidthInput.value; + } + if (minHeightInput.value !== '0') { + constraints.video.height = {}; + constraints.video.height.min = minHeightInput.value; + } + if (maxHeightInput.value !== '0') { + constraints.video.height = constraints.video.height || {}; + constraints.video.height.max = maxHeightInput.value; + } + if (minFramerateInput.value !== '0') { + constraints.video.frameRate = {}; + constraints.video.frameRate.min = minFramerateInput.value; + } + if (maxFramerateInput.value !== '0') { + constraints.video.frameRate = constraints.video.frameRate || {}; + constraints.video.frameRate.max = maxFramerateInput.value; + } + + return constraints; +} + +function displayGetUserMediaConstraints() { + var constraints = getUserMediaConstraints(); + console.log('getUserMedia constraints', constraints); + getUserMediaConstraintsDiv.textContent = + JSON.stringify(constraints, null, ' '); +} + +function createPeerConnection() { + connectButton.disabled = true; + hangupButton.disabled = false; + + bytesPrev = 0; + timestampPrev = 0; + localPeerConnection = new RTCPeerConnection(null); + remotePeerConnection = new RTCPeerConnection(null); + localPeerConnection.addStream(localStream); + console.log('localPeerConnection creating offer'); + localPeerConnection.onnegotiationeeded = function() { + console.log('Negotiation needed - localPeerConnection'); + }; + remotePeerConnection.onnegotiationeeded = function() { + console.log('Negotiation needed - remotePeerConnection'); + }; + localPeerConnection.onicecandidate = function(e) { + console.log('Candidate localPeerConnection'); + if (e.candidate) { + remotePeerConnection.addIceCandidate(e.candidate) + .then( + onAddIceCandidateSuccess, + onAddIceCandidateError + ); + } + }; + remotePeerConnection.onicecandidate = function(e) { + console.log('Candidate remotePeerConnection'); + if (e.candidate) { + localPeerConnection.addIceCandidate(e.candidate) + .then( + onAddIceCandidateSuccess, + onAddIceCandidateError + ); + } + }; + remotePeerConnection.onaddstream = function(e) { + console.log('remotePeerConnection got stream'); + remoteVideo.srcObject = e.stream; + }; + localPeerConnection.createOffer().then( + function(desc) { + console.log('localPeerConnection offering'); + localPeerConnection.setLocalDescription(desc); + remotePeerConnection.setRemoteDescription(desc); + remotePeerConnection.createAnswer().then( + function(desc2) { + console.log('remotePeerConnection answering'); + remotePeerConnection.setLocalDescription(desc2); + localPeerConnection.setRemoteDescription(desc2); + }, + function(err) { + console.log(err); + } + ); + }, + function(err) { + console.log(err); + } + ); +} + +function onAddIceCandidateSuccess() { + trace('AddIceCandidate success.'); +} + +function onAddIceCandidateError(error) { + trace('Failed to add Ice Candidate: ' + error.toString()); +} + +// Display statistics +setInterval(function() { + if (remotePeerConnection && remotePeerConnection.getRemoteStreams()[0]) { + remotePeerConnection.getStats(null) + .then(function(results) { + var statsString = dumpStats(results); + receiverStatsDiv.innerHTML = '<h2>Receiver stats</h2>' + statsString; + // calculate video bitrate + results.forEach(function(report) { + var now = report.timestamp; + + var bitrate; + if (report.type === 'inboundrtp' && report.mediaType === 'video') { + // firefox calculates the bitrate for us + // https://bugzilla.mozilla.org/show_bug.cgi?id=951496 + bitrate = Math.floor(report.bitrateMean / 1024); + } else if (report.type === 'ssrc' && report.bytesReceived && + report.googFrameHeightReceived) { + // chrome does not so we need to do it ourselves + var bytes = report.bytesReceived; + if (timestampPrev) { + bitrate = 8 * (bytes - bytesPrev) / (now - timestampPrev); + bitrate = Math.floor(bitrate); + } + bytesPrev = bytes; + timestampPrev = now; + } + if (bitrate) { + bitrate += ' kbits/sec'; + bitrateDiv.innerHTML = '<strong>Bitrate:</strong> ' + bitrate; + } + }); + + // figure out the peer's ip + var activeCandidatePair = null; + var remoteCandidate = null; + + // search for the candidate pair + results.forEach(function(report) { + if (report.type === 'candidatepair' && report.selected || + report.type === 'googCandidatePair' && + report.googActiveConnection === 'true') { + activeCandidatePair = report; + } + }); + if (activeCandidatePair && activeCandidatePair.remoteCandidateId) { + remoteCandidate = results[activeCandidatePair.remoteCandidateId]; + } + if (remoteCandidate && remoteCandidate.ipAddress && + remoteCandidate.portNumber) { + peerDiv.innerHTML = '<strong>Connected to:</strong> ' + + remoteCandidate.ipAddress + + ':' + remoteCandidate.portNumber; + } + }, function(err) { + console.log(err); + }); + localPeerConnection.getStats(null) + .then(function(results) { + var statsString = dumpStats(results); + senderStatsDiv.innerHTML = '<h2>Sender stats</h2>' + statsString; + }, function(err) { + console.log(err); + }); + } else { + console.log('Not connected yet'); + } + // Collect some stats from the video tags. + if (localVideo.videoWidth) { + localVideoStatsDiv.innerHTML = '<strong>Video dimensions:</strong> ' + + localVideo.videoWidth + 'x' + localVideo.videoHeight + 'px'; + } + if (remoteVideo.videoWidth) { + remoteVideoStatsDiv.innerHTML = '<strong>Video dimensions:</strong> ' + + remoteVideo.videoWidth + 'x' + remoteVideo.videoHeight + 'px'; + } +}, 1000); + +// Dumping a stats variable as a string. +// might be named toString? +function dumpStats(results) { + var statsString = ''; + results.forEach(function(res) { + statsString += '<h3>Report type='; + statsString += res.type; + statsString += '</h3>\n'; + statsString += 'id ' + res.id + '<br>\n'; + statsString += 'time ' + res.timestamp + '<br>\n'; + Object.keys(res).forEach(function(k) { + if (k !== 'timestamp' && k !== 'type' && k !== 'id') { + statsString += k + ': ' + res[k] + '<br>\n'; + } + }); + }); + return statsString; +} + +// Utility to show the value of a range in a sibling span element +function displayRangeValue(e) { + var span = e.target.parentElement.querySelector('span'); + span.textContent = e.target.value; + displayGetUserMediaConstraints(); +}
diff --git a/tools/perf/page_sets/webrtc_cases/datatransfer.html b/tools/perf/page_sets/webrtc_cases/datatransfer.html new file mode 100644 index 0000000..2c6315e --- /dev/null +++ b/tools/perf/page_sets/webrtc_cases/datatransfer.html
@@ -0,0 +1,73 @@ +<!DOCTYPE html> +<!-- + * Copyright 2017 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. +--> +<html> +<head> + + + <base target="_blank"> + + <title>Generate and transfer data</title> + + +</head> + +<body> + + <div id="container"> + + <h1><a href="https://webrtc.github.io/samples/" title="WebRTC samples homepage">WebRTC samples</a> <span>Generate and transfer data</span></h1> + <section> + + <p>This page generates and sends the specified amount of data via WebRTC datachannels.</p> + + <p>To accomplish this in an interoperable way, the data is split into chunks which are then transferred via the datachannel. The datachannel is reliable and ordered by default which is well-suited to filetransfers.</p> + + <p>Send and receive progress is monitored using HTML5 <i>progress</i> elements.</p> + + </section> + + <section> + <div id="button"> + <button id="sendTheData" type="button">Generate and send data</button> + </div> + <div class="input"> + <input type="number" id="megsToSend" min="1" name="megs" value="128"/> + <label for="megsToSend">MB</label> + <div id="errorMsg"></div> + </div> + <div class="input"> + <input type="checkbox" id="ordered" checked> + <label for="ordered">Ordered mode</label> + </div> + <div class="progress"> + <div class="label">Send progress: </div> + <progress id="sendProgress" max="0" value="0"></progress> + </div> + + <div class="progress"> + <div class="label">Receive progress: </div> + <progress id="receiveProgress" max="0" value="0"></progress> + </div> + </section> + + <section> + <p>View the console to see logging.</p> + + <p>The <code>RTCPeerConnection</code> objects <code>localConnection</code> and <code>remoteConnection</code> are in global scope, so you can inspect them in the console as well.</p> + + <p>For more information about RTCDataChannel, see <a href="http://www.html5rocks.com/en/tutorials/webrtc/basics/#toc-rtcdatachannel" title="RTCDataChannel section of HTML5 Rocks article about WebRTC">Getting Started With WebRTC</a>.</p> + </section> + + <a href="https://github.com/webrtc/samples/tree/gh-pages/src/content/datachannel/datatransfer" title="View source for this page on GitHub" id="viewSource">View source on GitHub</a> + </div> + + + +<script src="datatransfer.js"></script> +<script src="adapter.js"></script> +<script src="common.js"></script> +</body></html>
diff --git a/tools/perf/page_sets/webrtc_cases/datatransfer.js b/tools/perf/page_sets/webrtc_cases/datatransfer.js new file mode 100644 index 0000000..7c50507 --- /dev/null +++ b/tools/perf/page_sets/webrtc_cases/datatransfer.js
@@ -0,0 +1,229 @@ +/* + * Copyright 2017 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. + */ +'use strict'; + +var localConnection; +var remoteConnection; +var sendChannel; +var receiveChannel; +var pcConstraint; +var megsToSend = document.querySelector('input#megsToSend'); +var sendButton = document.querySelector('button#sendTheData'); +var orderedCheckbox = document.querySelector('input#ordered'); +var sendProgress = document.querySelector('progress#sendProgress'); +var receiveProgress = document.querySelector('progress#receiveProgress'); +var errorMessage = document.querySelector('div#errorMsg'); + +var receivedSize = 0; +var bytesToSend = 0; + +sendButton.onclick = createConnection; + +// Prevent data sent to be set to 0. +megsToSend.addEventListener('change', function(e) { + if (this.value <= 0) { + sendButton.disabled = true; + errorMessage.innerHTML = '<p>Please enter a number greater than zero.</p>'; + } else { + errorMessage.innerHTML = ''; + sendButton.disabled = false; + } +}); + +function createConnection() { + sendButton.disabled = true; + megsToSend.disabled = true; + var servers = null; + pcConstraint = null; + + bytesToSend = Math.round(megsToSend.value) * 1024 * 1024; + + // Add localConnection to global scope to make it visible + // from the browser console. + window.localConnection = localConnection = new RTCPeerConnection(servers, + pcConstraint); + trace('Created local peer connection object localConnection'); + + var dataChannelParams = {ordered: false}; + if (orderedCheckbox.checked) { + dataChannelParams.ordered = true; + } + + sendChannel = localConnection.createDataChannel( + 'sendDataChannel', dataChannelParams); + sendChannel.binaryType = 'arraybuffer'; + trace('Created send data channel'); + + sendChannel.onopen = onSendChannelStateChange; + sendChannel.onclose = onSendChannelStateChange; + localConnection.onicecandidate = function(e) { + onIceCandidate(localConnection, e); + }; + + localConnection.createOffer().then( + gotDescription1, + onCreateSessionDescriptionError + ); + + // Add remoteConnection to global scope to make it visible + // from the browser console. + window.remoteConnection = remoteConnection = new RTCPeerConnection(servers, + pcConstraint); + trace('Created remote peer connection object remoteConnection'); + + remoteConnection.onicecandidate = function(e) { + onIceCandidate(remoteConnection, e); + }; + remoteConnection.ondatachannel = receiveChannelCallback; +} + +function onCreateSessionDescriptionError(error) { + trace('Failed to create session description: ' + error.toString()); +} + +function randomAsciiString(length) { + var result = ''; + for (var i = 0; i < length; i++) { + // Visible ASCII chars are between 33 and 126. + result += String.fromCharCode(33 + Math.random() * 93); + } + return result; +} + +function sendGeneratedData() { + sendProgress.max = bytesToSend; + receiveProgress.max = sendProgress.max; + sendProgress.value = 0; + receiveProgress.value = 0; + + var chunkSize = 16384; + var stringToSendRepeatedly = randomAsciiString(chunkSize); + var bufferFullThreshold = 5 * chunkSize; + var usePolling = true; + if (typeof sendChannel.bufferedAmountLowThreshold === 'number') { + trace('Using the bufferedamountlow event for flow control'); + usePolling = false; + + // Reduce the buffer fullness threshold, since we now have more efficient + // buffer management. + bufferFullThreshold = chunkSize / 2; + + // This is "overcontrol": our high and low thresholds are the same. + sendChannel.bufferedAmountLowThreshold = bufferFullThreshold; + } + // Listen for one bufferedamountlow event. + var listener = function() { + sendChannel.removeEventListener('bufferedamountlow', listener); + sendAllData(); + }; + var sendAllData = function() { + // Try to queue up a bunch of data and back off when the channel starts to + // fill up. We don't setTimeout after each send since this lowers our + // throughput quite a bit (setTimeout(fn, 0) can take hundreds of milli- + // seconds to execute). + while (sendProgress.value < sendProgress.max) { + if (sendChannel.bufferedAmount > bufferFullThreshold) { + if (usePolling) { + setTimeout(sendAllData, 250); + } else { + sendChannel.addEventListener('bufferedamountlow', listener); + } + return; + } + sendProgress.value += chunkSize; + sendChannel.send(stringToSendRepeatedly); + } + }; + setTimeout(sendAllData, 0); +} + +function closeDataChannels() { + trace('Closing data channels'); + sendChannel.close(); + trace('Closed data channel with label: ' + sendChannel.label); + receiveChannel.close(); + trace('Closed data channel with label: ' + receiveChannel.label); + localConnection.close(); + remoteConnection.close(); + localConnection = null; + remoteConnection = null; + trace('Closed peer connections'); +} + +function gotDescription1(desc) { + localConnection.setLocalDescription(desc); + trace('Offer from localConnection \n' + desc.sdp); + remoteConnection.setRemoteDescription(desc); + remoteConnection.createAnswer().then( + gotDescription2, + onCreateSessionDescriptionError + ); +} + +function gotDescription2(desc) { + remoteConnection.setLocalDescription(desc); + trace('Answer from remoteConnection \n' + desc.sdp); + localConnection.setRemoteDescription(desc); +} + +function getOtherPc(pc) { + return (pc === localConnection) ? remoteConnection : localConnection; +} + +function getName(pc) { + return (pc === localConnection) ? 'localPeerConnection' : + 'remotePeerConnection'; +} + +function onIceCandidate(pc, event) { + getOtherPc(pc).addIceCandidate(event.candidate) + .then( + function() { + onAddIceCandidateSuccess(pc); + }, + function(err) { + onAddIceCandidateError(pc, err); + } + ); + trace(getName(pc) + ' ICE candidate: \n' + (event.candidate ? + event.candidate.candidate : '(null)')); +} + +function onAddIceCandidateSuccess() { + trace('AddIceCandidate success.'); +} + +function onAddIceCandidateError(error) { + trace('Failed to add Ice Candidate: ' + error.toString()); +} + +function receiveChannelCallback(event) { + trace('Receive Channel Callback'); + receiveChannel = event.channel; + receiveChannel.binaryType = 'arraybuffer'; + receiveChannel.onmessage = onReceiveMessageCallback; + + receivedSize = 0; +} + +function onReceiveMessageCallback(event) { + receivedSize += event.data.length; + receiveProgress.value = receivedSize; + + if (receivedSize === bytesToSend) { + closeDataChannels(); + sendButton.disabled = false; + megsToSend.disabled = false; + } +} + +function onSendChannelStateChange() { + var readyState = sendChannel.readyState; + trace('Send channel state is: ' + readyState); + if (readyState === 'open') { + sendGeneratedData(); + } +}
diff --git a/tools/perf/page_sets/webrtc_cases/multiple-peerconnections.html b/tools/perf/page_sets/webrtc_cases/multiple-peerconnections.html new file mode 100644 index 0000000..dff5a91 --- /dev/null +++ b/tools/perf/page_sets/webrtc_cases/multiple-peerconnections.html
@@ -0,0 +1,45 @@ +<!DOCTYPE html> +<!-- + * Copyright 2017 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. +--> +<html> +<head> + + <title>Multiple peerconnections</title> + + +</head> + +<body> + +<div id="wrapper"> + <div id="container"> + <div class="bottom-border"> + <h2>PeerConnection</h2> + <label> + Number of peer connections + <input id="num-peerconnections" value="10"> + </label><br> + <label> + Enable googCpuOveruseDetection + <input type="checkbox" id="cpuoveruse-detection" checked> + </label><br> + <button class="green" id="start-test"> + Start Test + </button><br> + </div> + <div class="video-area"> + <br> + <h2>Remote Streams</h2> + <table border="0" id="test-table"></table> + </div> + </div> +</div> + + +<script src="multiple-peerconnections.js"></script> +<script src="adapter.js"></script> +<script src="common.js"></script> +</body></html>
diff --git a/tools/perf/page_sets/webrtc_cases/multiple-peerconnections.js b/tools/perf/page_sets/webrtc_cases/multiple-peerconnections.js new file mode 100644 index 0000000..4401d10 --- /dev/null +++ b/tools/perf/page_sets/webrtc_cases/multiple-peerconnections.js
@@ -0,0 +1,112 @@ +/* + * Copyright 2017 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. + */ +/*jshint esversion: 6 */ + +'use strict'; + +var $ = document.getElementById.bind(document); + +var testTable = $('test-table'); +var nPeerConnectionsInput = $('num-peerconnections'); +var startTestButton = $('start-test'); +var cpuOveruseDetectionCheckbox = $('cpuoveruse-detection'); + +startTestButton.onclick = startTest; + +function logError(err) { + console.err(err); +} + +function addNewVideoElement() { + var newRow = testTable.insertRow(-1); + var newCell = newRow.insertCell(-1); + var video = document.createElement('video'); + video.autoplay = true; + newCell.appendChild(video); + return video; +} + +function PeerConnection(id, cpuOveruseDetection) { + this.id = id; + this.cpuOveruseDetection = cpuOveruseDetection; + + this.localConnection = null; + this.remoteConnection = null; + + this.remoteView = addNewVideoElement(); + + this.start = function() { + var onGetUserMediaSuccess = this.onGetUserMediaSuccess.bind(this); + navigator.mediaDevices.getUserMedia({ + audio: true, + video: true + }) + .then(onGetUserMediaSuccess) + .catch(logError); + }; + + this.onGetUserMediaSuccess = function(stream) { + // Create local peer connection. + this.localConnection = new RTCPeerConnection(null, { + 'optional': [{ + 'googCpuOveruseDetection': this.cpuOveruseDetection + }] + }); + this.localConnection.onicecandidate = (event) => { + this.onIceCandidate(this.remoteConnection, event); + }; + this.localConnection.addStream(stream); + + // Create remote peer connection. + this.remoteConnection = new RTCPeerConnection(null, { + 'optional': [{ + 'googCpuOveruseDetection': this.cpuOveruseDetection + }] + }); + this.remoteConnection.onicecandidate = (event) => { + this.onIceCandidate(this.localConnection, event); + }; + this.remoteConnection.onaddstream = (e) => { + this.remoteView.srcObject = e.stream; + }; + + // Initiate call. + var onCreateOfferSuccess = this.onCreateOfferSuccess.bind(this); + this.localConnection.createOffer({ + offerToReceiveAudio: 1, + offerToReceiveVideo: 1 + }) + .then(onCreateOfferSuccess, logError); + }; + + this.onCreateOfferSuccess = function(desc) { + this.localConnection.setLocalDescription(desc); + this.remoteConnection.setRemoteDescription(desc); + + var onCreateAnswerSuccess = this.onCreateAnswerSuccess.bind(this); + this.remoteConnection.createAnswer() + .then(onCreateAnswerSuccess, logError); + }; + + this.onCreateAnswerSuccess = function(desc) { + this.remoteConnection.setLocalDescription(desc); + this.localConnection.setRemoteDescription(desc); + }; + + this.onIceCandidate = function(connection, event) { + if (event.candidate) { + connection.addIceCandidate(new RTCIceCandidate(event.candidate)); + } + }; +} + +function startTest() { + var cpuOveruseDetection = cpuOveruseDetectionCheckbox.checked; + var nPeerConnections = nPeerConnectionsInput.value; + for (var i = 0; i < nPeerConnections; ++i) { + new PeerConnection(i, cpuOveruseDetection).start(); + } +}
diff --git a/tools/perf/page_sets/webrtc_cases/resolution.html b/tools/perf/page_sets/webrtc_cases/resolution.html new file mode 100644 index 0000000..e92e0799 --- /dev/null +++ b/tools/perf/page_sets/webrtc_cases/resolution.html
@@ -0,0 +1,80 @@ +<!DOCTYPE html> +<!-- + * Copyright 2017 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. +--> +<html> +<head> + + + <base target="_blank"> + + <title>getUserMedia: select resolution</title> + + + <style> + body, html { + height: 100%; + } + + button { + margin: 0 10px 20px 0; + width: 90px; + } + + div#buttons { + margin: 0 0 1em 0; + } + + div#container { + max-width: 100%; + } + + p#dimensions { + height: 1em; + margin: 0 0 1.5em 0; + } + + video { + background: none; + height: auto; + width: auto; + } + </style> + +</head> + +<body> + + <div id="container"> + + <h1><a href="//webrtc.github.io/samples/" title="WebRTC samples homepage">WebRTC samples</a> <span>getUserMedia: select resolution</span></h1> + <p></p> + + <p>This example uses <a href="https://w3c.github.io/mediacapture-main/getusermedia.html#media-track-constraints" title="W3C getusermedia specification - constraints section">constraints</a>.</p> + + <p>Click a button to call <code>getUserMedia()</code> with appropriate resolution.</p> + + <div id="buttons"> + <button id="qvga">QVGA</button> + <button id="vga">VGA</button> + <button id="hd">HD</button> + <button id="full-hd">Full HD</button> + </div> + + <p id="dimensions"></p> + + <video id="gum-res-local" autoplay></video> + + <p>For more information, see <a href="http://www.html5rocks.com/en/tutorials/getusermedia/intro/" title="Media capture article by Eric Bidelman on HTML5 Rocks">Capturing Audio & Video in HTML5</a> on HTML5 Rocks.</p> + + <a href="https://github.com/webrtc/samples/tree/gh-pages/src/content/getusermedia/resolution" title="View source for this page on GitHub" id="viewSource">View source on GitHub</a> + </div> + + + +<script src="resolution.js"></script> +<script src="adapter.js"></script> +<script src="common.js"></script> +</body></html>
diff --git a/tools/perf/page_sets/webrtc_cases/resolution.js b/tools/perf/page_sets/webrtc_cases/resolution.js new file mode 100644 index 0000000..4b807b0 --- /dev/null +++ b/tools/perf/page_sets/webrtc_cases/resolution.js
@@ -0,0 +1,78 @@ +/* + * Copyright 2017 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. + */ +'use strict'; + +var dimensions = document.querySelector('#dimensions'); +var video = document.querySelector('video'); +var stream; + +var vgaButton = document.querySelector('#vga'); +var qvgaButton = document.querySelector('#qvga'); +var hdButton = document.querySelector('#hd'); +var fullHdButton = document.querySelector('#full-hd'); + +vgaButton.onclick = function() { + getMedia(vgaConstraints); +}; + +qvgaButton.onclick = function() { + getMedia(qvgaConstraints); +}; + +hdButton.onclick = function() { + getMedia(hdConstraints); +}; + +fullHdButton.onclick = function() { + getMedia(fullHdConstraints); +}; + +var qvgaConstraints = { + video: {width: {exact: 320}, height: {exact: 240}} +}; + +var vgaConstraints = { + video: {width: {exact: 640}, height: {exact: 480}} +}; + +var hdConstraints = { + video: {width: {exact: 1280}, height: {exact: 720}} +}; + +var fullHdConstraints = { + video: {width: {exact: 1920}, height: {exact: 1080}} +}; + +function gotStream(mediaStream) { + window.stream = mediaStream; // stream available to console + video.srcObject = mediaStream; +} + +function displayVideoDimensions() { + if (!video.videoWidth) { + setTimeout(displayVideoDimensions, 500); + } + dimensions.innerHTML = 'Actual video dimensions: ' + video.videoWidth + + 'x' + video.videoHeight + 'px.'; +} + +video.onloadedmetadata = displayVideoDimensions; + +function getMedia(constraints) { + if (stream) { + stream.getTracks().forEach(function(track) { + track.stop(); + }); + } + + navigator.mediaDevices.getUserMedia(constraints) + .then(gotStream) + .catch(function(e) { + var message = 'getUserMedia error: ' + e.name; + alert(message); + console.log(message); + }); +}
diff --git a/tools/perf/perf.isolate b/tools/perf/perf.isolate deleted file mode 100644 index 20cb796..0000000 --- a/tools/perf/perf.isolate +++ /dev/null
@@ -1,20 +0,0 @@ -# Copyright 2015 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. -{ - 'includes': [ - './chrome_telemetry_build/telemetry_chrome_test.isolate', - ], - 'conditions': [ - ['OS=="android" or OS=="linux" or OS=="mac" or OS=="win"', { - 'variables': { - 'files': [ - './', - # Field trial configs - '../variations/', - '../../testing/variations/', - ], - }, - }], - ] -}
diff --git a/tools/polymer/OWNERS b/tools/polymer/OWNERS index a249e76..4f962f96 100644 --- a/tools/polymer/OWNERS +++ b/tools/polymer/OWNERS
@@ -1,2 +1,5 @@ +dbeam@chromium.org +dpapad@chromium.org jklein@chromium.org michaelpg@chromium.org +tsergeant@chromium.org
diff --git a/tools/resource_prefetch_predictor/README.md b/tools/resource_prefetch_predictor/README.md new file mode 100644 index 0000000..77ff51ff --- /dev/null +++ b/tools/resource_prefetch_predictor/README.md
@@ -0,0 +1,18 @@ +# Description +This directory contains tools related to src/chrome/predictors, and especially +`resource_prefetch_predictor`. + +# Prerequisites +The following assumes a Chrome for Android setup, on Ubuntu 14.04LTS. + +To use these tools, you need: +* Python protocol buffer library +* Protocol buffer Python modules to read the database +* SQLite >= 3.9 + +# Installation +* Install an updated protobuf library: `pip install --user protobuf` +* Generated protocol buffers in the path: Assuming that the build directory is +`out/Release` and chromium's `src/` is `$CHROMIUM_SRC`, `export +PYTHONPATH=$PYTHONPATH:${CHROMIUM_SRC}/out/Release/pyproto/chrome/browser/predictors/` +* SQLite from the Android SDK is recent enough, make sure that `${CHROMIUM_SRC}/third_party/android_tools/sdk/platform-tools` is in the path.
diff --git a/tools/resource_prefetch_predictor/prefetch_benchmark.py b/tools/resource_prefetch_predictor/prefetch_benchmark.py index e31bd1d..2e291d77 100755 --- a/tools/resource_prefetch_predictor/prefetch_benchmark.py +++ b/tools/resource_prefetch_predictor/prefetch_benchmark.py
@@ -19,6 +19,7 @@ sys.path.append(os.path.join( _SRC_PATH, 'tools', 'android', 'customtabs_benchmark', 'scripts')) import customtabs_benchmark +import chrome_setup import device_setup sys.path.append(os.path.join(_SRC_PATH, 'tools', 'android', 'loading')) @@ -29,6 +30,7 @@ import devil_chromium sys.path.append(os.path.join(_SRC_PATH, 'third_party', 'catapult', 'devil')) +from devil.android import flag_changer from devil.android.sdk import intent import prefetch_predictor_common @@ -68,7 +70,7 @@ # Make sure that the speculative prefetch predictor is enabled to ensure # that the disk database is re-created. - with device_setup.FlagReplacer( + with flag_changer.CustomCommandLineFlags( device, chrome_package.cmdline_file, ['--disable-fre']): # Launch Chrome for the first time to recreate the local state. launch_intent = intent.Intent( @@ -87,8 +89,9 @@ # database, since adb push sets it to root. database_content = open(database_filename, 'r').read() device.WriteFile(device_database_filename, database_content, force_push=True) - command = 'chown %s:%s \'%s\'' % (owner, group, device_database_filename) - device.RunShellCommand(command, as_root=True) + device.RunShellCommand( + ['chown', '%s:%s' % (owner, group), device_database_filename], + as_root=True, check_return=True) def _RunOnce(device, database_filename, url, prefetch_delay_ms, @@ -97,7 +100,7 @@ disable_prefetch = prefetch_delay_ms == -1 # Startup tracing to ease debugging. - chrome_args = (customtabs_benchmark.CHROME_ARGS + chrome_args = (chrome_setup.CHROME_ARGS + ['--trace-startup', '--trace-startup-duration=20']) # Speculative Prefetch is enabled through an experiment. chrome_args.extend([
diff --git a/tools/resources/optimize-png-files.sh b/tools/resources/optimize-png-files.sh index ecee067..b74f4d8 100755 --- a/tools/resources/optimize-png-files.sh +++ b/tools/resources/optimize-png-files.sh
@@ -415,6 +415,8 @@ -r<revision> If this is specified, the script processes only png files changed since this revision. The <dir> options will be used to narrow down the files under specific directories. + -c<commit> Same as -r but referencing a git commit. Only files changed + between this commit and HEAD will be processed. -v Shows optimization process for each file. -h Print this help text." exit 1 @@ -446,9 +448,12 @@ OPTIMIZE_LEVEL=1 # Parse options -while getopts o:r:h:v opts +while getopts o:c:r:h:v opts do case $opts in + c) + COMMIT=$OPTARG + ;; r) COMMIT=$(git svn find-rev r$OPTARG | tail -1) || exit if [ -z "$COMMIT" ] ; then @@ -541,7 +546,7 @@ let diff=$TOTAL_OLD_BYTES-$TOTAL_NEW_BYTES let percent=$diff*100/$TOTAL_OLD_BYTES echo "Result: $TOTAL_OLD_BYTES => $TOTAL_NEW_BYTES bytes" \ - "($diff bytes: $percent%)" + "($diff bytes: $percent\%)" fi if [ $CORRUPTED_FILE != 0 ]; then echo "Warning: corrupted files found: $CORRUPTED_FILE"
diff --git a/tools/roll_swiftshader.py b/tools/roll_swiftshader.py new file mode 100755 index 0000000..d24a43a --- /dev/null +++ b/tools/roll_swiftshader.py
@@ -0,0 +1,421 @@ +#!/usr/bin/env python +# Copyright 2015 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. + +import argparse +import collections +import logging +import os +import re +import subprocess +import sys +import time + +extra_cq_trybots = [ + { + "mastername": "master.tryserver.chromium.win", + "buildernames": ["win_optional_gpu_tests_rel"] + }, + { + "mastername": "master.tryserver.chromium.mac", + "buildernames": ["mac_optional_gpu_tests_rel"] + }, + { + "mastername": "master.tryserver.chromium.linux", + "buildernames": ["linux_optional_gpu_tests_rel"] + }, + { + "mastername": "master.tryserver.chromium.android", + "buildernames": ["android_optional_gpu_tests_rel"] + } +] +extra_fyi_trybots = [ + { + "mastername": "master.tryserver.chromium.win", + "buildernames": ["win_clang_dbg"] + } +] + +SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) +SRC_DIR = os.path.abspath(os.path.join(SCRIPT_DIR, os.pardir)) +sys.path.insert(0, os.path.join(SRC_DIR, 'build')) +import find_depot_tools +find_depot_tools.add_depot_tools_to_path() +import roll_dep_svn +from gclient import GClientKeywords +from third_party import upload + +# Avoid depot_tools/third_party/upload.py print verbose messages. +upload.verbosity = 0 # Errors only. + +CHROMIUM_GIT_URL = 'https://chromium.googlesource.com/chromium/src.git' +CL_ISSUE_RE = re.compile('^Issue number: ([0-9]+) \((.*)\)$') +RIETVELD_URL_RE = re.compile('^https?://(.*)/(.*)') +ROLL_BRANCH_NAME = 'special_swiftshader_roll_branch' +TRYJOB_STATUS_SLEEP_SECONDS = 30 + +# Use a shell for subcommands on Windows to get a PATH search. +IS_WIN = sys.platform.startswith('win') +SWIFTSHADER_PATH = os.path.join('third_party', 'swiftshader') + +CommitInfo = collections.namedtuple('CommitInfo', ['git_commit', + 'git_repo_url']) +CLInfo = collections.namedtuple('CLInfo', ['issue', 'url', 'rietveld_server']) + +def _PosixPath(path): + """Convert a possibly-Windows path to a posix-style path.""" + (_, path) = os.path.splitdrive(path) + return path.replace(os.sep, '/') + +def _ParseGitCommitHash(description): + for line in description.splitlines(): + if line.startswith('commit '): + return line.split()[1] + logging.error('Failed to parse git commit id from:\n%s\n', description) + sys.exit(-1) + return None + + +def _ParseDepsFile(filename): + with open(filename, 'rb') as f: + deps_content = f.read() + return _ParseDepsDict(deps_content) + + +def _ParseDepsDict(deps_content): + local_scope = {} + var = GClientKeywords.VarImpl({}, local_scope) + global_scope = { + 'From': GClientKeywords.FromImpl, + 'Var': var.Lookup, + 'deps_os': {}, + } + exec(deps_content, global_scope, local_scope) + return local_scope + + +def _GenerateCLDescriptionCommand(swiftshader_current, swiftshader_new, bugs, + tbr): + def GetChangeString(current_hash, new_hash): + return '%s..%s' % (current_hash[0:7], new_hash[0:7]); + + def GetChangeLogURL(git_repo_url, change_string): + return '%s/+log/%s' % (git_repo_url, change_string) + + def GetBugString(bugs): + bug_str = 'BUG=' + for bug in bugs: + bug_str += bug + ',' + return bug_str.rstrip(',') + + if swiftshader_current.git_commit != swiftshader_new.git_commit: + change_str = GetChangeString(swiftshader_current.git_commit, + swiftshader_new.git_commit) + changelog_url = GetChangeLogURL(swiftshader_current.git_repo_url, + change_str) + + def GetExtraCQTrybotString(): + s = '' + for t in extra_cq_trybots: + if s: + s += ';' + s += t['mastername'] + ':' + ','.join(t['buildernames']) + return s + + def GetTBRString(tbr): + if not tbr: + return '' + return 'TBR=' + tbr + + extra_trybot_args = [] + if extra_cq_trybots: + extra_trybot_string = GetExtraCQTrybotString() + extra_trybot_args = ['-m', 'CQ_INCLUDE_TRYBOTS=' + extra_trybot_string] + + return [ + '-m', 'Roll SwiftShader ' + change_str, + '-m', '%s' % changelog_url, + '-m', GetBugString(bugs), + '-m', GetTBRString(tbr), + '-m', 'TEST=bots', + ] + extra_trybot_args + + +class AutoRoller(object): + def __init__(self, chromium_src): + self._chromium_src = chromium_src + + def _RunCommand(self, command, working_dir=None, ignore_exit_code=False, + extra_env=None): + """Runs a command and returns the stdout from that command. + + If the command fails (exit code != 0), the function will exit the process. + """ + working_dir = working_dir or self._chromium_src + logging.debug('cmd: %s cwd: %s', ' '.join(command), working_dir) + env = os.environ.copy() + if extra_env: + logging.debug('extra env: %s', extra_env) + env.update(extra_env) + p = subprocess.Popen(command, stdout=subprocess.PIPE, + stderr=subprocess.PIPE, shell=IS_WIN, env=env, + cwd=working_dir, universal_newlines=True) + output = p.stdout.read() + p.wait() + p.stdout.close() + p.stderr.close() + + if not ignore_exit_code and p.returncode != 0: + logging.error('Command failed: %s\n%s', str(command), output) + sys.exit(p.returncode) + return output + + def _GetCommitInfo(self, path_below_src, git_hash=None, git_repo_url=None): + working_dir = os.path.join(self._chromium_src, path_below_src) + self._RunCommand(['git', 'fetch', 'origin'], working_dir=working_dir) + revision_range = git_hash or 'origin' + ret = self._RunCommand( + ['git', '--no-pager', 'log', revision_range, + '--no-abbrev-commit', '--pretty=full', '-1'], + working_dir=working_dir) + return CommitInfo(_ParseGitCommitHash(ret), git_repo_url) + + def _GetDepsCommitInfo(self, deps_dict, path_below_src): + entry = deps_dict['deps'][_PosixPath('src/%s' % path_below_src)] + at_index = entry.find('@') + git_repo_url = entry[:at_index] + git_hash = entry[at_index + 1:] + return self._GetCommitInfo(path_below_src, git_hash, git_repo_url) + + def _GetCLInfo(self): + cl_output = self._RunCommand(['git', 'cl', 'issue']) + m = CL_ISSUE_RE.match(cl_output.strip()) + if not m: + logging.error('Cannot find any CL info. Output was:\n%s', cl_output) + sys.exit(-1) + issue_number = int(m.group(1)) + url = m.group(2) + + # Parse the Rietveld host from the URL. + m = RIETVELD_URL_RE.match(url) + if not m: + logging.error('Cannot parse Rietveld host from URL: %s', url) + sys.exit(-1) + rietveld_server = m.group(1) + return CLInfo(issue_number, url, rietveld_server) + + def _GetCurrentBranchName(self): + return self._RunCommand( + ['git', 'rev-parse', '--abbrev-ref', 'HEAD']).splitlines()[0] + + def _IsTreeClean(self): + lines = self._RunCommand( + ['git', 'status', '--porcelain', '-uno']).splitlines() + if len(lines) == 0: + return True + + logging.debug('Dirty/unversioned files:\n%s', '\n'.join(lines)) + return False + + def _GetBugList(self, path_below_src, swiftshader_current, swiftshader_new): + working_dir = os.path.join(self._chromium_src, path_below_src) + lines = self._RunCommand( + ['git','log', + '%s..%s' % (swiftshader_current.git_commit, + swiftshader_new.git_commit)], + working_dir=working_dir).split('\n') + ignored_projects = set(['swiftshader']) + bugs = set() + for line in lines: + line = line.strip() + bug_prefix = 'BUG=' + if line.startswith(bug_prefix): + bugs_strings = line[len(bug_prefix):].split(',') + for bug_string in bugs_strings: + ignore_bug = False + for ignored_project in ignored_projects: + if bug_string.startswith(ignored_project + ':'): + ignore_bug = True + break + if not ignore_bug: + bugs.add(bug_string) + return bugs + + def _UpdateReadmeFile(self, readme_path, new_revision): + readme = open(os.path.join(self._chromium_src, readme_path), 'r+') + txt = readme.read() + m = re.sub(re.compile('.*^Revision\: ([0-9]*).*', re.MULTILINE), + ('Revision: %s' % new_revision), txt) + readme.seek(0) + readme.write(m) + readme.truncate() + + def _TriggerExtraTrybots(self, trybots): + for trybot in trybots: + for builder in trybot['buildernames']: + self._RunCommand([ + 'git', 'cl', 'try', + '-m', trybot['mastername'], + '-b', builder]) + + def PrepareRoll(self, ignore_checks, tbr, should_commit): + # TODO(kjellander): use os.path.normcase, os.path.join etc for all paths for + # cross platform compatibility. + + if not ignore_checks: + if self._GetCurrentBranchName() != 'master': + logging.error('Please checkout the master branch.') + return -1 + if not self._IsTreeClean(): + logging.error('Please make sure you don\'t have any modified files.') + return -1 + + # Always clean up any previous roll. + self.Abort() + + logging.debug('Pulling latest changes') + if not ignore_checks: + self._RunCommand(['git', 'pull']) + + self._RunCommand(['git', 'checkout', '-b', ROLL_BRANCH_NAME]) + + # Modify Chromium's DEPS file. + + # Parse current hashes. + deps_filename = os.path.join(self._chromium_src, 'DEPS') + deps = _ParseDepsFile(deps_filename) + swiftshader_current = self._GetDepsCommitInfo(deps, SWIFTSHADER_PATH) + + # Find ToT revisions. + swiftshader_latest = self._GetCommitInfo(SWIFTSHADER_PATH) + + if IS_WIN: + # Make sure the roll script doesn't use windows line endings + self._RunCommand(['git', 'config', 'core.autocrlf', 'true']) + + self._UpdateDep(deps_filename, SWIFTSHADER_PATH, swiftshader_latest) + + if self._IsTreeClean(): + logging.debug('Tree is clean - no changes detected.') + self._DeleteRollBranch() + else: + bugs = self._GetBugList(SWIFTSHADER_PATH, swiftshader_current, + swiftshader_latest) + description = _GenerateCLDescriptionCommand( + swiftshader_current, swiftshader_latest, bugs, tbr) + logging.debug('Committing changes locally.') + self._RunCommand(['git', 'add', '--update', '.']) + self._RunCommand(['git', 'commit'] + description) + logging.debug('Uploading changes...') + self._RunCommand(['git', 'cl', 'upload'], + extra_env={'EDITOR': 'true'}) + + # Kick off tryjobs. + base_try_cmd = ['git', 'cl', 'try'] + self._RunCommand(base_try_cmd) + + if extra_cq_trybots: + # Run additional tryjobs. + # TODO(kbr): this should not be necessary -- the + # CQ_INCLUDE_TRYBOTS directive above should handle it. + # http://crbug.com/585237 + self._TriggerExtraTrybots(extra_cq_trybots) + + if extra_fyi_trybots: + self._TriggerExtraTrybots(extra_fyi_trybots) + + # Mark the CL to be committed if requested + if should_commit: + self._RunCommand(['git', 'cl', 'set-commit']) + + cl_info = self._GetCLInfo() + print 'Issue: %d URL: %s' % (cl_info.issue, cl_info.url) + + # Checkout master again. + self._RunCommand(['git', 'checkout', 'master']) + print 'Roll branch left as ' + ROLL_BRANCH_NAME + return 0 + + def _UpdateDep(self, deps_filename, dep_relative_to_src, commit_info): + dep_name = _PosixPath(os.path.join('src', dep_relative_to_src)) + + # roll_dep_svn.py relies on cwd being the Chromium checkout, so let's + # temporarily change the working directory and then change back. + cwd = os.getcwd() + os.chdir(os.path.dirname(deps_filename)) + roll_dep_svn.update_deps(deps_filename, dep_relative_to_src, dep_name, + commit_info.git_commit, '') + os.chdir(cwd) + + def _DeleteRollBranch(self): + self._RunCommand(['git', 'checkout', 'master']) + self._RunCommand(['git', 'branch', '-D', ROLL_BRANCH_NAME]) + logging.debug('Deleted the local roll branch (%s)', ROLL_BRANCH_NAME) + + + def _GetBranches(self): + """Returns a tuple of active,branches. + + The 'active' is the name of the currently active branch and 'branches' is a + list of all branches. + """ + lines = self._RunCommand(['git', 'branch']).split('\n') + branches = [] + active = '' + for l in lines: + if '*' in l: + # The assumption is that the first char will always be the '*'. + active = l[1:].strip() + branches.append(active) + else: + b = l.strip() + if b: + branches.append(b) + return (active, branches) + + def Abort(self): + active_branch, branches = self._GetBranches() + if active_branch == ROLL_BRANCH_NAME: + active_branch = 'master' + if ROLL_BRANCH_NAME in branches: + print 'Aborting pending roll.' + self._RunCommand(['git', 'checkout', ROLL_BRANCH_NAME]) + # Ignore an error here in case an issue wasn't created for some reason. + self._RunCommand(['git', 'cl', 'set_close'], ignore_exit_code=True) + self._RunCommand(['git', 'checkout', active_branch]) + self._RunCommand(['git', 'branch', '-D', ROLL_BRANCH_NAME]) + return 0 + + +def main(): + parser = argparse.ArgumentParser( + description='Auto-generates a CL containing a SwiftShader roll.') + parser.add_argument('--abort', + help=('Aborts a previously prepared roll. ' + 'Closes any associated issues and deletes the roll branches'), + action='store_true') + parser.add_argument('--ignore-checks', action='store_true', default=False, + help=('Skips checks for being on the master branch, dirty workspaces and ' + 'the updating of the checkout. Will still delete and create local ' + 'Git branches.')) + parser.add_argument('--tbr', help='Add a TBR to the commit message.') + parser.add_argument('--commit', action='store_true', default=False, + help='Submit the roll to the CQ after uploading.') + parser.add_argument('-v', '--verbose', action='store_true', default=False, + help='Be extra verbose in printing of log messages.') + args = parser.parse_args() + + if args.verbose: + logging.basicConfig(level=logging.DEBUG) + else: + logging.basicConfig(level=logging.ERROR) + + autoroller = AutoRoller(SRC_DIR) + if args.abort: + return autoroller.Abort() + else: + return autoroller.PrepareRoll(args.ignore_checks, args.tbr, args.commit) + +if __name__ == '__main__': + sys.exit(main())
diff --git a/tools/traffic_annotation/sample_traffic_annotation.cc b/tools/traffic_annotation/sample_traffic_annotation.cc index 45a191c2..f771529 100644 --- a/tools/traffic_annotation/sample_traffic_annotation.cc +++ b/tools/traffic_annotation/sample_traffic_annotation.cc
@@ -8,7 +8,7 @@ // For more description on each field, please refer to: // tools/traffic_annotation/traffic_annotation.proto // and -// out/Debug/gen/components/policy/proto/cloud_policy.proto +// out/Debug/gen/components/policy/proto/chrome_settings.proto // For more information on policies, please refer to: // http://dev.chromium.org/administrators/policy-list-3 @@ -38,10 +38,10 @@ "You can enable or disable this feature via 'Use a web service to " "help resolve spelling errors.' in Chrome's settings under " "Advanced. The feature is disabled by default." - policy { + chrome_policy { SpellCheckServiceEnabled { policy_options {mode: MANDATORY} - value: false + SpellCheckServiceEnabled: false } } })"); @@ -61,10 +61,10 @@ cookies_allowed: false/true cookies_store: "..." setting: "..." - policy { + chrome_policy { [POLICY_NAME] { policy_options {mode: MANDATORY/RECOMMENDED/UNSET} - value: ... + [POLICY_NAME]: ... } } policy_exception_justification = "..."
diff --git a/tools/traffic_annotation/traffic_annotation.proto b/tools/traffic_annotation/traffic_annotation.proto index 8f8d43c..de942a5 100644 --- a/tools/traffic_annotation/traffic_annotation.proto +++ b/tools/traffic_annotation/traffic_annotation.proto
@@ -5,10 +5,10 @@ syntax = "proto3"; package traffic_annotation; -// cloud_policy_full_runtime.proto is a version of the following proto without -// lite runtime optimization: -// out/Debug/gen/components/policy/proto/cloud_policy.proto -import "cloud_policy_full_runtime.proto"; +// chrome_settings_full_runtime.proto is a version of the following proto +// without lite runtime optimization: +// out/Debug/gen/components/policy/proto/chrome_settings.proto +import "chrome_settings_full_runtime.proto"; // Describes a specific kind of network traffic based on a fine-grained // semantic classification of all network traffic generated by Chrome. @@ -114,6 +114,8 @@ WEBSITE = 0; // A Google owned service, like SafeBrowsing, spellchecking, ... GOOGLE_OWNED_SERVICE = 1; + // Does not go to the network and just fetches a resource locally. + LOCAL = 2; // Other endpoints, e.g. a service hosting a PAC script. In case of doubt, // use this category. We will audit it in the future to see whether we // need more categories. @@ -155,8 +157,8 @@ // Example policy configuration that disables this network request. // This would be a text serialized protobuf of any enterprise policy. - // see out/Debug/gen/components/policy/proto/cloud_policy.proto - repeated enterprise_management.CloudPolicySettings policy = 4; + // see out/Debug/gen/components/policy/proto/chrome_settings.proto + repeated enterprise_management.ChromeSettingsProto chrome_policy = 4; // Justification for not having a policy that disables this feature. string policy_exception_justification = 5;
diff --git a/tools/valgrind/asan/asan_symbolize.py b/tools/valgrind/asan/asan_symbolize.py index 2cdae08..ecf4276 100755 --- a/tools/valgrind/asan/asan_symbolize.py +++ b/tools/valgrind/asan/asan_symbolize.py
@@ -163,27 +163,6 @@ return [result] -# We want our output to match base::EscapeJSONString(), which produces -# doubly-escaped strings. The first escaping pass is handled by this class. The -# second pass happens when JSON data is dumped to file. -class StringEncoder(json.JSONEncoder): - def __init__(self): - json.JSONEncoder.__init__(self) - - def encode(self, s): - assert(isinstance(s, basestring)) - # Don't die on invalid utf-8 sequences. - s = s.decode('utf-8', 'replace') - encoded = json.JSONEncoder.encode(self, s) - assert(len(encoded) >= 2) - assert(encoded[0] == '"') - assert(encoded[-1] == '"') - encoded = encoded[1:-1] - # Special case from base::EscapeJSONString(). - encoded = encoded.replace('<', '\u003C') - return encoded - - class JSONTestRunSymbolizer(object): def __init__(self, symbolization_loop): self.symbolization_loop = symbolization_loop @@ -205,15 +184,10 @@ test_run['original_output_snippet_base64'] = \ test_run['output_snippet_base64'] - escaped_snippet = StringEncoder().encode(symbolized_snippet) - test_run['output_snippet'] = escaped_snippet + test_run['output_snippet'] = symbolized_snippet.decode('utf-8', 'replace') test_run['output_snippet_base64'] = \ base64.b64encode(symbolized_snippet) test_run['snippet_processed_by'] = 'asan_symbolize.py' - # Originally, "lossless" refers to "no Unicode data lost while encoding the - # string". However, since we're applying another kind of transformation - # (symbolization), it doesn't seem right to consider the snippet lossless. - test_run['losless_snippet'] = False def symbolize_snippets_in_json(filename, symbolization_loop):
diff --git a/tools/valgrind/asan/third_party/asan_symbolize.py b/tools/valgrind/asan/third_party/asan_symbolize.py index 59fceaaed..1a56e44 100755 --- a/tools/valgrind/asan/third_party/asan_symbolize.py +++ b/tools/valgrind/asan/third_party/asan_symbolize.py
@@ -23,6 +23,8 @@ binary_name_filter = None fix_filename_patterns = None logfile = sys.stdin +allow_system_symbolizer = True +force_system_symbolizer = False # FIXME: merge the code that calls fix_filename(). def fix_filename(file_name): @@ -36,6 +38,10 @@ def sysroot_path_filter(binary_name): return sysroot_path + binary_name +def is_valid_arch(s): + return s in ["i386", "x86_64", "x86_64h", "arm", "armv6", "armv7", "armv7s", + "armv7k", "arm64", "powerpc64", "powerpc64le", "s390x", "s390"] + def guess_arch(addr): # Guess which arch we're running. 10 = len('0x') + 8 hex digits. if len(addr) > 10: @@ -76,17 +82,19 @@ cmd = [self.symbolizer_path, '--use-symbol-table=true', '--demangle=%s' % demangle, - '--functions=short', + '--functions=linkage', '--inlining=true', '--default-arch=%s' % self.default_arch] if self.system == 'Darwin': for hint in self.dsym_hints: cmd.append('--dsym-hint=%s' % hint) if DEBUG: - print ' '.join(cmd) + print(' '.join(cmd)) try: result = subprocess.Popen(cmd, stdin=subprocess.PIPE, - stdout=subprocess.PIPE) + stdout=subprocess.PIPE, + bufsize=0, + universal_newlines=True) except OSError: result = None return result @@ -99,8 +107,8 @@ try: symbolizer_input = '"%s" %s' % (binary, offset) if DEBUG: - print symbolizer_input - print >> self.pipe.stdin, symbolizer_input + print(symbolizer_input) + self.pipe.stdin.write("%s\n" % symbolizer_input) while True: function_name = self.pipe.stdout.readline().rstrip() if not function_name: @@ -134,34 +142,44 @@ super(Addr2LineSymbolizer, self).__init__() self.binary = binary self.pipe = self.open_addr2line() + self.output_terminator = -1 def open_addr2line(self): addr2line_tool = 'addr2line' if binutils_prefix: addr2line_tool = binutils_prefix + addr2line_tool - cmd = [addr2line_tool, '-f'] + cmd = [addr2line_tool, '-fi'] if demangle: cmd += ['--demangle'] cmd += ['-e', self.binary] if DEBUG: - print ' '.join(cmd) + print(' '.join(cmd)) return subprocess.Popen(cmd, - stdin=subprocess.PIPE, stdout=subprocess.PIPE) + stdin=subprocess.PIPE, stdout=subprocess.PIPE, + bufsize=0, + universal_newlines=True) def symbolize(self, addr, binary, offset): """Overrides Symbolizer.symbolize.""" if self.binary != binary: return None + lines = [] try: - print >> self.pipe.stdin, offset - function_name = self.pipe.stdout.readline().rstrip() - file_name = self.pipe.stdout.readline().rstrip() + self.pipe.stdin.write("%s\n" % offset) + self.pipe.stdin.write("%s\n" % self.output_terminator) + is_first_frame = True + while True: + function_name = self.pipe.stdout.readline().rstrip() + file_name = self.pipe.stdout.readline().rstrip() + if is_first_frame: + is_first_frame = False + elif function_name in ['', '??']: + assert file_name == function_name + break + lines.append((function_name, file_name)); except Exception: - function_name = '' - file_name = '' - file_name = fix_filename(file_name) - return ['%s in %s %s' % (addr, function_name, file_name)] - + lines.append(('??', '??:0')) + return ['%s in %s %s' % (addr, function, fix_filename(file)) for (function, file) in lines] class UnbufferedLineConverter(object): """ @@ -197,15 +215,15 @@ class DarwinSymbolizer(Symbolizer): - def __init__(self, addr, binary): + def __init__(self, addr, binary, arch): super(DarwinSymbolizer, self).__init__() self.binary = binary - self.arch = guess_arch(addr) + self.arch = arch self.open_atos() def open_atos(self): if DEBUG: - print 'atos -o %s -arch %s' % (self.binary, self.arch) + print('atos -o %s -arch %s' % (self.binary, self.arch)) cmdline = ['atos', '-o', self.binary, '-arch', self.arch] self.atos = UnbufferedLineConverter(cmdline, close_stderr=True) @@ -220,7 +238,7 @@ # foo(type1, type2) (in object.name) (filename.cc:80) match = re.match('^(.*) \(in (.*)\) \((.*:\d*)\)$', atos_line) if DEBUG: - print 'atos_line: ', atos_line + print('atos_line: ', atos_line) if match: function_name = match.group(1) function_name = re.sub('\(.*?\)', '', function_name) @@ -259,10 +277,10 @@ return None -def SystemSymbolizerFactory(system, addr, binary): +def SystemSymbolizerFactory(system, addr, binary, arch): if system == 'Darwin': - return DarwinSymbolizer(addr, binary) - elif system == 'Linux': + return DarwinSymbolizer(addr, binary, arch) + elif system == 'Linux' or system == 'FreeBSD': return Addr2LineSymbolizer(binary) @@ -334,7 +352,7 @@ function_name, file_name, line_no = res result = ['%s in %s %s:%d' % ( addr, function_name, file_name, line_no)] - print result + print(result) return result else: return None @@ -360,7 +378,7 @@ self.frame_no = 0 self.process_line = self.process_line_posix - def symbolize_address(self, addr, binary, offset): + def symbolize_address(self, addr, binary, offset, arch): # On non-Darwin (i.e. on platforms without .dSYM debug info) always use # a single symbolizer binary. # On Darwin, if the dsym hint producer is present: @@ -372,29 +390,35 @@ # if so, reuse |last_llvm_symbolizer| which has the full set of hints; # 3. otherwise create a new symbolizer and pass all currently known # .dSYM hints to it. - if not binary in self.llvm_symbolizers: - use_new_symbolizer = True - if self.system == 'Darwin' and self.dsym_hint_producer: - dsym_hints_for_binary = set(self.dsym_hint_producer(binary)) - use_new_symbolizer = bool(dsym_hints_for_binary - self.dsym_hints) - self.dsym_hints |= dsym_hints_for_binary - if self.last_llvm_symbolizer and not use_new_symbolizer: + result = None + if not force_system_symbolizer: + if not binary in self.llvm_symbolizers: + use_new_symbolizer = True + if self.system == 'Darwin' and self.dsym_hint_producer: + dsym_hints_for_binary = set(self.dsym_hint_producer(binary)) + use_new_symbolizer = bool(dsym_hints_for_binary - self.dsym_hints) + self.dsym_hints |= dsym_hints_for_binary + if self.last_llvm_symbolizer and not use_new_symbolizer: + self.llvm_symbolizers[binary] = self.last_llvm_symbolizer + else: + self.last_llvm_symbolizer = LLVMSymbolizerFactory( + self.system, arch, self.dsym_hints) self.llvm_symbolizers[binary] = self.last_llvm_symbolizer - else: - self.last_llvm_symbolizer = LLVMSymbolizerFactory( - self.system, guess_arch(addr), self.dsym_hints) - self.llvm_symbolizers[binary] = self.last_llvm_symbolizer - # Use the chain of symbolizers: - # Breakpad symbolizer -> LLVM symbolizer -> addr2line/atos - # (fall back to next symbolizer if the previous one fails). - if not binary in symbolizers: - symbolizers[binary] = ChainSymbolizer( - [BreakpadSymbolizerFactory(binary), self.llvm_symbolizers[binary]]) - result = symbolizers[binary].symbolize(addr, binary, offset) + # Use the chain of symbolizers: + # Breakpad symbolizer -> LLVM symbolizer -> addr2line/atos + # (fall back to next symbolizer if the previous one fails). + if not binary in symbolizers: + symbolizers[binary] = ChainSymbolizer( + [BreakpadSymbolizerFactory(binary), self.llvm_symbolizers[binary]]) + result = symbolizers[binary].symbolize(addr, binary, offset) + else: + symbolizers[binary] = ChainSymbolizer([]) if result is None: + if not allow_system_symbolizer: + raise Exception('Failed to launch or use llvm-symbolizer.') # Initialize system symbolizer only if other symbolizers failed. symbolizers[binary].append_symbolizer( - SystemSymbolizerFactory(self.system, addr, binary)) + SystemSymbolizerFactory(self.system, addr, binary, arch)) result = symbolizers[binary].symbolize(addr, binary, offset) # The system symbolizer must produce some result. assert result @@ -414,7 +438,7 @@ self.frame_no = 0 for line in logfile: processed = self.process_line(line) - print '\n'.join(processed) + print('\n'.join(processed)) def process_line_echo(self, line): return [line.rstrip()] @@ -428,18 +452,28 @@ if not match: return [self.current_line] if DEBUG: - print line + print(line) _, frameno_str, addr, binary, offset = match.groups() + arch = "" + # Arch can be embedded in the filename, e.g.: "libabc.dylib:x86_64h" + colon_pos = binary.rfind(":") + if colon_pos != -1: + maybe_arch = binary[colon_pos+1:] + if is_valid_arch(maybe_arch): + arch = maybe_arch + binary = binary[0:colon_pos] + if arch == "": + arch = guess_arch(addr) if frameno_str == '0': # Assume that frame #0 is the first frame of new stack trace. self.frame_no = 0 original_binary = binary if self.binary_name_filter: binary = self.binary_name_filter(binary) - symbolized_line = self.symbolize_address(addr, binary, offset) + symbolized_line = self.symbolize_address(addr, binary, offset, arch) if not symbolized_line: if original_binary != binary: - symbolized_line = self.symbolize_address(addr, binary, offset) + symbolized_line = self.symbolize_address(addr, binary, offset, arch) return self.get_symbolized_lines(symbolized_line) @@ -461,6 +495,8 @@ parser.add_argument('-l','--logfile', default=sys.stdin, type=argparse.FileType('r'), help='set log file name to parse, default is stdin') + parser.add_argument('--force-system-symbolizer', action='store_true', + help='don\'t use llvm-symbolizer') args = parser.parse_args() if args.path_to_cut: fix_filename_patterns = args.path_to_cut @@ -475,5 +511,9 @@ logfile = args.logfile else: logfile = sys.stdin + if args.force_system_symbolizer: + force_system_symbolizer = True + if force_system_symbolizer: + assert(allow_system_symbolizer) loop = SymbolizationLoop(binary_name_filter) loop.process_logfile()
diff --git a/tools/valgrind/memcheck/suppressions.txt b/tools/valgrind/memcheck/suppressions.txt index 6fc159861..24bb24f2 100644 --- a/tools/valgrind/memcheck/suppressions.txt +++ b/tools/valgrind/memcheck/suppressions.txt
@@ -914,14 +914,6 @@ fun:_ZN16ExtensionInfoMap12AddExtensionEPK9Extension } { - Bug_69934_a - Memcheck:Leak - fun:_Znw* - fun:_ZN*NPObjectProxy10NPAllocateEP4_NPPP7NPClass - fun:_NPN_CreateObject - fun:_ZN5blink11WebBindings12createObjectEP4_NPPP7NPClass -} -{ Bug_69934_b Memcheck:Leak fun:_Znw* @@ -950,19 +942,6 @@ fun:_ZN5blink13AXObjectCache24postPlatformNotificationEPNS_19AccessibilityObjectENS0_14AXNotificationE } { - bug_73675 - Memcheck:Leak - fun:_Znw* - fun:_ZN20LayoutTestController13waitUntilDoneERKN3WTF6VectorI10CppVariantLj0EEEPS2_ - fun:_ZN13CppBoundClass14MemberCallbackI20LayoutTestControllerE3runERKN3WTF6VectorI10CppVariantLj0EEEPS5_ - fun:_ZN13CppBoundClass6invokeEPvPK10_NPVariantjPS1_ - fun:_ZN11CppNPObject6invokeEP8NPObjectPvPK10_NPVariantjPS3_ - fun:_ZN5blink18npObjectInvokeImplERKN2v89ArgumentsENS_18InvokeFunctionTypeE - fun:_ZN5blink21npObjectMethodHandlerERKN2v89ArgumentsE - fun:_ZN2v88internal19HandleApiCallHelperILb0EEEPNS0_11MaybeObjectENS0_47_GLOBAL__N_v8_src_builtins.cc_*BuiltinArgumentsILNS0_21BuiltinExtraArgumentsE1EEE - obj:* -} -{ bug_75019 Memcheck:Leak fun:_Znw* @@ -1382,32 +1361,6 @@ fun:_ZNK7blink11RenderLayer18backgroundClipRectEPKS0_PNS_12RenderRegionENS_13ClipRectsTypeENS_29OverlayScrollbarSizeRelevancyE } { - bug_138060 - Memcheck:Uninitialized - fun:_NPN_EvaluateHelper - fun:_NPN_Evaluate - fun:_ZN5blink11WebBindings8evaluateEP4_NPPP8NPObjectP9_NPStringP10_NPVariant - fun:_ZL13executeScriptPK12PluginObjectPKc - fun:NPP_Destroy - fun:_ZN6webkit5npapi14PluginInstance11NPP_DestroyEv - fun:_ZN6webkit5npapi21WebPluginDelegateImpl15DestroyInstanceEv - fun:_ZN6webkit5npapi21WebPluginDelegateImplD0Ev - fun:_ZN6webkit5npapi21WebPluginDelegateImpl15PluginDestroyedEv - fun:_ZN6webkit5npapi13WebPluginImpl22TearDownPluginInstanceEPN5blink12WebURLLoaderE - fun:_ZN6webkit5npapi13WebPluginImpl12SetContainerEPN5blink18WebPluginContainerE - fun:_ZN6webkit5npapi13WebPluginImpl7destroyEv - fun:_ZN5blink22WebPluginContainerImplD0Ev - fun:_ZN3WTF10RefCountedIN7blink6WidgetEE5derefEv - fun:_ZNSt4pairIN3WTF6RefPtrIN7blink6WidgetEEEPNS2_9FrameViewEED1Ev - fun:_ZN3WTF9HashTableINS_6RefPtrIN7blink6WidgetEEESt4pairIS4_PNS2_9FrameViewEENS_18PairFirstExtractorIS8_EENS_7PtrHashIS4_EENS_14PairHashTraitsINS_10HashTraitsIS4_EENSE_IS7_EEEESF_E15deallocateTableEPS8_i - fun:_ZN3WTF9HashTableINS_6RefPtrIN7blink6WidgetEEESt4pairIS4_PNS2_9FrameViewEENS_18PairFirstExtractorIS8_EENS_7PtrHashIS4_EENS_14PairHashTraitsINS_10HashTraitsIS4_EENSE_IS7_EEEESF_ED1Ev - fun:_ZN3WTF7HashMapINS_6RefPtrIN7blink6WidgetEEEPNS2_9FrameViewENS_7PtrHashIS4_EENS_10HashTraitsIS4_EENS9_IS6_EEED1Ev - fun:_ZN5blink12RenderWidget28resumeWidgetHierarchyUpdatesEv - fun:_ZN5blink7Element6detachEv - fun:_ZN5blink13ContainerNode14detachChildrenEv - fun:_ZN5blink13ContainerNode6detachEv -} -{ bug_138233_a Memcheck:Leak fun:malloc
diff --git a/tools/variations/OWNERS b/tools/variations/OWNERS index 5468518..986aba6 100644 --- a/tools/variations/OWNERS +++ b/tools/variations/OWNERS
@@ -1,2 +1,4 @@ asvitkine@chromium.org danduong@chromium.org + +# COMPONENT: Internals>Metrics
diff --git a/tools/variations/fieldtrial_util.py b/tools/variations/fieldtrial_util.py index 024894a..74de88e 100644 --- a/tools/variations/fieldtrial_util.py +++ b/tools/variations/fieldtrial_util.py
@@ -32,14 +32,18 @@ return duplicates def _CheckForDuplicateFeatures(enable_features, disable_features): + enable_features = [f.split('<')[0] for f in enable_features] enable_features_set = set(enable_features) if len(enable_features_set) != len(enable_features): raise Exception('Duplicate feature(s) in enable_features: ' + ', '.join(_FindDuplicates(enable_features))) + + disable_features = [f.split('<')[0] for f in disable_features] disable_features_set = set(disable_features) if len(disable_features_set) != len(disable_features): raise Exception('Duplicate feature(s) in disable_features: ' + ', '.join(_FindDuplicates(disable_features))) + features_in_both = enable_features_set.intersection(disable_features_set) if len(features_in_both) > 0: raise Exception('Conflicting features set as both enabled and disabled: ' + @@ -79,10 +83,10 @@ param_list = [_escape(x) for x in param_list] param = '%s:%s' % ('.'.join(selected_study), '/'.join(param_list)) params.append(param) - if 'enable_features' in experiment: - enable_features.extend(experiment['enable_features']) - if 'disable_features' in experiment: - disable_features.extend(experiment['disable_features']) + for feature in experiment.get('enable_features', []): + enable_features.append(feature + '<' + study_name) + for feature in experiment.get('disable_features', []): + disable_features.append(feature + '<' + study_name) if not len(studies): return []
diff --git a/tools/variations/fieldtrial_util_unittest.py b/tools/variations/fieldtrial_util_unittest.py index a215201..1e0db3c 100644 --- a/tools/variations/fieldtrial_util_unittest.py +++ b/tools/variations/fieldtrial_util_unittest.py
@@ -66,8 +66,8 @@ '--force-fieldtrial-params=' 'SimpleParams.Default:id/abc,' 'c.d%2E:url/http%3A%2F%2Fwww%2Egoogle%2Ecom', - '--enable-features=a,b,x', - '--disable-features=y'], result) + '--enable-features=a<SimpleParams,b<SimpleParams,x<c', + '--disable-features=y<c'], result) def test_DuplicateEnableFeatures(self): config = '''{
diff --git a/tools/vim/PRESUBMIT.py b/tools/vim/PRESUBMIT.py index 33cdd6d..1cd25f9 100644 --- a/tools/vim/PRESUBMIT.py +++ b/tools/vim/PRESUBMIT.py
@@ -1,12 +1,12 @@ # Copyright 2015 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. - """Presubmit tests for /tools/vim. Runs Python unit tests in /tools/vim/tests on upload. """ + def CheckChangeOnUpload(input_api, output_api): results = [] @@ -14,7 +14,8 @@ # relative to the directory containing PRESUBMIT.py. affected_files = [ input_api.os_path.relpath(f, input_api.PresubmitLocalPath()) - for f in input_api.AbsoluteLocalPaths()] + for f in input_api.AbsoluteLocalPaths() + ] # Run the chromium.ycm_extra_conf_unittest test if the YCM config file is # changed or if any change is affecting the tests directory. This specific @@ -24,8 +25,8 @@ 'ninja_output.py' in affected_files or \ any([input_api.re.match(r'tests(/|\\)',f) for f in affected_files]): results += input_api.RunTests( - input_api.canned_checks.GetUnitTests( - input_api, output_api, - ['tests/chromium.ycm_extra_conf_unittest.py'])) + input_api.canned_checks.GetUnitTests(input_api, output_api, [ + 'tests/chromium.ycm_extra_conf_unittest.py' + ])) return results
diff --git a/tools/vim/chromium.ycm_extra_conf.py b/tools/vim/chromium.ycm_extra_conf.py index 9456394..2669573 100644 --- a/tools/vim/chromium.ycm_extra_conf.py +++ b/tools/vim/chromium.ycm_extra_conf.py
@@ -47,7 +47,6 @@ # # * This has only been tested on gPrecise. - import os import os.path import re @@ -57,19 +56,20 @@ # Flags from YCM's default config. _default_flags = [ - '-DUSE_CLANG_COMPLETER', - '-std=c++11', - '-x', - 'c++', + '-DUSE_CLANG_COMPLETER', + '-std=c++11', + '-x', + 'c++', ] _header_alternates = ('.cc', '.cpp', '.c', '.mm', '.m') _extension_flags = { - '.m': ['-x', 'objective-c'], - '.mm': ['-x', 'objective-c++'], + '.m': ['-x', 'objective-c'], + '.mm': ['-x', 'objective-c++'], } + def PathExists(*args): return os.path.exists(os.path.join(*args)) @@ -86,10 +86,9 @@ (String) Path of 'src/', or None if unable to find. """ curdir = os.path.normpath(os.path.dirname(filename)) - while not (os.path.basename(curdir) == 'src' - and PathExists(curdir, 'DEPS') - and (PathExists(curdir, '..', '.gclient') - or PathExists(curdir, '.git'))): + while not ( + os.path.basename(curdir) == 'src' and PathExists(curdir, 'DEPS') and + (PathExists(curdir, '..', '.gclient') or PathExists(curdir, '.git'))): nextdir = os.path.normpath(os.path.join(curdir, '..')) if nextdir == curdir: return None @@ -138,9 +137,11 @@ # directory. rel_filename = os.path.relpath(filename, out_dir) - p = subprocess.Popen(['ninja', '-C', out_dir, '-t', 'query', rel_filename], - stdout=subprocess.PIPE, stderr=subprocess.STDOUT, - universal_newlines=True) + p = subprocess.Popen( + ['ninja', '-C', out_dir, '-t', 'query', rel_filename], + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + universal_newlines=True) stdout, _ = p.communicate() if p.returncode != 0: return [] @@ -154,8 +155,10 @@ # outputs_text = stdout.partition('\n outputs:\n')[2] output_lines = [line.strip() for line in outputs_text.split('\n')] - return [target for target in output_lines - if target and (target.endswith('.o') or target.endswith('.obj'))] + return [ + target for target in output_lines + if target and (target.endswith('.o') or target.endswith('.obj')) + ] def GetClangCommandLineForNinjaOutput(out_dir, build_target): @@ -172,9 +175,10 @@ (String or None) Clang command line or None if a Clang command line couldn't be determined. """ - p = subprocess.Popen(['ninja', '-v', '-C', out_dir, - '-t', 'commands', build_target], - stdout=subprocess.PIPE, universal_newlines=True) + p = subprocess.Popen( + ['ninja', '-v', '-C', out_dir, '-t', 'commands', build_target], + stdout=subprocess.PIPE, + universal_newlines=True) stdout, stderr = p.communicate() if p.returncode != 0: return None @@ -319,8 +323,10 @@ # If ninja didn't know about filename or it's companion files, then try a # default build target. It is possible that the file is new, or build.ninja # is stale. - clang_line = GetClangCommandLineFromNinjaForSource( - out_dir, GetDefaultSourceFile(chrome_root, filename)) + clang_line = GetClangCommandLineFromNinjaForSource(out_dir, + GetDefaultSourceFile( + chrome_root, + filename)) if not clang_line: return additional_flags @@ -350,7 +356,4 @@ final_flags = _default_flags + clang_flags - return { - 'flags': final_flags, - 'do_cache': should_cache_flags_for_file - } + return {'flags': final_flags, 'do_cache': should_cache_flags_for_file}
diff --git a/tools/vim/ninja_output.py b/tools/vim/ninja_output.py index f959dc2..6695fcfa 100644 --- a/tools/vim/ninja_output.py +++ b/tools/vim/ninja_output.py
@@ -2,7 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. - import sys import os import itertools @@ -13,6 +12,7 @@ except ImportError: pass + def GetNinjaOutputDirectory(chrome_root): """Returns <chrome_root>/<output_dir>/(Release|Debug|<other>). @@ -65,8 +65,8 @@ try: return max(generate_paths(), key=approx_directory_mtime) except ValueError: - raise RuntimeError( - 'Unable to find a valid ninja output directory.') + raise RuntimeError('Unable to find a valid ninja output directory.') + if __name__ == '__main__': if len(sys.argv) != 2:
diff --git a/tools/vim/tests/chromium.ycm_extra_conf_unittest.py b/tools/vim/tests/chromium.ycm_extra_conf_unittest.py index 3443fa3..5ed29e91 100755 --- a/tools/vim/tests/chromium.ycm_extra_conf_unittest.py +++ b/tools/vim/tests/chromium.ycm_extra_conf_unittest.py
@@ -3,7 +3,6 @@ # Copyright 2015 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. - """Tests for chromium.ycm_extra_conf. These tests should be getting picked up by the PRESUBMIT.py in /tools/vim. @@ -21,10 +20,8 @@ import tempfile import unittest -def CreateFile(path, - copy_from = None, - format_with = None, - make_executable = False): + +def CreateFile(path, copy_from=None, format_with=None, make_executable=False): """Creates a file. If a file already exists at |path|, it will be overwritten. @@ -53,21 +50,26 @@ statinfo = os.stat(path) os.chmod(path, statinfo.st_mode | stat.S_IXUSR) + def GetLastLangFlag(flags): lastLang = None for i, flag in enumerate(flags): - if flag =='-x': - lastLang = flags[i+1] + if flag == '-x': + lastLang = flags[i + 1] return lastLang + def TestLanguage(test_file, language): + def test(self): result = self.ycm_extra_conf.FlagsForFile( os.path.join(self.chrome_root, test_file)) self.assertTrue(result) self.assertEqual(GetLastLangFlag(result['flags']), language) + return test + class Chromium_ycmExtraConfTest(unittest.TestCase): def SetUpFakeChromeTreeBelowPath(self): @@ -89,8 +91,8 @@ +-- gn build.ninja """ - self.chrome_root = os.path.abspath(os.path.normpath( - os.path.join(self.test_root, 'src'))) + self.chrome_root = os.path.abspath( + os.path.normpath(os.path.join(self.test_root, 'src'))) self.out_dir = os.path.join(self.chrome_root, 'out', 'gn') os.makedirs(self.chrome_root) @@ -104,9 +106,9 @@ # Fake ninja build file. Applications of 'cxx' rule are tagged by which # source file was used as input so that the test can verify that the correct # build dependency was used. - CreateFile(os.path.join(self.out_dir, 'build.ninja'), - copy_from=os.path.join(self.test_data_path, - 'fake_build_ninja.txt')) + CreateFile( + os.path.join(self.out_dir, 'build.ninja'), + copy_from=os.path.join(self.test_data_path, 'fake_build_ninja.txt')) def NormalizeString(self, string): return string.replace(self.out_dir, '[OUT]').\ @@ -147,8 +149,8 @@ def testCommandLineForKnownCppFile(self): command_line = self.ycm_extra_conf.GetClangCommandLineFromNinjaForSource( self.out_dir, os.path.join(self.chrome_root, 'one.cpp')) - self.assertEquals( - command_line, ('../../fake-clang++ -Ia -isysroot /mac.sdk -Itag-one ' + self.assertEquals(command_line, + ('../../fake-clang++ -Ia -isysroot /mac.sdk -Itag-one ' '../../one.cpp -o obj/one.o')) def testCommandLineForUnknownCppFile(self): @@ -160,28 +162,24 @@ clang_options = \ self.ycm_extra_conf.GetClangOptionsFromNinjaForFilename( self.chrome_root, os.path.join(self.chrome_root, 'one.cpp')) - self.assertEquals(self.NormalizeStringsInList(clang_options), [ - '-I[SRC]', - '-Wno-unknown-warning-option', - '-I[OUT]/a', - '-isysroot', - '/mac.sdk', - '-I[OUT]/tag-one' + self.assertEquals( + self.NormalizeStringsInList(clang_options), [ + '-I[SRC]', '-Wno-unknown-warning-option', '-I[OUT]/a', '-isysroot', + '/mac.sdk', '-I[OUT]/tag-one' ]) def testOutDirNames(self): out_root = os.path.join(self.chrome_root, 'out_with_underscore') out_dir = os.path.join(out_root, 'gn') - shutil.move(os.path.join(self.chrome_root, 'out'), - out_root) + shutil.move(os.path.join(self.chrome_root, 'out'), out_root) clang_options = \ self.ycm_extra_conf.GetClangOptionsFromNinjaForFilename( self.chrome_root, os.path.join(self.chrome_root, 'one.cpp')) self.assertIn('-I%s/a' % self.NormalizeString(out_dir), - self.NormalizeStringsInList(clang_options)) + self.NormalizeStringsInList(clang_options)) self.assertIn('-I%s/tag-one' % self.NormalizeString(out_dir), - self.NormalizeStringsInList(clang_options)) + self.NormalizeStringsInList(clang_options)) def testGetFlagsForFileForKnownCppFile(self): result = self.ycm_extra_conf.FlagsForFile( @@ -190,16 +188,11 @@ self.assertTrue('do_cache' in result) self.assertTrue(result['do_cache']) self.assertTrue('flags' in result) - self.assertEquals(self.NormalizeStringsInList(result['flags']), [ - '-DUSE_CLANG_COMPLETER', - '-std=c++11', - '-x', 'c++', - '-I[SRC]', - '-Wno-unknown-warning-option', - '-I[OUT]/a', - '-isysroot', - '/mac.sdk', - '-I[OUT]/tag-one' + self.assertEquals( + self.NormalizeStringsInList(result['flags']), [ + '-DUSE_CLANG_COMPLETER', '-std=c++11', '-x', 'c++', '-I[SRC]', + '-Wno-unknown-warning-option', '-I[OUT]/a', '-isysroot', '/mac.sdk', + '-I[OUT]/tag-one' ]) def testGetFlagsForFileForUnknownCppFile(self): @@ -209,16 +202,11 @@ self.assertTrue('do_cache' in result) self.assertTrue(result['do_cache']) self.assertTrue('flags' in result) - self.assertEquals(self.NormalizeStringsInList(result['flags']), [ - '-DUSE_CLANG_COMPLETER', - '-std=c++11', - '-x', 'c++', - '-I[SRC]', - '-Wno-unknown-warning-option', - '-I[OUT]/a', - '-isysroot', - '/mac.sdk', - '-I[OUT]/tag-default' + self.assertEquals( + self.NormalizeStringsInList(result['flags']), [ + '-DUSE_CLANG_COMPLETER', '-std=c++11', '-x', 'c++', '-I[SRC]', + '-Wno-unknown-warning-option', '-I[OUT]/a', '-isysroot', '/mac.sdk', + '-I[OUT]/tag-default' ]) def testGetFlagsForFileForUnknownCppNotTestFile(self): @@ -228,26 +216,20 @@ self.assertTrue('do_cache' in result) self.assertTrue(result['do_cache']) self.assertTrue('flags' in result) - self.assertEquals(self.NormalizeStringsInList(result['flags']), [ - '-DUSE_CLANG_COMPLETER', - '-std=c++11', - '-x', 'c++', - '-I[SRC]', - '-Wno-unknown-warning-option', - '-I[OUT]/a', - '-isysroot', - '/mac.sdk', - '-I[OUT]/tag-default' + self.assertEquals( + self.NormalizeStringsInList(result['flags']), [ + '-DUSE_CLANG_COMPLETER', '-std=c++11', '-x', 'c++', '-I[SRC]', + '-Wno-unknown-warning-option', '-I[OUT]/a', '-isysroot', '/mac.sdk', + '-I[OUT]/tag-default' ]) - testGetFlagsForFileForKnownObjcFile = TestLanguage( - 'eight.m', 'objective-c') + testGetFlagsForFileForKnownObjcFile = TestLanguage('eight.m', 'objective-c') testGetFlagsForFileForKnownObjcHeaderFile = TestLanguage( 'eight.h', 'objective-c') - testGetFlagsForFileForUnknownObjcFile = TestLanguage( - 'nonexistent.m', 'objective-c') - testGetFlagsForFileForKnownObjcppFile = TestLanguage( - 'nine.mm', 'objective-c++') + testGetFlagsForFileForUnknownObjcFile = TestLanguage('nonexistent.m', + 'objective-c') + testGetFlagsForFileForKnownObjcppFile = TestLanguage('nine.mm', + 'objective-c++') testGetFlagsForFileForKnownObjcppHeaderFile = TestLanguage( 'nine.h', 'objective-c++') testGetFlagsForFileForUnknownObjcppFile = TestLanguage( @@ -260,16 +242,11 @@ self.assertTrue('do_cache' in result) self.assertTrue(result['do_cache']) self.assertTrue('flags' in result) - self.assertEquals(self.NormalizeStringsInList(result['flags']), [ - '-DUSE_CLANG_COMPLETER', - '-std=c++11', - '-x', 'c++', - '-I[SRC]', - '-Wno-unknown-warning-option', - '-I[OUT]/a', - '-isysroot', - '/mac.sdk', - '-I[OUT]/tag-default' + self.assertEquals( + self.NormalizeStringsInList(result['flags']), [ + '-DUSE_CLANG_COMPLETER', '-std=c++11', '-x', 'c++', '-I[SRC]', + '-Wno-unknown-warning-option', '-I[OUT]/a', '-isysroot', '/mac.sdk', + '-I[OUT]/tag-default' ]) def testGetFlagsForFileForUnknownUnittestFile(self): @@ -279,16 +256,11 @@ self.assertTrue('do_cache' in result) self.assertTrue(result['do_cache']) self.assertTrue('flags' in result) - self.assertEquals(self.NormalizeStringsInList(result['flags']), [ - '-DUSE_CLANG_COMPLETER', - '-std=c++11', - '-x', 'c++', - '-I[SRC]', - '-Wno-unknown-warning-option', - '-I[OUT]/a', - '-isysroot', - '/mac.sdk', - '-I[OUT]/tag-default-test' + self.assertEquals( + self.NormalizeStringsInList(result['flags']), [ + '-DUSE_CLANG_COMPLETER', '-std=c++11', '-x', 'c++', '-I[SRC]', + '-Wno-unknown-warning-option', '-I[OUT]/a', '-isysroot', '/mac.sdk', + '-I[OUT]/tag-default-test' ]) def testGetFlagsForFileForUnknownBrowsertestFile2(self): @@ -298,16 +270,11 @@ self.assertTrue('do_cache' in result) self.assertTrue(result['do_cache']) self.assertTrue('flags' in result) - self.assertEquals(self.NormalizeStringsInList(result['flags']), [ - '-DUSE_CLANG_COMPLETER', - '-std=c++11', - '-x', 'c++', - '-I[SRC]', - '-Wno-unknown-warning-option', - '-I[OUT]/a', - '-isysroot', - '/mac.sdk', - '-I[OUT]/tag-default-test' + self.assertEquals( + self.NormalizeStringsInList(result['flags']), [ + '-DUSE_CLANG_COMPLETER', '-std=c++11', '-x', 'c++', '-I[SRC]', + '-Wno-unknown-warning-option', '-I[OUT]/a', '-isysroot', '/mac.sdk', + '-I[OUT]/tag-default-test' ]) def testGetFlagsForFileForKnownHeaderFileWithAssociatedCppFile(self): @@ -317,29 +284,24 @@ self.assertTrue('do_cache' in result) self.assertTrue(result['do_cache']) self.assertTrue('flags' in result) - self.assertEquals(self.NormalizeStringsInList(result['flags']), [ - '-DUSE_CLANG_COMPLETER', - '-std=c++11', - '-x', 'c++', - '-I[SRC]', - '-Wno-unknown-warning-option', - '-I[OUT]/a', - '-isysroot', - '/mac.sdk', - '-I[OUT]/tag-three' + self.assertEquals( + self.NormalizeStringsInList(result['flags']), [ + '-DUSE_CLANG_COMPLETER', '-std=c++11', '-x', 'c++', '-I[SRC]', + '-Wno-unknown-warning-option', '-I[OUT]/a', '-isysroot', '/mac.sdk', + '-I[OUT]/tag-three' ]) def testSourceFileWithNonClangOutputs(self): # Verify assumption that four.cc has non-compiler-output listed as the first # output. - p = subprocess.Popen(['ninja', '-C', self.out_dir, '-t', - 'query', '../../four.cc'], - stdout=subprocess.PIPE, stderr=subprocess.STDOUT, - universal_newlines=True) + p = subprocess.Popen( + ['ninja', '-C', self.out_dir, '-t', 'query', '../../four.cc'], + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + universal_newlines=True) stdout, _ = p.communicate() self.assertFalse(p.returncode) - self.assertEquals(stdout, - '../../four.cc:\n' + self.assertEquals(stdout, '../../four.cc:\n' ' outputs:\n' ' obj/linker-output.o\n' ' obj/four.o\n') @@ -350,16 +312,11 @@ self.assertTrue('do_cache' in result) self.assertTrue(result['do_cache']) self.assertTrue('flags' in result) - self.assertEquals(self.NormalizeStringsInList(result['flags']), [ - '-DUSE_CLANG_COMPLETER', - '-std=c++11', - '-x', 'c++', - '-I[SRC]', - '-Wno-unknown-warning-option', - '-I[OUT]/a', - '-isysroot', - '/mac.sdk', - '-I[OUT]/tag-four' + self.assertEquals( + self.NormalizeStringsInList(result['flags']), [ + '-DUSE_CLANG_COMPLETER', '-std=c++11', '-x', 'c++', '-I[SRC]', + '-Wno-unknown-warning-option', '-I[OUT]/a', '-isysroot', '/mac.sdk', + '-I[OUT]/tag-four' ]) def testSourceFileWithOnlyNonClangOutputs(self): @@ -369,16 +326,11 @@ self.assertTrue('do_cache' in result) self.assertTrue(result['do_cache']) self.assertTrue('flags' in result) - self.assertEquals(self.NormalizeStringsInList(result['flags']), [ - '-DUSE_CLANG_COMPLETER', - '-std=c++11', - '-x', 'c++', - '-I[SRC]', - '-Wno-unknown-warning-option', - '-I[OUT]/a', - '-isysroot', - '/mac.sdk', - '-I[OUT]/tag-default' + self.assertEquals( + self.NormalizeStringsInList(result['flags']), [ + '-DUSE_CLANG_COMPLETER', '-std=c++11', '-x', 'c++', '-I[SRC]', + '-Wno-unknown-warning-option', '-I[OUT]/a', '-isysroot', '/mac.sdk', + '-I[OUT]/tag-default' ]) def testGetFlagsForSysrootAbsPath(self): @@ -388,14 +340,16 @@ self.assertTrue('do_cache' in result) self.assertTrue(result['do_cache']) self.assertTrue('flags' in result) - self.assertEquals(self.NormalizeStringsInList(result['flags']), [ - '-DUSE_CLANG_COMPLETER', - '-std=c++11', - '-x', 'c++', - '-I[SRC]', - '-Wno-unknown-warning-option', - '-I[OUT]/a', - '--sysroot=/usr/lib/sysroot-image', + self.assertEquals( + self.NormalizeStringsInList(result['flags']), [ + '-DUSE_CLANG_COMPLETER', + '-std=c++11', + '-x', + 'c++', + '-I[SRC]', + '-Wno-unknown-warning-option', + '-I[OUT]/a', + '--sysroot=/usr/lib/sysroot-image', ]) def testGetFlagsForSysrootRelPath(self): @@ -405,16 +359,19 @@ self.assertTrue('do_cache' in result) self.assertTrue(result['do_cache']) self.assertTrue('flags' in result) - self.assertEquals(self.NormalizeStringsInList(result['flags']), [ - '-DUSE_CLANG_COMPLETER', - '-std=c++11', - '-x', 'c++', - '-I[SRC]', - '-Wno-unknown-warning-option', - '-I[OUT]/a', - '--sysroot=[SRC]/build/sysroot-image', + self.assertEquals( + self.NormalizeStringsInList(result['flags']), [ + '-DUSE_CLANG_COMPLETER', + '-std=c++11', + '-x', + 'c++', + '-I[SRC]', + '-Wno-unknown-warning-option', + '-I[OUT]/a', + '--sysroot=[SRC]/build/sysroot-image', ]) + if __name__ == '__main__': if not os.path.isfile('chromium.ycm_extra_conf.py'): print('The test must be run from src/tools/vim/ directory')
diff --git a/tools/win/DebugVisualizers/chrome.natvis b/tools/win/DebugVisualizers/chrome.natvis index 8ed8e1d..cc3155c7 100644 --- a/tools/win/DebugVisualizers/chrome.natvis +++ b/tools/win/DebugVisualizers/chrome.natvis
@@ -72,6 +72,10 @@ <Item Name="RefCount">((base::subtle::RefCountedBase*)ptr_)->ref_count_</Item> </Expand> </Type> + <Type Name="base::Optional<*>"> + <DisplayString Condition="storage_.is_null_">(null)</DisplayString> + <DisplayString>{storage_.value_}</DisplayString> + </Type> <Type Name="base::RefCounted<*>"> <DisplayString>RefCount: {ref_count_}</DisplayString> <Expand>
diff --git a/tools/win/DebugVisualizers/webkit.natvis b/tools/win/DebugVisualizers/webkit.natvis index 1abddea9..2d78312 100644 --- a/tools/win/DebugVisualizers/webkit.natvis +++ b/tools/win/DebugVisualizers/webkit.natvis
@@ -1,111 +1,118 @@ <?xml version="1.0" encoding="utf-8" ?> <AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> - <Type Name="blink::Member<*>"> - <DisplayString Condition="m_raw == 0">null</DisplayString> - <DisplayString>{*m_raw}</DisplayString> + <Type Name="blink::MemberBase<*>"> + <DisplayString Condition="raw_ == 0">null</DisplayString> + <DisplayString>{*raw_}</DisplayString> <Expand> - <Item Name="m_raw">m_raw</Item> + <Item Name="Raw">raw_</Item> + </Expand> + </Type> + <Type Name="blink::PersistentBase<*>"> + <DisplayString Condition="raw_ == 0">null</DisplayString> + <DisplayString>{*raw_}</DisplayString> + <Expand> + <Item Name="Raw">raw_</Item> </Expand> </Type> <Type Name="WTF::String"> - <DisplayString Condition="m_impl.m_ptr == 0">(null)</DisplayString> - <DisplayString IncludeView="bare">{*m_impl.m_ptr,view(bare)}</DisplayString> - <DisplayString>{*m_impl.m_ptr}</DisplayString> + <DisplayString Condition="impl_.ptr_ == 0">(null)</DisplayString> + <DisplayString IncludeView="bare">{*impl_.ptr_,view(bare)}</DisplayString> + <DisplayString>{*impl_.ptr_}</DisplayString> <Expand> - <Item Name="Impl">m_impl.m_ptr</Item> + <Item Name="Impl">impl_.ptr_</Item> </Expand> </Type> <Type Name="WTF::StringImpl"> <DisplayString IncludeView="bare" - Condition="m_is8Bit">{(this+1),[m_length]sb}</DisplayString> + Condition="is8_bit_">{(this+1),[length_]sb}</DisplayString> <DisplayString - Condition="m_is8Bit">[{m_length}] {(this+1),[m_length]s}</DisplayString> - <DisplayString IncludeView="bare">{(this+1),[m_length]sub}</DisplayString> - <DisplayString>[{m_length}] {(this+1),[m_length]su}</DisplayString> + Condition="is8_bit_">[{length_}] {(this+1),[length_]s}</DisplayString> + <DisplayString IncludeView="bare">{(this+1),[length_]sub}</DisplayString> + <DisplayString>[{length_}] {(this+1),[length_]su}</DisplayString> <Expand> - <Item Name="Length">m_length</Item> - <Item Name="Hash">m_hash</Item> - <Item Name="AsciiText" Condition="m_is8Bit">(this+1),[m_length]s</Item> - <Item Name="UnicodeText" Condition="!m_is8Bit">(this+1),[m_length]su</Item> + <Item Name="Length">length_</Item> + <Item Name="Hash">hash_</Item> + <Item Name="AsciiText" Condition="is8_bit_">(this+1),[length_]s</Item> + <Item Name="UnicodeText" Condition="!is8_bit_">(this+1),[length_]su</Item> </Expand> </Type> <Type Name="WTF::AtomicString"> - <DisplayString IncludeView="bare">{m_string,view(bare)}</DisplayString> - <DisplayString>{m_string}</DisplayString> + <DisplayString IncludeView="bare">{string_,view(bare)}</DisplayString> + <DisplayString>{string_}</DisplayString> </Type> <Type Name="WTF::Vector<*>"> - <DisplayString Condition="m_size==0">(empty)</DisplayString> - <DisplayString Condition="m_size==1">[{m_size}] {m_buffer,1}</DisplayString> - <DisplayString Condition="m_size==2">[{m_size}] {m_buffer,2}</DisplayString> - <DisplayString Condition="m_size==3">[{m_size}] {m_buffer,3}</DisplayString> - <DisplayString Condition="m_size==4">[{m_size}] {m_buffer,4}</DisplayString> + <DisplayString Condition="size_==0">(empty)</DisplayString> + <DisplayString Condition="size_==1">[{size_}] {buffer_,1}</DisplayString> + <DisplayString Condition="size_==2">[{size_}] {buffer_,2}</DisplayString> + <DisplayString Condition="size_==3">[{size_}] {buffer_,3}</DisplayString> + <DisplayString Condition="size_==4">[{size_}] {buffer_,4}</DisplayString> <DisplayString - Condition="m_size>=5">[{m_size}] {m_buffer,4}...</DisplayString> + Condition="size_>=5">[{size_}] {buffer_,4}...</DisplayString> <Expand> - <Item Name="Buffer">m_buffer</Item> - <Item Name="Size">m_size</Item> - <Item Name="Capacity">m_capacity</Item> - <ArrayItems Condition="m_size>0"> - <Size>m_size</Size> - <ValuePointer>m_buffer</ValuePointer> + <Item Name="Buffer">buffer_</Item> + <Item Name="Size">size_</Item> + <Item Name="Capacity">capacity_</Item> + <ArrayItems Condition="size_>0"> + <Size>size_</Size> + <ValuePointer>buffer_</ValuePointer> </ArrayItems> </Expand> </Type> <Type Name="WTF::HashTable<*>"> - <DisplayString>keyCount={m_keyCount}, tableSize={m_tableSize}</DisplayString> + <DisplayString>keyCount={key_count_}, tableSize={table_size_}</DisplayString> <Expand> - <ArrayItems Condition="m_tableSize>0"> - <Size>m_tableSize</Size> - <ValuePointer>m_table</ValuePointer> + <ArrayItems Condition="table_size_>0"> + <Size>table_size_</Size> + <ValuePointer>table_</ValuePointer> </ArrayItems> </Expand> </Type> <Type Name="WTF::RefPtr<*>"> <AlternativeType Name="WTF::PassRefPtr<*>"/> - <DisplayString Condition="m_ptr == 0">null</DisplayString> - <DisplayString>{*m_ptr}</DisplayString> + <DisplayString Condition="ptr_ == 0">null</DisplayString> + <DisplayString>{*ptr_}</DisplayString> <Expand> - <Item Name="Ptr">m_ptr</Item> + <Item Name="Ptr">ptr_</Item> </Expand> </Type> <Type Name="blink::LayoutUnit"> - <DisplayString>{(float)m_value / kFixedPointDenominator}</DisplayString> + <DisplayString>{(float)value_ / 64}</DisplayString> <Expand> - <Item Name="FloatVal">(float)m_value / kFixedPointDenominator</Item> - <Item Name="RawVal">m_value</Item> + <Item Name="FloatVal">(float)value_ / 64</Item> + <Item Name="RawVal">value_</Item> </Expand> </Type> <Type Name="blink::LayoutSize"> <AlternativeType Name="blink::IntSize"/> <AlternativeType Name="blink::FloatSize"/> - <DisplayString>({m_width}, {m_height})</DisplayString> + <DisplayString>({width_}, {height_})</DisplayString> <Expand> - <Item Name="Width">m_width</Item> - <Item Name="Height">m_height</Item> + <Item Name="Width">width_</Item> + <Item Name="Height">height_</Item> </Expand> </Type> <Type Name="blink::LayoutPoint"> <AlternativeType Name="blink::IntPoint"/> <AlternativeType Name="blink::FloatPoint"/> - <DisplayString>({m_x}, {m_y})</DisplayString> + <DisplayString>({x_}, {y_})</DisplayString> <Expand> - <Item Name="X">m_x</Item> - <Item Name="Y">m_y</Item> + <Item Name="X">x_</Item> + <Item Name="Y">y_</Item> </Expand> </Type> <Type Name="blink::LayoutRect"> <AlternativeType Name="blink::IntRect"/> <AlternativeType Name="blink::FloatRect"/> - <DisplayString>({m_location.m_x}, {m_location.m_y}) x ({m_size.m_width}, {m_size.m_height})</DisplayString> + <DisplayString>({location_.x_}, {location_.y_}) x ({size_.width_}, {size_.height_})</DisplayString> <Expand> - <Item Name="Location">m_location</Item> - <Item Name="Size">m_size</Item> + <Item Name="Location">location_</Item> + <Item Name="Size">size_</Item> </Expand> </Type> <Type Name="blink::Length"> - <DisplayString Condition="m_isFloat">{(blink::LengthType)m_type} {m_floatValue}</DisplayString> - <DisplayString>{(blink::LengthType)m_type} {m_intValue}</DisplayString> + <DisplayString Condition="is_float_">{(blink::LengthType)type_} {float_value_}</DisplayString> + <DisplayString>{(blink::LengthType)type_} {int_value_}</DisplayString> </Type> <Type Name="blink::WebRect"> <AlternativeType Name="blink::WebFloatRect"/> @@ -133,59 +140,59 @@ </Type> <!-- Component build version --> <Type Name="blink::WebString"> - <DisplayString>{(blink_platform.dll!WTF::StringImpl*)(m_private.m_storage)}</DisplayString> + <DisplayString>{(blink_platform.dll!WTF::StringImpl*)(private_.storage_)}</DisplayString> </Type> <!-- Non-component build version --> - <Type Name="blink::WebString"> - <DisplayString>{(WTF::StringImpl*)(m_private.m_storage)}</DisplayString> + <Type Name="blink::WebString" Priority="Low"> + <DisplayString>{(WTF::StringImpl*)(private_.storage_)}</DisplayString> </Type> <!-- DOM --> <Type Name="blink::QualifiedName"> - <DisplayString Condition="m_impl.m_ptr == 0">(null)</DisplayString> - <DisplayString>{*m_impl.m_ptr}</DisplayString> + <DisplayString Condition="impl_.ptr_ == 0">(null)</DisplayString> + <DisplayString>{*impl_.ptr_}</DisplayString> </Type> <Type Name="blink::QualifiedName::QualifiedNameImpl"> - <DisplayString>{m_localName,view(bare)}</DisplayString> + <DisplayString>{local_name_,view(bare)}</DisplayString> </Type> <Type Name="blink::CharacterData"> - <DisplayString>{m_data,view(bare)}</DisplayString> + <DisplayString>{data_,view(bare)}</DisplayString> </Type> <Type Name="blink::ContainerNode"> <Expand> <LinkedListItems> - <HeadPointer>m_firstChild.m_raw</HeadPointer> - <NextPointer>m_next.m_raw</NextPointer> + <HeadPointer>first_child_.raw_</HeadPointer> + <NextPointer>next_.raw_</NextPointer> <ValueNode>this</ValueNode> </LinkedListItems> </Expand> </Type> <Type Name="blink::Element"> - <DisplayString Condition="m_firstChild.m_raw != 0"><{m_tagName}>{m_firstChild}</DisplayString> - <DisplayString><{m_tagName}></DisplayString> + <DisplayString Condition="first_child_.raw_ != 0"><{tag_name_}>{first_child_}</DisplayString> + <DisplayString><{tag_name_}></DisplayString> </Type> <!-- Layout: LayoutObject --> <Type Name="blink::LayoutObject"> - <DisplayString Condition="m_bitfields.m_isAnonymous">Anonymous</DisplayString> - <DisplayString>{m_node}</DisplayString> + <DisplayString Condition="bitfields_.m_IsAnonymous">Anonymous</DisplayString> + <DisplayString>{node_}</DisplayString> </Type> <Type Name="blink::LayoutObjectChildList"> <Expand> <LinkedListItems> - <HeadPointer>m_firstChild</HeadPointer> - <NextPointer>m_next</NextPointer> + <HeadPointer>first_child_</HeadPointer> + <NextPointer>next_</NextPointer> <ValueNode>this</ValueNode> </LinkedListItems> </Expand> </Type> <!-- Layout: InlineBox --> <Type Name="blink::InlineBox"> - <DisplayString>{m_layoutObject}</DisplayString> + <DisplayString>{line_layout_item_}</DisplayString> </Type> <Type Name="blink::InlineFlowBox"> <Expand> <LinkedListItems> - <HeadPointer>m_firstChild</HeadPointer> - <NextPointer>m_next</NextPointer> + <HeadPointer>first_child_</HeadPointer> + <NextPointer>next_</NextPointer> <ValueNode>this</ValueNode> </LinkedListItems> </Expand> @@ -193,49 +200,71 @@ <Type Name="blink::LineBoxList"> <Expand> <LinkedListItems> - <HeadPointer>m_firstLineBox</HeadPointer> - <NextPointer>m_nextLineBox</NextPointer> + <HeadPointer>first_line_box_</HeadPointer> + <NextPointer>next_line_box_</NextPointer> <ValueNode>this</ValueNode> </LinkedListItems> </Expand> </Type> <Type Name="blink::LineLayoutItem"> - <DisplayString>{m_layoutObject}</DisplayString> + <DisplayString>{layout_object_}</DisplayString> + </Type> + <!-- Layout: LayoutNG --> + <Type Name="blink::NGBlockNode"> + <DisplayString>{layout_box_}</DisplayString> + </Type> + <Type Name="blink::NGFragment"> + <DisplayString>{physical_fragment_}</DisplayString> + </Type> + <Type Name="blink::NGPhysicalFragment"> + <DisplayString>{(blink::NGPhysicalFragment::NGFragmentType)type_} {layout_object_} {size_} {offset_}</DisplayString> + </Type> + <Type Name="blink::NGLogicalOffset"> + <DisplayString>({inline_offset}, {block_offset})</DisplayString> + </Type> + <Type Name="blink::NGLogicalSize"> + <DisplayString>({inline_size} x {block_size})</DisplayString> + </Type> + <Type Name="blink::NGPhysicalOffset"> + <DisplayString>({left}, {top})</DisplayString> + </Type> + <Type Name="blink::NGPhysicalSize"> + <DisplayString>({width} x {height})</DisplayString> </Type> <!-- Layout: TextRun --> <Type Name="blink::TextRun"> - <DisplayString Condition="m_is8Bit">{m_data.characters8,[m_len]s}</DisplayString> - <DisplayString>{(m_data.characters16),[m_len]su}</DisplayString> + <DisplayString Condition="is8_bit_">{data_.characters8,[len_]s}</DisplayString> + <DisplayString>{(data_.characters16),[len_]su}</DisplayString> </Type> <Type Name="blink::BidiRun"> - <DisplayString>{*m_object} {m_start}-{m_stop}</DisplayString> + <DisplayString>{*box_} {start_}-{stop_}</DisplayString> </Type> <!-- Fonts --> <Type Name="blink::Font"> - <DisplayString>{m_fontDescription}</DisplayString> + <DisplayString>{font_description_}</DisplayString> </Type> <Type Name="blink::FontDescription"> - <DisplayString>{m_computedSize}px {m_familyList}</DisplayString> + <DisplayString>{computed_size_}px {family_list_}</DisplayString> </Type> <Type Name="blink::FontFamily"> - <DisplayString Condition="m_next.m_ptr == 0">{m_family,view(bare)}</DisplayString> - <DisplayString>{m_family,view(bare)}, {m_next}</DisplayString> + <DisplayString Condition="next_.ptr_ == 0">{family_,view(bare)}</DisplayString> + <DisplayString>{family_,view(bare)}, {next_}</DisplayString> </Type> <Type Name="blink::SharedFontFamily"> - <DisplayString Condition="m_next.m_ptr == 0">{m_family,view(bare)}</DisplayString> - <DisplayString>{m_family,view(bare)}, {m_next}</DisplayString> + <DisplayString Condition="next_.ptr_ == 0">{family_,view(bare)}</DisplayString> + <DisplayString>{family_,view(bare)}, {next_}</DisplayString> <Expand> <LinkedListItems> <HeadPointer>this</HeadPointer> - <NextPointer>m_next.m_ptr</NextPointer> + <NextPointer>next_.ptr_</NextPointer> <ValueNode>this</ValueNode> </LinkedListItems> </Expand> </Type> <Type Name="blink::SimpleFontData"> - <DisplayString>{m_platformData}</DisplayString> + <DisplayString>{platform_data_}</DisplayString> </Type> <Type Name="blink::FontPlatformData"> - <DisplayString>{*m_typeface.m_ptr}, {m_textSize}px</DisplayString> + <DisplayString>{*typeface_.ptr_}, {text_size_}px</DisplayString> </Type> </AutoVisualizer> \ No newline at end of file
diff --git a/tools/win/ShowThreadNames/ReadMe.txt b/tools/win/ShowThreadNames/ReadMe.txt index 63aa0cf..c4bf66ab 100644 --- a/tools/win/ShowThreadNames/ReadMe.txt +++ b/tools/win/ShowThreadNames/ReadMe.txt
@@ -2,10 +2,9 @@ This tool is designed to test the usage of the SetThreadDescription WinAPI in Chrome. In Chrome, the SetThreadDescription API has been enabled to set thread names. However, since there is no tool support to retrieve thread names set by -GetThreadDescription, we will still rely on SetNameInternal function in -platform_thread_win.cc to set thread names. Despite this, we need a tool to -demo the SetThreadDescription API works, even without the debugger to be -present. +GetThreadDescription, we'll still rely on SetNameInternal function in +platform_thread_win.cc to set thread names. Despite this, we need a tool to demo +the SetThreadDescription API works, even without the debugger to be present. The problem setting can be referred to https://bugs.chromium.org/p/chromium/issues/detail?id=684203 @@ -22,11 +21,11 @@ [How to use it] Please download the three files (.cc, .sln, .vcxproj) and compile the code in -Visual Studio. Run "ShowThreadNames.exe" either from the build directory or -from Visual Studio. No parameters are needed. This tool allows interaction -with users. Once launched, it will show "Please enter the process Id, or -"quit" to end the program :" on the terminal. Simply type in the ID of any -Chrome process you are interested in, and you will get output like below: +Visual Studio. Run "ShowThreadNames.exe" either from the build directory or from +Visual Studio. No parameters are needed. This tool allows interaction with the +user. Once launched, it will show "Please enter the process Id, or "quit" to +end the program :" on the terminal. Simply type in the ID of any Chrome process +you are interested in, and you will get output like below: thread_ID thread_name 12116 @@ -56,6 +55,6 @@ 8216 TaskSchedulerServiceThread 11088 VideoCaptureThread -The threads have been sorted by their names. Note that some threads have -no names in this example. If checking them using Visual Studio debugger, it -is found that they are ntdll.dll!WorkerThreads. +The threads are sorted by their names. Note that some threads have no names in +this example. If checking them using Visual Studio debugger, it is found that +they are ntdll.dll!WorkerThreads.
diff --git a/tools/win/new_analyze_warnings/retrieve_warnings.py b/tools/win/new_analyze_warnings/retrieve_warnings.py index 33c5d407..7b3c75a 100644 --- a/tools/win/new_analyze_warnings/retrieve_warnings.py +++ b/tools/win/new_analyze_warnings/retrieve_warnings.py
@@ -1,6 +1,7 @@ -# Copyright (c) 2012 The Chromium Authors. All rights reserved. +# Copyright (c) 2017 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. + """ This retrieves the latest warnings from the Chrome /analyze build machine, and does a diff. @@ -8,93 +9,90 @@ fills out the functionality. """ -import urllib -import sys import glob import os +import subprocess +import sys +import urllib if len(sys.argv) < 2: - print "Missing build number." + print 'Missing build number.' sys.exit(10) -buildNumber = int(sys.argv[1]) +build_number = int(sys.argv[1]) -baseURL = "http://build.chromium.org/p/chromium.fyi/builders/" + \ - "Chromium%20Windows%20Analyze/" +base_url = 'http://build.chromium.org/p/chromium.fyi/builders/' + \ + 'Chromium%20Windows%20Analyze/' -print "Finding recent builds on %s" % baseURL -baseData = urllib.urlopen(baseURL).read() -recentOff = baseData.find("Recent Builds:") -buildPattern = 'success</td> <td><a href="' + \ - '../../builders/Chromium%20Windows%20Analyze/builds/' +print 'Finding recent builds on %s' % base_url +base_data = urllib.urlopen(base_url).read() +recent_off = base_data.find('Recent Builds:') +build_marker = 'success</td> <td><a href="' + \ + '../../builders/Chromium%20Windows%20Analyze/builds/' # For some reason I couldn't get regular expressions to work on this data. -latestBuildOff = baseData.find(buildPattern, recentOff) + len(buildPattern) -if latestBuildOff < len(buildPattern): - print "Couldn't find successful build." +latest_build_off = base_data.find(build_marker, recent_off) + len(build_marker) +if latest_build_off < len(build_marker): + print 'Couldn\'t find successful build.' sys.exit(10) -latestEndOff = baseData.find('"', latestBuildOff) -latestBuildStr = baseData[latestBuildOff:latestEndOff] -maxBuildNumber = int(latestBuildStr) -if buildNumber > maxBuildNumber: - print "Requested build number (%d) is too high. Maximum is %d." % \ - (buildNumber, maxBuildNumber) +latest_end_off = base_data.find('"', latest_build_off) +latest_build_str = base_data[latest_build_off:latest_end_off] +max_build_number = int(latest_build_str) +if build_number > max_build_number: + print 'Requested build number (%d) is too high. Maximum is %d.' % \ + (build_number, max_build_number) sys.exit(10) # Treat negative numbers specially if sys.argv[1][0] == '-': - buildNumber = maxBuildNumber + buildNumber - if buildNumber < 0: - buildNumber = 0 - print "Retrieving build number %d of %d" % (buildNumber, maxBuildNumber) + build_number = max_build_number + build_number + if build_number < 0: + build_number = 0 + print 'Retrieving build number %d of %d' % (build_number, max_build_number) # Found the last summary results in the current directory -results = glob.glob("analyze*_summary.txt") +results = glob.glob('analyze*_summary.txt') results.sort() -previous = "%04d" % (buildNumber - 1) +previous = '%04d' % (build_number - 1) if results: - possiblePrevious = results[-1][7:11] - if int(possiblePrevious) == buildNumber: + possible_previous = results[-1][7:11] + if int(possible_previous) == build_number: if len(results) > 1: previous = results[-2][7:11] else: - previous = possiblePrevious + previous = possible_previous -dataURL = baseURL + "builds/" + str(buildNumber) + "/steps/compile/logs/stdio" -revisionURL = baseURL + "builds/" + str(buildNumber) +data_descriptor = 'chromium/bb/chromium.fyi/Chromium_Windows_Analyze/' + \ + '%d/+/recipes/steps/compile/0/stdout' % build_number +revision_url = base_url + 'builds/' + str(build_number) # Retrieve the revision -revisionData = urllib.urlopen(revisionURL).read() -key = "Got Revision</td><td>" -Off = revisionData.find(key) + len(key) -if Off > len(key): - revision = revisionData[Off: Off + 40] - print "Revision is '%s'" % revision - print "Environment variables can be set with set_analyze_revision.bat" - payload = "set ANALYZE_REVISION=%s\r\n" % revision - payload += "set ANALYZE_BUILD_NUMBER=%04d\r\n" % buildNumber - payload += "set ANALYZE_PREV_BUILD_NUMBER=%s\r\n" % previous - open("set_analyze_revision.bat", "wt").write(payload) +revisionData = urllib.urlopen(revision_url).read() +key = 'Got Revision</td><td>' +off = revisionData.find(key) + len(key) +if off > len(key): + revision = revisionData[off: off + 40] + print 'Revision is "%s"' % revision + print 'Environment variables can be set with set_analyze_revision.bat' + payload = 'set ANALYZE_REVISION=%s\r\n' % revision + payload += 'set ANALYZE_BUILD_NUMBER=%04d\r\n' % build_number + payload += 'set ANALYZE_PREV_BUILD_NUMBER=%s\r\n' % previous + open('set_analyze_revision.bat', 'wt').write(payload) # Retrieve the raw warning data - print "Retrieving raw build results. Please wait." - data = urllib.urlopen(dataURL).read() - if data.count("status: SUCCESS") == 0: - print "Build failed or is incomplete." - else: - # Fix up "'" and '"' - data = data.replace("'", "'").replace(""", '"') - # Fix up '<' and '>' - data = data.replace("<", "<").replace(">", ">") - # Fix up '&' - data = data.replace("&", "&") - # Fix up random spans - data = data.replace('</span><span class="stdout">', '') - # Fix up the source paths to match my local /analyze repo - if "ANALYZE_REPO" in os.environ: - sourcePath = r"e:\b\build\slave\chromium_windows_analyze\build\src" - destPath = os.path.join(os.environ["ANALYZE_REPO"], "src") - data = data.replace(sourcePath, destPath) - outputName = "analyze%04d_full.txt" % buildNumber - open(outputName, "w").write(data) - print "Done. Data is in %s" % outputName + print 'Retrieving raw build results. Please wait.' + # Results are now retrieved using logdog. Instructions on how to install the + # logdog tool can be found here: + # https://bugs.chromium.org/p/chromium/issues/detail?id=698429#c1 + # In particular, from c:\src\logdog_cipd_root: + # > depot_tools\cipd init + # > depot_tools\cipd install infra/tools/luci/logdog/logdog/windows-amd64 + command = r'c:\src\logdog_cipd_root\logdog.exe cat %s' % data_descriptor + data = str(subprocess.check_output(command)) + if 'ANALYZE_REPO' in os.environ: + source_path = r'e:\b\build\slave\chromium_windows_analyze\build\src' + dest_path = os.path.join(os.environ['ANALYZE_REPO'], 'src') + data = data.replace(source_path, dest_path) + output_name = 'analyze%04d_full.txt' % build_number + open(output_name, 'w').write(data) + print 'Done. Data is in %s' % output_name else: - print "No revision information found!" + print 'No revision information found!'
diff --git a/tools/win/setenv.bat b/tools/win/setenv.bat new file mode 100755 index 0000000..f85480b --- /dev/null +++ b/tools/win/setenv.bat
@@ -0,0 +1,14 @@ +@ECHO off + +REM Copyright (c) 2017 The Chromium Authors. All rights reserved. +REM Use of this source code is governed by a BSD-style license that can be +REM found in the LICENSE file. + +REM Run this script to add the current toolchain, as determined by +REM GYP_MSVS_VERSION, DEPOT_TOOLS_WIN_TOOLCHAIN and the hash in vs_toolchain.py, +REM to the path. Be aware of running this multiple times as too-long paths will +REM break things. +REM To get the toolchain for x64 targets pass /x64 to this batch file. + +REM Execute whatever is printed by setenv.py. +FOR /f "usebackq tokens=*" %%a in (`python %~dp0setenv.py`) do %%a %1
diff --git a/tools/win/setenv.py b/tools/win/setenv.py new file mode 100644 index 0000000..9e90399 --- /dev/null +++ b/tools/win/setenv.py
@@ -0,0 +1,29 @@ +# Copyright (c) 2017 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. + +""" +Helper script to do the heavy lifting for setenv.bat. +""" + +import os +import sys + +script_path = os.path.abspath(os.path.dirname(__file__)) +build_path = os.path.normpath(os.path.join(script_path, '..', '..', 'build')) +sys.path.append(build_path) + +import vs_toolchain + +if bool(int(os.environ.get('DEPOT_TOOLS_WIN_TOOLCHAIN', '1'))): + win_sdk_dir = vs_toolchain.SetEnvironmentAndGetSDKDir() + print os.path.normpath(os.path.join(win_sdk_dir, 'bin/SetEnv.cmd')) +else: + vs_version = vs_toolchain.GetVisualStudioVersion() + vs_path = vs_toolchain.DetectVisualStudioPath() + if vs_version == '2017': + print os.path.join(vs_path, r'VC\Auxiliary\Build\vcvarsall.bat') + elif vs_version == '2015': + print os.path.join(vs_path, r'VC\vcvarsall.bat') + else: + raise Exception('Unknown VS version %s' % vs_version)
diff --git a/tools/win/subtract_time.py b/tools/win/subtract_time.py new file mode 100644 index 0000000..4e1559b --- /dev/null +++ b/tools/win/subtract_time.py
@@ -0,0 +1,20 @@ +# Copyright (c) 2017 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. + +""" +This script converts to %time% compatible strings passed to it into seconds, +subtracts them, and prints the difference. That's it. It's used by timeit.bat. +""" + +import re +import sys + +def ParseTime(time_string): + # Time looks like 15:19:30.32 + match = re.match("(.*):(.*):(.*)\.(.*)", time_string) + hours, minutes, seconds, fraction = map(int, match.groups()) + return hours * 3600 + minutes * 60 + seconds + fraction * .01 + +print "%1.2f seconds elapsed time" % (ParseTime(sys.argv[1]) - + ParseTime(sys.argv[2]))
diff --git a/tools/win/timeit.bat b/tools/win/timeit.bat new file mode 100755 index 0000000..af00372 --- /dev/null +++ b/tools/win/timeit.bat
@@ -0,0 +1,13 @@ +@ECHO off + +REM Copyright (c) 2017 The Chromium Authors. All rights reserved. +REM Use of this source code is governed by a BSD-style license that can be +REM found in the LICENSE file. + +REM This batch file executes the commands passed to it and prints out the +REM elapsed run time. + +SETLOCAL +SET starttime=%time% +CALL %* +CALL python %~dp0subtract_time.py %time% %starttime%