diff --git a/DEPS b/DEPS index 0e332e2a..388e26b 100644 --- a/DEPS +++ b/DEPS
@@ -235,7 +235,7 @@ Var('chromium_git') + '/native_client/src/third_party/scons-2.0.1.git' + '@' + '1c1550e17fc26355d08627fbdec13d8291227067', 'src/third_party/webrtc': - Var('chromium_git') + '/external/webrtc/trunk/webrtc.git' + '@' + 'c81ec9b3da5816407fe16439d26dd844a1f566da', # commit position 18614 + Var('chromium_git') + '/external/webrtc/trunk/webrtc.git' + '@' + 'e9cc1fe00713026a257a65e0fb958d6f3573aec7', # commit position 18649 'src/third_party/openmax_dl': Var('chromium_git') + '/external/webrtc/deps/third_party/openmax.git' + '@' + Var('openmax_dl_revision'),
diff --git a/base/ios/weak_nsobject.h b/base/ios/weak_nsobject.h index b1b8d10..498cdee2 100644 --- a/base/ios/weak_nsobject.h +++ b/base/ios/weak_nsobject.h
@@ -49,7 +49,7 @@ // receives nullify() from the object's sentinel. class WeakContainer : public base::RefCountedThreadSafe<WeakContainer> { public: - explicit WeakContainer(id object) : object_(object) {} + explicit WeakContainer(id object); id object() { DCHECK(checker_.CalledOnValidThread()); @@ -63,9 +63,9 @@ private: friend base::RefCountedThreadSafe<WeakContainer>; - ~WeakContainer() {} + ~WeakContainer(); base::ThreadChecker checker_; - id object_; + __unsafe_unretained id object_; }; } // namespace base
diff --git a/base/ios/weak_nsobject.mm b/base/ios/weak_nsobject.mm index 36f9d3ea7..c017b1d 100644 --- a/base/ios/weak_nsobject.mm +++ b/base/ios/weak_nsobject.mm
@@ -12,6 +12,14 @@ char sentinelObserverKey_; } +namespace base { + +WeakContainer::WeakContainer(id object) : object_(object) {} + +WeakContainer::~WeakContainer() {} + +} // namespace base + @interface CRBWeakNSProtocolSentinel () // Container to notify on dealloc. @property(readonly, assign) scoped_refptr<base::WeakContainer> container;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java index 05c0aa6..01dbb160 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
@@ -65,7 +65,6 @@ import org.chromium.chrome.browser.tab.EmptyTabObserver; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tab.TabDelegateFactory; -import org.chromium.chrome.browser.tabmodel.AsyncTabParams; import org.chromium.chrome.browser.tabmodel.AsyncTabParamsManager; import org.chromium.chrome.browser.tabmodel.ChromeTabCreator; import org.chromium.chrome.browser.tabmodel.EmptyTabModelObserver; @@ -99,8 +98,7 @@ private static final int WEBCONTENTS_STATE_NO_WEBCONTENTS = 0; private static final int WEBCONTENTS_STATE_PRERENDERED_WEBCONTENTS = 1; private static final int WEBCONTENTS_STATE_SPARE_WEBCONTENTS = 2; - private static final int WEBCONTENTS_STATE_TRANSFERRED_WEBCONTENTS = 3; - private static final int WEBCONTENTS_STATE_MAX = 4; + private static final int WEBCONTENTS_STATE_MAX = 3; private static CustomTabContentHandler sActiveContentHandler; @@ -576,15 +574,28 @@ private Tab createMainTab() { CustomTabsConnection connection = CustomTabsConnection.getInstance(getApplication()); - WebContents webContents = takeWebContents(connection); - - int assignedTabId = IntentUtils.safeGetIntExtra( - getIntent(), IntentHandler.EXTRA_TAB_ID, Tab.INVALID_TAB_ID); - int parentTabId = IntentUtils.safeGetIntExtra( - getIntent(), IntentHandler.EXTRA_PARENT_TAB_ID, Tab.INVALID_TAB_ID); - Tab tab = new Tab(assignedTabId, parentTabId, false, this, getWindowAndroid(), + String url = getUrlToLoad(); + String referrerUrl = connection.getReferrer(mSession, getIntent()); + Tab tab = new Tab(Tab.INVALID_TAB_ID, Tab.INVALID_TAB_ID, false, this, getWindowAndroid(), TabLaunchType.FROM_EXTERNAL_APP, null, null); tab.setAppAssociatedWith(connection.getClientPackageNameForSession(mSession)); + + int webContentsStateOnLaunch = WEBCONTENTS_STATE_NO_WEBCONTENTS; + WebContents webContents = connection.takePrerenderedUrl(mSession, url, referrerUrl); + mUsingPrerender = webContents != null; + if (mUsingPrerender) webContentsStateOnLaunch = WEBCONTENTS_STATE_PRERENDERED_WEBCONTENTS; + if (!mUsingPrerender) { + webContents = WarmupManager.getInstance().takeSpareWebContents(false, false); + if (webContents != null) webContentsStateOnLaunch = WEBCONTENTS_STATE_SPARE_WEBCONTENTS; + } + RecordHistogram.recordEnumeratedHistogram("CustomTabs.WebContentsStateOnLaunch", + webContentsStateOnLaunch, WEBCONTENTS_STATE_MAX); + if (webContents == null) { + webContents = WebContentsFactory.createWebContentsWithWarmRenderer(false, false); + } + if (!mUsingPrerender) { + connection.resetPostMessageHandlerForSession(mSession, webContents); + } tab.initialize( webContents, getTabContentManager(), new CustomTabDelegateFactory( @@ -601,52 +612,6 @@ return tab; } - private WebContents takeWebContents(CustomTabsConnection connection) { - mUsingPrerender = true; - int webContentsStateOnLaunch = WEBCONTENTS_STATE_PRERENDERED_WEBCONTENTS; - WebContents webContents = takePrerenderedWebContents(connection); - - if (webContents == null) { - mUsingPrerender = false; - webContents = takeAsyncWebContents(); - if (webContents != null) { - webContentsStateOnLaunch = WEBCONTENTS_STATE_TRANSFERRED_WEBCONTENTS; - } else { - webContents = WarmupManager.getInstance().takeSpareWebContents(false, false); - if (webContents != null) { - webContentsStateOnLaunch = WEBCONTENTS_STATE_SPARE_WEBCONTENTS; - } else { - webContents = - WebContentsFactory.createWebContentsWithWarmRenderer(false, false); - webContentsStateOnLaunch = WEBCONTENTS_STATE_NO_WEBCONTENTS; - } - } - } - - RecordHistogram.recordEnumeratedHistogram("CustomTabs.WebContentsStateOnLaunch", - webContentsStateOnLaunch, WEBCONTENTS_STATE_MAX); - - if (!mUsingPrerender) { - connection.resetPostMessageHandlerForSession(mSession, webContents); - } - - return webContents; - } - - private WebContents takePrerenderedWebContents(CustomTabsConnection connection) { - String url = getUrlToLoad(); - String referrerUrl = connection.getReferrer(mSession, getIntent()); - return connection.takePrerenderedUrl(mSession, url, referrerUrl); - } - - private WebContents takeAsyncWebContents() { - int assignedTabId = IntentUtils.safeGetIntExtra( - getIntent(), IntentHandler.EXTRA_TAB_ID, Tab.INVALID_TAB_ID); - AsyncTabParams asyncParams = AsyncTabParamsManager.remove(assignedTabId); - if (asyncParams == null) return null; - return asyncParams.getWebContents(); - } - private void initializeMainTab(Tab tab) { tab.getTabRedirectHandler().updateIntent(getIntent()); tab.getView().requestFocus();
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleWebsitePreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleWebsitePreferences.java index 025b620..2de9af10 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleWebsitePreferences.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleWebsitePreferences.java
@@ -524,6 +524,11 @@ * 2. The BLOCK string is custom. */ private void setUpAdsPreference(Preference preference) { + // Do not show the setting if the category is not enabled. + if (!SiteSettingsCategory.adsCategoryEnabled()) { + setUpListPreference(preference, null); + return; + } // If the ad blocker is activated, then this site will have ads blocked unless there is an // explicit permission disallowing the blocking. boolean activated =
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java index 6d995d7c..c011fcd 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java
@@ -140,13 +140,6 @@ intent.setComponent(componentName); } - addAsyncTabExtras(asyncParams, parentId, isChromeUI, assignedTabId, intent); - - return intent; - } - - protected final void addAsyncTabExtras(AsyncTabCreationParams asyncParams, int parentId, - boolean isChromeUI, int assignedTabId, Intent intent) { Map<String, String> extraHeaders = asyncParams.getLoadUrlParams().getExtraHeaders(); if (extraHeaders != null && !extraHeaders.isEmpty()) { Bundle bundle = new Bundle(); @@ -178,6 +171,7 @@ } intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + return intent; } /**
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 a98fb2e4..5ca8630 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
@@ -39,7 +39,6 @@ import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tab.TabDelegateFactory; import org.chromium.chrome.browser.tab.TabObserver; -import org.chromium.chrome.browser.tabmodel.document.TabDelegate; import org.chromium.chrome.browser.util.ColorUtils; import org.chromium.chrome.browser.util.UrlUtilities; import org.chromium.content.browser.ScreenOrientationProvider; @@ -715,11 +714,6 @@ return new WebappDelegateFactory(this); } - @Override - protected TabDelegate createTabDelegate(boolean incognito) { - return new WebappTabDelegate(this, incognito); - } - // We're temporarily disable CS on webapp since there are some issues. (http://crbug.com/471950) // TODO(changwan): re-enable it once the issues are resolved. @Override
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappTabDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappTabDelegate.java deleted file mode 100644 index e3e1e9e9..0000000 --- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappTabDelegate.java +++ /dev/null
@@ -1,42 +0,0 @@ -// 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.chrome.browser.webapps; - -import android.net.Uri; -import android.support.customtabs.CustomTabsIntent; - -import org.chromium.chrome.browser.tab.Tab; -import org.chromium.chrome.browser.tab.TabIdManager; -import org.chromium.chrome.browser.tabmodel.AsyncTabParamsManager; -import org.chromium.chrome.browser.tabmodel.TabModel.TabLaunchType; -import org.chromium.chrome.browser.tabmodel.document.AsyncTabCreationParams; -import org.chromium.chrome.browser.tabmodel.document.TabDelegate; - -/** - * Asynchronously creates Tabs for navigation originating from an installed PWA. - * - * This is the same as the parent class with exception of opening a Custom Tab for - * {@code _blank} links and {@code window.open(url)} calls instead of creating a new tab in Chrome. - */ -public class WebappTabDelegate extends TabDelegate { - private final WebappActivity mActivity; - - public WebappTabDelegate(WebappActivity activity, boolean incognito) { - super(incognito); - this.mActivity = activity; - } - - @Override - public void createNewTab(AsyncTabCreationParams asyncParams, TabLaunchType type, int parentId) { - int assignedTabId = TabIdManager.getInstance().generateValidId(Tab.INVALID_TAB_ID); - AsyncTabParamsManager.add(assignedTabId, asyncParams); - - CustomTabsIntent customTabIntent = - new CustomTabsIntent.Builder().setShowTitle(true).build(); - - customTabIntent.intent.setPackage(mActivity.getPackageName()); - addAsyncTabExtras(asyncParams, parentId, true, assignedTabId, customTabIntent.intent); - customTabIntent.launchUrl(mActivity, Uri.parse(asyncParams.getLoadUrlParams().getUrl())); - } -}
diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni index 9f958ec..9743443 100644 --- a/chrome/android/java_sources.gni +++ b/chrome/android/java_sources.gni
@@ -1212,7 +1212,6 @@ "java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java", "java/src/org/chromium/chrome/browser/webapps/WebappManagedActivity.java", "java/src/org/chromium/chrome/browser/webapps/WebappRegistry.java", - "java/src/org/chromium/chrome/browser/webapps/WebappTabDelegate.java", "java/src/org/chromium/chrome/browser/webapps/WebappUrlBar.java", "java/src/org/chromium/chrome/browser/webshare/ShareServiceImpl.java", "java/src/org/chromium/chrome/browser/webshare/ShareServiceImplementationFactory.java",
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 5845ad5..a105310 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
@@ -21,6 +21,7 @@ import org.chromium.base.ApplicationStatus; import org.chromium.base.ContextUtils; +import org.chromium.base.ThreadUtils; import org.chromium.base.test.util.CommandLineFlags; import org.chromium.base.test.util.Feature; import org.chromium.base.test.util.RetryOnFailure; @@ -35,9 +36,13 @@ import org.chromium.chrome.browser.tab.TabIdManager; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.chrome.test.MultiActivityTestRule; +import org.chromium.chrome.test.util.ActivityUtils; import org.chromium.chrome.test.util.ApplicationTestUtils; +import org.chromium.chrome.test.util.browser.TabLoadObserver; import org.chromium.content.browser.test.util.Criteria; import org.chromium.content.browser.test.util.CriteriaHelper; +import org.chromium.content.browser.test.util.JavaScriptUtils; +import org.chromium.content.browser.test.util.TouchCommon; import org.chromium.content_public.common.ScreenOrientationValues; import org.chromium.net.test.EmbeddedTestServer; @@ -268,6 +273,77 @@ } /** + * Tests that WebappActivities handle window.open() properly in tabbed mode. + */ + @Test + @MediumTest + @Feature({"Webapps"}) + public void testWebappHandlesWindowOpenInTabbedMode() throws Exception { + triggerWindowOpenAndWaitForLoad(ChromeTabbedActivity.class, getOnClickLinkUrl(), true); + } + + /** + * Tests that WebappActivities handle suppressed window.open() properly in tabbed mode. + */ + @Test + @MediumTest + @Feature({"Webapps"}) + public void testWebappHandlesSuppressedWindowOpenInTabbedMode() throws Exception { + triggerWindowOpenAndWaitForLoad( + ChromeTabbedActivity.class, getHrefNoReferrerLinkUrl(), false); + } + + private <T extends ChromeActivity> void triggerWindowOpenAndWaitForLoad( + Class<T> classToWaitFor, String linkHtml, boolean checkContents) throws Exception { + final WebappActivity firstActivity = + startWebappActivity(WEBAPP_1_ID, WEBAPP_1_URL, WEBAPP_1_TITLE, WEBAPP_ICON); + final int firstWebappId = firstActivity.getActivityTab().getId(); + + // Load up the test page. + new TabLoadObserver(firstActivity.getActivityTab()).fullyLoadUrl(linkHtml); + + // Do a plain click to make the link open in the main browser via a window.open(). + // If the window is opened successfully, javascript on the first page triggers and changes + // its URL as a signal for this test. + Runnable fgTrigger = new Runnable() { + @Override + public void run() { + ThreadUtils.runOnUiThreadBlocking(new Runnable() { + @Override + public void run() { + View view = firstActivity.findViewById(android.R.id.content).getRootView(); + TouchCommon.singleClickView(view); + } + }); + } + }; + ChromeActivity secondActivity = ActivityUtils.waitForActivity( + InstrumentationRegistry.getInstrumentation(), classToWaitFor, fgTrigger); + mTestRule.waitForFullLoad(secondActivity, "The Google"); + if (checkContents) { + Assert.assertEquals("New WebContents was not created", "SUCCESS", + firstActivity.getActivityTab().getTitle()); + } + Assert.assertNotSame("Wrong Activity in foreground", firstActivity, + ApplicationStatus.getLastTrackedFocusedActivity()); + + // Close the child window to kick the user back to the WebappActivity. + JavaScriptUtils.executeJavaScript( + secondActivity.getActivityTab().getWebContents(), "window.close()"); + CriteriaHelper.pollUiThread(new Criteria() { + @Override + public boolean isSatisfied() { + Activity lastActivity = ApplicationStatus.getLastTrackedFocusedActivity(); + if (!isWebappActivityReady(lastActivity)) return false; + + WebappActivity webappActivity = (WebappActivity) lastActivity; + return webappActivity.getActivityTab().getId() == firstWebappId; + } + }); + ApplicationTestUtils.waitUntilChromeInForeground(); + } + + /** * Starts a WebappActivity for the given data and waits for it to be initialized. We can't use * ActivityUtils.waitForActivity() because of the way WebappActivity is instanced on pre-L * devices. @@ -296,4 +372,49 @@ return true; } + + /** Defines one gigantic link spanning the whole page that creates a new + * window with chrome/test/data/android/google.html. Disallowing a referrer from being + * sent triggers another codepath. + */ + private String getHrefNoReferrerLinkUrl() { + return UrlUtils.encodeHtmlDataUri("<html>" + + " <head>" + + " <title>href no referrer link page</title>" + + " <meta name='viewport'" + + " content='width=device-width initial-scale=0.5, maximum-scale=0.5'>" + + " <style>" + + " body {margin: 0em;} div {width: 100%; height: 100%; background: #011684;}" + + " </style>" + + " </head>" + + " <body>" + + " <a href='" + mTestServer.getURL("/chrome/test/data/android/google.html") + + "' target='_blank' rel='noreferrer'><div></div></a>" + + " </body>"); + } + + /** Returns a URL where clicking the body triggers a window.open() call to open + * chrome/test/data/android/google.html. */ + private String getOnClickLinkUrl() { + return UrlUtils.encodeHtmlDataUri("<html>" + + " <head>" + + " <title>window.open page</title>" + + " <meta name='viewport'" + + " content='width=device-width initial-scale=0.5, maximum-scale=0.5'>" + + " <style>" + + " body {margin: 0em;} div {width: 100%; height: 100%; background: #011684;}" + + " </style>" + + " <script>" + + " function openNewWindow() {" + + " var site = window.open('" + + mTestServer.getURL("/chrome/test/data/android/google.html") + "');" + + " document.title = site ? 'SUCCESS' : 'FAILURE';" + + " }" + + " </script>" + + " </head>" + + " <body id='body'>" + + " <div onclick='openNewWindow()'></div>" + + " </body>" + + "</html>"); + } }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappNavigationTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappNavigationTest.java index 6d234b8..25c476d3 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappNavigationTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappNavigationTest.java
@@ -4,12 +4,8 @@ package org.chromium.chrome.browser.webapps; -import android.app.ActivityManager; -import android.app.ActivityManager.AppTask; -import android.content.Context; import android.content.Intent; import android.graphics.Color; -import android.os.Build; import android.support.test.InstrumentationRegistry; import android.support.test.filters.SmallTest; @@ -21,6 +17,7 @@ import org.junit.runner.RunWith; import org.chromium.base.ApiCompatibilityUtils; +import org.chromium.base.ThreadUtils; import org.chromium.base.test.util.CommandLineFlags; import org.chromium.base.test.util.Feature; import org.chromium.chrome.R; @@ -31,7 +28,7 @@ import org.chromium.chrome.browser.firstrun.FirstRunStatus; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.chrome.test.util.browser.contextmenu.ContextMenuUtils; -import org.chromium.content.browser.test.util.DOMUtils; +import org.chromium.content_public.browser.LoadUrlParams; import org.chromium.net.test.EmbeddedTestServer; import org.chromium.ui.base.PageTransition; @@ -67,12 +64,18 @@ @Test @SmallTest @Feature({"Webapps"}) - public void testRegularLinkOffOriginInCctNoWebappThemeColor() throws Exception { + public void testOffOriginNavigationUsingLinkAndNoWebappThemeColor() throws Exception { runWebappActivityAndWaitForIdle(mActivityTestRule.createIntent()); - assertNumberOfTasksInRecents("We should start with one Android task", 1); - addAnchor("testId", OFF_ORIGIN_URL, "_self"); - DOMUtils.clickNode( - mActivityTestRule.getActivity().getActivityTab().getContentViewCore(), "testId"); + + // Not using #loadUrl, as it expects the URL to load in the activity under test, + // which is not happening here. + ThreadUtils.runOnUiThreadBlocking(new Runnable() { + @Override + public void run() { + mActivityTestRule.getActivity().getActivityTab().loadUrl( + new LoadUrlParams(OFF_ORIGIN_URL, PageTransition.LINK)); + } + }); CustomTabActivity customTab = assertCustomTabActivityLaunchedForOffOriginUrl(); @@ -81,17 +84,14 @@ ApiCompatibilityUtils.getColor( customTab.getResources(), R.color.default_primary_color), customTab.getToolbarManager().getPrimaryColor()); - assertNumberOfTasksInRecents( - "Link with target=\"_self\" should stay in the same Android task.", 1); } @Test @SmallTest @Feature({"Webapps"}) - public void testWindowTopLocationOffOriginInCctAndWebappThemeColor() throws Exception { + public void testOffOriginNavigationUsingJavaScriptAndWebappThemeColor() throws Exception { runWebappActivityAndWaitForIdle(mActivityTestRule.createIntent().putExtra( ShortcutHelper.EXTRA_THEME_COLOR, (long) Color.CYAN)); - assertNumberOfTasksInRecents("We should start with one Android task", 1); mActivityTestRule.runJavaScriptCodeInCurrentTab( String.format("window.top.location = '%s'", OFF_ORIGIN_URL)); @@ -100,58 +100,16 @@ Assert.assertEquals("CCT Toolbar should use the theme color of a webapp", Color.CYAN, customTab.getToolbarManager().getPrimaryColor()); - assertNumberOfTasksInRecents( - "Executing window.top.location = url; should stay in the same Android task.", 1); } - @Test - @SmallTest - @Feature({"Webapps"}) - public void testNewTabLinkOpensInCct() throws Exception { - runWebappActivityAndWaitForIdle(mActivityTestRule.createIntent().putExtra( - ShortcutHelper.EXTRA_THEME_COLOR, (long) Color.CYAN)); - assertNumberOfTasksInRecents("We should start with one Android task", 1); - addAnchor("testId", OFF_ORIGIN_URL, "_blank"); - DOMUtils.clickNode( - mActivityTestRule.getActivity().getActivityTab().getContentViewCore(), "testId"); - CustomTabActivity customTab = assertCustomTabActivityLaunchedForOffOriginUrl(); - Assert.assertEquals( - "CCT Toolbar should use default primary color even if webapp has theme color", - ApiCompatibilityUtils.getColor( - customTab.getResources(), R.color.default_primary_color), - customTab.getToolbarManager().getPrimaryColor()); - assertNumberOfTasksInRecents( - "Link with target=\"_blank\" should open in a new Android task.", 2); - } + private CustomTabActivity assertCustomTabActivityLaunchedForOffOriginUrl() { + CustomTabActivity customTab = activityListener.waitFor(CustomTabActivity.class); - @Test - @SmallTest - @Feature({"Webapps"}) - public void testWindowOpenInCct() throws Exception { - runWebappActivityAndWaitForIdle(mActivityTestRule.createIntent()); - assertNumberOfTasksInRecents("We should start with one Android task", 1); - // Executing window.open() through a click on a link, - // as it needs user gesture to avoid Chrome blocking it as a popup. - mActivityTestRule.runJavaScriptCodeInCurrentTab( - String.format("var aTag = document.createElement('testId');" - + "aTag.id = 'testId';" - + "aTag.innerHTML = 'Click Me!';" - + "aTag.onclick = function() {" - + " window.open('%s');" - + " return false;" - + "};" - + "document.body.appendChild(aTag);", - OFF_ORIGIN_URL)); - DOMUtils.clickNode( - mActivityTestRule.getActivity().getActivityTab().getContentViewCore(), "testId"); + mActivityTestRule.waitUntilIdle(customTab); + // Dropping the TLD as Google can redirect to a local site, so this could fail outside US. + Assert.assertTrue(customTab.getActivityTab().getUrl().startsWith("https://www.google.")); - CustomTabActivity customTab = assertCustomTabActivityLaunchedForOffOriginUrl(); - Assert.assertEquals("CCT Toolbar should use default primary color", - ApiCompatibilityUtils.getColor( - customTab.getResources(), R.color.default_primary_color), - customTab.getToolbarManager().getPrimaryColor()); - assertNumberOfTasksInRecents( - "Executing window.open(url) should open a new Android task.", 2); + return customTab; } @Test @@ -180,7 +138,11 @@ FirstRunStatus.setFirstRunFlowComplete(true); runWebappActivityAndWaitForIdle(mActivityTestRule.createIntent()); - addAnchor("myTestAnchorId", OFF_ORIGIN_URL, "_self"); + mActivityTestRule.runJavaScriptCodeInCurrentTab("var aTag = document.createElement('a');" + + "aTag.id = 'myTestAnchorId';" + + "aTag.setAttribute('href','https://www.google.com/');" + + "aTag.innerHTML = 'Click Me!';" + + "document.body.appendChild(aTag);"); ContextMenuUtils.selectContextMenuItem(InstrumentationRegistry.getInstrumentation(), null /* activity to check for focus after click */, @@ -201,45 +163,4 @@ mActivityTestRule.waitUntilSplashscreenHides(); mActivityTestRule.waitUntilIdle(); } - - private CustomTabActivity assertCustomTabActivityLaunchedForOffOriginUrl() { - CustomTabActivity customTab = activityListener.waitFor(CustomTabActivity.class); - - mActivityTestRule.waitUntilIdle(customTab); - // Dropping the TLD as Google can redirect to a local site, so this could fail outside US. - Assert.assertTrue(customTab.getActivityTab().getUrl().contains("https://www.google.")); - - return customTab; - } - - private void addAnchor(String id, String url, String target) throws Exception { - mActivityTestRule.runJavaScriptCodeInCurrentTab( - String.format("var aTag = document.createElement('a');" - + "aTag.id = '%s';" - + "aTag.setAttribute('href','%s');" - + "aTag.setAttribute('target','%s');" - + "aTag.innerHTML = 'Click Me!';" - + "document.body.appendChild(aTag);", - id, url, target)); - } - - private void assertNumberOfTasksInRecents(String message, int expectedNumberOfTasks) { - // We only have API to check this since Lollipop. - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) return; - - ActivityManager activityManager = - (ActivityManager) mActivityTestRule.getActivity().getSystemService( - Context.ACTIVITY_SERVICE); - - int count = 0; - for (AppTask task : activityManager.getAppTasks()) { - if ((task.getTaskInfo().baseIntent.getFlags() - & Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS) - == 0) { - count++; - } - } - - Assert.assertEquals(message, expectedNumberOfTasks, count); - } }
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn index f094008..e7566f3f 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn
@@ -1172,6 +1172,8 @@ "safe_browsing/chrome_cleaner/chrome_cleaner_runner_win.h", "safe_browsing/chrome_cleaner/reporter_runner_win.cc", "safe_browsing/chrome_cleaner/reporter_runner_win.h", + "safe_browsing/chrome_cleaner/settings_resetter_win.cc", + "safe_browsing/chrome_cleaner/settings_resetter_win.h", "safe_browsing/chrome_cleaner/srt_chrome_prompt_impl.cc", "safe_browsing/chrome_cleaner/srt_chrome_prompt_impl.h", "safe_browsing/chrome_cleaner/srt_client_info_win.cc",
diff --git a/chrome/browser/chrome_browser_main_win.cc b/chrome/browser/chrome_browser_main_win.cc index 0b931ec..b682079c 100644 --- a/chrome/browser/chrome_browser_main_win.cc +++ b/chrome/browser/chrome_browser_main_win.cc
@@ -13,6 +13,7 @@ #include <memory> #include "base/base_switches.h" +#include "base/bind_helpers.h" #include "base/command_line.h" #include "base/environment.h" #include "base/files/file_enumerator.h" @@ -33,11 +34,14 @@ #include "base/win/win_util.h" #include "base/win/windows_version.h" #include "base/win/wrapped_window_proc.h" +#include "chrome/browser/browser_process.h" #include "chrome/browser/conflicts/module_database_win.h" #include "chrome/browser/conflicts/module_event_sink_impl_win.h" #include "chrome/browser/first_run/first_run.h" #include "chrome/browser/install_verification/win/install_verification.h" +#include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/profiles/profile_shortcut_manager.h" +#include "chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_win.h" #include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_config.h" #include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_controller.h" #include "chrome/browser/shell_integration.h" @@ -368,6 +372,19 @@ InitializeChromeElf(); + // Reset settings for the current profile if it's tagged to be reset after a + // complete run of the Chrome Cleanup tool. + if (safe_browsing::PostCleanupSettingsResetter::IsEnabled()) { + // Using last opened profiles, because we want to find reset the profile + // that was open in the last Chrome run, which may not be open yet in + // the current run. + safe_browsing::PostCleanupSettingsResetter().ResetTaggedProfiles( + g_browser_process->profile_manager()->GetLastOpenedProfiles(), + base::BindOnce(&base::DoNothing), + base::MakeUnique< + safe_browsing::PostCleanupSettingsResetter::Delegate>()); + } + if (base::FeatureList::IsEnabled(safe_browsing::kSettingsResetPrompt)) { content::BrowserThread::PostAfterStartupTask( FROM_HERE,
diff --git a/chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc b/chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc index 6d92f46a..fc86edc 100644 --- a/chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc +++ b/chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc
@@ -867,6 +867,15 @@ std::move(dict_val), nullptr); } } + + if (policy.has_device_second_factor_authentication()) { + const em::DeviceSecondFactorAuthenticationProto& container( + policy.device_second_factor_authentication()); + policies->Set(key::kDeviceSecondFactorAuthentication, + POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, + POLICY_SOURCE_CLOUD, DecodeIntegerValue(container.mode()), + nullptr); + } } } // namespace
diff --git a/chrome/browser/chromeos/policy/proto/chrome_device_policy.proto b/chrome/browser/chromeos/policy/proto/chrome_device_policy.proto index ea325e2..eaffd32 100644 --- a/chrome/browser/chromeos/policy/proto/chrome_device_policy.proto +++ b/chrome/browser/chromeos/policy/proto/chrome_device_policy.proto
@@ -794,6 +794,22 @@ optional MigrationStrategy migration_strategy = 1; } +// This setting controls how the on-board secure element hardware can be used +// to provide a second-factor authentication in addition to the TPM +// functionality. +message DeviceSecondFactorAuthenticationProto { + enum U2fMode { + // Feature disabled. + DISABLED = 0; + // U2F as defined by the FIDO Alliance specification. + U2F = 1; + // U2F plus extensions for individual attestation certificate. + U2F_EXTENDED = 2; + }; + + optional U2fMode mode = 1 [default = DISABLED]; +} + message ChromeDeviceSettingsProto { optional DevicePolicyRefreshRateProto device_policy_refresh_rate = 1; optional UserWhitelistProto user_whitelist = 2; @@ -854,4 +870,6 @@ optional LoginScreenInputMethodsProto login_screen_input_methods = 50; optional DeviceEcryptfsMigrationStrategyProto device_ecryptfs_migration_strategy = 51; + optional DeviceSecondFactorAuthenticationProto + device_second_factor_authentication = 52; }
diff --git a/chrome/browser/chromeos/power/renderer_freezer_unittest.cc b/chrome/browser/chromeos/power/renderer_freezer_unittest.cc index e34a7f1b..a2af7b3 100644 --- a/chrome/browser/chromeos/power/renderer_freezer_unittest.cc +++ b/chrome/browser/chromeos/power/renderer_freezer_unittest.cc
@@ -256,7 +256,7 @@ extensions::ProcessManager::Get(profile_)->GetSiteInstanceForURL( extensions::BackgroundInfo::GetBackgroundURL(extension))); std::unique_ptr<content::RenderProcessHost> rph( - rph_factory->CreateRenderProcessHost(profile_, site_instance.get())); + rph_factory->CreateRenderProcessHost(profile_)); // Fake that the RenderProcessHost is hosting the gcm app. extensions::ProcessMap::Get(profile_) @@ -293,7 +293,7 @@ scoped_refptr<content::SiteInstance> site_instance( content::SiteInstance::Create(profile_)); std::unique_ptr<content::RenderProcessHost> rph( - rph_factory->CreateRenderProcessHost(profile_, site_instance.get())); + rph_factory->CreateRenderProcessHost(profile_)); // Send the notification that the RenderProcessHost has been created. content::NotificationService::current()->Notify(
diff --git a/chrome/browser/media_galleries/media_file_system_registry_unittest.cc b/chrome/browser/media_galleries/media_file_system_registry_unittest.cc index a7723003..d794895 100644 --- a/chrome/browser/media_galleries/media_file_system_registry_unittest.cc +++ b/chrome/browser/media_galleries/media_file_system_registry_unittest.cc
@@ -201,8 +201,7 @@ content::BrowserContext* browser_context); content::RenderProcessHost* CreateRenderProcessHost( - content::BrowserContext* browser_context, - content::SiteInstance* site_instance) const override; + content::BrowserContext* browser_context) const override; private: mutable std::map<content::BrowserContext*, @@ -417,8 +416,7 @@ content::RenderProcessHost* MockProfileSharedRenderProcessHostFactory::CreateRenderProcessHost( - content::BrowserContext* browser_context, - content::SiteInstance* site_instance) const { + content::BrowserContext* browser_context) const { auto existing = rph_map_.find(browser_context); if (existing != rph_map_.end()) return existing->second.get();
diff --git a/chrome/browser/metrics/chrome_stability_metrics_provider_unittest.cc b/chrome/browser/metrics/chrome_stability_metrics_provider_unittest.cc index 81032d9..528e2f9 100644 --- a/chrome/browser/metrics/chrome_stability_metrics_provider_unittest.cc +++ b/chrome/browser/metrics/chrome_stability_metrics_provider_unittest.cc
@@ -85,7 +85,7 @@ // Owned by rph_factory. content::RenderProcessHost* host( - rph_factory->CreateRenderProcessHost(profile, site_instance.get())); + rph_factory->CreateRenderProcessHost(profile)); // Crash and abnormal termination should increment renderer crash count. content::RenderProcessHost::RendererClosedDetails crash_details( @@ -137,7 +137,7 @@ // Owned by rph_factory. content::RenderProcessHost* extension_host( - rph_factory->CreateRenderProcessHost(profile, site_instance.get())); + rph_factory->CreateRenderProcessHost(profile)); // Make the rph an extension rph. extensions::ProcessMap::Get(profile)
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc index 09e420d9a..37b9739 100644 --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc
@@ -253,6 +253,7 @@ #if defined(OS_WIN) #include "chrome/browser/apps/app_launch_for_metro_restart_win.h" #include "chrome/browser/component_updater/sw_reporter_installer_win.h" +#include "chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_win.h" #include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_prefs_manager.h" #include "chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_util.h" #endif @@ -610,6 +611,7 @@ NetworkProfileBubble::RegisterProfilePrefs(registry); safe_browsing::SettingsResetPromptPrefsManager::RegisterProfilePrefs( registry); + safe_browsing::PostCleanupSettingsResetter::RegisterProfilePrefs(registry); #endif #if defined(TOOLKIT_VIEWS)
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc index d152ac8..128b17e 100644 --- a/chrome/browser/profiles/profile_io_data.cc +++ b/chrome/browser/profiles/profile_io_data.cc
@@ -74,6 +74,7 @@ #include "components/prefs/pref_service.h" #include "components/previews/core/previews_io_data.h" #include "components/signin/core/common/signin_pref_names.h" +#include "components/sync/base/pref_names.h" #include "components/url_formatter/url_fixer.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_service.h" @@ -477,6 +478,11 @@ google_services_user_account_id_.Init( prefs::kGoogleServicesUserAccountId, pref_service); google_services_user_account_id_.MoveToThread(io_task_runner); + sync_suppress_start_.Init(syncer::prefs::kSyncSuppressStart, pref_service); + sync_suppress_start_.MoveToThread(io_task_runner); + sync_first_setup_complete_.Init(syncer::prefs::kSyncFirstSetupComplete, + pref_service); + sync_first_setup_complete_.MoveToThread(io_task_runner); } network_prediction_options_.Init(prefs::kNetworkPredictionOptions, @@ -881,6 +887,11 @@ return host_content_settings_map_.get(); } +bool ProfileIOData::IsSyncEnabled() const { + return sync_first_setup_complete_.GetValue() && + !sync_suppress_start_.GetValue(); +} + bool ProfileIOData::IsOffTheRecord() const { return profile_type() == Profile::INCOGNITO_PROFILE || profile_type() == Profile::GUEST_PROFILE; @@ -1268,6 +1279,8 @@ DCHECK_CURRENTLY_ON(BrowserThread::UI); google_services_user_account_id_.Destroy(); + sync_suppress_start_.Destroy(); + sync_first_setup_complete_.Destroy(); enable_referrers_.Destroy(); enable_do_not_track_.Destroy(); force_google_safesearch_.Destroy();
diff --git a/chrome/browser/profiles/profile_io_data.h b/chrome/browser/profiles/profile_io_data.h index 895fa55..a25e88d 100644 --- a/chrome/browser/profiles/profile_io_data.h +++ b/chrome/browser/profiles/profile_io_data.h
@@ -168,6 +168,9 @@ return &google_services_user_account_id_; } + // Returns whether Sync is enabled, for Dice account consistency. + bool IsSyncEnabled() const; + net::URLRequestContext* extensions_request_context() const { return extensions_request_context_.get(); } @@ -527,6 +530,8 @@ client_cert_store_factory_; mutable StringPrefMember google_services_user_account_id_; + mutable BooleanPrefMember sync_suppress_start_; + mutable BooleanPrefMember sync_first_setup_complete_; // Member variables which are pointed to by the various context objects. mutable BooleanPrefMember enable_referrers_;
diff --git a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.cc b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.cc index f070575..8a5f8bba 100644 --- a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.cc +++ b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.cc
@@ -19,9 +19,13 @@ #include "base/task_scheduler/task_traits.h" #include "base/threading/thread_restrictions.h" #include "base/threading/thread_task_runner_handle.h" +#include "chrome/browser/browser_process.h" #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_fetcher_win.h" #include "chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_runner_win.h" +#include "chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_win.h" #include "chrome/browser/safe_browsing/chrome_cleaner/srt_client_info_win.h" #include "chrome/installer/util/scoped_token_privilege.h" #include "components/chrome_cleaner/public/constants/constants.h" @@ -116,6 +120,21 @@ return ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(); } +void ChromeCleanerControllerDelegate::TagForResetting(Profile* profile) { + if (PostCleanupSettingsResetter::IsEnabled()) + PostCleanupSettingsResetter().TagForResetting(profile); +} + +void ChromeCleanerControllerDelegate::ResetTaggedProfiles( + std::vector<Profile*> profiles, + base::OnceClosure continuation) { + if (PostCleanupSettingsResetter::IsEnabled()) { + PostCleanupSettingsResetter().ResetTaggedProfiles( + std::move(profiles), std::move(continuation), + base::MakeUnique<PostCleanupSettingsResetter::Delegate>()); + } +} + // static ChromeCleanerController* ChromeCleanerController::GetInstance() { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -178,6 +197,7 @@ } void ChromeCleanerController::ReplyWithUserResponse( + Profile* profile, UserResponse user_response) { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); DCHECK(prompt_user_callback_); @@ -191,6 +211,7 @@ case UserResponse::kAccepted: acceptance = PromptAcceptance::ACCEPTED; new_state = State::kCleaning; + delegate_->TagForResetting(profile); break; case UserResponse::kDenied: // Fallthrough case UserResponse::kDismissed: @@ -397,8 +418,11 @@ } if (process_status.exit_code == kRebootNotRequiredExitCode) { - idle_reason_ = IdleReason::kCleaningSucceeded; - SetStateAndNotifyObservers(State::kIdle); + delegate_->ResetTaggedProfiles( + g_browser_process->profile_manager()->GetLoadedProfiles(), + base::BindOnce(&ChromeCleanerController::OnSettingsResetCompleted, + base::Unretained(this))); + ResetCleanerDataAndInvalidateWeakPtrs(); return; } @@ -420,4 +444,9 @@ } } +void ChromeCleanerController::OnSettingsResetCompleted() { + idle_reason_ = IdleReason::kCleaningSucceeded; + SetStateAndNotifyObservers(State::kIdle); +} + } // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.h b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.h index 0d35c97..45ec62c 100644 --- a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.h +++ b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.h
@@ -7,7 +7,9 @@ #include <memory> #include <set> +#include <vector> +#include "base/callback.h" #include "base/files/file_path.h" #include "base/macros.h" #include "base/memory/weak_ptr.h" @@ -17,6 +19,8 @@ #include "chrome/browser/safe_browsing/chrome_cleaner/reporter_runner_win.h" #include "components/chrome_cleaner/public/interfaces/chrome_prompt.mojom.h" +class Profile; + namespace safe_browsing { // Delegate class that provides services to the ChromeCleanerController class @@ -36,6 +40,11 @@ virtual void FetchAndVerifyChromeCleaner(FetchedCallback fetched_callback); virtual bool SafeBrowsingExtendedReportingScoutEnabled(); virtual bool IsMetricsAndCrashReportingEnabled(); + + // Auxiliary methods for tagging and resetting open profiles. + virtual void TagForResetting(Profile* profile); + virtual void ResetTaggedProfiles(std::vector<Profile*> profiles, + base::OnceClosure continuation); }; // Controller class that keeps track of the execution of the Chrome Cleaner and @@ -138,13 +147,14 @@ // Sends the user's response, as to whether or not they want the Chrome // Cleaner to remove harmful software that was found, to the Chrome Cleaner - // process. + // process. If the user accepted the prompt, then tags |profile| for + // post-cleanup settings reset. // // A call to ReplyWithUserResponse() will be a no-op if the controller is not // in the kInfected state. This gracefully handles cases where multiple user // responses are received, for example if a user manages to click on a // "Cleanup" button multiple times. - void ReplyWithUserResponse(UserResponse user_response); + void ReplyWithUserResponse(Profile* profile, UserResponse user_response); // If the controller is in the kRebootRequired state, initiates a reboot of // the computer. Call this after obtaining permission from the user to @@ -198,6 +208,9 @@ void OnCleanerProcessDone(ChromeCleanerRunner::ProcessStatus process_status); void InitiateReboot(); + // Invoked once settings reset is done for tagged profiles. + void OnSettingsResetCompleted(); + std::unique_ptr<ChromeCleanerControllerDelegate> real_delegate_; // Pointer to either real_delegate_ or one set by tests. ChromeCleanerControllerDelegate* delegate_;
diff --git a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win_unittest.cc b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win_unittest.cc index fd9a195..9b9a5cbb 100644 --- a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win_unittest.cc +++ b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win_unittest.cc
@@ -8,6 +8,7 @@ #include <tuple> #include <utility> +#include "base/callback_helpers.h" #include "base/command_line.h" #include "base/run_loop.h" #include "base/task_scheduler/post_task.h" @@ -15,9 +16,14 @@ #include "base/test/scoped_feature_list.h" #include "base/threading/thread_task_runner_handle.h" #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/safe_browsing/chrome_cleaner/mock_chrome_cleaner_process_win.h" #include "chrome/browser/safe_browsing/chrome_cleaner/reporter_runner_win.h" #include "chrome/browser/safe_browsing/chrome_cleaner/srt_field_trial_win.h" +#include "chrome/test/base/testing_browser_process.h" +#include "chrome/test/base/testing_profile.h" +#include "chrome/test/base/testing_profile_manager.h" #include "components/chrome_cleaner/public/constants/constants.h" #include "content/public/browser/browser_thread.h" #include "content/public/test/test_browser_thread_bundle.h" @@ -33,6 +39,7 @@ using ::testing::InvokeWithoutArgs; using ::testing::SaveArg; using ::testing::StrictMock; +using ::testing::UnorderedElementsAreArray; using ::testing::Values; using ::testing::_; using CrashPoint = MockChromeCleanerProcess::CrashPoint; @@ -112,6 +119,17 @@ bool IsMetricsAndCrashReportingEnabled() override { return metrics_enabled_; } + void TagForResetting(Profile* profile) override { + // This function should never be called by these tests. + FAIL(); + } + + void ResetTaggedProfiles(std::vector<Profile*> profiles, + base::OnceClosure continuation) override { + // This function should never be called by these tests. + FAIL(); + } + // ChromeCleanerRunnerTestDelegate overrides. base::Process LaunchTestProcess( @@ -203,6 +221,7 @@ public ChromeCleanerRunnerTestDelegate, public ChromeCleanerControllerDelegate { public: + ChromeCleanerControllerTest() = default; ~ChromeCleanerControllerTest() override {} void SetUp() override { @@ -255,6 +274,17 @@ return false; } + void TagForResetting(Profile* profile) override { + profiles_tagged_.push_back(profile); + } + + void ResetTaggedProfiles(std::vector<Profile*> profiles, + base::OnceClosure continuation) override { + for (Profile* profile : profiles) + profiles_to_reset_if_tagged_.push_back(profile); + std::move(continuation).Run(); + } + // ChromeCleanerRunnerTestDelegate overrides. base::Process LaunchTestProcess( @@ -312,6 +342,22 @@ bool ExpectedUwsFound() { return ExpectedOnInfectedCalled(); } + bool ExpectedToTagProfile() { + return process_status_ == CleanerProcessStatus::kFetchSuccessValidProcess && + (crash_point_ == CrashPoint::kNone || + crash_point_ == CrashPoint::kAfterResponseReceived) && + (uws_found_status_ == UwsFoundStatus::kUwsFoundNoRebootRequired || + uws_found_status_ == UwsFoundStatus::kUwsFoundRebootRequired) && + user_response_ == UserResponse::kAccepted; + } + + bool ExpectedToResetSettings() { + return process_status_ == CleanerProcessStatus::kFetchSuccessValidProcess && + crash_point_ == CrashPoint::kNone && + uws_found_status_ == UwsFoundStatus::kUwsFoundNoRebootRequired && + user_response_ == UserResponse::kAccepted; + } + ChromeCleanerController::IdleReason ExpectedIdleReason() { EXPECT_EQ(ExpectedFinalState(), State::kIdle); @@ -355,6 +401,9 @@ StrictMock<MockChromeCleanerControllerObserver> mock_observer_; ChromeCleanerController* controller_; + + std::vector<Profile*> profiles_tagged_; + std::vector<Profile*> profiles_to_reset_if_tagged_; }; MULTIPROCESS_TEST_MAIN(MockChromeCleanerProcessMain) { @@ -379,6 +428,21 @@ } TEST_P(ChromeCleanerControllerTest, WithMockCleanerProcess) { + TestingProfileManager profile_manager(TestingBrowserProcess::GetGlobal()); + ASSERT_TRUE(profile_manager.SetUp()); + + constexpr char kTestProfileName1[] = "Test 1"; + constexpr char kTestProfileName2[] = "Test 2"; + + Profile* profile1 = profile_manager.CreateTestingProfile(kTestProfileName1); + ASSERT_TRUE(profile1); + Profile* profile2 = profile_manager.CreateTestingProfile(kTestProfileName2); + ASSERT_TRUE(profile2); + + const int num_profiles = + profile_manager.profile_manager()->GetNumberOfProfiles(); + ASSERT_EQ(2, num_profiles); + EXPECT_CALL(mock_observer_, OnIdle(_)).Times(1); controller_->AddObserver(&mock_observer_); EXPECT_EQ(controller_->state(), State::kIdle); @@ -401,8 +465,9 @@ if (ExpectedOnInfectedCalled()) { EXPECT_CALL(mock_observer_, OnInfected(_)) .WillOnce(DoAll(SaveArg<0>(&files_to_delete_on_infected), - InvokeWithoutArgs([this]() { - controller_->ReplyWithUserResponse(user_response_); + InvokeWithoutArgs([this, profile1]() { + controller_->ReplyWithUserResponse(profile1, + user_response_); }))); } @@ -432,6 +497,19 @@ EXPECT_EQ(files_to_delete_on_infected, files_to_delete_on_cleaning); } + std::vector<Profile*> expected_tagged; + if (ExpectedToTagProfile()) + expected_tagged.push_back(profile1); + EXPECT_THAT(expected_tagged, UnorderedElementsAreArray(profiles_tagged_)); + + std::vector<Profile*> expected_reset_if_tagged; + if (ExpectedToResetSettings()) { + expected_reset_if_tagged.push_back(profile1); + expected_reset_if_tagged.push_back(profile2); + } + EXPECT_THAT(expected_reset_if_tagged, + UnorderedElementsAreArray(profiles_to_reset_if_tagged_)); + controller_->RemoveObserver(&mock_observer_); }
diff --git a/chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_browsertest_win.cc b/chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_browsertest_win.cc new file mode 100644 index 0000000..1695a3a --- /dev/null +++ b/chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_browsertest_win.cc
@@ -0,0 +1,228 @@ +// 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 "chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_win.h" + +#include <memory> + +#include "base/run_loop.h" +#include "base/test/scoped_feature_list.h" +#include "base/test/test_reg_util_win.h" +#include "base/win/registry.h" +#include "chrome/browser/browser_process.h" +#include "chrome/browser/profile_resetter/brandcoded_default_settings.h" +#include "chrome/browser/profile_resetter/profile_resetter.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/profiles/profile_manager.h" +#include "chrome/browser/safe_browsing/chrome_cleaner/srt_field_trial_win.h" +#include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_test_utils.h" +#include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/browser_finder.h" +#include "chrome/common/pref_names.h" +#include "chrome/test/base/in_process_browser_test.h" +#include "components/chrome_cleaner/public/constants/constants.h" +#include "components/prefs/pref_service.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace safe_browsing { +namespace { + +using ::testing::_; +using ::testing::StrictMock; + +// Callback for CreateProfile() that assigns |profile| to |*out_profile| +// if the profile creation is successful. +void CreateProfileCallback(Profile** out_profile, + const base::Closure& closure, + Profile* profile, + Profile::CreateStatus status) { + DCHECK(out_profile); + if (status == Profile::CREATE_STATUS_INITIALIZED) + *out_profile = profile; + closure.Run(); +} + +// Creates a new profile from the UI thread. +Profile* CreateProfile() { + ProfileManager* profile_manager = g_browser_process->profile_manager(); + Profile* profile = nullptr; + base::RunLoop run_loop; + profile_manager->CreateProfileAsync( + profile_manager->GenerateNextProfileDirectoryPath(), + base::Bind(&CreateProfileCallback, &profile, run_loop.QuitClosure()), + base::string16(), std::string(), std::string()); + run_loop.Run(); + return profile; +} + +// Returns true if |profile| is tagged for settings reset. +bool ProfileIsTagged(Profile* profile) { + return profile->GetPrefs()->GetBoolean(prefs::kChromeCleanerResetPending); +} + +// Saves |value| in the registry at the value name corresponding to the cleanup +// completed state. +void SetCompletedState(DWORD value) { + base::string16 cleaner_key_path( + chrome_cleaner::kSoftwareRemovalToolRegistryKey); + cleaner_key_path.append(L"\\").append(chrome_cleaner::kCleanerSubKey); + + LONG result = + base::win::RegKey(HKEY_CURRENT_USER, cleaner_key_path.c_str(), + KEY_SET_VALUE) + .WriteValue(chrome_cleaner::kCleanupCompletedValueName, value); + ASSERT_EQ(ERROR_SUCCESS, result); +} + +class ChromeCleanerTagForResettingTest : public InProcessBrowserTest { + public: + void SetUpInProcessBrowserTestFixture() override { + InProcessBrowserTest::SetUpInProcessBrowserTestFixture(); + + scoped_feature_list_.InitAndEnableFeature(kInBrowserCleanerUIFeature); + } + + protected: + base::test::ScopedFeatureList scoped_feature_list_; +}; + +IN_PROC_BROWSER_TEST_F(ChromeCleanerTagForResettingTest, Run) { + Browser* browser = chrome::FindLastActive(); + ASSERT_TRUE(browser); + Profile* profile = browser->profile(); + ASSERT_TRUE(profile); + + PostCleanupSettingsResetter resetter; + resetter.TagForResetting(profile); + EXPECT_TRUE(ProfileIsTagged(profile)); +} + +class SettingsResetterTestDelegate + : public PostCleanupSettingsResetter::Delegate { + public: + explicit SettingsResetterTestDelegate(int* num_resets) + : num_resets_(num_resets) {} + ~SettingsResetterTestDelegate() override = default; + + void FetchDefaultSettings( + DefaultSettingsFetcher::SettingsCallback callback) override { + callback.Run(base::MakeUnique<BrandcodedDefaultSettings>()); + } + + // Returns a MockProfileResetter that requires Reset() be called. + std::unique_ptr<ProfileResetter> GetProfileResetter( + Profile* profile) override { + ++(*num_resets_); + auto mock_profile_resetter = + base::MakeUnique<StrictMock<MockProfileResetter>>(profile); + EXPECT_CALL(*mock_profile_resetter, MockReset(_, _, _)); + return std::move(mock_profile_resetter); + } + + private: + int* num_resets_; + + DISALLOW_COPY_AND_ASSIGN(SettingsResetterTestDelegate); +}; + +// Indicates the possible values to be written to the registry for cleanup +// completion. +enum class CleanupCompletionState { + // No value will be written to the registry; cleanup should be considered + // as not completed. + kNotAvailable, + // Value 0 will be written to the registry; cleanup should be considered as + // not completed. + kNotCompleted, + // Value 1 will be written to the registry; cleanup should be considered + // as completed. + kCompleted, + // A non-zero value different than 1 will be written to the registry; cleanup + // should be considered as not completed. + kInvalidValue, +}; + +// Param for this test: +// - CleanupCompletionState completion_state: indicates the value to be +// written to the registry for cleanup completion. +class ChromeCleanerResetTaggedProfilesTest + : public InProcessBrowserTest, + public ::testing::WithParamInterface<CleanupCompletionState> { + public: + void SetUpInProcessBrowserTestFixture() override { + InProcessBrowserTest::SetUpInProcessBrowserTestFixture(); + + completion_state_ = GetParam(); + ASSERT_TRUE(completion_state_ >= CleanupCompletionState::kNotAvailable && + completion_state_ <= CleanupCompletionState::kInvalidValue); + scoped_feature_list_.InitAndEnableFeature(kInBrowserCleanerUIFeature); + } + + protected: + CleanupCompletionState completion_state_; + + base::test::ScopedFeatureList scoped_feature_list_; + registry_util::RegistryOverrideManager registry_override_manager_; +}; + +IN_PROC_BROWSER_TEST_P(ChromeCleanerResetTaggedProfilesTest, Run) { + ASSERT_NO_FATAL_FAILURE( + registry_override_manager_.OverrideRegistry(HKEY_CURRENT_USER)); + switch (completion_state_) { + case CleanupCompletionState::kNotAvailable: + // No value written to the registry. + break; + + case CleanupCompletionState::kNotCompleted: + SetCompletedState(0); + break; + + case CleanupCompletionState::kCompleted: + SetCompletedState(1); + break; + + case CleanupCompletionState::kInvalidValue: + SetCompletedState(42); + } + + // Profile objects are owned by ProfileManager. + Profile* profile1 = CreateProfile(); + ASSERT_TRUE(profile1); + Profile* profile2 = CreateProfile(); + ASSERT_TRUE(profile2); + Profile* profile3 = CreateProfile(); + ASSERT_TRUE(profile3); + + profile1->GetPrefs()->SetBoolean(prefs::kChromeCleanerResetPending, true); + profile3->GetPrefs()->SetBoolean(prefs::kChromeCleanerResetPending, true); + + int num_resets = 0; + auto delegate = base::MakeUnique<SettingsResetterTestDelegate>(&num_resets); + + PostCleanupSettingsResetter resetter; + base::RunLoop run_loop_for_reset; + resetter.ResetTaggedProfiles({profile1, profile2, profile3}, + run_loop_for_reset.QuitClosure(), + std::move(delegate)); + run_loop_for_reset.Run(); + + // Profiles 1 and 3 should be reset only if completion_state_ is kCompleted. + // Profile 2 should remain not-tagged by the operation. + bool reset_expected = completion_state_ == CleanupCompletionState::kCompleted; + EXPECT_EQ(reset_expected ? 2 : 0, num_resets); + EXPECT_EQ(!reset_expected, ProfileIsTagged(profile1)); + EXPECT_EQ(false, ProfileIsTagged(profile2)); + EXPECT_EQ(!reset_expected, ProfileIsTagged(profile3)); +} + +INSTANTIATE_TEST_CASE_P(Default, + ChromeCleanerResetTaggedProfilesTest, + testing::Values(CleanupCompletionState::kNotAvailable, + CleanupCompletionState::kNotCompleted, + CleanupCompletionState::kCompleted, + CleanupCompletionState::kInvalidValue)); + +} // namespace +} // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_win.cc b/chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_win.cc new file mode 100644 index 0000000..3a8bb83f --- /dev/null +++ b/chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_win.cc
@@ -0,0 +1,241 @@ +// 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 "chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_win.h" + +#include <algorithm> +#include <iterator> +#include <memory> +#include <utility> +#include <vector> + +#include "base/barrier_closure.h" +#include "base/bind_helpers.h" +#include "base/callback_helpers.h" +#include "base/macros.h" +#include "base/memory/ref_counted.h" +#include "base/synchronization/lock.h" +#include "base/win/registry.h" +#include "chrome/browser/browser_process.h" +#include "chrome/browser/profile_resetter/profile_resetter.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/profiles/profile_manager.h" +#include "chrome/browser/safe_browsing/chrome_cleaner/srt_field_trial_win.h" +#include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/browser_finder.h" +#include "chrome/common/pref_names.h" +#include "components/chrome_cleaner/public/constants/constants.h" +#include "components/pref_registry/pref_registry_syncable.h" +#include "components/prefs/pref_service.h" +#include "content/public/browser/browser_thread.h" + +namespace safe_browsing { + +namespace { + +// Returns the post-cleanup reset pending prefs for |profile|. +bool ResetPending(Profile* profile) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + DCHECK(PostCleanupSettingsResetter::IsEnabled()); + DCHECK(profile); + + PrefService* prefs = profile->GetPrefs(); + return prefs->GetBoolean(prefs::kChromeCleanerResetPending); +} + +// Updates the post-cleanup reset pending prefs for |profile|. +void RecordResetPending(bool value, Profile* profile) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + DCHECK(PostCleanupSettingsResetter::IsEnabled()); + DCHECK(profile); + + PrefService* prefs = profile->GetPrefs(); + prefs->SetBoolean(prefs::kChromeCleanerResetPending, value); +} + +bool CopyProfilesToReset(const std::vector<Profile*>& profiles, + std::vector<Profile*>* profiles_to_reset) { + std::copy_if(profiles.begin(), profiles.end(), + std::back_inserter(*profiles_to_reset), + [](Profile* profile) -> bool { return ResetPending(profile); }); + return profiles_to_reset->size() > 0; +} + +// Manages post-cleanup settings reset for a list of profiles. +// An instance of this class is created by ResetTaggedProfiles() and will +// self-delete once all profiles in the list have been reset. +class SettingsResetter : public base::RefCounted<SettingsResetter> { + public: + SettingsResetter( + std::vector<Profile*> profiles_to_reset, + std::unique_ptr<PostCleanupSettingsResetter::Delegate> delegate, + base::OnceClosure done_callback); + + // Resets settings for all profiles in |profiles_to_reset_| and invokes + // |done_callback_| when done. + void Run(); + + protected: + virtual ~SettingsResetter(); + + private: + friend class base::RefCounted<SettingsResetter>; + + // Resets settings for |profile| according to default values given by + // |master_settings|. Used as a callback for + // DefaultSettingsFetcher::FetchDefaultSettings(). + void OnFetchCompleted( + Profile* profile, + std::unique_ptr<BrandcodedDefaultSettings> master_settings); + + // Removes the settings reset tag for |profile|. If there are no more + // profiles to reset, invokes |done_callback_| and deletes this object. + void OnResetCompleted(Profile* profile); + + // The profiles to be reset. + std::vector<Profile*> profiles_to_reset_; + + // The number of profiles that need to be reset. + int num_pending_resets_; + + // The callback to be invoked once settings reset completes. + base::OnceClosure done_callback_; + + std::unique_ptr<PostCleanupSettingsResetter::Delegate> delegate_; + + DISALLOW_COPY_AND_ASSIGN(SettingsResetter); +}; + +SettingsResetter::SettingsResetter( + std::vector<Profile*> profiles_to_reset, + std::unique_ptr<PostCleanupSettingsResetter::Delegate> delegate, + base::OnceClosure done_callback) + : profiles_to_reset_(std::move(profiles_to_reset)), + num_pending_resets_(profiles_to_reset_.size()), + done_callback_(std::move(done_callback)), + delegate_(std::move(delegate)) { + DCHECK_LT(0, num_pending_resets_); + DCHECK(done_callback_); + DCHECK(delegate_); +} + +SettingsResetter::~SettingsResetter() { + DCHECK(!done_callback_); + DCHECK(!num_pending_resets_); +} + +void SettingsResetter::Run() { + for (Profile* profile : profiles_to_reset_) { + delegate_->FetchDefaultSettings( + base::Bind(&SettingsResetter::OnFetchCompleted, this, profile)); + } +} + +void SettingsResetter::OnFetchCompleted( + Profile* profile, + std::unique_ptr<BrandcodedDefaultSettings> master_settings) { + static const ProfileResetter::ResettableFlags kSettingsToReset = + ProfileResetter::DEFAULT_SEARCH_ENGINE | ProfileResetter::HOMEPAGE | + ProfileResetter::EXTENSIONS | ProfileResetter::STARTUP_PAGES | + ProfileResetter::SHORTCUTS; + + delegate_->GetProfileResetter(profile)->Reset( + kSettingsToReset, std::move(master_settings), + base::Bind(&SettingsResetter::OnResetCompleted, this, profile)); +} + +void SettingsResetter::OnResetCompleted(Profile* profile) { + DCHECK_LT(0, num_pending_resets_); + + RecordResetPending(false, profile); + + --num_pending_resets_; + if (!num_pending_resets_) + std::move(done_callback_).Run(); +} + +// Returns true if there is information of a completed cleanup in the registry. +bool CleanupCompletedFromRegistry() { + base::string16 cleaner_key_path( + chrome_cleaner::kSoftwareRemovalToolRegistryKey); + cleaner_key_path.append(L"\\").append(chrome_cleaner::kCleanerSubKey); + + base::win::RegKey srt_cleaner_key(HKEY_CURRENT_USER, cleaner_key_path.c_str(), + KEY_QUERY_VALUE); + DWORD cleanup_completed = 0; + return srt_cleaner_key.Valid() && + srt_cleaner_key.ReadValueDW(chrome_cleaner::kCleanupCompletedValueName, + &cleanup_completed) == ERROR_SUCCESS && + cleanup_completed == 1; +} + +} // namespace + +PostCleanupSettingsResetter::Delegate::Delegate() {} + +PostCleanupSettingsResetter::Delegate::~Delegate() {} + +void PostCleanupSettingsResetter::Delegate::FetchDefaultSettings( + DefaultSettingsFetcher::SettingsCallback callback) { + DefaultSettingsFetcher::FetchDefaultSettings(std::move(callback)); +} + +PostCleanupSettingsResetter::PostCleanupSettingsResetter() = default; + +PostCleanupSettingsResetter::~PostCleanupSettingsResetter() = default; + +// static +bool PostCleanupSettingsResetter::IsEnabled() { +#if defined(OS_WIN) + return base::FeatureList::IsEnabled( + safe_browsing::kInBrowserCleanerUIFeature); +#else + return false; +#endif +} + +std::unique_ptr<ProfileResetter> +PostCleanupSettingsResetter::Delegate::GetProfileResetter(Profile* profile) { + return base::MakeUnique<ProfileResetter>(profile); +} + +void PostCleanupSettingsResetter::TagForResetting(Profile* profile) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + DCHECK(IsEnabled()); + DCHECK(profile); + + RecordResetPending(true, profile); +} + +void PostCleanupSettingsResetter::ResetTaggedProfiles( + std::vector<Profile*> profiles, + base::OnceClosure done_callback, + std::unique_ptr<PostCleanupSettingsResetter::Delegate> delegate) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + DCHECK(IsEnabled()); + DCHECK(delegate); + + std::vector<Profile*> profiles_to_reset; + if (!CopyProfilesToReset(profiles, &profiles_to_reset) || + !CleanupCompletedFromRegistry()) { + std::move(done_callback).Run(); + return; + } + + // The SettingsResetter object will self-delete once |done_callback| is + // invoked. + make_scoped_refptr(new SettingsResetter(std::move(profiles_to_reset), + std::move(delegate), + std::move(done_callback))) + ->Run(); +} + +// static +void PostCleanupSettingsResetter::RegisterProfilePrefs( + user_prefs::PrefRegistrySyncable* registry) { + DCHECK(registry); + registry->RegisterBooleanPref(prefs::kChromeCleanerResetPending, false); +} + +} // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_win.h b/chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_win.h new file mode 100644 index 0000000..af7de26 --- /dev/null +++ b/chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_win.h
@@ -0,0 +1,80 @@ +// 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 CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_SETTINGS_RESETTER_WIN_H_ +#define CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_SETTINGS_RESETTER_WIN_H_ + +#include <memory> +#include <vector> + +#include "base/callback.h" +#include "base/macros.h" +#include "chrome/browser/safe_browsing/settings_reset_prompt/default_settings_fetcher.h" + +class Profile; +class ProfileResetter; + +namespace user_prefs { +class PrefRegistrySyncable; +} // namespace user_prefs + +namespace safe_browsing { + +// Handles settings reset for user's profile to complete a Chrome Cleaner run. +// Allows tagging a profile for resetting once a cleanup starts and resetting +// settings once a cleanup is completed. Completed cleanup is identified by +// annotations in the registry written by the cleaner. Non-static members can +// only be called if PostCleanupSettingsResetter::IsEnabled() is true. +class PostCleanupSettingsResetter { + public: + class Delegate { + public: + Delegate(); + virtual ~Delegate(); + + virtual void FetchDefaultSettings( + DefaultSettingsFetcher::SettingsCallback callback); + + virtual std::unique_ptr<ProfileResetter> GetProfileResetter( + Profile* profile); + + private: + DISALLOW_COPY_AND_ASSIGN(Delegate); + }; + + PostCleanupSettingsResetter(); + virtual ~PostCleanupSettingsResetter(); + + // Returns true if the in-browser cleaner UI is enabled. + static bool IsEnabled(); + + // Tags |profile| to have its settings reset once the current cleanup + // finishes. + void TagForResetting(Profile* profile); + + // Resets settings for the profiles in |profiles| that are tagged for + // resetting if cleanup has completed. Invokes |done_callback| once all + // profiles in |profiles| have been reset. + void ResetTaggedProfiles( + std::vector<Profile*> profiles, + base::OnceClosure done_callback, + std::unique_ptr<PostCleanupSettingsResetter::Delegate> delegate); + + // Registers the settings reset pending tracked preference. + static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); + + private: + // This object doesn't hold any state, so it's safe to delete it even after + // an async function is called. For example, it's fine to let the object get + // out of scope after invoking ResetTaggedProfiles() and there is no need + // to wait for the callback to be run to release it. If you are intending to + // change that assumption, please make sure you don't break the contract + // where this class is used. + + DISALLOW_COPY_AND_ASSIGN(PostCleanupSettingsResetter); +}; + +} // namespace safe_browsing + +#endif // CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_SETTINGS_RESETTER_WIN_H_
diff --git a/chrome/browser/signin/chrome_signin_helper.cc b/chrome/browser/signin/chrome_signin_helper.cc index b75e7cdb..8348c8a 100644 --- a/chrome/browser/signin/chrome_signin_helper.cc +++ b/chrome/browser/signin/chrome_signin_helper.cc
@@ -234,9 +234,11 @@ profile_mode_mask |= PROFILE_MODE_INCOGNITO_DISABLED; } + std::string account_id = io_data->google_services_account_id()->GetValue(); + // If new url is eligible to have the header, add it, otherwise remove it. AppendOrRemoveAccountConsistentyRequestHeader( - request, redirect_url, io_data->google_services_account_id()->GetValue(), + request, redirect_url, account_id, io_data->IsSyncEnabled(), io_data->GetCookieSettings(), profile_mode_mask); }
diff --git a/chrome/browser/ui/webui/settings/chrome_cleanup_handler.cc b/chrome/browser/ui/webui/settings/chrome_cleanup_handler.cc index 023ae0c..35a183d 100644 --- a/chrome/browser/ui/webui/settings/chrome_cleanup_handler.cc +++ b/chrome/browser/ui/webui/settings/chrome_cleanup_handler.cc
@@ -53,8 +53,8 @@ } // namespace -ChromeCleanupHandler::ChromeCleanupHandler() - : controller_(ChromeCleanerController::GetInstance()) {} +ChromeCleanupHandler::ChromeCleanupHandler(Profile* profile) + : controller_(ChromeCleanerController::GetInstance()), profile_(profile) {} ChromeCleanupHandler::~ChromeCleanupHandler() { controller_->RemoveObserver(this); @@ -146,7 +146,7 @@ DCHECK_EQ(0U, args->GetSize()); controller_->ReplyWithUserResponse( - ChromeCleanerController::UserResponse::kAccepted); + profile_, ChromeCleanerController::UserResponse::kAccepted); } } // namespace settings
diff --git a/chrome/browser/ui/webui/settings/chrome_cleanup_handler.h b/chrome/browser/ui/webui/settings/chrome_cleanup_handler.h index 86df512..e32b273 100644 --- a/chrome/browser/ui/webui/settings/chrome_cleanup_handler.h +++ b/chrome/browser/ui/webui/settings/chrome_cleanup_handler.h
@@ -12,6 +12,8 @@ #include "chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.h" #include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h" +class Profile; + namespace settings { // Chrome Cleanup settings page UI handler. @@ -19,7 +21,7 @@ : public SettingsPageUIHandler, public safe_browsing::ChromeCleanerController::Observer { public: - ChromeCleanupHandler(); + explicit ChromeCleanupHandler(Profile* profile); ~ChromeCleanupHandler() override; // SettingsPageUIHandler implementation. @@ -56,6 +58,8 @@ // Raw pointer to a singleton. Must outlive this object. safe_browsing::ChromeCleanerController* controller_; + Profile* profile_; + DISALLOW_COPY_AND_ASSIGN(ChromeCleanupHandler); };
diff --git a/chrome/browser/ui/webui/settings/md_settings_ui.cc b/chrome/browser/ui/webui/settings/md_settings_ui.cc index 83f48d8e..ecbd32a6 100644 --- a/chrome/browser/ui/webui/settings/md_settings_ui.cc +++ b/chrome/browser/ui/webui/settings/md_settings_ui.cc
@@ -182,7 +182,7 @@ #if defined(OS_WIN) if (base::FeatureList::IsEnabled(safe_browsing::kInBrowserCleanerUIFeature) && safe_browsing::ChromeCleanerController::ShouldShowCleanupInSettingsUI()) { - AddSettingsPageUIHandler(base::MakeUnique<ChromeCleanupHandler>()); + AddSettingsPageUIHandler(base::MakeUnique<ChromeCleanupHandler>(profile)); html_source->AddBoolean("chromeCleanupEnabled", true); } #endif // defined(OS_WIN)
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc index 5385bdb..c825b79 100644 --- a/chrome/common/pref_names.cc +++ b/chrome/common/pref_names.cc
@@ -103,6 +103,10 @@ // compared to this value and if different will result in a profile reset // prompt. See triggered_profile_resetter.h for more information. const char kLastProfileResetTimestamp[] = "profile.last_reset_timestamp"; + +// A boolean indicating if settings should be reset for this profile once a +// run of the Chrome Cleanup Tool has completed. +const char kChromeCleanerResetPending[] = "chrome_cleaner.reset_pending"; #endif // The URL to open the new tab page to. Only set by Group Policy.
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h index 7511f07..680fa6c2 100644 --- a/chrome/common/pref_names.h +++ b/chrome/common/pref_names.h
@@ -45,6 +45,7 @@ extern const char kImportantSitesDialogHistory[]; #if defined(OS_WIN) extern const char kLastProfileResetTimestamp[]; +extern const char kChromeCleanerResetPending[]; #endif extern const char kNewTabPageLocationOverride[]; extern const char kProfileIconVersion[];
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 9434f09..f7d26ea 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -1981,6 +1981,7 @@ "../browser/extensions/webstore_reinstaller_browsertest.cc", "../browser/extensions/webstore_startup_installer_browsertest.cc", "../browser/extensions/window_open_apitest.cc", + "../browser/safe_browsing/chrome_cleaner/settings_resetter_browsertest_win.cc", "../browser/safe_browsing/settings_reset_prompt/default_settings_fetcher_browsertest.cc", "../browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_model_browsertest_win.cc", "../browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_test_utils.cc",
diff --git a/chrome/test/data/policy/policy_test_cases.json b/chrome/test/data/policy/policy_test_cases.json index 1167b83..5b7a1be 100644 --- a/chrome/test/data/policy/policy_test_cases.json +++ b/chrome/test/data/policy/policy_test_cases.json
@@ -3097,6 +3097,10 @@ ] }, + "DeviceSecondFactorAuthentication": { + "os": ["chromeos"] + }, + "----- Chrome Frame policies -------------------------------------------": {}, "ChromeFrameRendererSettings": {
diff --git a/components/chrome_cleaner/public/constants/constants.cc b/components/chrome_cleaner/public/constants/constants.cc index 89c10a26..2457c6f 100644 --- a/components/chrome_cleaner/public/constants/constants.cc +++ b/components/chrome_cleaner/public/constants/constants.cc
@@ -31,6 +31,7 @@ const wchar_t kScanTimesSubKey[] = L"ScanTimes"; // Registry value names. +const wchar_t kCleanupCompletedValueName[] = L"cleanup-completed"; const wchar_t kEndTimeValueName[] = L"EndTime"; const wchar_t kEngineErrorCodeValueName[] = L"EngineErrorCode"; const wchar_t kExitCodeValueName[] = L"ExitCode";
diff --git a/components/chrome_cleaner/public/constants/constants.h b/components/chrome_cleaner/public/constants/constants.h index 01f9bfc..a66b045 100644 --- a/components/chrome_cleaner/public/constants/constants.h +++ b/components/chrome_cleaner/public/constants/constants.h
@@ -79,6 +79,9 @@ // The suffix for registry key paths where scan times will be written to. extern const wchar_t kScanTimesSubKey[]; +// Registry value names that indicate if a cleanup has completed. +extern const wchar_t kCleanupCompletedValueName[]; + // Registry value names where metrics are written to. extern const wchar_t kEndTimeValueName[]; extern const wchar_t kEngineErrorCodeValueName[];
diff --git a/components/ntp_snippets/remote/remote_suggestions_database_unittest.cc b/components/ntp_snippets/remote/remote_suggestions_database_unittest.cc index f9b6a397b..df46935 100644 --- a/components/ntp_snippets/remote/remote_suggestions_database_unittest.cc +++ b/components/ntp_snippets/remote/remote_suggestions_database_unittest.cc
@@ -51,8 +51,10 @@ return RemoteSuggestion::CreateFromProto(proto); } -MATCHER_P(SnippetEq, snippet, "") { - return *arg == *snippet; +// Eq matcher has to store the expected value, but RemoteSuggestion is movable- +// only. +MATCHER_P(PointeeEq, ptr_to_expected, "") { + return *arg == *ptr_to_expected; } } // namespace @@ -164,7 +166,7 @@ // Make sure they're there. EXPECT_CALL(*this, - OnSnippetsLoadedImpl(ElementsAre(SnippetEq(snippet.get())))); + OnSnippetsLoadedImpl(ElementsAre(PointeeEq(snippet.get())))); db()->LoadSnippets( base::Bind(&RemoteSuggestionsDatabaseTest::OnSnippetsLoaded, base::Unretained(this))); @@ -196,7 +198,7 @@ CreateDatabase(); EXPECT_CALL(*this, - OnSnippetsLoadedImpl(ElementsAre(SnippetEq(snippet.get())))); + OnSnippetsLoadedImpl(ElementsAre(PointeeEq(snippet.get())))); db()->LoadSnippets( base::Bind(&RemoteSuggestionsDatabaseTest::OnSnippetsLoaded, base::Unretained(this))); @@ -223,7 +225,7 @@ // Make sure we get the updated version. EXPECT_CALL(*this, - OnSnippetsLoadedImpl(ElementsAre(SnippetEq(snippet.get())))); + OnSnippetsLoadedImpl(ElementsAre(PointeeEq(snippet.get())))); db()->LoadSnippets( base::Bind(&RemoteSuggestionsDatabaseTest::OnSnippetsLoaded, base::Unretained(this))); @@ -242,7 +244,7 @@ // Make sure it's there. EXPECT_CALL(*this, - OnSnippetsLoadedImpl(ElementsAre(SnippetEq(snippet.get())))); + OnSnippetsLoadedImpl(ElementsAre(PointeeEq(snippet.get())))); db()->LoadSnippets( base::Bind(&RemoteSuggestionsDatabaseTest::OnSnippetsLoaded, base::Unretained(this))); @@ -276,7 +278,7 @@ // Make sure they're there. EXPECT_CALL(*this, - OnSnippetsLoadedImpl(ElementsAre(SnippetEq(snippet.get())))); + OnSnippetsLoadedImpl(ElementsAre(PointeeEq(snippet.get())))); db()->LoadSnippets( base::Bind(&RemoteSuggestionsDatabaseTest::OnSnippetsLoaded, base::Unretained(this)));
diff --git a/components/ntp_snippets/remote/remote_suggestions_fetcher_impl_unittest.cc b/components/ntp_snippets/remote/remote_suggestions_fetcher_impl_unittest.cc index 8aac990..376f1fa 100644 --- a/components/ntp_snippets/remote/remote_suggestions_fetcher_impl_unittest.cc +++ b/components/ntp_snippets/remote/remote_suggestions_fetcher_impl_unittest.cc
@@ -11,6 +11,7 @@ #include "base/json/json_reader.h" #include "base/memory/ptr_util.h" +#include "base/optional.h" #include "base/test/histogram_tester.h" #include "base/test/test_mock_time_task_runner.h" #include "base/threading/thread_task_runner_handle.h" @@ -44,9 +45,11 @@ using testing::AllOf; using testing::ElementsAre; using testing::Eq; +using testing::Field; using testing::IsEmpty; using testing::Not; using testing::NotNull; +using testing::Property; using testing::StartsWith; const char kAPIKey[] = "fakeAPIkey"; @@ -65,20 +68,6 @@ *ptr = std::move(*arg1); } -MATCHER(HasValue, "") { - return static_cast<bool>(*arg); -} - -// TODO(fhorschig): When there are more helpers for the Status class, consider a -// helpers file. -MATCHER_P(HasCode, code, "") { - return arg.code == code; -} - -MATCHER(IsSuccess, "") { - return arg.IsSuccess(); -} - MATCHER(IsEmptyCategoriesList, "is an empty list of categories") { RemoteSuggestionsFetcher::OptionalFetchedCategories& fetched_categories = *arg; @@ -448,9 +437,10 @@ SetFakeResponse(/*response_data=*/kJsonStr, net::HTTP_OK, net::URLRequestStatus::SUCCESS); EXPECT_CALL(mock_callback(), - Run(IsSuccess(), - AllOf(IsSingleArticle("http://localhost/foobar"), - FirstCategoryHasInfo(IsCategoryInfoForArticles())))); + Run(Property(&Status::IsSuccess, true), + /*fetched_categories=*/AllOf( + IsSingleArticle("http://localhost/foobar"), + FirstCategoryHasInfo(IsCategoryInfoForArticles())))); fetcher().FetchSnippets(test_params(), ToSnippetsAvailableCallback(&mock_callback())); FastForwardUntilNoTasksRemain(); @@ -488,9 +478,10 @@ SetFakeResponse(/*response_data=*/kJsonStr, net::HTTP_OK, net::URLRequestStatus::SUCCESS); EXPECT_CALL(mock_callback(), - Run(IsSuccess(), - AllOf(IsSingleArticle("http://localhost/foobar"), - FirstCategoryHasInfo(IsCategoryInfoForArticles())))); + Run(Property(&Status::IsSuccess, true), + /*fetched_categories=*/AllOf( + IsSingleArticle("http://localhost/foobar"), + FirstCategoryHasInfo(IsCategoryInfoForArticles())))); fetcher().FetchSnippets(test_params(), ToSnippetsAvailableCallback(&mock_callback())); @@ -533,9 +524,10 @@ SetFakeResponse(/*response_data=*/kJsonStr, net::HTTP_OK, net::URLRequestStatus::SUCCESS); EXPECT_CALL(mock_callback(), - Run(IsSuccess(), - AllOf(IsSingleArticle("http://localhost/foobar"), - FirstCategoryHasInfo(IsCategoryInfoForArticles())))); + Run(Property(&Status::IsSuccess, true), + /*fetched_categories=*/AllOf( + IsSingleArticle("http://localhost/foobar"), + FirstCategoryHasInfo(IsCategoryInfoForArticles())))); fetcher().FetchSnippets(test_params(), ToSnippetsAvailableCallback(&mock_callback())); @@ -563,7 +555,9 @@ "}]}"; SetFakeResponse(/*response_data=*/kJsonStr, net::HTTP_OK, net::URLRequestStatus::SUCCESS); - EXPECT_CALL(mock_callback(), Run(IsSuccess(), IsEmptyArticleList())); + EXPECT_CALL(mock_callback(), + Run(Property(&Status::IsSuccess, true), + /*fetched_categories=*/IsEmptyArticleList())); fetcher().FetchSnippets(test_params(), ToSnippetsAvailableCallback(&mock_callback())); FastForwardUntilNoTasksRemain(); @@ -614,7 +608,8 @@ SetFakeResponse(/*response_data=*/kJsonStr, net::HTTP_OK, net::URLRequestStatus::SUCCESS); RemoteSuggestionsFetcher::OptionalFetchedCategories fetched_categories; - EXPECT_CALL(mock_callback(), Run(IsSuccess(), _)) + EXPECT_CALL(mock_callback(), + Run(Property(&Status::IsSuccess, true), /*fetched_categories=*/_)) .WillOnce(MoveArgument1PointeeTo(&fetched_categories)); fetcher().FetchSnippets(test_params(), ToSnippetsAvailableCallback(&mock_callback())); @@ -675,7 +670,8 @@ SetFakeResponse(/*response_data=*/kJsonStr, net::HTTP_OK, net::URLRequestStatus::SUCCESS); RemoteSuggestionsFetcher::OptionalFetchedCategories fetched_categories; - EXPECT_CALL(mock_callback(), Run(IsSuccess(), _)) + EXPECT_CALL(mock_callback(), + Run(Property(&Status::IsSuccess, true), /*fetched_categories=*/_)) .WillOnce(MoveArgument1PointeeTo(&fetched_categories)); fetcher().FetchSnippets(test_params(), ToSnippetsAvailableCallback(&mock_callback())); @@ -740,7 +736,8 @@ SetFakeResponse(/*response_data=*/kJsonStr, net::HTTP_OK, net::URLRequestStatus::SUCCESS); RemoteSuggestionsFetcher::OptionalFetchedCategories fetched_categories; - EXPECT_CALL(mock_callback(), Run(IsSuccess(), _)) + EXPECT_CALL(mock_callback(), + Run(Property(&Status::IsSuccess, true), /*fetched_categories=*/_)) .WillOnce(MoveArgument1PointeeTo(&fetched_categories)); RequestParams params = test_params(); @@ -763,8 +760,11 @@ TEST_F(RemoteSuggestionsSignedOutFetcherTest, ShouldNotFetchWithoutApiKey) { ResetFetcherWithAPIKey(std::string()); - EXPECT_CALL(mock_callback(), Run(HasCode(StatusCode::PERMANENT_ERROR), - /*snippets=*/Not(HasValue()))) + EXPECT_CALL( + mock_callback(), + Run(Field(&Status::code, StatusCode::PERMANENT_ERROR), + /*fetched_categories=*/Property( + &base::Optional<std::vector<FetchedCategory>>::has_value, false))) .Times(1); fetcher().FetchSnippets(test_params(), ToSnippetsAvailableCallback(&mock_callback())); @@ -784,7 +784,9 @@ const std::string kJsonStr = "{\"categories\": []}"; SetFakeResponse(/*response_data=*/kJsonStr, net::HTTP_OK, net::URLRequestStatus::SUCCESS); - EXPECT_CALL(mock_callback(), Run(IsSuccess(), IsEmptyCategoriesList())); + EXPECT_CALL(mock_callback(), + Run(Property(&Status::IsSuccess, true), + /*fetched_categories=*/IsEmptyCategoriesList())); fetcher().FetchSnippets(test_params(), ToSnippetsAvailableCallback(&mock_callback())); FastForwardUntilNoTasksRemain(); @@ -844,8 +846,11 @@ TEST_F(RemoteSuggestionsSignedOutFetcherTest, ShouldReportUrlStatusError) { SetFakeResponse(/*response_data=*/std::string(), net::HTTP_NOT_FOUND, net::URLRequestStatus::FAILED); - EXPECT_CALL(mock_callback(), Run(HasCode(StatusCode::TEMPORARY_ERROR), - /*snippets=*/Not(HasValue()))) + EXPECT_CALL( + mock_callback(), + Run(Field(&Status::code, StatusCode::TEMPORARY_ERROR), + /*fetched_categories=*/Property( + &base::Optional<std::vector<FetchedCategory>>::has_value, false))) .Times(1); fetcher().FetchSnippets(test_params(), ToSnippetsAvailableCallback(&mock_callback())); @@ -866,8 +871,11 @@ TEST_F(RemoteSuggestionsSignedOutFetcherTest, ShouldReportHttpError) { SetFakeResponse(/*response_data=*/std::string(), net::HTTP_NOT_FOUND, net::URLRequestStatus::SUCCESS); - EXPECT_CALL(mock_callback(), Run(HasCode(StatusCode::TEMPORARY_ERROR), - /*snippets=*/Not(HasValue()))) + EXPECT_CALL( + mock_callback(), + Run(Field(&Status::code, StatusCode::TEMPORARY_ERROR), + /*fetched_categories=*/Property( + &base::Optional<std::vector<FetchedCategory>>::has_value, false))) .Times(1); fetcher().FetchSnippets(test_params(), ToSnippetsAvailableCallback(&mock_callback())); @@ -887,8 +895,11 @@ const std::string kInvalidJsonStr = "{ \"recos\": []"; SetFakeResponse(/*response_data=*/kInvalidJsonStr, net::HTTP_OK, net::URLRequestStatus::SUCCESS); - EXPECT_CALL(mock_callback(), Run(HasCode(StatusCode::TEMPORARY_ERROR), - /*snippets=*/Not(HasValue()))) + EXPECT_CALL( + mock_callback(), + Run(Field(&Status::code, StatusCode::TEMPORARY_ERROR), + /*fetched_categories=*/Property( + &base::Optional<std::vector<FetchedCategory>>::has_value, false))) .Times(1); fetcher().FetchSnippets(test_params(), ToSnippetsAvailableCallback(&mock_callback())); @@ -911,8 +922,11 @@ ShouldReportJsonErrorForEmptyResponse) { SetFakeResponse(/*response_data=*/std::string(), net::HTTP_OK, net::URLRequestStatus::SUCCESS); - EXPECT_CALL(mock_callback(), Run(HasCode(StatusCode::TEMPORARY_ERROR), - /*snippets=*/Not(HasValue()))) + EXPECT_CALL( + mock_callback(), + Run(Field(&Status::code, StatusCode::TEMPORARY_ERROR), + /*fetched_categories=*/Property( + &base::Optional<std::vector<FetchedCategory>>::has_value, false))) .Times(1); fetcher().FetchSnippets(test_params(), ToSnippetsAvailableCallback(&mock_callback())); @@ -931,8 +945,11 @@ "{\"recos\": [{ \"contentInfo\": { \"foo\" : \"bar\" }}]}"; SetFakeResponse(/*response_data=*/kJsonStr, net::HTTP_OK, net::URLRequestStatus::SUCCESS); - EXPECT_CALL(mock_callback(), Run(HasCode(StatusCode::TEMPORARY_ERROR), - /*snippets=*/Not(HasValue()))) + EXPECT_CALL( + mock_callback(), + Run(Field(&Status::code, StatusCode::TEMPORARY_ERROR), + /*fetched_categories=*/Property( + &base::Optional<std::vector<FetchedCategory>>::has_value, false))) .Times(1); fetcher().FetchSnippets(test_params(), ToSnippetsAvailableCallback(&mock_callback())); @@ -953,8 +970,11 @@ TEST_F(RemoteSuggestionsSignedOutFetcherTest, ShouldReportHttpErrorForMissingBakedResponse) { InitFakeURLFetcherFactory(); - EXPECT_CALL(mock_callback(), Run(HasCode(StatusCode::TEMPORARY_ERROR), - /*snippets=*/Not(HasValue()))) + EXPECT_CALL( + mock_callback(), + Run(Field(&Status::code, StatusCode::TEMPORARY_ERROR), + /*fetched_categories=*/Property( + &base::Optional<std::vector<FetchedCategory>>::has_value, false))) .Times(1); fetcher().FetchSnippets(test_params(), ToSnippetsAvailableCallback(&mock_callback())); @@ -965,7 +985,9 @@ const std::string kJsonStr = "{ \"categories\": [] }"; SetFakeResponse(/*response_data=*/kJsonStr, net::HTTP_OK, net::URLRequestStatus::SUCCESS); - EXPECT_CALL(mock_callback(), Run(IsSuccess(), IsEmptyCategoriesList())) + EXPECT_CALL(mock_callback(), + Run(Property(&Status::IsSuccess, true), + /*fetched_categories=*/IsEmptyCategoriesList())) .Times(5); fetcher().FetchSnippets(test_params(), ToSnippetsAvailableCallback(&mock_callback()));
diff --git a/components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc b/components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc index f0cce6dba..8a4a178 100644 --- a/components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc +++ b/components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc
@@ -76,6 +76,7 @@ using testing::MockFunction; using testing::NiceMock; using testing::Not; +using testing::Property; using testing::Return; using testing::SaveArg; using testing::SizeIs; @@ -92,18 +93,6 @@ *ptr = std::move(*arg1); } -MATCHER_P(IdEq, value, "") { - return arg->id() == value; -} - -MATCHER_P(IdWithinCategoryEq, expected_id, "") { - return arg.id().id_within_category() == expected_id; -} - -MATCHER_P(HasCode, code, "") { - return arg.code == code; -} - const int kMaxExcludedDismissedIds = 100; const base::Time::Exploded kDefaultCreationTime = {2015, 11, 4, 25, 13, 46, 45}; @@ -1039,14 +1028,14 @@ LoadFromJSONString(provider.get(), GetTestJson({GetSuggestionWithUrl(first)})); EXPECT_THAT(provider->GetSuggestionsForTesting(articles_category()), - ElementsAre(IdEq(first))); + ElementsAre(Pointee(Property(&RemoteSuggestion::id, first)))); std::string second("http://second"); LoadFromJSONString(provider.get(), GetTestJson({GetSuggestionWithUrl(second)})); // The suggestions loaded last replace all that was loaded previously. EXPECT_THAT(provider->GetSuggestionsForTesting(articles_category()), - ElementsAre(IdEq(second))); + ElementsAre(Pointee(Property(&RemoteSuggestion::id, second)))); } TEST_F(RemoteSuggestionsProviderImplTest, @@ -1055,8 +1044,9 @@ LoadFromJSONString(provider.get(), GetTestJson({GetSuggestionWithUrl("http://first")})); - ASSERT_THAT(provider->GetSuggestionsForTesting(articles_category()), - ElementsAre(IdEq("http://first"))); + ASSERT_THAT( + provider->GetSuggestionsForTesting(articles_category()), + ElementsAre(Pointee(Property(&RemoteSuggestion::id, "http://first")))); image_decoder()->SetDecodedImage(gfx::test::CreateImage(1, 1)); ServeImageCallback serve_one_by_one_image_callback = @@ -1075,8 +1065,9 @@ LoadFromJSONString(provider.get(), GetTestJson({GetSuggestionWithUrl("http://first")})); - ASSERT_THAT(provider->GetSuggestionsForTesting(articles_category()), - ElementsAre(IdEq("http://first"))); + ASSERT_THAT( + provider->GetSuggestionsForTesting(articles_category()), + ElementsAre(Pointee(Property(&RemoteSuggestion::id, "http://first")))); auto expect_only_second_suggestion_received = base::Bind([](Status status, std::vector<ContentSuggestion> suggestions) { @@ -1147,8 +1138,11 @@ .Run(Status(StatusCode::SUCCESS, "message"), std::move(fetched_categories)); - ASSERT_THAT(observer().SuggestionsForCategory(articles_category()), - ElementsAre(IdWithinCategoryEq("http://old.com/"))); + ASSERT_THAT( + observer().SuggestionsForCategory(articles_category()), + ElementsAre(Property(&ContentSuggestion::id, + Property(&ContentSuggestion::ID::id_within_category, + "http://old.com/")))); // Now fetch more, but first prepare a response. fetched_categories.push_back(FetchedCategory( @@ -1162,8 +1156,8 @@ auto assert_receiving_one_new_suggestion = base::Bind([](Status status, std::vector<ContentSuggestion> suggestions) { ASSERT_THAT(suggestions, SizeIs(1)); - ASSERT_THAT(suggestions[0], - IdWithinCategoryEq("http://fetched-more.com/")); + ASSERT_THAT(suggestions[0].id().id_within_category(), + Eq("http://fetched-more.com/")); }); EXPECT_CALL(*mock_fetcher, FetchSnippets(_, _)) .WillOnce(MoveSecondArgumentPointeeTo(&snippets_callback)) @@ -1178,8 +1172,11 @@ .Run(Status(StatusCode::SUCCESS, "message"), std::move(fetched_categories)); // Other surfaces should remain the same. - EXPECT_THAT(observer().SuggestionsForCategory(articles_category()), - ElementsAre(IdWithinCategoryEq("http://old.com/"))); + EXPECT_THAT( + observer().SuggestionsForCategory(articles_category()), + ElementsAre(Property(&ContentSuggestion::id, + Property(&ContentSuggestion::ID::id_within_category, + "http://old.com/")))); } // Imagine that we have surfaces A and B. The user fetches more in A. This @@ -1207,8 +1204,8 @@ auto assert_receiving_one_new_suggestion = base::Bind([](Status status, std::vector<ContentSuggestion> suggestions) { ASSERT_THAT(suggestions, SizeIs(1)); - ASSERT_THAT(suggestions[0], - IdWithinCategoryEq("http://fetched-more.com/")); + ASSERT_THAT(suggestions[0].id().id_within_category(), + Eq("http://fetched-more.com/")); }); RemoteSuggestionsFetcher::SnippetsAvailableCallback snippets_callback; EXPECT_CALL(*mock_fetcher, FetchSnippets(_, _)) @@ -1236,8 +1233,8 @@ auto expect_receiving_same_suggestion = base::Bind([](Status status, std::vector<ContentSuggestion> suggestions) { ASSERT_THAT(suggestions, SizeIs(1)); - EXPECT_THAT(suggestions[0], - IdWithinCategoryEq("http://fetched-more.com/")); + EXPECT_THAT(suggestions[0].id().id_within_category(), + Eq("http://fetched-more.com/")); }); // The provider should not ask the fetcher to exclude the suggestion fetched // more on A. @@ -1314,7 +1311,8 @@ auto provider = MakeSuggestionsProviderWithoutInitialization( /*use_mock_suggestions_fetcher=*/false); MockFunction<void(Status, const std::vector<ContentSuggestion>&)> loaded; - EXPECT_CALL(loaded, Call(HasCode(StatusCode::TEMPORARY_ERROR), IsEmpty())); + EXPECT_CALL(loaded, Call(Field(&Status::code, StatusCode::TEMPORARY_ERROR), + IsEmpty())); provider->Fetch(articles_category(), std::set<std::string>(), base::Bind(&SuggestionsLoaded, &loaded)); base::RunLoop().RunUntilIdle(); @@ -1324,7 +1322,8 @@ auto provider = MakeSuggestionsProvider(); MockFunction<void(Status, const std::vector<ContentSuggestion>&)> loaded; - EXPECT_CALL(loaded, Call(HasCode(StatusCode::TEMPORARY_ERROR), IsEmpty())); + EXPECT_CALL(loaded, Call(Field(&Status::code, StatusCode::TEMPORARY_ERROR), + IsEmpty())); LoadMoreFromJSONString(provider.get(), articles_category(), "invalid json string}]}", /*known_ids=*/std::set<std::string>(), @@ -1338,7 +1337,8 @@ auto provider = MakeSuggestionsProvider(); MockFunction<void(Status, const std::vector<ContentSuggestion>&)> loaded; - EXPECT_CALL(loaded, Call(HasCode(StatusCode::TEMPORARY_ERROR), IsEmpty())); + EXPECT_CALL(loaded, Call(Field(&Status::code, StatusCode::TEMPORARY_ERROR), + IsEmpty())); LoadMoreFromJSONString(provider.get(), articles_category(), GetTestJson({GetIncompleteSuggestion()}), /*known_ids=*/std::set<std::string>(), @@ -1353,7 +1353,8 @@ auto provider = MakeSuggestionsProvider(/*set_empty_response=*/false); MockFunction<void(Status, const std::vector<ContentSuggestion>&)> loaded; - EXPECT_CALL(loaded, Call(HasCode(StatusCode::TEMPORARY_ERROR), IsEmpty())); + EXPECT_CALL(loaded, Call(Field(&Status::code, StatusCode::TEMPORARY_ERROR), + IsEmpty())); provider->Fetch(articles_category(), /*known_ids=*/std::set<std::string>(), base::Bind(&SuggestionsLoaded, &loaded)); @@ -1365,7 +1366,8 @@ SetUpHttpError(); MockFunction<void(Status, const std::vector<ContentSuggestion>&)> loaded; - EXPECT_CALL(loaded, Call(HasCode(StatusCode::TEMPORARY_ERROR), IsEmpty())); + EXPECT_CALL(loaded, Call(Field(&Status::code, StatusCode::TEMPORARY_ERROR), + IsEmpty())); provider->Fetch(articles_category(), /*known_ids=*/std::set<std::string>(), base::Bind(&SuggestionsLoaded, &loaded));
diff --git a/components/policy/resources/policy_templates.json b/components/policy/resources/policy_templates.json index 099f01f..fce37fe 100644 --- a/components/policy/resources/policy_templates.json +++ b/components/policy/resources/policy_templates.json
@@ -143,7 +143,7 @@ # persistent IDs for all fields (but not for groups!) are needed. These are # specified by the 'id' keys of each policy. NEVER CHANGE EXISTING IDs, # because doing so would break the deployed wire format! -# For your editing convenience: highest ID currently used: 371 +# For your editing convenience: highest ID currently used: 372 # And don't forget to also update the EnterprisePolicies enum of # histograms.xml (run 'python tools/metrics/histograms/update_policies.py'). # @@ -9626,6 +9626,47 @@ 'tags': [], 'desc': '''Setting this policy to false stops <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> from occasionally sending queries to a Google server to retrieve an accurate timestamp. These queries will be enabled if this policy is set to True or is not set.''', }, + { + 'name': 'DeviceSecondFactorAuthentication', + 'type': 'int-enum', + 'schema': { + 'type': 'integer', + 'enum': [ 0, 1, 2 ], + }, + 'items': [ + { + 'name': 'Disabled', + 'value': 0, + 'caption': '''Second factor disabled''', + }, + { + 'name': 'U2F', + 'value': 1, + 'caption': '''U2F (Universal Second Factor)''', + }, + { + 'name': 'U2F_EXTENDED', + 'value': 2, + 'caption': '''U2F plus extensions for individual attestation''', + }, + ], + 'supported_on': ['chrome_os:61-'], + 'device_only': True, + 'features': { + 'dynamic_refresh': False, + }, + 'example_value': 1, + 'id': 372, + 'caption': '''Integrated second factor authentication mode''', + 'tags': ['system-security'], + 'desc': '''Specifies how the on-board secure element hardware can be used to provide a second-factor authentication if it is compatible with this feature. The machine power button is used to detect the user physical presence. + + If 'Disabled' is selected or the policy is left unset, no second factor is provided. + + If 'U2F' is selected, the integrated second factor will behave according the FIDO U2F specification. + + If 'U2F_EXTENDED' is selected, the integrated second factor will provide the U2F functions plus some extensions for individual attestation.''', + }, ], 'messages': { # Messages that are not associated to any policies.
diff --git a/components/signin/core/browser/chrome_connected_header_helper.cc b/components/signin/core/browser/chrome_connected_header_helper.cc index b87bb5e..12486b6 100644 --- a/components/signin/core/browser/chrome_connected_header_helper.cc +++ b/components/signin/core/browser/chrome_connected_header_helper.cc
@@ -56,9 +56,10 @@ const content_settings::CookieSettings* cookie_settings, int profile_mode_mask) { ChromeConnectedHeaderHelper chrome_connected_helper; - return chrome_connected_helper.BuildRequestHeaderIfPossible( - false /* is_header_request */, url, account_id, cookie_settings, - profile_mode_mask); + if (!chrome_connected_helper.ShouldBuildRequestHeader(url, cookie_settings)) + return ""; + return chrome_connected_helper.BuildRequestHeader( + false /* is_header_request */, url, account_id, profile_mode_mask); } // static
diff --git a/components/signin/core/browser/chrome_connected_header_helper.h b/components/signin/core/browser/chrome_connected_header_helper.h index 634c24d7..72ea404 100644 --- a/components/signin/core/browser/chrome_connected_header_helper.h +++ b/components/signin/core/browser/chrome_connected_header_helper.h
@@ -32,6 +32,13 @@ static ManageAccountsParams BuildManageAccountsParams( const std::string& header_value); + // Returns the value for the Chrome-Connected request header. May return the + // empty string, in this case the header must not be added. + std::string BuildRequestHeader(bool is_header_request, + const GURL& url, + const std::string& account_id, + int profile_mode_mask); + private: // Returns whether the URL is eligible for the Gaia ID parameter. bool IsUrlEligibleToIncludeGaiaId(const GURL& url, bool is_header_request); @@ -41,10 +48,6 @@ // SigninHeaderHelper implementation: bool IsUrlEligibleForRequestHeader(const GURL& url) override; - std::string BuildRequestHeader(bool is_header_request, - const GURL& url, - const std::string& account_id, - int profile_mode_mask) override; }; } // namespace signin
diff --git a/components/signin/core/browser/dice_header_helper.cc b/components/signin/core/browser/dice_header_helper.cc index c3550cc7..fdfe035 100644 --- a/components/signin/core/browser/dice_header_helper.cc +++ b/components/signin/core/browser/dice_header_helper.cc
@@ -4,7 +4,10 @@ #include "components/signin/core/browser/dice_header_helper.h" +#include <vector> + #include "base/strings/string_number_conversions.h" +#include "base/strings/string_util.h" #include "components/signin/core/common/profile_management_switches.h" #include "google_apis/gaia/gaia_auth_util.h" #include "google_apis/gaia/gaia_urls.h" @@ -84,11 +87,14 @@ return gaia::IsGaiaSignonRealm(url.GetOrigin()); } -std::string DiceHeaderHelper::BuildRequestHeader(bool is_header_request, - const GURL& url, - const std::string& account_id, - int profile_mode_mask) { - return "client_id=" + GaiaUrls::GetInstance()->oauth2_chrome_client_id(); +std::string DiceHeaderHelper::BuildRequestHeader(const std::string& account_id, + bool sync_enabled) { + std::vector<std::string> parts; + parts.push_back("client_id=" + + GaiaUrls::GetInstance()->oauth2_chrome_client_id()); + if (sync_enabled) + parts.push_back("sync_account_id=" + account_id); + return base::JoinString(parts, ","); } } // namespace signin
diff --git a/components/signin/core/browser/dice_header_helper.h b/components/signin/core/browser/dice_header_helper.h index a3a2e98..2afdbdf 100644 --- a/components/signin/core/browser/dice_header_helper.h +++ b/components/signin/core/browser/dice_header_helper.h
@@ -24,13 +24,14 @@ static DiceResponseParams BuildDiceResponseParams( const std::string& header_value); + // Returns the header value for Dice requests. Returns the empty string when + // the header must not be added. + std::string BuildRequestHeader(const std::string& account_id, + bool sync_enabled); + private: // SigninHeaderHelper implementation: bool IsUrlEligibleForRequestHeader(const GURL& url) override; - std::string BuildRequestHeader(bool is_header_request, - const GURL& url, - const std::string& account_id, - int profile_mode_mask) override; }; } // namespace signin
diff --git a/components/signin/core/browser/signin_header_helper.cc b/components/signin/core/browser/signin_header_helper.cc index adaa6dc..cd2c779 100644 --- a/components/signin/core/browser/signin_header_helper.cc +++ b/components/signin/core/browser/signin_header_helper.cc
@@ -69,16 +69,9 @@ bool SigninHeaderHelper::AppendOrRemoveRequestHeader( net::URLRequest* request, - const char* header_name, const GURL& redirect_url, - const std::string& account_id, - const content_settings::CookieSettings* cookie_settings, - int profile_mode_mask) { - const GURL& url = redirect_url.is_empty() ? request->url() : redirect_url; - std::string header_value = BuildRequestHeaderIfPossible( - true /* is_header_request */, url, account_id, cookie_settings, - profile_mode_mask); - + const char* header_name, + const std::string& header_value) { if (header_value.empty()) { // If the request is being redirected, and it has the account consistency // header, and current url is a Google URL, and the redirected one is not, @@ -116,42 +109,49 @@ return dictionary; } -std::string SigninHeaderHelper::BuildRequestHeaderIfPossible( - bool is_header_request, +bool SigninHeaderHelper::ShouldBuildRequestHeader( const GURL& url, - const std::string& account_id, - const content_settings::CookieSettings* cookie_settings, - int profile_mode_mask) { + const content_settings::CookieSettings* cookie_settings) { // If signin cookies are not allowed, don't add the header. if (!SettingsAllowSigninCookies(cookie_settings)) - return std::string(); + return false; // Check if url is eligible for the header. if (!IsUrlEligibleForRequestHeader(url)) - return std::string(); + return false; - return BuildRequestHeader(is_header_request, url, account_id, - profile_mode_mask); + return true; } void AppendOrRemoveAccountConsistentyRequestHeader( net::URLRequest* request, const GURL& redirect_url, const std::string& account_id, + bool sync_enabled, const content_settings::CookieSettings* cookie_settings, int profile_mode_mask) { + const GURL& url = redirect_url.is_empty() ? request->url() : redirect_url; // Dice is not enabled on mobile. #if !defined(OS_IOS) && !defined(OS_ANDROID) DiceHeaderHelper dice_helper; - dice_helper.AppendOrRemoveRequestHeader(request, kDiceRequestHeader, - redirect_url, account_id, - cookie_settings, profile_mode_mask); + std::string dice_header_value; + if (dice_helper.ShouldBuildRequestHeader(url, cookie_settings)) { + dice_header_value = + dice_helper.BuildRequestHeader(account_id, sync_enabled); + } + dice_helper.AppendOrRemoveRequestHeader( + request, redirect_url, kDiceRequestHeader, dice_header_value); #endif ChromeConnectedHeaderHelper chrome_connected_helper; + std::string chrome_connected_header_value; + if (chrome_connected_helper.ShouldBuildRequestHeader(url, cookie_settings)) { + chrome_connected_header_value = chrome_connected_helper.BuildRequestHeader( + true /* is_header_request */, url, account_id, profile_mode_mask); + } chrome_connected_helper.AppendOrRemoveRequestHeader( - request, kChromeConnectedHeader, redirect_url, account_id, - cookie_settings, profile_mode_mask); + request, redirect_url, kChromeConnectedHeader, + chrome_connected_header_value); } ManageAccountsParams BuildManageAccountsParams(
diff --git a/components/signin/core/browser/signin_header_helper.h b/components/signin/core/browser/signin_header_helper.h index 1f06afc..7975dad 100644 --- a/components/signin/core/browser/signin_header_helper.h +++ b/components/signin/core/browser/signin_header_helper.h
@@ -108,13 +108,16 @@ class SigninHeaderHelper { public: // Appends or remove the header to a network request if necessary. - bool AppendOrRemoveRequestHeader( - net::URLRequest* request, - const char* header_name, - const GURL& redirect_url, - const std::string& account_id, - const content_settings::CookieSettings* cookie_settings, - int profile_mode_mask); + bool AppendOrRemoveRequestHeader(net::URLRequest* request, + const GURL& redirect_url, + const char* header_name, + const std::string& header_value); + + // Returns wether an account consistency header should be built for this + // request. + bool ShouldBuildRequestHeader( + const GURL& url, + const content_settings::CookieSettings* cookie_settings); protected: SigninHeaderHelper() {} @@ -128,27 +131,9 @@ static ResponseHeaderDictionary ParseAccountConsistencyResponseHeader( const std::string& header_value); - // Returns the value of the request header, or empty if the header should not - // be added. Calls into BuildRequestHeader() which is customized by - // subclasses. - std::string BuildRequestHeaderIfPossible( - bool is_header_request, - const GURL& url, - const std::string& account_id, - const content_settings::CookieSettings* cookie_settings, - int profile_mode_mask); - private: // Returns whether the url is eligible for the request header. virtual bool IsUrlEligibleForRequestHeader(const GURL& url) = 0; - - // Returns the value of the request header, or empty if the header should not - // be added. - // The request is assumed to be eligible. - virtual std::string BuildRequestHeader(bool is_header_request, - const GURL& url, - const std::string& account_id, - int profile_mode_mask) = 0; }; // Returns true if signin cookies are allowed. @@ -170,6 +155,7 @@ net::URLRequest* request, const GURL& redirect_url, const std::string& account_id, + bool sync_enabled, const content_settings::CookieSettings* cookie_settings, int profile_mode_mask);
diff --git a/components/signin/core/browser/signin_header_helper_unittest.cc b/components/signin/core/browser/signin_header_helper_unittest.cc index f97d520..ed9f17b 100644 --- a/components/signin/core/browser/signin_header_helper_unittest.cc +++ b/components/signin/core/browser/signin_header_helper_unittest.cc
@@ -51,15 +51,15 @@ expected_request); } - std::unique_ptr<net::URLRequest> CreateRequest( - const GURL& url, - const std::string& account_id) { + std::unique_ptr<net::URLRequest> CreateRequest(const GURL& url, + const std::string& account_id, + bool sync_enabled) { std::unique_ptr<net::URLRequest> url_request = url_request_context_.CreateRequest(url, net::DEFAULT_PRIORITY, nullptr, TRAFFIC_ANNOTATION_FOR_TESTS); AppendOrRemoveAccountConsistentyRequestHeader( - url_request.get(), GURL(), account_id, cookie_settings_.get(), - PROFILE_MODE_DEFAULT); + url_request.get(), GURL(), account_id, sync_enabled, + cookie_settings_.get(), PROFILE_MODE_DEFAULT); return url_request; } @@ -81,7 +81,7 @@ const std::string& account_id, const std::string& expected_request) { std::unique_ptr<net::URLRequest> url_request = - CreateRequest(url, account_id); + CreateRequest(url, account_id, false /* sync_enabled */); CheckAccountConsistencyHeaderRequest( url_request.get(), kChromeConnectedHeader, expected_request); } @@ -89,10 +89,11 @@ #if !defined(OS_IOS) && !defined(OS_ANDROID) void CheckDiceHeaderRequest(const GURL& url, const std::string& account_id, + bool sync_enabled, const std::string& expected_mirror_request, const std::string& expected_dice_request) { std::unique_ptr<net::URLRequest> url_request = - CreateRequest(url, account_id); + CreateRequest(url, account_id, sync_enabled); CheckAccountConsistencyHeaderRequest( url_request.get(), kChromeConnectedHeader, expected_mirror_request); CheckAccountConsistencyHeaderRequest(url_request.get(), kDiceRequestHeader, @@ -180,18 +181,27 @@ base::CommandLine::ForCurrentProcess()); // ChromeConnected but no Dice for Docs URLs. CheckDiceHeaderRequest( - GURL("https://docs.google.com"), "0123456789", + GURL("https://docs.google.com"), "0123456789", false /* sync_enabled */, "id=0123456789,mode=0,enable_account_consistency=false", ""); // ChromeConnected and Dice for Gaia URLs. + // Sync disabled. std::string client_id = GaiaUrls::GetInstance()->oauth2_chrome_client_id(); ASSERT_FALSE(client_id.empty()); CheckDiceHeaderRequest(GURL("https://accounts.google.com"), "0123456789", + false /* sync_enabled */, "mode=0,enable_account_consistency=false", "client_id=" + client_id); + // Sync enabled: check that the Dice header has the Sync account ID and that + // the mirror header is not modified. + CheckDiceHeaderRequest( + GURL("https://accounts.google.com"), "0123456789", + true /* sync_enabled */, "mode=0,enable_account_consistency=false", + "client_id=" + client_id + ",sync_account_id=0123456789"); // No ChromeConnected and no Dice for other URLs. - CheckDiceHeaderRequest(GURL("https://www.google.com"), "0123456789", "", ""); + CheckDiceHeaderRequest(GURL("https://www.google.com"), "0123456789", + false /* sync_enabled */, "", ""); } // Tests that no Dice request is returned when Dice is not enabled. @@ -199,6 +209,7 @@ switches::EnableAccountConsistencyMirrorForTesting( base::CommandLine::ForCurrentProcess()); CheckDiceHeaderRequest(GURL("https://accounts.google.com"), "0123456789", + false /* sync_enabled */, "mode=0,enable_account_consistency=true", ""); } @@ -290,8 +301,8 @@ url_request_context_.CreateRequest(url, net::DEFAULT_PRIORITY, nullptr, TRAFFIC_ANNOTATION_FOR_TESTS); AppendOrRemoveAccountConsistentyRequestHeader( - url_request.get(), redirect_url, account_id, cookie_settings_.get(), - PROFILE_MODE_DEFAULT); + url_request.get(), redirect_url, account_id, false /* sync_enabled */, + cookie_settings_.get(), PROFILE_MODE_DEFAULT); EXPECT_TRUE( url_request->extra_request_headers().HasHeader(kChromeConnectedHeader)); } @@ -308,8 +319,8 @@ url_request_context_.CreateRequest(url, net::DEFAULT_PRIORITY, nullptr, TRAFFIC_ANNOTATION_FOR_TESTS); AppendOrRemoveAccountConsistentyRequestHeader( - url_request.get(), redirect_url, account_id, cookie_settings_.get(), - PROFILE_MODE_DEFAULT); + url_request.get(), redirect_url, account_id, false /* sync_enabled */, + cookie_settings_.get(), PROFILE_MODE_DEFAULT); EXPECT_FALSE( url_request->extra_request_headers().HasHeader(kChromeConnectedHeader)); } @@ -329,8 +340,8 @@ url_request->SetExtraRequestHeaderByName(kChromeConnectedHeader, fake_header, false); AppendOrRemoveAccountConsistentyRequestHeader( - url_request.get(), redirect_url, account_id, cookie_settings_.get(), - PROFILE_MODE_DEFAULT); + url_request.get(), redirect_url, account_id, false /* sync_enabled */, + cookie_settings_.get(), PROFILE_MODE_DEFAULT); std::string header; EXPECT_TRUE(url_request->extra_request_headers().GetHeader( kChromeConnectedHeader, &header));
diff --git a/components/visitedlink/test/visitedlink_unittest.cc b/components/visitedlink/test/visitedlink_unittest.cc index 6ba57eed..488d22d 100644 --- a/components/visitedlink/test/visitedlink_unittest.cc +++ b/components/visitedlink/test/visitedlink_unittest.cc
@@ -625,8 +625,7 @@ public: VisitedLinkRenderProcessHostFactory() : context_(new VisitCountingContext) {} content::RenderProcessHost* CreateRenderProcessHost( - content::BrowserContext* browser_context, - content::SiteInstance* site_instance) const override { + content::BrowserContext* browser_context) const override { return new VisitRelayingRenderProcessHost(browser_context, context_.get()); }
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc index 51cd76d4..3f18fa9 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -3128,7 +3128,7 @@ if (g_render_process_host_factory_) { render_process_host = g_render_process_host_factory_->CreateRenderProcessHost( - browser_context, site_instance); + browser_context); } else { StoragePartitionImpl* partition = static_cast<StoragePartitionImpl*>( BrowserContext::GetStoragePartition(browser_context, site_instance));
diff --git a/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm b/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm index d77f146..3c513e0 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm
@@ -140,7 +140,7 @@ TestBrowserContext browser_context; MockRenderProcessHostFactory process_host_factory; RenderProcessHost* process_host = - process_host_factory.CreateRenderProcessHost(&browser_context, nullptr); + process_host_factory.CreateRenderProcessHost(&browser_context); // Populates |g_supported_scale_factors|. std::vector<ui::ScaleFactor> supported_factors;
diff --git a/content/browser/renderer_host/text_input_client_mac_unittest.mm b/content/browser/renderer_host/text_input_client_mac_unittest.mm index 8b9fb97..c74fc6db 100644 --- a/content/browser/renderer_host/text_input_client_mac_unittest.mm +++ b/content/browser/renderer_host/text_input_client_mac_unittest.mm
@@ -53,7 +53,7 @@ delegate_(), thread_("TextInputClientMacTestThread") { RenderProcessHost* rph = - process_factory_.CreateRenderProcessHost(&browser_context_, nullptr); + process_factory_.CreateRenderProcessHost(&browser_context_); int32_t routing_id = rph->GetNextRoutingID(); widget_.reset(new RenderWidgetHostImpl(&delegate_, rph, routing_id, false)); }
diff --git a/content/browser/webrtc/webrtc_eventlog_host_unittest.cc b/content/browser/webrtc/webrtc_eventlog_host_unittest.cc index 1b5b8bc..8fa3322 100644 --- a/content/browser/webrtc/webrtc_eventlog_host_unittest.cc +++ b/content/browser/webrtc/webrtc_eventlog_host_unittest.cc
@@ -44,8 +44,7 @@ WebRtcEventlogHostTest() : mock_render_process_host_(static_cast<MockRenderProcessHost*>( mock_render_process_factory_.CreateRenderProcessHost( - &test_browser_context_, - nullptr))), + &test_browser_context_))), render_id_(mock_render_process_host_->GetID()), event_log_host_(render_id_) {} TestBrowserThreadBundle thread_bundle_;
diff --git a/content/public/browser/render_process_host_factory.h b/content/public/browser/render_process_host_factory.h index 7705418..78ff77e 100644 --- a/content/public/browser/render_process_host_factory.h +++ b/content/public/browser/render_process_host_factory.h
@@ -10,7 +10,6 @@ namespace content { class BrowserContext; class RenderProcessHost; -class SiteInstance; // Factory object for RenderProcessHosts. Using this factory allows tests to // swap out a different one to use a TestRenderProcessHost. @@ -18,8 +17,7 @@ public: virtual ~RenderProcessHostFactory() {} virtual RenderProcessHost* CreateRenderProcessHost( - BrowserContext* browser_context, - SiteInstance* site_instance) const = 0; + BrowserContext* browser_context) const = 0; }; } // namespace content
diff --git a/content/public/test/mock_render_process_host.cc b/content/public/test/mock_render_process_host.cc index 4198037..4289b05 100644 --- a/content/public/test/mock_render_process_host.cc +++ b/content/public/test/mock_render_process_host.cc
@@ -423,8 +423,7 @@ } RenderProcessHost* MockRenderProcessHostFactory::CreateRenderProcessHost( - BrowserContext* browser_context, - SiteInstance* site_instance) const { + BrowserContext* browser_context) const { processes_.push_back( base::MakeUnique<MockRenderProcessHost>(browser_context)); processes_.back()->SetFactory(this);
diff --git a/content/public/test/mock_render_process_host.h b/content/public/test/mock_render_process_host.h index 5c1cb5c..2662ca2 100644 --- a/content/public/test/mock_render_process_host.h +++ b/content/public/test/mock_render_process_host.h
@@ -190,8 +190,7 @@ ~MockRenderProcessHostFactory() override; RenderProcessHost* CreateRenderProcessHost( - BrowserContext* browser_context, - SiteInstance* site_instance) const override; + BrowserContext* browser_context) const override; // Removes the given MockRenderProcessHost from the MockRenderProcessHost list // without deleting it. When a test deletes a MockRenderProcessHost, we need
diff --git a/ios/chrome/browser/ui/toolbar/BUILD.gn b/ios/chrome/browser/ui/toolbar/BUILD.gn index 80362de..cf7a0b0 100644 --- a/ios/chrome/browser/ui/toolbar/BUILD.gn +++ b/ios/chrome/browser/ui/toolbar/BUILD.gn
@@ -19,9 +19,12 @@ "resources/incognito_marker_typing.png", "resources/incognito_marker_typing@2x.png", "resources/incognito_marker_typing@3x.png", - "resources/qr_scanner_keyboard_accessory.png", - "resources/qr_scanner_keyboard_accessory@2x.png", - "resources/qr_scanner_keyboard_accessory@3x.png", + "resources/keyboard_accessory_qr_scanner.png", + "resources/keyboard_accessory_qr_scanner@2x.png", + "resources/keyboard_accessory_qr_scanner@3x.png", + "resources/keyboard_accessory_voice_search.png", + "resources/keyboard_accessory_voice_search@2x.png", + "resources/keyboard_accessory_voice_search@3x.png", "resources/toolbar_dark_newtab.png", "resources/toolbar_dark_newtab@2x.png", "resources/toolbar_dark_newtab@3x.png",
diff --git a/ios/chrome/browser/ui/toolbar/new_keyboard_accessory_view.h b/ios/chrome/browser/ui/toolbar/new_keyboard_accessory_view.h index 136bda0..1d609f3 100644 --- a/ios/chrome/browser/ui/toolbar/new_keyboard_accessory_view.h +++ b/ios/chrome/browser/ui/toolbar/new_keyboard_accessory_view.h
@@ -12,6 +12,8 @@ // Accessory View above the keyboard. // Shows keys that are shortcuts to commonly used characters or strings, // and buttons to start Voice Search or a Camera Search. +// Must only be used on iPhones as iPads have a different pattern regarding +// keyboard shortcuts. @interface NewKeyboardAccessoryView : UIInputView<KeyboardAccessoryViewProtocol, UIInputViewAudioFeedback>
diff --git a/ios/chrome/browser/ui/toolbar/new_keyboard_accessory_view.mm b/ios/chrome/browser/ui/toolbar/new_keyboard_accessory_view.mm index 18df6b4..79da47e 100644 --- a/ios/chrome/browser/ui/toolbar/new_keyboard_accessory_view.mm +++ b/ios/chrome/browser/ui/toolbar/new_keyboard_accessory_view.mm
@@ -21,6 +21,7 @@ @interface NewKeyboardAccessoryView () +@property(nonatomic, retain) NSArray<NSString*>* buttonTitles; @property(nonatomic, weak) id<KeyboardAccessoryViewDelegate> delegate; // Called when a keyboard shortcut button is pressed. @@ -37,136 +38,123 @@ // Unused by this implementation of |KeyboardAccessoryViewProtocol|. @synthesize mode = _mode; +@synthesize buttonTitles = _buttonTitles; @synthesize delegate = _delegate; - (instancetype)initWithButtons:(NSArray<NSString*>*)buttonTitles delegate:(id<KeyboardAccessoryViewDelegate>)delegate { - const CGFloat kButtonMinSizeX = 61.0; - const CGFloat kButtonMinSizeXCompact = 32.0; - const CGFloat kButtonSizeY = 62.0; - const CGFloat kButtonSizeYCompact = 30.0; - const CGFloat kBetweenButtonSpacing = 15.0; - const CGFloat kBetweenButtonSpacingCompact = 6.0; - const CGFloat kSeparatorAlpha = 0.1; - const CGFloat kViewHeight = 70.0; - const CGFloat kViewHeightCompact = 43.0; - const BOOL isCompact = IsCompact(); + DCHECK(!IsIPadIdiom()); + const CGFloat kViewHeight = 44.0; CGFloat width = [[UIScreen mainScreen] bounds].size.width; - CGFloat height = isCompact ? kViewHeightCompact : kViewHeight; - CGRect frame = CGRectMake(0.0, 0.0, width, height); + // TODO(734512): Have the creator of the view define the size. + CGRect frame = CGRectMake(0.0, 0.0, width, kViewHeight); self = [super initWithFrame:frame inputViewStyle:UIInputViewStyleKeyboard]; if (self) { + _buttonTitles = buttonTitles; _delegate = delegate; - // Create and add stackview filled with the shortcut buttons. - UIStackView* stackView = [[UIStackView alloc] init]; - [stackView setTranslatesAutoresizingMaskIntoConstraints:NO]; - stackView.spacing = - isCompact ? kBetweenButtonSpacingCompact : kBetweenButtonSpacing; - for (NSString* title in buttonTitles) { - UIView* button = [self shortcutButtonWithTitle:title]; - [button setTranslatesAutoresizingMaskIntoConstraints:NO]; - CGFloat buttonMinWidth = - isCompact ? kButtonMinSizeXCompact : kButtonMinSizeX; - [button.widthAnchor constraintGreaterThanOrEqualToConstant:buttonMinWidth] - .active = YES; - CGFloat buttonHeight = isCompact ? kButtonSizeYCompact : kButtonSizeY; - [button.heightAnchor constraintEqualToConstant:buttonHeight].active = YES; - [stackView addArrangedSubview:button]; - } - [self addSubview:stackView]; - - // Create and add buttons for voice and camera search. - UIButton* cameraButton = [self iconButton:@"qr_scanner_keyboard_accessory"]; - [cameraButton - addTarget:_delegate - action:@selector(keyboardAccessoryCameraSearchTouchUpInside) - forControlEvents:UIControlEventTouchUpInside]; - [self addSubview:cameraButton]; - - UIButton* voiceSearchButton = - [self iconButton:@"voice_icon_keyboard_accessory"]; - [self addSubview:voiceSearchButton]; - [voiceSearchButton - addTarget:_delegate - action:@selector(keyboardAccessoryVoiceSearchTouchDown) - forControlEvents:UIControlEventTouchDown]; - [voiceSearchButton - addTarget:_delegate - action:@selector(keyboardAccessoryVoiceSearchTouchUpInside) - forControlEvents:UIControlEventTouchUpInside]; - - // Create and add 1 pixel high separator view. - UIView* separator = [[UIView alloc] init]; - [separator setTranslatesAutoresizingMaskIntoConstraints:NO]; - [separator - setBackgroundColor:[UIColor colorWithWhite:0 alpha:kSeparatorAlpha]]; - [separator.heightAnchor - constraintEqualToConstant:1.0 / [[UIScreen mainScreen] scale]] - .active = YES; - [self addSubview:separator]; - - // Position all the views. - NSDictionary* viewsDictionary = @{ - @"cameraButton" : cameraButton, - @"voiceSearch" : voiceSearchButton, - @"stackView" : stackView, - @"separator" : separator, - }; - NSArray* constraints = @[ - @"H:|-8-[cameraButton]-8-[voiceSearch]-(>=16)-[stackView]", - @"H:|-0-[separator]-0-|", - @"V:[separator]-0-|", - ]; - ApplyVisualConstraintsWithOptions(constraints, viewsDictionary, - LayoutOptionForRTLSupport(), self); - AddSameCenterYConstraint(self, cameraButton); - AddSameCenterYConstraint(self, voiceSearchButton); - AddSameCenterYConstraint(self, stackView); - // The following constraint is supposed to break if there's not enough - // space to center the stack view. - NSLayoutConstraint* horizontallyCenterStackViewConstraint = - [self.centerXAnchor constraintEqualToAnchor:stackView.centerXAnchor]; - horizontallyCenterStackViewConstraint.priority = - UILayoutPriorityDefaultHigh; - horizontallyCenterStackViewConstraint.active = YES; } return self; } +- (void)willMoveToSuperview:(UIView*)newSuperview { + if (!self.subviews.count) + return; + + const CGFloat kButtonMinWidth = 36.0; + const CGFloat kButtonHeight = 34.0; + const CGFloat kBetweenShortcutButtonSpacing = 5.0; + const CGFloat kBetweenSearchButtonSpacing = 12.0; + const CGFloat kMarginFromBottom = 2.0; + const CGFloat kHorizontalMargin = 12.0; + + // Create and add stackview filled with the shortcut buttons. + UIStackView* shortcutStackView = [[UIStackView alloc] init]; + shortcutStackView.translatesAutoresizingMaskIntoConstraints = NO; + shortcutStackView.spacing = kBetweenShortcutButtonSpacing; + for (NSString* title in self.buttonTitles) { + UIView* button = [self shortcutButtonWithTitle:title]; + [button setTranslatesAutoresizingMaskIntoConstraints:NO]; + [button.widthAnchor constraintGreaterThanOrEqualToConstant:kButtonMinWidth] + .active = YES; + [button.heightAnchor constraintEqualToConstant:kButtonHeight].active = YES; + [shortcutStackView addArrangedSubview:button]; + } + [self addSubview:shortcutStackView]; + + // Create buttons for voice search and camera search. + UIButton* voiceSearchButton = + [self iconButton:@"keyboard_accessory_voice_search"]; + [voiceSearchButton addTarget:_delegate + action:@selector(keyboardAccessoryVoiceSearchTouchDown) + forControlEvents:UIControlEventTouchDown]; + [voiceSearchButton + addTarget:_delegate + action:@selector(keyboardAccessoryVoiceSearchTouchUpInside) + forControlEvents:UIControlEventTouchUpInside]; + UIButton* cameraButton = [self iconButton:@"keyboard_accessory_qr_scanner"]; + [cameraButton addTarget:_delegate + action:@selector(keyboardAccessoryCameraSearchTouchUpInside) + forControlEvents:UIControlEventTouchUpInside]; + + // Create a stackview containing containing the buttons for voice search + // and camera search. + UIStackView* searchStackView = [[UIStackView alloc] init]; + searchStackView.translatesAutoresizingMaskIntoConstraints = NO; + searchStackView.spacing = kBetweenSearchButtonSpacing; + [searchStackView addArrangedSubview:voiceSearchButton]; + [searchStackView addArrangedSubview:cameraButton]; + [self addSubview:searchStackView]; + + // Position the stack views. + NSArray* constraints = @[ + @"H:|-horizontalMargin-[searchStackView]-(>=0)-[shortcutStackView]", + @"[shortcutStackView]-horizontalMargin-|", + @"V:[searchStackView]-bottomMargin-|", + @"V:[shortcutStackView]-bottomMargin-|" + ]; + NSDictionary* viewsDictionary = @{ + @"searchStackView" : searchStackView, + @"shortcutStackView" : shortcutStackView, + }; + NSDictionary* metrics = @{ + @"bottomMargin" : @(kMarginFromBottom), + @"horizontalMargin" : @(kHorizontalMargin) + }; + ApplyVisualConstraintsWithMetrics(constraints, viewsDictionary, metrics); +} + - (UIView*)shortcutButtonWithTitle:(NSString*)title { - const CGFloat kCornerRadius = 4.0; - const CGFloat kAlphaStateNormal = 0.1; - const CGFloat kAlphaStateHighlighted = 0.2; + const CGFloat kCornerRadius = 5.0; + const CGFloat kAlphaStateNormal = 0.3; + const CGFloat kAlphaStateHighlighted = 0.6; const CGFloat kHorizontalEdgeInset = 8; - const CGFloat kIpadButtonTitleFontSize = 20.0; - const CGFloat kIphoneButtonTitleFontSize = 15.0; + const CGFloat kButtonTitleFontSize = 20.0; + const UIColor* kButtonBackgroundColor = + [UIColor colorWithRed:0.507 green:0.534 blue:0.57 alpha:1.0]; ColoredButton* button = [ColoredButton buttonWithType:UIButtonTypeCustom]; - UIFont* font = nil; + + UIColor* stateNormalBackgroundColor = + [kButtonBackgroundColor colorWithAlphaComponent:kAlphaStateNormal]; + UIColor* stateHighlightedBackgroundColor = + [kButtonBackgroundColor colorWithAlphaComponent:kAlphaStateHighlighted]; + + [button setBackgroundColor:stateNormalBackgroundColor + forState:UIControlStateNormal]; + [button setBackgroundColor:stateHighlightedBackgroundColor + forState:UIControlStateHighlighted]; [button setTitle:title forState:UIControlStateNormal]; [button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; - - [button setBackgroundColor:UIColorFromRGB(0, kAlphaStateNormal) - forState:UIControlStateNormal]; - [button setBackgroundColor:UIColorFromRGB(0, kAlphaStateHighlighted) - forState:UIControlStateHighlighted]; - button.layer.cornerRadius = kCornerRadius; button.contentEdgeInsets = UIEdgeInsetsMake(0, kHorizontalEdgeInset, 0, kHorizontalEdgeInset); button.clipsToBounds = YES; - - if (IsIPadIdiom()) { - font = [UIFont systemFontOfSize:kIpadButtonTitleFontSize]; - } else { - font = [UIFont boldSystemFontOfSize:kIphoneButtonTitleFontSize]; - } - - [button.titleLabel setFont:font]; + [button.titleLabel setFont:[UIFont systemFontOfSize:kButtonTitleFontSize + weight:UIFontWeightMedium]]; [button addTarget:self action:@selector(keyboardButtonPressed:) @@ -177,21 +165,9 @@ } - (UIButton*)iconButton:(NSString*)iconName { - const CGFloat kIconTintAlphaStateNormal = 0.45; - const CGFloat kIconTintAlphaStateHighlighted = 0.6; - - UIColor* iconTintStateNormal = UIColorFromRGB(0, kIconTintAlphaStateNormal); - UIColor* iconTintStateHighlighted = - UIColorFromRGB(0, kIconTintAlphaStateHighlighted); - - ColoredButton* button = [ColoredButton buttonWithType:UIButtonTypeCustom]; - - [button setTintColor:iconTintStateNormal forState:UIControlStateNormal]; - [button setTintColor:iconTintStateHighlighted - forState:UIControlStateHighlighted]; + UIButton* button = [UIButton buttonWithType:UIButtonTypeCustom]; [button setTranslatesAutoresizingMaskIntoConstraints:NO]; - UIImage* icon = [[UIImage imageNamed:iconName] - imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; + UIImage* icon = [UIImage imageNamed:iconName]; [button setImage:icon forState:UIControlStateNormal]; return button; }
diff --git a/ios/chrome/browser/ui/toolbar/resources/keyboard_accessory_qr_scanner.png b/ios/chrome/browser/ui/toolbar/resources/keyboard_accessory_qr_scanner.png new file mode 100644 index 0000000..aefaff8 --- /dev/null +++ b/ios/chrome/browser/ui/toolbar/resources/keyboard_accessory_qr_scanner.png Binary files differ
diff --git a/ios/chrome/browser/ui/toolbar/resources/keyboard_accessory_qr_scanner@2x.png b/ios/chrome/browser/ui/toolbar/resources/keyboard_accessory_qr_scanner@2x.png new file mode 100644 index 0000000..f38ea03 --- /dev/null +++ b/ios/chrome/browser/ui/toolbar/resources/keyboard_accessory_qr_scanner@2x.png Binary files differ
diff --git a/ios/chrome/browser/ui/toolbar/resources/keyboard_accessory_qr_scanner@3x.png b/ios/chrome/browser/ui/toolbar/resources/keyboard_accessory_qr_scanner@3x.png new file mode 100644 index 0000000..95f4ba13 --- /dev/null +++ b/ios/chrome/browser/ui/toolbar/resources/keyboard_accessory_qr_scanner@3x.png Binary files differ
diff --git a/ios/chrome/browser/ui/toolbar/resources/keyboard_accessory_voice_search.png b/ios/chrome/browser/ui/toolbar/resources/keyboard_accessory_voice_search.png new file mode 100644 index 0000000..8ff74610b --- /dev/null +++ b/ios/chrome/browser/ui/toolbar/resources/keyboard_accessory_voice_search.png Binary files differ
diff --git a/ios/chrome/browser/ui/toolbar/resources/keyboard_accessory_voice_search@2x.png b/ios/chrome/browser/ui/toolbar/resources/keyboard_accessory_voice_search@2x.png new file mode 100644 index 0000000..000eed9 --- /dev/null +++ b/ios/chrome/browser/ui/toolbar/resources/keyboard_accessory_voice_search@2x.png Binary files differ
diff --git a/ios/chrome/browser/ui/toolbar/resources/keyboard_accessory_voice_search@3x.png b/ios/chrome/browser/ui/toolbar/resources/keyboard_accessory_voice_search@3x.png new file mode 100644 index 0000000..aa36476 --- /dev/null +++ b/ios/chrome/browser/ui/toolbar/resources/keyboard_accessory_voice_search@3x.png Binary files differ
diff --git a/ios/chrome/browser/ui/toolbar/resources/qr_scanner_keyboard_accessory.png b/ios/chrome/browser/ui/toolbar/resources/qr_scanner_keyboard_accessory.png deleted file mode 100644 index d3361201..0000000 --- a/ios/chrome/browser/ui/toolbar/resources/qr_scanner_keyboard_accessory.png +++ /dev/null Binary files differ
diff --git a/ios/chrome/browser/ui/toolbar/resources/qr_scanner_keyboard_accessory@2x.png b/ios/chrome/browser/ui/toolbar/resources/qr_scanner_keyboard_accessory@2x.png deleted file mode 100644 index a8321d9..0000000 --- a/ios/chrome/browser/ui/toolbar/resources/qr_scanner_keyboard_accessory@2x.png +++ /dev/null Binary files differ
diff --git a/ios/chrome/browser/ui/toolbar/resources/qr_scanner_keyboard_accessory@3x.png b/ios/chrome/browser/ui/toolbar/resources/qr_scanner_keyboard_accessory@3x.png deleted file mode 100644 index 81402caa..0000000 --- a/ios/chrome/browser/ui/toolbar/resources/qr_scanner_keyboard_accessory@3x.png +++ /dev/null Binary files differ
diff --git a/ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm b/ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm index 98253f2f..315dc53c 100644 --- a/ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm +++ b/ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm
@@ -1852,7 +1852,10 @@ - (UIView*)keyboardAccessoryView { if (!_keyboardAccessoryView) { - if (experimental_flags::IsKeyboardAccessoryViewWithCameraSearchEnabled()) { + // The new keyboard accessory view is only used on iPhones as iPads have a + // different pattern regarding keyboard shortcuts. + if (experimental_flags::IsKeyboardAccessoryViewWithCameraSearchEnabled() && + !IsIPadIdiom()) { // The '.' shortcut is left out because the new keyboard accessory view // has less free space for the shortcut buttons, and the '.' is already // present in the standard iOS keyboard.
diff --git a/ios/clean/chrome/app/app_delegate.mm b/ios/clean/chrome/app/app_delegate.mm index fe81355..d83998a 100644 --- a/ios/clean/chrome/app/app_delegate.mm +++ b/ios/clean/chrome/app/app_delegate.mm
@@ -110,6 +110,7 @@ [[PrepareForUI alloc] init], [[CompleteForegrounding alloc] init], [[RootCoordinator alloc] init], + [[DebuggingInformationOverlay alloc] init], ]]; }
diff --git a/ios/clean/chrome/app/steps/launch_to_foreground.h b/ios/clean/chrome/app/steps/launch_to_foreground.h index 1a3fdec..c8a1a75 100644 --- a/ios/clean/chrome/app/steps/launch_to_foreground.h +++ b/ios/clean/chrome/app/steps/launch_to_foreground.h
@@ -32,4 +32,11 @@ // Post: Application phase is APPLICATION_FOREGROUNDED. @interface CompleteForegrounding : NSObject<ApplicationStep> @end + +// Performs preparation steps for UIDebuggingInformationOverlay. +// Pre: Application phase is APPLICATION_FOREGROUNDED. +// Post: Application phase is (still) APPLICATION_FOREGROUNDED. +@interface DebuggingInformationOverlay : NSObject<ApplicationStep> +@end + #endif // IOS_CLEAN_CHROME_APP_STEPS_LAUNCH_TO_FOREGROUND_H_
diff --git a/ios/clean/chrome/app/steps/launch_to_foreground.mm b/ios/clean/chrome/app/steps/launch_to_foreground.mm index c4f9649c..4647934 100644 --- a/ios/clean/chrome/app/steps/launch_to_foreground.mm +++ b/ios/clean/chrome/app/steps/launch_to_foreground.mm
@@ -72,3 +72,21 @@ } @end + +@implementation DebuggingInformationOverlay + +- (BOOL)canRunInState:(ApplicationState*)state { + return state.phase == APPLICATION_FOREGROUNDED; +} + +- (void)runInState:(ApplicationState*)state { +#ifndef NDEBUG +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Warc-performSelector-leaks" + [NSClassFromString(@"UIDebuggingInformationOverlay") + performSelector:NSSelectorFromString(@"prepareDebuggingOverlay")]; +#pragma clang diagnostic pop +#endif // NDEBUG +} + +@end
diff --git a/ios/crnet/BUILD.gn b/ios/crnet/BUILD.gn index 2030e8f..fc89b0f 100644 --- a/ios/crnet/BUILD.gn +++ b/ios/crnet/BUILD.gn
@@ -13,6 +13,7 @@ assert(!is_component_build, "CrNet requires static library build.") source_set("crnet_sources") { + configs += [ "//build/config/compiler:enable_arc" ] deps = [ "//base", "//components/metrics",
diff --git a/ios/crnet/CrNet.mm b/ios/crnet/CrNet.mm index 40aa2910..2aaaef9 100644 --- a/ios/crnet/CrNet.mm +++ b/ios/crnet/CrNet.mm
@@ -9,6 +9,10 @@ #import "ios/net/crn_http_protocol_handler.h" #import "ios/crnet/crnet_environment.h" +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + static CrNetEnvironment* g_chrome_net = NULL; static BOOL g_http2_enabled = YES;
diff --git a/ios/crnet/crnet_environment.mm b/ios/crnet/crnet_environment.mm index f071163..f47dafe 100644 --- a/ios/crnet/crnet_environment.mm +++ b/ios/crnet/crnet_environment.mm
@@ -71,6 +71,10 @@ #include "base/i18n/icu_util.h" // nogncheck #endif +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + namespace { base::AtExitManager* g_at_exit_ = nullptr; @@ -106,7 +110,7 @@ public: CrNetHttpProtocolHandlerDelegate(net::URLRequestContextGetter* getter, RequestFilterBlock filter) - : getter_(getter), filter_(filter, base::scoped_policy::RETAIN) {} + : getter_(getter), filter_([filter copy]) {} private: // net::HTTPProtocolHandlerDelegate implementation: @@ -119,8 +123,7 @@ return false; } if (filter_) { - RequestFilterBlock block = filter_.get(); - return block(request); + return filter_(request); } return true; } @@ -139,7 +142,7 @@ } scoped_refptr<net::URLRequestContextGetter> getter_; - base::mac::ScopedBlock<RequestFilterBlock> filter_; + RequestFilterBlock filter_; }; void CrNetEnvironment::PostToNetworkThread( @@ -334,7 +337,7 @@ // Set up an empty default cache, with default size. // TODO(droger): If the NSURLCache is to be used, its size should most // likely be changed. On an iPod2 with iOS4, the default size is 512k. - [NSURLCache setSharedURLCache:[[[NSURLCache alloc] init] autorelease]]; + [NSURLCache setSharedURLCache:[[NSURLCache alloc] init]]; [NSURLProtocol unregisterClass:[CRNHTTPProtocolHandler class]]; } } @@ -514,5 +517,5 @@ PostToNetworkThread( FROM_HERE, base::Bind(&net::ClearHttpCache, main_context_getter_, network_io_thread_->task_runner(), base::Time(), - base::Time::Max(), base::BindBlock(callback))); + base::Time::Max(), base::BindBlockArc(callback))); }
diff --git a/ios/web/test/BUILD.gn b/ios/web/test/BUILD.gn index 035d33b6..869c4fb9 100644 --- a/ios/web/test/BUILD.gn +++ b/ios/web/test/BUILD.gn
@@ -48,6 +48,7 @@ } source_set("test_support") { + configs += [ "//build/config/compiler:enable_arc" ] testonly = true deps = [
diff --git a/ios/web/test/crw_fake_web_controller_observer.mm b/ios/web/test/crw_fake_web_controller_observer.mm index 8378ce2a..5eba7e19 100644 --- a/ios/web/test/crw_fake_web_controller_observer.mm +++ b/ios/web/test/crw_fake_web_controller_observer.mm
@@ -4,6 +4,10 @@ #import "ios/web/test/crw_fake_web_controller_observer.h" +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + @implementation CRWFakeWebControllerObserver @synthesize pageLoaded = _pageLoaded;
diff --git a/ios/web/test/url_test_util.mm b/ios/web/test/url_test_util.mm index bfb9ed5..f0ed6343 100644 --- a/ios/web/test/url_test_util.mm +++ b/ios/web/test/url_test_util.mm
@@ -6,6 +6,10 @@ #import "ios/web/navigation/navigation_item_impl.h" +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + namespace web { base::string16 GetDisplayTitleForUrl(const GURL& url) {
diff --git a/ios/web/test/web_int_test.mm b/ios/web/test/web_int_test.mm index 8d5160b8..450dd575 100644 --- a/ios/web/test/web_int_test.mm +++ b/ios/web/test/web_int_test.mm
@@ -12,6 +12,10 @@ #include "ios/web/public/web_state/web_state_observer.h" #import "ios/web/public/web_view_creation_util.h" +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + namespace web { #pragma mark - IntTestWebStateObserver
diff --git a/ios/web/test/web_test_suite.mm b/ios/web/test/web_test_suite.mm index 15063f1..b20fae3 100644 --- a/ios/web/test/web_test_suite.mm +++ b/ios/web/test/web_test_suite.mm
@@ -12,6 +12,10 @@ #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/resource/resource_bundle.h" +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + namespace web { WebTestSuite::WebTestSuite(int argc, char** argv)
diff --git a/ios/web/test/web_test_with_web_controller.mm b/ios/web/test/web_test_with_web_controller.mm index 2e14d9d..a49b17b0 100644 --- a/ios/web/test/web_test_with_web_controller.mm +++ b/ios/web/test/web_test_with_web_controller.mm
@@ -6,6 +6,10 @@ #import "ios/web/web_state/web_state_impl.h" +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + namespace web { WebTestWithWebController::WebTestWithWebController() {}
diff --git a/ios/web/test/wk_web_view_crash_utils.mm b/ios/web/test/wk_web_view_crash_utils.mm index 15f364d3..fcd0890 100644 --- a/ios/web/test/wk_web_view_crash_utils.mm +++ b/ios/web/test/wk_web_view_crash_utils.mm
@@ -8,12 +8,15 @@ #import <WebKit/WebKit.h> #include "base/logging.h" -#import "base/mac/scoped_nsobject.h" #include "ios/web/public/test/fakes/test_browser_state.h" #import "ios/web/public/web_view_creation_util.h" #import "third_party/ocmock/OCMock/NSInvocation+OCMAdditions.h" #import "third_party/ocmock/OCMock/OCMock.h" +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + namespace { // Returns an OCMocked WKWebView whose |evaluateJavaScript:completionHandler:| @@ -37,7 +40,10 @@ void SimulateWKWebViewCrash(WKWebView* webView) { SEL selector = @selector(webViewWebContentProcessDidTerminate:); if ([webView.navigationDelegate respondsToSelector:selector]) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Warc-performSelector-leaks" [webView.navigationDelegate performSelector:selector withObject:webView]; +#pragma clang diagnostic pop } #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wundeclared-selector"
diff --git a/media/audio/audio_device_thread.cc b/media/audio/audio_device_thread.cc index 0a0d274a..f0aa11c 100644 --- a/media/audio/audio_device_thread.cc +++ b/media/audio/audio_device_thread.cc
@@ -7,6 +7,23 @@ #include <limits> #include "base/logging.h" +#include "base/sys_info.h" + +namespace { + +base::ThreadPriority GetAudioThreadPriority() { +#if defined(OS_CHROMEOS) + // On Chrome OS, there are priority inversion issues with having realtime + // threads on systems with only two cores, see crbug.com/710245. + return base::SysInfo::NumberOfProcessors() > 2 + ? base::ThreadPriority::REALTIME_AUDIO + : base::ThreadPriority::NORMAL; +#else + return base::ThreadPriority::REALTIME_AUDIO; +#endif +} + +} // namespace namespace media { @@ -47,8 +64,8 @@ base::SyncSocket::Handle socket, const char* thread_name) : callback_(callback), thread_name_(thread_name), socket_(socket) { - CHECK(base::PlatformThread::CreateWithPriority( - 0, this, &thread_handle_, base::ThreadPriority::REALTIME_AUDIO)); + CHECK(base::PlatformThread::CreateWithPriority(0, this, &thread_handle_, + GetAudioThreadPriority())); DCHECK(!thread_handle_.is_null()); }
diff --git a/media/gpu/video_decode_accelerator_unittest.cc b/media/gpu/video_decode_accelerator_unittest.cc index 7174f7a..376dd4e7 100644 --- a/media/gpu/video_decode_accelerator_unittest.cc +++ b/media/gpu/video_decode_accelerator_unittest.cc
@@ -291,6 +291,10 @@ // be initialized multiple times for the same Ozone platform. gpu_helper_->Initialize(base::ThreadTaskRunnerHandle::Get(), GetRenderingTaskRunner()); + // Part of the initialization happens on the rendering thread. Make sure it + // has completed, otherwise we may start using resources that are not yet + // available. + rendering_thread_.FlushForTesting(); #endif }
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index 0285262..0a56056b 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -1885,6 +1885,23 @@ ] } ], + "OneGoogleBarOnLocalNtp": [ + { + "platforms": [ + "linux", + "mac", + "win" + ], + "experiments": [ + { + "name": "Enabled", + "enable_features": [ + "OneGoogleBarOnLocalNtp" + ] + } + ] + } + ], "OutOfProcessPac": [ { "platforms": [
diff --git a/third_party/WebKit/LayoutTests/platform/android/tables/mozilla_expected_failures/bugs/bug1055-2-expected.png b/third_party/WebKit/LayoutTests/platform/android/tables/mozilla_expected_failures/bugs/bug1055-2-expected.png index c2ea70f..a3491833 100644 --- a/third_party/WebKit/LayoutTests/platform/android/tables/mozilla_expected_failures/bugs/bug1055-2-expected.png +++ b/third_party/WebKit/LayoutTests/platform/android/tables/mozilla_expected_failures/bugs/bug1055-2-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/css/bidi-override-in-anonymous-block-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/css/bidi-override-in-anonymous-block-expected.png index dbbd68a8..2678bc7e 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/css/bidi-override-in-anonymous-block-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/css/bidi-override-in-anonymous-block-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/css/bidi-override-in-anonymous-block-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/css/bidi-override-in-anonymous-block-expected.txt index 7843d08..4a10b51 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/css/bidi-override-in-anonymous-block-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/css/bidi-override-in-anonymous-block-expected.txt
@@ -1,8 +1,8 @@ -layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 1308 +layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 1307 LayoutView at (0,0) size 800x600 -layer at (0,0) size 785x1308 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 - LayoutBlockFlow {HTML} at (0,0) size 785x1308.42 - LayoutBlockFlow {BODY} at (8,16) size 769x1284.42 +layer at (0,0) size 785x1307 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow {HTML} at (0,0) size 785x1306.86 + LayoutBlockFlow {BODY} at (8,16) size 769x1282.86 LayoutBlockFlow {P} at (0,0) size 769x20 LayoutText {#text} at (0,0) size 161x19 text run at (0,0) width 161: "div, span, nested div/span" @@ -178,11 +178,11 @@ LayoutBlockFlow {P} at (0,976.69) size 769x20 LayoutText {#text} at (0,0) size 417x19 text run at (0,0) width 417: "The following 2 tables should be identical, ignorning whitespaces:" - LayoutTable {TABLE} at (1.39,1012.69) size 82x72.78 [border: (1.39px solid #808080)] + LayoutTable {TABLE} at (1.39,1012.69) size 82x72 [border: (1px solid #808080)] LayoutBlockFlow {CAPTION} at (0,0) size 82x20 LayoutText {#text} at (0,0) size 83x19 text run at (0,0) width 82: "NormalTable" - LayoutTableSection {TBODY} at (1,21.39) size 80x50 + LayoutTableSection {TBODY} at (1,21) size 80x50 LayoutTableRow {TR} at (0,2) size 80x22 LayoutTableCell {TD} at (43,2) size 35x22 [r=0 c=0 rs=1 cs=1] LayoutText {#text} at (12,1) size 22x19 @@ -197,11 +197,11 @@ LayoutTableCell {TD} at (2,26) size 39x22 [r=1 c=1 rs=1 cs=1] LayoutText {#text} at (14,1) size 24x19 text run at (14,1) width 24: "opq" - LayoutTable {DIV} at (1.39,1086.86) size 143x62.78 [border: (1.39px solid #000000)] + LayoutTable {DIV} at (1.39,1086.08) size 143x62 [border: (1px solid #000000)] LayoutBlockFlow {DIV} at (0,0) size 143x20 LayoutText {#text} at (0,0) size 144x19 text run at (0,0) width 143: "AnonymousTableRow" - LayoutTableSection (anonymous) at (1,21.39) size 141x40 + LayoutTableSection (anonymous) at (1,21) size 141x40 LayoutTableRow {DIV} at (0,0) size 141x20 LayoutTableCell {DIV} at (74,0) size 67x20 [r=0 c=0 rs=1 cs=1] LayoutText {#text} at (45,0) size 22x19 @@ -216,10 +216,10 @@ LayoutTableCell {DIV} at (0,20) size 74x20 [r=1 c=1 rs=1 cs=1] LayoutText {#text} at (50,0) size 24x19 text run at (50,0) width 24: "opq" - LayoutBlockFlow {P} at (0,1165.64) size 769x20 + LayoutBlockFlow {P} at (0,1164.08) size 769x20 LayoutText {#text} at (0,0) size 515x19 text run at (0,0) width 515: "Anonymous TABLE, TABLE_ROW, TABLE_ROW_GROUP, TABLE_CELL" - LayoutBlockFlow {DIV} at (0,1201.64) size 769x82.78 [border: (1.39px solid #000000)] + LayoutBlockFlow {DIV} at (0,1200.08) size 769x82.78 [border: (1.39px solid #000000)] LayoutTable (anonymous) at (1.39,1.39) size 24x80 LayoutTableSection (anonymous) at (0,20) size 24x40 LayoutTableRow {DIV} at (0,0) size 24x20
diff --git a/third_party/WebKit/LayoutTests/platform/linux/tables/mozilla_expected_failures/bugs/bug1055-2-expected.png b/third_party/WebKit/LayoutTests/platform/linux/tables/mozilla_expected_failures/bugs/bug1055-2-expected.png index ee37524..b1d4f81 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/tables/mozilla_expected_failures/bugs/bug1055-2-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/tables/mozilla_expected_failures/bugs/bug1055-2-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/tables/mozilla_expected_failures/bugs/bug1055-2-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/tables/mozilla_expected_failures/bugs/bug1055-2-expected.png index 5671abf..2d99f0d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/tables/mozilla_expected_failures/bugs/bug1055-2-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/tables/mozilla_expected_failures/bugs/bug1055-2-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/tables/mozilla_expected_failures/bugs/bug1055-2-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/tables/mozilla_expected_failures/bugs/bug1055-2-expected.png index 3d48643..c2a5852 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/tables/mozilla_expected_failures/bugs/bug1055-2-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/tables/mozilla_expected_failures/bugs/bug1055-2-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/css/bidi-override-in-anonymous-block-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/css/bidi-override-in-anonymous-block-expected.txt index 819e6987..b523e45 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/css/bidi-override-in-anonymous-block-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/css/bidi-override-in-anonymous-block-expected.txt
@@ -1,8 +1,8 @@ -layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 1225 +layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 1223 LayoutView at (0,0) size 800x600 -layer at (0,0) size 785x1225 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 - LayoutBlockFlow {HTML} at (0,0) size 785x1225.02 - LayoutBlockFlow {BODY} at (8,16) size 769x1201.02 +layer at (0,0) size 785x1223 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow {HTML} at (0,0) size 785x1223.33 + LayoutBlockFlow {BODY} at (8,16) size 769x1199.33 LayoutBlockFlow {P} at (0,0) size 769x18 LayoutText {#text} at (0,0) size 164x18 text run at (0,0) width 164: "div, span, nested div/span" @@ -178,11 +178,11 @@ LayoutBlockFlow {P} at (0,917.06) size 769x18 LayoutText {#text} at (0,0) size 426x18 text run at (0,0) width 426: "The following 2 tables should be identical, ignorning whitespaces:" - LayoutTable {TABLE} at (1.42,951.06) size 84x66.84 [border: (1.42px solid #808080)] + LayoutTable {TABLE} at (1.42,951.06) size 84x66 [border: (1px solid #808080)] LayoutBlockFlow {CAPTION} at (0,0) size 84x18 LayoutText {#text} at (0,0) size 85x18 text run at (0,0) width 84: "NormalTable" - LayoutTableSection {TBODY} at (1,19.42) size 82x46 + LayoutTableSection {TBODY} at (1,19) size 82x46 LayoutTableRow {TR} at (0,2) size 82x20 LayoutTableCell {TD} at (43,2) size 37x20 [r=0 c=0 rs=1 cs=1] LayoutText {#text} at (13,1) size 23x18 @@ -197,11 +197,11 @@ LayoutTableCell {TD} at (2,24) size 39x20 [r=1 c=1 rs=1 cs=1] LayoutText {#text} at (14,1) size 24x18 text run at (14,1) width 24: "opq" - LayoutTable {DIV} at (1.42,1019.33) size 143x56.84 [border: (1.42px solid #000000)] + LayoutTable {DIV} at (1.42,1018.48) size 143x56 [border: (1px solid #000000)] LayoutBlockFlow {DIV} at (0,0) size 143x18 LayoutText {#text} at (0,0) size 144x18 text run at (0,0) width 143: "AnonymousTableRow" - LayoutTableSection (anonymous) at (1,19.42) size 141x36 + LayoutTableSection (anonymous) at (1,19) size 141x36 LayoutTableRow {DIV} at (0,0) size 141x18 LayoutTableCell {DIV} at (72,0) size 69x18 [r=0 c=0 rs=1 cs=1] LayoutText {#text} at (46,0) size 23x18 @@ -216,10 +216,10 @@ LayoutTableCell {DIV} at (0,18) size 72x18 [r=1 c=1 rs=1 cs=1] LayoutText {#text} at (48,0) size 24x18 text run at (48,0) width 24: "opq" - LayoutBlockFlow {P} at (0,1092.17) size 769x18 + LayoutBlockFlow {P} at (0,1090.48) size 769x18 LayoutText {#text} at (0,0) size 505x18 text run at (0,0) width 505: "Anonymous TABLE, TABLE_ROW, TABLE_ROW_GROUP, TABLE_CELL" - LayoutBlockFlow {DIV} at (0,1126.17) size 769x74.84 [border: (1.42px solid #000000)] + LayoutBlockFlow {DIV} at (0,1124.48) size 769x74.84 [border: (1.42px solid #000000)] LayoutTable (anonymous) at (1.42,1.42) size 24x72 LayoutTableSection (anonymous) at (0,18) size 24x36 LayoutTableRow {DIV} at (0,0) size 24x18
diff --git a/third_party/WebKit/LayoutTests/platform/mac/tables/mozilla_expected_failures/bugs/bug1055-2-expected.png b/third_party/WebKit/LayoutTests/platform/mac/tables/mozilla_expected_failures/bugs/bug1055-2-expected.png index ad1cd07..e5ffcda 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/tables/mozilla_expected_failures/bugs/bug1055-2-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/tables/mozilla_expected_failures/bugs/bug1055-2-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/css/bidi-override-in-anonymous-block-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/css/bidi-override-in-anonymous-block-expected.png index a409802..ec63a434 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/css/bidi-override-in-anonymous-block-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/css/bidi-override-in-anonymous-block-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/css/bidi-override-in-anonymous-block-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/css/bidi-override-in-anonymous-block-expected.txt index 348a052..7dc5447 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/css/bidi-override-in-anonymous-block-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/fast/css/bidi-override-in-anonymous-block-expected.txt
@@ -1,8 +1,8 @@ -layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 1308 +layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 1307 LayoutView at (0,0) size 800x600 -layer at (0,0) size 785x1308 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 - LayoutBlockFlow {HTML} at (0,0) size 785x1308.42 - LayoutBlockFlow {BODY} at (8,16) size 769x1284.42 +layer at (0,0) size 785x1307 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow {HTML} at (0,0) size 785x1306.86 + LayoutBlockFlow {BODY} at (8,16) size 769x1282.86 LayoutBlockFlow {P} at (0,0) size 769x20 LayoutText {#text} at (0,0) size 154x19 text run at (0,0) width 154: "div, span, nested div/span" @@ -178,11 +178,11 @@ LayoutBlockFlow {P} at (0,976.69) size 769x20 LayoutText {#text} at (0,0) size 389x19 text run at (0,0) width 389: "The following 2 tables should be identical, ignorning whitespaces:" - LayoutTable {TABLE} at (1.39,1012.69) size 78x72.78 [border: (1.39px solid #808080)] + LayoutTable {TABLE} at (1.39,1012.69) size 78x72 [border: (1px solid #808080)] LayoutBlockFlow {CAPTION} at (0,0) size 78x20 LayoutText {#text} at (0,0) size 79x19 text run at (0,0) width 78: "NormalTable" - LayoutTableSection {TBODY} at (1,21.39) size 76x50 + LayoutTableSection {TBODY} at (1,21) size 76x50 LayoutTableRow {TR} at (0,2) size 76x22 LayoutTableCell {TD} at (41,2) size 33x22 [r=0 c=0 rs=1 cs=1] LayoutText {#text} at (10,1) size 22x19 @@ -197,11 +197,11 @@ LayoutTableCell {TD} at (2,26) size 37x22 [r=1 c=1 rs=1 cs=1] LayoutText {#text} at (12,1) size 24x19 text run at (12,1) width 24: "opq" - LayoutTable {DIV} at (1.39,1086.86) size 133x62.78 [border: (1.39px solid #000000)] + LayoutTable {DIV} at (1.39,1086.08) size 133x62 [border: (1px solid #000000)] LayoutBlockFlow {DIV} at (0,0) size 133x20 LayoutText {#text} at (0,0) size 134x19 text run at (0,0) width 133: "AnonymousTableRow" - LayoutTableSection (anonymous) at (1,21.39) size 131x40 + LayoutTableSection (anonymous) at (1,21) size 131x40 LayoutTableRow {DIV} at (0,0) size 131x20 LayoutTableCell {DIV} at (69,0) size 62x20 [r=0 c=0 rs=1 cs=1] LayoutText {#text} at (40,0) size 22x19 @@ -216,10 +216,10 @@ LayoutTableCell {DIV} at (0,20) size 69x20 [r=1 c=1 rs=1 cs=1] LayoutText {#text} at (45,0) size 24x19 text run at (45,0) width 24: "opq" - LayoutBlockFlow {P} at (0,1165.64) size 769x20 + LayoutBlockFlow {P} at (0,1164.08) size 769x20 LayoutText {#text} at (0,0) size 481x19 text run at (0,0) width 481: "Anonymous TABLE, TABLE_ROW, TABLE_ROW_GROUP, TABLE_CELL" - LayoutBlockFlow {DIV} at (0,1201.64) size 769x82.78 [border: (1.39px solid #000000)] + LayoutBlockFlow {DIV} at (0,1200.08) size 769x82.78 [border: (1.39px solid #000000)] LayoutTable (anonymous) at (1.39,1.39) size 24x80 LayoutTableSection (anonymous) at (0,20) size 24x40 LayoutTableRow {DIV} at (0,0) size 24x20
diff --git a/third_party/WebKit/LayoutTests/platform/win/tables/mozilla_expected_failures/bugs/bug1055-2-expected.png b/third_party/WebKit/LayoutTests/platform/win/tables/mozilla_expected_failures/bugs/bug1055-2-expected.png index 255f0c4..114c8d2 100644 --- a/third_party/WebKit/LayoutTests/platform/win/tables/mozilla_expected_failures/bugs/bug1055-2-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/tables/mozilla_expected_failures/bugs/bug1055-2-expected.png Binary files differ
diff --git a/third_party/WebKit/Source/bindings/scripts/blink_idl_parser.py b/third_party/WebKit/Source/bindings/scripts/blink_idl_parser.py index 7fbfd778..466e0cb 100644 --- a/third_party/WebKit/Source/bindings/scripts/blink_idl_parser.py +++ b/third_party/WebKit/Source/bindings/scripts/blink_idl_parser.py
@@ -275,15 +275,15 @@ """ExtendedAttributeList : '[' ExtendedAttribute ',' error""" p[0] = self.BuildError(p, "ExtendedAttributeList") - # [b50] Allow optional trailing comma - # Blink-only, marked as WONTFIX in Web IDL spec: - # https://www.w3.org/Bugs/Public/show_bug.cgi?id=22156 + # Historically we allowed trailing comma but now it's a syntax error. def p_ExtendedAttributes(self, p): """ExtendedAttributes : ',' ExtendedAttribute ExtendedAttributes | ',' |""" if len(p) > 3: p[0] = ListFromConcat(p[2], p[3]) + elif len(p) == 2: + p[0] = self.BuildError(p, 'ExtendedAttributes') # [b51] Add ExtendedAttributeStringLiteral and ExtendedAttributeStringLiteralList def p_ExtendedAttribute(self, p):
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/ArrayBuffer.idl b/third_party/WebKit/Source/bindings/tests/idls/core/ArrayBuffer.idl index 7878c5798..c0203e1 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/ArrayBuffer.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/ArrayBuffer.idl
@@ -5,7 +5,7 @@ // https://www.khronos.org/registry/typedarray/specs/latest/#ARRAYBUFFER [ - ImplementedAs=TestArrayBuffer, + ImplementedAs=TestArrayBuffer ] interface ArrayBuffer { readonly attribute unsigned long byteLength; };
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/ArrayBufferView.idl b/third_party/WebKit/Source/bindings/tests/idls/core/ArrayBufferView.idl index e6e9262..3ea88e3 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/ArrayBufferView.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/ArrayBufferView.idl
@@ -5,7 +5,7 @@ // https://www.khronos.org/registry/typedarray/specs/latest/#ARRAYBUFFERVIEW [ - ImplementedAs=TestArrayBufferView, + ImplementedAs=TestArrayBufferView ] interface ArrayBufferView { readonly attribute ArrayBuffer buffer; readonly attribute unsigned long byteOffset;
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/DataView.idl b/third_party/WebKit/Source/bindings/tests/idls/core/DataView.idl index e26468d3..d21b90b 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/DataView.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/DataView.idl
@@ -5,7 +5,7 @@ // https://www.khronos.org/registry/typedarray/specs/latest/#DATAVIEW [ - ImplementedAs=TestDataView, + ImplementedAs=TestDataView ] interface DataView : ArrayBufferView { [RaisesException] octet getUint8(unsigned long byteOffset); [RaisesException] double getFloat64(unsigned long byteOffset, optional boolean littleEndian);
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/SVGTestInterface.idl b/third_party/WebKit/Source/bindings/tests/idls/core/SVGTestInterface.idl index a2b1254d..43fb132 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/SVGTestInterface.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/SVGTestInterface.idl
@@ -31,7 +31,7 @@ // This test files starts with 'SVG' because /^SVG/ is used as a check // for SVG interfaces (to use SVGNames for [Reflect] attributes) [ - DependentLifetime, + DependentLifetime ] interface SVGTestInterface { [Reflect] attribute DOMString type; // Test SVGNames namespace };
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestDictionaryDerived.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestDictionaryDerived.idl index 51817ef..4f274f1 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestDictionaryDerived.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestDictionaryDerived.idl
@@ -3,7 +3,7 @@ // found in the LICENSE file. [ - ImplementedAs=TestDictionaryDerivedImplementedAs, + ImplementedAs=TestDictionaryDerivedImplementedAs ] dictionary TestDictionaryDerived : TestDictionary { DOMString derivedStringMember; DOMString derivedStringMemberWithDefault = "default string value";
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestException.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestException.idl index 0c918b41..49bb703 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestException.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestException.idl
@@ -28,7 +28,7 @@ [ Constructor(unsigned short argument), - DoNotCheckConstants, + DoNotCheckConstants ] exception TestException { readonly attribute unsigned short readonlyUnsignedShortAttribute; readonly attribute DOMString readonlyStringAttribute;
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestImplements.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestImplements.idl index e054269..601c0502 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestImplements.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestImplements.idl
@@ -27,7 +27,7 @@ */ [ - NoInterfaceObject, // Always used on target of 'implements' + NoInterfaceObject // Always used on target of 'implements' ] interface TestImplements { static readonly attribute long implementsStaticReadOnlyLongAttribute; static attribute DOMString implementsStaticStringAttribute;
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestImplements2.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestImplements2.idl index ce0e357..e3e79054 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestImplements2.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestImplements2.idl
@@ -31,7 +31,7 @@ [ LegacyTreatAsPartialInterface, // Conflicts with default implements behavior NoInterfaceObject, // Always used on target of 'implements' - RuntimeEnabled=Implements2FeatureName, // conflicts with [RuntimeEnabled] on member + RuntimeEnabled=Implements2FeatureName // conflicts with [RuntimeEnabled] on member ] interface TestImplements2 { static attribute DOMString implements2StaticStringAttribute; attribute DOMString implements2StringAttribute;
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestImplements3.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestImplements3.idl index 4d18506..dff66fd8 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestImplements3.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestImplements3.idl
@@ -5,7 +5,7 @@ [ LegacyTreatAsPartialInterface, // used by [ImplementedAs] ImplementedAs=TestImplements3Implementation, // Conflicts with default implements class name - NoInterfaceObject, // Always used on target of 'implements' + NoInterfaceObject // Always used on target of 'implements' ] interface TestImplements3 { attribute DOMString implements3StringAttribute; static attribute DOMString implements3StaticStringAttribute;
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterface.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterface.idl index fd5da6a..6ff53c1 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterface.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterface.idl
@@ -39,7 +39,7 @@ ImplementedAs=TestInterfaceImplementation, RuntimeEnabled=FeatureName, ContextEnabled=FeatureName, - Exposed=(Worker,Window), + Exposed=(Worker,Window) ] interface TestInterface : TestInterfaceEmpty { // members needed to test [ImplementedAs], as this affect attribute // configuration and method configuration
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterface2.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterface2.idl index 6d7e15e..30ed232 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterface2.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterface2.idl
@@ -39,7 +39,7 @@ DependentLifetime, // Covered by [DependentLifetime] // Note that Exposed(Arguments) has no effect on bindings-tests. It is // processed in generate_global_constructors.py. - Exposed(Window FeatureName), // Conflicts with Exposed=(Window,Worker) + Exposed(Window FeatureName) // Conflicts with Exposed=(Window,Worker) ] interface TestInterface2 { // This interface has only runtime enabled constants. [RuntimeEnabled=FeatureName] const unsigned short CONST_VALUE_1 = 1;
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterface3.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterface3.idl index d36e16b..8b9e423 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterface3.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterface3.idl
@@ -34,7 +34,7 @@ // The more *minor* extended attribute should be put in this file. [ - WebAgentAPI, + WebAgentAPI ] interface TestInterface3 { // iterable<V> needs a "length" property accompanying the indexed property // getter below.
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceCheckSecurity.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceCheckSecurity.idl index d9df642..fd04326 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceCheckSecurity.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceCheckSecurity.idl
@@ -28,7 +28,7 @@ [ CheckSecurity=Receiver, - Global, + Global ] interface TestInterfaceCheckSecurity { readonly attribute long readonlyLongAttribute; attribute long longAttribute;
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceConstructor.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceConstructor.idl index 29878aef..e60065d 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceConstructor.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceConstructor.idl
@@ -46,6 +46,6 @@ NamedConstructor=Audio(DOMString arg, optional DOMString optArg), ConstructorCallWith=(ScriptState,ExecutionContext,Document), MeasureAs=TestFeature, - RaisesException=Constructor, + RaisesException=Constructor ] interface TestInterfaceConstructor { };
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceConstructor2.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceConstructor2.idl index 209a0009..097b27c9 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceConstructor2.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceConstructor2.idl
@@ -47,6 +47,6 @@ [Default=Undefined] optional DOMString defaultUndefinedOptionalStringArg, optional DOMString defaultNullStringOptionalStringArg = null, [Default=Undefined] optional Dictionary defaultUndefinedOptionalDictionaryArg, - optional DOMString optionalStringArg), + optional DOMString optionalStringArg) ] interface TestInterfaceConstructor2 { };
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceConstructor3.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceConstructor3.idl index 19b6669..00d23be2 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceConstructor3.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceConstructor3.idl
@@ -30,6 +30,6 @@ // Test for length > 0, non-overloaded constructor. [ - Constructor(DOMString stringArg), + Constructor(DOMString stringArg) ] interface TestInterfaceConstructor3 { };
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceConstructor4.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceConstructor4.idl index 2153167..e6980fb7 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceConstructor4.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceConstructor4.idl
@@ -6,6 +6,6 @@ // argument. [ Constructor(TestInterfaceConstructor4 testInterface4Arg), - Constructor(USVString usvStringArg), + Constructor(USVString usvStringArg) ] interface TestInterfaceConstructor4 { };
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceCustomConstructor.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceCustomConstructor.idl index dba8b7a..35fccd7 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceCustomConstructor.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceCustomConstructor.idl
@@ -31,6 +31,6 @@ [ CustomConstructor, CustomConstructor(TestInterfaceEmpty testInterfaceEmptyArg), - CustomConstructor(double doubleArg, optional double optionalDoubleArg), + CustomConstructor(double doubleArg, optional double optionalDoubleArg) ] interface TestInterfaceCustomConstructor { };
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceEventInitConstructor.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceEventInitConstructor.idl index 2fa3746..0e307908 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceEventInitConstructor.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceEventInitConstructor.idl
@@ -3,7 +3,7 @@ // found in the LICENSE file. [ - Constructor(DOMString type, TestInterfaceEventInit testInterfaceEventInit), + Constructor(DOMString type, TestInterfaceEventInit testInterfaceEventInit) ] interface TestInterfaceEventInitConstructor : Event { readonly attribute DOMString readonlyStringAttribute; };
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceEventTarget.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceEventTarget.idl index 742c6d7..f86dbfda 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceEventTarget.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceEventTarget.idl
@@ -30,6 +30,6 @@ [ NamedConstructor=Name(), - ConstructorCallWith=Document, + ConstructorCallWith=Document ] interface TestInterfaceEventTarget : EventTarget { };
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceGarbageCollected.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceGarbageCollected.idl index 5f63fe2e..bf9c404 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceGarbageCollected.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceGarbageCollected.idl
@@ -3,7 +3,7 @@ // found in the LICENSE file. [ - Constructor(DOMString str), + Constructor(DOMString str) ] interface TestInterfaceGarbageCollected : EventTarget { // Inherit from EventTarget to test order of internal fields attribute TestInterfaceGarbageCollected attr1; void func(TestInterfaceGarbageCollected arg);
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceNamedConstructor.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceNamedConstructor.idl index ee3216a..4d57a70 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceNamedConstructor.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceNamedConstructor.idl
@@ -37,7 +37,7 @@ optional DOMString defaultNullStringOptionalstringArg = null, optional DOMString optionalStringArg), ConstructorCallWith=Document, - RaisesException=Constructor, + RaisesException=Constructor ] interface TestInterfaceNamedConstructor { // An attribute of type {interface_name}ConstructorConstructor is generated // in *Constructors.idl file, which is a partial interface for the global
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceNamedConstructor2.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceNamedConstructor2.idl index 1494ffd..1f3aa01 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceNamedConstructor2.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceNamedConstructor2.idl
@@ -30,6 +30,6 @@ // "Number of arguments" check varies if [RaisesException=Constructor] or not [ - NamedConstructor=Audio(DOMString stringArg), + NamedConstructor=Audio(DOMString stringArg) ] interface TestInterfaceNamedConstructor2 { };
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceOriginTrialEnabled.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceOriginTrialEnabled.idl index 3338fbe..959db4b 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceOriginTrialEnabled.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfaceOriginTrialEnabled.idl
@@ -7,7 +7,7 @@ // [OriginTrialEnabled] attribute takes precedence over [RuntimeEnabled]. [ - OriginTrialEnabled=InterfaceFeatureName, + OriginTrialEnabled=InterfaceFeatureName ] interface TestInterfaceOriginTrialEnabled { const unsigned long UNSIGNED_LONG = 0; const short CONST_JAVASCRIPT = 1;
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfacePartial.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfacePartial.idl index dcabd38..0218c5b 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfacePartial.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfacePartial.idl
@@ -37,7 +37,7 @@ [Custom] callback PartialCallbackType = void (PartialString value); [ - RuntimeEnabled=PartialFeatureName, + RuntimeEnabled=PartialFeatureName ] partial interface TestInterface { const unsigned short PARTIAL_UNSIGNED_SHORT = 0; const double PARTIAL_DOUBLE = 3.14;
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfacePartial2.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfacePartial2.idl index ca625c63..59993ef 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfacePartial2.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfacePartial2.idl
@@ -29,7 +29,7 @@ */ [ - ImplementedAs=TestInterfacePartial2Implementation, // Conflicts with default partial interface class name + ImplementedAs=TestInterfacePartial2Implementation // Conflicts with default partial interface class name ] partial interface TestInterface { const unsigned short PARTIAL2_UNSIGNED_SHORT = 0;
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfacePartialSecureContext.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfacePartialSecureContext.idl index ed17e59..8b22d79 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfacePartialSecureContext.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfacePartialSecureContext.idl
@@ -5,7 +5,7 @@ [ SecureContext, Exposed=(Window,Worker), - ImplementedAs=TestInterfacePartialSecureContext, // Conflicts with default partial interface class name + ImplementedAs=TestInterfacePartialSecureContext // Conflicts with default partial interface class name ] partial interface TestInterface { void partialSecureContextMethod(); attribute bool partialSecureContextAttribute;
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestNode.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestNode.idl index 01e9b06f9..3317c326 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestNode.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestNode.idl
@@ -19,7 +19,7 @@ */ [ - Constructor, + Constructor ] interface TestNode : Node { // These attributes are needed to test [PutForwards] in TestObject.idl. attribute DOMString href;
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestSpecialOperations.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestSpecialOperations.idl index 73c7c13f..3bdc8a40 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestSpecialOperations.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestSpecialOperations.idl
@@ -3,7 +3,7 @@ // found in the LICENSE file. [ - OverrideBuiltins, + OverrideBuiltins ] interface TestSpecialOperations { // [ImplementedAs], union return, nullability // [OverrideBuiltins] affects named property operations
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestTypedefs.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestTypedefs.idl index f82283f6..1aaadf2e 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestTypedefs.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestTypedefs.idl
@@ -50,7 +50,7 @@ typedef (ULongLong or (BooleanType or TestCallbackInterfaceType)) UnionWithTypedef; [ - Constructor(String stringArg), + Constructor(String stringArg) ] interface TestTypedefs { attribute ULongLong uLongLongAttribute; attribute T tAttribute;
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/Uint8ClampedArray.idl b/third_party/WebKit/Source/bindings/tests/idls/core/Uint8ClampedArray.idl index 13f411c85..024a206 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/Uint8ClampedArray.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/Uint8ClampedArray.idl
@@ -5,6 +5,6 @@ // https://www.khronos.org/registry/typedarray/specs/latest/#TYPEDARRAYS [ - ImplementedAs=TestUint8ClampedArray, + ImplementedAs=TestUint8ClampedArray ] interface Uint8ClampedArray : ArrayBufferView { };
diff --git a/third_party/WebKit/Source/bindings/tests/idls/modules/TestInterface2Partial.idl b/third_party/WebKit/Source/bindings/tests/idls/modules/TestInterface2Partial.idl index dd84fb4..204301a 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/modules/TestInterface2Partial.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/modules/TestInterface2Partial.idl
@@ -11,7 +11,7 @@ // This test ensures that TestInterface2Partial2 is NOT conditional on the // Interface2PartialFeatureName runtime flag. [ - RuntimeEnabled=Interface2PartialFeatureName, + RuntimeEnabled=Interface2PartialFeatureName ] partial interface TestInterface2 { void voidMethodPartial1(DOMString value);
diff --git a/third_party/WebKit/Source/bindings/tests/idls/modules/TestInterface5.idl b/third_party/WebKit/Source/bindings/tests/idls/modules/TestInterface5.idl index 024a328..95003ff 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/modules/TestInterface5.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/modules/TestInterface5.idl
@@ -41,7 +41,7 @@ DoNotCheckConstants, ImplementedAs=TestInterface5Implementation, RuntimeEnabled=FeatureName, - Exposed=(Worker,Window), + Exposed=(Worker,Window) ] interface TestInterface5 : TestInterfaceEmpty { // members needed to test [ImplementedAs], as this affect attribute // configuration and method configuration
diff --git a/third_party/WebKit/Source/bindings/tests/idls/modules/TestInterfacePartial3.idl b/third_party/WebKit/Source/bindings/tests/idls/modules/TestInterfacePartial3.idl index 33e70f3..a6507dc 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/modules/TestInterfacePartial3.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/modules/TestInterfacePartial3.idl
@@ -29,7 +29,7 @@ */ [ - ImplementedAs=TestInterfacePartial3Implementation, + ImplementedAs=TestInterfacePartial3Implementation ] partial interface TestInterface { const unsigned short PARTIAL3_UNSIGNED_SHORT = 0;
diff --git a/third_party/WebKit/Source/bindings/tests/idls/modules/TestInterfacePartial4.idl b/third_party/WebKit/Source/bindings/tests/idls/modules/TestInterfacePartial4.idl index 0b7056b..90a8cb3 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/modules/TestInterfacePartial4.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/modules/TestInterfacePartial4.idl
@@ -7,7 +7,7 @@ // [OriginTrialEnabled] attribute cannot be applied with [RuntimeEnabled]. [ - OriginTrialEnabled=OriginTrialPartialFeature, // Conflicts with RuntimeEnabled + OriginTrialEnabled=OriginTrialPartialFeature // Conflicts with RuntimeEnabled ] partial interface TestInterface { const unsigned short PARTIAL4_UNSIGNED_SHORT = 4;
diff --git a/third_party/WebKit/Source/core/BUILD.gn b/third_party/WebKit/Source/core/BUILD.gn index 69324ba4..768644e0 100644 --- a/third_party/WebKit/Source/core/BUILD.gn +++ b/third_party/WebKit/Source/core/BUILD.gn
@@ -1151,6 +1151,7 @@ "animation/TimingCalculationsTest.cpp", "animation/TimingInputTest.cpp", "clipboard/DataObjectTest.cpp", + "clipboard/DataTransferTest.cpp", "css/ActiveStyleSheetsTest.cpp", "css/AffectedByPseudoTest.cpp", "css/CSSCalculationValueTest.cpp", @@ -1250,7 +1251,6 @@ "frame/FrameTestHelpers.h", "frame/HistoryTest.cpp", "frame/ImageBitmapTest.cpp", - "frame/LocalFrameTest.cpp", "frame/LocalFrameViewTest.cpp", "frame/OriginsUsingFeaturesTest.cpp", "frame/PerformanceMonitorTest.cpp", @@ -1290,6 +1290,7 @@ "html/canvas/CanvasAsyncBlobCreatorTest.cpp", "html/canvas/CanvasFontCacheTest.cpp", "html/forms/EmailInputTypeTest.cpp", + "html/forms/ExternalPopupMenuTest.cpp", "html/forms/FileInputTypeTest.cpp", "html/forms/OptionListTest.cpp", "html/forms/PasswordInputTypeTest.cpp", @@ -1392,6 +1393,7 @@ "loader/resource/MultipartImageResourceParserTest.cpp", "origin_trials/OriginTrialContextTest.cpp", "page/ChromeClientTest.cpp", + "page/DragControllerTest.cpp", "page/EffectiveNavigationPolicyTest.cpp", "page/FocusControllerTest.cpp", "page/PagePopupClientTest.cpp",
diff --git a/third_party/WebKit/Source/core/animation/Animation.idl b/third_party/WebKit/Source/core/animation/Animation.idl index 534b54d9..eb2b2a3 100644 --- a/third_party/WebKit/Source/core/animation/Animation.idl +++ b/third_party/WebKit/Source/core/animation/Animation.idl
@@ -38,7 +38,7 @@ ConstructorCallWith=ExecutionContext, RaisesException=Constructor, ActiveScriptWrappable, - DependentLifetime, + DependentLifetime ] interface Animation : EventTarget { // TODO(suzyh): Make timeline mutable. [RuntimeEnabled=WebAnimationsAPI] attribute AnimationEffectReadOnly? effect;
diff --git a/third_party/WebKit/Source/core/animation/AnimationEffectReadOnly.idl b/third_party/WebKit/Source/core/animation/AnimationEffectReadOnly.idl index e32cb79b..5f46ae56 100644 --- a/third_party/WebKit/Source/core/animation/AnimationEffectReadOnly.idl +++ b/third_party/WebKit/Source/core/animation/AnimationEffectReadOnly.idl
@@ -31,7 +31,7 @@ // https://w3c.github.io/web-animations/#the-animationeffectreadonly-interface [ - RuntimeEnabled=WebAnimationsAPI, + RuntimeEnabled=WebAnimationsAPI ] interface AnimationEffectReadOnly { readonly attribute AnimationEffectTimingReadOnly timing; ComputedTimingProperties getComputedTiming();
diff --git a/third_party/WebKit/Source/core/animation/AnimationEffectTiming.idl b/third_party/WebKit/Source/core/animation/AnimationEffectTiming.idl index 5f91c5a3..502da5e 100644 --- a/third_party/WebKit/Source/core/animation/AnimationEffectTiming.idl +++ b/third_party/WebKit/Source/core/animation/AnimationEffectTiming.idl
@@ -5,7 +5,7 @@ // https://w3c.github.io/web-animations/#the-animationeffecttiming-interface [ - RuntimeEnabled=WebAnimationsAPI, + RuntimeEnabled=WebAnimationsAPI ] interface AnimationEffectTiming : AnimationEffectTimingReadOnly { attribute double delay; attribute double endDelay;
diff --git a/third_party/WebKit/Source/core/animation/AnimationEffectTimingReadOnly.idl b/third_party/WebKit/Source/core/animation/AnimationEffectTimingReadOnly.idl index 773e9e48..294bb70 100644 --- a/third_party/WebKit/Source/core/animation/AnimationEffectTimingReadOnly.idl +++ b/third_party/WebKit/Source/core/animation/AnimationEffectTimingReadOnly.idl
@@ -6,7 +6,7 @@ // TODO(suzyh): Use enums instead of DOMStrings where specced [ - RuntimeEnabled=WebAnimationsAPI, + RuntimeEnabled=WebAnimationsAPI ] interface AnimationEffectTimingReadOnly { readonly attribute double delay; readonly attribute double endDelay;
diff --git a/third_party/WebKit/Source/core/animation/AnimationTimeline.idl b/third_party/WebKit/Source/core/animation/AnimationTimeline.idl index 79726c0..b28122e 100644 --- a/third_party/WebKit/Source/core/animation/AnimationTimeline.idl +++ b/third_party/WebKit/Source/core/animation/AnimationTimeline.idl
@@ -5,7 +5,7 @@ // https://w3c.github.io/web-animations/#the-animationtimeline-interface [ - RuntimeEnabled=WebAnimationsAPI, + RuntimeEnabled=WebAnimationsAPI ] interface AnimationTimeline { attribute double? currentTime;
diff --git a/third_party/WebKit/Source/core/animation/DocumentAnimation.idl b/third_party/WebKit/Source/core/animation/DocumentAnimation.idl index 197e1b0..57d618e 100644 --- a/third_party/WebKit/Source/core/animation/DocumentAnimation.idl +++ b/third_party/WebKit/Source/core/animation/DocumentAnimation.idl
@@ -5,7 +5,7 @@ // https://w3c.github.io/web-animations/#extensions-to-the-document-interface [ - RuntimeEnabled=WebAnimationsAPI, + RuntimeEnabled=WebAnimationsAPI ] partial interface Document { readonly attribute DocumentTimeline timeline; };
diff --git a/third_party/WebKit/Source/core/animation/DocumentTimeline.idl b/third_party/WebKit/Source/core/animation/DocumentTimeline.idl index ba3ba5b..71237885 100644 --- a/third_party/WebKit/Source/core/animation/DocumentTimeline.idl +++ b/third_party/WebKit/Source/core/animation/DocumentTimeline.idl
@@ -5,6 +5,6 @@ // https://w3c.github.io/web-animations/#the-documenttimeline-interface [ - RuntimeEnabled=WebAnimationsAPI, + RuntimeEnabled=WebAnimationsAPI ] interface DocumentTimeline : AnimationTimeline { };
diff --git a/third_party/WebKit/Source/core/animation/KeyframeEffect.idl b/third_party/WebKit/Source/core/animation/KeyframeEffect.idl index cc119b8e..a02fdd2 100644 --- a/third_party/WebKit/Source/core/animation/KeyframeEffect.idl +++ b/third_party/WebKit/Source/core/animation/KeyframeEffect.idl
@@ -34,6 +34,6 @@ Constructor(Element? target, (sequence<Dictionary> or Dictionary)? effect, optional (unrestricted double or KeyframeEffectOptions) options), ConstructorCallWith=ExecutionContext, RaisesException=Constructor, - RuntimeEnabled=WebAnimationsAPI, + RuntimeEnabled=WebAnimationsAPI ] interface KeyframeEffect : KeyframeEffectReadOnly { };
diff --git a/third_party/WebKit/Source/core/animation/KeyframeEffectReadOnly.idl b/third_party/WebKit/Source/core/animation/KeyframeEffectReadOnly.idl index c4d024f..e0fcf922 100644 --- a/third_party/WebKit/Source/core/animation/KeyframeEffectReadOnly.idl +++ b/third_party/WebKit/Source/core/animation/KeyframeEffectReadOnly.idl
@@ -8,6 +8,6 @@ Constructor(Element? target, (sequence<Dictionary> or Dictionary)? effect, optional (unrestricted double or KeyframeEffectOptions) options), ConstructorCallWith=ExecutionContext, RaisesException=Constructor, - RuntimeEnabled=WebAnimationsAPI, + RuntimeEnabled=WebAnimationsAPI ] interface KeyframeEffectReadOnly : AnimationEffectReadOnly { };
diff --git a/third_party/WebKit/Source/core/clipboard/DataTransfer.cpp b/third_party/WebKit/Source/core/clipboard/DataTransfer.cpp index c0e335f..8aed56e7 100644 --- a/third_party/WebKit/Source/core/clipboard/DataTransfer.cpp +++ b/third_party/WebKit/Source/core/clipboard/DataTransfer.cpp
@@ -261,7 +261,7 @@ if (drag_image_element_) { loc = drag_loc_; - return frame->NodeImage(*drag_image_element_); + return NodeImage(*frame, *drag_image_element_); } if (drag_image_) { loc = drag_loc_;
diff --git a/third_party/WebKit/Source/core/clipboard/DataTransfer.h b/third_party/WebKit/Source/core/clipboard/DataTransfer.h index e9f8cce..68cab15 100644 --- a/third_party/WebKit/Source/core/clipboard/DataTransfer.h +++ b/third_party/WebKit/Source/core/clipboard/DataTransfer.h
@@ -44,6 +44,8 @@ class FrameSelection; class LocalFrame; class Node; +class PaintRecordBuilder; +class PropertyTreeState; // Used for drag and drop and copy/paste. // Drag and Drop: @@ -132,6 +134,16 @@ DataObject* GetDataObject() const; + static FloatRect DeviceSpaceBounds(const FloatRect, const LocalFrame&); + static std::unique_ptr<DragImage> CreateDragImageForFrame( + const LocalFrame&, + float, + RespectImageOrientationEnum, + const FloatRect&, + PaintRecordBuilder&, + const PropertyTreeState&); + static std::unique_ptr<DragImage> NodeImage(const LocalFrame&, Node&); + DECLARE_TRACE(); private:
diff --git a/third_party/WebKit/Source/core/clipboard/DataTransfer.idl b/third_party/WebKit/Source/core/clipboard/DataTransfer.idl index 29aad5d..e31df69 100644 --- a/third_party/WebKit/Source/core/clipboard/DataTransfer.idl +++ b/third_party/WebKit/Source/core/clipboard/DataTransfer.idl
@@ -29,7 +29,7 @@ // https://html.spec.whatwg.org/#the-datatransfer-interface [ - Constructor, + Constructor ] interface DataTransfer { attribute DOMString dropEffect; attribute DOMString effectAllowed;
diff --git a/third_party/WebKit/Source/core/frame/LocalFrameTest.cpp b/third_party/WebKit/Source/core/clipboard/DataTransferTest.cpp similarity index 66% rename from third_party/WebKit/Source/core/frame/LocalFrameTest.cpp rename to third_party/WebKit/Source/core/clipboard/DataTransferTest.cpp index 7d0b841..3cf1357 100644 --- a/third_party/WebKit/Source/core/frame/LocalFrameTest.cpp +++ b/third_party/WebKit/Source/core/clipboard/DataTransferTest.cpp
@@ -2,13 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "core/frame/LocalFrame.h" +#include "core/clipboard/DataTransfer.h" -#include "core/editing/FrameSelection.h" +#include "core/frame/LocalFrame.h" #include "core/frame/LocalFrameView.h" #include "core/frame/PerformanceMonitor.h" -#include "core/frame/VisualViewport.h" -#include "core/html/HTMLElement.h" #include "core/layout/LayoutObject.h" #include "core/testing/DummyPageHolder.h" #include "core/timing/Performance.h" @@ -17,10 +15,10 @@ namespace blink { -class LocalFrameTest : public ::testing::Test { +class DataTransferTest : public ::testing::Test { protected: - LocalFrameTest() = default; - ~LocalFrameTest() override = default; + DataTransferTest() = default; + ~DataTransferTest() override = default; Document& GetDocument() const { return dummy_page_holder_->GetDocument(); } LocalFrame& GetFrame() const { return *GetDocument().GetFrame(); } @@ -45,18 +43,19 @@ Persistent<Performance> performance_; }; -TEST_F(LocalFrameTest, nodeImage) { +TEST_F(DataTransferTest, nodeImage) { SetBodyContent( "<style>" "#sample { width: 100px; height: 100px; }" "</style>" "<div id=sample></div>"); Element* sample = GetDocument().getElementById("sample"); - const std::unique_ptr<DragImage> image = GetFrame().NodeImage(*sample); + const std::unique_ptr<DragImage> image = + DataTransfer::NodeImage(GetFrame(), *sample); EXPECT_EQ(IntSize(100, 100), image->Size()); } -TEST_F(LocalFrameTest, nodeImageWithNestedElement) { +TEST_F(DataTransferTest, nodeImageWithNestedElement) { SetBodyContent( "<style>" "div { -webkit-user-drag: element }" @@ -64,14 +63,15 @@ "</style>" "<div id=sample><span>Green when dragged</span></div>"); Element* sample = GetDocument().getElementById("sample"); - const std::unique_ptr<DragImage> image = GetFrame().NodeImage(*sample); + const std::unique_ptr<DragImage> image = + DataTransfer::NodeImage(GetFrame(), *sample); EXPECT_EQ( Color(0, 255, 0), sample->firstChild()->GetLayoutObject()->ResolveColor(CSSPropertyColor)) << "Descendants node should have :-webkit-drag."; } -TEST_F(LocalFrameTest, nodeImageWithPsuedoClassWebKitDrag) { +TEST_F(DataTransferTest, nodeImageWithPsuedoClassWebKitDrag) { SetBodyContent( "<style>" "#sample { width: 100px; height: 100px; }" @@ -79,12 +79,13 @@ "</style>" "<div id=sample></div>"); Element* sample = GetDocument().getElementById("sample"); - const std::unique_ptr<DragImage> image = GetFrame().NodeImage(*sample); + const std::unique_ptr<DragImage> image = + DataTransfer::NodeImage(GetFrame(), *sample); EXPECT_EQ(IntSize(200, 200), image->Size()) << ":-webkit-drag should affect dragged image."; } -TEST_F(LocalFrameTest, nodeImageWithoutDraggedLayoutObject) { +TEST_F(DataTransferTest, nodeImageWithoutDraggedLayoutObject) { SetBodyContent( "<style>" "#sample { width: 100px; height: 100px; }" @@ -92,11 +93,12 @@ "</style>" "<div id=sample></div>"); Element* sample = GetDocument().getElementById("sample"); - const std::unique_ptr<DragImage> image = GetFrame().NodeImage(*sample); + const std::unique_ptr<DragImage> image = + DataTransfer::NodeImage(GetFrame(), *sample); EXPECT_EQ(nullptr, image.get()) << ":-webkit-drag blows away layout object"; } -TEST_F(LocalFrameTest, nodeImageWithChangingLayoutObject) { +TEST_F(DataTransferTest, nodeImageWithChangingLayoutObject) { SetBodyContent( "<style>" "#sample { color: blue; }" @@ -106,7 +108,8 @@ Element* sample = GetDocument().getElementById("sample"); UpdateAllLifecyclePhases(); LayoutObject* before_layout_object = sample->GetLayoutObject(); - const std::unique_ptr<DragImage> image = GetFrame().NodeImage(*sample); + const std::unique_ptr<DragImage> image = + DataTransfer::NodeImage(GetFrame(), *sample); EXPECT_TRUE(sample->GetLayoutObject() != before_layout_object) << ":-webkit-drag causes sample to have different layout object."; @@ -122,25 +125,4 @@ << "#sample doesn't have :-webkit-drag."; } -TEST_F(LocalFrameTest, dragImageForSelectionUsesPageScaleFactor) { - SetBodyContent( - "<div>Hello world! This tests that the bitmap for drag image is scaled " - "by page scale factor</div>"); - GetFrame().GetPage()->GetVisualViewport().SetScale(1); - GetFrame().Selection().SelectAll(); - UpdateAllLifecyclePhases(); - const std::unique_ptr<DragImage> image1( - GetFrame().DragImageForSelection(0.75f)); - GetFrame().GetPage()->GetVisualViewport().SetScale(2); - GetFrame().Selection().SelectAll(); - UpdateAllLifecyclePhases(); - const std::unique_ptr<DragImage> image2( - GetFrame().DragImageForSelection(0.75f)); - - EXPECT_GT(image1->Size().Width(), 0); - EXPECT_GT(image1->Size().Height(), 0); - EXPECT_EQ(image1->Size().Width() * 2, image2->Size().Width()); - EXPECT_EQ(image1->Size().Height() * 2, image2->Size().Height()); -} - } // namespace blink
diff --git a/third_party/WebKit/Source/core/css/CSS.idl b/third_party/WebKit/Source/core/css/CSS.idl index 7ae7355..52f353a6 100644 --- a/third_party/WebKit/Source/core/css/CSS.idl +++ b/third_party/WebKit/Source/core/css/CSS.idl
@@ -30,7 +30,7 @@ // https://dev.w3.org/csswg/css-conditional/#the-css-interface [ - ImplementedAs=DOMWindowCSS, + ImplementedAs=DOMWindowCSS ] interface CSS { static boolean supports(DOMString property, DOMString value); static boolean supports(DOMString conditionText);
diff --git a/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp b/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp index 569f1a6..9e4857a 100644 --- a/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp +++ b/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp
@@ -49,8 +49,8 @@ // ends with .eot. If so, we'll go ahead and assume that we shouldn't load // it. if (format_.IsEmpty()) { - return absolute_resource_.StartsWith("data:", kTextCaseASCIIInsensitive) || - !absolute_resource_.EndsWith(".eot", kTextCaseASCIIInsensitive); + return absolute_resource_.StartsWithIgnoringASCIICase("data:") || + !absolute_resource_.EndsWithIgnoringASCIICase(".eot"); } return FontCustomPlatformData::SupportsFormat(format_);
diff --git a/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h b/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h index c29d85a..b8144cbc 100644 --- a/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h +++ b/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
@@ -672,13 +672,13 @@ inline CSSIdentifierValue::CSSIdentifierValue(EFlexWrap e) : CSSValue(kIdentifierClass) { switch (e) { - case kFlexNoWrap: + case EFlexWrap::kNowrap: value_id_ = CSSValueNowrap; break; - case kFlexWrap: + case EFlexWrap::kWrap: value_id_ = CSSValueWrap; break; - case kFlexWrapReverse: + case EFlexWrap::kWrapReverse: value_id_ = CSSValueWrapReverse; break; } @@ -688,17 +688,17 @@ inline EFlexWrap CSSIdentifierValue::ConvertTo() const { switch (value_id_) { case CSSValueNowrap: - return kFlexNoWrap; + return EFlexWrap::kNowrap; case CSSValueWrap: - return kFlexWrap; + return EFlexWrap::kWrap; case CSSValueWrapReverse: - return kFlexWrapReverse; + return EFlexWrap::kWrapReverse; default: break; } NOTREACHED(); - return kFlexNoWrap; + return EFlexWrap::kNowrap; } template <>
diff --git a/third_party/WebKit/Source/core/css/CSSProperties.json5 b/third_party/WebKit/Source/core/css/CSSProperties.json5 index d7c367ec..21077373 100644 --- a/third_party/WebKit/Source/core/css/CSSProperties.json5 +++ b/third_party/WebKit/Source/core/css/CSSProperties.json5
@@ -1244,7 +1244,7 @@ name: "flex-wrap", type_name: "EFlexWrap", field_template: "storage_only", - default_value: "kFlexNoWrap", + default_value: "EFlexWrap::kNowrap", field_size: 2, field_group: "rare-non-inherited->flexible-box", },
diff --git a/third_party/WebKit/Source/core/css/CSSRule.idl b/third_party/WebKit/Source/core/css/CSSRule.idl index 155db65..ba84086 100644 --- a/third_party/WebKit/Source/core/css/CSSRule.idl +++ b/third_party/WebKit/Source/core/css/CSSRule.idl
@@ -21,7 +21,7 @@ // https://dev.w3.org/csswg/cssom/#the-cssrule-interface [ - DependentLifetime, + DependentLifetime ] interface CSSRule { const unsigned short STYLE_RULE = 1; const unsigned short CHARSET_RULE = 2;
diff --git a/third_party/WebKit/Source/core/css/CSSRuleList.idl b/third_party/WebKit/Source/core/css/CSSRuleList.idl index 7b1edb77..6caa411 100644 --- a/third_party/WebKit/Source/core/css/CSSRuleList.idl +++ b/third_party/WebKit/Source/core/css/CSSRuleList.idl
@@ -27,7 +27,7 @@ // TODO(foolip): CSSRuleList should be an [ArrayClass]. [ - DependentLifetime, + DependentLifetime ] interface CSSRuleList { [Measure] getter CSSRule? item(unsigned long index); readonly attribute unsigned long length;
diff --git a/third_party/WebKit/Source/core/css/CSSStyleDeclaration.idl b/third_party/WebKit/Source/core/css/CSSStyleDeclaration.idl index 22df43b..9f4633d 100644 --- a/third_party/WebKit/Source/core/css/CSSStyleDeclaration.idl +++ b/third_party/WebKit/Source/core/css/CSSStyleDeclaration.idl
@@ -21,7 +21,7 @@ // https://dev.w3.org/csswg/cssom/#the-cssstyledeclaration-interface [ - DependentLifetime, + DependentLifetime ] interface CSSStyleDeclaration { [CEReactions, RaisesException=Setter] attribute DOMString cssText; readonly attribute unsigned long length;
diff --git a/third_party/WebKit/Source/core/css/CSSStyleRule.idl b/third_party/WebKit/Source/core/css/CSSStyleRule.idl index b490ceb..9f492956 100644 --- a/third_party/WebKit/Source/core/css/CSSStyleRule.idl +++ b/third_party/WebKit/Source/core/css/CSSStyleRule.idl
@@ -21,7 +21,7 @@ // https://dev.w3.org/csswg/cssom/#the-cssstylerule-interface [ - DependentLifetime, + DependentLifetime ] interface CSSStyleRule : CSSRule { attribute DOMString selectorText; [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
diff --git a/third_party/WebKit/Source/core/css/CSSStyleSheet.idl b/third_party/WebKit/Source/core/css/CSSStyleSheet.idl index 52fa6a0..5e765ba9 100644 --- a/third_party/WebKit/Source/core/css/CSSStyleSheet.idl +++ b/third_party/WebKit/Source/core/css/CSSStyleSheet.idl
@@ -21,7 +21,7 @@ // https://dev.w3.org/csswg/cssom/#the-cssstylesheet-interface [ - DependentLifetime, + DependentLifetime ] interface CSSStyleSheet : StyleSheet { readonly attribute CSSRule? ownerRule; [SameObject] readonly attribute CSSRuleList cssRules;
diff --git a/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5 b/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5 index fc1bfa35..9d1e2c72 100644 --- a/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5 +++ b/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
@@ -1032,7 +1032,7 @@ type_name: "AutoRepeatType", field_group: "rare-non-inherited->grid", field_size: 3, - default_value: "kNoAutoRepeat", + default_value: "AutoRepeatType::kNoAutoRepeat", }, { name: "GridAutoRepeatRowsType", @@ -1040,7 +1040,7 @@ type_name: "AutoRepeatType", field_group: "rare-non-inherited->grid", field_size: 3, - default_value: "kNoAutoRepeat", + default_value: "AutoRepeatType::kNoAutoRepeat", }, ], }
diff --git a/third_party/WebKit/Source/core/css/FontFace.idl b/third_party/WebKit/Source/core/css/FontFace.idl index 3b57d5ef..8d94ec59 100644 --- a/third_party/WebKit/Source/core/css/FontFace.idl +++ b/third_party/WebKit/Source/core/css/FontFace.idl
@@ -44,7 +44,7 @@ // FIXME: This should be (DOMString or BinaryData), where BinaryData is typedef of (ArrayBuffer or ArrayBufferView) Constructor(DOMString family, (DOMString or ArrayBuffer or ArrayBufferView) source, optional FontFaceDescriptors descriptors), ConstructorCallWith=ExecutionContext, - MeasureAs=FontFaceConstructor, + MeasureAs=FontFaceConstructor ] interface FontFace { [RaisesException=Setter, SetterCallWith=ExecutionContext] attribute DOMString family; [RaisesException=Setter, SetterCallWith=ExecutionContext] attribute DOMString style;
diff --git a/third_party/WebKit/Source/core/css/FontFaceSet.idl b/third_party/WebKit/Source/core/css/FontFaceSet.idl index e9cc1438..f636dada 100644 --- a/third_party/WebKit/Source/core/css/FontFaceSet.idl +++ b/third_party/WebKit/Source/core/css/FontFaceSet.idl
@@ -36,7 +36,7 @@ // have a constructor, and thus not have [NoInterfaceObject]. [ DependentLifetime, - NoInterfaceObject, + NoInterfaceObject ] interface FontFaceSet : EventTarget { setlike<FontFace>;
diff --git a/third_party/WebKit/Source/core/css/MediaQueryList.idl b/third_party/WebKit/Source/core/css/MediaQueryList.idl index b84090f..4f1175c 100644 --- a/third_party/WebKit/Source/core/css/MediaQueryList.idl +++ b/third_party/WebKit/Source/core/css/MediaQueryList.idl
@@ -21,7 +21,7 @@ [ ActiveScriptWrappable, - DependentLifetime, + DependentLifetime ] interface MediaQueryList : EventTarget { readonly attribute DOMString media; readonly attribute boolean matches;
diff --git a/third_party/WebKit/Source/core/css/StyleMedia.idl b/third_party/WebKit/Source/core/css/StyleMedia.idl index 7ac7b727..5e11e72 100644 --- a/third_party/WebKit/Source/core/css/StyleMedia.idl +++ b/third_party/WebKit/Source/core/css/StyleMedia.idl
@@ -32,7 +32,7 @@ // TODO(foolip): Remove this interface. https://crbug.com/692839 [ - NoInterfaceObject, + NoInterfaceObject ] interface StyleMedia { [MeasureAs=StyleMediaType] readonly attribute DOMString type; [MeasureAs=StyleMediaMatchMedium] boolean matchMedium([Default=Undefined] optional DOMString mediaquery);
diff --git a/third_party/WebKit/Source/core/css/StyleSheet.idl b/third_party/WebKit/Source/core/css/StyleSheet.idl index d5152e44..d9a677f 100644 --- a/third_party/WebKit/Source/core/css/StyleSheet.idl +++ b/third_party/WebKit/Source/core/css/StyleSheet.idl
@@ -21,7 +21,7 @@ // https://dev.w3.org/csswg/cssom/#the-stylesheet-interface [ - DependentLifetime, + DependentLifetime ] interface StyleSheet { readonly attribute DOMString type; readonly attribute DOMString? href;
diff --git a/third_party/WebKit/Source/core/css/StyleSheetList.idl b/third_party/WebKit/Source/core/css/StyleSheetList.idl index 64ac69f..b75f7c1 100644 --- a/third_party/WebKit/Source/core/css/StyleSheetList.idl +++ b/third_party/WebKit/Source/core/css/StyleSheetList.idl
@@ -22,7 +22,7 @@ // TODO(foolip): StyleSheetList should be an [ArrayClass]. [ - DependentLifetime, + DependentLifetime ] interface StyleSheetList { [Measure] getter StyleSheet? item(unsigned long index); readonly attribute unsigned long length;
diff --git a/third_party/WebKit/Source/core/css/WebKitCSSMatrix.idl b/third_party/WebKit/Source/core/css/WebKitCSSMatrix.idl index d9227cf0..76647fa 100644 --- a/third_party/WebKit/Source/core/css/WebKitCSSMatrix.idl +++ b/third_party/WebKit/Source/core/css/WebKitCSSMatrix.idl
@@ -28,7 +28,7 @@ Constructor(optional DOMString cssValue = null), ConstructorCallWith=ExecutionContext, ImplementedAs=CSSMatrix, - RaisesException=Constructor, + RaisesException=Constructor ] interface WebKitCSSMatrix { // These attributes are simple aliases for certain elements of the 4x4 matrix
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSMatrixComponent.h b/third_party/WebKit/Source/core/css/cssom/CSSMatrixComponent.h index cd4f45f..1a2800dc 100644 --- a/third_party/WebKit/Source/core/css/cssom/CSSMatrixComponent.h +++ b/third_party/WebKit/Source/core/css/cssom/CSSMatrixComponent.h
@@ -10,29 +10,33 @@ namespace blink { -class DOMMatrixReadOnly; +class DOMMatrix; +// Represents a matrix value in a CSSTransformValue used for properties like +// "transform". +// See CSSMatrixComponent.idl for more information about this class. class CORE_EXPORT CSSMatrixComponent final : public CSSTransformComponent { WTF_MAKE_NONCOPYABLE(CSSMatrixComponent); DEFINE_WRAPPERTYPEINFO(); public: + // Constructor defined in the IDL. static CSSMatrixComponent* Create(DOMMatrixReadOnly*); + // Blink-internal ways of creating CSSMatrixComponents. static CSSMatrixComponent* FromCSSValue(const CSSFunctionValue& value) { return nullptr; } + // Getters and setters for attributes defined in the IDL. DOMMatrix* matrix() const { return matrix_; } - void setMatrix(DOMMatrix* matrix) { matrix_ = matrix; } + // Internal methods - from CSSTransformComponent. TransformComponentType GetType() const override { return is2d_ ? kMatrixType : kMatrix3DType; } - DOMMatrix* AsMatrix() const override { return matrix(); } - CSSFunctionValue* ToCSSValue() const override; DEFINE_INLINE_VIRTUAL_TRACE() {
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSMatrixComponent.idl b/third_party/WebKit/Source/core/css/cssom/CSSMatrixComponent.idl index 0852e98..a2a6738 100644 --- a/third_party/WebKit/Source/core/css/cssom/CSSMatrixComponent.idl +++ b/third_party/WebKit/Source/core/css/cssom/CSSMatrixComponent.idl
@@ -10,7 +10,7 @@ Constructor(DOMMatrixReadOnly matrix), Exposed=(Window,PaintWorklet), RuntimeEnabled=CSSTypedOM, - RuntimeEnabled=GeometryInterfaces, + RuntimeEnabled=GeometryInterfaces ] interface CSSMatrixComponent : CSSTransformComponent { attribute DOMMatrix matrix; };
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSNumericValue.idl b/third_party/WebKit/Source/core/css/cssom/CSSNumericValue.idl index 0f26ef9..b24f59c 100644 --- a/third_party/WebKit/Source/core/css/cssom/CSSNumericValue.idl +++ b/third_party/WebKit/Source/core/css/cssom/CSSNumericValue.idl
@@ -5,7 +5,7 @@ // CSSNumericValue is the base class for numeric and length typed CSS Values. // https://drafts.css-houdini.org/css-typed-om/#numeric-objects [ - Exposed(Window CSSTypedOM, PaintWorklet CSSPaintAPI), + Exposed(Window CSSTypedOM, PaintWorklet CSSPaintAPI) ] interface CSSNumericValue : CSSStyleValue { [RaisesException, NewObject] CSSNumericValue add(CSSNumericValue value); [RaisesException, NewObject] CSSNumericValue sub(CSSNumericValue value);
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSPerspective.h b/third_party/WebKit/Source/core/css/cssom/CSSPerspective.h index ab30ff0..8912936b 100644 --- a/third_party/WebKit/Source/core/css/cssom/CSSPerspective.h +++ b/third_party/WebKit/Source/core/css/cssom/CSSPerspective.h
@@ -14,24 +14,30 @@ class DOMMatrix; class ExceptionState; +// Represents a perspective value in a CSSTransformValue used for properties +// like "transform". +// See CSSPerspective.idl for more information about this class. class CORE_EXPORT CSSPerspective : public CSSTransformComponent { WTF_MAKE_NONCOPYABLE(CSSPerspective); DEFINE_WRAPPERTYPEINFO(); public: + // Constructor defined in the IDL. static CSSPerspective* Create(const CSSNumericValue*, ExceptionState&); + + // Blink-internal ways of creating CSSPerspectives. static CSSPerspective* FromCSSValue(const CSSFunctionValue&); + // Getters and setters for attributes defined in the IDL. // Bindings require a non const return value. CSSNumericValue* length() const { return const_cast<CSSNumericValue*>(length_.Get()); } + // Internal methods - from CSSTransformComponent. TransformComponentType GetType() const override { return kPerspectiveType; } - // TODO: Implement AsMatrix for CSSPerspective. DOMMatrix* AsMatrix() const override { return nullptr; } - CSSFunctionValue* ToCSSValue() const override; DEFINE_INLINE_VIRTUAL_TRACE() {
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSPositionValue.idl b/third_party/WebKit/Source/core/css/cssom/CSSPositionValue.idl index 42622420..405f8ed 100644 --- a/third_party/WebKit/Source/core/css/cssom/CSSPositionValue.idl +++ b/third_party/WebKit/Source/core/css/cssom/CSSPositionValue.idl
@@ -7,7 +7,7 @@ // Spec: https://drafts.css-houdini.org/css-typed-om/#positionvalue-objects [ Constructor(CSSNumericValue x, CSSNumericValue y), - Exposed(Window CSSTypedOM, PaintWorklet CSSPaintAPI), + Exposed(Window CSSTypedOM, PaintWorklet CSSPaintAPI) ] interface CSSPositionValue : CSSStyleValue { readonly attribute CSSNumericValue x; readonly attribute CSSNumericValue y;
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSResourceValue.idl b/third_party/WebKit/Source/core/css/cssom/CSSResourceValue.idl index d8f2996..30e93b9 100644 --- a/third_party/WebKit/Source/core/css/cssom/CSSResourceValue.idl +++ b/third_party/WebKit/Source/core/css/cssom/CSSResourceValue.idl
@@ -10,7 +10,7 @@ }; [ - Exposed(Window CSSTypedOM, PaintWorklet CSSPaintAPI), + Exposed(Window CSSTypedOM, PaintWorklet CSSPaintAPI) ] interface CSSResourceValue : CSSStyleValue { readonly attribute CSSResourceState state; };
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSRotation.h b/third_party/WebKit/Source/core/css/cssom/CSSRotation.h index 6c3f75d..0e8b6d5 100644 --- a/third_party/WebKit/Source/core/css/cssom/CSSRotation.h +++ b/third_party/WebKit/Source/core/css/cssom/CSSRotation.h
@@ -12,15 +12,18 @@ class DOMMatrix; +// Represents a rotation value in a CSSTransformValue used for properties like +// "transform". +// See CSSRotation.idl for more information about this class. class CORE_EXPORT CSSRotation final : public CSSTransformComponent { WTF_MAKE_NONCOPYABLE(CSSRotation); DEFINE_WRAPPERTYPEINFO(); public: + // Constructors defined in the IDL. static CSSRotation* Create(const CSSNumericValue* angle_value) { return new CSSRotation(angle_value); } - static CSSRotation* Create(double x, double y, double z, @@ -28,8 +31,10 @@ return new CSSRotation(x, y, z, angle_value); } + // Blink-internal ways of creating CSSRotations. static CSSRotation* FromCSSValue(const CSSFunctionValue&); + // Getters and setters for attributes defined in the IDL. // Bindings requires returning non-const pointers. This is safe because // CSSNumericValues are immutable. CSSNumericValue* angle() const { @@ -39,10 +44,10 @@ double y() const { return y_; } double z() const { return z_; } + // Internal methods - from CSSTransformComponent. TransformComponentType GetType() const override { return is2d_ ? kRotationType : kRotation3DType; } - DOMMatrix* AsMatrix() const override { return nullptr; // TODO(meade): Implement. @@ -53,7 +58,6 @@ // angle_->to(CSSPrimitiveValue::UnitType::kDegrees)->value(), // x_, y_, z_); } - CSSFunctionValue* ToCSSValue() const override; DEFINE_INLINE_VIRTUAL_TRACE() {
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSScale.h b/third_party/WebKit/Source/core/css/cssom/CSSScale.h index bbe6e67..a285779 100644 --- a/third_party/WebKit/Source/core/css/cssom/CSSScale.h +++ b/third_party/WebKit/Source/core/css/cssom/CSSScale.h
@@ -10,36 +10,41 @@ namespace blink { +class DOMMatrix; + +// Represents a scale value in a CSSTransformValue used for properties like +// "transform". +// See CSSScale.idl for more information about this class. class CORE_EXPORT CSSScale final : public CSSTransformComponent { WTF_MAKE_NONCOPYABLE(CSSScale); DEFINE_WRAPPERTYPEINFO(); public: + // Constructors defined in the IDL. static CSSScale* Create(double x, double y) { return new CSSScale(x, y); } - static CSSScale* Create(double x, double y, double z) { return new CSSScale(x, y, z); } + // Blink-internal ways of creating CSSScales. static CSSScale* FromCSSValue(const CSSFunctionValue&); + // Getters and setters for attributes defined in the IDL. double x() const { return x_; } double y() const { return y_; } double z() const { return z_; } - void setX(double x) { x_ = x; } void setY(double y) { y_ = y; } void setZ(double z) { z_ = z; } + // Internal methods - from CSSTransformComponent. TransformComponentType GetType() const override { return is2d_ ? kScaleType : kScale3DType; } - DOMMatrix* AsMatrix() const override { DOMMatrix* result = DOMMatrix::Create(); return result->scaleSelf(x_, y_, z_); } - CSSFunctionValue* ToCSSValue() const override; private:
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSStyleValue.idl b/third_party/WebKit/Source/core/css/cssom/CSSStyleValue.idl index 14ecb15..cf09319 100644 --- a/third_party/WebKit/Source/core/css/cssom/CSSStyleValue.idl +++ b/third_party/WebKit/Source/core/css/cssom/CSSStyleValue.idl
@@ -7,7 +7,7 @@ // base CSSStyleValues. // Spec: https://drafts.css-houdini.org/css-typed-om/#stylevalue-objects [ - Exposed(Window CSSTypedOM, PaintWorklet CSSPaintAPI), + Exposed(Window CSSTypedOM, PaintWorklet CSSPaintAPI) ] interface CSSStyleValue { stringifier; // TODO(meade): Should be (CSSStyleValue or sequence<CSSStyleValue>)? instead of object?. Fix when the code generator supports this.
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSTransformComponent.h b/third_party/WebKit/Source/core/css/cssom/CSSTransformComponent.h index f607337..ebc67ea 100644 --- a/third_party/WebKit/Source/core/css/cssom/CSSTransformComponent.h +++ b/third_party/WebKit/Source/core/css/cssom/CSSTransformComponent.h
@@ -14,6 +14,10 @@ class DOMMatrix; +// CSSTransformComponent is the base class used for the representations of +// the individual CSS transforms. They are combined in a CSSTransformValue +// before they can be used as a value for properties like "transform". +// See CSSTransformComponent.idl for more information about this class. class CORE_EXPORT CSSTransformComponent : public GarbageCollectedFinalized<CSSTransformComponent>, public ScriptWrappable { @@ -34,8 +38,28 @@ kTranslation3DType }; + virtual ~CSSTransformComponent() {} + + // Blink-internal ways of creating CSSTransformComponents. static CSSTransformComponent* FromCSSValue(const CSSValue&); + // Getters and setters for attributes defined in the IDL. + bool is2D() const { return Is2DComponentType(GetType()); } + virtual String toString() const { + const CSSValue* result = ToCSSValue(); + // TODO(meade): Remove this once all the number and length types are + // rewritten. + return result ? result->CssText() : ""; + } + + // Internal methods. + virtual TransformComponentType GetType() const = 0; + virtual CSSFunctionValue* ToCSSValue() const = 0; + virtual DOMMatrix* AsMatrix() const = 0; + + DEFINE_INLINE_VIRTUAL_TRACE() {} + + protected: static bool Is2DComponentType(TransformComponentType transform_type) { return transform_type != kMatrix3DType && transform_type != kPerspectiveType && @@ -44,25 +68,6 @@ transform_type != kTranslation3DType; } - virtual ~CSSTransformComponent() {} - - virtual TransformComponentType GetType() const = 0; - - bool is2D() const { return Is2DComponentType(GetType()); } - - virtual String toString() const { - const CSSValue* result = ToCSSValue(); - // TODO(meade): Remove this once all the number and length types are - // rewritten. - return result ? result->CssText() : ""; - } - - virtual CSSFunctionValue* ToCSSValue() const = 0; - virtual DOMMatrix* AsMatrix() const = 0; - - DEFINE_INLINE_VIRTUAL_TRACE() {} - - protected: CSSTransformComponent() = default; };
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSTransformComponent.idl b/third_party/WebKit/Source/core/css/cssom/CSSTransformComponent.idl index 17090dd..fcfcbe3 100644 --- a/third_party/WebKit/Source/core/css/cssom/CSSTransformComponent.idl +++ b/third_party/WebKit/Source/core/css/cssom/CSSTransformComponent.idl
@@ -8,7 +8,7 @@ // Spec: https://drafts.css-houdini.org/css-typed-om/#csstransformcomponent [ Exposed=(Window,PaintWorklet), - RuntimeEnabled=CSSTypedOM, + RuntimeEnabled=CSSTypedOM ] interface CSSTransformComponent { stringifier; boolean is2D();
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSTransformValue.idl b/third_party/WebKit/Source/core/css/cssom/CSSTransformValue.idl index 9cd03ce6..8572f74 100644 --- a/third_party/WebKit/Source/core/css/cssom/CSSTransformValue.idl +++ b/third_party/WebKit/Source/core/css/cssom/CSSTransformValue.idl
@@ -5,7 +5,7 @@ [ Constructor(), Constructor(sequence<CSSTransformComponent> transformComponents), - Exposed(Window CSSTypedOM, PaintWorklet CSSPaintAPI), + Exposed(Window CSSTypedOM, PaintWorklet CSSPaintAPI) ] interface CSSTransformValue : CSSStyleValue { // https://github.com/w3c/css-houdini-drafts/issues/358 readonly attribute unsigned long length;
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSTranslation.h b/third_party/WebKit/Source/core/css/cssom/CSSTranslation.h index db64940..9e54dea7 100644 --- a/third_party/WebKit/Source/core/css/cssom/CSSTranslation.h +++ b/third_party/WebKit/Source/core/css/cssom/CSSTranslation.h
@@ -13,11 +13,15 @@ class DOMMatrix; class ExceptionState; +// Represents a translation value in a CSSTransformValue used for properties +// like "transform". +// See CSSTranslation.idl for more information about this class. class CORE_EXPORT CSSTranslation final : public CSSTransformComponent { WTF_MAKE_NONCOPYABLE(CSSTranslation); DEFINE_WRAPPERTYPEINFO(); public: + // Constructors defined in the IDL. static CSSTranslation* Create(CSSNumericValue* x, CSSNumericValue* y, ExceptionState&) { @@ -28,21 +32,22 @@ CSSNumericValue* z, ExceptionState&); + // Blink-internal ways of creating CSSTranslations. static CSSTranslation* FromCSSValue(const CSSFunctionValue& value) { return nullptr; } + // Getters and setters for attributes defined in the IDL. CSSNumericValue* x() const { return x_; } CSSNumericValue* y() const { return y_; } CSSNumericValue* z() const { return z_; } + // Internal methods - from CSSTransformComponent. TransformComponentType GetType() const override { return Is2D() ? kTranslationType : kTranslation3DType; } - // TODO: Implement AsMatrix for CSSTranslation. DOMMatrix* AsMatrix() const override { return nullptr; } - CSSFunctionValue* ToCSSValue() const override; DEFINE_INLINE_VIRTUAL_TRACE() {
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSUnitValues.idl b/third_party/WebKit/Source/core/css/cssom/CSSUnitValues.idl index ad2596c2..2671f1e 100644 --- a/third_party/WebKit/Source/core/css/cssom/CSSUnitValues.idl +++ b/third_party/WebKit/Source/core/css/cssom/CSSUnitValues.idl
@@ -5,7 +5,7 @@ // https://drafts.css-houdini.org/css-typed-om/#numeric-factory [ - RuntimeEnabled=CSSTypedOM, + RuntimeEnabled=CSSTypedOM ] partial interface CSS { [NewObject] static CSSUnitValue number(double value); [NewObject] static CSSUnitValue percent(double value);
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSUnparsedValue.idl b/third_party/WebKit/Source/core/css/cssom/CSSUnparsedValue.idl index d5ec81b3..434cffc 100644 --- a/third_party/WebKit/Source/core/css/cssom/CSSUnparsedValue.idl +++ b/third_party/WebKit/Source/core/css/cssom/CSSUnparsedValue.idl
@@ -6,7 +6,7 @@ // They represent a list of string fragments and variable references. // Spec: https://drafts.css-houdini.org/css-typed-om/#unparsedvalue-objects [ - Exposed(Window CSSTypedOM, PaintWorklet CSSPaintAPI), + Exposed(Window CSSTypedOM, PaintWorklet CSSPaintAPI) ] interface CSSUnparsedValue : CSSStyleValue { // https://github.com/w3c/css-houdini-drafts/issues/358 readonly attribute unsigned long length;
diff --git a/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.idl b/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.idl index e3330ee..16bd61b 100644 --- a/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.idl +++ b/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.idl
@@ -5,7 +5,7 @@ // https://drafts.css-houdini.org/css-typed-om/#the-stylepropertymap [ Exposed=(Window,PaintWorklet), - RuntimeEnabled=CSSTypedOM, + RuntimeEnabled=CSSTypedOM ] interface StylePropertyMap : StylePropertyMapReadonly { [RaisesException] void append(DOMString property, (CSSStyleValue or sequence<CSSStyleValue> or DOMString) value); [RaisesException, ImplementedAs=remove] void delete(DOMString property);
diff --git a/third_party/WebKit/Source/core/css/cssom/StylePropertyMapReadonly.idl b/third_party/WebKit/Source/core/css/cssom/StylePropertyMapReadonly.idl index fdf354b..5bfc2e2 100644 --- a/third_party/WebKit/Source/core/css/cssom/StylePropertyMapReadonly.idl +++ b/third_party/WebKit/Source/core/css/cssom/StylePropertyMapReadonly.idl
@@ -3,7 +3,7 @@ // found in the LICENSE file. [ - Exposed(Window CSSTypedOM, PaintWorklet CSSPaintAPI), + Exposed(Window CSSTypedOM, PaintWorklet CSSPaintAPI) ] interface StylePropertyMapReadonly { [RaisesException] CSSStyleValue? get(DOMString property); [RaisesException] sequence<CSSStyleValue> getAll(DOMString property);
diff --git a/third_party/WebKit/Source/core/css/cssom/WindowGetComputedStyle.idl b/third_party/WebKit/Source/core/css/cssom/WindowGetComputedStyle.idl index 00fac16b5..18501ec5 100644 --- a/third_party/WebKit/Source/core/css/cssom/WindowGetComputedStyle.idl +++ b/third_party/WebKit/Source/core/css/cssom/WindowGetComputedStyle.idl
@@ -5,7 +5,7 @@ // https://drafts.css-houdini.org/css-typed-om/#computed-stylepropertymap-objects [ - RuntimeEnabled=CSSTypedOM, + RuntimeEnabled=CSSTypedOM ] partial interface Window { [NewObject] StylePropertyMapReadonly getComputedStyleMap(Element element, optional DOMString? pseudoElement = null); };
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp index be66909..9178ad5 100644 --- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp +++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
@@ -742,8 +742,9 @@ ToCSSGridAutoRepeatValue(curr_value.Get())->AutoRepeatID(); DCHECK(auto_repeat_id == CSSValueAutoFill || auto_repeat_id == CSSValueAutoFit); - auto_repeat_type = - auto_repeat_id == CSSValueAutoFill ? kAutoFill : kAutoFit; + auto_repeat_type = auto_repeat_id == CSSValueAutoFill + ? AutoRepeatType::kAutoFill + : AutoRepeatType::kAutoFit; for (auto auto_repeat_value : ToCSSValueList(*curr_value)) { if (auto_repeat_value->IsGridLineNamesValue()) { ConvertGridLineNamesList(*auto_repeat_value, auto_repeat_index,
diff --git a/third_party/WebKit/Source/core/dom/AXObject.cpp b/third_party/WebKit/Source/core/dom/AXObject.cpp index 54224a18..5bd21075 100644 --- a/third_party/WebKit/Source/core/dom/AXObject.cpp +++ b/third_party/WebKit/Source/core/dom/AXObject.cpp
@@ -10,6 +10,7 @@ #include "platform/wtf/HashSet.h" #include "platform/wtf/text/StringHash.h" #include "platform/wtf/text/WTFString.h" +#include "public/web/WebAXEnums.h" namespace blink { @@ -96,4 +97,244 @@ return false; } +#define STATIC_ASSERT_ENUM(a, b) \ + static_assert(static_cast<int>(a) == static_cast<int>(b), \ + "mismatching enum: " #a) + +STATIC_ASSERT_ENUM(kWebAXRoleAbbr, kAbbrRole); +STATIC_ASSERT_ENUM(kWebAXRoleAlertDialog, kAlertDialogRole); +STATIC_ASSERT_ENUM(kWebAXRoleAlert, kAlertRole); +STATIC_ASSERT_ENUM(kWebAXRoleAnchor, kAnchorRole); +STATIC_ASSERT_ENUM(kWebAXRoleAnnotation, kAnnotationRole); +STATIC_ASSERT_ENUM(kWebAXRoleApplication, kApplicationRole); +STATIC_ASSERT_ENUM(kWebAXRoleArticle, kArticleRole); +STATIC_ASSERT_ENUM(kWebAXRoleAudio, kAudioRole); +STATIC_ASSERT_ENUM(kWebAXRoleBanner, kBannerRole); +STATIC_ASSERT_ENUM(kWebAXRoleBlockquote, kBlockquoteRole); +STATIC_ASSERT_ENUM(kWebAXRoleBusyIndicator, kBusyIndicatorRole); +STATIC_ASSERT_ENUM(kWebAXRoleButton, kButtonRole); +STATIC_ASSERT_ENUM(kWebAXRoleCanvas, kCanvasRole); +STATIC_ASSERT_ENUM(kWebAXRoleCaption, kCaptionRole); +STATIC_ASSERT_ENUM(kWebAXRoleCell, kCellRole); +STATIC_ASSERT_ENUM(kWebAXRoleCheckBox, kCheckBoxRole); +STATIC_ASSERT_ENUM(kWebAXRoleColorWell, kColorWellRole); +STATIC_ASSERT_ENUM(kWebAXRoleColumnHeader, kColumnHeaderRole); +STATIC_ASSERT_ENUM(kWebAXRoleColumn, kColumnRole); +STATIC_ASSERT_ENUM(kWebAXRoleComboBox, kComboBoxRole); +STATIC_ASSERT_ENUM(kWebAXRoleComplementary, kComplementaryRole); +STATIC_ASSERT_ENUM(kWebAXRoleContentInfo, kContentInfoRole); +STATIC_ASSERT_ENUM(kWebAXRoleDate, kDateRole); +STATIC_ASSERT_ENUM(kWebAXRoleDateTime, kDateTimeRole); +STATIC_ASSERT_ENUM(kWebAXRoleDefinition, kDefinitionRole); +STATIC_ASSERT_ENUM(kWebAXRoleDescriptionListDetail, kDescriptionListDetailRole); +STATIC_ASSERT_ENUM(kWebAXRoleDescriptionList, kDescriptionListRole); +STATIC_ASSERT_ENUM(kWebAXRoleDescriptionListTerm, kDescriptionListTermRole); +STATIC_ASSERT_ENUM(kWebAXRoleDetails, kDetailsRole); +STATIC_ASSERT_ENUM(kWebAXRoleDialog, kDialogRole); +STATIC_ASSERT_ENUM(kWebAXRoleDirectory, kDirectoryRole); +STATIC_ASSERT_ENUM(kWebAXRoleDisclosureTriangle, kDisclosureTriangleRole); +STATIC_ASSERT_ENUM(kWebAXRoleDocument, kDocumentRole); +STATIC_ASSERT_ENUM(kWebAXRoleEmbeddedObject, kEmbeddedObjectRole); +STATIC_ASSERT_ENUM(kWebAXRoleFeed, kFeedRole); +STATIC_ASSERT_ENUM(kWebAXRoleFigcaption, kFigcaptionRole); +STATIC_ASSERT_ENUM(kWebAXRoleFigure, kFigureRole); +STATIC_ASSERT_ENUM(kWebAXRoleFooter, kFooterRole); +STATIC_ASSERT_ENUM(kWebAXRoleForm, kFormRole); +STATIC_ASSERT_ENUM(kWebAXRoleGenericContainer, kGenericContainerRole); +STATIC_ASSERT_ENUM(kWebAXRoleGrid, kGridRole); +STATIC_ASSERT_ENUM(kWebAXRoleGroup, kGroupRole); +STATIC_ASSERT_ENUM(kWebAXRoleHeading, kHeadingRole); +STATIC_ASSERT_ENUM(kWebAXRoleIframe, kIframeRole); +STATIC_ASSERT_ENUM(kWebAXRoleIframePresentational, kIframePresentationalRole); +STATIC_ASSERT_ENUM(kWebAXRoleIgnored, kIgnoredRole); +STATIC_ASSERT_ENUM(kWebAXRoleImageMapLink, kImageMapLinkRole); +STATIC_ASSERT_ENUM(kWebAXRoleImageMap, kImageMapRole); +STATIC_ASSERT_ENUM(kWebAXRoleImage, kImageRole); +STATIC_ASSERT_ENUM(kWebAXRoleInlineTextBox, kInlineTextBoxRole); +STATIC_ASSERT_ENUM(kWebAXRoleInputTime, kInputTimeRole); +STATIC_ASSERT_ENUM(kWebAXRoleLabel, kLabelRole); +STATIC_ASSERT_ENUM(kWebAXRoleLegend, kLegendRole); +STATIC_ASSERT_ENUM(kWebAXRoleLineBreak, kLineBreakRole); +STATIC_ASSERT_ENUM(kWebAXRoleLink, kLinkRole); +STATIC_ASSERT_ENUM(kWebAXRoleListBoxOption, kListBoxOptionRole); +STATIC_ASSERT_ENUM(kWebAXRoleListBox, kListBoxRole); +STATIC_ASSERT_ENUM(kWebAXRoleListItem, kListItemRole); +STATIC_ASSERT_ENUM(kWebAXRoleListMarker, kListMarkerRole); +STATIC_ASSERT_ENUM(kWebAXRoleList, kListRole); +STATIC_ASSERT_ENUM(kWebAXRoleLog, kLogRole); +STATIC_ASSERT_ENUM(kWebAXRoleMain, kMainRole); +STATIC_ASSERT_ENUM(kWebAXRoleMark, kMarkRole); +STATIC_ASSERT_ENUM(kWebAXRoleMarquee, kMarqueeRole); +STATIC_ASSERT_ENUM(kWebAXRoleMath, kMathRole); +STATIC_ASSERT_ENUM(kWebAXRoleMenuBar, kMenuBarRole); +STATIC_ASSERT_ENUM(kWebAXRoleMenuButton, kMenuButtonRole); +STATIC_ASSERT_ENUM(kWebAXRoleMenuItem, kMenuItemRole); +STATIC_ASSERT_ENUM(kWebAXRoleMenuItemCheckBox, kMenuItemCheckBoxRole); +STATIC_ASSERT_ENUM(kWebAXRoleMenuItemRadio, kMenuItemRadioRole); +STATIC_ASSERT_ENUM(kWebAXRoleMenuListOption, kMenuListOptionRole); +STATIC_ASSERT_ENUM(kWebAXRoleMenuListPopup, kMenuListPopupRole); +STATIC_ASSERT_ENUM(kWebAXRoleMenu, kMenuRole); +STATIC_ASSERT_ENUM(kWebAXRoleMeter, kMeterRole); +STATIC_ASSERT_ENUM(kWebAXRoleNavigation, kNavigationRole); +STATIC_ASSERT_ENUM(kWebAXRoleNone, kNoneRole); +STATIC_ASSERT_ENUM(kWebAXRoleNote, kNoteRole); +STATIC_ASSERT_ENUM(kWebAXRoleOutline, kOutlineRole); +STATIC_ASSERT_ENUM(kWebAXRoleParagraph, kParagraphRole); +STATIC_ASSERT_ENUM(kWebAXRolePopUpButton, kPopUpButtonRole); +STATIC_ASSERT_ENUM(kWebAXRolePre, kPreRole); +STATIC_ASSERT_ENUM(kWebAXRolePresentational, kPresentationalRole); +STATIC_ASSERT_ENUM(kWebAXRoleProgressIndicator, kProgressIndicatorRole); +STATIC_ASSERT_ENUM(kWebAXRoleRadioButton, kRadioButtonRole); +STATIC_ASSERT_ENUM(kWebAXRoleRadioGroup, kRadioGroupRole); +STATIC_ASSERT_ENUM(kWebAXRoleRegion, kRegionRole); +STATIC_ASSERT_ENUM(kWebAXRoleRootWebArea, kRootWebAreaRole); +STATIC_ASSERT_ENUM(kWebAXRoleRowHeader, kRowHeaderRole); +STATIC_ASSERT_ENUM(kWebAXRoleRow, kRowRole); +STATIC_ASSERT_ENUM(kWebAXRoleRuby, kRubyRole); +STATIC_ASSERT_ENUM(kWebAXRoleRuler, kRulerRole); +STATIC_ASSERT_ENUM(kWebAXRoleSVGRoot, kSVGRootRole); +STATIC_ASSERT_ENUM(kWebAXRoleScrollArea, kScrollAreaRole); +STATIC_ASSERT_ENUM(kWebAXRoleScrollBar, kScrollBarRole); +STATIC_ASSERT_ENUM(kWebAXRoleSeamlessWebArea, kSeamlessWebAreaRole); +STATIC_ASSERT_ENUM(kWebAXRoleSearch, kSearchRole); +STATIC_ASSERT_ENUM(kWebAXRoleSearchBox, kSearchBoxRole); +STATIC_ASSERT_ENUM(kWebAXRoleSlider, kSliderRole); +STATIC_ASSERT_ENUM(kWebAXRoleSliderThumb, kSliderThumbRole); +STATIC_ASSERT_ENUM(kWebAXRoleSpinButtonPart, kSpinButtonPartRole); +STATIC_ASSERT_ENUM(kWebAXRoleSpinButton, kSpinButtonRole); +STATIC_ASSERT_ENUM(kWebAXRoleSplitter, kSplitterRole); +STATIC_ASSERT_ENUM(kWebAXRoleStaticText, kStaticTextRole); +STATIC_ASSERT_ENUM(kWebAXRoleStatus, kStatusRole); +STATIC_ASSERT_ENUM(kWebAXRoleSwitch, kSwitchRole); +STATIC_ASSERT_ENUM(kWebAXRoleTabGroup, kTabGroupRole); +STATIC_ASSERT_ENUM(kWebAXRoleTabList, kTabListRole); +STATIC_ASSERT_ENUM(kWebAXRoleTabPanel, kTabPanelRole); +STATIC_ASSERT_ENUM(kWebAXRoleTab, kTabRole); +STATIC_ASSERT_ENUM(kWebAXRoleTableHeaderContainer, kTableHeaderContainerRole); +STATIC_ASSERT_ENUM(kWebAXRoleTable, kTableRole); +STATIC_ASSERT_ENUM(kWebAXRoleTerm, kTermRole); +STATIC_ASSERT_ENUM(kWebAXRoleTextField, kTextFieldRole); +STATIC_ASSERT_ENUM(kWebAXRoleTime, kTimeRole); +STATIC_ASSERT_ENUM(kWebAXRoleTimer, kTimerRole); +STATIC_ASSERT_ENUM(kWebAXRoleToggleButton, kToggleButtonRole); +STATIC_ASSERT_ENUM(kWebAXRoleToolbar, kToolbarRole); +STATIC_ASSERT_ENUM(kWebAXRoleTreeGrid, kTreeGridRole); +STATIC_ASSERT_ENUM(kWebAXRoleTreeItem, kTreeItemRole); +STATIC_ASSERT_ENUM(kWebAXRoleTree, kTreeRole); +STATIC_ASSERT_ENUM(kWebAXRoleUnknown, kUnknownRole); +STATIC_ASSERT_ENUM(kWebAXRoleUserInterfaceTooltip, kUserInterfaceTooltipRole); +STATIC_ASSERT_ENUM(kWebAXRoleVideo, kVideoRole); +STATIC_ASSERT_ENUM(kWebAXRoleWebArea, kWebAreaRole); +STATIC_ASSERT_ENUM(kWebAXRoleWindow, kWindowRole); + +STATIC_ASSERT_ENUM(kWebAXStateBusy, kAXBusyState); +STATIC_ASSERT_ENUM(kWebAXStateEnabled, kAXEnabledState); +STATIC_ASSERT_ENUM(kWebAXStateExpanded, kAXExpandedState); +STATIC_ASSERT_ENUM(kWebAXStateFocusable, kAXFocusableState); +STATIC_ASSERT_ENUM(kWebAXStateFocused, kAXFocusedState); +STATIC_ASSERT_ENUM(kWebAXStateHaspopup, kAXHaspopupState); +STATIC_ASSERT_ENUM(kWebAXStateHovered, kAXHoveredState); +STATIC_ASSERT_ENUM(kWebAXStateInvisible, kAXInvisibleState); +STATIC_ASSERT_ENUM(kWebAXStateLinked, kAXLinkedState); +STATIC_ASSERT_ENUM(kWebAXStateMultiline, kAXMultilineState); +STATIC_ASSERT_ENUM(kWebAXStateMultiselectable, kAXMultiselectableState); +STATIC_ASSERT_ENUM(kWebAXStateOffscreen, kAXOffscreenState); +STATIC_ASSERT_ENUM(kWebAXStateProtected, kAXProtectedState); +STATIC_ASSERT_ENUM(kWebAXStateReadonly, kAXReadonlyState); +STATIC_ASSERT_ENUM(kWebAXStateRequired, kAXRequiredState); +STATIC_ASSERT_ENUM(kWebAXStateSelectable, kAXSelectableState); +STATIC_ASSERT_ENUM(kWebAXStateSelected, kAXSelectedState); +STATIC_ASSERT_ENUM(kWebAXStateVertical, kAXVerticalState); +STATIC_ASSERT_ENUM(kWebAXStateVisited, kAXVisitedState); + +STATIC_ASSERT_ENUM(WebAXDefaultActionVerb::kNone, AXDefaultActionVerb::kNone); +STATIC_ASSERT_ENUM(WebAXDefaultActionVerb::kActivate, + AXDefaultActionVerb::kActivate); +STATIC_ASSERT_ENUM(WebAXDefaultActionVerb::kCheck, AXDefaultActionVerb::kCheck); +STATIC_ASSERT_ENUM(WebAXDefaultActionVerb::kClick, AXDefaultActionVerb::kClick); +STATIC_ASSERT_ENUM(WebAXDefaultActionVerb::kJump, AXDefaultActionVerb::kJump); +STATIC_ASSERT_ENUM(WebAXDefaultActionVerb::kOpen, AXDefaultActionVerb::kOpen); +STATIC_ASSERT_ENUM(WebAXDefaultActionVerb::kPress, AXDefaultActionVerb::kPress); +STATIC_ASSERT_ENUM(WebAXDefaultActionVerb::kSelect, + AXDefaultActionVerb::kSelect); +STATIC_ASSERT_ENUM(WebAXDefaultActionVerb::kUncheck, + AXDefaultActionVerb::kUncheck); + +STATIC_ASSERT_ENUM(kWebAXTextDirectionLR, kAccessibilityTextDirectionLTR); +STATIC_ASSERT_ENUM(kWebAXTextDirectionRL, kAccessibilityTextDirectionRTL); +STATIC_ASSERT_ENUM(kWebAXTextDirectionTB, kAccessibilityTextDirectionTTB); +STATIC_ASSERT_ENUM(kWebAXTextDirectionBT, kAccessibilityTextDirectionBTT); + +STATIC_ASSERT_ENUM(kWebAXSortDirectionUndefined, kSortDirectionUndefined); +STATIC_ASSERT_ENUM(kWebAXSortDirectionNone, kSortDirectionNone); +STATIC_ASSERT_ENUM(kWebAXSortDirectionAscending, kSortDirectionAscending); +STATIC_ASSERT_ENUM(kWebAXSortDirectionDescending, kSortDirectionDescending); +STATIC_ASSERT_ENUM(kWebAXSortDirectionOther, kSortDirectionOther); + +STATIC_ASSERT_ENUM(kWebAXExpandedUndefined, kExpandedUndefined); +STATIC_ASSERT_ENUM(kWebAXExpandedCollapsed, kExpandedCollapsed); +STATIC_ASSERT_ENUM(kWebAXExpandedExpanded, kExpandedExpanded); + +STATIC_ASSERT_ENUM(kWebAXOrientationUndefined, + kAccessibilityOrientationUndefined); +STATIC_ASSERT_ENUM(kWebAXOrientationVertical, + kAccessibilityOrientationVertical); +STATIC_ASSERT_ENUM(kWebAXOrientationHorizontal, + kAccessibilityOrientationHorizontal); + +STATIC_ASSERT_ENUM(kWebAXAriaCurrentStateUndefined, kAriaCurrentStateUndefined); +STATIC_ASSERT_ENUM(kWebAXAriaCurrentStateFalse, kAriaCurrentStateFalse); +STATIC_ASSERT_ENUM(kWebAXAriaCurrentStateTrue, kAriaCurrentStateTrue); +STATIC_ASSERT_ENUM(kWebAXAriaCurrentStatePage, kAriaCurrentStatePage); +STATIC_ASSERT_ENUM(kWebAXAriaCurrentStateStep, kAriaCurrentStateStep); +STATIC_ASSERT_ENUM(kWebAXAriaCurrentStateLocation, kAriaCurrentStateLocation); +STATIC_ASSERT_ENUM(kWebAXAriaCurrentStateDate, kAriaCurrentStateDate); +STATIC_ASSERT_ENUM(kWebAXAriaCurrentStateTime, kAriaCurrentStateTime); + +STATIC_ASSERT_ENUM(kWebAXInvalidStateUndefined, kInvalidStateUndefined); +STATIC_ASSERT_ENUM(kWebAXInvalidStateFalse, kInvalidStateFalse); +STATIC_ASSERT_ENUM(kWebAXInvalidStateTrue, kInvalidStateTrue); +STATIC_ASSERT_ENUM(kWebAXInvalidStateSpelling, kInvalidStateSpelling); +STATIC_ASSERT_ENUM(kWebAXInvalidStateGrammar, kInvalidStateGrammar); +STATIC_ASSERT_ENUM(kWebAXInvalidStateOther, kInvalidStateOther); + +STATIC_ASSERT_ENUM(kWebAXTextStyleNone, kTextStyleNone); +STATIC_ASSERT_ENUM(kWebAXTextStyleBold, kTextStyleBold); +STATIC_ASSERT_ENUM(kWebAXTextStyleItalic, kTextStyleItalic); +STATIC_ASSERT_ENUM(kWebAXTextStyleUnderline, kTextStyleUnderline); +STATIC_ASSERT_ENUM(kWebAXTextStyleLineThrough, kTextStyleLineThrough); + +STATIC_ASSERT_ENUM(kWebAXNameFromUninitialized, kAXNameFromUninitialized); +STATIC_ASSERT_ENUM(kWebAXNameFromAttribute, kAXNameFromAttribute); +STATIC_ASSERT_ENUM(kWebAXNameFromAttributeExplicitlyEmpty, + kAXNameFromAttributeExplicitlyEmpty); +STATIC_ASSERT_ENUM(kWebAXNameFromCaption, kAXNameFromCaption); +STATIC_ASSERT_ENUM(kWebAXNameFromContents, kAXNameFromContents); +STATIC_ASSERT_ENUM(kWebAXNameFromPlaceholder, kAXNameFromPlaceholder); +STATIC_ASSERT_ENUM(kWebAXNameFromRelatedElement, kAXNameFromRelatedElement); +STATIC_ASSERT_ENUM(kWebAXNameFromValue, kAXNameFromValue); +STATIC_ASSERT_ENUM(kWebAXNameFromTitle, kAXNameFromTitle); + +STATIC_ASSERT_ENUM(kWebAXDescriptionFromUninitialized, + kAXDescriptionFromUninitialized); +STATIC_ASSERT_ENUM(kWebAXDescriptionFromAttribute, kAXDescriptionFromAttribute); +STATIC_ASSERT_ENUM(kWebAXDescriptionFromContents, kAXDescriptionFromContents); +STATIC_ASSERT_ENUM(kWebAXDescriptionFromRelatedElement, + kAXDescriptionFromRelatedElement); + +STATIC_ASSERT_ENUM(WebAXStringAttribute::kAriaKeyShortcuts, + AXStringAttribute::kAriaKeyShortcuts); +STATIC_ASSERT_ENUM(WebAXStringAttribute::kAriaRoleDescription, + AXStringAttribute::kAriaRoleDescription); +STATIC_ASSERT_ENUM(WebAXObjectAttribute::kAriaActiveDescendant, + AXObjectAttribute::kAriaActiveDescendant); +STATIC_ASSERT_ENUM(WebAXObjectAttribute::kAriaErrorMessage, + AXObjectAttribute::kAriaErrorMessage); +STATIC_ASSERT_ENUM(WebAXObjectVectorAttribute::kAriaControls, + AXObjectVectorAttribute::kAriaControls); +STATIC_ASSERT_ENUM(WebAXObjectVectorAttribute::kAriaDetails, + AXObjectVectorAttribute::kAriaDetails); +STATIC_ASSERT_ENUM(WebAXObjectVectorAttribute::kAriaFlowTo, + AXObjectVectorAttribute::kAriaFlowTo); +#undef STATIC_ASSERT_ENUM } // namespace blink
diff --git a/third_party/WebKit/Source/core/dom/AXObjectCache.cpp b/third_party/WebKit/Source/core/dom/AXObjectCache.cpp index 425e905..57c2948 100644 --- a/third_party/WebKit/Source/core/dom/AXObjectCache.cpp +++ b/third_party/WebKit/Source/core/dom/AXObjectCache.cpp
@@ -30,6 +30,7 @@ #include <memory> #include "platform/wtf/PtrUtil.h" +#include "public/web/WebAXEnums.h" namespace blink { @@ -74,4 +75,62 @@ return cache; } +#define STATIC_ASSERT_ENUM(a, b) \ + static_assert(static_cast<int>(a) == static_cast<int>(b), \ + "mismatching enum: " #a) + +STATIC_ASSERT_ENUM(kWebAXEventActiveDescendantChanged, + AXObjectCache::kAXActiveDescendantChanged); +STATIC_ASSERT_ENUM(kWebAXEventAlert, AXObjectCache::kAXAlert); +STATIC_ASSERT_ENUM(kWebAXEventAriaAttributeChanged, + AXObjectCache::kAXAriaAttributeChanged); +STATIC_ASSERT_ENUM(kWebAXEventAutocorrectionOccured, + AXObjectCache::kAXAutocorrectionOccured); +STATIC_ASSERT_ENUM(kWebAXEventBlur, AXObjectCache::kAXBlur); +STATIC_ASSERT_ENUM(kWebAXEventCheckedStateChanged, + AXObjectCache::kAXCheckedStateChanged); +STATIC_ASSERT_ENUM(kWebAXEventChildrenChanged, + AXObjectCache::kAXChildrenChanged); +STATIC_ASSERT_ENUM(kWebAXEventClicked, AXObjectCache::kAXClicked); +STATIC_ASSERT_ENUM(kWebAXEventDocumentSelectionChanged, + AXObjectCache::kAXDocumentSelectionChanged); +STATIC_ASSERT_ENUM(kWebAXEventExpandedChanged, + AXObjectCache::kAXExpandedChanged); +STATIC_ASSERT_ENUM(kWebAXEventFocus, AXObjectCache::kAXFocusedUIElementChanged); +STATIC_ASSERT_ENUM(kWebAXEventHide, AXObjectCache::kAXHide); +STATIC_ASSERT_ENUM(kWebAXEventHover, AXObjectCache::kAXHover); +STATIC_ASSERT_ENUM(kWebAXEventInvalidStatusChanged, + AXObjectCache::kAXInvalidStatusChanged); +STATIC_ASSERT_ENUM(kWebAXEventLayoutComplete, AXObjectCache::kAXLayoutComplete); +STATIC_ASSERT_ENUM(kWebAXEventLiveRegionChanged, + AXObjectCache::kAXLiveRegionChanged); +STATIC_ASSERT_ENUM(kWebAXEventLoadComplete, AXObjectCache::kAXLoadComplete); +STATIC_ASSERT_ENUM(kWebAXEventLocationChanged, + AXObjectCache::kAXLocationChanged); +STATIC_ASSERT_ENUM(kWebAXEventMenuListItemSelected, + AXObjectCache::kAXMenuListItemSelected); +STATIC_ASSERT_ENUM(kWebAXEventMenuListItemUnselected, + AXObjectCache::kAXMenuListItemUnselected); +STATIC_ASSERT_ENUM(kWebAXEventMenuListValueChanged, + AXObjectCache::kAXMenuListValueChanged); +STATIC_ASSERT_ENUM(kWebAXEventRowCollapsed, AXObjectCache::kAXRowCollapsed); +STATIC_ASSERT_ENUM(kWebAXEventRowCountChanged, + AXObjectCache::kAXRowCountChanged); +STATIC_ASSERT_ENUM(kWebAXEventRowExpanded, AXObjectCache::kAXRowExpanded); +STATIC_ASSERT_ENUM(kWebAXEventScrollPositionChanged, + AXObjectCache::kAXScrollPositionChanged); +STATIC_ASSERT_ENUM(kWebAXEventScrolledToAnchor, + AXObjectCache::kAXScrolledToAnchor); +STATIC_ASSERT_ENUM(kWebAXEventSelectedChildrenChanged, + AXObjectCache::kAXSelectedChildrenChanged); +STATIC_ASSERT_ENUM(kWebAXEventSelectedTextChanged, + AXObjectCache::kAXSelectedTextChanged); +STATIC_ASSERT_ENUM(kWebAXEventShow, AXObjectCache::kAXShow); +STATIC_ASSERT_ENUM(kWebAXEventTextChanged, AXObjectCache::kAXTextChanged); +STATIC_ASSERT_ENUM(kWebAXEventTextInserted, AXObjectCache::kAXTextInserted); +STATIC_ASSERT_ENUM(kWebAXEventTextRemoved, AXObjectCache::kAXTextRemoved); +STATIC_ASSERT_ENUM(kWebAXEventValueChanged, AXObjectCache::kAXValueChanged); + +#undef STATIC_ASSERT_ENUM + } // namespace blink
diff --git a/third_party/WebKit/Source/core/dom/ArrayBuffer.idl b/third_party/WebKit/Source/core/dom/ArrayBuffer.idl index df6857982..bddb19fa 100644 --- a/third_party/WebKit/Source/core/dom/ArrayBuffer.idl +++ b/third_party/WebKit/Source/core/dom/ArrayBuffer.idl
@@ -6,7 +6,7 @@ [ ImplementedAs=DOMArrayBuffer, - NoInterfaceObject, + NoInterfaceObject ] interface ArrayBuffer { readonly attribute unsigned long byteLength; };
diff --git a/third_party/WebKit/Source/core/dom/ArrayBufferView.idl b/third_party/WebKit/Source/core/dom/ArrayBufferView.idl index d300904..73b264a 100644 --- a/third_party/WebKit/Source/core/dom/ArrayBufferView.idl +++ b/third_party/WebKit/Source/core/dom/ArrayBufferView.idl
@@ -6,7 +6,7 @@ [ ImplementedAs=DOMArrayBufferView, - NoInterfaceObject, + NoInterfaceObject ] interface ArrayBufferView { readonly attribute ArrayBuffer buffer; readonly attribute unsigned long byteOffset;
diff --git a/third_party/WebKit/Source/core/dom/ChildNode.idl b/third_party/WebKit/Source/core/dom/ChildNode.idl index 9d832243..6f5948ed 100644 --- a/third_party/WebKit/Source/core/dom/ChildNode.idl +++ b/third_party/WebKit/Source/core/dom/ChildNode.idl
@@ -24,7 +24,7 @@ [ LegacyTreatAsPartialInterface, - NoInterfaceObject, // Always used on target of 'implements' + NoInterfaceObject // Always used on target of 'implements' ] interface ChildNode { [Unscopable, RaisesException, CEReactions, CustomElementCallbacks, RuntimeEnabled=DOMConvenienceAPI] void before((Node or DOMString) ... nodes); [Unscopable, RaisesException, CEReactions, CustomElementCallbacks, RuntimeEnabled=DOMConvenienceAPI] void after((Node or DOMString)... nodes);
diff --git a/third_party/WebKit/Source/core/dom/ClassicScript.cpp b/third_party/WebKit/Source/core/dom/ClassicScript.cpp index e54792f2..04ea42ce 100644 --- a/third_party/WebKit/Source/core/dom/ClassicScript.cpp +++ b/third_party/WebKit/Source/core/dom/ClassicScript.cpp
@@ -22,14 +22,13 @@ const SecurityOrigin* security_origin) { if (MIMETypeRegistry::IsSupportedJavaScriptMIMEType(mime_type)) return; - bool is_text = mime_type.StartsWith("text/", kTextCaseASCIIInsensitive); + bool is_text = mime_type.StartsWithIgnoringASCIICase("text/"); if (is_text && MIMETypeRegistry::IsLegacySupportedJavaScriptLanguage( mime_type.Substring(5))) return; bool is_same_origin = security_origin->CanRequest(resource->Url()); bool is_application = - !is_text && - mime_type.StartsWith("application/", kTextCaseASCIIInsensitive); + !is_text && mime_type.StartsWithIgnoringASCIICase("application/"); WebFeature feature = is_same_origin
diff --git a/third_party/WebKit/Source/core/dom/Comment.idl b/third_party/WebKit/Source/core/dom/Comment.idl index 6ecf8f0..c22cc4a 100644 --- a/third_party/WebKit/Source/core/dom/Comment.idl +++ b/third_party/WebKit/Source/core/dom/Comment.idl
@@ -21,6 +21,6 @@ [ Constructor(optional DOMString data = ""), - ConstructorCallWith=Document, + ConstructorCallWith=Document ] interface Comment : CharacterData { };
diff --git a/third_party/WebKit/Source/core/dom/CompositorProxy.idl b/third_party/WebKit/Source/core/dom/CompositorProxy.idl index 6f37020..2a37893f 100644 --- a/third_party/WebKit/Source/core/dom/CompositorProxy.idl +++ b/third_party/WebKit/Source/core/dom/CompositorProxy.idl
@@ -7,7 +7,7 @@ ConstructorCallWith=ExecutionContext, Exposed=(Window,CompositorWorker), RaisesException=Constructor, - RuntimeEnabled=CompositorWorker, + RuntimeEnabled=CompositorWorker ] interface CompositorProxy { readonly attribute boolean initialized; [RaisesException] attribute double opacity;
diff --git a/third_party/WebKit/Source/core/dom/DOMException.idl b/third_party/WebKit/Source/core/dom/DOMException.idl index 3c33781..a7c3748 100644 --- a/third_party/WebKit/Source/core/dom/DOMException.idl +++ b/third_party/WebKit/Source/core/dom/DOMException.idl
@@ -33,7 +33,7 @@ [ Constructor(optional DOMString message = "", optional DOMString name = "Error"), Exposed=(Window,Worker), - DoNotCheckConstants, + DoNotCheckConstants ] exception DOMException { readonly attribute unsigned short code;
diff --git a/third_party/WebKit/Source/core/dom/DOMImplementation.cpp b/third_party/WebKit/Source/core/dom/DOMImplementation.cpp index 279597f..6eed2f0 100644 --- a/third_party/WebKit/Source/core/dom/DOMImplementation.cpp +++ b/third_party/WebKit/Source/core/dom/DOMImplementation.cpp
@@ -126,7 +126,7 @@ return false; if (mime_type[0] == '/' || mime_type[length - 5] == '/' || - !mime_type.EndsWith("+xml", kTextCaseASCIIInsensitive)) + !mime_type.EndsWithIgnoringASCIICase("+xml")) return false; bool has_slash = false; @@ -171,9 +171,9 @@ } bool DOMImplementation::IsJSONMIMEType(const String& mime_type) { - if (mime_type.StartsWith("application/json", kTextCaseASCIIInsensitive)) + if (mime_type.StartsWithIgnoringASCIICase("application/json")) return true; - if (mime_type.StartsWith("application/", kTextCaseASCIIInsensitive)) { + if (mime_type.StartsWithIgnoringASCIICase("application/")) { size_t subtype = mime_type.FindIgnoringASCIICase("+json", 12); if (subtype != kNotFound) { // Just check that a parameter wasn't matched. @@ -190,7 +190,7 @@ } static bool IsTextPlainType(const String& mime_type) { - return mime_type.StartsWith("text/", kTextCaseASCIIInsensitive) && + return mime_type.StartsWithIgnoringASCIICase("text/") && !(DeprecatedEqualIgnoringCase(mime_type, "text/html") || DeprecatedEqualIgnoringCase(mime_type, "text/xml") || DeprecatedEqualIgnoringCase(mime_type, "text/xsl"));
diff --git a/third_party/WebKit/Source/core/dom/DOMImplementation.idl b/third_party/WebKit/Source/core/dom/DOMImplementation.idl index cd19db5..321ba63 100644 --- a/third_party/WebKit/Source/core/dom/DOMImplementation.idl +++ b/third_party/WebKit/Source/core/dom/DOMImplementation.idl
@@ -21,7 +21,7 @@ // https://dom.spec.whatwg.org/#interface-domimplementation [ - DependentLifetime, + DependentLifetime ] interface DOMImplementation { [NewObject, RaisesException] DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId, DOMString systemId); [NewObject, RaisesException] XMLDocument createDocument(DOMString? namespaceURI, [TreatNullAs=EmptyString] DOMString qualifiedName, optional DocumentType? doctype = null);
diff --git a/third_party/WebKit/Source/core/dom/DOMStringMap.idl b/third_party/WebKit/Source/core/dom/DOMStringMap.idl index d935a53..7e1045e 100644 --- a/third_party/WebKit/Source/core/dom/DOMStringMap.idl +++ b/third_party/WebKit/Source/core/dom/DOMStringMap.idl
@@ -27,7 +27,7 @@ [ DependentLifetime, - OverrideBuiltins, + OverrideBuiltins ] interface DOMStringMap { [ImplementedAs=item] getter DOMString (DOMString name); [CEReactions, RaisesException] setter void (DOMString name, DOMString value);
diff --git a/third_party/WebKit/Source/core/dom/DOMTokenList.idl b/third_party/WebKit/Source/core/dom/DOMTokenList.idl index d48bc30..1f8ef8c3 100644 --- a/third_party/WebKit/Source/core/dom/DOMTokenList.idl +++ b/third_party/WebKit/Source/core/dom/DOMTokenList.idl
@@ -26,7 +26,7 @@ // https://dom.spec.whatwg.org/#interface-domtokenlist [ - DependentLifetime, + DependentLifetime ] interface DOMTokenList { readonly attribute unsigned long length; getter DOMString? item(unsigned long index);
diff --git a/third_party/WebKit/Source/core/dom/DataView.idl b/third_party/WebKit/Source/core/dom/DataView.idl index 876a0a8..8723dc10 100644 --- a/third_party/WebKit/Source/core/dom/DataView.idl +++ b/third_party/WebKit/Source/core/dom/DataView.idl
@@ -26,6 +26,6 @@ // https://www.khronos.org/registry/typedarray/specs/latest/#DATAVIEW [ - ImplementedAs=DOMDataView, + ImplementedAs=DOMDataView ] interface DataView : ArrayBufferView { };
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp index 9296c4f4..c8ae593 100644 --- a/third_party/WebKit/Source/core/dom/Document.cpp +++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -697,8 +697,8 @@ doc_type_ = doc_type; if (doc_type_) { this->AdoptIfNeeded(*doc_type_); - if (doc_type_->publicId().StartsWith("-//wapforum//dtd xhtml mobile 1.", - kTextCaseASCIIInsensitive)) { + if (doc_type_->publicId().StartsWithIgnoringASCIICase( + "-//wapforum//dtd xhtml mobile 1.")) { is_mobile_document_ = true; style_engine_->ViewportRulesChanged(); }
diff --git a/third_party/WebKit/Source/core/dom/Document.idl b/third_party/WebKit/Source/core/dom/Document.idl index d4f05235..5b72874 100644 --- a/third_party/WebKit/Source/core/dom/Document.idl +++ b/third_party/WebKit/Source/core/dom/Document.idl
@@ -36,7 +36,7 @@ [ Constructor(), - ConstructorCallWith=Document, + ConstructorCallWith=Document ] interface Document : Node { [SameObject] readonly attribute DOMImplementation implementation; [ImplementedAs=urlForBinding] readonly attribute DOMString URL;
diff --git a/third_party/WebKit/Source/core/dom/DocumentFragment.idl b/third_party/WebKit/Source/core/dom/DocumentFragment.idl index e4df24a..ab728d2 100644 --- a/third_party/WebKit/Source/core/dom/DocumentFragment.idl +++ b/third_party/WebKit/Source/core/dom/DocumentFragment.idl
@@ -21,7 +21,7 @@ [ Constructor, - ConstructorCallWith=Document, + ConstructorCallWith=Document ] interface DocumentFragment : Node { };
diff --git a/third_party/WebKit/Source/core/dom/DocumentOrShadowRoot.idl b/third_party/WebKit/Source/core/dom/DocumentOrShadowRoot.idl index 67672157..c4a6552 100644 --- a/third_party/WebKit/Source/core/dom/DocumentOrShadowRoot.idl +++ b/third_party/WebKit/Source/core/dom/DocumentOrShadowRoot.idl
@@ -6,7 +6,7 @@ // https://w3c.github.io/webcomponents/spec/shadow/#extensions-to-the-documentorshadowroot-mixin [ LegacyTreatAsPartialInterface, - NoInterfaceObject, + NoInterfaceObject ] interface DocumentOrShadowRoot { // Selection API // https://w3c.github.io/selection-api/#extensions-to-document-interface
diff --git a/third_party/WebKit/Source/core/dom/Float32Array.idl b/third_party/WebKit/Source/core/dom/Float32Array.idl index a0f1e1a..bcc4d0e 100644 --- a/third_party/WebKit/Source/core/dom/Float32Array.idl +++ b/third_party/WebKit/Source/core/dom/Float32Array.idl
@@ -6,6 +6,6 @@ [ ImplementedAs=DOMFloat32Array, - NoInterfaceObject, + NoInterfaceObject ] interface Float32Array : ArrayBufferView { };
diff --git a/third_party/WebKit/Source/core/dom/Float64Array.idl b/third_party/WebKit/Source/core/dom/Float64Array.idl index f3843402..5652637c 100644 --- a/third_party/WebKit/Source/core/dom/Float64Array.idl +++ b/third_party/WebKit/Source/core/dom/Float64Array.idl
@@ -6,6 +6,6 @@ [ ImplementedAs=DOMFloat64Array, - NoInterfaceObject, + NoInterfaceObject ] interface Float64Array : ArrayBufferView { };
diff --git a/third_party/WebKit/Source/core/dom/GlobalEventHandlers.idl b/third_party/WebKit/Source/core/dom/GlobalEventHandlers.idl index 07a11c3..902056d 100644 --- a/third_party/WebKit/Source/core/dom/GlobalEventHandlers.idl +++ b/third_party/WebKit/Source/core/dom/GlobalEventHandlers.idl
@@ -31,7 +31,7 @@ [ LegacyTreatAsPartialInterface, - NoInterfaceObject, // Always used on target of 'implements' + NoInterfaceObject // Always used on target of 'implements' ] interface GlobalEventHandlers { attribute EventHandler onabort; attribute EventHandler onblur;
diff --git a/third_party/WebKit/Source/core/dom/Int16Array.idl b/third_party/WebKit/Source/core/dom/Int16Array.idl index 19edc3cf..d71aa232 100644 --- a/third_party/WebKit/Source/core/dom/Int16Array.idl +++ b/third_party/WebKit/Source/core/dom/Int16Array.idl
@@ -6,6 +6,6 @@ [ ImplementedAs=DOMInt16Array, - NoInterfaceObject, + NoInterfaceObject ] interface Int16Array : ArrayBufferView { };
diff --git a/third_party/WebKit/Source/core/dom/Int32Array.idl b/third_party/WebKit/Source/core/dom/Int32Array.idl index 76a42f6..67da272b 100644 --- a/third_party/WebKit/Source/core/dom/Int32Array.idl +++ b/third_party/WebKit/Source/core/dom/Int32Array.idl
@@ -6,6 +6,6 @@ [ ImplementedAs=DOMInt32Array, - NoInterfaceObject, + NoInterfaceObject ] interface Int32Array : ArrayBufferView { };
diff --git a/third_party/WebKit/Source/core/dom/Int8Array.idl b/third_party/WebKit/Source/core/dom/Int8Array.idl index a56cf6d..694a0e44 100644 --- a/third_party/WebKit/Source/core/dom/Int8Array.idl +++ b/third_party/WebKit/Source/core/dom/Int8Array.idl
@@ -6,6 +6,6 @@ [ ImplementedAs=DOMInt8Array, - NoInterfaceObject, + NoInterfaceObject ] interface Int8Array : ArrayBufferView { };
diff --git a/third_party/WebKit/Source/core/dom/IntersectionObserver.idl b/third_party/WebKit/Source/core/dom/IntersectionObserver.idl index 1b31dae..1412e4e 100644 --- a/third_party/WebKit/Source/core/dom/IntersectionObserver.idl +++ b/third_party/WebKit/Source/core/dom/IntersectionObserver.idl
@@ -12,7 +12,7 @@ CustomConstructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options), MeasureAs=IntersectionObserver_Constructor, RuntimeEnabled=IntersectionObserver, - DependentLifetime, + DependentLifetime ] interface IntersectionObserver { readonly attribute Element? root; readonly attribute DOMString rootMargin;
diff --git a/third_party/WebKit/Source/core/dom/IntersectionObserverEntry.idl b/third_party/WebKit/Source/core/dom/IntersectionObserverEntry.idl index 034031f1..7ae9877 100644 --- a/third_party/WebKit/Source/core/dom/IntersectionObserverEntry.idl +++ b/third_party/WebKit/Source/core/dom/IntersectionObserverEntry.idl
@@ -5,7 +5,7 @@ // https://wicg.github.io/IntersectionObserver/#intersection-observer-entry [ - RuntimeEnabled=IntersectionObserver, + RuntimeEnabled=IntersectionObserver ] interface IntersectionObserverEntry { readonly attribute DOMHighResTimeStamp time; // TODO(szager): |rootBounds| should not be nullable and it,
diff --git a/third_party/WebKit/Source/core/dom/Iterator.idl b/third_party/WebKit/Source/core/dom/Iterator.idl index 2eaf6ba3..106a46a5 100644 --- a/third_party/WebKit/Source/core/dom/Iterator.idl +++ b/third_party/WebKit/Source/core/dom/Iterator.idl
@@ -5,7 +5,7 @@ // http://people.mozilla.org/~jorendorff/es6-draft.html#sec-iterator-interface [ - NoInterfaceObject, + NoInterfaceObject ] interface Iterator { [CallWith=ScriptState, RaisesException] any next(optional any value); };
diff --git a/third_party/WebKit/Source/core/dom/MessageChannel.idl b/third_party/WebKit/Source/core/dom/MessageChannel.idl index 3cf90c72..8462ff0 100644 --- a/third_party/WebKit/Source/core/dom/MessageChannel.idl +++ b/third_party/WebKit/Source/core/dom/MessageChannel.idl
@@ -29,7 +29,7 @@ [ CustomConstructor, Exposed=(Window,Worker), - Measure, + Measure ] interface MessageChannel { readonly attribute MessagePort port1; readonly attribute MessagePort port2;
diff --git a/third_party/WebKit/Source/core/dom/MessagePort.idl b/third_party/WebKit/Source/core/dom/MessagePort.idl index d031b7b..f6eb2f8 100644 --- a/third_party/WebKit/Source/core/dom/MessagePort.idl +++ b/third_party/WebKit/Source/core/dom/MessagePort.idl
@@ -30,7 +30,7 @@ [ ActiveScriptWrappable, DependentLifetime, - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface MessagePort : EventTarget { [PostMessage, RaisesException, Measure] void postMessage(any message, optional sequence<Transferable> transfer); [Measure] void start();
diff --git a/third_party/WebKit/Source/core/dom/MutationObserver.idl b/third_party/WebKit/Source/core/dom/MutationObserver.idl index b199a17..f1bc1a9e 100644 --- a/third_party/WebKit/Source/core/dom/MutationObserver.idl +++ b/third_party/WebKit/Source/core/dom/MutationObserver.idl
@@ -33,7 +33,7 @@ [ CustomConstructor(MutationCallback callback), ActiveScriptWrappable, - DependentLifetime, + DependentLifetime ] interface MutationObserver { [RaisesException] void observe(Node target, optional MutationObserverInit options); void disconnect();
diff --git a/third_party/WebKit/Source/core/dom/NamedNodeMap.idl b/third_party/WebKit/Source/core/dom/NamedNodeMap.idl index 5633f04..a311250 100644 --- a/third_party/WebKit/Source/core/dom/NamedNodeMap.idl +++ b/third_party/WebKit/Source/core/dom/NamedNodeMap.idl
@@ -21,7 +21,7 @@ // https://dom.spec.whatwg.org/#interface-namednodemap [ - DependentLifetime, + DependentLifetime ] interface NamedNodeMap { readonly attribute unsigned long length; [MeasureAs=NamedNodeMapItem] getter Attr? item(unsigned long index);
diff --git a/third_party/WebKit/Source/core/dom/Node.idl b/third_party/WebKit/Source/core/dom/Node.idl index 2c6837d9..9d4a5fd 100644 --- a/third_party/WebKit/Source/core/dom/Node.idl +++ b/third_party/WebKit/Source/core/dom/Node.idl
@@ -21,7 +21,7 @@ // https://dom.spec.whatwg.org/#interface-node [ - DependentLifetime, + DependentLifetime ] interface Node : EventTarget { const unsigned short ELEMENT_NODE = 1; const unsigned short ATTRIBUTE_NODE = 2;
diff --git a/third_party/WebKit/Source/core/dom/NodeFilter.idl b/third_party/WebKit/Source/core/dom/NodeFilter.idl index 90dc8ed..dac845f 100644 --- a/third_party/WebKit/Source/core/dom/NodeFilter.idl +++ b/third_party/WebKit/Source/core/dom/NodeFilter.idl
@@ -21,7 +21,7 @@ // https://dom.spec.whatwg.org/#interface-nodefilter [ - DependentLifetime, + DependentLifetime ] callback interface NodeFilter { // Constants for acceptNode() const unsigned short FILTER_ACCEPT = 1;
diff --git a/third_party/WebKit/Source/core/dom/NodeIterator.idl b/third_party/WebKit/Source/core/dom/NodeIterator.idl index 7606011..b6c4a39 100644 --- a/third_party/WebKit/Source/core/dom/NodeIterator.idl +++ b/third_party/WebKit/Source/core/dom/NodeIterator.idl
@@ -21,7 +21,7 @@ // https://dom.spec.whatwg.org/#interface-nodeiterator [ - DependentLifetime, + DependentLifetime ] interface NodeIterator { [SameObject] readonly attribute Node root; readonly attribute Node referenceNode;
diff --git a/third_party/WebKit/Source/core/dom/NodeList.idl b/third_party/WebKit/Source/core/dom/NodeList.idl index faa61c2..6a6e594a 100644 --- a/third_party/WebKit/Source/core/dom/NodeList.idl +++ b/third_party/WebKit/Source/core/dom/NodeList.idl
@@ -21,7 +21,7 @@ // https://dom.spec.whatwg.org/#interface-nodelist [ - DependentLifetime, + DependentLifetime ] interface NodeList { getter Node? item(unsigned long index); readonly attribute unsigned long length;
diff --git a/third_party/WebKit/Source/core/dom/NonDocumentTypeChildNode.idl b/third_party/WebKit/Source/core/dom/NonDocumentTypeChildNode.idl index ff4cacc..d186e00fd 100644 --- a/third_party/WebKit/Source/core/dom/NonDocumentTypeChildNode.idl +++ b/third_party/WebKit/Source/core/dom/NonDocumentTypeChildNode.idl
@@ -6,7 +6,7 @@ [ LegacyTreatAsPartialInterface, - NoInterfaceObject, // Always used on target of 'implements' + NoInterfaceObject // Always used on target of 'implements' ] interface NonDocumentTypeChildNode { [PerWorldBindings] readonly attribute Element? previousElementSibling; [PerWorldBindings] readonly attribute Element? nextElementSibling;
diff --git a/third_party/WebKit/Source/core/dom/NonElementParentNode.idl b/third_party/WebKit/Source/core/dom/NonElementParentNode.idl index 3f4ef6e..03511a6 100644 --- a/third_party/WebKit/Source/core/dom/NonElementParentNode.idl +++ b/third_party/WebKit/Source/core/dom/NonElementParentNode.idl
@@ -6,7 +6,7 @@ [ LegacyTreatAsPartialInterface, - NoInterfaceObject, // Always used on target of 'implements' + NoInterfaceObject // Always used on target of 'implements' ] interface NonElementParentNode { [PerWorldBindings] Element? getElementById(DOMString elementId); };
diff --git a/third_party/WebKit/Source/core/dom/ParentNode.idl b/third_party/WebKit/Source/core/dom/ParentNode.idl index e3b7d24..7abe06f 100644 --- a/third_party/WebKit/Source/core/dom/ParentNode.idl +++ b/third_party/WebKit/Source/core/dom/ParentNode.idl
@@ -32,7 +32,7 @@ [ LegacyTreatAsPartialInterface, - NoInterfaceObject, // Always used on target of 'implements' + NoInterfaceObject // Always used on target of 'implements' ] interface ParentNode { [SameObject, PerWorldBindings] readonly attribute HTMLCollection children; [PerWorldBindings] readonly attribute Element? firstElementChild;
diff --git a/third_party/WebKit/Source/core/dom/Range.idl b/third_party/WebKit/Source/core/dom/Range.idl index 5c45326..bb4d08a 100644 --- a/third_party/WebKit/Source/core/dom/Range.idl +++ b/third_party/WebKit/Source/core/dom/Range.idl
@@ -21,7 +21,7 @@ // https://dom.spec.whatwg.org/#interface-range [ Constructor, - ConstructorCallWith=Document, + ConstructorCallWith=Document ] interface Range { readonly attribute Node startContainer; readonly attribute unsigned long startOffset;
diff --git a/third_party/WebKit/Source/core/dom/ResizeObserver.idl b/third_party/WebKit/Source/core/dom/ResizeObserver.idl index b8acec1..a8554d28 100644 --- a/third_party/WebKit/Source/core/dom/ResizeObserver.idl +++ b/third_party/WebKit/Source/core/dom/ResizeObserver.idl
@@ -11,7 +11,7 @@ [ Constructor(ResizeObserverCallback callback), ConstructorCallWith=Document, - RuntimeEnabled=ResizeObserver, + RuntimeEnabled=ResizeObserver ] interface ResizeObserver { void observe(Element target); void unobserve(Element target);
diff --git a/third_party/WebKit/Source/core/dom/ResizeObserverEntry.idl b/third_party/WebKit/Source/core/dom/ResizeObserverEntry.idl index d7c427ae..1ef87604 100644 --- a/third_party/WebKit/Source/core/dom/ResizeObserverEntry.idl +++ b/third_party/WebKit/Source/core/dom/ResizeObserverEntry.idl
@@ -5,7 +5,7 @@ // https://wicg.github.io/ResizeObserver/#resize-observer-entry-interface [ - RuntimeEnabled=ResizeObserver, + RuntimeEnabled=ResizeObserver ] interface ResizeObserverEntry { readonly attribute Element target; // FIXME(atotic): should return DOMReadOnlyRect once GeometryInterfaces land
diff --git a/third_party/WebKit/Source/core/dom/SharedArrayBuffer.idl b/third_party/WebKit/Source/core/dom/SharedArrayBuffer.idl index 9ba56d5..08a5a862 100644 --- a/third_party/WebKit/Source/core/dom/SharedArrayBuffer.idl +++ b/third_party/WebKit/Source/core/dom/SharedArrayBuffer.idl
@@ -6,7 +6,7 @@ [ ImplementedAs=DOMSharedArrayBuffer, NoInterfaceObject, - RuntimeEnabled=SharedArrayBuffer, + RuntimeEnabled=SharedArrayBuffer ] interface SharedArrayBuffer { readonly attribute unsigned long byteLength; };
diff --git a/third_party/WebKit/Source/core/dom/StaticRange.idl b/third_party/WebKit/Source/core/dom/StaticRange.idl index 9268a947..2cb4a71 100644 --- a/third_party/WebKit/Source/core/dom/StaticRange.idl +++ b/third_party/WebKit/Source/core/dom/StaticRange.idl
@@ -5,7 +5,7 @@ // https://garykac.github.io/staticrange/#interface-staticrange [ - RuntimeEnabled=InputEvent, + RuntimeEnabled=InputEvent ] interface StaticRange { readonly attribute Node startContainer; readonly attribute unsigned long startOffset;
diff --git a/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp b/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp index 215e8bd..71ffa46 100644 --- a/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp +++ b/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp
@@ -36,7 +36,6 @@ return frame ? frame->FrameScheduler()->SuspendableTaskRunner() : Platform::Current()->CurrentThread()->GetWebTaskRunner(); case TaskType::kDOMManipulation: - case TaskType::kUserInteraction: case TaskType::kHistoryTraversal: case TaskType::kEmbed: case TaskType::kMediaElementEvent: @@ -44,7 +43,6 @@ case TaskType::kRemoteEvent: case TaskType::kWebSocket: case TaskType::kMicrotask: - case TaskType::kPostedMessage: case TaskType::kUnshippedPortMessage: case TaskType::kFileReading: case TaskType::kPresentation: @@ -58,6 +56,11 @@ return frame ? frame->FrameScheduler()->UnthrottledButBlockableTaskRunner() : Platform::Current()->CurrentThread()->GetWebTaskRunner(); + // PostedMessage can be used for navigation, so we shouldn't block it + // when expecting a user gesture. + case TaskType::kPostedMessage: + // UserInteraction tasks should be run even when expecting a user gesture. + case TaskType::kUserInteraction: case TaskType::kUnthrottled: return frame ? frame->FrameScheduler()->UnthrottledTaskRunner() : Platform::Current()->CurrentThread()->GetWebTaskRunner();
diff --git a/third_party/WebKit/Source/core/dom/Text.idl b/third_party/WebKit/Source/core/dom/Text.idl index 0ed45a8..8279e99 100644 --- a/third_party/WebKit/Source/core/dom/Text.idl +++ b/third_party/WebKit/Source/core/dom/Text.idl
@@ -21,7 +21,7 @@ [ Constructor(optional DOMString data = ""), - ConstructorCallWith=Document, + ConstructorCallWith=Document ] interface Text : CharacterData { [NewObject, DoNotTestNewObject, RaisesException] Text splitText(unsigned long offset); [MeasureAs=TextWholeText] readonly attribute DOMString wholeText;
diff --git a/third_party/WebKit/Source/core/dom/Touch.idl b/third_party/WebKit/Source/core/dom/Touch.idl index 064cadc..c5266122 100644 --- a/third_party/WebKit/Source/core/dom/Touch.idl +++ b/third_party/WebKit/Source/core/dom/Touch.idl
@@ -27,7 +27,7 @@ [ Constructor(TouchInit initDict), - ConstructorCallWith=Document, + ConstructorCallWith=Document ] interface Touch { readonly attribute long identifier; readonly attribute EventTarget target;
diff --git a/third_party/WebKit/Source/core/dom/TreeWalker.idl b/third_party/WebKit/Source/core/dom/TreeWalker.idl index 8ec2eaa..3be3c86 100644 --- a/third_party/WebKit/Source/core/dom/TreeWalker.idl +++ b/third_party/WebKit/Source/core/dom/TreeWalker.idl
@@ -21,7 +21,7 @@ // https://dom.spec.whatwg.org/#interface-treewalker [ - DependentLifetime, + DependentLifetime ] interface TreeWalker { [SameObject] readonly attribute Node root; readonly attribute unsigned long whatToShow;
diff --git a/third_party/WebKit/Source/core/dom/URL.idl b/third_party/WebKit/Source/core/dom/URL.idl index ef4edae..1537b4c 100644 --- a/third_party/WebKit/Source/core/dom/URL.idl +++ b/third_party/WebKit/Source/core/dom/URL.idl
@@ -30,7 +30,7 @@ Constructor(USVString url, optional USVString base), Exposed=(Window,Worker), ImplementedAs=DOMURL, - RaisesException=Constructor, + RaisesException=Constructor ] interface URL { // TODO(foolip): Implement domainToASCII() and domainToUnicode(). // crbug.com/493908
diff --git a/third_party/WebKit/Source/core/dom/URLSearchParams.idl b/third_party/WebKit/Source/core/dom/URLSearchParams.idl index a350573..810b4dc 100644 --- a/third_party/WebKit/Source/core/dom/URLSearchParams.idl +++ b/third_party/WebKit/Source/core/dom/URLSearchParams.idl
@@ -7,7 +7,7 @@ [ Constructor(optional (sequence<sequence<USVString>> or USVString or URLSearchParams) init = ""), Exposed=(Window,Worker), - RaisesException=Constructor, + RaisesException=Constructor ] interface URLSearchParams { void append(USVString name, USVString value); [ImplementedAs=deleteAllWithName] void delete(USVString name);
diff --git a/third_party/WebKit/Source/core/dom/URLUtilsReadOnly.idl b/third_party/WebKit/Source/core/dom/URLUtilsReadOnly.idl index e2cc46d1..ed0d9a8 100644 --- a/third_party/WebKit/Source/core/dom/URLUtilsReadOnly.idl +++ b/third_party/WebKit/Source/core/dom/URLUtilsReadOnly.idl
@@ -27,7 +27,7 @@ [ NoInterfaceObject, // Always used on target of 'implements' - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface URLUtilsReadOnly { stringifier readonly attribute USVString href; readonly attribute USVString origin;
diff --git a/third_party/WebKit/Source/core/dom/Uint16Array.idl b/third_party/WebKit/Source/core/dom/Uint16Array.idl index c494d06f..d9b19a2a 100644 --- a/third_party/WebKit/Source/core/dom/Uint16Array.idl +++ b/third_party/WebKit/Source/core/dom/Uint16Array.idl
@@ -6,6 +6,6 @@ [ ImplementedAs=DOMUint16Array, - NoInterfaceObject, + NoInterfaceObject ] interface Uint16Array : ArrayBufferView { };
diff --git a/third_party/WebKit/Source/core/dom/Uint32Array.idl b/third_party/WebKit/Source/core/dom/Uint32Array.idl index c68b421..d9b34d9 100644 --- a/third_party/WebKit/Source/core/dom/Uint32Array.idl +++ b/third_party/WebKit/Source/core/dom/Uint32Array.idl
@@ -6,6 +6,6 @@ [ ImplementedAs=DOMUint32Array, - NoInterfaceObject, + NoInterfaceObject ] interface Uint32Array : ArrayBufferView { };
diff --git a/third_party/WebKit/Source/core/dom/Uint8Array.idl b/third_party/WebKit/Source/core/dom/Uint8Array.idl index 5070342b5..e677e0b 100644 --- a/third_party/WebKit/Source/core/dom/Uint8Array.idl +++ b/third_party/WebKit/Source/core/dom/Uint8Array.idl
@@ -6,6 +6,6 @@ [ ImplementedAs=DOMUint8Array, - NoInterfaceObject, + NoInterfaceObject ] interface Uint8Array : ArrayBufferView { };
diff --git a/third_party/WebKit/Source/core/dom/Uint8ClampedArray.idl b/third_party/WebKit/Source/core/dom/Uint8ClampedArray.idl index 0b74baf..ed6c346 100644 --- a/third_party/WebKit/Source/core/dom/Uint8ClampedArray.idl +++ b/third_party/WebKit/Source/core/dom/Uint8ClampedArray.idl
@@ -6,6 +6,6 @@ [ ImplementedAs=DOMUint8ClampedArray, - NoInterfaceObject, + NoInterfaceObject ] interface Uint8ClampedArray : ArrayBufferView { };
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.idl b/third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.idl index 3741912..c5aa710 100644 --- a/third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.idl +++ b/third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.idl
@@ -3,7 +3,7 @@ // found in the LICENSE file. [ - RuntimeEnabled=CustomElementsV1, + RuntimeEnabled=CustomElementsV1 ] interface CustomElementRegistry { [CallWith=ScriptState, CEReactions, CustomElementCallbacks, RaisesException, MeasureAs=CustomElementRegistryDefine] void define(DOMString name, Function constructor, optional ElementDefinitionOptions options); any get(DOMString name);
diff --git a/third_party/WebKit/Source/core/editing/Selection.idl b/third_party/WebKit/Source/core/editing/Selection.idl index 1fc68ff..fc128c05 100644 --- a/third_party/WebKit/Source/core/editing/Selection.idl +++ b/third_party/WebKit/Source/core/editing/Selection.idl
@@ -29,7 +29,7 @@ // https://w3c.github.io/selection-api/#selection-interface [ - ImplementedAs=DOMSelection, + ImplementedAs=DOMSelection ] interface Selection { [MeasureAs=SelectionAnchorNode] readonly attribute Node? anchorNode; [MeasureAs=SelectionAnchorOffset] readonly attribute unsigned long anchorOffset;
diff --git a/third_party/WebKit/Source/core/editing/TextAffinity.cpp b/third_party/WebKit/Source/core/editing/TextAffinity.cpp index f0ad331..7f4b8c21 100644 --- a/third_party/WebKit/Source/core/editing/TextAffinity.cpp +++ b/third_party/WebKit/Source/core/editing/TextAffinity.cpp
@@ -5,6 +5,7 @@ #include "core/editing/TextAffinity.h" #include <ostream> // NOLINT +#include "public/web/WebAXEnums.h" namespace blink { @@ -18,4 +19,11 @@ return ostream << "TextAffinity(" << static_cast<int>(affinity) << ')'; } +#define STATIC_ASSERT_ENUM(a, b) \ + static_assert(static_cast<int>(a) == static_cast<int>(b), \ + "mismatching enum: " #a) + +STATIC_ASSERT_ENUM(kWebAXTextAffinityUpstream, TextAffinity::kUpstream); +STATIC_ASSERT_ENUM(kWebAXTextAffinityDownstream, TextAffinity::kDownstream); + } // namespace blink
diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarker.cpp b/third_party/WebKit/Source/core/editing/markers/DocumentMarker.cpp index 3a43d7aa..e443834 100644 --- a/third_party/WebKit/Source/core/editing/markers/DocumentMarker.cpp +++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarker.cpp
@@ -32,6 +32,7 @@ #include "core/editing/markers/TextMatchMarker.h" #include "platform/wtf/StdLibExtras.h" +#include "public/web/WebAXEnums.h" namespace blink { @@ -93,4 +94,13 @@ end_offset_ += delta; } +#define STATIC_ASSERT_ENUM(a, b) \ + static_assert(static_cast<int>(a) == static_cast<int>(b), \ + "mismatching enum: " #a) + +STATIC_ASSERT_ENUM(kWebAXMarkerTypeSpelling, DocumentMarker::kSpelling); +STATIC_ASSERT_ENUM(kWebAXMarkerTypeGrammar, DocumentMarker::kGrammar); +STATIC_ASSERT_ENUM(kWebAXMarkerTypeTextMatch, DocumentMarker::kTextMatch); +STATIC_ASSERT_ENUM(kWebAXMarkerTypeActiveSuggestion, + DocumentMarker::kActiveSuggestion); } // namespace blink
diff --git a/third_party/WebKit/Source/core/events/AnimationEvent.idl b/third_party/WebKit/Source/core/events/AnimationEvent.idl index 61865cd..d5abd9e 100644 --- a/third_party/WebKit/Source/core/events/AnimationEvent.idl +++ b/third_party/WebKit/Source/core/events/AnimationEvent.idl
@@ -26,7 +26,7 @@ // https://dev.w3.org/csswg/css-animations/#interface-animationevent [ - Constructor(DOMString type, optional AnimationEventInit eventInitDict), + Constructor(DOMString type, optional AnimationEventInit eventInitDict) ] interface AnimationEvent : Event { readonly attribute DOMString animationName; // TODO(foolip): elapsedTime should be float.
diff --git a/third_party/WebKit/Source/core/events/AnimationPlaybackEvent.idl b/third_party/WebKit/Source/core/events/AnimationPlaybackEvent.idl index b0051da6..7558260 100644 --- a/third_party/WebKit/Source/core/events/AnimationPlaybackEvent.idl +++ b/third_party/WebKit/Source/core/events/AnimationPlaybackEvent.idl
@@ -6,7 +6,7 @@ [ Constructor(DOMString type, optional AnimationPlaybackEventInit eventInitDict), - RuntimeEnabled=WebAnimationsAPI, + RuntimeEnabled=WebAnimationsAPI ] interface AnimationPlaybackEvent : Event { readonly attribute double? currentTime; readonly attribute double? timelineTime;
diff --git a/third_party/WebKit/Source/core/events/ApplicationCacheErrorEvent.idl b/third_party/WebKit/Source/core/events/ApplicationCacheErrorEvent.idl index faeec2b..8bb5374 100644 --- a/third_party/WebKit/Source/core/events/ApplicationCacheErrorEvent.idl +++ b/third_party/WebKit/Source/core/events/ApplicationCacheErrorEvent.idl
@@ -9,7 +9,7 @@ // https://www.w3.org/Bugs/Public/show_bug.cgi?id=22702 [ - Constructor(DOMString type, optional ApplicationCacheErrorEventInit eventInitDict), + Constructor(DOMString type, optional ApplicationCacheErrorEventInit eventInitDict) ] interface ApplicationCacheErrorEvent : Event { readonly attribute DOMString reason; readonly attribute DOMString url;
diff --git a/third_party/WebKit/Source/core/events/ClipboardEvent.idl b/third_party/WebKit/Source/core/events/ClipboardEvent.idl index 14256b4..157705b 100644 --- a/third_party/WebKit/Source/core/events/ClipboardEvent.idl +++ b/third_party/WebKit/Source/core/events/ClipboardEvent.idl
@@ -5,7 +5,7 @@ // https://w3c.github.io/clipboard-apis/#clipboard-event-interfaces [ - Constructor(DOMString type, optional ClipboardEventInit eventInitDict), + Constructor(DOMString type, optional ClipboardEventInit eventInitDict) ] interface ClipboardEvent : Event { readonly attribute DataTransfer? clipboardData; };
diff --git a/third_party/WebKit/Source/core/events/CompositionEvent.idl b/third_party/WebKit/Source/core/events/CompositionEvent.idl index a73b738..6a98cfe4 100644 --- a/third_party/WebKit/Source/core/events/CompositionEvent.idl +++ b/third_party/WebKit/Source/core/events/CompositionEvent.idl
@@ -26,7 +26,7 @@ // https://w3c.github.io/uievents/#interface-CompositionEvent [ - Constructor(DOMString type, optional CompositionEventInit eventInitDict), + Constructor(DOMString type, optional CompositionEventInit eventInitDict) ] interface CompositionEvent : UIEvent { readonly attribute DOMString data;
diff --git a/third_party/WebKit/Source/core/events/CustomEvent.idl b/third_party/WebKit/Source/core/events/CustomEvent.idl index 7fd98072..410a1d7 100644 --- a/third_party/WebKit/Source/core/events/CustomEvent.idl +++ b/third_party/WebKit/Source/core/events/CustomEvent.idl
@@ -29,7 +29,7 @@ Constructor(DOMString type, optional CustomEventInit eventInitDict), ConstructorCallWith=ScriptState, DependentLifetime, - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface CustomEvent : Event { [CallWith=ScriptState] readonly attribute any detail;
diff --git a/third_party/WebKit/Source/core/events/DragEvent.idl b/third_party/WebKit/Source/core/events/DragEvent.idl index 1ffc5be5..13cf4b6 100644 --- a/third_party/WebKit/Source/core/events/DragEvent.idl +++ b/third_party/WebKit/Source/core/events/DragEvent.idl
@@ -5,7 +5,7 @@ // https://html.spec.whatwg.org/multipage/interaction.html#dragevent [ - Constructor(DOMString type, optional DragEventInit eventInitDict), + Constructor(DOMString type, optional DragEventInit eventInitDict) ] interface DragEvent : MouseEvent { [ImplementedAs=getDataTransfer] readonly attribute DataTransfer? dataTransfer; };
diff --git a/third_party/WebKit/Source/core/events/Event.idl b/third_party/WebKit/Source/core/events/Event.idl index 518ce0ec..148b35a 100644 --- a/third_party/WebKit/Source/core/events/Event.idl +++ b/third_party/WebKit/Source/core/events/Event.idl
@@ -22,7 +22,7 @@ [ Constructor(DOMString type, optional EventInit eventInitDict), - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface Event { readonly attribute DOMString type; readonly attribute EventTarget? target;
diff --git a/third_party/WebKit/Source/core/events/EventTarget.idl b/third_party/WebKit/Source/core/events/EventTarget.idl index d6ecacc..1619a0e 100644 --- a/third_party/WebKit/Source/core/events/EventTarget.idl +++ b/third_party/WebKit/Source/core/events/EventTarget.idl
@@ -23,7 +23,7 @@ [ CheckSecurity=Receiver, Exposed=(Window,Worker), - ImmutablePrototype, + ImmutablePrototype ] interface EventTarget { [Custom=(CallPrologue,CallEpilogue)] void addEventListener(DOMString type, EventListener? listener, optional (AddEventListenerOptions or boolean) options); [Custom=(CallPrologue,CallEpilogue)] void removeEventListener(DOMString type, EventListener? listener, optional (EventListenerOptions or boolean) options);
diff --git a/third_party/WebKit/Source/core/events/FocusEvent.idl b/third_party/WebKit/Source/core/events/FocusEvent.idl index 2f95287b..a1cdb613 100644 --- a/third_party/WebKit/Source/core/events/FocusEvent.idl +++ b/third_party/WebKit/Source/core/events/FocusEvent.idl
@@ -26,7 +26,7 @@ // https://w3c.github.io/uievents/#interface-FocusEvent [ - Constructor(DOMString type, optional FocusEventInit eventInitDict), + Constructor(DOMString type, optional FocusEventInit eventInitDict) ] interface FocusEvent : UIEvent { readonly attribute EventTarget? relatedTarget; };
diff --git a/third_party/WebKit/Source/core/events/HashChangeEvent.idl b/third_party/WebKit/Source/core/events/HashChangeEvent.idl index f3e20ed..26297463 100644 --- a/third_party/WebKit/Source/core/events/HashChangeEvent.idl +++ b/third_party/WebKit/Source/core/events/HashChangeEvent.idl
@@ -20,7 +20,7 @@ // https://html.spec.whatwg.org/multipage/browsers.html#the-hashchangeevent-interface [ - Constructor(DOMString type, optional HashChangeEventInit eventInitDict), + Constructor(DOMString type, optional HashChangeEventInit eventInitDict) // TODO(foolip): Exposed=(Window,Worker) ] interface HashChangeEvent : Event { readonly attribute DOMString oldURL;
diff --git a/third_party/WebKit/Source/core/events/InputEvent.idl b/third_party/WebKit/Source/core/events/InputEvent.idl index d2574da..ce2862c 100644 --- a/third_party/WebKit/Source/core/events/InputEvent.idl +++ b/third_party/WebKit/Source/core/events/InputEvent.idl
@@ -7,7 +7,7 @@ [ Constructor(DOMString type, optional InputEventInit eventInitDict), - RuntimeEnabled=InputEvent, + RuntimeEnabled=InputEvent ] interface InputEvent : UIEvent { readonly attribute DOMString? data; readonly attribute boolean isComposing;
diff --git a/third_party/WebKit/Source/core/events/KeyboardEvent.idl b/third_party/WebKit/Source/core/events/KeyboardEvent.idl index a42c3cd..5df5614 100644 --- a/third_party/WebKit/Source/core/events/KeyboardEvent.idl +++ b/third_party/WebKit/Source/core/events/KeyboardEvent.idl
@@ -22,7 +22,7 @@ [ Constructor(DOMString type, optional KeyboardEventInit eventInitDict), - ConstructorCallWith=ScriptState, + ConstructorCallWith=ScriptState ] interface KeyboardEvent : UIEvent { // KeyLocationCode const unsigned long DOM_KEY_LOCATION_STANDARD = 0x00;
diff --git a/third_party/WebKit/Source/core/events/MessageEvent.idl b/third_party/WebKit/Source/core/events/MessageEvent.idl index f4036a7..791cf0fd 100644 --- a/third_party/WebKit/Source/core/events/MessageEvent.idl +++ b/third_party/WebKit/Source/core/events/MessageEvent.idl
@@ -30,7 +30,7 @@ [ Constructor(DOMString type, optional MessageEventInit eventInitDict), Exposed=(Window,Worker), - RaisesException=Constructor, + RaisesException=Constructor ] interface MessageEvent : Event { [Custom=Getter] readonly attribute any data; readonly attribute DOMString origin;
diff --git a/third_party/WebKit/Source/core/events/MouseEvent.idl b/third_party/WebKit/Source/core/events/MouseEvent.idl index d67152d..bf41fc8 100644 --- a/third_party/WebKit/Source/core/events/MouseEvent.idl +++ b/third_party/WebKit/Source/core/events/MouseEvent.idl
@@ -21,7 +21,7 @@ [ Constructor(DOMString type, optional MouseEventInit eventInitDict), - ConstructorCallWith=ScriptState, + ConstructorCallWith=ScriptState ] interface MouseEvent : UIEvent { readonly attribute double screenX; readonly attribute double screenY;
diff --git a/third_party/WebKit/Source/core/events/PageTransitionEvent.idl b/third_party/WebKit/Source/core/events/PageTransitionEvent.idl index 35778686..edd5d8b 100644 --- a/third_party/WebKit/Source/core/events/PageTransitionEvent.idl +++ b/third_party/WebKit/Source/core/events/PageTransitionEvent.idl
@@ -26,7 +26,7 @@ // https://html.spec.whatwg.org/multipage/browsers.html#the-pagetransitionevent-interface [ - Constructor(DOMString type, optional PageTransitionEventInit eventInitDict), + Constructor(DOMString type, optional PageTransitionEventInit eventInitDict) // TODO(foolip): Exposed=(Window,Worker) ] interface PageTransitionEvent : Event { readonly attribute boolean persisted;
diff --git a/third_party/WebKit/Source/core/events/PointerEvent.idl b/third_party/WebKit/Source/core/events/PointerEvent.idl index ccbef6a..28f2625 100644 --- a/third_party/WebKit/Source/core/events/PointerEvent.idl +++ b/third_party/WebKit/Source/core/events/PointerEvent.idl
@@ -5,7 +5,7 @@ // https://w3c.github.io/pointerevents/#pointerevent-interface [ - Constructor(DOMString type, optional PointerEventInit eventInitDict), + Constructor(DOMString type, optional PointerEventInit eventInitDict) ] interface PointerEvent : MouseEvent { [MeasureAs=PointerEventAttributeCount] readonly attribute long pointerId; [MeasureAs=PointerEventAttributeCount] readonly attribute double width;
diff --git a/third_party/WebKit/Source/core/events/PromiseRejectionEvent.idl b/third_party/WebKit/Source/core/events/PromiseRejectionEvent.idl index aa674ba..074bb08 100644 --- a/third_party/WebKit/Source/core/events/PromiseRejectionEvent.idl +++ b/third_party/WebKit/Source/core/events/PromiseRejectionEvent.idl
@@ -8,7 +8,7 @@ Constructor(DOMString type, PromiseRejectionEventInit eventInitDict), ConstructorCallWith=ScriptState, Exposed=(Window,Worker), - DependentLifetime, + DependentLifetime ] interface PromiseRejectionEvent : Event { [Custom=Getter] readonly attribute Promise<any> promise; [CallWith=ScriptState] readonly attribute any reason;
diff --git a/third_party/WebKit/Source/core/events/ResourceProgressEvent.idl b/third_party/WebKit/Source/core/events/ResourceProgressEvent.idl index 5dae8119..e55a3628 100644 --- a/third_party/WebKit/Source/core/events/ResourceProgressEvent.idl +++ b/third_party/WebKit/Source/core/events/ResourceProgressEvent.idl
@@ -31,7 +31,7 @@ // constructable by web content at all, and so does not provide the usual // EventInit pattern for Event construction. [ - NoInterfaceObject, + NoInterfaceObject ] interface ResourceProgressEvent : ProgressEvent { readonly attribute DOMString url; };
diff --git a/third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.idl b/third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.idl index b05f632..c928820 100644 --- a/third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.idl +++ b/third_party/WebKit/Source/core/events/SecurityPolicyViolationEvent.idl
@@ -30,7 +30,7 @@ }; [ - Constructor(DOMString type, optional SecurityPolicyViolationEventInit eventInitDict), + Constructor(DOMString type, optional SecurityPolicyViolationEventInit eventInitDict) ] interface SecurityPolicyViolationEvent : Event { // TODO(foolip): The spec says "documentURL". [Measure] readonly attribute DOMString documentURI;
diff --git a/third_party/WebKit/Source/core/events/TouchEvent.idl b/third_party/WebKit/Source/core/events/TouchEvent.idl index 539fc2a6..04300c54db 100644 --- a/third_party/WebKit/Source/core/events/TouchEvent.idl +++ b/third_party/WebKit/Source/core/events/TouchEvent.idl
@@ -26,7 +26,7 @@ // https://w3c.github.io/touch-events/#touchevent-interface [ - Constructor(DOMString type, optional TouchEventInit eventInitDict), + Constructor(DOMString type, optional TouchEventInit eventInitDict) ] interface TouchEvent : UIEvent { readonly attribute TouchList touches; readonly attribute TouchList targetTouches;
diff --git a/third_party/WebKit/Source/core/events/TransitionEvent.idl b/third_party/WebKit/Source/core/events/TransitionEvent.idl index 9013da43..1491fa01 100644 --- a/third_party/WebKit/Source/core/events/TransitionEvent.idl +++ b/third_party/WebKit/Source/core/events/TransitionEvent.idl
@@ -27,7 +27,7 @@ // https://dev.w3.org/csswg/css-transitions/#transition-events [ - Constructor(DOMString type, optional TransitionEventInit eventInitDict), + Constructor(DOMString type, optional TransitionEventInit eventInitDict) ] interface TransitionEvent : Event { readonly attribute DOMString propertyName; // TODO(foolip): elapsedTime should be float.
diff --git a/third_party/WebKit/Source/core/events/WheelEvent.idl b/third_party/WebKit/Source/core/events/WheelEvent.idl index cf556e4..4d1163f9 100644 --- a/third_party/WebKit/Source/core/events/WheelEvent.idl +++ b/third_party/WebKit/Source/core/events/WheelEvent.idl
@@ -22,7 +22,7 @@ // https://w3c.github.io/uievents/#interface-WheelEvent [ - Constructor(DOMString type, optional WheelEventInit eventInitDict), + Constructor(DOMString type, optional WheelEventInit eventInitDict) ] interface WheelEvent : MouseEvent { // DeltaModeCode const unsigned long DOM_DELTA_PIXEL = 0x00;
diff --git a/third_party/WebKit/Source/core/exported/BUILD.gn b/third_party/WebKit/Source/core/exported/BUILD.gn index ea8ea32..dda7aec0 100644 --- a/third_party/WebKit/Source/core/exported/BUILD.gn +++ b/third_party/WebKit/Source/core/exported/BUILD.gn
@@ -74,6 +74,7 @@ "WebSettingsImpl.h", "WebSharedWorkerImpl.cpp", "WebSharedWorkerImpl.h", + "WebSurroundingText.cpp", "WebTextCheckingCompletionImpl.cpp", "WebTextCheckingCompletionImpl.h", "WebTextCheckingResult.cpp",
diff --git a/third_party/WebKit/Source/web/WebSurroundingText.cpp b/third_party/WebKit/Source/core/exported/WebSurroundingText.cpp similarity index 100% rename from third_party/WebKit/Source/web/WebSurroundingText.cpp rename to third_party/WebKit/Source/core/exported/WebSurroundingText.cpp
diff --git a/third_party/WebKit/Source/core/fileapi/Blob.idl b/third_party/WebKit/Source/core/fileapi/Blob.idl index e1ead06..327a59c2 100644 --- a/third_party/WebKit/Source/core/fileapi/Blob.idl +++ b/third_party/WebKit/Source/core/fileapi/Blob.idl
@@ -35,7 +35,7 @@ Constructor(optional sequence<BlobPart> blobParts, optional BlobPropertyBag options), ConstructorCallWith=ExecutionContext, RaisesException=Constructor, - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface Blob { readonly attribute unsigned long long size; readonly attribute DOMString type;
diff --git a/third_party/WebKit/Source/core/fileapi/File.idl b/third_party/WebKit/Source/core/fileapi/File.idl index df954bc..a74beced 100644 --- a/third_party/WebKit/Source/core/fileapi/File.idl +++ b/third_party/WebKit/Source/core/fileapi/File.idl
@@ -29,7 +29,7 @@ Constructor(sequence<BlobPart> fileBits, USVString fileName, optional FilePropertyBag options), ConstructorCallWith=ExecutionContext, RaisesException=Constructor, - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface File : Blob { readonly attribute DOMString name; readonly attribute long long lastModified;
diff --git a/third_party/WebKit/Source/core/fileapi/FileList.idl b/third_party/WebKit/Source/core/fileapi/FileList.idl index fd9e5ae..25db9a0 100644 --- a/third_party/WebKit/Source/core/fileapi/FileList.idl +++ b/third_party/WebKit/Source/core/fileapi/FileList.idl
@@ -26,7 +26,7 @@ // https://w3c.github.io/FileAPI/#filelist-section [ - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface FileList { getter File? item(unsigned long index); readonly attribute unsigned long length;
diff --git a/third_party/WebKit/Source/core/fileapi/FileReader.idl b/third_party/WebKit/Source/core/fileapi/FileReader.idl index 24ddbb3..925912c 100644 --- a/third_party/WebKit/Source/core/fileapi/FileReader.idl +++ b/third_party/WebKit/Source/core/fileapi/FileReader.idl
@@ -36,7 +36,7 @@ DependentLifetime, Constructor, ConstructorCallWith=ExecutionContext, - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface FileReader : EventTarget { // async read methods [RaisesException] void readAsArrayBuffer(Blob blob);
diff --git a/third_party/WebKit/Source/core/fileapi/FileReaderSync.idl b/third_party/WebKit/Source/core/fileapi/FileReaderSync.idl index f755123..702b27a 100644 --- a/third_party/WebKit/Source/core/fileapi/FileReaderSync.idl +++ b/third_party/WebKit/Source/core/fileapi/FileReaderSync.idl
@@ -34,7 +34,7 @@ Exposed=(DedicatedWorker,SharedWorker), Constructor, ConstructorCallWith=ExecutionContext, - Measure, + Measure ] interface FileReaderSync { [CallWith=ScriptState, RaisesException] ArrayBuffer readAsArrayBuffer(Blob blob); [CallWith=ScriptState, RaisesException] DOMString readAsBinaryString(Blob blob);
diff --git a/third_party/WebKit/Source/core/frame/ImageBitmap.idl b/third_party/WebKit/Source/core/frame/ImageBitmap.idl index 02222ba..8e0df94 100644 --- a/third_party/WebKit/Source/core/frame/ImageBitmap.idl +++ b/third_party/WebKit/Source/core/frame/ImageBitmap.idl
@@ -5,7 +5,7 @@ // https://html.spec.whatwg.org/#images [ - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface ImageBitmap { readonly attribute unsigned long width; readonly attribute unsigned long height;
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp index 68560d6..f64499cac 100644 --- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp +++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -67,6 +67,7 @@ #include "core/loader/FrameLoadRequest.h" #include "core/loader/NavigationScheduler.h" #include "core/page/ChromeClient.h" +#include "core/page/DragController.h" #include "core/page/FocusController.h" #include "core/page/Page.h" #include "core/page/scrolling/ScrollingCoordinator.h" @@ -113,15 +114,14 @@ using namespace HTMLNames; -namespace { - +// static // Converts from bounds in CSS space to device space based on the given // frame. // TODO(tanvir.rizvi): DeviceSpaceBounds is used for drag related functionality // and is irrelevant to core functionality of LocalFrame. This should be moved // out of LocalFrame to appropriate place. -static FloatRect DeviceSpaceBounds(const FloatRect css_bounds, - const LocalFrame& frame) { +FloatRect DataTransfer::DeviceSpaceBounds(const FloatRect css_bounds, + const LocalFrame& frame) { float device_scale_factor = frame.GetPage()->DeviceScaleFactorDeprecated(); float page_scale_factor = frame.GetPage()->GetVisualViewport().Scale(); FloatRect device_bounds(css_bounds); @@ -132,12 +132,13 @@ return device_bounds; } +// static // Returns a DragImage whose bitmap contains |contents|, positioned and scaled // in device space. // TODO(tanvir.rizvi): CreateDragImageForFrame is used for drag related // functionality and is irrelevant to core functionality of LocalFrame. This // should be moved out of LocalFrame to appropriate place. -static std::unique_ptr<DragImage> CreateDragImageForFrame( +std::unique_ptr<DragImage> DataTransfer::CreateDragImageForFrame( const LocalFrame& frame, float opacity, RespectImageOrientationEnum image_orientation, @@ -174,6 +175,8 @@ opacity); } +namespace { + // TODO(tanvir.rizvi): DraggedNodeImageBuilder is used for drag related // functionality and is irrelevant to core functionality of LocalFrame. This // should be moved out of LocalFrame to appropriate place. @@ -230,14 +233,15 @@ PaintLayerFlags flags = kPaintLayerHaveTransparency | kPaintLayerAppliedTransform | kPaintLayerUncachedClipRects; - PaintRecordBuilder builder(DeviceSpaceBounds(bounding_box, *local_frame_)); + PaintRecordBuilder builder( + DataTransfer::DeviceSpaceBounds(bounding_box, *local_frame_)); PaintLayerPainter(*layer).Paint(builder.Context(), painting_info, flags); PropertyTreeState border_box_properties = PropertyTreeState::Root(); if (RuntimeEnabledFeatures::SlimmingPaintV2Enabled()) { border_box_properties = *layer->GetLayoutObject().LocalBorderBoxProperties(); } - return CreateDragImageForFrame( + return DataTransfer::CreateDragImageForFrame( *local_frame_, 1.0f, LayoutObject::ShouldRespectImageOrientation(dragged_layout_object), bounding_box, builder, border_box_properties); @@ -764,34 +768,40 @@ return ratio; } +// static // TODO(tanvir.rizvi): NodeImage is used only by DataTransfer, // and is irrelevant to LocalFrame core functionality, so it can be moved to // DataTransfer. -std::unique_ptr<DragImage> LocalFrame::NodeImage(Node& node) { - DraggedNodeImageBuilder image_node(*this, node); +std::unique_ptr<DragImage> DataTransfer::NodeImage(const LocalFrame& frame, + Node& node) { + DraggedNodeImageBuilder image_node(frame, node); return image_node.CreateImage(); } +// static // TODO(tanvir.rizvi): DragImageForSelection is used only by DragController, // and is irrelevant to LocalFrame core functionality, so it can be moved to // DragController. -std::unique_ptr<DragImage> LocalFrame::DragImageForSelection(float opacity) { - if (!Selection().ComputeVisibleSelectionInDOMTreeDeprecated().IsRange()) +std::unique_ptr<DragImage> DragController::DragImageForSelection( + const LocalFrame& frame, + float opacity) { + if (!frame.Selection().ComputeVisibleSelectionInDOMTreeDeprecated().IsRange()) return nullptr; - view_->UpdateAllLifecyclePhasesExceptPaint(); - DCHECK(GetDocument()->IsActive()); + frame.View()->UpdateAllLifecyclePhasesExceptPaint(); + DCHECK(frame.GetDocument()->IsActive()); - FloatRect painting_rect = FloatRect(Selection().Bounds()); + FloatRect painting_rect = FloatRect(frame.Selection().Bounds()); GlobalPaintFlags paint_flags = kGlobalPaintSelectionOnly | kGlobalPaintFlattenCompositingLayers; - PaintRecordBuilder builder(DeviceSpaceBounds(painting_rect, *this)); - view_->PaintContents(builder.Context(), paint_flags, - EnclosingIntRect(painting_rect)); - return CreateDragImageForFrame(*this, opacity, kDoNotRespectImageOrientation, - painting_rect, builder, - PropertyTreeState::Root()); + PaintRecordBuilder builder( + DataTransfer::DeviceSpaceBounds(painting_rect, frame)); + frame.View()->PaintContents(builder.Context(), paint_flags, + EnclosingIntRect(painting_rect)); + return DataTransfer::CreateDragImageForFrame( + frame, opacity, kDoNotRespectImageOrientation, painting_rect, builder, + PropertyTreeState::Root()); } String LocalFrame::SelectedText() const {
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.h b/third_party/WebKit/Source/core/frame/LocalFrame.h index 1c3e573..feba7c0 100644 --- a/third_party/WebKit/Source/core/frame/LocalFrame.h +++ b/third_party/WebKit/Source/core/frame/LocalFrame.h
@@ -48,7 +48,6 @@ class Color; class ContentSettingsClient; class Document; -class DragImage; class Editor; template <typename Traversal> class EditingAlgorithm; @@ -91,8 +90,6 @@ public Supplementable<LocalFrame> { USING_GARBAGE_COLLECTED_MIXIN(LocalFrame); - friend class LocalFrameTest; - public: static LocalFrame* Create(LocalFrameClient*, Page&, @@ -201,9 +198,6 @@ void DeviceScaleFactorChanged(); double DevicePixelRatio() const; - std::unique_ptr<DragImage> NodeImage(Node&); - std::unique_ptr<DragImage> DragImageForSelection(float opacity); - String SelectedText() const; String SelectedTextForClipboard() const;
diff --git a/third_party/WebKit/Source/core/frame/Location.idl b/third_party/WebKit/Source/core/frame/Location.idl index ba72bee..a2f6d708 100644 --- a/third_party/WebKit/Source/core/frame/Location.idl +++ b/third_party/WebKit/Source/core/frame/Location.idl
@@ -31,7 +31,7 @@ [ CheckSecurity=Receiver, DependentLifetime, - Unforgeable, + Unforgeable ] interface Location { // |assign| is *NOT* cross-origin accessible in the spec, but it needs // the Incumbent realm when navigating the page. See the below link.
diff --git a/third_party/WebKit/Source/core/frame/NavigatorConcurrentHardware.idl b/third_party/WebKit/Source/core/frame/NavigatorConcurrentHardware.idl index 5dfc5a9..b6f63bb 100644 --- a/third_party/WebKit/Source/core/frame/NavigatorConcurrentHardware.idl +++ b/third_party/WebKit/Source/core/frame/NavigatorConcurrentHardware.idl
@@ -6,7 +6,7 @@ [ NoInterfaceObject, - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface NavigatorConcurrentHardware { readonly attribute unsigned long long hardwareConcurrency; };
diff --git a/third_party/WebKit/Source/core/frame/NavigatorID.idl b/third_party/WebKit/Source/core/frame/NavigatorID.idl index df7f51a..b9d0e94 100644 --- a/third_party/WebKit/Source/core/frame/NavigatorID.idl +++ b/third_party/WebKit/Source/core/frame/NavigatorID.idl
@@ -32,7 +32,7 @@ [ NoInterfaceObject, // Always used on target of 'implements' - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface NavigatorID { readonly attribute DOMString appCodeName; // constant "Mozilla" readonly attribute DOMString appName; // constant "Netscape"
diff --git a/third_party/WebKit/Source/core/frame/NavigatorLanguage.idl b/third_party/WebKit/Source/core/frame/NavigatorLanguage.idl index f5d8130..d77bba5 100644 --- a/third_party/WebKit/Source/core/frame/NavigatorLanguage.idl +++ b/third_party/WebKit/Source/core/frame/NavigatorLanguage.idl
@@ -6,7 +6,7 @@ [ NoInterfaceObject, - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface NavigatorLanguage { readonly attribute DOMString language; [CachedAttribute=hasLanguagesChanged] readonly attribute FrozenArray<DOMString> languages;
diff --git a/third_party/WebKit/Source/core/frame/NavigatorOnLine.idl b/third_party/WebKit/Source/core/frame/NavigatorOnLine.idl index 94468aae..d9f71c1 100644 --- a/third_party/WebKit/Source/core/frame/NavigatorOnLine.idl +++ b/third_party/WebKit/Source/core/frame/NavigatorOnLine.idl
@@ -32,7 +32,7 @@ [ NoInterfaceObject, // Always used on target of 'implements' - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface NavigatorOnLine { readonly attribute boolean onLine; };
diff --git a/third_party/WebKit/Source/core/frame/VisualViewport.idl b/third_party/WebKit/Source/core/frame/VisualViewport.idl index d956a89..65fad2bf 100644 --- a/third_party/WebKit/Source/core/frame/VisualViewport.idl +++ b/third_party/WebKit/Source/core/frame/VisualViewport.idl
@@ -28,7 +28,7 @@ [ RuntimeEnabled=VisualViewportAPI, - ImplementedAs=DOMVisualViewport, + ImplementedAs=DOMVisualViewport ] interface VisualViewport : EventTarget { [Measure] readonly attribute double offsetLeft; [Measure] readonly attribute double offsetTop;
diff --git a/third_party/WebKit/Source/core/frame/WebFrameSerializerImpl.cpp b/third_party/WebKit/Source/core/frame/WebFrameSerializerImpl.cpp index d25c930..71a0bb73 100644 --- a/third_party/WebKit/Source/core/frame/WebFrameSerializerImpl.cpp +++ b/third_party/WebKit/Source/core/frame/WebFrameSerializerImpl.cpp
@@ -325,7 +325,7 @@ // Rewrite the attribute value if requested. if (element->HasLegalLinkAttribute(attr_name)) { // For links start with "javascript:", we do not change it. - if (!attr_value.StartsWith("javascript:", kTextCaseASCIIInsensitive)) { + if (!attr_value.StartsWithIgnoringASCIICase("javascript:")) { // Get the absolute link. KURL complete_url = param->document->CompleteURL(attr_value);
diff --git a/third_party/WebKit/Source/core/frame/Window.idl b/third_party/WebKit/Source/core/frame/Window.idl index 3434eb3..3853d02 100644 --- a/third_party/WebKit/Source/core/frame/Window.idl +++ b/third_party/WebKit/Source/core/frame/Window.idl
@@ -30,7 +30,7 @@ [ CheckSecurity=Receiver, ImplementedAs=DOMWindow, - PrimaryGlobal, + PrimaryGlobal ] interface Window : EventTarget { // the current browsing context // FIXME: The spec uses the WindowProxy type for this and many other attributes.
diff --git a/third_party/WebKit/Source/core/frame/WindowBase64.idl b/third_party/WebKit/Source/core/frame/WindowBase64.idl index fe2fe8ac..a19439e 100644 --- a/third_party/WebKit/Source/core/frame/WindowBase64.idl +++ b/third_party/WebKit/Source/core/frame/WindowBase64.idl
@@ -29,7 +29,7 @@ [ NoInterfaceObject, // Always used on target of 'implements' - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface WindowBase64 { [RaisesException] DOMString btoa(DOMString btoa); [RaisesException] DOMString atob(DOMString atob);
diff --git a/third_party/WebKit/Source/core/frame/WindowEventHandlers.idl b/third_party/WebKit/Source/core/frame/WindowEventHandlers.idl index 0b09a583..d561cc13 100644 --- a/third_party/WebKit/Source/core/frame/WindowEventHandlers.idl +++ b/third_party/WebKit/Source/core/frame/WindowEventHandlers.idl
@@ -32,7 +32,7 @@ [ ImplementedAs=DOMWindowEventHandlers, LegacyTreatAsPartialInterface, - NoInterfaceObject, // Always used on target of 'implements' + NoInterfaceObject // Always used on target of 'implements' ] interface WindowEventHandlers { //attribute EventHandler onafterprint; //attribute EventHandler onbeforeprint;
diff --git a/third_party/WebKit/Source/core/frame/WindowTimers.idl b/third_party/WebKit/Source/core/frame/WindowTimers.idl index 0840392..d433fbb 100644 --- a/third_party/WebKit/Source/core/frame/WindowTimers.idl +++ b/third_party/WebKit/Source/core/frame/WindowTimers.idl
@@ -31,7 +31,7 @@ ImplementedAs=DOMWindowTimers, LegacyTreatAsPartialInterface, NoInterfaceObject, // Always used on target of 'implements' - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface WindowTimers { // FIXME: would be clearer as a union type, like: // typedef (Function or DOMString) Handler
diff --git a/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp b/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp index 3fb9dbfd..eaf559f 100644 --- a/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp +++ b/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp
@@ -86,7 +86,7 @@ match = true; } else { // host-part = "*." 1*host-char *( "." 1*host-char ) - match = host.EndsWith(String("." + host_), kTextCaseUnicodeInsensitive); + match = host.EndsWithIgnoringCase(String("." + host_)); } // Chrome used to, incorrectly, match *.x.y to x.y. This was fixed, but
diff --git a/third_party/WebKit/Source/core/geometry/DOMMatrix.idl b/third_party/WebKit/Source/core/geometry/DOMMatrix.idl index 7da60c0..94d0178 100644 --- a/third_party/WebKit/Source/core/geometry/DOMMatrix.idl +++ b/third_party/WebKit/Source/core/geometry/DOMMatrix.idl
@@ -9,7 +9,7 @@ RaisesException=Constructor, ConstructorCallWith=ExecutionContext, Exposed=(Window,Worker), - RuntimeEnabled=GeometryInterfaces, + RuntimeEnabled=GeometryInterfaces ] interface DOMMatrix : DOMMatrixReadOnly { [RaisesException, NewObject] static DOMMatrix fromMatrix(optional DOMMatrixInit other); [RaisesException, NewObject] static DOMMatrix fromFloat32Array(Float32Array array32);
diff --git a/third_party/WebKit/Source/core/geometry/DOMMatrixReadOnly.idl b/third_party/WebKit/Source/core/geometry/DOMMatrixReadOnly.idl index 56a29507..cc7f28b 100644 --- a/third_party/WebKit/Source/core/geometry/DOMMatrixReadOnly.idl +++ b/third_party/WebKit/Source/core/geometry/DOMMatrixReadOnly.idl
@@ -9,7 +9,7 @@ RaisesException=Constructor, ConstructorCallWith=ExecutionContext, Exposed=(Window,Worker), - RuntimeEnabled=GeometryInterfaces, + RuntimeEnabled=GeometryInterfaces ] interface DOMMatrixReadOnly { [RaisesException, NewObject] static DOMMatrixReadOnly fromMatrix(optional DOMMatrixInit other); [RaisesException, NewObject] static DOMMatrixReadOnly fromFloat32Array(Float32Array array32);
diff --git a/third_party/WebKit/Source/core/geometry/DOMPoint.idl b/third_party/WebKit/Source/core/geometry/DOMPoint.idl index 78672b8..25556ca 100644 --- a/third_party/WebKit/Source/core/geometry/DOMPoint.idl +++ b/third_party/WebKit/Source/core/geometry/DOMPoint.idl
@@ -8,7 +8,7 @@ Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0, optional unrestricted double z = 0, optional unrestricted double w = 1), Exposed=(Window,Worker), - RuntimeEnabled=GeometryInterfaces, + RuntimeEnabled=GeometryInterfaces ] interface DOMPoint : DOMPointReadOnly { [NewObject] static DOMPoint fromPoint(optional DOMPointInit other); inherit attribute unrestricted double x;
diff --git a/third_party/WebKit/Source/core/geometry/DOMPointReadOnly.idl b/third_party/WebKit/Source/core/geometry/DOMPointReadOnly.idl index f1b0d0b..3ac60c5 100644 --- a/third_party/WebKit/Source/core/geometry/DOMPointReadOnly.idl +++ b/third_party/WebKit/Source/core/geometry/DOMPointReadOnly.idl
@@ -8,7 +8,7 @@ Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0, optional unrestricted double z = 0, optional unrestricted double w = 1), Exposed=(Window,Worker), - RuntimeEnabled=GeometryInterfaces, + RuntimeEnabled=GeometryInterfaces ] interface DOMPointReadOnly { [NewObject] static DOMPointReadOnly fromPoint(optional DOMPointInit other);
diff --git a/third_party/WebKit/Source/core/geometry/DOMRect.idl b/third_party/WebKit/Source/core/geometry/DOMRect.idl index dfda1bf..241a82c6 100644 --- a/third_party/WebKit/Source/core/geometry/DOMRect.idl +++ b/third_party/WebKit/Source/core/geometry/DOMRect.idl
@@ -10,7 +10,7 @@ optional unrestricted double width = 0, optional unrestricted double height = 0), Exposed=(Window,Worker), - RuntimeEnabled=GeometryInterfaces, + RuntimeEnabled=GeometryInterfaces ] interface DOMRect : DOMRectReadOnly { [NewObject] static DOMRect fromRect(optional DOMRectInit other);
diff --git a/third_party/WebKit/Source/core/geometry/DOMRectReadOnly.idl b/third_party/WebKit/Source/core/geometry/DOMRectReadOnly.idl index e74e3c9..598abea 100644 --- a/third_party/WebKit/Source/core/geometry/DOMRectReadOnly.idl +++ b/third_party/WebKit/Source/core/geometry/DOMRectReadOnly.idl
@@ -8,7 +8,7 @@ Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0, optional unrestricted double width = 0, optional unrestricted double height = 0), Exposed=(Window,Worker), - RuntimeEnabled=GeometryInterfaces, + RuntimeEnabled=GeometryInterfaces ] interface DOMRectReadOnly { [NewObject] static DOMRectReadOnly fromRect(optional DOMRectInit other);
diff --git a/third_party/WebKit/Source/core/html/FormData.idl b/third_party/WebKit/Source/core/html/FormData.idl index cba06e6..2fcaf4b3 100644 --- a/third_party/WebKit/Source/core/html/FormData.idl +++ b/third_party/WebKit/Source/core/html/FormData.idl
@@ -38,7 +38,7 @@ [ Constructor(optional HTMLFormElement form), Exposed=(Window,Worker), - LegacyInterfaceTypeChecking, + LegacyInterfaceTypeChecking ] interface FormData { void append(USVString name, USVString value); [CallWith=ScriptState] void append(USVString name, Blob value, optional USVString filename);
diff --git a/third_party/WebKit/Source/core/html/HTMLAllCollection.idl b/third_party/WebKit/Source/core/html/HTMLAllCollection.idl index 26b0c4a..bc802d3 100644 --- a/third_party/WebKit/Source/core/html/HTMLAllCollection.idl +++ b/third_party/WebKit/Source/core/html/HTMLAllCollection.idl
@@ -28,7 +28,7 @@ [ Custom=LegacyCallAsFunction, - DependentLifetime, + DependentLifetime ] interface HTMLAllCollection { readonly attribute unsigned long length; [ImplementedAs=item] getter Element (unsigned long index);
diff --git a/third_party/WebKit/Source/core/html/HTMLCollection.idl b/third_party/WebKit/Source/core/html/HTMLCollection.idl index 9d9d6f8..b7152f3 100644 --- a/third_party/WebKit/Source/core/html/HTMLCollection.idl +++ b/third_party/WebKit/Source/core/html/HTMLCollection.idl
@@ -22,7 +22,7 @@ // https://dom.spec.whatwg.org/#interface-htmlcollection [ - DependentLifetime, + DependentLifetime ] interface HTMLCollection { readonly attribute unsigned long length; getter Element? item(unsigned long index);
diff --git a/third_party/WebKit/Source/core/html/HTMLElement.cpp b/third_party/WebKit/Source/core/html/HTMLElement.cpp index b4abad9..f5250a9 100644 --- a/third_party/WebKit/Source/core/html/HTMLElement.cpp +++ b/third_party/WebKit/Source/core/html/HTMLElement.cpp
@@ -311,7 +311,7 @@ if (!attr_name.NamespaceURI().IsNull()) return g_null_atom; - if (!attr_name.LocalName().StartsWith("on", kTextCaseASCIIInsensitive)) + if (!attr_name.LocalName().StartsWithIgnoringASCIICase("on")) return g_null_atom; typedef HashMap<AtomicString, AtomicString> StringToStringMap;
diff --git a/third_party/WebKit/Source/core/html/HTMLEmbedElement.idl b/third_party/WebKit/Source/core/html/HTMLEmbedElement.idl index 29ff386..f9df7f03 100644 --- a/third_party/WebKit/Source/core/html/HTMLEmbedElement.idl +++ b/third_party/WebKit/Source/core/html/HTMLEmbedElement.idl
@@ -23,7 +23,7 @@ // TODO(yukishiino): HTMLEmbedElement should not have [OverrideBuiltins]. [ OverrideBuiltins, - ActiveScriptWrappable, + ActiveScriptWrappable ] interface HTMLEmbedElement : HTMLElement { [CEReactions, Reflect, URL] attribute DOMString src; [CEReactions, Reflect] attribute DOMString type;
diff --git a/third_party/WebKit/Source/core/html/HTMLFormControlsCollection.idl b/third_party/WebKit/Source/core/html/HTMLFormControlsCollection.idl index d920252..2cd0ea2 100644 --- a/third_party/WebKit/Source/core/html/HTMLFormControlsCollection.idl +++ b/third_party/WebKit/Source/core/html/HTMLFormControlsCollection.idl
@@ -22,7 +22,7 @@ // https://html.spec.whatwg.org/#the-htmlformcontrolscollection-interface [ - DependentLifetime, + DependentLifetime ] interface HTMLFormControlsCollection : HTMLCollection { // inherits length and item() [ImplementedAs=namedGetter] getter (RadioNodeList or Element)? namedItem(DOMString name); // shadows inherited namedItem()
diff --git a/third_party/WebKit/Source/core/html/HTMLFormElement.idl b/third_party/WebKit/Source/core/html/HTMLFormElement.idl index 0e0e4f2..342d19b 100644 --- a/third_party/WebKit/Source/core/html/HTMLFormElement.idl +++ b/third_party/WebKit/Source/core/html/HTMLFormElement.idl
@@ -21,7 +21,7 @@ // https://html.spec.whatwg.org/#the-form-element [ - OverrideBuiltins, + OverrideBuiltins ] interface HTMLFormElement : HTMLElement { [CEReactions, Reflect=accept_charset] attribute DOMString acceptCharset; [CEReactions, Reflect, URL] attribute DOMString action;
diff --git a/third_party/WebKit/Source/core/html/HTMLFrameSetElement.idl b/third_party/WebKit/Source/core/html/HTMLFrameSetElement.idl index 0525e99b..aa00c482 100644 --- a/third_party/WebKit/Source/core/html/HTMLFrameSetElement.idl +++ b/third_party/WebKit/Source/core/html/HTMLFrameSetElement.idl
@@ -22,7 +22,7 @@ // FIXME: HTMLFrameSetElement should not have [OverrideBuiltins]. [ - OverrideBuiltins, + OverrideBuiltins ] interface HTMLFrameSetElement : HTMLElement { [CEReactions, Reflect] attribute DOMString cols; [CEReactions, Reflect] attribute DOMString rows;
diff --git a/third_party/WebKit/Source/core/html/HTMLHyperlinkElementUtils.idl b/third_party/WebKit/Source/core/html/HTMLHyperlinkElementUtils.idl index d6e27e0..ac6f340 100644 --- a/third_party/WebKit/Source/core/html/HTMLHyperlinkElementUtils.idl +++ b/third_party/WebKit/Source/core/html/HTMLHyperlinkElementUtils.idl
@@ -5,7 +5,7 @@ // https://html.spec.whatwg.org/#htmlhyperlinkelementutils [ - NoInterfaceObject, // Always used on target of 'implements' + NoInterfaceObject // Always used on target of 'implements' ] interface HTMLHyperlinkElementUtils { [CEReactions] stringifier attribute USVString href; readonly attribute USVString origin;
diff --git a/third_party/WebKit/Source/core/html/HTMLImageElement.idl b/third_party/WebKit/Source/core/html/HTMLImageElement.idl index 732668c..e5249ac 100644 --- a/third_party/WebKit/Source/core/html/HTMLImageElement.idl +++ b/third_party/WebKit/Source/core/html/HTMLImageElement.idl
@@ -23,7 +23,7 @@ [ ActiveScriptWrappable, ConstructorCallWith=Document, - NamedConstructor=Image(optional unsigned long width, optional unsigned long height), + NamedConstructor=Image(optional unsigned long width, optional unsigned long height) ] interface HTMLImageElement : HTMLElement { [CEReactions, Reflect] attribute DOMString alt; [CEReactions, Reflect, URL] attribute DOMString src;
diff --git a/third_party/WebKit/Source/core/html/HTMLInputElement.idl b/third_party/WebKit/Source/core/html/HTMLInputElement.idl index 6fb8460..12495b0 100644 --- a/third_party/WebKit/Source/core/html/HTMLInputElement.idl +++ b/third_party/WebKit/Source/core/html/HTMLInputElement.idl
@@ -24,7 +24,7 @@ enum SelectionMode { "select", "start", "end", "preserve" }; [ - ActiveScriptWrappable, + ActiveScriptWrappable ] interface HTMLInputElement : HTMLElement { [CEReactions, Reflect] attribute DOMString accept; [CEReactions, Reflect] attribute DOMString alt;
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.idl b/third_party/WebKit/Source/core/html/HTMLMediaElement.idl index 6c88c1c4..071e8b2 100644 --- a/third_party/WebKit/Source/core/html/HTMLMediaElement.idl +++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.idl
@@ -28,7 +28,7 @@ enum CanPlayTypeResult { "" /* empty string */, "maybe", "probably" }; [ ActiveScriptWrappable, - DependentLifetime, + DependentLifetime ] interface HTMLMediaElement : HTMLElement { // error state
diff --git a/third_party/WebKit/Source/core/html/HTMLObjectElement.cpp b/third_party/WebKit/Source/core/html/HTMLObjectElement.cpp index 8c1b6ddc..24d4f76 100644 --- a/third_party/WebKit/Source/core/html/HTMLObjectElement.cpp +++ b/third_party/WebKit/Source/core/html/HTMLObjectElement.cpp
@@ -238,7 +238,7 @@ bool HTMLObjectElement::HasValidClassId() const { if (MIMETypeRegistry::IsJavaAppletMIMEType(service_type_) && - ClassId().StartsWith("java:", kTextCaseASCIIInsensitive)) + ClassId().StartsWithIgnoringASCIICase("java:")) return true; // HTML5 says that fallback content should be rendered if a non-empty
diff --git a/third_party/WebKit/Source/core/html/HTMLObjectElement.idl b/third_party/WebKit/Source/core/html/HTMLObjectElement.idl index 5fc43e31..f160057 100644 --- a/third_party/WebKit/Source/core/html/HTMLObjectElement.idl +++ b/third_party/WebKit/Source/core/html/HTMLObjectElement.idl
@@ -23,7 +23,7 @@ // TODO(yukishiino): HTMLObjectElement should not have [OverrideBuiltins]. [ OverrideBuiltins, - ActiveScriptWrappable, + ActiveScriptWrappable ] interface HTMLObjectElement : HTMLElement { [CEReactions, Reflect, URL] attribute DOMString data; [CEReactions, Reflect] attribute DOMString type;
diff --git a/third_party/WebKit/Source/core/html/HTMLOptionsCollection.idl b/third_party/WebKit/Source/core/html/HTMLOptionsCollection.idl index 3c6caa3..939d491 100644 --- a/third_party/WebKit/Source/core/html/HTMLOptionsCollection.idl +++ b/third_party/WebKit/Source/core/html/HTMLOptionsCollection.idl
@@ -22,7 +22,7 @@ // https://html.spec.whatwg.org/#the-htmloptionscollection-interface [ - DependentLifetime, + DependentLifetime ] interface HTMLOptionsCollection : HTMLCollection { // inherits item() [CEReactions, RaisesException=Setter] attribute unsigned long length; // shadows inherited length
diff --git a/third_party/WebKit/Source/core/html/HTMLVideoElement.idl b/third_party/WebKit/Source/core/html/HTMLVideoElement.idl index a5defd8..2e9974d 100644 --- a/third_party/WebKit/Source/core/html/HTMLVideoElement.idl +++ b/third_party/WebKit/Source/core/html/HTMLVideoElement.idl
@@ -26,7 +26,7 @@ // https://html.spec.whatwg.org/#the-video-element [ - ActiveScriptWrappable, + ActiveScriptWrappable ] interface HTMLVideoElement : HTMLMediaElement { [CEReactions, Reflect] attribute unsigned long width; [CEReactions, Reflect] attribute unsigned long height;
diff --git a/third_party/WebKit/Source/core/html/ImageData.idl b/third_party/WebKit/Source/core/html/ImageData.idl index 173ecfa..52153cc 100644 --- a/third_party/WebKit/Source/core/html/ImageData.idl +++ b/third_party/WebKit/Source/core/html/ImageData.idl
@@ -35,7 +35,7 @@ Constructor(unsigned long sw, unsigned long sh), Constructor(Uint8ClampedArray data, unsigned long sw, optional unsigned long sh), Exposed=(Window,Worker), - RaisesException=Constructor, + RaisesException=Constructor ] interface ImageData { [RuntimeEnabled=ExperimentalCanvasFeatures] ImageDataColorSettings getColorSettings();
diff --git a/third_party/WebKit/Source/web/ExternalPopupMenuTest.cpp b/third_party/WebKit/Source/core/html/forms/ExternalPopupMenuTest.cpp similarity index 100% rename from third_party/WebKit/Source/web/ExternalPopupMenuTest.cpp rename to third_party/WebKit/Source/core/html/forms/ExternalPopupMenuTest.cpp
diff --git a/third_party/WebKit/Source/core/html/media/MediaDocument.cpp b/third_party/WebKit/Source/core/html/media/MediaDocument.cpp index 3e85538a..e3a22ad 100644 --- a/third_party/WebKit/Source/core/html/media/MediaDocument.cpp +++ b/third_party/WebKit/Source/core/html/media/MediaDocument.cpp
@@ -193,7 +193,7 @@ if (GetDocument()->GetSettings() && GetDocument()->GetSettings()->GetEmbeddedMediaExperienceEnabled() && - source->type().StartsWith("video/", kTextCaseASCIIInsensitive)) { + source->type().StartsWithIgnoringASCIICase("video/")) { EventListener* listener = MediaLoadedEventListener::Create(); AddEventListenerOptions options; options.setOnce(true);
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp b/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp index 6235f77..0ecc2af 100644 --- a/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp +++ b/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp
@@ -459,152 +459,124 @@ // Check for Quirks Mode. if (name != "html" || - public_id.StartsWith("+//Silmaril//dtd html Pro v0r11 19970101//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith( - "-//AdvaSoft Ltd//DTD HTML 3.0 asWedit + extensions//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//AS//DTD HTML 3.0 asWedit + extensions//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//IETF//DTD HTML 2.0 Level 1//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//IETF//DTD HTML 2.0 Level 2//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//IETF//DTD HTML 2.0 Strict Level 1//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//IETF//DTD HTML 2.0 Strict Level 2//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//IETF//DTD HTML 2.0 Strict//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//IETF//DTD HTML 2.0//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//IETF//DTD HTML 2.1E//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//IETF//DTD HTML 3.0//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//IETF//DTD HTML 3.2 Final//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//IETF//DTD HTML 3.2//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//IETF//DTD HTML 3//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//IETF//DTD HTML Level 0//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//IETF//DTD HTML Level 1//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//IETF//DTD HTML Level 2//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//IETF//DTD HTML Level 3//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//IETF//DTD HTML Strict Level 0//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//IETF//DTD HTML Strict Level 1//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//IETF//DTD HTML Strict Level 2//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//IETF//DTD HTML Strict Level 3//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//IETF//DTD HTML Strict//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//IETF//DTD HTML//", kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//Metrius//DTD Metrius Presentational//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith( - "-//Microsoft//DTD Internet Explorer 2.0 HTML Strict//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//Microsoft//DTD Internet Explorer 2.0 HTML//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//Microsoft//DTD Internet Explorer 2.0 Tables//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith( - "-//Microsoft//DTD Internet Explorer 3.0 HTML Strict//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//Microsoft//DTD Internet Explorer 3.0 HTML//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//Microsoft//DTD Internet Explorer 3.0 Tables//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//Netscape Comm. Corp.//DTD HTML//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//Netscape Comm. Corp.//DTD Strict HTML//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//O'Reilly and Associates//DTD HTML 2.0//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith( - "-//O'Reilly and Associates//DTD HTML Extended 1.0//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith( - "-//O'Reilly and Associates//DTD HTML Extended Relaxed 1.0//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//SoftQuad Software//DTD HoTMetaL PRO " - "6.0::19990601::extensions to HTML 4.0//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//SoftQuad//DTD HoTMetaL PRO " - "4.0::19971010::extensions to HTML 4.0//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//Spyglass//DTD HTML 2.0 Extended//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//SQ//DTD HTML 2.0 HoTMetaL + extensions//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//Sun Microsystems Corp.//DTD HotJava HTML//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith( - "-//Sun Microsystems Corp.//DTD HotJava Strict HTML//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//W3C//DTD HTML 3 1995-03-24//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//W3C//DTD HTML 3.2 Draft//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//W3C//DTD HTML 3.2 Final//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//W3C//DTD HTML 3.2//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//W3C//DTD HTML 3.2S Draft//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//W3C//DTD HTML 4.0 Frameset//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//W3C//DTD HTML 4.0 Transitional//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//W3C//DTD HTML Experimental 19960712//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//W3C//DTD HTML Experimental 970421//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//W3C//DTD W3 HTML//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//W3O//DTD W3 HTML 3.0//", - kTextCaseASCIIInsensitive) || + public_id.StartsWithIgnoringASCIICase( + "+//Silmaril//dtd html Pro v0r11 19970101//") || + public_id.StartsWithIgnoringASCIICase( + "-//AdvaSoft Ltd//DTD HTML 3.0 asWedit + extensions//") || + public_id.StartsWithIgnoringASCIICase( + "-//AS//DTD HTML 3.0 asWedit + extensions//") || + public_id.StartsWithIgnoringASCIICase( + "-//IETF//DTD HTML 2.0 Level 1//") || + public_id.StartsWithIgnoringASCIICase( + "-//IETF//DTD HTML 2.0 Level 2//") || + public_id.StartsWithIgnoringASCIICase( + "-//IETF//DTD HTML 2.0 Strict Level 1//") || + public_id.StartsWithIgnoringASCIICase( + "-//IETF//DTD HTML 2.0 Strict Level 2//") || + public_id.StartsWithIgnoringASCIICase("-//IETF//DTD HTML 2.0 Strict//") || + public_id.StartsWithIgnoringASCIICase("-//IETF//DTD HTML 2.0//") || + public_id.StartsWithIgnoringASCIICase("-//IETF//DTD HTML 2.1E//") || + public_id.StartsWithIgnoringASCIICase("-//IETF//DTD HTML 3.0//") || + public_id.StartsWithIgnoringASCIICase("-//IETF//DTD HTML 3.2 Final//") || + public_id.StartsWithIgnoringASCIICase("-//IETF//DTD HTML 3.2//") || + public_id.StartsWithIgnoringASCIICase("-//IETF//DTD HTML 3//") || + public_id.StartsWithIgnoringASCIICase("-//IETF//DTD HTML Level 0//") || + public_id.StartsWithIgnoringASCIICase("-//IETF//DTD HTML Level 1//") || + public_id.StartsWithIgnoringASCIICase("-//IETF//DTD HTML Level 2//") || + public_id.StartsWithIgnoringASCIICase("-//IETF//DTD HTML Level 3//") || + public_id.StartsWithIgnoringASCIICase( + "-//IETF//DTD HTML Strict Level 0//") || + public_id.StartsWithIgnoringASCIICase( + "-//IETF//DTD HTML Strict Level 1//") || + public_id.StartsWithIgnoringASCIICase( + "-//IETF//DTD HTML Strict Level 2//") || + public_id.StartsWithIgnoringASCIICase( + "-//IETF//DTD HTML Strict Level 3//") || + public_id.StartsWithIgnoringASCIICase("-//IETF//DTD HTML Strict//") || + public_id.StartsWithIgnoringASCIICase("-//IETF//DTD HTML//") || + public_id.StartsWithIgnoringASCIICase( + "-//Metrius//DTD Metrius Presentational//") || + public_id.StartsWithIgnoringASCIICase( + "-//Microsoft//DTD Internet Explorer 2.0 HTML Strict//") || + public_id.StartsWithIgnoringASCIICase( + "-//Microsoft//DTD Internet Explorer 2.0 HTML//") || + public_id.StartsWithIgnoringASCIICase( + "-//Microsoft//DTD Internet Explorer 2.0 Tables//") || + public_id.StartsWithIgnoringASCIICase( + "-//Microsoft//DTD Internet Explorer 3.0 HTML Strict//") || + public_id.StartsWithIgnoringASCIICase( + "-//Microsoft//DTD Internet Explorer 3.0 HTML//") || + public_id.StartsWithIgnoringASCIICase( + "-//Microsoft//DTD Internet Explorer 3.0 Tables//") || + public_id.StartsWithIgnoringASCIICase( + "-//Netscape Comm. Corp.//DTD HTML//") || + public_id.StartsWithIgnoringASCIICase( + "-//Netscape Comm. Corp.//DTD Strict HTML//") || + public_id.StartsWithIgnoringASCIICase( + "-//O'Reilly and Associates//DTD HTML 2.0//") || + public_id.StartsWithIgnoringASCIICase( + "-//O'Reilly and Associates//DTD HTML Extended 1.0//") || + public_id.StartsWithIgnoringASCIICase( + "-//O'Reilly and Associates//DTD HTML Extended Relaxed 1.0//") || + public_id.StartsWithIgnoringASCIICase( + "-//SoftQuad Software//DTD HoTMetaL PRO " + "6.0::19990601::extensions to HTML 4.0//") || + public_id.StartsWithIgnoringASCIICase( + "-//SoftQuad//DTD HoTMetaL PRO " + "4.0::19971010::extensions to HTML 4.0//") || + public_id.StartsWithIgnoringASCIICase( + "-//Spyglass//DTD HTML 2.0 Extended//") || + public_id.StartsWithIgnoringASCIICase( + "-//SQ//DTD HTML 2.0 HoTMetaL + extensions//") || + public_id.StartsWithIgnoringASCIICase( + "-//Sun Microsystems Corp.//DTD HotJava HTML//") || + public_id.StartsWithIgnoringASCIICase( + "-//Sun Microsystems Corp.//DTD HotJava Strict HTML//") || + public_id.StartsWithIgnoringASCIICase( + "-//W3C//DTD HTML 3 1995-03-24//") || + public_id.StartsWithIgnoringASCIICase("-//W3C//DTD HTML 3.2 Draft//") || + public_id.StartsWithIgnoringASCIICase("-//W3C//DTD HTML 3.2 Final//") || + public_id.StartsWithIgnoringASCIICase("-//W3C//DTD HTML 3.2//") || + public_id.StartsWithIgnoringASCIICase("-//W3C//DTD HTML 3.2S Draft//") || + public_id.StartsWithIgnoringASCIICase( + "-//W3C//DTD HTML 4.0 Frameset//") || + public_id.StartsWithIgnoringASCIICase( + "-//W3C//DTD HTML 4.0 Transitional//") || + public_id.StartsWithIgnoringASCIICase( + "-//W3C//DTD HTML Experimental 19960712//") || + public_id.StartsWithIgnoringASCIICase( + "-//W3C//DTD HTML Experimental 970421//") || + public_id.StartsWithIgnoringASCIICase("-//W3C//DTD W3 HTML//") || + public_id.StartsWithIgnoringASCIICase("-//W3O//DTD W3 HTML 3.0//") || DeprecatedEqualIgnoringCase(public_id, "-//W3O//DTD W3 HTML Strict 3.0//EN//") || - public_id.StartsWith("-//WebTechs//DTD Mozilla HTML 2.0//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//WebTechs//DTD Mozilla HTML//", - kTextCaseASCIIInsensitive) || + public_id.StartsWithIgnoringASCIICase( + "-//WebTechs//DTD Mozilla HTML 2.0//") || + public_id.StartsWithIgnoringASCIICase( + "-//WebTechs//DTD Mozilla HTML//") || DeprecatedEqualIgnoringCase(public_id, "-/W3C/DTD HTML 4.0 Transitional/EN") || DeprecatedEqualIgnoringCase(public_id, "HTML") || DeprecatedEqualIgnoringCase( system_id, "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd") || - (system_id.IsEmpty() && - public_id.StartsWith("-//W3C//DTD HTML 4.01 Frameset//", - kTextCaseASCIIInsensitive)) || - (system_id.IsEmpty() && - public_id.StartsWith("-//W3C//DTD HTML 4.01 Transitional//", - kTextCaseASCIIInsensitive))) { + (system_id.IsEmpty() && public_id.StartsWithIgnoringASCIICase( + "-//W3C//DTD HTML 4.01 Frameset//")) || + (system_id.IsEmpty() && public_id.StartsWithIgnoringASCIICase( + "-//W3C//DTD HTML 4.01 Transitional//"))) { SetCompatibilityMode(Document::kQuirksMode); return; } // Check for Limited Quirks Mode. - if (public_id.StartsWith("-//W3C//DTD XHTML 1.0 Frameset//", - kTextCaseASCIIInsensitive) || - public_id.StartsWith("-//W3C//DTD XHTML 1.0 Transitional//", - kTextCaseASCIIInsensitive) || - (!system_id.IsEmpty() && - public_id.StartsWith("-//W3C//DTD HTML 4.01 Frameset//", - kTextCaseASCIIInsensitive)) || - (!system_id.IsEmpty() && - public_id.StartsWith("-//W3C//DTD HTML 4.01 Transitional//", - kTextCaseASCIIInsensitive))) { + if (public_id.StartsWithIgnoringASCIICase( + "-//W3C//DTD XHTML 1.0 Frameset//") || + public_id.StartsWithIgnoringASCIICase( + "-//W3C//DTD XHTML 1.0 Transitional//") || + (!system_id.IsEmpty() && public_id.StartsWithIgnoringASCIICase( + "-//W3C//DTD HTML 4.01 Frameset//")) || + (!system_id.IsEmpty() && public_id.StartsWithIgnoringASCIICase( + "-//W3C//DTD HTML 4.01 Transitional//"))) { SetCompatibilityMode(Document::kLimitedQuirksMode); return; }
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParserTest.cpp b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParserTest.cpp index 4d6fa7b..2188bab 100644 --- a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParserTest.cpp +++ b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParserTest.cpp
@@ -16,13 +16,10 @@ namespace { -class TestPrerendererClient : public GarbageCollected<TestPrerendererClient>, - public PrerendererClient { - USING_GARBAGE_COLLECTED_MIXIN(TestPrerendererClient); - +class TestPrerendererClient : public PrerendererClient { public: TestPrerendererClient(Page& page, bool is_prefetch_only) - : PrerendererClient(page), is_prefetch_only_(is_prefetch_only) {} + : PrerendererClient(page, nullptr), is_prefetch_only_(is_prefetch_only) {} private: void WillAddPrerender(Prerender*) override {}
diff --git a/third_party/WebKit/Source/core/html/track/AudioTrack.idl b/third_party/WebKit/Source/core/html/track/AudioTrack.idl index 09c82f3..5ab1662 100644 --- a/third_party/WebKit/Source/core/html/track/AudioTrack.idl +++ b/third_party/WebKit/Source/core/html/track/AudioTrack.idl
@@ -6,7 +6,7 @@ [ DependentLifetime, - RuntimeEnabled=AudioVideoTracks, + RuntimeEnabled=AudioVideoTracks ] interface AudioTrack { readonly attribute DOMString id; readonly attribute DOMString kind;
diff --git a/third_party/WebKit/Source/core/html/track/AudioTrackList.idl b/third_party/WebKit/Source/core/html/track/AudioTrackList.idl index d49e9cc..98084b02 100644 --- a/third_party/WebKit/Source/core/html/track/AudioTrackList.idl +++ b/third_party/WebKit/Source/core/html/track/AudioTrackList.idl
@@ -6,7 +6,7 @@ [ DependentLifetime, - RuntimeEnabled=AudioVideoTracks, + RuntimeEnabled=AudioVideoTracks ] interface AudioTrackList : EventTarget { readonly attribute unsigned long length; getter AudioTrack (unsigned long index);
diff --git a/third_party/WebKit/Source/core/html/track/TextTrack.idl b/third_party/WebKit/Source/core/html/track/TextTrack.idl index b09a1f7c..ed942c82 100644 --- a/third_party/WebKit/Source/core/html/track/TextTrack.idl +++ b/third_party/WebKit/Source/core/html/track/TextTrack.idl
@@ -29,7 +29,7 @@ enum TextTrackKind { "subtitles", "captions", "descriptions", "chapters", "metadata" }; [ - DependentLifetime, + DependentLifetime ] interface TextTrack : EventTarget { readonly attribute TextTrackKind kind; readonly attribute DOMString label;
diff --git a/third_party/WebKit/Source/core/html/track/TextTrackCue.idl b/third_party/WebKit/Source/core/html/track/TextTrackCue.idl index 3ca21e2..8902e31 100644 --- a/third_party/WebKit/Source/core/html/track/TextTrackCue.idl +++ b/third_party/WebKit/Source/core/html/track/TextTrackCue.idl
@@ -26,7 +26,7 @@ // https://html.spec.whatwg.org/#texttrackcue [ - DependentLifetime, + DependentLifetime ] interface TextTrackCue : EventTarget { readonly attribute TextTrack? track;
diff --git a/third_party/WebKit/Source/core/html/track/TextTrackList.idl b/third_party/WebKit/Source/core/html/track/TextTrackList.idl index d74518df..11ccda8 100644 --- a/third_party/WebKit/Source/core/html/track/TextTrackList.idl +++ b/third_party/WebKit/Source/core/html/track/TextTrackList.idl
@@ -26,7 +26,7 @@ // https://html.spec.whatwg.org/#texttracklist [ - DependentLifetime, + DependentLifetime ] interface TextTrackList : EventTarget { readonly attribute unsigned long length; getter TextTrack (unsigned long index);
diff --git a/third_party/WebKit/Source/core/html/track/TrackEvent.idl b/third_party/WebKit/Source/core/html/track/TrackEvent.idl index 29066ef8..ac013fb 100644 --- a/third_party/WebKit/Source/core/html/track/TrackEvent.idl +++ b/third_party/WebKit/Source/core/html/track/TrackEvent.idl
@@ -26,7 +26,7 @@ // https://html.spec.whatwg.org/multipage/embedded-content.html#the-trackevent-interface [ - Constructor(DOMString type, optional TrackEventInit eventInitDict), + Constructor(DOMString type, optional TrackEventInit eventInitDict) ] interface TrackEvent : Event { readonly attribute (VideoTrack or AudioTrack or TextTrack)? track; };
diff --git a/third_party/WebKit/Source/core/html/track/VideoTrack.idl b/third_party/WebKit/Source/core/html/track/VideoTrack.idl index 04a1d0b..980e8deb 100644 --- a/third_party/WebKit/Source/core/html/track/VideoTrack.idl +++ b/third_party/WebKit/Source/core/html/track/VideoTrack.idl
@@ -6,7 +6,7 @@ [ DependentLifetime, - RuntimeEnabled=AudioVideoTracks, + RuntimeEnabled=AudioVideoTracks ] interface VideoTrack { readonly attribute DOMString id; readonly attribute DOMString kind;
diff --git a/third_party/WebKit/Source/core/html/track/VideoTrackList.idl b/third_party/WebKit/Source/core/html/track/VideoTrackList.idl index 847e45f..d3f2d66 100644 --- a/third_party/WebKit/Source/core/html/track/VideoTrackList.idl +++ b/third_party/WebKit/Source/core/html/track/VideoTrackList.idl
@@ -6,7 +6,7 @@ [ DependentLifetime, - RuntimeEnabled=AudioVideoTracks, + RuntimeEnabled=AudioVideoTracks ] interface VideoTrackList : EventTarget { readonly attribute unsigned long length; getter VideoTrack (unsigned long index);
diff --git a/third_party/WebKit/Source/core/html/track/vtt/VTTCue.idl b/third_party/WebKit/Source/core/html/track/vtt/VTTCue.idl index bb39f1c6..3ea44af1 100644 --- a/third_party/WebKit/Source/core/html/track/vtt/VTTCue.idl +++ b/third_party/WebKit/Source/core/html/track/vtt/VTTCue.idl
@@ -38,7 +38,7 @@ [ Constructor(double startTime, double endTime, DOMString text), ConstructorCallWith=Document, - DependentLifetime, + DependentLifetime ] interface VTTCue : TextTrackCue { [RuntimeEnabled=WebVTTRegions] attribute VTTRegion? region; attribute DirectionSetting vertical;
diff --git a/third_party/WebKit/Source/core/html/track/vtt/VTTRegion.idl b/third_party/WebKit/Source/core/html/track/vtt/VTTRegion.idl index 6744153f..79ca3122 100644 --- a/third_party/WebKit/Source/core/html/track/vtt/VTTRegion.idl +++ b/third_party/WebKit/Source/core/html/track/vtt/VTTRegion.idl
@@ -29,7 +29,7 @@ [ Constructor, - RuntimeEnabled=WebVTTRegions, + RuntimeEnabled=WebVTTRegions ] interface VTTRegion { [RaisesException=Setter] attribute double width; [RaisesException=Setter] attribute long lines;
diff --git a/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.idl b/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.idl index 8d64642..0ac526d 100644 --- a/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.idl +++ b/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.idl
@@ -42,7 +42,7 @@ [ LegacyTreatAsPartialInterface, NoInterfaceObject, // Always used on target of 'implements' - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface ImageBitmapFactories { [CallWith=ScriptState, RaisesException] Promise createImageBitmap( ImageBitmapSource imageBitmap, optional ImageBitmapOptions options);
diff --git a/third_party/WebKit/Source/core/input/InputDeviceCapabilities.idl b/third_party/WebKit/Source/core/input/InputDeviceCapabilities.idl index 2529918..16e39ab1 100644 --- a/third_party/WebKit/Source/core/input/InputDeviceCapabilities.idl +++ b/third_party/WebKit/Source/core/input/InputDeviceCapabilities.idl
@@ -12,7 +12,7 @@ // https://wicg.github.io/InputDeviceCapabilities/#the-inputdevicecapabilities-interface [ - Constructor(optional InputDeviceCapabilitiesInit deviceInitDict), + Constructor(optional InputDeviceCapabilitiesInit deviceInitDict) ] interface InputDeviceCapabilities { // Whether this device dispatches touch events for movement. This is used to detect
diff --git a/third_party/WebKit/Source/core/inspector/DevToolsHost.idl b/third_party/WebKit/Source/core/inspector/DevToolsHost.idl index 12defb8..7aca074 100644 --- a/third_party/WebKit/Source/core/inspector/DevToolsHost.idl +++ b/third_party/WebKit/Source/core/inspector/DevToolsHost.idl
@@ -31,7 +31,7 @@ */ [ - NoInterfaceObject, + NoInterfaceObject ] interface DevToolsHost { float zoomFactor();
diff --git a/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp index a0803c8d..4bfb4df 100644 --- a/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp +++ b/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp
@@ -996,11 +996,9 @@ (start_tag_found && end_tag_found && DeprecatedEqualIgnoringCase(node->nodeName(), tag_name_query)) || (start_tag_found && !end_tag_found && - node->nodeName().StartsWith(tag_name_query, - kTextCaseUnicodeInsensitive)) || + node->nodeName().StartsWithIgnoringCase(tag_name_query)) || (!start_tag_found && end_tag_found && - node->nodeName().EndsWith(tag_name_query, - kTextCaseUnicodeInsensitive))) { + node->nodeName().EndsWithIgnoringCase(tag_name_query))) { result_collector.insert(node); break; }
diff --git a/third_party/WebKit/Source/core/layout/FlexibleBoxAlgorithm.h b/third_party/WebKit/Source/core/layout/FlexibleBoxAlgorithm.h index 537d151..5408f67 100644 --- a/third_party/WebKit/Source/core/layout/FlexibleBoxAlgorithm.h +++ b/third_party/WebKit/Source/core/layout/FlexibleBoxAlgorithm.h
@@ -93,7 +93,7 @@ LayoutUnit& sum_hypothetical_main_size); private: - bool IsMultiline() const { return style_->FlexWrap() != kFlexNoWrap; } + bool IsMultiline() const { return style_->FlexWrap() != EFlexWrap::kNowrap; } const ComputedStyle* style_; LayoutUnit line_break_length_;
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp index 8ecf5d84..5770787f 100644 --- a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
@@ -2417,8 +2417,10 @@ ellipsis_width = (font == first_line_font) ? first_line_ellipsis_width : 0; if (!ellipsis_width) { - DCHECK(font.PrimaryFont()); - if (font.PrimaryFont()->GlyphForCharacter(kHorizontalEllipsisCharacter)) { + const SimpleFontData* font_data = font.PrimaryFont(); + DCHECK(font_data); + if (font_data && + font_data->GlyphForCharacter(kHorizontalEllipsisCharacter)) { ellipsis_width = font.Width(ConstructTextRun(font, &kHorizontalEllipsisCharacter, 1, StyleRef(), ellipsis_direction));
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp index 72973e0..0091030 100644 --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -2911,7 +2911,8 @@ // We don't stretch multiline flexboxes because they need to apply line // spacing (align-content) first. - if (parent->IsFlexibleBox() && parent->Style()->FlexWrap() == kFlexNoWrap && + if (parent->IsFlexibleBox() && + parent->Style()->FlexWrap() == EFlexWrap::kNowrap && parent->Style()->IsColumnFlexDirection() && ColumnFlexItemHasStretchAlignment()) return true; @@ -2960,7 +2961,7 @@ // For multiline columns, we need to apply align-content first, so we can't // stretch now. if (!Parent()->Style()->IsColumnFlexDirection() || - Parent()->Style()->FlexWrap() != kFlexNoWrap) + Parent()->Style()->FlexWrap() != EFlexWrap::kNowrap) return true; if (!ColumnFlexItemHasStretchAlignment()) return true;
diff --git a/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp b/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp index 0a9fda1..c5fee8c2 100644 --- a/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp
@@ -428,7 +428,7 @@ AlignChildren(line_contexts); - if (Style()->FlexWrap() == kFlexWrapReverse) + if (Style()->FlexWrap() == EFlexWrap::kWrapReverse) FlipForWrapReverse(line_contexts, cross_axis_start_edge); // direction:rtl + flex-direction:column means the cross-axis direction is @@ -477,7 +477,7 @@ } bool LayoutFlexibleBox::IsMultiline() const { - return Style()->FlexWrap() != kFlexNoWrap; + return Style()->FlexWrap() != EFlexWrap::kNowrap; } Length LayoutFlexibleBox::FlexBasisForChild(const LayoutBox& child) const { @@ -1643,7 +1643,7 @@ CrossAxisContentExtent() - CrossAxisExtentForChild(child); return AlignmentOffset(available_space, AlignmentForChild(child), LayoutUnit(), LayoutUnit(), - StyleRef().FlexWrap() == kFlexWrapReverse); + StyleRef().FlexWrap() == EFlexWrap::kWrapReverse); } LayoutUnit LayoutFlexibleBox::StaticInlinePositionForPositionedChild( @@ -1717,7 +1717,7 @@ if (align == kItemPositionBaseline && HasOrthogonalFlow(child)) align = kItemPositionFlexStart; - if (Style()->FlexWrap() == kFlexWrapReverse) { + if (Style()->FlexWrap() == EFlexWrap::kWrapReverse) { if (align == kItemPositionFlexStart) align = kItemPositionFlexEnd; else if (align == kItemPositionFlexEnd) @@ -2055,10 +2055,10 @@ line_cross_axis_extent, *flex_item.box); LayoutUnit offset = AlignmentOffset( available_space, position, MarginBoxAscentForChild(*flex_item.box), - max_ascent, StyleRef().FlexWrap() == kFlexWrapReverse); + max_ascent, StyleRef().FlexWrap() == EFlexWrap::kWrapReverse); AdjustAlignmentForChild(*flex_item.box, offset); if (position == kItemPositionBaseline && - StyleRef().FlexWrap() == kFlexWrapReverse) { + StyleRef().FlexWrap() == EFlexWrap::kWrapReverse) { min_margin_after_baseline = std::min(min_margin_after_baseline, AvailableAlignmentSpaceForChild(line_cross_axis_extent, @@ -2069,7 +2069,7 @@ min_margin_after_baselines.push_back(min_margin_after_baseline); } - if (Style()->FlexWrap() != kFlexWrapReverse) + if (Style()->FlexWrap() != EFlexWrap::kWrapReverse) return; // wrap-reverse flips the cross axis start and end. For baseline alignment,
diff --git a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp index 1e5638c..66cec73 100644 --- a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
@@ -725,8 +725,10 @@ Grid& grid, GridTrackSizingDirection direction) const { bool is_row_axis = direction == kForColumns; - if ((is_row_axis && StyleRef().GridAutoRepeatColumnsType() != kAutoFit) || - (!is_row_axis && StyleRef().GridAutoRepeatRowsType() != kAutoFit)) + if ((is_row_axis && + StyleRef().GridAutoRepeatColumnsType() != AutoRepeatType::kAutoFit) || + (!is_row_axis && + StyleRef().GridAutoRepeatRowsType() != AutoRepeatType::kAutoFit)) return nullptr; std::unique_ptr<OrderedTrackIndexSet> empty_track_indexes;
diff --git a/third_party/WebKit/Source/core/layout/LayoutTable.cpp b/third_party/WebKit/Source/core/layout/LayoutTable.cpp index 8b9484ba..4b2f79e 100644 --- a/third_party/WebKit/Source/core/layout/LayoutTable.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
@@ -1163,9 +1163,7 @@ UpdateCollapsedOuterBorders(); return LayoutUnit(collapsed_outer_border_before_); } - // TODO(karlo@opera.com): Should we round this in the same way as in - // BorderStart()? - return LayoutBlock::BorderBefore(); + return LayoutUnit(LayoutBlock::BorderBefore().ToInt()); } LayoutUnit LayoutTable::BorderAfter() const { @@ -1173,9 +1171,7 @@ UpdateCollapsedOuterBorders(); return LayoutUnit(collapsed_outer_border_after_); } - // TODO(karlo@opera.com): Should we round this in the same way as in - // BorderStart()? - return LayoutBlock::BorderAfter(); + return LayoutUnit(LayoutBlock::BorderAfter().ToInt()); } LayoutUnit LayoutTable::BorderStart() const {
diff --git a/third_party/WebKit/Source/core/loader/PrerendererClient.cpp b/third_party/WebKit/Source/core/loader/PrerendererClient.cpp index 74ae310..ebad4c77 100644 --- a/third_party/WebKit/Source/core/loader/PrerendererClient.cpp +++ b/third_party/WebKit/Source/core/loader/PrerendererClient.cpp
@@ -31,7 +31,11 @@ #include "core/loader/PrerendererClient.h" +#include "core/exported/WebViewBase.h" #include "core/page/Page.h" +#include "platform/Prerender.h" +#include "public/platform/WebPrerender.h" +#include "public/web/WebPrerendererClient.h" namespace blink { @@ -47,7 +51,19 @@ return supplement; } -PrerendererClient::PrerendererClient(Page& page) : Supplement<Page>(page) {} +PrerendererClient::PrerendererClient(Page& page, WebPrerendererClient* client) + : Supplement<Page>(page), client_(client) {} + +void PrerendererClient::WillAddPrerender(Prerender* prerender) { + if (!client_) + return; + WebPrerender web_prerender(prerender); + client_->WillAddPrerender(&web_prerender); +} + +bool PrerendererClient::IsPrefetchOnly() { + return client_ && client_->IsPrefetchOnly(); +} void ProvidePrerendererClientTo(Page& page, PrerendererClient* client) { PrerendererClient::ProvideTo(page, PrerendererClient::SupplementName(),
diff --git a/third_party/WebKit/Source/core/loader/PrerendererClient.h b/third_party/WebKit/Source/core/loader/PrerendererClient.h index 7d37126..b7ea467 100644 --- a/third_party/WebKit/Source/core/loader/PrerendererClient.h +++ b/third_party/WebKit/Source/core/loader/PrerendererClient.h
@@ -40,17 +40,25 @@ class Page; class Prerender; +class WebPrerendererClient; -class CORE_EXPORT PrerendererClient : public Supplement<Page> { +class CORE_EXPORT PrerendererClient + : public GarbageCollected<PrerendererClient>, + public Supplement<Page> { + USING_GARBAGE_COLLECTED_MIXIN(PrerendererClient); + WTF_MAKE_NONCOPYABLE(PrerendererClient); + public: - virtual void WillAddPrerender(Prerender*) = 0; - virtual bool IsPrefetchOnly() = 0; + PrerendererClient(Page&, WebPrerendererClient*); + + virtual void WillAddPrerender(Prerender*); + virtual bool IsPrefetchOnly(); static const char* SupplementName(); static PrerendererClient* From(Page*); - protected: - explicit PrerendererClient(Page&); + private: + WebPrerendererClient* client_; }; CORE_EXPORT void ProvidePrerendererClientTo(Page&, PrerendererClient*);
diff --git a/third_party/WebKit/Source/core/loader/appcache/ApplicationCache.idl b/third_party/WebKit/Source/core/loader/appcache/ApplicationCache.idl index 0265282..1cfcf6f 100644 --- a/third_party/WebKit/Source/core/loader/appcache/ApplicationCache.idl +++ b/third_party/WebKit/Source/core/loader/appcache/ApplicationCache.idl
@@ -26,7 +26,7 @@ // https://html.spec.whatwg.org/#application-cache-api [ - DoNotCheckConstants, + DoNotCheckConstants // TODO(foolip): Exposed=(Window,SharedWorker) ] interface ApplicationCache : EventTarget { // update status
diff --git a/third_party/WebKit/Source/core/mojo/Mojo.idl b/third_party/WebKit/Source/core/mojo/Mojo.idl index d90a1df..f9e87944 100644 --- a/third_party/WebKit/Source/core/mojo/Mojo.idl +++ b/third_party/WebKit/Source/core/mojo/Mojo.idl
@@ -8,7 +8,7 @@ [ ContextEnabled=MojoJS, - RuntimeEnabled=MojoJS, + RuntimeEnabled=MojoJS ] interface Mojo { const MojoResult RESULT_OK = 0; const MojoResult RESULT_CANCELLED = 1;
diff --git a/third_party/WebKit/Source/core/mojo/MojoHandle.idl b/third_party/WebKit/Source/core/mojo/MojoHandle.idl index 593faf3..029c7005e 100644 --- a/third_party/WebKit/Source/core/mojo/MojoHandle.idl +++ b/third_party/WebKit/Source/core/mojo/MojoHandle.idl
@@ -6,7 +6,7 @@ [ ContextEnabled=MojoJS, - RuntimeEnabled=MojoJS, + RuntimeEnabled=MojoJS ] interface MojoHandle { void close(); [CallWith=ScriptState] MojoWatcher watch(MojoHandleSignals signals, MojoWatchCallback callback);
diff --git a/third_party/WebKit/Source/core/mojo/MojoWatcher.idl b/third_party/WebKit/Source/core/mojo/MojoWatcher.idl index ff6c0388..b0e34971 100644 --- a/third_party/WebKit/Source/core/mojo/MojoWatcher.idl +++ b/third_party/WebKit/Source/core/mojo/MojoWatcher.idl
@@ -6,7 +6,7 @@ ActiveScriptWrappable, DependentLifetime, ContextEnabled=MojoJS, - RuntimeEnabled=MojoJS, + RuntimeEnabled=MojoJS ] interface MojoWatcher { MojoResult cancel(); };
diff --git a/third_party/WebKit/Source/core/mojo/testing/MojoInterfaceInterceptor.idl b/third_party/WebKit/Source/core/mojo/testing/MojoInterfaceInterceptor.idl index ce432ea3..e295564 100644 --- a/third_party/WebKit/Source/core/mojo/testing/MojoInterfaceInterceptor.idl +++ b/third_party/WebKit/Source/core/mojo/testing/MojoInterfaceInterceptor.idl
@@ -7,7 +7,7 @@ Constructor(DOMString interfaceName), ConstructorCallWith=ScriptState, DependentLifetime, - RuntimeEnabled=MojoJSTest, + RuntimeEnabled=MojoJSTest ] interface MojoInterfaceInterceptor : EventTarget { [RaisesException] void start(); void stop();
diff --git a/third_party/WebKit/Source/core/mojo/testing/MojoInterfaceRequestEvent.idl b/third_party/WebKit/Source/core/mojo/testing/MojoInterfaceRequestEvent.idl index 59bedea..f01e4cf 100644 --- a/third_party/WebKit/Source/core/mojo/testing/MojoInterfaceRequestEvent.idl +++ b/third_party/WebKit/Source/core/mojo/testing/MojoInterfaceRequestEvent.idl
@@ -4,7 +4,7 @@ [ Constructor(DOMString type, optional MojoInterfaceRequestEventInit eventInitDict), - RuntimeEnabled=MojoJSTest, + RuntimeEnabled=MojoJSTest ] interface MojoInterfaceRequestEvent : Event { readonly attribute MojoHandle handle; };
diff --git a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.idl b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.idl index 1abaf8e..a290546 100644 --- a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.idl +++ b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.idl
@@ -8,7 +8,7 @@ Constructor([EnforceRange] unsigned long width, [EnforceRange] unsigned long height), Exposed=(Window,Worker), RuntimeEnabled=ExperimentalCanvasFeatures, - MeasureAs=OffscreenCanvas, + MeasureAs=OffscreenCanvas ] interface OffscreenCanvas : EventTarget { [EnforceRange] attribute unsigned long width; [EnforceRange] attribute unsigned long height;
diff --git a/third_party/WebKit/Source/core/page/DragController.cpp b/third_party/WebKit/Source/core/page/DragController.cpp index 6aea704..f5b309f 100644 --- a/third_party/WebKit/Source/core/page/DragController.cpp +++ b/third_party/WebKit/Source/core/page/DragController.cpp
@@ -1124,7 +1124,7 @@ Node* node = state.drag_src_.Get(); if (state.drag_type_ == kDragSourceActionSelection) { if (!drag_image) { - drag_image = src->DragImageForSelection(kDragImageAlpha); + drag_image = DragImageForSelection(*src, kDragImageAlpha); drag_location = DragLocationForSelectionDrag(src); } DoSystemDrag(drag_image.get(), drag_location, drag_origin, data_transfer,
diff --git a/third_party/WebKit/Source/core/page/DragController.h b/third_party/WebKit/Source/core/page/DragController.h index bce6afe..7fb08d4d 100644 --- a/third_party/WebKit/Source/core/page/DragController.h +++ b/third_party/WebKit/Source/core/page/DragController.h
@@ -81,6 +81,9 @@ DragState& GetDragState(); + static std::unique_ptr<DragImage> DragImageForSelection(const LocalFrame&, + float); + DECLARE_TRACE(); private:
diff --git a/third_party/WebKit/Source/core/page/DragControllerTest.cpp b/third_party/WebKit/Source/core/page/DragControllerTest.cpp new file mode 100644 index 0000000..73d8a6f --- /dev/null +++ b/third_party/WebKit/Source/core/page/DragControllerTest.cpp
@@ -0,0 +1,69 @@ +// 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 "core/page/DragController.h" + +#include "core/editing/FrameSelection.h" +#include "core/frame/LocalFrame.h" +#include "core/frame/LocalFrameView.h" +#include "core/frame/PerformanceMonitor.h" +#include "core/frame/VisualViewport.h" +#include "core/html/HTMLElement.h" +#include "core/layout/LayoutObject.h" +#include "core/testing/DummyPageHolder.h" +#include "core/timing/Performance.h" +#include "platform/DragImage.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace blink { + +class DragControllerTest : public ::testing::Test { + protected: + DragControllerTest() = default; + ~DragControllerTest() override = default; + + Document& GetDocument() const { return dummy_page_holder_->GetDocument(); } + LocalFrame& GetFrame() const { return *GetDocument().GetFrame(); } + Performance* GetPerformance() const { return performance_; } + + void SetBodyContent(const std::string& body_content) { + GetDocument().body()->setInnerHTML(String::FromUTF8(body_content.c_str())); + UpdateAllLifecyclePhases(); + } + + void UpdateAllLifecyclePhases() { + GetDocument().View()->UpdateAllLifecyclePhases(); + } + + private: + void SetUp() override { + dummy_page_holder_ = DummyPageHolder::Create(IntSize(800, 600)); + performance_ = Performance::Create(&GetFrame()); + } + + std::unique_ptr<DummyPageHolder> dummy_page_holder_; + Persistent<Performance> performance_; +}; + +TEST_F(DragControllerTest, dragImageForSelectionUsesPageScaleFactor) { + SetBodyContent( + "<div>Hello world! This tests that the bitmap for drag image is scaled " + "by page scale factor</div>"); + GetFrame().GetPage()->GetVisualViewport().SetScale(1); + GetFrame().Selection().SelectAll(); + UpdateAllLifecyclePhases(); + const std::unique_ptr<DragImage> image1( + DragController::DragImageForSelection(GetFrame(), 0.75f)); + GetFrame().GetPage()->GetVisualViewport().SetScale(2); + GetFrame().Selection().SelectAll(); + UpdateAllLifecyclePhases(); + const std::unique_ptr<DragImage> image2( + DragController::DragImageForSelection(GetFrame(), 0.75f)); + + EXPECT_GT(image1->Size().Width(), 0); + EXPECT_GT(image1->Size().Height(), 0); + EXPECT_EQ(image1->Size().Width() * 2, image2->Size().Width()); + EXPECT_EQ(image1->Size().Height() * 2, image2->Size().Height()); +} +} // namespace blink
diff --git a/third_party/WebKit/Source/core/page/scrolling/ScrollState.idl b/third_party/WebKit/Source/core/page/scrolling/ScrollState.idl index 069b217..79931e80 100644 --- a/third_party/WebKit/Source/core/page/scrolling/ScrollState.idl +++ b/third_party/WebKit/Source/core/page/scrolling/ScrollState.idl
@@ -6,7 +6,7 @@ [ Constructor(optional ScrollStateInit scrollStateInit), - RuntimeEnabled = ScrollCustomization, + RuntimeEnabled = ScrollCustomization ] interface ScrollState { readonly attribute double deltaX;
diff --git a/third_party/WebKit/Source/core/streams/UnderlyingSourceBase.idl b/third_party/WebKit/Source/core/streams/UnderlyingSourceBase.idl index 2b05a8d..8e7b4ef 100644 --- a/third_party/WebKit/Source/core/streams/UnderlyingSourceBase.idl +++ b/third_party/WebKit/Source/core/streams/UnderlyingSourceBase.idl
@@ -10,7 +10,7 @@ [ ActiveScriptWrappable, DependentLifetime, - NoInterfaceObject, + NoInterfaceObject ] interface UnderlyingSourceBase { [CallWith=ScriptState, ImplementedAs=startWrapper] Promise<void> start(any stream);
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h index 4d036c5..5984e27e 100644 --- a/third_party/WebKit/Source/core/style/ComputedStyle.h +++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -770,13 +770,14 @@ } // flex-wrap (aka -webkit-flex-wrap) - static EFlexWrap InitialFlexWrap() { return kFlexNoWrap; } + static EFlexWrap InitialFlexWrap() { return EFlexWrap::kNowrap; } EFlexWrap FlexWrap() const { return static_cast<EFlexWrap>( rare_non_inherited_data_->flexible_box_data_->flex_wrap_); } void SetFlexWrap(EFlexWrap w) { - SET_NESTED_VAR(rare_non_inherited_data_, flexible_box_data_, flex_wrap_, w); + SET_NESTED_VAR(rare_non_inherited_data_, flexible_box_data_, flex_wrap_, + static_cast<unsigned>(w)); } // -webkit-box-ordinal-group @@ -803,7 +804,9 @@ // Grid properties. static size_t InitialGridAutoRepeatInsertionPoint() { return 0; } - static AutoRepeatType InitialGridAutoRepeatType() { return kNoAutoRepeat; } + static AutoRepeatType InitialGridAutoRepeatType() { + return AutoRepeatType::kNoAutoRepeat; + } // grid-auto-flow static GridAutoFlow InitialGridAutoFlow() { return kAutoFlowRow; } @@ -1814,11 +1817,13 @@ } void SetGridAutoRepeatColumnsType(const AutoRepeatType auto_repeat_type) { SET_NESTED_VAR(rare_non_inherited_data_, grid_data_, - grid_auto_repeat_columns_type_, auto_repeat_type); + grid_auto_repeat_columns_type_, + static_cast<unsigned>(auto_repeat_type)); } void SetGridAutoRepeatRowsType(const AutoRepeatType auto_repeat_type) { SET_NESTED_VAR(rare_non_inherited_data_, grid_data_, - grid_auto_repeat_rows_type_, auto_repeat_type); + grid_auto_repeat_rows_type_, + static_cast<unsigned>(auto_repeat_type)); } // align-content utility functions.
diff --git a/third_party/WebKit/Source/core/style/ComputedStyleConstants.h b/third_party/WebKit/Source/core/style/ComputedStyleConstants.h index 4f52a19..ca21928b 100644 --- a/third_party/WebKit/Source/core/style/ComputedStyleConstants.h +++ b/third_party/WebKit/Source/core/style/ComputedStyleConstants.h
@@ -151,7 +151,7 @@ // CSS3 Flexbox Properties enum class EFlexDirection { kRow, kRowReverse, kColumn, kColumnReverse }; -enum EFlexWrap { kFlexNoWrap, kFlexWrap, kFlexWrapReverse }; +enum class EFlexWrap { kNowrap, kWrap, kWrapReverse }; // CSS3 Image Values enum QuoteType { OPEN_QUOTE, CLOSE_QUOTE, NO_OPEN_QUOTE, NO_CLOSE_QUOTE }; @@ -332,6 +332,7 @@ }; enum AutoRepeatType { kNoAutoRepeat, kAutoFill, kAutoFit }; + } // namespace blink #endif // ComputedStyleConstants_h
diff --git a/third_party/WebKit/Source/core/svg/SVGAngle.idl b/third_party/WebKit/Source/core/svg/SVGAngle.idl index b0d96cf..95bcda16 100644 --- a/third_party/WebKit/Source/core/svg/SVGAngle.idl +++ b/third_party/WebKit/Source/core/svg/SVGAngle.idl
@@ -24,7 +24,7 @@ [ DependentLifetime, - ImplementedAs=SVGAngleTearOff, + ImplementedAs=SVGAngleTearOff ] interface SVGAngle { // Angle Unit Types const unsigned short SVG_ANGLETYPE_UNKNOWN = 0;
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimatedAngle.idl b/third_party/WebKit/Source/core/svg/SVGAnimatedAngle.idl index bbc6580..a69b631 100644 --- a/third_party/WebKit/Source/core/svg/SVGAnimatedAngle.idl +++ b/third_party/WebKit/Source/core/svg/SVGAnimatedAngle.idl
@@ -26,7 +26,7 @@ // https://svgwg.org/svg2-draft/types.html#InterfaceSVGAnimatedAngle [ - DependentLifetime, + DependentLifetime ] interface SVGAnimatedAngle { readonly attribute SVGAngle baseVal; readonly attribute SVGAngle animVal;
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimatedBoolean.idl b/third_party/WebKit/Source/core/svg/SVGAnimatedBoolean.idl index d081613..4ec6bab 100644 --- a/third_party/WebKit/Source/core/svg/SVGAnimatedBoolean.idl +++ b/third_party/WebKit/Source/core/svg/SVGAnimatedBoolean.idl
@@ -26,7 +26,7 @@ // https://svgwg.org/svg2-draft/types.html#InterfaceSVGAnimatedBoolean [ - DependentLifetime, + DependentLifetime ] interface SVGAnimatedBoolean { [RaisesException=Setter] attribute boolean baseVal; readonly attribute boolean animVal;
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimatedEnumeration.idl b/third_party/WebKit/Source/core/svg/SVGAnimatedEnumeration.idl index f18fa0b..1766bc7 100644 --- a/third_party/WebKit/Source/core/svg/SVGAnimatedEnumeration.idl +++ b/third_party/WebKit/Source/core/svg/SVGAnimatedEnumeration.idl
@@ -27,7 +27,7 @@ [ DependentLifetime, - ImplementedAs=SVGAnimatedEnumerationBase, + ImplementedAs=SVGAnimatedEnumerationBase ] interface SVGAnimatedEnumeration { [RaisesException=Setter] attribute unsigned short baseVal; readonly attribute unsigned short animVal;
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimatedInteger.idl b/third_party/WebKit/Source/core/svg/SVGAnimatedInteger.idl index ba7a992..505d444 100644 --- a/third_party/WebKit/Source/core/svg/SVGAnimatedInteger.idl +++ b/third_party/WebKit/Source/core/svg/SVGAnimatedInteger.idl
@@ -26,7 +26,7 @@ // https://svgwg.org/svg2-draft/types.html#InterfaceSVGAnimatedInteger [ - DependentLifetime, + DependentLifetime ] interface SVGAnimatedInteger { [RaisesException=Setter] attribute long baseVal; readonly attribute long animVal;
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimatedLength.idl b/third_party/WebKit/Source/core/svg/SVGAnimatedLength.idl index 69992e8..3da68c91 100644 --- a/third_party/WebKit/Source/core/svg/SVGAnimatedLength.idl +++ b/third_party/WebKit/Source/core/svg/SVGAnimatedLength.idl
@@ -26,7 +26,7 @@ // https://svgwg.org/svg2-draft/types.html#InterfaceSVGAnimatedLength [ - DependentLifetime, + DependentLifetime ] interface SVGAnimatedLength { readonly attribute SVGLength baseVal; readonly attribute SVGLength animVal;
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimatedLengthList.idl b/third_party/WebKit/Source/core/svg/SVGAnimatedLengthList.idl index 4597fd51..eeef1ad 100644 --- a/third_party/WebKit/Source/core/svg/SVGAnimatedLengthList.idl +++ b/third_party/WebKit/Source/core/svg/SVGAnimatedLengthList.idl
@@ -26,7 +26,7 @@ // https://svgwg.org/svg2-draft/types.html#InterfaceSVGAnimatedLengthList [ - DependentLifetime, + DependentLifetime ] interface SVGAnimatedLengthList { readonly attribute SVGLengthList baseVal; readonly attribute SVGLengthList animVal;
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimatedNumber.idl b/third_party/WebKit/Source/core/svg/SVGAnimatedNumber.idl index bd4a3f47..ddc7fab 100644 --- a/third_party/WebKit/Source/core/svg/SVGAnimatedNumber.idl +++ b/third_party/WebKit/Source/core/svg/SVGAnimatedNumber.idl
@@ -27,7 +27,7 @@ // https://svgwg.org/svg2-draft/types.html#InterfaceSVGAnimatedNumber [ - DependentLifetime, + DependentLifetime ] interface SVGAnimatedNumber { [RaisesException=Setter] attribute float baseVal; readonly attribute float animVal;
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimatedNumberList.idl b/third_party/WebKit/Source/core/svg/SVGAnimatedNumberList.idl index 012324bf5..c1c49de7 100644 --- a/third_party/WebKit/Source/core/svg/SVGAnimatedNumberList.idl +++ b/third_party/WebKit/Source/core/svg/SVGAnimatedNumberList.idl
@@ -26,7 +26,7 @@ // https://svgwg.org/svg2-draft/types.html#InterfaceSVGAnimatedNumberList [ - DependentLifetime, + DependentLifetime ] interface SVGAnimatedNumberList { readonly attribute SVGNumberList baseVal; readonly attribute SVGNumberList animVal;
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimatedPreserveAspectRatio.idl b/third_party/WebKit/Source/core/svg/SVGAnimatedPreserveAspectRatio.idl index 6f6564a..a943f6d8 100644 --- a/third_party/WebKit/Source/core/svg/SVGAnimatedPreserveAspectRatio.idl +++ b/third_party/WebKit/Source/core/svg/SVGAnimatedPreserveAspectRatio.idl
@@ -26,7 +26,7 @@ // https://svgwg.org/svg2-draft/coords.html#InterfaceSVGAnimatedPreserveAspectRatio [ - DependentLifetime, + DependentLifetime ] interface SVGAnimatedPreserveAspectRatio { readonly attribute SVGPreserveAspectRatio baseVal; readonly attribute SVGPreserveAspectRatio animVal;
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimatedRect.idl b/third_party/WebKit/Source/core/svg/SVGAnimatedRect.idl index 3a91354e..9bbbcc73 100644 --- a/third_party/WebKit/Source/core/svg/SVGAnimatedRect.idl +++ b/third_party/WebKit/Source/core/svg/SVGAnimatedRect.idl
@@ -26,7 +26,7 @@ // https://svgwg.org/svg2-draft/types.html#InterfaceSVGAnimatedRect [ - DependentLifetime, + DependentLifetime ] interface SVGAnimatedRect { // TODO(foolip): SVGRect should be DOMRectReadOnly. readonly attribute SVGRect baseVal;
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimatedString.idl b/third_party/WebKit/Source/core/svg/SVGAnimatedString.idl index 313ceeb..2bbc8e7 100644 --- a/third_party/WebKit/Source/core/svg/SVGAnimatedString.idl +++ b/third_party/WebKit/Source/core/svg/SVGAnimatedString.idl
@@ -26,7 +26,7 @@ // https://svgwg.org/svg2-draft/types.html#InterfaceSVGAnimatedString [ - DependentLifetime, + DependentLifetime ] interface SVGAnimatedString { [RaisesException=Setter] attribute DOMString baseVal; readonly attribute DOMString animVal;
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimatedTransformList.idl b/third_party/WebKit/Source/core/svg/SVGAnimatedTransformList.idl index cb9a6d4..9e58b14 100644 --- a/third_party/WebKit/Source/core/svg/SVGAnimatedTransformList.idl +++ b/third_party/WebKit/Source/core/svg/SVGAnimatedTransformList.idl
@@ -26,7 +26,7 @@ // https://svgwg.org/svg2-draft/coords.html#InterfaceSVGAnimatedTransformList [ - DependentLifetime, + DependentLifetime ] interface SVGAnimatedTransformList { [MeasureAs=SVGAnimatedTransformListBaseVal] readonly attribute SVGTransformList baseVal; readonly attribute SVGTransformList animVal;
diff --git a/third_party/WebKit/Source/core/svg/SVGFEBlendElement.idl b/third_party/WebKit/Source/core/svg/SVGFEBlendElement.idl index 052b45ef..9141ef7 100644 --- a/third_party/WebKit/Source/core/svg/SVGFEBlendElement.idl +++ b/third_party/WebKit/Source/core/svg/SVGFEBlendElement.idl
@@ -26,7 +26,7 @@ // https://drafts.fxtf.org/filters/#InterfaceSVGFEBlendElement [ - DoNotCheckConstants, + DoNotCheckConstants ] interface SVGFEBlendElement : SVGElement { // Blend Mode Types
diff --git a/third_party/WebKit/Source/core/svg/SVGFEColorMatrixElement.idl b/third_party/WebKit/Source/core/svg/SVGFEColorMatrixElement.idl index 33ce82ec..45efacc3 100644 --- a/third_party/WebKit/Source/core/svg/SVGFEColorMatrixElement.idl +++ b/third_party/WebKit/Source/core/svg/SVGFEColorMatrixElement.idl
@@ -26,7 +26,7 @@ // https://drafts.fxtf.org/filters/#InterfaceSVGFEColorMatrixElement [ - DoNotCheckConstants, + DoNotCheckConstants ] interface SVGFEColorMatrixElement : SVGElement { // Color Matrix Types [MeasureAs=SVG1DOMFilter] const unsigned short SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0;
diff --git a/third_party/WebKit/Source/core/svg/SVGFECompositeElement.idl b/third_party/WebKit/Source/core/svg/SVGFECompositeElement.idl index e6bb210..5ff09bc 100644 --- a/third_party/WebKit/Source/core/svg/SVGFECompositeElement.idl +++ b/third_party/WebKit/Source/core/svg/SVGFECompositeElement.idl
@@ -26,7 +26,7 @@ // https://drafts.fxtf.org/filters/#InterfaceSVGFECompositeElement [ - DoNotCheckConstants, + DoNotCheckConstants ] interface SVGFECompositeElement : SVGElement { // Composite Operators [MeasureAs=SVG1DOMFilter] const unsigned short SVG_FECOMPOSITE_OPERATOR_UNKNOWN = 0;
diff --git a/third_party/WebKit/Source/core/svg/SVGFEConvolveMatrixElement.idl b/third_party/WebKit/Source/core/svg/SVGFEConvolveMatrixElement.idl index cbcef45..c0411ad 100644 --- a/third_party/WebKit/Source/core/svg/SVGFEConvolveMatrixElement.idl +++ b/third_party/WebKit/Source/core/svg/SVGFEConvolveMatrixElement.idl
@@ -26,7 +26,7 @@ // https://drafts.fxtf.org/filters/#InterfaceSVGFEConvolveMatrixElement [ - DoNotCheckConstants, + DoNotCheckConstants ] interface SVGFEConvolveMatrixElement : SVGElement { // Edge Mode Values [MeasureAs=SVG1DOMFilter] const unsigned short SVG_EDGEMODE_UNKNOWN = 0;
diff --git a/third_party/WebKit/Source/core/svg/SVGFEDisplacementMapElement.idl b/third_party/WebKit/Source/core/svg/SVGFEDisplacementMapElement.idl index 2f10ac78..90f5145 100644 --- a/third_party/WebKit/Source/core/svg/SVGFEDisplacementMapElement.idl +++ b/third_party/WebKit/Source/core/svg/SVGFEDisplacementMapElement.idl
@@ -26,7 +26,7 @@ // https://drafts.fxtf.org/filters/#InterfaceSVGFEDisplacementMapElement [ - DoNotCheckConstants, + DoNotCheckConstants ] interface SVGFEDisplacementMapElement : SVGElement { // Channel Selectors [MeasureAs=SVG1DOMFilter] const unsigned short SVG_CHANNEL_UNKNOWN = 0;
diff --git a/third_party/WebKit/Source/core/svg/SVGFEMorphologyElement.idl b/third_party/WebKit/Source/core/svg/SVGFEMorphologyElement.idl index 2884359..71f157bb 100644 --- a/third_party/WebKit/Source/core/svg/SVGFEMorphologyElement.idl +++ b/third_party/WebKit/Source/core/svg/SVGFEMorphologyElement.idl
@@ -26,7 +26,7 @@ // https://drafts.fxtf.org/filters/#InterfaceSVGFEMorphologyElement [ - DoNotCheckConstants, + DoNotCheckConstants ] interface SVGFEMorphologyElement : SVGElement { // Morphology Operators [MeasureAs=SVG1DOMFilter] const unsigned short SVG_MORPHOLOGY_OPERATOR_UNKNOWN = 0;
diff --git a/third_party/WebKit/Source/core/svg/SVGFETurbulenceElement.idl b/third_party/WebKit/Source/core/svg/SVGFETurbulenceElement.idl index 56f9501b..41718c304bc 100644 --- a/third_party/WebKit/Source/core/svg/SVGFETurbulenceElement.idl +++ b/third_party/WebKit/Source/core/svg/SVGFETurbulenceElement.idl
@@ -26,7 +26,7 @@ // https://drafts.fxtf.org/filters/#InterfaceSVGFETurbulenceElement [ - DoNotCheckConstants, + DoNotCheckConstants ] interface SVGFETurbulenceElement : SVGElement { // Turbulence Types [MeasureAs=SVG1DOMFilter] const unsigned short SVG_TURBULENCE_TYPE_UNKNOWN = 0;
diff --git a/third_party/WebKit/Source/core/svg/SVGFilterPrimitiveStandardAttributes.idl b/third_party/WebKit/Source/core/svg/SVGFilterPrimitiveStandardAttributes.idl index 1f0f65f..41675c9 100644 --- a/third_party/WebKit/Source/core/svg/SVGFilterPrimitiveStandardAttributes.idl +++ b/third_party/WebKit/Source/core/svg/SVGFilterPrimitiveStandardAttributes.idl
@@ -27,7 +27,7 @@ // https://drafts.fxtf.org/filters/#InterfaceSVGFilterPrimitiveStandardAttributes [ - NoInterfaceObject, // Always used on target of 'implements' + NoInterfaceObject // Always used on target of 'implements' ] interface SVGFilterPrimitiveStandardAttributes { [MeasureAs=SVG1DOMFilter] readonly attribute SVGAnimatedLength x; [MeasureAs=SVG1DOMFilter] readonly attribute SVGAnimatedLength y;
diff --git a/third_party/WebKit/Source/core/svg/SVGFitToViewBox.idl b/third_party/WebKit/Source/core/svg/SVGFitToViewBox.idl index 5d91d3079..b8af7cf 100644 --- a/third_party/WebKit/Source/core/svg/SVGFitToViewBox.idl +++ b/third_party/WebKit/Source/core/svg/SVGFitToViewBox.idl
@@ -27,7 +27,7 @@ // https://svgwg.org/svg2-draft/types.html#InterfaceSVGFitToViewBox [ - NoInterfaceObject, // Always used on target of 'implements' + NoInterfaceObject // Always used on target of 'implements' ] interface SVGFitToViewBox { [MeasureAs=SVG1DOMFitToViewBox] readonly attribute SVGAnimatedRect viewBox; [MeasureAs=SVG1DOMFitToViewBox] readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio;
diff --git a/third_party/WebKit/Source/core/svg/SVGImageElement.idl b/third_party/WebKit/Source/core/svg/SVGImageElement.idl index 5402271..5b45739 100644 --- a/third_party/WebKit/Source/core/svg/SVGImageElement.idl +++ b/third_party/WebKit/Source/core/svg/SVGImageElement.idl
@@ -26,7 +26,7 @@ // https://svgwg.org/svg2-draft/embedded.html#InterfaceSVGImageElement [ - ActiveScriptWrappable, + ActiveScriptWrappable ] interface SVGImageElement : SVGGraphicsElement { [MeasureAs=SVG1DOMImageElement] readonly attribute SVGAnimatedLength x; [MeasureAs=SVG1DOMImageElement] readonly attribute SVGAnimatedLength y;
diff --git a/third_party/WebKit/Source/core/svg/SVGLength.idl b/third_party/WebKit/Source/core/svg/SVGLength.idl index 27750e87..cd8e588 100644 --- a/third_party/WebKit/Source/core/svg/SVGLength.idl +++ b/third_party/WebKit/Source/core/svg/SVGLength.idl
@@ -24,7 +24,7 @@ [ DependentLifetime, - ImplementedAs=SVGLengthTearOff, + ImplementedAs=SVGLengthTearOff ] interface SVGLength { // Length Unit Types const unsigned short SVG_LENGTHTYPE_UNKNOWN = 0;
diff --git a/third_party/WebKit/Source/core/svg/SVGLengthList.idl b/third_party/WebKit/Source/core/svg/SVGLengthList.idl index 0a01fbd..db01d2a 100644 --- a/third_party/WebKit/Source/core/svg/SVGLengthList.idl +++ b/third_party/WebKit/Source/core/svg/SVGLengthList.idl
@@ -28,7 +28,7 @@ [ DependentLifetime, - ImplementedAs=SVGLengthListTearOff, + ImplementedAs=SVGLengthListTearOff ] interface SVGLengthList { readonly attribute unsigned long length; [ImplementedAs=length] readonly attribute unsigned long numberOfItems;
diff --git a/third_party/WebKit/Source/core/svg/SVGMatrix.idl b/third_party/WebKit/Source/core/svg/SVGMatrix.idl index 30518786..53690ac 100644 --- a/third_party/WebKit/Source/core/svg/SVGMatrix.idl +++ b/third_party/WebKit/Source/core/svg/SVGMatrix.idl
@@ -26,7 +26,7 @@ // https://crbug.com/709001 [ DependentLifetime, - ImplementedAs=SVGMatrixTearOff, + ImplementedAs=SVGMatrixTearOff ] interface SVGMatrix { // FIXME: these attributes should all be floats but since we implement // AffineTransform with doubles setting these as doubles makes more sense.
diff --git a/third_party/WebKit/Source/core/svg/SVGNumber.idl b/third_party/WebKit/Source/core/svg/SVGNumber.idl index 4b9a333..51ca938 100644 --- a/third_party/WebKit/Source/core/svg/SVGNumber.idl +++ b/third_party/WebKit/Source/core/svg/SVGNumber.idl
@@ -24,7 +24,7 @@ [ DependentLifetime, - ImplementedAs=SVGNumberTearOff, + ImplementedAs=SVGNumberTearOff ] interface SVGNumber { [RaisesException=Setter] attribute float value; };
diff --git a/third_party/WebKit/Source/core/svg/SVGNumberList.idl b/third_party/WebKit/Source/core/svg/SVGNumberList.idl index e2a8388..c4ecd9e 100644 --- a/third_party/WebKit/Source/core/svg/SVGNumberList.idl +++ b/third_party/WebKit/Source/core/svg/SVGNumberList.idl
@@ -28,7 +28,7 @@ [ DependentLifetime, - ImplementedAs=SVGNumberListTearOff, + ImplementedAs=SVGNumberListTearOff ] interface SVGNumberList { readonly attribute unsigned long length; [ImplementedAs=length] readonly attribute unsigned long numberOfItems;
diff --git a/third_party/WebKit/Source/core/svg/SVGPoint.idl b/third_party/WebKit/Source/core/svg/SVGPoint.idl index 6cb1acf..110f5a5e 100644 --- a/third_party/WebKit/Source/core/svg/SVGPoint.idl +++ b/third_party/WebKit/Source/core/svg/SVGPoint.idl
@@ -26,7 +26,7 @@ // https://crbug.com/709001 [ DependentLifetime, - ImplementedAs=SVGPointTearOff, + ImplementedAs=SVGPointTearOff ] interface SVGPoint { [RaisesException=Setter] attribute unrestricted float x; [RaisesException=Setter] attribute unrestricted float y;
diff --git a/third_party/WebKit/Source/core/svg/SVGPointList.idl b/third_party/WebKit/Source/core/svg/SVGPointList.idl index c58e1267..b502738 100644 --- a/third_party/WebKit/Source/core/svg/SVGPointList.idl +++ b/third_party/WebKit/Source/core/svg/SVGPointList.idl
@@ -27,7 +27,7 @@ [ DependentLifetime, - ImplementedAs=SVGPointListTearOff, + ImplementedAs=SVGPointListTearOff ] interface SVGPointList { readonly attribute unsigned long length; [ImplementedAs=length] readonly attribute unsigned long numberOfItems;
diff --git a/third_party/WebKit/Source/core/svg/SVGPreserveAspectRatio.idl b/third_party/WebKit/Source/core/svg/SVGPreserveAspectRatio.idl index e70fb1f..0d32580 100644 --- a/third_party/WebKit/Source/core/svg/SVGPreserveAspectRatio.idl +++ b/third_party/WebKit/Source/core/svg/SVGPreserveAspectRatio.idl
@@ -27,7 +27,7 @@ [ DependentLifetime, - ImplementedAs=SVGPreserveAspectRatioTearOff, + ImplementedAs=SVGPreserveAspectRatioTearOff ] interface SVGPreserveAspectRatio { // Alignment types const unsigned short SVG_PRESERVEASPECTRATIO_UNKNOWN = 0;
diff --git a/third_party/WebKit/Source/core/svg/SVGRect.idl b/third_party/WebKit/Source/core/svg/SVGRect.idl index fc012db..fa37947 100644 --- a/third_party/WebKit/Source/core/svg/SVGRect.idl +++ b/third_party/WebKit/Source/core/svg/SVGRect.idl
@@ -26,7 +26,7 @@ // https://crbug.com/709001 [ DependentLifetime, - ImplementedAs=SVGRectTearOff, + ImplementedAs=SVGRectTearOff ] interface SVGRect { [RaisesException=Setter] attribute unrestricted float x; [RaisesException=Setter] attribute unrestricted float y;
diff --git a/third_party/WebKit/Source/core/svg/SVGStringList.idl b/third_party/WebKit/Source/core/svg/SVGStringList.idl index 2c550185..171e1fb 100644 --- a/third_party/WebKit/Source/core/svg/SVGStringList.idl +++ b/third_party/WebKit/Source/core/svg/SVGStringList.idl
@@ -27,7 +27,7 @@ [ DependentLifetime, - ImplementedAs=SVGStringListTearOff, + ImplementedAs=SVGStringListTearOff ] interface SVGStringList { readonly attribute unsigned long length; [ImplementedAs=length] readonly attribute unsigned long numberOfItems;
diff --git a/third_party/WebKit/Source/core/svg/SVGTests.idl b/third_party/WebKit/Source/core/svg/SVGTests.idl index 2fde5f51..665ac6f5a1 100644 --- a/third_party/WebKit/Source/core/svg/SVGTests.idl +++ b/third_party/WebKit/Source/core/svg/SVGTests.idl
@@ -27,7 +27,7 @@ // https://svgwg.org/svg2-draft/types.html#InterfaceSVGTests [ - NoInterfaceObject, // Always used on target of 'implements' + NoInterfaceObject // Always used on target of 'implements' ] interface SVGTests { [MeasureAs=SVG1DOMSVGTests] readonly attribute SVGStringList requiredExtensions; [MeasureAs=SVG1DOMSVGTests] readonly attribute SVGStringList systemLanguage;
diff --git a/third_party/WebKit/Source/core/svg/SVGTransform.idl b/third_party/WebKit/Source/core/svg/SVGTransform.idl index 0071aa2..b28517a7 100644 --- a/third_party/WebKit/Source/core/svg/SVGTransform.idl +++ b/third_party/WebKit/Source/core/svg/SVGTransform.idl
@@ -23,7 +23,7 @@ [ DependentLifetime, - ImplementedAs=SVGTransformTearOff, + ImplementedAs=SVGTransformTearOff ] interface SVGTransform { // Transform Types const unsigned short SVG_TRANSFORM_UNKNOWN = 0;
diff --git a/third_party/WebKit/Source/core/svg/SVGTransformList.idl b/third_party/WebKit/Source/core/svg/SVGTransformList.idl index d75ea8e3..8bf512e 100644 --- a/third_party/WebKit/Source/core/svg/SVGTransformList.idl +++ b/third_party/WebKit/Source/core/svg/SVGTransformList.idl
@@ -28,7 +28,7 @@ [ DependentLifetime, - ImplementedAs=SVGTransformListTearOff, + ImplementedAs=SVGTransformListTearOff ] interface SVGTransformList { readonly attribute unsigned long length; [ImplementedAs=length] readonly attribute unsigned long numberOfItems;
diff --git a/third_party/WebKit/Source/core/svg/SVGURIReference.idl b/third_party/WebKit/Source/core/svg/SVGURIReference.idl index ef7b166..6f6cee2b 100644 --- a/third_party/WebKit/Source/core/svg/SVGURIReference.idl +++ b/third_party/WebKit/Source/core/svg/SVGURIReference.idl
@@ -27,7 +27,7 @@ // https://svgwg.org/svg2-draft/types.html#InterfaceSVGURIReference [ - NoInterfaceObject, // Always used on target of 'implements' + NoInterfaceObject // Always used on target of 'implements' ] interface SVGURIReference { [MeasureAs=SVG1DOMUriReference] readonly attribute SVGAnimatedString href; };
diff --git a/third_party/WebKit/Source/core/svg/SVGUnitTypes.idl b/third_party/WebKit/Source/core/svg/SVGUnitTypes.idl index 8ddc1e2..7a1434a 100644 --- a/third_party/WebKit/Source/core/svg/SVGUnitTypes.idl +++ b/third_party/WebKit/Source/core/svg/SVGUnitTypes.idl
@@ -26,7 +26,7 @@ // https://svgwg.org/svg2-draft/types.html#InterfaceSVGUnitTypes [ - DependentLifetime, + DependentLifetime ] interface SVGUnitTypes { // Unit Types const unsigned short SVG_UNIT_TYPE_UNKNOWN = 0;
diff --git a/third_party/WebKit/Source/core/svg/SVGZoomAndPan.idl b/third_party/WebKit/Source/core/svg/SVGZoomAndPan.idl index 0d09ee1..20e6ce5 100644 --- a/third_party/WebKit/Source/core/svg/SVGZoomAndPan.idl +++ b/third_party/WebKit/Source/core/svg/SVGZoomAndPan.idl
@@ -27,7 +27,7 @@ // https://svgwg.org/svg2-draft/types.html#InterfaceSVGZoomAndPan [ - NoInterfaceObject, // Always used on target of 'implements' + NoInterfaceObject // Always used on target of 'implements' ] interface SVGZoomAndPan { // Zoom and Pan Types
diff --git a/third_party/WebKit/Source/core/testing/Internals.idl b/third_party/WebKit/Source/core/testing/Internals.idl index 834a505..bacd7d84 100644 --- a/third_party/WebKit/Source/core/testing/Internals.idl +++ b/third_party/WebKit/Source/core/testing/Internals.idl
@@ -32,7 +32,7 @@ }; [ - DoNotCheckConstants, + DoNotCheckConstants ] interface Internals { GCObservation observeGC(any observed);
diff --git a/third_party/WebKit/Source/core/testing/MockHyphenation.cpp b/third_party/WebKit/Source/core/testing/MockHyphenation.cpp index 98c39fa2..de93bf18 100644 --- a/third_party/WebKit/Source/core/testing/MockHyphenation.cpp +++ b/third_party/WebKit/Source/core/testing/MockHyphenation.cpp
@@ -9,10 +9,10 @@ size_t MockHyphenation::LastHyphenLocation(const StringView& text, size_t before_index) const { String str = text.ToString(); - if (str.EndsWith("phenation", kTextCaseASCIIInsensitive)) { + if (str.EndsWithIgnoringASCIICase("phenation")) { if (before_index - (str.length() - 9) > 4) return 4 + (str.length() - 9); - if (str.EndsWith("hyphenation", kTextCaseASCIIInsensitive) && + if (str.EndsWithIgnoringASCIICase("hyphenation") && before_index - (str.length() - 11) > 2) { return 2 + (str.length() - 11); }
diff --git a/third_party/WebKit/Source/core/timing/PerformanceNavigation.idl b/third_party/WebKit/Source/core/timing/PerformanceNavigation.idl index 5e518d9..a516f3b 100644 --- a/third_party/WebKit/Source/core/timing/PerformanceNavigation.idl +++ b/third_party/WebKit/Source/core/timing/PerformanceNavigation.idl
@@ -33,7 +33,7 @@ // Legacy support for NT1(https://www.w3.org/TR/navigation-timing/). [ - Exposed=Window, + Exposed=Window ] interface PerformanceNavigation { const unsigned short TYPE_NAVIGATE = 0; const unsigned short TYPE_RELOAD = 1;
diff --git a/third_party/WebKit/Source/core/timing/PerformanceNavigationTiming.idl b/third_party/WebKit/Source/core/timing/PerformanceNavigationTiming.idl index cc110fb..973206a 100644 --- a/third_party/WebKit/Source/core/timing/PerformanceNavigationTiming.idl +++ b/third_party/WebKit/Source/core/timing/PerformanceNavigationTiming.idl
@@ -11,7 +11,7 @@ "prerender" }; [ - RuntimeEnabled=PerformanceNavigationTiming2, + RuntimeEnabled=PerformanceNavigationTiming2 ] interface PerformanceNavigationTiming : PerformanceResourceTiming { readonly attribute DOMHighResTimeStamp unloadEventStart; readonly attribute DOMHighResTimeStamp unloadEventEnd; @@ -24,4 +24,4 @@ readonly attribute NavigationType type; readonly attribute unsigned short redirectCount; serializer = {inherit, attribute}; -}; \ No newline at end of file +};
diff --git a/third_party/WebKit/Source/core/timing/PerformanceObserver.idl b/third_party/WebKit/Source/core/timing/PerformanceObserver.idl index dd7e9dea..960b95769 100644 --- a/third_party/WebKit/Source/core/timing/PerformanceObserver.idl +++ b/third_party/WebKit/Source/core/timing/PerformanceObserver.idl
@@ -8,7 +8,7 @@ // https://w3c.github.io/performance-timeline/#the-performance-observer-interface [ CustomConstructor(PerformanceObserverCallback callback), - RuntimeEnabled=PerformanceObserver, + RuntimeEnabled=PerformanceObserver ] interface PerformanceObserver { [RaisesException] void observe(PerformanceObserverInit options); void disconnect();
diff --git a/third_party/WebKit/Source/core/timing/PerformanceObserverEntryList.idl b/third_party/WebKit/Source/core/timing/PerformanceObserverEntryList.idl index b18b188..ade5a92 100644 --- a/third_party/WebKit/Source/core/timing/PerformanceObserverEntryList.idl +++ b/third_party/WebKit/Source/core/timing/PerformanceObserverEntryList.idl
@@ -6,7 +6,7 @@ [ RuntimeEnabled=PerformanceObserver, - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface PerformanceObserverEntryList { // TODO(foolip): getEntries() should take an optional FilterOptions argument. sequence<PerformanceEntry> getEntries();
diff --git a/third_party/WebKit/Source/core/timing/PerformancePaintTiming.idl b/third_party/WebKit/Source/core/timing/PerformancePaintTiming.idl index d2209281..5289d47e 100644 --- a/third_party/WebKit/Source/core/timing/PerformancePaintTiming.idl +++ b/third_party/WebKit/Source/core/timing/PerformancePaintTiming.idl
@@ -5,6 +5,6 @@ // https://github.com/WICG/paint-timing [ - RuntimeEnabled=PerformancePaintTiming, + RuntimeEnabled=PerformancePaintTiming ] interface PerformancePaintTiming : PerformanceEntry { };
diff --git a/third_party/WebKit/Source/core/timing/PerformanceTiming.idl b/third_party/WebKit/Source/core/timing/PerformanceTiming.idl index 19c65ad4..cefa9ed 100644 --- a/third_party/WebKit/Source/core/timing/PerformanceTiming.idl +++ b/third_party/WebKit/Source/core/timing/PerformanceTiming.idl
@@ -33,7 +33,7 @@ // Legacy support for NT1(https://www.w3.org/TR/navigation-timing/). [ - Exposed=Window, + Exposed=Window ] interface PerformanceTiming { readonly attribute unsigned long long navigationStart; readonly attribute unsigned long long unloadEventStart;
diff --git a/third_party/WebKit/Source/core/timing/WindowPerformance.idl b/third_party/WebKit/Source/core/timing/WindowPerformance.idl index 0cdd4a44..e660507 100644 --- a/third_party/WebKit/Source/core/timing/WindowPerformance.idl +++ b/third_party/WebKit/Source/core/timing/WindowPerformance.idl
@@ -7,7 +7,7 @@ // TODO(foolip): This should be a GlobalPerformance interface implemented by // Window and WorkerGlobalScope. [ - ImplementedAs=DOMWindowPerformance, + ImplementedAs=DOMWindowPerformance ] partial interface Window { [Replaceable] readonly attribute Performance performance; };
diff --git a/third_party/WebKit/Source/core/workers/AbstractWorker.idl b/third_party/WebKit/Source/core/workers/AbstractWorker.idl index 8c5e9b8..0b9f596 100644 --- a/third_party/WebKit/Source/core/workers/AbstractWorker.idl +++ b/third_party/WebKit/Source/core/workers/AbstractWorker.idl
@@ -34,7 +34,7 @@ [ LegacyTreatAsPartialInterface, NoInterfaceObject, // Always used on target of 'implements' - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface AbstractWorker { attribute EventHandler onerror; };
diff --git a/third_party/WebKit/Source/core/workers/DedicatedWorkerGlobalScope.idl b/third_party/WebKit/Source/core/workers/DedicatedWorkerGlobalScope.idl index 6a192533..d7f514f 100644 --- a/third_party/WebKit/Source/core/workers/DedicatedWorkerGlobalScope.idl +++ b/third_party/WebKit/Source/core/workers/DedicatedWorkerGlobalScope.idl
@@ -32,7 +32,7 @@ [ Global=(Worker,DedicatedWorker), - Exposed=DedicatedWorker, + Exposed=DedicatedWorker ] interface DedicatedWorkerGlobalScope : WorkerGlobalScope { [PostMessage, RaisesException] void postMessage(any message, optional sequence<Transferable> transfer);
diff --git a/third_party/WebKit/Source/core/workers/SharedWorker.idl b/third_party/WebKit/Source/core/workers/SharedWorker.idl index 84ae8fba..9e560132 100644 --- a/third_party/WebKit/Source/core/workers/SharedWorker.idl +++ b/third_party/WebKit/Source/core/workers/SharedWorker.idl
@@ -39,7 +39,7 @@ DependentLifetime, // TODO(foolip): Exposed=(Window,Worker), RaisesException=Constructor, - RuntimeEnabled=SharedWorker, + RuntimeEnabled=SharedWorker ] interface SharedWorker : EventTarget { readonly attribute MessagePort port; };
diff --git a/third_party/WebKit/Source/core/workers/SharedWorkerGlobalScope.idl b/third_party/WebKit/Source/core/workers/SharedWorkerGlobalScope.idl index 66e9eef6..9b3d13b 100644 --- a/third_party/WebKit/Source/core/workers/SharedWorkerGlobalScope.idl +++ b/third_party/WebKit/Source/core/workers/SharedWorkerGlobalScope.idl
@@ -32,7 +32,7 @@ [ Global=(Worker,SharedWorker), - Exposed=SharedWorker, + Exposed=SharedWorker ] interface SharedWorkerGlobalScope : WorkerGlobalScope { readonly attribute DOMString name; // TODO(foolip): readonly attribute ApplicationCache applicationCache;
diff --git a/third_party/WebKit/Source/core/workers/Worker.idl b/third_party/WebKit/Source/core/workers/Worker.idl index bfff2d9..8662472c 100644 --- a/third_party/WebKit/Source/core/workers/Worker.idl +++ b/third_party/WebKit/Source/core/workers/Worker.idl
@@ -33,7 +33,7 @@ Constructor(DOMString scriptUrl), ConstructorCallWith=ExecutionContext, // TODO(foolip): Exposed=(Window,Worker), - RaisesException=Constructor, + RaisesException=Constructor ] interface Worker : EventTarget { void terminate();
diff --git a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.idl b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.idl index e6c5fc5..1d509981 100644 --- a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.idl +++ b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.idl
@@ -30,7 +30,7 @@ ActiveScriptWrappable, DependentLifetime, Exposed=Worker, - ImmutablePrototype, + ImmutablePrototype ] interface WorkerGlobalScope : EventTarget { readonly attribute WorkerGlobalScope self; readonly attribute WorkerLocation location;
diff --git a/third_party/WebKit/Source/core/workers/WorkerLocation.idl b/third_party/WebKit/Source/core/workers/WorkerLocation.idl index f1e34ca0..e271597 100644 --- a/third_party/WebKit/Source/core/workers/WorkerLocation.idl +++ b/third_party/WebKit/Source/core/workers/WorkerLocation.idl
@@ -29,7 +29,7 @@ // https://html.spec.whatwg.org/#worker-locations [ - Exposed=Worker, + Exposed=Worker ] interface WorkerLocation { };
diff --git a/third_party/WebKit/Source/core/workers/WorkerNavigator.idl b/third_party/WebKit/Source/core/workers/WorkerNavigator.idl index a9e33e9..1d9c714 100644 --- a/third_party/WebKit/Source/core/workers/WorkerNavigator.idl +++ b/third_party/WebKit/Source/core/workers/WorkerNavigator.idl
@@ -29,7 +29,7 @@ // https://html.spec.whatwg.org/#the-workernavigator-object [ - Exposed=Worker, + Exposed=Worker ] interface WorkerNavigator { };
diff --git a/third_party/WebKit/Source/core/workers/Worklet.idl b/third_party/WebKit/Source/core/workers/Worklet.idl index 1466299..42d0a4a 100644 --- a/third_party/WebKit/Source/core/workers/Worklet.idl +++ b/third_party/WebKit/Source/core/workers/Worklet.idl
@@ -6,7 +6,7 @@ [ DependentLifetime, - RuntimeEnabled=Worklet, + RuntimeEnabled=Worklet ] interface Worklet { [CallWith=ScriptState] Promise<void> addModule(DOMString url, optional WorkletOptions options); };
diff --git a/third_party/WebKit/Source/core/workers/WorkletGlobalScope.idl b/third_party/WebKit/Source/core/workers/WorkletGlobalScope.idl index 8da4a9c..6f5a1277 100644 --- a/third_party/WebKit/Source/core/workers/WorkletGlobalScope.idl +++ b/third_party/WebKit/Source/core/workers/WorkletGlobalScope.idl
@@ -9,6 +9,6 @@ ActiveScriptWrappable, Exposed=Worklet, RuntimeEnabled=Worklet, - ImmutablePrototype, + ImmutablePrototype ] interface WorkletGlobalScope { };
diff --git a/third_party/WebKit/Source/core/xml/DOMParser.idl b/third_party/WebKit/Source/core/xml/DOMParser.idl index 5b938a7..5c7cc3f 100644 --- a/third_party/WebKit/Source/core/xml/DOMParser.idl +++ b/third_party/WebKit/Source/core/xml/DOMParser.idl
@@ -29,7 +29,7 @@ [ Constructor, - ConstructorCallWith=Document, + ConstructorCallWith=Document ] interface DOMParser { [NewObject] Document parseFromString(DOMString str, SupportedType type); };
diff --git a/third_party/WebKit/Source/core/xml/XMLSerializer.idl b/third_party/WebKit/Source/core/xml/XMLSerializer.idl index 98b2598a..531f4ba 100644 --- a/third_party/WebKit/Source/core/xml/XMLSerializer.idl +++ b/third_party/WebKit/Source/core/xml/XMLSerializer.idl
@@ -21,7 +21,7 @@ // https://w3c.github.io/DOM-Parsing/#the-xmlserializer-interface [ - Constructor, + Constructor ] interface XMLSerializer { DOMString serializeToString(Node root); };
diff --git a/third_party/WebKit/Source/core/xml/XPathEvaluator.idl b/third_party/WebKit/Source/core/xml/XPathEvaluator.idl index 1763a144f..f9f735e 100644 --- a/third_party/WebKit/Source/core/xml/XPathEvaluator.idl +++ b/third_party/WebKit/Source/core/xml/XPathEvaluator.idl
@@ -27,7 +27,7 @@ [ Constructor, - Measure, + Measure ] interface XPathEvaluator { [Measure, RaisesException] XPathExpression createExpression(DOMString expression, optional XPathNSResolver? resolver = null);
diff --git a/third_party/WebKit/Source/core/xml/XSLTProcessor.idl b/third_party/WebKit/Source/core/xml/XSLTProcessor.idl index 23ea6587..ba796f26 100644 --- a/third_party/WebKit/Source/core/xml/XSLTProcessor.idl +++ b/third_party/WebKit/Source/core/xml/XSLTProcessor.idl
@@ -34,7 +34,7 @@ Constructor, ConstructorCallWith=Document, RuntimeEnabled=XSLT, - MeasureAs=XSLTProcessor, + MeasureAs=XSLTProcessor ] interface XSLTProcessor { void importStylesheet(Node style);
diff --git a/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp b/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp index 3de3229..ba99c44 100644 --- a/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp +++ b/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
@@ -582,8 +582,8 @@ // On Windows, libxml with catalogs enabled computes a URL relative // to where its DLL resides. - if (url_string.StartsWith("file:///", kTextCaseASCIIInsensitive) && - url_string.EndsWith("/etc/catalog", kTextCaseASCIIInsensitive)) + if (url_string.StartsWithIgnoringASCIICase("file:///") && + url_string.EndsWithIgnoringASCIICase("/etc/catalog")) return true; return false; } @@ -597,13 +597,11 @@ // The most common DTD. There isn't much point in hammering www.w3c.org by // requesting this URL for every XHTML document. - if (url_string.StartsWith("http://www.w3.org/TR/xhtml", - kTextCaseASCIIInsensitive)) + if (url_string.StartsWithIgnoringASCIICase("http://www.w3.org/TR/xhtml")) return false; // Similarly, there isn't much point in requesting the SVG DTD. - if (url_string.StartsWith("http://www.w3.org/Graphics/SVG", - kTextCaseASCIIInsensitive)) + if (url_string.StartsWithIgnoringASCIICase("http://www.w3.org/Graphics/SVG")) return false; // The libxml doesn't give us a lot of context for deciding whether to allow
diff --git a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.idl b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.idl index fbca69ca..1b9d315 100644 --- a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.idl +++ b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.idl
@@ -44,7 +44,7 @@ Constructor, ConstructorCallWith=ScriptState, DependentLifetime, - Exposed=(Window,DedicatedWorker,SharedWorker), + Exposed=(Window,DedicatedWorker,SharedWorker) ] interface XMLHttpRequest : XMLHttpRequestEventTarget { // event handler attribute EventHandler onreadystatechange;
diff --git a/third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.idl b/third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.idl index 987a4ced..83cd1b8 100644 --- a/third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.idl +++ b/third_party/WebKit/Source/modules/app_banner/BeforeInstallPromptEvent.idl
@@ -6,7 +6,7 @@ ActiveScriptWrappable, DependentLifetime, Constructor(DOMString type, optional BeforeInstallPromptEventInit eventInitDict), - ConstructorCallWith=ExecutionContext, + ConstructorCallWith=ExecutionContext ] interface BeforeInstallPromptEvent : Event { readonly attribute FrozenArray<DOMString> platforms; [CallWith=ScriptState] readonly attribute Promise<AppBannerPromptResult> userChoice;
diff --git a/third_party/WebKit/Source/modules/app_banner/WindowInstallation.idl b/third_party/WebKit/Source/modules/app_banner/WindowInstallation.idl index 3ceb8c2..db86387 100644 --- a/third_party/WebKit/Source/modules/app_banner/WindowInstallation.idl +++ b/third_party/WebKit/Source/modules/app_banner/WindowInstallation.idl
@@ -5,7 +5,7 @@ // https://www.w3.org/TR/appmanifest/#extensions-to-the-window-object [ - ImplementedAs=DOMWindowInstallation, + ImplementedAs=DOMWindowInstallation ] partial interface Window { attribute EventHandler onappinstalled; attribute EventHandler onbeforeinstallprompt;
diff --git a/third_party/WebKit/Source/modules/background_sync/ServiceWorkerGlobalScopeSync.idl b/third_party/WebKit/Source/modules/background_sync/ServiceWorkerGlobalScopeSync.idl index 0860b81..e73d817 100644 --- a/third_party/WebKit/Source/modules/background_sync/ServiceWorkerGlobalScopeSync.idl +++ b/third_party/WebKit/Source/modules/background_sync/ServiceWorkerGlobalScopeSync.idl
@@ -3,7 +3,7 @@ // found in the LICENSE file. [ - RuntimeEnabled=BackgroundSync, + RuntimeEnabled=BackgroundSync ] partial interface ServiceWorkerGlobalScope { attribute EventHandler onsync; };
diff --git a/third_party/WebKit/Source/modules/background_sync/ServiceWorkerRegistrationSync.idl b/third_party/WebKit/Source/modules/background_sync/ServiceWorkerRegistrationSync.idl index 3dfd339..8849c39 100644 --- a/third_party/WebKit/Source/modules/background_sync/ServiceWorkerRegistrationSync.idl +++ b/third_party/WebKit/Source/modules/background_sync/ServiceWorkerRegistrationSync.idl
@@ -4,7 +4,7 @@ [ Exposed=(Window,Worker), - RuntimeEnabled=BackgroundSync, + RuntimeEnabled=BackgroundSync ] partial interface ServiceWorkerRegistration { [MeasureAs=BackgroundSync] readonly attribute SyncManager sync; };
diff --git a/third_party/WebKit/Source/modules/background_sync/SyncEvent.idl b/third_party/WebKit/Source/modules/background_sync/SyncEvent.idl index 570bdf5..f1deec8 100644 --- a/third_party/WebKit/Source/modules/background_sync/SyncEvent.idl +++ b/third_party/WebKit/Source/modules/background_sync/SyncEvent.idl
@@ -7,7 +7,7 @@ [ Constructor(DOMString type, SyncEventInit init), Exposed=ServiceWorker, - RuntimeEnabled=BackgroundSync, + RuntimeEnabled=BackgroundSync ] interface SyncEvent : ExtendableEvent { readonly attribute DOMString tag; readonly attribute boolean lastChance;
diff --git a/third_party/WebKit/Source/modules/background_sync/SyncManager.idl b/third_party/WebKit/Source/modules/background_sync/SyncManager.idl index 5ff1fef6..b4734ce6 100644 --- a/third_party/WebKit/Source/modules/background_sync/SyncManager.idl +++ b/third_party/WebKit/Source/modules/background_sync/SyncManager.idl
@@ -6,7 +6,7 @@ [ Exposed=(Window,ServiceWorker), - RuntimeEnabled=BackgroundSync, + RuntimeEnabled=BackgroundSync ] interface SyncManager { [MeasureAs=BackgroundSyncRegister,CallWith=ScriptState,ImplementedAs=registerFunction] Promise<void> register(DOMString tag); [CallWith=ScriptState] Promise<sequence<DOMString>> getTags();
diff --git a/third_party/WebKit/Source/modules/battery/BatteryManager.idl b/third_party/WebKit/Source/modules/battery/BatteryManager.idl index d55de148..48a8f7d 100644 --- a/third_party/WebKit/Source/modules/battery/BatteryManager.idl +++ b/third_party/WebKit/Source/modules/battery/BatteryManager.idl
@@ -5,7 +5,7 @@ // https://w3c.github.io/battery/#the-batterymanager-interface [ ActiveScriptWrappable, - DependentLifetime, + DependentLifetime ] interface BatteryManager : EventTarget { readonly attribute boolean charging; readonly attribute unrestricted double chargingTime;
diff --git a/third_party/WebKit/Source/modules/bluetooth/Bluetooth.idl b/third_party/WebKit/Source/modules/bluetooth/Bluetooth.idl index 70199395..302b496 100644 --- a/third_party/WebKit/Source/modules/bluetooth/Bluetooth.idl +++ b/third_party/WebKit/Source/modules/bluetooth/Bluetooth.idl
@@ -5,7 +5,7 @@ // https://webbluetoothcg.github.io/web-bluetooth/#bluetooth [ - RuntimeEnabled=WebBluetooth, + RuntimeEnabled=WebBluetooth ] interface Bluetooth { [CallWith=ScriptState, RaisesException, MeasureAs=WebBluetoothRequestDevice] Promise<BluetoothDevice> requestDevice (optional RequestDeviceOptions options); };
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothCharacteristicProperties.idl b/third_party/WebKit/Source/modules/bluetooth/BluetoothCharacteristicProperties.idl index 0502e13c..d4d46cf 100644 --- a/third_party/WebKit/Source/modules/bluetooth/BluetoothCharacteristicProperties.idl +++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothCharacteristicProperties.idl
@@ -7,7 +7,7 @@ // Implement BluetoothCharacteristicProperties interface: http://crbug.com/483345 [ - RuntimeEnabled=WebBluetooth, + RuntimeEnabled=WebBluetooth ] interface BluetoothCharacteristicProperties { readonly attribute boolean broadcast; readonly attribute boolean read;
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.idl b/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.idl index 582c00e..e8ce370 100644 --- a/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.idl +++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.idl
@@ -8,7 +8,7 @@ [ DependentLifetime, - RuntimeEnabled=WebBluetooth, + RuntimeEnabled=WebBluetooth ] interface BluetoothDevice : EventTarget // Implement ServiceEventHandlers interface: http://crbug.com/421670 // : ServiceEventHandlers
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.idl b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.idl index 88a005a..b455703 100644 --- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.idl +++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.idl
@@ -8,7 +8,7 @@ [ DependentLifetime, - RuntimeEnabled=WebBluetooth, + RuntimeEnabled=WebBluetooth ] interface BluetoothRemoteGATTCharacteristic : EventTarget {//: CharacteristicEventHandlers { [SameObject] readonly attribute BluetoothRemoteGATTService service; readonly attribute UUID uuid;
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTDescriptor.idl b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTDescriptor.idl index 986cb8f9..83b2593 100644 --- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTDescriptor.idl +++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTDescriptor.idl
@@ -7,7 +7,7 @@ // Implement BluetoothRemoteGATTDescriptor interface: https://crbug.com/660699 [ - RuntimeEnabled=WebBluetooth, + RuntimeEnabled=WebBluetooth ] interface BluetoothRemoteGATTDescriptor { [SameObject] readonly attribute BluetoothRemoteGATTCharacteristic characteristic; readonly attribute UUID uuid;
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.idl b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.idl index fe2b1444..b1bd31a 100644 --- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.idl +++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.idl
@@ -7,7 +7,7 @@ // Implement BluetoothGATTRemoteServer interface: https://crbug.com/476735 [ - RuntimeEnabled=WebBluetooth, + RuntimeEnabled=WebBluetooth ] interface BluetoothRemoteGATTServer { [SameObject] readonly attribute BluetoothDevice device;
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.idl b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.idl index 61a6ba9..edab043 100644 --- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.idl +++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.idl
@@ -7,7 +7,7 @@ // Implement BluetoothRemoteGATTService interface: https://crbug.com/483342 [ - RuntimeEnabled=WebBluetooth, + RuntimeEnabled=WebBluetooth ] interface BluetoothRemoteGATTService { // : ServiceEventHandlers { [SameObject] readonly attribute BluetoothDevice device; readonly attribute UUID uuid;
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothUUID.idl b/third_party/WebKit/Source/modules/bluetooth/BluetoothUUID.idl index 0083c46..09a09d4 100644 --- a/third_party/WebKit/Source/modules/bluetooth/BluetoothUUID.idl +++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothUUID.idl
@@ -5,7 +5,7 @@ // https://webbluetoothcg.github.io/web-bluetooth/#bluetoothuuid [ - RuntimeEnabled=WebBluetooth, + RuntimeEnabled=WebBluetooth ] interface BluetoothUUID { [RaisesException] static UUID getService((DOMString or unsigned long) name); [RaisesException] static UUID getCharacteristic((DOMString or unsigned long) name);
diff --git a/third_party/WebKit/Source/modules/bluetooth/NavigatorBluetooth.idl b/third_party/WebKit/Source/modules/bluetooth/NavigatorBluetooth.idl index f90f075..22a4c76 100644 --- a/third_party/WebKit/Source/modules/bluetooth/NavigatorBluetooth.idl +++ b/third_party/WebKit/Source/modules/bluetooth/NavigatorBluetooth.idl
@@ -5,7 +5,7 @@ // https://webbluetoothcg.github.io/web-bluetooth/#navigator-extensions [ - RuntimeEnabled=WebBluetooth, + RuntimeEnabled=WebBluetooth ] partial interface Navigator { [SameObject] readonly attribute Bluetooth bluetooth; };
diff --git a/third_party/WebKit/Source/modules/broadcastchannel/BroadcastChannel.idl b/third_party/WebKit/Source/modules/broadcastchannel/BroadcastChannel.idl index e321edd..50c02fd 100644 --- a/third_party/WebKit/Source/modules/broadcastchannel/BroadcastChannel.idl +++ b/third_party/WebKit/Source/modules/broadcastchannel/BroadcastChannel.idl
@@ -12,7 +12,7 @@ Exposed=(Window,Worker), ActiveScriptWrappable, DependentLifetime, - Measure, + Measure ] interface BroadcastChannel : EventTarget { readonly attribute DOMString name;
diff --git a/third_party/WebKit/Source/modules/cachestorage/Cache.idl b/third_party/WebKit/Source/modules/cachestorage/Cache.idl index 3b116cfa..7c0fb2a6 100644 --- a/third_party/WebKit/Source/modules/cachestorage/Cache.idl +++ b/third_party/WebKit/Source/modules/cachestorage/Cache.idl
@@ -5,7 +5,7 @@ // https://w3c.github.io/ServiceWorker/#cache-interface [ - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface Cache { [CallWith=ScriptState, RaisesException] Promise<any> match(RequestInfo request, optional CacheQueryOptions options); [CallWith=ScriptState, RaisesException] Promise<sequence<Response>> matchAll(optional RequestInfo request, optional CacheQueryOptions options);
diff --git a/third_party/WebKit/Source/modules/cachestorage/CacheStorage.idl b/third_party/WebKit/Source/modules/cachestorage/CacheStorage.idl index 9baf0dc..65af41b6 100644 --- a/third_party/WebKit/Source/modules/cachestorage/CacheStorage.idl +++ b/third_party/WebKit/Source/modules/cachestorage/CacheStorage.idl
@@ -4,7 +4,7 @@ // See https://w3c.github.io/ServiceWorker/#cachestorage-interface [ - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface CacheStorage { [CallWith=ScriptState, RaisesException] Promise<any> match(RequestInfo request, optional CacheQueryOptions options); [CallWith=ScriptState, RaisesException] Promise<boolean> has(DOMString cacheName);
diff --git a/third_party/WebKit/Source/modules/cachestorage/WindowCacheStorage.idl b/third_party/WebKit/Source/modules/cachestorage/WindowCacheStorage.idl index d105128..88a517f 100644 --- a/third_party/WebKit/Source/modules/cachestorage/WindowCacheStorage.idl +++ b/third_party/WebKit/Source/modules/cachestorage/WindowCacheStorage.idl
@@ -5,7 +5,7 @@ // https://w3c.github.io/ServiceWorker/#self-caches [ RuntimeEnabled=GlobalCacheStorage, - ImplementedAs=GlobalCacheStorage, + ImplementedAs=GlobalCacheStorage ] partial interface Window { [MeasureAs=GlobalCacheStorage, RuntimeEnabled=GlobalCacheStorage, RaisesException] readonly attribute CacheStorage caches; };
diff --git a/third_party/WebKit/Source/modules/cachestorage/WorkerCacheStorage.idl b/third_party/WebKit/Source/modules/cachestorage/WorkerCacheStorage.idl index 3ce3b9b..1d914e6 100644 --- a/third_party/WebKit/Source/modules/cachestorage/WorkerCacheStorage.idl +++ b/third_party/WebKit/Source/modules/cachestorage/WorkerCacheStorage.idl
@@ -5,7 +5,7 @@ // https://w3c.github.io/ServiceWorker/#self-caches [ RuntimeEnabled=GlobalCacheStorage, - ImplementedAs=GlobalCacheStorage, + ImplementedAs=GlobalCacheStorage ] partial interface WorkerGlobalScope { [MeasureAs=GlobalCacheStorage, RuntimeEnabled=GlobalCacheStorage, RaisesException] readonly attribute CacheStorage caches; };
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasGradient.idl b/third_party/WebKit/Source/modules/canvas2d/CanvasGradient.idl index 4f47f91..8f06b50 100644 --- a/third_party/WebKit/Source/modules/canvas2d/CanvasGradient.idl +++ b/third_party/WebKit/Source/modules/canvas2d/CanvasGradient.idl
@@ -24,7 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ [ - Exposed(Worker ExperimentalCanvasFeatures, Window StableBlinkFeatures), + Exposed(Worker ExperimentalCanvasFeatures, Window StableBlinkFeatures) ] interface CanvasGradient { [RaisesException] void addColorStop(float offset, DOMString color);
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasPath.idl b/third_party/WebKit/Source/modules/canvas2d/CanvasPath.idl index 8b15e14..0fcd2ab 100644 --- a/third_party/WebKit/Source/modules/canvas2d/CanvasPath.idl +++ b/third_party/WebKit/Source/modules/canvas2d/CanvasPath.idl
@@ -5,7 +5,7 @@ // https://html.spec.whatwg.org/multipage/scripting.html#canvaspath [ - NoInterfaceObject, // Always used on target of 'implements' + NoInterfaceObject // Always used on target of 'implements' ] interface CanvasPath { // shared path API methods void closePath();
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasPattern.idl b/third_party/WebKit/Source/modules/canvas2d/CanvasPattern.idl index be91615a..8cd46b08 100644 --- a/third_party/WebKit/Source/modules/canvas2d/CanvasPattern.idl +++ b/third_party/WebKit/Source/modules/canvas2d/CanvasPattern.idl
@@ -23,7 +23,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ [ - Exposed(Worker ExperimentalCanvasFeatures, Window StableBlinkFeatures), + Exposed(Worker ExperimentalCanvasFeatures, Window StableBlinkFeatures) ] interface CanvasPattern { [RuntimeEnabled=ExperimentalCanvasFeatures,Exposed=Window] void setTransform(SVGMatrix transform);
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.idl b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.idl index bb229a9..9cd73554 100644 --- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.idl +++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.idl
@@ -45,7 +45,7 @@ enum ImageSmoothingQuality {"low", "medium", "high"}; [ - DependentLifetime, + DependentLifetime ] interface CanvasRenderingContext2D { // back-reference to the canvas readonly attribute HTMLCanvasElement canvas;
diff --git a/third_party/WebKit/Source/modules/canvas2d/Path2D.idl b/third_party/WebKit/Source/modules/canvas2d/Path2D.idl index c76f745..0842495 100644 --- a/third_party/WebKit/Source/modules/canvas2d/Path2D.idl +++ b/third_party/WebKit/Source/modules/canvas2d/Path2D.idl
@@ -32,7 +32,7 @@ Constructor, Constructor(Path2D path), Constructor(DOMString text), - Exposed(Worker ExperimentalCanvasFeatures, Window StableBlinkFeatures, PaintWorklet CSSPaintAPI), + Exposed(Worker ExperimentalCanvasFeatures, Window StableBlinkFeatures, PaintWorklet CSSPaintAPI) ] interface Path2D { [RuntimeEnabled=ExperimentalCanvasFeatures] void addPath(Path2D path, optional SVGMatrix? transform);
diff --git a/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletGlobalScope.idl b/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletGlobalScope.idl index 1d4db5b..93223a4 100644 --- a/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletGlobalScope.idl +++ b/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletGlobalScope.idl
@@ -5,7 +5,7 @@ [ Exposed=AnimationWorklet, Global=(Worklet,AnimationWorklet), - RuntimeEnabled=CompositorWorker, + RuntimeEnabled=CompositorWorker ] interface AnimationWorkletGlobalScope : WorkletGlobalScope { [RaisesException] void registerAnimator(DOMString name, Function animatorConstructor); };
diff --git a/third_party/WebKit/Source/modules/compositorworker/CompositorWorker.idl b/third_party/WebKit/Source/modules/compositorworker/CompositorWorker.idl index 66f30a7..d864d29 100644 --- a/third_party/WebKit/Source/modules/compositorworker/CompositorWorker.idl +++ b/third_party/WebKit/Source/modules/compositorworker/CompositorWorker.idl
@@ -8,7 +8,7 @@ Constructor(DOMString scriptUrl), ConstructorCallWith=ExecutionContext, RaisesException=Constructor, - RuntimeEnabled=CompositorWorker, + RuntimeEnabled=CompositorWorker ] interface CompositorWorker : EventTarget { attribute EventHandler onmessage; [PostMessage, RaisesException] void postMessage(SerializedScriptValue message, optional sequence<Transferable> transfer);
diff --git a/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerGlobalScope.idl b/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerGlobalScope.idl index f51d6630c..9a665247 100644 --- a/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerGlobalScope.idl +++ b/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerGlobalScope.idl
@@ -5,7 +5,7 @@ [ Exposed=CompositorWorker, Global=CompositorWorker, - RuntimeEnabled=CompositorWorker, + RuntimeEnabled=CompositorWorker ] interface CompositorWorkerGlobalScope : WorkerGlobalScope { [PostMessage, RaisesException] void postMessage(any message, optional sequence<Transferable> transfer); attribute EventHandler onmessage;
diff --git a/third_party/WebKit/Source/modules/compositorworker/WindowAnimationWorklet.idl b/third_party/WebKit/Source/modules/compositorworker/WindowAnimationWorklet.idl index a708fe9..9526adc 100644 --- a/third_party/WebKit/Source/modules/compositorworker/WindowAnimationWorklet.idl +++ b/third_party/WebKit/Source/modules/compositorworker/WindowAnimationWorklet.idl
@@ -3,7 +3,7 @@ // found in the LICENSE file. [ - RuntimeEnabled=CompositorWorker, + RuntimeEnabled=CompositorWorker ] partial interface Window { readonly attribute Worklet animationWorklet; };
diff --git a/third_party/WebKit/Source/modules/crypto/SubtleCrypto.idl b/third_party/WebKit/Source/modules/crypto/SubtleCrypto.idl index e9807d9..c5c75b01 100644 --- a/third_party/WebKit/Source/modules/crypto/SubtleCrypto.idl +++ b/third_party/WebKit/Source/modules/crypto/SubtleCrypto.idl
@@ -35,7 +35,7 @@ typedef (Dictionary or DOMString) AlgorithmIdentifier; [ - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface SubtleCrypto { [CallWith=ScriptState, MeasureAs=SubtleCryptoEncrypt] Promise encrypt(AlgorithmIdentifier algorithm, CryptoKey key, BufferSource data); [CallWith=ScriptState, MeasureAs=SubtleCryptoDecrypt] Promise decrypt(AlgorithmIdentifier algorithm, CryptoKey key, BufferSource data);
diff --git a/third_party/WebKit/Source/modules/crypto/WindowCrypto.idl b/third_party/WebKit/Source/modules/crypto/WindowCrypto.idl index da24d74..28bd167 100644 --- a/third_party/WebKit/Source/modules/crypto/WindowCrypto.idl +++ b/third_party/WebKit/Source/modules/crypto/WindowCrypto.idl
@@ -31,7 +31,7 @@ // https://w3c.github.io/webcrypto/Overview.html#crypto-interface [ - ImplementedAs=DOMWindowCrypto, + ImplementedAs=DOMWindowCrypto ] partial interface Window { readonly attribute Crypto crypto; };
diff --git a/third_party/WebKit/Source/modules/csspaint/PaintRenderingContext2D.idl b/third_party/WebKit/Source/modules/csspaint/PaintRenderingContext2D.idl index f537f20..7acb4a3 100644 --- a/third_party/WebKit/Source/modules/csspaint/PaintRenderingContext2D.idl +++ b/third_party/WebKit/Source/modules/csspaint/PaintRenderingContext2D.idl
@@ -6,7 +6,7 @@ [ Exposed=PaintWorklet, - RuntimeEnabled=CSSPaintAPI, + RuntimeEnabled=CSSPaintAPI ] interface PaintRenderingContext2D { // state void save(); // push state on state stack
diff --git a/third_party/WebKit/Source/modules/csspaint/PaintSize.idl b/third_party/WebKit/Source/modules/csspaint/PaintSize.idl index 2d166f9..d7d9a81 100644 --- a/third_party/WebKit/Source/modules/csspaint/PaintSize.idl +++ b/third_party/WebKit/Source/modules/csspaint/PaintSize.idl
@@ -6,7 +6,7 @@ [ Exposed=PaintWorklet, - RuntimeEnabled=CSSPaintAPI, + RuntimeEnabled=CSSPaintAPI ] interface PaintSize { readonly attribute double width; readonly attribute double height;
diff --git a/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.idl b/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.idl index 622777f..3770858 100644 --- a/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.idl +++ b/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.idl
@@ -7,7 +7,7 @@ [ Exposed=PaintWorklet, Global=(Worklet,PaintWorklet), - RuntimeEnabled=CSSPaintAPI, + RuntimeEnabled=CSSPaintAPI ] interface PaintWorkletGlobalScope : WorkletGlobalScope { [RaisesException] void registerPaint(DOMString name, Function paintCtor); };
diff --git a/third_party/WebKit/Source/modules/csspaint/WindowPaintWorklet.idl b/third_party/WebKit/Source/modules/csspaint/WindowPaintWorklet.idl index 0e774ba93..0b5e39a8 100644 --- a/third_party/WebKit/Source/modules/csspaint/WindowPaintWorklet.idl +++ b/third_party/WebKit/Source/modules/csspaint/WindowPaintWorklet.idl
@@ -3,7 +3,7 @@ // found in the LICENSE file. [ - RuntimeEnabled=CSSPaintAPI, + RuntimeEnabled=CSSPaintAPI ] partial interface Window { readonly attribute Worklet paintWorklet; };
diff --git a/third_party/WebKit/Source/modules/encryptedmedia/BUILD.gn b/third_party/WebKit/Source/modules/encryptedmedia/BUILD.gn index 29283267..771f45e 100644 --- a/third_party/WebKit/Source/modules/encryptedmedia/BUILD.gn +++ b/third_party/WebKit/Source/modules/encryptedmedia/BUILD.gn
@@ -24,6 +24,7 @@ "MediaKeySystemAccess.h", "MediaKeys.cpp", "MediaKeys.h", + "MediaKeysClient.cpp", "MediaKeysClient.h", "MediaKeysController.cpp", "MediaKeysController.h",
diff --git a/third_party/WebKit/Source/modules/encryptedmedia/MediaEncryptedEvent.idl b/third_party/WebKit/Source/modules/encryptedmedia/MediaEncryptedEvent.idl index 7f06db5c..7239a365 100644 --- a/third_party/WebKit/Source/modules/encryptedmedia/MediaEncryptedEvent.idl +++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaEncryptedEvent.idl
@@ -26,7 +26,7 @@ // https://w3c.github.io/encrypted-media/#mediaencryptedevent [ - Constructor(DOMString type, optional MediaEncryptedEventInit eventInitDict), + Constructor(DOMString type, optional MediaEncryptedEventInit eventInitDict) ] interface MediaEncryptedEvent : Event { readonly attribute DOMString initDataType; readonly attribute ArrayBuffer? initData;
diff --git a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.idl b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.idl index 7abb71a..d91f2ce8 100644 --- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.idl +++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.idl
@@ -25,7 +25,7 @@ [ ActiveScriptWrappable, - DependentLifetime, + DependentLifetime ] interface MediaKeySession : EventTarget { // session properties readonly attribute DOMString sessionId;
diff --git a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.idl b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.idl index a716f07..a5fb5dee 100644 --- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.idl +++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.idl
@@ -31,7 +31,7 @@ [ ActiveScriptWrappable, DependentLifetime, - SecureContext, + SecureContext ] interface MediaKeys { [CallWith=ScriptState, RaisesException] MediaKeySession createSession(optional MediaKeySessionType sessionType = "temporary");
diff --git a/third_party/WebKit/Source/web/MediaKeysClientImpl.cpp b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeysClient.cpp similarity index 80% rename from third_party/WebKit/Source/web/MediaKeysClientImpl.cpp rename to third_party/WebKit/Source/modules/encryptedmedia/MediaKeysClient.cpp index 6f4927c6..3cfcc9ff 100644 --- a/third_party/WebKit/Source/web/MediaKeysClientImpl.cpp +++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeysClient.cpp
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "web/MediaKeysClientImpl.h" +#include "modules/encryptedmedia/MediaKeysClient.h" #include "core/dom/Document.h" #include "core/dom/ExecutionContext.h" @@ -12,9 +12,9 @@ namespace blink { -MediaKeysClientImpl::MediaKeysClientImpl() {} +MediaKeysClient::MediaKeysClient() {} -WebEncryptedMediaClient* MediaKeysClientImpl::EncryptedMediaClient( +WebEncryptedMediaClient* MediaKeysClient::EncryptedMediaClient( ExecutionContext* execution_context) { Document* document = ToDocument(execution_context); WebLocalFrameBase* web_frame =
diff --git a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeysClient.h b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeysClient.h index 52441b67..3a7bef7 100644 --- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeysClient.h +++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeysClient.h
@@ -5,6 +5,7 @@ #ifndef MediaKeysClient_h #define MediaKeysClient_h +#include "modules/ModulesExport.h" #include "platform/wtf/Allocator.h" namespace blink { @@ -12,14 +13,14 @@ class ExecutionContext; class WebEncryptedMediaClient; -class MediaKeysClient { - USING_FAST_MALLOC(MediaKeysClient); +class MODULES_EXPORT MediaKeysClient { + DISALLOW_NEW(); public: - virtual WebEncryptedMediaClient* EncryptedMediaClient(ExecutionContext*) = 0; + MediaKeysClient(); + ~MediaKeysClient() {} - protected: - virtual ~MediaKeysClient() {} + WebEncryptedMediaClient* EncryptedMediaClient(ExecutionContext*); }; } // namespace blink
diff --git a/third_party/WebKit/Source/modules/eventsource/EventSource.idl b/third_party/WebKit/Source/modules/eventsource/EventSource.idl index fc77eaa..3030a55 100644 --- a/third_party/WebKit/Source/modules/eventsource/EventSource.idl +++ b/third_party/WebKit/Source/modules/eventsource/EventSource.idl
@@ -37,7 +37,7 @@ Constructor(DOMString url, optional EventSourceInit eventSourceInitDict), ConstructorCallWith=ExecutionContext, Exposed=(Window,Worker), - RaisesException=Constructor, + RaisesException=Constructor ] interface EventSource : EventTarget { readonly attribute DOMString url; readonly attribute boolean withCredentials;
diff --git a/third_party/WebKit/Source/modules/fetch/Body.idl b/third_party/WebKit/Source/modules/fetch/Body.idl index 6ed159b..7cfe5c6 100644 --- a/third_party/WebKit/Source/modules/fetch/Body.idl +++ b/third_party/WebKit/Source/modules/fetch/Body.idl
@@ -8,7 +8,7 @@ ActiveScriptWrappable, DependentLifetime, Exposed=ServiceWorker, - NoInterfaceObject, + NoInterfaceObject ] interface Body { readonly attribute boolean bodyUsed; [CallWith=ScriptState] Promise<ArrayBuffer> arrayBuffer();
diff --git a/third_party/WebKit/Source/modules/fetch/Headers.idl b/third_party/WebKit/Source/modules/fetch/Headers.idl index a233bf0..102691f 100644 --- a/third_party/WebKit/Source/modules/fetch/Headers.idl +++ b/third_party/WebKit/Source/modules/fetch/Headers.idl
@@ -11,7 +11,7 @@ [ Constructor(optional HeadersInit init), Exposed=(Window,Worker), - RaisesException=Constructor, + RaisesException=Constructor ] interface Headers { [RaisesException] void append(ByteString name, ByteString value); [ImplementedAs=remove, RaisesException] void delete(ByteString key);
diff --git a/third_party/WebKit/Source/modules/fetch/Request.idl b/third_party/WebKit/Source/modules/fetch/Request.idl index b5fac68..81185c5 100644 --- a/third_party/WebKit/Source/modules/fetch/Request.idl +++ b/third_party/WebKit/Source/modules/fetch/Request.idl
@@ -29,7 +29,7 @@ ConstructorCallWith=ScriptState, Exposed=(Window,Worker), RaisesException=Constructor, - DependentLifetime, + DependentLifetime ] interface Request { readonly attribute ByteString method; readonly attribute USVString url;
diff --git a/third_party/WebKit/Source/modules/fetch/Response.idl b/third_party/WebKit/Source/modules/fetch/Response.idl index 361f5940..368b3b3 100644 --- a/third_party/WebKit/Source/modules/fetch/Response.idl +++ b/third_party/WebKit/Source/modules/fetch/Response.idl
@@ -14,7 +14,7 @@ ConstructorCallWith=ScriptState, DependentLifetime, Exposed=(Window,Worker), - RaisesException=Constructor, + RaisesException=Constructor ] interface Response { [CallWith=ScriptState] static Response error(); [CallWith=ScriptState, RaisesException] static Response redirect(USVString url, optional unsigned short status = 302);
diff --git a/third_party/WebKit/Source/modules/fetch/WindowFetch.idl b/third_party/WebKit/Source/modules/fetch/WindowFetch.idl index d2b48ada..2fac228 100644 --- a/third_party/WebKit/Source/modules/fetch/WindowFetch.idl +++ b/third_party/WebKit/Source/modules/fetch/WindowFetch.idl
@@ -3,7 +3,7 @@ // found in the LICENSE file. [ - ImplementedAs=GlobalFetch, + ImplementedAs=GlobalFetch ] partial interface Window { [CallWith=ScriptState, RaisesException] Promise<Response> fetch(RequestInfo input, optional Dictionary init); };
diff --git a/third_party/WebKit/Source/modules/fetch/WorkerFetch.idl b/third_party/WebKit/Source/modules/fetch/WorkerFetch.idl index 8c2c87e5..1648b407 100644 --- a/third_party/WebKit/Source/modules/fetch/WorkerFetch.idl +++ b/third_party/WebKit/Source/modules/fetch/WorkerFetch.idl
@@ -3,7 +3,7 @@ // found in the LICENSE file. [ - ImplementedAs=GlobalFetch, + ImplementedAs=GlobalFetch ] partial interface WorkerGlobalScope { [CallWith=ScriptState, RaisesException] Promise<Response> fetch(RequestInfo input, optional Dictionary init); };
diff --git a/third_party/WebKit/Source/modules/filesystem/DOMFilePath.cpp b/third_party/WebKit/Source/modules/filesystem/DOMFilePath.cpp index 4b31145a..f7d6f9e 100644 --- a/third_party/WebKit/Source/modules/filesystem/DOMFilePath.cpp +++ b/third_party/WebKit/Source/modules/filesystem/DOMFilePath.cpp
@@ -71,7 +71,7 @@ if (parent == DOMFilePath::kRoot && may_be_child != DOMFilePath::kRoot) return true; if (parent.length() >= may_be_child.length() || - !may_be_child.StartsWith(parent, kTextCaseUnicodeInsensitive)) + !may_be_child.StartsWithIgnoringCase(parent)) return false; if (may_be_child[parent.length()] != DOMFilePath::kSeparator) return false;
diff --git a/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.idl b/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.idl index 30dca4b..cc985ba 100644 --- a/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.idl +++ b/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.idl
@@ -33,7 +33,7 @@ [ ActiveScriptWrappable, DependentLifetime, - NoInterfaceObject, + NoInterfaceObject ] interface DOMFileSystem { readonly attribute DOMString name; readonly attribute DirectoryEntry root;
diff --git a/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.idl b/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.idl index bd6d965..f106f69 100644 --- a/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.idl +++ b/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.idl
@@ -30,7 +30,7 @@ // https://www.w3.org/TR/2012/WD-file-system-api-20120417/#idl-def-FileSystemSync [ - NoInterfaceObject, + NoInterfaceObject ] interface DOMFileSystemSync { readonly attribute DOMString name; readonly attribute DirectoryEntrySync root;
diff --git a/third_party/WebKit/Source/modules/filesystem/DevToolsHostFileSystem.idl b/third_party/WebKit/Source/modules/filesystem/DevToolsHostFileSystem.idl index c0a283a..060e88c 100644 --- a/third_party/WebKit/Source/modules/filesystem/DevToolsHostFileSystem.idl +++ b/third_party/WebKit/Source/modules/filesystem/DevToolsHostFileSystem.idl
@@ -3,7 +3,7 @@ // found in the LICENSE file. [ - RuntimeEnabled=FileSystem, + RuntimeEnabled=FileSystem ] partial interface DevToolsHost { DOMFileSystem isolatedFileSystem(DOMString fileSystemId, DOMString registeredName); void upgradeDraggedFileSystemPermissions(DOMFileSystem domFileSystem);
diff --git a/third_party/WebKit/Source/modules/filesystem/DirectoryReader.idl b/third_party/WebKit/Source/modules/filesystem/DirectoryReader.idl index eeb58157..f7cf5e46a 100644 --- a/third_party/WebKit/Source/modules/filesystem/DirectoryReader.idl +++ b/third_party/WebKit/Source/modules/filesystem/DirectoryReader.idl
@@ -30,7 +30,7 @@ // https://www.w3.org/TR/2012/WD-file-system-api-20120417/#idl-def-DirectoryReader [ - NoInterfaceObject, + NoInterfaceObject ] interface DirectoryReader { void readEntries(EntriesCallback successCallback, optional ErrorCallback errorCallback); };
diff --git a/third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.idl b/third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.idl index 8c1012d..b8123af 100644 --- a/third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.idl +++ b/third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.idl
@@ -30,7 +30,7 @@ // https://www.w3.org/TR/2012/WD-file-system-api-20120417/#idl-def-DirectoryReaderSync [ - NoInterfaceObject, + NoInterfaceObject ] interface DirectoryReaderSync { [RaisesException] sequence<EntrySync> readEntries(); };
diff --git a/third_party/WebKit/Source/modules/filesystem/Entry.idl b/third_party/WebKit/Source/modules/filesystem/Entry.idl index c4bf592..ae0d2ed 100644 --- a/third_party/WebKit/Source/modules/filesystem/Entry.idl +++ b/third_party/WebKit/Source/modules/filesystem/Entry.idl
@@ -30,7 +30,7 @@ // https://www.w3.org/TR/2012/WD-file-system-api-20120417/#idl-def-Entry [ - NoInterfaceObject, + NoInterfaceObject ] interface Entry { readonly attribute boolean isFile; readonly attribute boolean isDirectory;
diff --git a/third_party/WebKit/Source/modules/filesystem/EntrySync.idl b/third_party/WebKit/Source/modules/filesystem/EntrySync.idl index e2c01588..2b60af9 100644 --- a/third_party/WebKit/Source/modules/filesystem/EntrySync.idl +++ b/third_party/WebKit/Source/modules/filesystem/EntrySync.idl
@@ -30,7 +30,7 @@ // https://www.w3.org/TR/2012/WD-file-system-api-20120417/#idl-def-EntrySync [ - NoInterfaceObject, + NoInterfaceObject ] interface EntrySync { readonly attribute boolean isFile; readonly attribute boolean isDirectory;
diff --git a/third_party/WebKit/Source/modules/filesystem/FileWriter.idl b/third_party/WebKit/Source/modules/filesystem/FileWriter.idl index 853be70..c38e0ef 100644 --- a/third_party/WebKit/Source/modules/filesystem/FileWriter.idl +++ b/third_party/WebKit/Source/modules/filesystem/FileWriter.idl
@@ -33,7 +33,7 @@ [ ActiveScriptWrappable, DependentLifetime, - NoInterfaceObject, + NoInterfaceObject ] interface FileWriter : EventTarget { // ready states const unsigned short INIT = 0;
diff --git a/third_party/WebKit/Source/modules/filesystem/FileWriterSync.idl b/third_party/WebKit/Source/modules/filesystem/FileWriterSync.idl index f3dd736..463d0dd 100644 --- a/third_party/WebKit/Source/modules/filesystem/FileWriterSync.idl +++ b/third_party/WebKit/Source/modules/filesystem/FileWriterSync.idl
@@ -30,7 +30,7 @@ // https://www.w3.org/TR/2012/WD-file-writer-api-20120417/#idl-def-FileWriterSync [ - NoInterfaceObject, + NoInterfaceObject ] interface FileWriterSync { // synchronous write/modify methods [RaisesException] void write(Blob data);
diff --git a/third_party/WebKit/Source/modules/filesystem/HTMLInputElementFileSystem.idl b/third_party/WebKit/Source/modules/filesystem/HTMLInputElementFileSystem.idl index 9c6086b..dc1114e5 100644 --- a/third_party/WebKit/Source/modules/filesystem/HTMLInputElementFileSystem.idl +++ b/third_party/WebKit/Source/modules/filesystem/HTMLInputElementFileSystem.idl
@@ -31,7 +31,7 @@ // https://wicg.github.io/entries-api/#html-forms [ - RuntimeEnabled=FileSystem, + RuntimeEnabled=FileSystem ] partial interface HTMLInputElement { [CallWith=ScriptState, Measure] readonly attribute FrozenArray<Entry> webkitEntries; };
diff --git a/third_party/WebKit/Source/modules/filesystem/Metadata.idl b/third_party/WebKit/Source/modules/filesystem/Metadata.idl index 87ca98d..afcabf6 100644 --- a/third_party/WebKit/Source/modules/filesystem/Metadata.idl +++ b/third_party/WebKit/Source/modules/filesystem/Metadata.idl
@@ -30,7 +30,7 @@ // https://www.w3.org/TR/2012/WD-file-system-api-20120417/#idl-def-Metadata [ - NoInterfaceObject, + NoInterfaceObject ] interface Metadata { readonly attribute Date modificationTime; readonly attribute unsigned long long size;
diff --git a/third_party/WebKit/Source/modules/filesystem/WindowFileSystem.idl b/third_party/WebKit/Source/modules/filesystem/WindowFileSystem.idl index ec3dba6..c133ee40 100644 --- a/third_party/WebKit/Source/modules/filesystem/WindowFileSystem.idl +++ b/third_party/WebKit/Source/modules/filesystem/WindowFileSystem.idl
@@ -26,7 +26,7 @@ // https://www.w3.org/TR/2012/WD-file-system-api-20120417/#idl-def-LocalFileSystem [ - ImplementedAs=DOMWindowFileSystem, + ImplementedAs=DOMWindowFileSystem ] partial interface Window { const unsigned short TEMPORARY = 0; const unsigned short PERSISTENT = 1;
diff --git a/third_party/WebKit/Source/modules/gamepad/GamepadEvent.idl b/third_party/WebKit/Source/modules/gamepad/GamepadEvent.idl index 8898ba4..e38ef38 100644 --- a/third_party/WebKit/Source/modules/gamepad/GamepadEvent.idl +++ b/third_party/WebKit/Source/modules/gamepad/GamepadEvent.idl
@@ -5,7 +5,7 @@ // https://w3c.github.io/gamepad/#gamepadevent-interface [ - Constructor(DOMString type, optional GamepadEventInit eventInitDict), + Constructor(DOMString type, optional GamepadEventInit eventInitDict) ] interface GamepadEvent : Event { [ImplementedAs=getGamepad] readonly attribute Gamepad gamepad; };
diff --git a/third_party/WebKit/Source/modules/gamepad/GamepadList.idl b/third_party/WebKit/Source/modules/gamepad/GamepadList.idl index 08c52f6..de8254c 100644 --- a/third_party/WebKit/Source/modules/gamepad/GamepadList.idl +++ b/third_party/WebKit/Source/modules/gamepad/GamepadList.idl
@@ -24,7 +24,7 @@ */ [ - NoInterfaceObject, + NoInterfaceObject ] interface GamepadList { readonly attribute unsigned long length; getter Gamepad item([Default=Undefined] optional unsigned long index);
diff --git a/third_party/WebKit/Source/modules/gamepad/GamepadPose.idl b/third_party/WebKit/Source/modules/gamepad/GamepadPose.idl index d3c3f41..05495f2 100644 --- a/third_party/WebKit/Source/modules/gamepad/GamepadPose.idl +++ b/third_party/WebKit/Source/modules/gamepad/GamepadPose.idl
@@ -4,7 +4,7 @@ // https://w3c.github.io/gamepad/extensions.html#gamepadpose-interface [ - OriginTrialEnabled=GamepadExtensions, + OriginTrialEnabled=GamepadExtensions ] interface GamepadPose { [MeasureAs=GamepadPoseHasOrientation] readonly attribute boolean hasOrientation; [MeasureAs=GamepadPoseHasPosition] readonly attribute boolean hasPosition;
diff --git a/third_party/WebKit/Source/modules/geolocation/Geolocation.idl b/third_party/WebKit/Source/modules/geolocation/Geolocation.idl index 03ae15111..002276a 100644 --- a/third_party/WebKit/Source/modules/geolocation/Geolocation.idl +++ b/third_party/WebKit/Source/modules/geolocation/Geolocation.idl
@@ -25,7 +25,7 @@ // http://www.w3.org/TR/geolocation-API/#geolocation_interface [ - NoInterfaceObject, + NoInterfaceObject ] interface Geolocation { [LogActivity] void getCurrentPosition(PositionCallback successCallback, optional PositionErrorCallback errorCallback,
diff --git a/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.idl b/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.idl index 7c52e4c..c50300a 100644 --- a/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.idl +++ b/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.idl
@@ -5,7 +5,7 @@ // https://html.spec.whatwg.org/multipage/scripting.html#the-imagebitmap-rendering-context [ - DependentLifetime, + DependentLifetime ] interface ImageBitmapRenderingContext { // back-reference to the canvas readonly attribute HTMLCanvasElement canvas;
diff --git a/third_party/WebKit/Source/modules/imagecapture/ImageCapture.idl b/third_party/WebKit/Source/modules/imagecapture/ImageCapture.idl index 704d5528..c9b84af 100644 --- a/third_party/WebKit/Source/modules/imagecapture/ImageCapture.idl +++ b/third_party/WebKit/Source/modules/imagecapture/ImageCapture.idl
@@ -11,7 +11,7 @@ DependentLifetime, MeasureAs=ImageCaptureConstructor, RaisesException=Constructor, - RuntimeEnabled=ImageCapture, + RuntimeEnabled=ImageCapture ] interface ImageCapture { [ImplementedAs=videoStreamTrack] readonly attribute MediaStreamTrack track;
diff --git a/third_party/WebKit/Source/modules/imagecapture/MediaSettingsRange.idl b/third_party/WebKit/Source/modules/imagecapture/MediaSettingsRange.idl index 34223d9e..bed5fab 100644 --- a/third_party/WebKit/Source/modules/imagecapture/MediaSettingsRange.idl +++ b/third_party/WebKit/Source/modules/imagecapture/MediaSettingsRange.idl
@@ -5,7 +5,7 @@ // https://w3c.github.io/mediacapture-image/index.html#mediasettingsrange [ - RuntimeEnabled=ImageCapture, + RuntimeEnabled=ImageCapture ] interface MediaSettingsRange { readonly attribute double max; readonly attribute double min;
diff --git a/third_party/WebKit/Source/modules/imagecapture/PhotoCapabilities.idl b/third_party/WebKit/Source/modules/imagecapture/PhotoCapabilities.idl index d6e12f7..e79bcb4 100644 --- a/third_party/WebKit/Source/modules/imagecapture/PhotoCapabilities.idl +++ b/third_party/WebKit/Source/modules/imagecapture/PhotoCapabilities.idl
@@ -24,7 +24,7 @@ }; [ - RuntimeEnabled=ImageCapture, + RuntimeEnabled=ImageCapture ] interface PhotoCapabilities { readonly attribute RedEyeReduction redEyeReduction; readonly attribute MediaSettingsRange imageHeight;
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBCursor.idl b/third_party/WebKit/Source/modules/indexeddb/IDBCursor.idl index 6c556ef..e07e2e4 100644 --- a/third_party/WebKit/Source/modules/indexeddb/IDBCursor.idl +++ b/third_party/WebKit/Source/modules/indexeddb/IDBCursor.idl
@@ -35,7 +35,7 @@ // https://w3c.github.io/IndexedDB/#idl-def-IDBCursor [ - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface IDBCursor { [CallWith=ScriptState] readonly attribute any source; readonly attribute IDBCursorDirection direction;
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.idl b/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.idl index b678506..9304f41 100644 --- a/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.idl +++ b/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.idl
@@ -29,7 +29,7 @@ [ ActiveScriptWrappable, DependentLifetime, - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface IDBDatabase : EventTarget { readonly attribute DOMString name; readonly attribute unsigned long long version;
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBFactory.idl b/third_party/WebKit/Source/modules/indexeddb/IDBFactory.idl index d863542..60e0cd83 100644 --- a/third_party/WebKit/Source/modules/indexeddb/IDBFactory.idl +++ b/third_party/WebKit/Source/modules/indexeddb/IDBFactory.idl
@@ -26,7 +26,7 @@ // https://w3c.github.io/IndexedDB/#idbfactory [ - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface IDBFactory { [NewObject, CallWith=ScriptState, RaisesException] IDBOpenDBRequest open(DOMString name, [EnforceRange] optional unsigned long long version);
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBIndex.idl b/third_party/WebKit/Source/modules/indexeddb/IDBIndex.idl index b7b57e3ac..8e26c8b 100644 --- a/third_party/WebKit/Source/modules/indexeddb/IDBIndex.idl +++ b/third_party/WebKit/Source/modules/indexeddb/IDBIndex.idl
@@ -26,7 +26,7 @@ // https://w3c.github.io/IndexedDB/#idl-def-IDBIndex [ - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface IDBIndex { [RaisesException=Setter] attribute DOMString name; [SameObject] readonly attribute IDBObjectStore objectStore;
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBKeyRange.idl b/third_party/WebKit/Source/modules/indexeddb/IDBKeyRange.idl index 38eb019..2c88174 100644 --- a/third_party/WebKit/Source/modules/indexeddb/IDBKeyRange.idl +++ b/third_party/WebKit/Source/modules/indexeddb/IDBKeyRange.idl
@@ -26,7 +26,7 @@ // https://w3c.github.io/IndexedDB/#idbkeyrange [ - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface IDBKeyRange { [ImplementedAs=lowerValue, CallWith=ScriptState] readonly attribute any lower; [ImplementedAs=upperValue, CallWith=ScriptState] readonly attribute any upper;
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.idl b/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.idl index e3f144f..c38bbb64 100644 --- a/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.idl +++ b/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.idl
@@ -26,7 +26,7 @@ // https://w3c.github.io/IndexedDB/#idl-def-IDBObjectStore [ - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface IDBObjectStore { [RaisesException=Setter] attribute DOMString name; [CallWith=ScriptState] readonly attribute any keyPath;
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBRequest.idl b/third_party/WebKit/Source/modules/indexeddb/IDBRequest.idl index ad3ea2f4..4f8a88a 100644 --- a/third_party/WebKit/Source/modules/indexeddb/IDBRequest.idl +++ b/third_party/WebKit/Source/modules/indexeddb/IDBRequest.idl
@@ -39,7 +39,7 @@ [ ActiveScriptWrappable, DependentLifetime, - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface IDBRequest : EventTarget { [CallWith=ScriptState, RaisesException=Getter, CachedAttribute=isResultDirty] readonly attribute any result; [RaisesException=Getter] readonly attribute DOMException error;
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.idl b/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.idl index cefcce2..49a272e 100644 --- a/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.idl +++ b/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.idl
@@ -37,7 +37,7 @@ [ ActiveScriptWrappable, DependentLifetime, - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface IDBTransaction : EventTarget { // Properties
diff --git a/third_party/WebKit/Source/modules/installedapp/NavigatorInstalledApp.idl b/third_party/WebKit/Source/modules/installedapp/NavigatorInstalledApp.idl index c52f67b..96c0b59 100644 --- a/third_party/WebKit/Source/modules/installedapp/NavigatorInstalledApp.idl +++ b/third_party/WebKit/Source/modules/installedapp/NavigatorInstalledApp.idl
@@ -6,7 +6,7 @@ // https://github.com/WICG/get-installed-related-apps/blob/master/EXPLAINER.md [ - OriginTrialEnabled=InstalledApp, + OriginTrialEnabled=InstalledApp ] partial interface Navigator { [CallWith=ScriptState, Measure, SecureContext] Promise<RelatedApplication> getInstalledRelatedApps(); };
diff --git a/third_party/WebKit/Source/modules/mediarecorder/BlobEvent.idl b/third_party/WebKit/Source/modules/mediarecorder/BlobEvent.idl index c6fcea6..a73a18fb 100644 --- a/third_party/WebKit/Source/modules/mediarecorder/BlobEvent.idl +++ b/third_party/WebKit/Source/modules/mediarecorder/BlobEvent.idl
@@ -5,7 +5,7 @@ // https://w3c.github.io/mediacapture-record/MediaRecorder.html#blob-event [ - Constructor(DOMString type, BlobEventInit eventInitDict), + Constructor(DOMString type, BlobEventInit eventInitDict) ] interface BlobEvent : Event { [SameObject] readonly attribute Blob data;
diff --git a/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.idl b/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.idl index 0cc9563..3eb90d68 100644 --- a/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.idl +++ b/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.idl
@@ -11,7 +11,7 @@ ConstructorCallWith=ExecutionContext, Constructor(MediaStream stream, optional MediaRecorderOptions options), DependentLifetime, - RaisesException=Constructor, + RaisesException=Constructor ] interface MediaRecorder : EventTarget { readonly attribute MediaStream stream; readonly attribute DOMString mimeType;
diff --git a/third_party/WebKit/Source/modules/mediasession/MediaMetadata.idl b/third_party/WebKit/Source/modules/mediasession/MediaMetadata.idl index bfca3c13..5456a5d4 100644 --- a/third_party/WebKit/Source/modules/mediasession/MediaMetadata.idl +++ b/third_party/WebKit/Source/modules/mediasession/MediaMetadata.idl
@@ -8,7 +8,7 @@ ConstructorCallWith=ScriptState, Constructor(optional MediaMetadataInit metadata), RaisesException=Constructor, - RuntimeEnabled=MediaSession, + RuntimeEnabled=MediaSession ] interface MediaMetadata { attribute DOMString title; attribute DOMString artist;
diff --git a/third_party/WebKit/Source/modules/mediasession/MediaSession.idl b/third_party/WebKit/Source/modules/mediasession/MediaSession.idl index 3dd7e53..73413db 100644 --- a/third_party/WebKit/Source/modules/mediasession/MediaSession.idl +++ b/third_party/WebKit/Source/modules/mediasession/MediaSession.idl
@@ -25,7 +25,7 @@ [ RuntimeEnabled=MediaSession, - DependentLifetime, + DependentLifetime ] interface MediaSession { [Measure] attribute MediaMetadata? metadata; [Measure] attribute MediaSessionPlaybackState playbackState;
diff --git a/third_party/WebKit/Source/modules/mediasource/HTMLVideoElementMediaSource.idl b/third_party/WebKit/Source/modules/mediasource/HTMLVideoElementMediaSource.idl index 57de64f..8e33b22 100644 --- a/third_party/WebKit/Source/modules/mediasource/HTMLVideoElementMediaSource.idl +++ b/third_party/WebKit/Source/modules/mediasource/HTMLVideoElementMediaSource.idl
@@ -29,7 +29,7 @@ */ [ - RuntimeEnabled=MediaSourceExperimental, + RuntimeEnabled=MediaSourceExperimental ] partial interface HTMLVideoElement { VideoPlaybackQuality getVideoPlaybackQuality(); };
diff --git a/third_party/WebKit/Source/modules/mediasource/MediaSource.idl b/third_party/WebKit/Source/modules/mediasource/MediaSource.idl index 28f118d1..bfc1085 100644 --- a/third_party/WebKit/Source/modules/mediasource/MediaSource.idl +++ b/third_party/WebKit/Source/modules/mediasource/MediaSource.idl
@@ -39,7 +39,7 @@ ActiveScriptWrappable, Constructor, ConstructorCallWith=ExecutionContext, - DependentLifetime, + DependentLifetime ] interface MediaSource : EventTarget { // All the source buffers created by this object. readonly attribute SourceBufferList sourceBuffers;
diff --git a/third_party/WebKit/Source/modules/mediasource/SourceBuffer.idl b/third_party/WebKit/Source/modules/mediasource/SourceBuffer.idl index 07f46e03..3ad08b3 100644 --- a/third_party/WebKit/Source/modules/mediasource/SourceBuffer.idl +++ b/third_party/WebKit/Source/modules/mediasource/SourceBuffer.idl
@@ -37,7 +37,7 @@ [ ActiveScriptWrappable, - DependentLifetime, + DependentLifetime ] interface SourceBuffer : EventTarget { // Gets or sets the AppendMode.
diff --git a/third_party/WebKit/Source/modules/mediasource/TrackDefault.idl b/third_party/WebKit/Source/modules/mediasource/TrackDefault.idl index 07fcf37d..89ae52a 100644 --- a/third_party/WebKit/Source/modules/mediasource/TrackDefault.idl +++ b/third_party/WebKit/Source/modules/mediasource/TrackDefault.idl
@@ -10,7 +10,7 @@ [ Constructor(TrackDefaultType type, DOMString language, DOMString label, sequence<DOMString> kinds, optional DOMString byteStreamTrackID = ""), RaisesException=Constructor, - RuntimeEnabled=MediaSourceExperimental, + RuntimeEnabled=MediaSourceExperimental ] interface TrackDefault { readonly attribute TrackDefaultType type; readonly attribute DOMString byteStreamTrackID;
diff --git a/third_party/WebKit/Source/modules/mediasource/TrackDefaultList.idl b/third_party/WebKit/Source/modules/mediasource/TrackDefaultList.idl index 1ca5ff7d..9ed5174 100644 --- a/third_party/WebKit/Source/modules/mediasource/TrackDefaultList.idl +++ b/third_party/WebKit/Source/modules/mediasource/TrackDefaultList.idl
@@ -8,7 +8,7 @@ [ Constructor(optional sequence<TrackDefault> trackDefaults = []), RaisesException=Constructor, - RuntimeEnabled=MediaSourceExperimental, + RuntimeEnabled=MediaSourceExperimental ] interface TrackDefaultList { readonly attribute unsigned long length; [ImplementedAs=item] getter TrackDefault (unsigned long index);
diff --git a/third_party/WebKit/Source/modules/mediasource/VideoPlaybackQuality.idl b/third_party/WebKit/Source/modules/mediasource/VideoPlaybackQuality.idl index 746f53c..809bb88 100644 --- a/third_party/WebKit/Source/modules/mediasource/VideoPlaybackQuality.idl +++ b/third_party/WebKit/Source/modules/mediasource/VideoPlaybackQuality.idl
@@ -28,7 +28,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ [ - RuntimeEnabled=MediaSourceExperimental, + RuntimeEnabled=MediaSourceExperimental ] interface VideoPlaybackQuality { readonly attribute double creationTime; readonly attribute unsigned long totalVideoFrames;
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaDevices.idl b/third_party/WebKit/Source/modules/mediastream/MediaDevices.idl index b0b81bc..fc98fe4 100644 --- a/third_party/WebKit/Source/modules/mediastream/MediaDevices.idl +++ b/third_party/WebKit/Source/modules/mediastream/MediaDevices.idl
@@ -8,7 +8,7 @@ [ ActiveScriptWrappable, - DependentLifetime, + DependentLifetime ] interface MediaDevices : EventTarget { [RuntimeEnabled=OnDeviceChange] attribute EventHandler ondevicechange; [CallWith=ScriptState, MeasureAs=MediaDevicesEnumerateDevices] Promise<sequence<MediaDeviceInfo>> enumerateDevices();
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStream.idl b/third_party/WebKit/Source/modules/mediastream/MediaStream.idl index a440007..9add324 100644 --- a/third_party/WebKit/Source/modules/mediastream/MediaStream.idl +++ b/third_party/WebKit/Source/modules/mediastream/MediaStream.idl
@@ -29,7 +29,7 @@ Constructor, Constructor(MediaStream stream), Constructor(sequence<MediaStreamTrack> tracks), - ConstructorCallWith=ExecutionContext, + ConstructorCallWith=ExecutionContext ] interface MediaStream : EventTarget { readonly attribute DOMString id; sequence<MediaStreamTrack> getAudioTracks();
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStreamEvent.idl b/third_party/WebKit/Source/modules/mediastream/MediaStreamEvent.idl index e718fcb..80a1082 100644 --- a/third_party/WebKit/Source/modules/mediastream/MediaStreamEvent.idl +++ b/third_party/WebKit/Source/modules/mediastream/MediaStreamEvent.idl
@@ -27,7 +27,7 @@ // https://www.w3.org/TR/2015/WD-webrtc-20150210/#mediastreamevent [ - Constructor(DOMString type, optional MediaStreamEventInit eventInitDict), + Constructor(DOMString type, optional MediaStreamEventInit eventInitDict) ] interface MediaStreamEvent : Event { readonly attribute MediaStream? stream; };
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.idl b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.idl index e5e701a0..1f6fbbb 100644 --- a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.idl +++ b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.idl
@@ -35,7 +35,7 @@ [ ActiveScriptWrappable, - DependentLifetime, + DependentLifetime ] interface MediaStreamTrack : EventTarget { readonly attribute DOMString kind; readonly attribute DOMString id;
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackContentHint.idl b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackContentHint.idl index d4ace6f..a4560ab 100644 --- a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackContentHint.idl +++ b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackContentHint.idl
@@ -4,7 +4,7 @@ // https://wicg.github.io/mst-content-hint/#extension-to-mediastreamtrack [ - RuntimeEnabled=MediaStreamTrackContentHint, + RuntimeEnabled=MediaStreamTrackContentHint ] partial interface MediaStreamTrack { attribute DOMString contentHint; };
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackEvent.idl b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackEvent.idl index 0cdc7506..0d0f447 100644 --- a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackEvent.idl +++ b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackEvent.idl
@@ -27,7 +27,7 @@ [ Exposed=Window, - Constructor(DOMString type, MediaStreamTrackEventInit eventInitDict), + Constructor(DOMString type, MediaStreamTrackEventInit eventInitDict) ] interface MediaStreamTrackEvent : Event { [SameObject] readonly attribute MediaStreamTrack track; };
diff --git a/third_party/WebKit/Source/modules/mediastream/NavigatorMediaStream.idl b/third_party/WebKit/Source/modules/mediastream/NavigatorMediaStream.idl index 04230ab..92fd323 100644 --- a/third_party/WebKit/Source/modules/mediastream/NavigatorMediaStream.idl +++ b/third_party/WebKit/Source/modules/mediastream/NavigatorMediaStream.idl
@@ -22,7 +22,7 @@ partial interface Navigator { [RaisesException, RuntimeEnabled=GetUserMedia, - MeasureAs=GetUserMediaLegacy, + MeasureAs=GetUserMediaLegacy ] void getUserMedia(MediaStreamConstraints constraints, NavigatorUserMediaSuccessCallback successCallback, NavigatorUserMediaErrorCallback errorCallback);
diff --git a/third_party/WebKit/Source/modules/mediastream/WindowMediaStream.idl b/third_party/WebKit/Source/modules/mediastream/WindowMediaStream.idl index fb06a6a..63c2c59 100644 --- a/third_party/WebKit/Source/modules/mediastream/WindowMediaStream.idl +++ b/third_party/WebKit/Source/modules/mediastream/WindowMediaStream.idl
@@ -3,7 +3,7 @@ // found in the LICENSE file. [ - ImplementedAs=DOMWindowMediaStream, + ImplementedAs=DOMWindowMediaStream ] partial interface Window { attribute MediaStreamConstructor webkitMediaStream;
diff --git a/third_party/WebKit/Source/modules/netinfo/NetworkInformation.idl b/third_party/WebKit/Source/modules/netinfo/NetworkInformation.idl index e3f885f..b51f92d8 100644 --- a/third_party/WebKit/Source/modules/netinfo/NetworkInformation.idl +++ b/third_party/WebKit/Source/modules/netinfo/NetworkInformation.idl
@@ -29,7 +29,7 @@ ActiveScriptWrappable, DependentLifetime, Exposed=(Window,Worker), - RuntimeEnabled=NetworkInformation, + RuntimeEnabled=NetworkInformation ] interface NetworkInformation : EventTarget { [MeasureAs=NetInfoType] readonly attribute ConnectionType type; [RuntimeEnabled=NetInfoDownlinkMax, MeasureAs=NetInfoDownlinkMax] readonly attribute Megabit downlinkMax;
diff --git a/third_party/WebKit/Source/modules/nfc/NFC.cpp b/third_party/WebKit/Source/modules/nfc/NFC.cpp index 2eaf1c46..2f055ad 100644 --- a/third_party/WebKit/Source/modules/nfc/NFC.cpp +++ b/third_party/WebKit/Source/modules/nfc/NFC.cpp
@@ -387,8 +387,7 @@ } if (record.hasMediaType() && - !record.mediaType().StartsWith(kPlainTextMimePrefix, - kTextCaseUnicodeInsensitive)) { + !record.mediaType().StartsWithIgnoringASCIICase(kPlainTextMimePrefix)) { return RejectWithDOMException(script_state, kSyntaxError, "Invalid media type for 'text' record."); } @@ -424,10 +423,8 @@ // start with "application/" and end with "+json". if (record.hasMediaType() && (record.mediaType() != kJsonMimeType && - !(record.mediaType().StartsWith(kJsonMimePrefix, - kTextCaseASCIIInsensitive) && - record.mediaType().EndsWith(kJsonMimePostfix, - kTextCaseASCIIInsensitive)))) { + !(record.mediaType().StartsWithIgnoringASCIICase(kJsonMimePrefix) && + record.mediaType().EndsWithIgnoringASCIICase(kJsonMimePostfix)))) { return RejectWithDOMException(script_state, kSyntaxError, "Invalid media type for 'json' record."); }
diff --git a/third_party/WebKit/Source/modules/nfc/NFC.idl b/third_party/WebKit/Source/modules/nfc/NFC.idl index 93261753..050972f 100644 --- a/third_party/WebKit/Source/modules/nfc/NFC.idl +++ b/third_party/WebKit/Source/modules/nfc/NFC.idl
@@ -7,7 +7,7 @@ typedef (DOMString or ArrayBuffer or NFCMessage) NFCPushMessage; [ - RuntimeEnabled=WebNFC, + RuntimeEnabled=WebNFC ] interface NFC { [CallWith=ScriptState, MeasureAs=WebNFCPush] Promise<void> push (NFCPushMessage message, optional NFCPushOptions options); [CallWith=ScriptState, MeasureAs=WebNFCCancelPush] Promise<void> cancelPush (optional NFCPushTarget target = "any");
diff --git a/third_party/WebKit/Source/modules/nfc/NavigatorNFC.idl b/third_party/WebKit/Source/modules/nfc/NavigatorNFC.idl index 1c2507ca..1caa8af2 100644 --- a/third_party/WebKit/Source/modules/nfc/NavigatorNFC.idl +++ b/third_party/WebKit/Source/modules/nfc/NavigatorNFC.idl
@@ -5,7 +5,7 @@ // https://w3c.github.io/web-nfc/#extensions-to-the-navigator-interface [ - RuntimeEnabled=WebNFC, + RuntimeEnabled=WebNFC ] partial interface Navigator { readonly attribute NFC nfc; };
diff --git a/third_party/WebKit/Source/modules/notifications/Notification.idl b/third_party/WebKit/Source/modules/notifications/Notification.idl index 3d79716..4253de0 100644 --- a/third_party/WebKit/Source/modules/notifications/Notification.idl +++ b/third_party/WebKit/Source/modules/notifications/Notification.idl
@@ -47,7 +47,7 @@ Exposed=(Window,Worker), MeasureAs=NotificationCreated, RaisesException=Constructor, - RuntimeEnabled=Notifications, + RuntimeEnabled=Notifications ] interface Notification : EventTarget { [CallWith=ScriptState, MeasureAs=NotificationPermission] static readonly attribute NotificationPermission permission;
diff --git a/third_party/WebKit/Source/modules/notifications/NotificationEvent.idl b/third_party/WebKit/Source/modules/notifications/NotificationEvent.idl index 9e53d03..7490f2a 100644 --- a/third_party/WebKit/Source/modules/notifications/NotificationEvent.idl +++ b/third_party/WebKit/Source/modules/notifications/NotificationEvent.idl
@@ -7,7 +7,7 @@ [ Constructor(DOMString type, NotificationEventInit eventInitDict), Exposed=ServiceWorker, - RuntimeEnabled=Notifications, + RuntimeEnabled=Notifications ] interface NotificationEvent : ExtendableEvent { [ImplementedAs=getNotification] readonly attribute Notification notification; readonly attribute DOMString action;
diff --git a/third_party/WebKit/Source/modules/notifications/ServiceWorkerGlobalScopeNotifications.idl b/third_party/WebKit/Source/modules/notifications/ServiceWorkerGlobalScopeNotifications.idl index 45f2c54b..a6185a2 100644 --- a/third_party/WebKit/Source/modules/notifications/ServiceWorkerGlobalScopeNotifications.idl +++ b/third_party/WebKit/Source/modules/notifications/ServiceWorkerGlobalScopeNotifications.idl
@@ -5,7 +5,7 @@ // https://notifications.spec.whatwg.org/#service-worker-api [ - RuntimeEnabled=Notifications, + RuntimeEnabled=Notifications ] partial interface ServiceWorkerGlobalScope { attribute EventHandler onnotificationclick; attribute EventHandler onnotificationclose;
diff --git a/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.idl b/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.idl index d3e48e2..1d20ef3 100644 --- a/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.idl +++ b/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.idl
@@ -6,7 +6,7 @@ [ Exposed=(Window,Worker), - RuntimeEnabled=ExperimentalCanvasFeatures, + RuntimeEnabled=ExperimentalCanvasFeatures ] interface OffscreenCanvasRenderingContext2D { // back-reference to the canvas [ImplementedAs=offscreenCanvasForBinding] readonly attribute OffscreenCanvas canvas;
diff --git a/third_party/WebKit/Source/modules/payments/PaymentAddress.idl b/third_party/WebKit/Source/modules/payments/PaymentAddress.idl index dab7f3a..8f51485b 100644 --- a/third_party/WebKit/Source/modules/payments/PaymentAddress.idl +++ b/third_party/WebKit/Source/modules/payments/PaymentAddress.idl
@@ -5,7 +5,7 @@ // https://w3c.github.io/browser-payment-api/#paymentaddress-interface [ - RuntimeEnabled=PaymentRequest, + RuntimeEnabled=PaymentRequest ] interface PaymentAddress { serializer = {attribute}; readonly attribute DOMString country;
diff --git a/third_party/WebKit/Source/modules/payments/PaymentAppServiceWorkerRegistration.idl b/third_party/WebKit/Source/modules/payments/PaymentAppServiceWorkerRegistration.idl index da420342..8b81856f0 100644 --- a/third_party/WebKit/Source/modules/payments/PaymentAppServiceWorkerRegistration.idl +++ b/third_party/WebKit/Source/modules/payments/PaymentAppServiceWorkerRegistration.idl
@@ -5,7 +5,7 @@ // https://w3c.github.io/webpayments-payment-apps-api/#idl-def-serviceworkerregistration-partial-1 [ - RuntimeEnabled=PaymentApp, + RuntimeEnabled=PaymentApp ] partial interface ServiceWorkerRegistration { [CallWith=ScriptState] readonly attribute PaymentManager paymentManager; };
diff --git a/third_party/WebKit/Source/modules/payments/PaymentManager.idl b/third_party/WebKit/Source/modules/payments/PaymentManager.idl index 790c57e..1f9d4dc3 100644 --- a/third_party/WebKit/Source/modules/payments/PaymentManager.idl +++ b/third_party/WebKit/Source/modules/payments/PaymentManager.idl
@@ -7,7 +7,7 @@ [ RuntimeEnabled=PaymentApp, ConstructorCallWith=ExecutionContext, - DependentLifetime, + DependentLifetime ] interface PaymentManager { readonly attribute PaymentInstruments instruments; };
diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequest.idl b/third_party/WebKit/Source/modules/payments/PaymentRequest.idl index 50e698e..e0e1a59b 100644 --- a/third_party/WebKit/Source/modules/payments/PaymentRequest.idl +++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.idl
@@ -11,7 +11,7 @@ ConstructorCallWith=ExecutionContext, RaisesException=Constructor, ActiveScriptWrappable, - DependentLifetime, + DependentLifetime ] interface PaymentRequest : EventTarget { [CallWith=ScriptState] Promise<PaymentResponse> show(); [CallWith=ScriptState] Promise<void> abort();
diff --git a/third_party/WebKit/Source/modules/payments/PaymentResponse.idl b/third_party/WebKit/Source/modules/payments/PaymentResponse.idl index 9d21cb9..a52371f 100644 --- a/third_party/WebKit/Source/modules/payments/PaymentResponse.idl +++ b/third_party/WebKit/Source/modules/payments/PaymentResponse.idl
@@ -13,7 +13,7 @@ // https://w3c.github.io/browser-payment-api/#paymentresponse-interface [ - RuntimeEnabled=PaymentRequest, + RuntimeEnabled=PaymentRequest ] interface PaymentResponse { serializer = {attribute};
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCDTMFToneChangeEvent.idl b/third_party/WebKit/Source/modules/peerconnection/RTCDTMFToneChangeEvent.idl index d3a24c44..c162262 100644 --- a/third_party/WebKit/Source/modules/peerconnection/RTCDTMFToneChangeEvent.idl +++ b/third_party/WebKit/Source/modules/peerconnection/RTCDTMFToneChangeEvent.idl
@@ -27,7 +27,7 @@ [ NoInterfaceObject, - Constructor(DOMString type, RTCDTMFToneChangeEventInit eventInitDict), + Constructor(DOMString type, RTCDTMFToneChangeEventInit eventInitDict) ] interface RTCDTMFToneChangeEvent : Event { readonly attribute DOMString tone; };
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.idl b/third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.idl index 2642b17..406eb05e 100644 --- a/third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.idl +++ b/third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.idl
@@ -36,7 +36,7 @@ [ ActiveScriptWrappable, - DependentLifetime, + DependentLifetime ] interface RTCDataChannel : EventTarget { readonly attribute USVString label; readonly attribute boolean ordered;
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCDataChannelEvent.idl b/third_party/WebKit/Source/modules/peerconnection/RTCDataChannelEvent.idl index 4307c1b..6ba2684e 100644 --- a/third_party/WebKit/Source/modules/peerconnection/RTCDataChannelEvent.idl +++ b/third_party/WebKit/Source/modules/peerconnection/RTCDataChannelEvent.idl
@@ -26,7 +26,7 @@ // https://w3c.github.io/webrtc-pc/#rtcdatachannelevent [ - Constructor(DOMString type, RTCDataChannelEventInit eventInitDict), + Constructor(DOMString type, RTCDataChannelEventInit eventInitDict) ] interface RTCDataChannelEvent : Event { readonly attribute RTCDataChannel channel; };
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.idl b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.idl index 262ab9f..91e8a8d 100644 --- a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.idl +++ b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.idl
@@ -66,7 +66,7 @@ // TODO(guidou): There should only be one constructor argument. Constructor(optional RTCConfiguration configuration, optional Dictionary mediaConstraints), ConstructorCallWith=ExecutionContext, - RaisesException=Constructor, + RaisesException=Constructor ] interface RTCPeerConnection : EventTarget { [CallWith=ScriptState] Promise<RTCSessionDescription> createOffer(optional RTCOfferOptions options); [CallWith=ScriptState] Promise<RTCSessionDescription> createAnswer(optional RTCAnswerOptions options);
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCRtpSender.idl b/third_party/WebKit/Source/modules/peerconnection/RTCRtpSender.idl index 9b653b9a..6718c796 100644 --- a/third_party/WebKit/Source/modules/peerconnection/RTCRtpSender.idl +++ b/third_party/WebKit/Source/modules/peerconnection/RTCRtpSender.idl
@@ -4,7 +4,7 @@ // https://w3c.github.io/webrtc-pc/#rtcrtpsender-interface [ - RuntimeEnabled=RTCRtpSender, + RuntimeEnabled=RTCRtpSender ] interface RTCRtpSender { readonly attribute MediaStreamTrack? track; // TODO(hbos): Implement the rest of RTCRtpSender, https://crbug.com/700916.
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCSessionDescription.idl b/third_party/WebKit/Source/modules/peerconnection/RTCSessionDescription.idl index 1ae9679..00b6ca1 100644 --- a/third_party/WebKit/Source/modules/peerconnection/RTCSessionDescription.idl +++ b/third_party/WebKit/Source/modules/peerconnection/RTCSessionDescription.idl
@@ -39,7 +39,7 @@ [ Constructor(optional RTCSessionDescriptionInit descriptionInitDict), - ConstructorCallWith=ExecutionContext, + ConstructorCallWith=ExecutionContext ] interface RTCSessionDescription { // TODO(foolip): |type| and |sdp| should be readonly and not nullable. // https://crbug.com/662898
diff --git a/third_party/WebKit/Source/modules/permissions/PermissionStatus.idl b/third_party/WebKit/Source/modules/permissions/PermissionStatus.idl index 2515fc5c..b4c2940 100644 --- a/third_party/WebKit/Source/modules/permissions/PermissionStatus.idl +++ b/third_party/WebKit/Source/modules/permissions/PermissionStatus.idl
@@ -15,7 +15,7 @@ ActiveScriptWrappable, DependentLifetime, Exposed=(Window,Worker), - RuntimeEnabled=Permissions, + RuntimeEnabled=Permissions ] interface PermissionStatus : EventTarget { readonly attribute PermissionState state; attribute EventHandler onchange;
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationAvailability.idl b/third_party/WebKit/Source/modules/presentation/PresentationAvailability.idl index 476c6fcf..90e2b56 100644 --- a/third_party/WebKit/Source/modules/presentation/PresentationAvailability.idl +++ b/third_party/WebKit/Source/modules/presentation/PresentationAvailability.idl
@@ -7,7 +7,7 @@ [ ActiveScriptWrappable, DependentLifetime, - RuntimeEnabled=Presentation, + RuntimeEnabled=Presentation ] interface PresentationAvailability : EventTarget { readonly attribute boolean value; attribute EventHandler onchange;
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationRequest.idl b/third_party/WebKit/Source/modules/presentation/PresentationRequest.idl index 8e3da63..9b2c951 100644 --- a/third_party/WebKit/Source/modules/presentation/PresentationRequest.idl +++ b/third_party/WebKit/Source/modules/presentation/PresentationRequest.idl
@@ -12,7 +12,7 @@ DependentLifetime, MeasureAs=PresentationRequestConstructor, RaisesException=Constructor, - RuntimeEnabled=Presentation, + RuntimeEnabled=Presentation ] interface PresentationRequest : EventTarget { [CallWith=ScriptState, MeasureAs=PresentationRequestStart] Promise<PresentationConnection> start(); [CallWith=ScriptState, MeasureAs=PresentationRequestReconnect] Promise<PresentationConnection> reconnect(DOMString id);
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushEvent.idl b/third_party/WebKit/Source/modules/push_messaging/PushEvent.idl index d29be4cf..28a1cdcf 100644 --- a/third_party/WebKit/Source/modules/push_messaging/PushEvent.idl +++ b/third_party/WebKit/Source/modules/push_messaging/PushEvent.idl
@@ -7,7 +7,7 @@ [ Constructor(DOMString type, optional PushEventInit eventInitDict), Exposed=ServiceWorker, - RuntimeEnabled=PushMessaging, + RuntimeEnabled=PushMessaging ] interface PushEvent : ExtendableEvent { readonly attribute PushMessageData? data; };
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushManager.idl b/third_party/WebKit/Source/modules/push_messaging/PushManager.idl index 985c80464..14411230 100644 --- a/third_party/WebKit/Source/modules/push_messaging/PushManager.idl +++ b/third_party/WebKit/Source/modules/push_messaging/PushManager.idl
@@ -6,7 +6,7 @@ [ Exposed=(Window,Worker), - RuntimeEnabled=PushMessaging, + RuntimeEnabled=PushMessaging ] interface PushManager { [SameObject, SaveSameObject] static readonly attribute FrozenArray<DOMString> supportedContentEncodings;
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushMessageData.idl b/third_party/WebKit/Source/modules/push_messaging/PushMessageData.idl index ed5e919d..63855585 100644 --- a/third_party/WebKit/Source/modules/push_messaging/PushMessageData.idl +++ b/third_party/WebKit/Source/modules/push_messaging/PushMessageData.idl
@@ -5,7 +5,7 @@ // https://w3c.github.io/push-api/#pushmessagedata-interface [ - Exposed=ServiceWorker, + Exposed=ServiceWorker ] interface PushMessageData { ArrayBuffer arrayBuffer(); Blob blob();
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushSubscription.idl b/third_party/WebKit/Source/modules/push_messaging/PushSubscription.idl index 072c4b0..9304c02 100644 --- a/third_party/WebKit/Source/modules/push_messaging/PushSubscription.idl +++ b/third_party/WebKit/Source/modules/push_messaging/PushSubscription.idl
@@ -11,7 +11,7 @@ [ Exposed=(Window,Worker), - RuntimeEnabled=PushMessaging, + RuntimeEnabled=PushMessaging ] interface PushSubscription { readonly attribute USVString endpoint; readonly attribute DOMTimeStamp? expirationTime;
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushSubscriptionOptions.idl b/third_party/WebKit/Source/modules/push_messaging/PushSubscriptionOptions.idl index d43d63b..16d2076 100644 --- a/third_party/WebKit/Source/modules/push_messaging/PushSubscriptionOptions.idl +++ b/third_party/WebKit/Source/modules/push_messaging/PushSubscriptionOptions.idl
@@ -6,7 +6,7 @@ [ Exposed=(Window,Worker), - RuntimeEnabled=PushMessaging, + RuntimeEnabled=PushMessaging ] interface PushSubscriptionOptions { readonly attribute boolean userVisibleOnly; [SameObject] readonly attribute ArrayBuffer? applicationServerKey;
diff --git a/third_party/WebKit/Source/modules/push_messaging/ServiceWorkerGlobalScopePush.idl b/third_party/WebKit/Source/modules/push_messaging/ServiceWorkerGlobalScopePush.idl index 3395b3d..82b3e41 100644 --- a/third_party/WebKit/Source/modules/push_messaging/ServiceWorkerGlobalScopePush.idl +++ b/third_party/WebKit/Source/modules/push_messaging/ServiceWorkerGlobalScopePush.idl
@@ -3,7 +3,7 @@ // found in the LICENSE file. [ - RuntimeEnabled=PushMessaging, + RuntimeEnabled=PushMessaging ] partial interface ServiceWorkerGlobalScope { attribute EventHandler onpush; };
diff --git a/third_party/WebKit/Source/modules/push_messaging/ServiceWorkerRegistrationPush.idl b/third_party/WebKit/Source/modules/push_messaging/ServiceWorkerRegistrationPush.idl index ad896d7d..ed1277b 100644 --- a/third_party/WebKit/Source/modules/push_messaging/ServiceWorkerRegistrationPush.idl +++ b/third_party/WebKit/Source/modules/push_messaging/ServiceWorkerRegistrationPush.idl
@@ -6,7 +6,7 @@ [ Exposed=(Window,Worker), - RuntimeEnabled=PushMessaging, + RuntimeEnabled=PushMessaging ] partial interface ServiceWorkerRegistration { readonly attribute PushManager pushManager; };
diff --git a/third_party/WebKit/Source/modules/quota/DOMError.idl b/third_party/WebKit/Source/modules/quota/DOMError.idl index 3adad06..cd62ea7 100644 --- a/third_party/WebKit/Source/modules/quota/DOMError.idl +++ b/third_party/WebKit/Source/modules/quota/DOMError.idl
@@ -31,7 +31,7 @@ // FIXME: DOMError has been removed from the spec. crbug.com/460725 [ Constructor(DOMString name, optional DOMString message = null), - Measure, + Measure ] interface DOMError { [Measure] readonly attribute DOMString name; [Measure] readonly attribute DOMString message;
diff --git a/third_party/WebKit/Source/modules/quota/StorageManager.idl b/third_party/WebKit/Source/modules/quota/StorageManager.idl index 086c45c..23e5dbd8 100644 --- a/third_party/WebKit/Source/modules/quota/StorageManager.idl +++ b/third_party/WebKit/Source/modules/quota/StorageManager.idl
@@ -7,7 +7,7 @@ // TODO(jsbell): Should have [SecureContext] on interface [ Exposed=(Window,Worker), - RuntimeEnabled=DurableStorage, + RuntimeEnabled=DurableStorage ] interface StorageManager { [CallWith=ScriptState, MeasureAs=DurableStoragePersisted] Promise<boolean> persisted(); [Exposed=Window, CallWith=ScriptState, MeasureAs=DurableStoragePersist] Promise<boolean> persist();
diff --git a/third_party/WebKit/Source/modules/quota/WindowQuota.idl b/third_party/WebKit/Source/modules/quota/WindowQuota.idl index 5d14c0b..786bc1bc 100644 --- a/third_party/WebKit/Source/modules/quota/WindowQuota.idl +++ b/third_party/WebKit/Source/modules/quota/WindowQuota.idl
@@ -24,7 +24,7 @@ */ [ - ImplementedAs=DOMWindowQuota, + ImplementedAs=DOMWindowQuota ] partial interface Window { [DeprecateAs=PrefixedStorageInfo] readonly attribute DeprecatedStorageInfo webkitStorageInfo; };
diff --git a/third_party/WebKit/Source/modules/sensor/OrientationSensor.idl b/third_party/WebKit/Source/modules/sensor/OrientationSensor.idl index 9ceaaf0..e2ff8ee 100644 --- a/third_party/WebKit/Source/modules/sensor/OrientationSensor.idl +++ b/third_party/WebKit/Source/modules/sensor/OrientationSensor.idl
@@ -8,7 +8,7 @@ typedef (Float32Array or Float64Array or DOMMatrix) RotationMatrixType; [ - RuntimeEnabled=Sensor, + RuntimeEnabled=Sensor ] interface OrientationSensor : Sensor { [CachedAttribute=isReadingDirty] readonly attribute FrozenArray<double>? quaternion; [RaisesException, MeasureAs=OrientationSensorPopulateMatrix] void populateMatrix(RotationMatrixType targetBuffer);
diff --git a/third_party/WebKit/Source/modules/sensor/Sensor.idl b/third_party/WebKit/Source/modules/sensor/Sensor.idl index 2d8004d..0de84ae 100644 --- a/third_party/WebKit/Source/modules/sensor/Sensor.idl +++ b/third_party/WebKit/Source/modules/sensor/Sensor.idl
@@ -8,7 +8,7 @@ [ ActiveScriptWrappable, DependentLifetime, - RuntimeEnabled=Sensor, + RuntimeEnabled=Sensor ] interface Sensor : EventTarget { [MeasureAs=GenericSensorActivated] readonly attribute boolean activated; [CallWith=ScriptState] readonly attribute DOMHighResTimeStamp? timestamp;
diff --git a/third_party/WebKit/Source/modules/serviceworkers/Client.idl b/third_party/WebKit/Source/modules/serviceworkers/Client.idl index f180aa2..c94b780 100644 --- a/third_party/WebKit/Source/modules/serviceworkers/Client.idl +++ b/third_party/WebKit/Source/modules/serviceworkers/Client.idl
@@ -5,7 +5,7 @@ // https://w3c.github.io/ServiceWorker/#client-interface [ Exposed=ServiceWorker, - ImplementedAs=ServiceWorkerClient, + ImplementedAs=ServiceWorkerClient ] interface Client { readonly attribute USVString url; readonly attribute DOMString id;
diff --git a/third_party/WebKit/Source/modules/serviceworkers/Clients.idl b/third_party/WebKit/Source/modules/serviceworkers/Clients.idl index ec789010..8f90d4dd 100644 --- a/third_party/WebKit/Source/modules/serviceworkers/Clients.idl +++ b/third_party/WebKit/Source/modules/serviceworkers/Clients.idl
@@ -5,7 +5,7 @@ // https://w3c.github.io/ServiceWorker/#clients-interface [ Exposed=ServiceWorker, - ImplementedAs=ServiceWorkerClients, + ImplementedAs=ServiceWorkerClients ] interface Clients { [CallWith=ScriptState] Promise<any> get(DOMString id); [CallWith=ScriptState] Promise<sequence<Client>> matchAll(optional ClientQueryOptions options);
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ExtendableEvent.idl b/third_party/WebKit/Source/modules/serviceworkers/ExtendableEvent.idl index 3e2b1aa9..a89ad17c 100644 --- a/third_party/WebKit/Source/modules/serviceworkers/ExtendableEvent.idl +++ b/third_party/WebKit/Source/modules/serviceworkers/ExtendableEvent.idl
@@ -31,7 +31,7 @@ // https://w3c.github.io/ServiceWorker/#extendable-event-interface [ Constructor(DOMString type, optional ExtendableEventInit eventInitDict), - Exposed=ServiceWorker, + Exposed=ServiceWorker ] interface ExtendableEvent : Event { [CallWith=ScriptState, RaisesException] void waitUntil(Promise<any> f); };
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ExtendableMessageEvent.idl b/third_party/WebKit/Source/modules/serviceworkers/ExtendableMessageEvent.idl index 4fe72c0..2a907c96 100644 --- a/third_party/WebKit/Source/modules/serviceworkers/ExtendableMessageEvent.idl +++ b/third_party/WebKit/Source/modules/serviceworkers/ExtendableMessageEvent.idl
@@ -10,7 +10,7 @@ // Constructor should be: // Constructor(DOMString type, optional ExtendableMessageEventInit eventInitDict), CustomConstructor, - Exposed=ServiceWorker, + Exposed=ServiceWorker ] interface ExtendableMessageEvent : ExtendableEvent { [Custom=Getter] readonly attribute any data; readonly attribute DOMString origin;
diff --git a/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.idl b/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.idl index 5be67c460..49fd6c4 100644 --- a/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.idl +++ b/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.idl
@@ -8,7 +8,7 @@ DependentLifetime, Constructor(DOMString type, FetchEventInit eventInitDict), ConstructorCallWith=ScriptState, - Exposed=ServiceWorker, + Exposed=ServiceWorker ] interface FetchEvent : ExtendableEvent { [SameObject] readonly attribute Request request; readonly attribute DOMString? clientId;
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ForeignFetchEvent.idl b/third_party/WebKit/Source/modules/serviceworkers/ForeignFetchEvent.idl index db23096..2f0b3fb 100644 --- a/third_party/WebKit/Source/modules/serviceworkers/ForeignFetchEvent.idl +++ b/third_party/WebKit/Source/modules/serviceworkers/ForeignFetchEvent.idl
@@ -7,7 +7,7 @@ Constructor(DOMString type, ForeignFetchEventInit eventInitDict), ConstructorCallWith=ScriptState, Exposed=ServiceWorker, - OriginTrialEnabled=ForeignFetch, + OriginTrialEnabled=ForeignFetch ] interface ForeignFetchEvent : ExtendableEvent { [SameObject] readonly attribute Request request; readonly attribute USVString origin;
diff --git a/third_party/WebKit/Source/modules/serviceworkers/InstallEvent.idl b/third_party/WebKit/Source/modules/serviceworkers/InstallEvent.idl index c19df52a..7f96c0fe 100644 --- a/third_party/WebKit/Source/modules/serviceworkers/InstallEvent.idl +++ b/third_party/WebKit/Source/modules/serviceworkers/InstallEvent.idl
@@ -6,7 +6,7 @@ [ Constructor(DOMString type, optional ExtendableEventInit eventInitDict), - Exposed=ServiceWorker, + Exposed=ServiceWorker ] interface InstallEvent : ExtendableEvent { [OriginTrialEnabled=ForeignFetch, CallWith=ScriptState, RaisesException] void registerForeignFetch(ForeignFetchOptions options); };
diff --git a/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadManager.idl b/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadManager.idl index a18e39d1..60f9697 100644 --- a/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadManager.idl +++ b/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadManager.idl
@@ -6,7 +6,7 @@ // https://github.com/w3c/ServiceWorker/issues/920 [ RuntimeEnabled=ServiceWorkerNavigationPreload, - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface NavigationPreloadManager { // TODO(mgiuca): Put SecureContext on the interface, not individual methods. // Currently prevented due to clash with OriginTrialEnabled. This can be
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.idl b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.idl index 5ae2291..4c27d72 100644 --- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.idl +++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.idl
@@ -40,7 +40,7 @@ [ ActiveScriptWrappable, - DependentLifetime, + DependentLifetime ] interface ServiceWorker : EventTarget { [PostMessage, RaisesException] void postMessage(SerializedScriptValue message, optional sequence<Transferable> transfer);
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.idl b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.idl index ca8fef4..2c2e0fb9 100644 --- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.idl +++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.idl
@@ -32,7 +32,7 @@ [ Exposed=ServiceWorker, - Global=(Worker,ServiceWorker), + Global=(Worker,ServiceWorker) ] interface ServiceWorkerGlobalScope : WorkerGlobalScope { readonly attribute Clients clients;
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.idl b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.idl index d25a82c..3c283065 100644 --- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.idl +++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.idl
@@ -6,7 +6,7 @@ [ ActiveScriptWrappable, DependentLifetime, - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface ServiceWorkerRegistration : EventTarget { readonly attribute ServiceWorker? installing; readonly attribute ServiceWorker? waiting;
diff --git a/third_party/WebKit/Source/modules/serviceworkers/WindowClient.idl b/third_party/WebKit/Source/modules/serviceworkers/WindowClient.idl index bb12d1b..1dcd0c65 100644 --- a/third_party/WebKit/Source/modules/serviceworkers/WindowClient.idl +++ b/third_party/WebKit/Source/modules/serviceworkers/WindowClient.idl
@@ -13,7 +13,7 @@ // https://w3c.github.io/ServiceWorker/#window-client-interface [ Exposed=ServiceWorker, - ImplementedAs=ServiceWorkerWindowClient, + ImplementedAs=ServiceWorkerWindowClient ] interface WindowClient : Client { readonly attribute VisibilityState visibilityState; readonly attribute boolean focused;
diff --git a/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.idl b/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.idl index aea929a2..4ce6c9fa 100644 --- a/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.idl +++ b/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.idl
@@ -8,7 +8,7 @@ Constructor, Exposed=(Window,Worker), MeasureAs=ShapeDetection_BarcodeDetectorConstructor, - RuntimeEnabled=ShapeDetection, + RuntimeEnabled=ShapeDetection ] interface BarcodeDetector { [CallWith=ScriptState] Promise<sequence<DetectedBarcode>> detect(ImageBitmapSource image); };
diff --git a/third_party/WebKit/Source/modules/shapedetection/DetectedBarcode.idl b/third_party/WebKit/Source/modules/shapedetection/DetectedBarcode.idl index 1b4f77d..6bd2f7b 100644 --- a/third_party/WebKit/Source/modules/shapedetection/DetectedBarcode.idl +++ b/third_party/WebKit/Source/modules/shapedetection/DetectedBarcode.idl
@@ -6,7 +6,7 @@ [ Constructor, - RuntimeEnabled=ShapeDetection, + RuntimeEnabled=ShapeDetection ] interface DetectedBarcode { // TODO(mcasas): Implement missing fields. https://crbug.com/646083 [SameObject] readonly attribute DOMString rawValue;
diff --git a/third_party/WebKit/Source/modules/shapedetection/DetectedFace.idl b/third_party/WebKit/Source/modules/shapedetection/DetectedFace.idl index ef6150b4..fe8dba2 100644 --- a/third_party/WebKit/Source/modules/shapedetection/DetectedFace.idl +++ b/third_party/WebKit/Source/modules/shapedetection/DetectedFace.idl
@@ -6,7 +6,7 @@ [ Constructor, - RuntimeEnabled=ShapeDetection, + RuntimeEnabled=ShapeDetection ] interface DetectedFace { // TODO(xianglu): Implement any other fields. https://crbug.com/646083 [SameObject] readonly attribute DOMRect boundingBox;
diff --git a/third_party/WebKit/Source/modules/shapedetection/DetectedText.idl b/third_party/WebKit/Source/modules/shapedetection/DetectedText.idl index 57075627..47053f3 100644 --- a/third_party/WebKit/Source/modules/shapedetection/DetectedText.idl +++ b/third_party/WebKit/Source/modules/shapedetection/DetectedText.idl
@@ -6,7 +6,7 @@ [ Constructor, - RuntimeEnabled=ShapeDetection, + RuntimeEnabled=ShapeDetection ] interface DetectedText { [SameObject] readonly attribute DOMString rawValue; [SameObject] readonly attribute DOMRect boundingBox;
diff --git a/third_party/WebKit/Source/modules/shapedetection/FaceDetector.idl b/third_party/WebKit/Source/modules/shapedetection/FaceDetector.idl index e4a3021..5bd12370 100644 --- a/third_party/WebKit/Source/modules/shapedetection/FaceDetector.idl +++ b/third_party/WebKit/Source/modules/shapedetection/FaceDetector.idl
@@ -8,7 +8,7 @@ Constructor(optional FaceDetectorOptions faceDetectorOptions), Exposed=(Window,Worker), MeasureAs=ShapeDetection_FaceDetectorConstructor, - RuntimeEnabled=ShapeDetection, + RuntimeEnabled=ShapeDetection ] interface FaceDetector { [CallWith=ScriptState] Promise<sequence<DetectedFace>> detect(ImageBitmapSource image); };
diff --git a/third_party/WebKit/Source/modules/shapedetection/TextDetector.idl b/third_party/WebKit/Source/modules/shapedetection/TextDetector.idl index 0884b524..11b3630 100644 --- a/third_party/WebKit/Source/modules/shapedetection/TextDetector.idl +++ b/third_party/WebKit/Source/modules/shapedetection/TextDetector.idl
@@ -8,7 +8,7 @@ Constructor, Exposed=(Window,Worker), MeasureAs=ShapeDetection_TextDetectorConstructor, - RuntimeEnabled=ShapeDetection, + RuntimeEnabled=ShapeDetection ] interface TextDetector { [CallWith=ScriptState] Promise<sequence<DetectedText>> detect(ImageBitmapSource image); };
diff --git a/third_party/WebKit/Source/modules/speech/SpeechGrammar.idl b/third_party/WebKit/Source/modules/speech/SpeechGrammar.idl index 44a6c5f..e1d0f25 100644 --- a/third_party/WebKit/Source/modules/speech/SpeechGrammar.idl +++ b/third_party/WebKit/Source/modules/speech/SpeechGrammar.idl
@@ -27,7 +27,7 @@ [ Constructor, - NoInterfaceObject, + NoInterfaceObject ] interface SpeechGrammar { [URL,CallWith=ScriptState] attribute DOMString src; attribute float weight;
diff --git a/third_party/WebKit/Source/modules/speech/SpeechGrammarList.idl b/third_party/WebKit/Source/modules/speech/SpeechGrammarList.idl index d5db1044..85a60d4 100644 --- a/third_party/WebKit/Source/modules/speech/SpeechGrammarList.idl +++ b/third_party/WebKit/Source/modules/speech/SpeechGrammarList.idl
@@ -27,7 +27,7 @@ [ Constructor, - NoInterfaceObject, + NoInterfaceObject ] interface SpeechGrammarList { readonly attribute unsigned long length; getter SpeechGrammar item(unsigned long index);
diff --git a/third_party/WebKit/Source/modules/speech/SpeechRecognition.idl b/third_party/WebKit/Source/modules/speech/SpeechRecognition.idl index 27f29ed..5901b6c 100644 --- a/third_party/WebKit/Source/modules/speech/SpeechRecognition.idl +++ b/third_party/WebKit/Source/modules/speech/SpeechRecognition.idl
@@ -30,7 +30,7 @@ Constructor, ConstructorCallWith=ExecutionContext, DependentLifetime, - NoInterfaceObject, + NoInterfaceObject ] interface SpeechRecognition : EventTarget { // recognition parameters attribute SpeechGrammarList grammars;
diff --git a/third_party/WebKit/Source/modules/speech/SpeechRecognitionError.idl b/third_party/WebKit/Source/modules/speech/SpeechRecognitionError.idl index 7f179e9..9eae1c3 100644 --- a/third_party/WebKit/Source/modules/speech/SpeechRecognitionError.idl +++ b/third_party/WebKit/Source/modules/speech/SpeechRecognitionError.idl
@@ -27,7 +27,7 @@ [ NoInterfaceObject, - Constructor(DOMString type, optional SpeechRecognitionErrorInit initDict), + Constructor(DOMString type, optional SpeechRecognitionErrorInit initDict) ] interface SpeechRecognitionError : Event { readonly attribute DOMString error; readonly attribute DOMString message;
diff --git a/third_party/WebKit/Source/modules/speech/SpeechRecognitionEvent.idl b/third_party/WebKit/Source/modules/speech/SpeechRecognitionEvent.idl index ecf968c..06bab39 100644 --- a/third_party/WebKit/Source/modules/speech/SpeechRecognitionEvent.idl +++ b/third_party/WebKit/Source/modules/speech/SpeechRecognitionEvent.idl
@@ -27,7 +27,7 @@ [ NoInterfaceObject, - Constructor(DOMString type, optional SpeechRecognitionEventInit initDict), + Constructor(DOMString type, optional SpeechRecognitionEventInit initDict) ] interface SpeechRecognitionEvent : Event { readonly attribute unsigned long resultIndex; readonly attribute SpeechRecognitionResultList? results;
diff --git a/third_party/WebKit/Source/modules/speech/SpeechSynthesisUtterance.idl b/third_party/WebKit/Source/modules/speech/SpeechSynthesisUtterance.idl index 1021a743..e8e8fa2 100644 --- a/third_party/WebKit/Source/modules/speech/SpeechSynthesisUtterance.idl +++ b/third_party/WebKit/Source/modules/speech/SpeechSynthesisUtterance.idl
@@ -28,7 +28,7 @@ [ Constructor(optional DOMString text = null), ConstructorCallWith=ExecutionContext, - RuntimeEnabled=ScriptedSpeech, + RuntimeEnabled=ScriptedSpeech ] interface SpeechSynthesisUtterance : EventTarget { attribute DOMString text; attribute DOMString lang;
diff --git a/third_party/WebKit/Source/modules/speech/WindowSpeech.idl b/third_party/WebKit/Source/modules/speech/WindowSpeech.idl index 549e681..fdc4623 100644 --- a/third_party/WebKit/Source/modules/speech/WindowSpeech.idl +++ b/third_party/WebKit/Source/modules/speech/WindowSpeech.idl
@@ -4,7 +4,7 @@ [ ImplementedAs=DOMWindowSpeech, - RuntimeEnabled=ScriptedSpeech, + RuntimeEnabled=ScriptedSpeech ] partial interface Window { [Measure] attribute SpeechGrammarConstructor webkitSpeechGrammar; [Measure] attribute SpeechGrammarListConstructor webkitSpeechGrammarList;
diff --git a/third_party/WebKit/Source/modules/speech/WindowSpeechSynthesis.idl b/third_party/WebKit/Source/modules/speech/WindowSpeechSynthesis.idl index 2e6f2b0..ca27255 100644 --- a/third_party/WebKit/Source/modules/speech/WindowSpeechSynthesis.idl +++ b/third_party/WebKit/Source/modules/speech/WindowSpeechSynthesis.idl
@@ -25,7 +25,7 @@ [ ImplementedAs=DOMWindowSpeechSynthesis, - RuntimeEnabled=ScriptedSpeech, + RuntimeEnabled=ScriptedSpeech ] partial interface Window { [Measure, CallWith=ScriptState] readonly attribute SpeechSynthesis speechSynthesis; };
diff --git a/third_party/WebKit/Source/modules/storage/StorageEvent.idl b/third_party/WebKit/Source/modules/storage/StorageEvent.idl index bcf9162..f4a3688 100644 --- a/third_party/WebKit/Source/modules/storage/StorageEvent.idl +++ b/third_party/WebKit/Source/modules/storage/StorageEvent.idl
@@ -26,7 +26,7 @@ // https://html.spec.whatwg.org/multipage/webstorage.html#the-storageevent-interface [ - Constructor(DOMString type, optional StorageEventInit eventInitDict), + Constructor(DOMString type, optional StorageEventInit eventInitDict) ] interface StorageEvent : Event { readonly attribute DOMString? key; readonly attribute DOMString? oldValue;
diff --git a/third_party/WebKit/Source/modules/storage/WindowStorage.idl b/third_party/WebKit/Source/modules/storage/WindowStorage.idl index 5ddd617..91790a6 100644 --- a/third_party/WebKit/Source/modules/storage/WindowStorage.idl +++ b/third_party/WebKit/Source/modules/storage/WindowStorage.idl
@@ -3,7 +3,7 @@ // found in the LICENSE file. [ - ImplementedAs=DOMWindowStorage, + ImplementedAs=DOMWindowStorage ] partial interface Window { // https://html.spec.whatwg.org/#the-sessionstorage-attribute [LogActivity=GetterOnly, RaisesException=Getter] readonly attribute Storage sessionStorage;
diff --git a/third_party/WebKit/Source/modules/vr/NavigatorVR.idl b/third_party/WebKit/Source/modules/vr/NavigatorVR.idl index e84d1978..5456959 100644 --- a/third_party/WebKit/Source/modules/vr/NavigatorVR.idl +++ b/third_party/WebKit/Source/modules/vr/NavigatorVR.idl
@@ -4,7 +4,7 @@ // https://w3c.github.io/webvr/#interface-navigator [ - OriginTrialEnabled=WebVR, + OriginTrialEnabled=WebVR ] partial interface Navigator { [CallWith=ScriptState] Promise getVRDisplays(); };
diff --git a/third_party/WebKit/Source/modules/vr/VRDisplayEvent.idl b/third_party/WebKit/Source/modules/vr/VRDisplayEvent.idl index 31dcb48..ae9103a 100644 --- a/third_party/WebKit/Source/modules/vr/VRDisplayEvent.idl +++ b/third_party/WebKit/Source/modules/vr/VRDisplayEvent.idl
@@ -13,7 +13,7 @@ // https://w3c.github.io/webvr/#interface-vrdisplayevent [ OriginTrialEnabled=WebVR, - Constructor(DOMString type, optional VRDisplayEventInit eventInitDict), + Constructor(DOMString type, optional VRDisplayEventInit eventInitDict) ] interface VRDisplayEvent : Event { readonly attribute VRDisplay display; readonly attribute VRDisplayEventReason reason;
diff --git a/third_party/WebKit/Source/modules/vr/VREyeParameters.idl b/third_party/WebKit/Source/modules/vr/VREyeParameters.idl index e698912f..7b5b630 100644 --- a/third_party/WebKit/Source/modules/vr/VREyeParameters.idl +++ b/third_party/WebKit/Source/modules/vr/VREyeParameters.idl
@@ -4,7 +4,7 @@ // https://w3c.github.io/webvr/#interface-vreyeparameters [ - OriginTrialEnabled=WebVR, + OriginTrialEnabled=WebVR ] interface VREyeParameters { /* These values will vary after a FOV has been set */ [DeprecateAs=VREyeParametersOffset] readonly attribute Float32Array offset;
diff --git a/third_party/WebKit/Source/modules/vr/VRFrameData.idl b/third_party/WebKit/Source/modules/vr/VRFrameData.idl index a07fcb2..5d1f348 100644 --- a/third_party/WebKit/Source/modules/vr/VRFrameData.idl +++ b/third_party/WebKit/Source/modules/vr/VRFrameData.idl
@@ -5,7 +5,7 @@ // https://w3c.github.io/webvr/#interface-vrframedata [ OriginTrialEnabled=WebVR, - Constructor, + Constructor ] interface VRFrameData { readonly attribute Float32Array leftProjectionMatrix; readonly attribute Float32Array leftViewMatrix;
diff --git a/third_party/WebKit/Source/modules/vr/VRPose.idl b/third_party/WebKit/Source/modules/vr/VRPose.idl index 4b29a84..e935c5f 100644 --- a/third_party/WebKit/Source/modules/vr/VRPose.idl +++ b/third_party/WebKit/Source/modules/vr/VRPose.idl
@@ -4,7 +4,7 @@ // https://w3c.github.io/webvr/#interface-vrpose [ - OriginTrialEnabled=WebVR, + OriginTrialEnabled=WebVR ] interface VRPose { readonly attribute Float32Array? position; [MeasureAs=VRPoseLinearVelocity] readonly attribute Float32Array? linearVelocity;
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.idl b/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.idl index 36a1018c..ff021eb 100644 --- a/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.idl +++ b/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.idl
@@ -7,7 +7,7 @@ [ Exposed=AudioWorklet, Global=(Worklet,AudioWorklet), - RuntimeEnabled=AudioWorklet, + RuntimeEnabled=AudioWorklet ] interface AudioWorkletGlobalScope : WorkletGlobalScope { [RaisesException] void registerProcessor(DOMString name, Function processorConstructor); };
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessor.idl b/third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessor.idl index 6079982..2ebdb17 100644 --- a/third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessor.idl +++ b/third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessor.idl
@@ -7,7 +7,7 @@ [ Exposed=AudioWorklet, Global=(Worklet,AudioWorklet), - RuntimeEnabled=AudioWorklet, + RuntimeEnabled=AudioWorklet ] interface AudioWorkletProcessor { // TODO(hongchan): implement spec features. // readonly attribute AudioContextInfo contextInfo;
diff --git a/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.idl b/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.idl index f058169..267005a 100644 --- a/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.idl +++ b/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.idl
@@ -15,7 +15,7 @@ [ ActiveScriptWrappable, - DependentLifetime, + DependentLifetime ] interface BaseAudioContext : EventTarget { // All rendered audio ultimately connects to destination, which represents the audio hardware. readonly attribute AudioDestinationNode destination;
diff --git a/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.idl b/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.idl index cc54cef6..7dd75e0 100644 --- a/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.idl +++ b/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.idl
@@ -27,7 +27,7 @@ // For real-time audio stream synthesis/processing in JavaScript [ ActiveScriptWrappable, - DependentLifetime, + DependentLifetime ] interface ScriptProcessorNode : AudioNode { // Rendering callback attribute EventHandler onaudioprocess;
diff --git a/third_party/WebKit/Source/modules/webaudio/WindowAudioWorklet.idl b/third_party/WebKit/Source/modules/webaudio/WindowAudioWorklet.idl index 5ab9930..5351a6d 100644 --- a/third_party/WebKit/Source/modules/webaudio/WindowAudioWorklet.idl +++ b/third_party/WebKit/Source/modules/webaudio/WindowAudioWorklet.idl
@@ -5,7 +5,7 @@ // https://webaudio.github.io/web-audio-api/#AudioWorklet [ - RuntimeEnabled=AudioWorklet, + RuntimeEnabled=AudioWorklet ] partial interface Window { readonly attribute Worklet audioWorklet; };
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLResultSet.idl b/third_party/WebKit/Source/modules/webdatabase/SQLResultSet.idl index dad3f14..84a20be 100644 --- a/third_party/WebKit/Source/modules/webdatabase/SQLResultSet.idl +++ b/third_party/WebKit/Source/modules/webdatabase/SQLResultSet.idl
@@ -28,7 +28,7 @@ // https://www.w3.org/TR/webdatabase/#sqlresultset [ - NoInterfaceObject, + NoInterfaceObject ] interface SQLResultSet { readonly attribute SQLResultSetRowList rows;
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLResultSetRowList.idl b/third_party/WebKit/Source/modules/webdatabase/SQLResultSetRowList.idl index ccc0af3..2f7b32e 100644 --- a/third_party/WebKit/Source/modules/webdatabase/SQLResultSetRowList.idl +++ b/third_party/WebKit/Source/modules/webdatabase/SQLResultSetRowList.idl
@@ -28,7 +28,7 @@ // https://www.w3.org/TR/webdatabase/#sqlresultsetrowlist [ - NoInterfaceObject, + NoInterfaceObject ] interface SQLResultSetRowList { readonly attribute unsigned long length; [RaisesException, CallWith=ScriptState] getter any item(unsigned long index);
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.idl b/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.idl index cbb91d8b..7a085590 100644 --- a/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.idl +++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.idl
@@ -31,7 +31,7 @@ // https://www.w3.org/TR/webdatabase/#sqltransaction [ - NoInterfaceObject, + NoInterfaceObject ] interface SQLTransaction { // The spec defines |arguments| to be an "optional ObjectArray" though it defines the // behavior when null is being passed.
diff --git a/third_party/WebKit/Source/modules/webdatabase/WindowWebDatabase.idl b/third_party/WebKit/Source/modules/webdatabase/WindowWebDatabase.idl index 8e3d762..3018a2c3 100644 --- a/third_party/WebKit/Source/modules/webdatabase/WindowWebDatabase.idl +++ b/third_party/WebKit/Source/modules/webdatabase/WindowWebDatabase.idl
@@ -30,7 +30,7 @@ // https://www.w3.org/TR/webdatabase/#databases [ ImplementedAs=DOMWindowWebDatabase, - RuntimeEnabled=Database, + RuntimeEnabled=Database ] partial interface Window { [MeasureAs=OpenWebDatabase, LogActivity, RaisesException] Database openDatabase(DOMString name, DOMString version, DOMString displayName, unsigned long estimatedSize, optional DatabaseCallback creationCallback); };
diff --git a/third_party/WebKit/Source/modules/webgl/ANGLEInstancedArrays.idl b/third_party/WebKit/Source/modules/webgl/ANGLEInstancedArrays.idl index 684747a..9ae9da73 100644 --- a/third_party/WebKit/Source/modules/webgl/ANGLEInstancedArrays.idl +++ b/third_party/WebKit/Source/modules/webgl/ANGLEInstancedArrays.idl
@@ -33,7 +33,7 @@ [ DependentLifetime, DoNotCheckConstants, - NoInterfaceObject, + NoInterfaceObject ] interface ANGLEInstancedArrays { const unsigned long VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE;
diff --git a/third_party/WebKit/Source/modules/webgl/EXTBlendMinMax.idl b/third_party/WebKit/Source/modules/webgl/EXTBlendMinMax.idl index f395b99..969fab8 100644 --- a/third_party/WebKit/Source/modules/webgl/EXTBlendMinMax.idl +++ b/third_party/WebKit/Source/modules/webgl/EXTBlendMinMax.idl
@@ -7,7 +7,7 @@ [ DependentLifetime, DoNotCheckConstants, - NoInterfaceObject, + NoInterfaceObject ] interface EXTBlendMinMax { const unsigned long MIN_EXT = 0x8007; const unsigned long MAX_EXT = 0x8008;
diff --git a/third_party/WebKit/Source/modules/webgl/EXTColorBufferFloat.idl b/third_party/WebKit/Source/modules/webgl/EXTColorBufferFloat.idl index 80055d5..6fc15a4 100644 --- a/third_party/WebKit/Source/modules/webgl/EXTColorBufferFloat.idl +++ b/third_party/WebKit/Source/modules/webgl/EXTColorBufferFloat.idl
@@ -6,6 +6,6 @@ [ DependentLifetime, - NoInterfaceObject, + NoInterfaceObject ] interface EXTColorBufferFloat { };
diff --git a/third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQuery.idl b/third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQuery.idl index 8e83a68..206e59c 100644 --- a/third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQuery.idl +++ b/third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQuery.idl
@@ -9,7 +9,7 @@ [ DependentLifetime, DoNotCheckConstants, - NoInterfaceObject, + NoInterfaceObject ] interface EXTDisjointTimerQuery { const GLenum QUERY_COUNTER_BITS_EXT = 0x8864; const GLenum CURRENT_QUERY_EXT = 0x8865;
diff --git a/third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQueryWebGL2.idl b/third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQueryWebGL2.idl index 4a22146..56f74069 100644 --- a/third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQueryWebGL2.idl +++ b/third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQueryWebGL2.idl
@@ -9,7 +9,7 @@ [ DependentLifetime, DoNotCheckConstants, - NoInterfaceObject, + NoInterfaceObject ] interface EXTDisjointTimerQueryWebGL2 { const GLenum QUERY_COUNTER_BITS_EXT = 0x8864; const GLenum TIME_ELAPSED_EXT = 0x88BF;
diff --git a/third_party/WebKit/Source/modules/webgl/EXTFragDepth.idl b/third_party/WebKit/Source/modules/webgl/EXTFragDepth.idl index 7f04cb8..571c806 100644 --- a/third_party/WebKit/Source/modules/webgl/EXTFragDepth.idl +++ b/third_party/WebKit/Source/modules/webgl/EXTFragDepth.idl
@@ -27,6 +27,6 @@ [ DependentLifetime, - NoInterfaceObject, + NoInterfaceObject ] interface EXTFragDepth { };
diff --git a/third_party/WebKit/Source/modules/webgl/EXTShaderTextureLOD.idl b/third_party/WebKit/Source/modules/webgl/EXTShaderTextureLOD.idl index 270b8c2..fd3c7425 100644 --- a/third_party/WebKit/Source/modules/webgl/EXTShaderTextureLOD.idl +++ b/third_party/WebKit/Source/modules/webgl/EXTShaderTextureLOD.idl
@@ -6,6 +6,6 @@ [ DependentLifetime, - NoInterfaceObject, + NoInterfaceObject ] interface EXTShaderTextureLOD { };
diff --git a/third_party/WebKit/Source/modules/webgl/EXTTextureFilterAnisotropic.idl b/third_party/WebKit/Source/modules/webgl/EXTTextureFilterAnisotropic.idl index d2e1b48..de22a221 100644 --- a/third_party/WebKit/Source/modules/webgl/EXTTextureFilterAnisotropic.idl +++ b/third_party/WebKit/Source/modules/webgl/EXTTextureFilterAnisotropic.idl
@@ -28,7 +28,7 @@ [ DependentLifetime, NoInterfaceObject, - DoNotCheckConstants, + DoNotCheckConstants ] interface EXTTextureFilterAnisotropic { const unsigned long TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE; const unsigned long MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF;
diff --git a/third_party/WebKit/Source/modules/webgl/EXTsRGB.idl b/third_party/WebKit/Source/modules/webgl/EXTsRGB.idl index 16baa0e..0b447ed 100644 --- a/third_party/WebKit/Source/modules/webgl/EXTsRGB.idl +++ b/third_party/WebKit/Source/modules/webgl/EXTsRGB.idl
@@ -7,7 +7,7 @@ [ DependentLifetime, NoInterfaceObject, - DoNotCheckConstants, + DoNotCheckConstants ] interface EXTsRGB { const unsigned long SRGB_EXT = 0x8C40; const unsigned long SRGB_ALPHA_EXT = 0x8C42;
diff --git a/third_party/WebKit/Source/modules/webgl/OESElementIndexUint.idl b/third_party/WebKit/Source/modules/webgl/OESElementIndexUint.idl index d093373..ce50a63 100644 --- a/third_party/WebKit/Source/modules/webgl/OESElementIndexUint.idl +++ b/third_party/WebKit/Source/modules/webgl/OESElementIndexUint.idl
@@ -27,6 +27,6 @@ [ DependentLifetime, - NoInterfaceObject, + NoInterfaceObject ] interface OESElementIndexUint { };
diff --git a/third_party/WebKit/Source/modules/webgl/OESStandardDerivatives.idl b/third_party/WebKit/Source/modules/webgl/OESStandardDerivatives.idl index e743c5802..a2a7dda 100644 --- a/third_party/WebKit/Source/modules/webgl/OESStandardDerivatives.idl +++ b/third_party/WebKit/Source/modules/webgl/OESStandardDerivatives.idl
@@ -28,7 +28,7 @@ [ DependentLifetime, NoInterfaceObject, - DoNotCheckConstants, + DoNotCheckConstants ] interface OESStandardDerivatives { const unsigned long FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8B8B; };
diff --git a/third_party/WebKit/Source/modules/webgl/OESTextureFloat.idl b/third_party/WebKit/Source/modules/webgl/OESTextureFloat.idl index 4b90a6e..9c54e3d 100644 --- a/third_party/WebKit/Source/modules/webgl/OESTextureFloat.idl +++ b/third_party/WebKit/Source/modules/webgl/OESTextureFloat.idl
@@ -27,6 +27,6 @@ [ DependentLifetime, - NoInterfaceObject, + NoInterfaceObject ] interface OESTextureFloat { };
diff --git a/third_party/WebKit/Source/modules/webgl/OESTextureFloatLinear.idl b/third_party/WebKit/Source/modules/webgl/OESTextureFloatLinear.idl index 2e82d3d..80110e2 100644 --- a/third_party/WebKit/Source/modules/webgl/OESTextureFloatLinear.idl +++ b/third_party/WebKit/Source/modules/webgl/OESTextureFloatLinear.idl
@@ -27,6 +27,6 @@ [ DependentLifetime, - NoInterfaceObject, + NoInterfaceObject ] interface OESTextureFloatLinear { };
diff --git a/third_party/WebKit/Source/modules/webgl/OESTextureHalfFloat.idl b/third_party/WebKit/Source/modules/webgl/OESTextureHalfFloat.idl index 9d283dd..6ed00bb 100644 --- a/third_party/WebKit/Source/modules/webgl/OESTextureHalfFloat.idl +++ b/third_party/WebKit/Source/modules/webgl/OESTextureHalfFloat.idl
@@ -28,7 +28,7 @@ [ DependentLifetime, NoInterfaceObject, - DoNotCheckConstants, + DoNotCheckConstants ] interface OESTextureHalfFloat { const GLenum HALF_FLOAT_OES = 0x8D61; };
diff --git a/third_party/WebKit/Source/modules/webgl/OESTextureHalfFloatLinear.idl b/third_party/WebKit/Source/modules/webgl/OESTextureHalfFloatLinear.idl index 74afac2..c762c525 100644 --- a/third_party/WebKit/Source/modules/webgl/OESTextureHalfFloatLinear.idl +++ b/third_party/WebKit/Source/modules/webgl/OESTextureHalfFloatLinear.idl
@@ -27,6 +27,6 @@ [ DependentLifetime, - NoInterfaceObject, + NoInterfaceObject ] interface OESTextureHalfFloatLinear { };
diff --git a/third_party/WebKit/Source/modules/webgl/OESVertexArrayObject.idl b/third_party/WebKit/Source/modules/webgl/OESVertexArrayObject.idl index dd6a94b9..5de5f89 100644 --- a/third_party/WebKit/Source/modules/webgl/OESVertexArrayObject.idl +++ b/third_party/WebKit/Source/modules/webgl/OESVertexArrayObject.idl
@@ -28,7 +28,7 @@ [ DependentLifetime, DoNotCheckConstants, - NoInterfaceObject, + NoInterfaceObject ] interface OESVertexArrayObject { const unsigned long VERTEX_ARRAY_BINDING_OES = 0x85B5;
diff --git a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContext.idl b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContext.idl index 1b3891f6..7732235e 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContext.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContext.idl
@@ -7,7 +7,7 @@ [ DoNotCheckConstants, Exposed(Worker ExperimentalCanvasFeatures, Window StableBlinkFeatures), - DependentLifetime, + DependentLifetime ] interface WebGL2RenderingContext { }; WebGL2RenderingContext implements WebGLRenderingContextBase; WebGL2RenderingContext implements WebGL2RenderingContextBase;
diff --git a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.idl b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.idl index 5a822d2..0952630 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.idl
@@ -8,7 +8,7 @@ typedef unsigned long long GLuint64; [ - NoInterfaceObject, + NoInterfaceObject ] interface WebGL2RenderingContextBase { const GLenum READ_BUFFER = 0x0C02; const GLenum UNPACK_ROW_LENGTH = 0x0CF2;
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLBuffer.idl b/third_party/WebKit/Source/modules/webgl/WebGLBuffer.idl index 9501e3b..d155504a 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLBuffer.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLBuffer.idl
@@ -26,6 +26,6 @@ // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.4 [ - DependentLifetime, + DependentLifetime ] interface WebGLBuffer { };
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureASTC.idl b/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureASTC.idl index 8bc3b80..943a1ff 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureASTC.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureASTC.idl
@@ -7,7 +7,7 @@ [ DependentLifetime, NoInterfaceObject, - DoNotCheckConstants, + DoNotCheckConstants ] interface WebGLCompressedTextureASTC { /* Compressed Texture Formats */ const unsigned long COMPRESSED_RGBA_ASTC_4x4_KHR = 0x93B0;
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureATC.idl b/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureATC.idl index 7b8f4aab..888d29f 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureATC.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureATC.idl
@@ -28,7 +28,7 @@ [ DependentLifetime, NoInterfaceObject, - DoNotCheckConstants, + DoNotCheckConstants ] interface WebGLCompressedTextureATC { /* Compressed Texture Formats */ const unsigned long COMPRESSED_RGB_ATC_WEBGL = 0x8C92;
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureETC.idl b/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureETC.idl index 032d5d6..eadd961 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureETC.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureETC.idl
@@ -7,7 +7,7 @@ [ DependentLifetime, NoInterfaceObject, - DoNotCheckConstants, + DoNotCheckConstants ] interface WebGLCompressedTextureETC { /* Compressed Texture Format */ const unsigned long COMPRESSED_R11_EAC = 0x9270;
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureETC1.idl b/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureETC1.idl index d8da534..331d47d 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureETC1.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureETC1.idl
@@ -7,7 +7,7 @@ [ DependentLifetime, NoInterfaceObject, - DoNotCheckConstants, + DoNotCheckConstants ] interface WebGLCompressedTextureETC1 { /* Compressed Texture Formats */ const unsigned long COMPRESSED_RGB_ETC1_WEBGL = 0x8D64;
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLCompressedTexturePVRTC.idl b/third_party/WebKit/Source/modules/webgl/WebGLCompressedTexturePVRTC.idl index b832f61..eb7102b 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLCompressedTexturePVRTC.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLCompressedTexturePVRTC.idl
@@ -28,7 +28,7 @@ [ DependentLifetime, NoInterfaceObject, - DoNotCheckConstants, + DoNotCheckConstants ] interface WebGLCompressedTexturePVRTC { /* Compressed Texture Formats */ const unsigned long COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 0x8C00;
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureS3TC.idl b/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureS3TC.idl index 0f69bb7..d79212f 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureS3TC.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureS3TC.idl
@@ -28,7 +28,7 @@ [ DependentLifetime, NoInterfaceObject, - DoNotCheckConstants, + DoNotCheckConstants ] interface WebGLCompressedTextureS3TC { /* Compressed Texture Formats */ const unsigned long COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0;
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureS3TCsRGB.idl b/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureS3TCsRGB.idl index 683efa2..3e7dc7fd 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureS3TCsRGB.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureS3TCsRGB.idl
@@ -7,7 +7,7 @@ [ DependentLifetime, NoInterfaceObject, - DoNotCheckConstants, + DoNotCheckConstants ] interface WebGLCompressedTextureS3TCsRGB { /* Compressed Texture Formats */ const unsigned long COMPRESSED_SRGB_S3TC_DXT1_EXT = 0x8C4C;
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLContextEvent.idl b/third_party/WebKit/Source/modules/webgl/WebGLContextEvent.idl index 99f46df..f08c814 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLContextEvent.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLContextEvent.idl
@@ -26,7 +26,7 @@ // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15 [ - Constructor(DOMString type, optional WebGLContextEventInit eventInit), + Constructor(DOMString type, optional WebGLContextEventInit eventInit) ] interface WebGLContextEvent : Event { readonly attribute DOMString statusMessage; };
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLDebugRendererInfo.idl b/third_party/WebKit/Source/modules/webgl/WebGLDebugRendererInfo.idl index d293806..ba96811 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLDebugRendererInfo.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLDebugRendererInfo.idl
@@ -28,7 +28,7 @@ [ DependentLifetime, NoInterfaceObject, - DoNotCheckConstants, + DoNotCheckConstants ] interface WebGLDebugRendererInfo { const unsigned long UNMASKED_VENDOR_WEBGL = 0x9245; const unsigned long UNMASKED_RENDERER_WEBGL = 0x9246;
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLDebugShaders.idl b/third_party/WebKit/Source/modules/webgl/WebGLDebugShaders.idl index 15bb1595..0003a14 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLDebugShaders.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLDebugShaders.idl
@@ -27,7 +27,7 @@ [ DependentLifetime, - NoInterfaceObject, + NoInterfaceObject ] interface WebGLDebugShaders { DOMString? getTranslatedShaderSource(WebGLShader shader); };
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLDepthTexture.idl b/third_party/WebKit/Source/modules/webgl/WebGLDepthTexture.idl index 6024320..09d1f10 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLDepthTexture.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLDepthTexture.idl
@@ -28,7 +28,7 @@ [ DependentLifetime, NoInterfaceObject, - DoNotCheckConstants, + DoNotCheckConstants ] interface WebGLDepthTexture { const unsigned long UNSIGNED_INT_24_8_WEBGL = 0x84FA; };
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLDrawBuffers.idl b/third_party/WebKit/Source/modules/webgl/WebGLDrawBuffers.idl index 3593f892..c45a880 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLDrawBuffers.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLDrawBuffers.idl
@@ -28,7 +28,7 @@ [ DependentLifetime, NoInterfaceObject, - DoNotCheckConstants, + DoNotCheckConstants ] interface WebGLDrawBuffers { const GLenum COLOR_ATTACHMENT0_WEBGL = 0x8CE0; const GLenum COLOR_ATTACHMENT1_WEBGL = 0x8CE1;
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLFramebuffer.idl b/third_party/WebKit/Source/modules/webgl/WebGLFramebuffer.idl index 17317c16..04cdaaf9 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLFramebuffer.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLFramebuffer.idl
@@ -26,6 +26,6 @@ // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.5 [ - DependentLifetime, + DependentLifetime ] interface WebGLFramebuffer { };
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLGetBufferSubDataAsync.idl b/third_party/WebKit/Source/modules/webgl/WebGLGetBufferSubDataAsync.idl index d9d8ff9..ac54d2dd 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLGetBufferSubDataAsync.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLGetBufferSubDataAsync.idl
@@ -7,7 +7,7 @@ [ DependentLifetime, NoInterfaceObject, - DoNotCheckConstants, + DoNotCheckConstants ] interface WebGLGetBufferSubDataAsync { [CallWith=ScriptState] Promise<ArrayBufferView> getBufferSubDataAsync(GLenum target, GLintptr srcByteOffset, ArrayBufferView dstData, optional GLuint dstOffset = 0, optional GLuint length = 0); };
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLLoseContext.idl b/third_party/WebKit/Source/modules/webgl/WebGLLoseContext.idl index d40fd3b..09b5b375 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLLoseContext.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLLoseContext.idl
@@ -27,7 +27,7 @@ [ DependentLifetime, - NoInterfaceObject, + NoInterfaceObject ] interface WebGLLoseContext { void loseContext(); void restoreContext();
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLProgram.idl b/third_party/WebKit/Source/modules/webgl/WebGLProgram.idl index d0a948e..9d2d714 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLProgram.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLProgram.idl
@@ -26,6 +26,6 @@ // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.6 [ - DependentLifetime, + DependentLifetime ] interface WebGLProgram { };
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLQuery.idl b/third_party/WebKit/Source/modules/webgl/WebGLQuery.idl index 11b9077..90f03ba5 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLQuery.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLQuery.idl
@@ -5,6 +5,6 @@ // https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.2 [ - DependentLifetime, + DependentLifetime ] interface WebGLQuery { };
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderbuffer.idl b/third_party/WebKit/Source/modules/webgl/WebGLRenderbuffer.idl index ed88c88c..9a799f4 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLRenderbuffer.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderbuffer.idl
@@ -26,6 +26,6 @@ // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.7 [ - DependentLifetime, + DependentLifetime ] interface WebGLRenderbuffer { };
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.idl b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.idl index d1f2960..6e3b334 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.idl
@@ -28,6 +28,6 @@ [ DoNotCheckConstants, Exposed(Worker ExperimentalCanvasFeatures, Window StableBlinkFeatures), - DependentLifetime, + DependentLifetime ] interface WebGLRenderingContext { }; WebGLRenderingContext implements WebGLRenderingContextBase;
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.idl b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.idl index 157297bb..fbac5cd 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.idl
@@ -44,7 +44,7 @@ // FIXME: [DoNotCheckConstants] should be applied to members and not need to // be put on implementing interface // DoNotCheckConstants, // need to put on implementing interface - NoInterfaceObject, // Always used on target of 'implements' + NoInterfaceObject // Always used on target of 'implements' ] interface WebGLRenderingContextBase { [ImplementedAs=getHTMLOrOffscreenCanvas] readonly attribute (HTMLCanvasElement or OffscreenCanvas) canvas;
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLSampler.idl b/third_party/WebKit/Source/modules/webgl/WebGLSampler.idl index 92c99ce..4ade7927 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLSampler.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLSampler.idl
@@ -5,6 +5,6 @@ // https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.3 [ - DependentLifetime, + DependentLifetime ] interface WebGLSampler { };
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLShader.idl b/third_party/WebKit/Source/modules/webgl/WebGLShader.idl index 61f1d3a..c40b9392 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLShader.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLShader.idl
@@ -26,6 +26,6 @@ // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.8 [ - DependentLifetime, + DependentLifetime ] interface WebGLShader { };
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLTexture.idl b/third_party/WebKit/Source/modules/webgl/WebGLTexture.idl index 68f6665..6e81df8 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLTexture.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLTexture.idl
@@ -26,7 +26,7 @@ // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.9 [ - DependentLifetime, + DependentLifetime ] interface WebGLTexture { [RuntimeEnabled=ExperimentalCanvasFeatures] readonly attribute unsigned long lastUploadedVideoWidth; [RuntimeEnabled=ExperimentalCanvasFeatures] readonly attribute unsigned long lastUploadedVideoHeight;
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLTimerQueryEXT.idl b/third_party/WebKit/Source/modules/webgl/WebGLTimerQueryEXT.idl index 10229c8..f73eac5 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLTimerQueryEXT.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLTimerQueryEXT.idl
@@ -5,6 +5,6 @@ // https://www.khronos.org/registry/webgl/extensions/EXT_disjoint_timer_query/ [ - NoInterfaceObject, + NoInterfaceObject ] interface WebGLTimerQueryEXT { };
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLTransformFeedback.idl b/third_party/WebKit/Source/modules/webgl/WebGLTransformFeedback.idl index 80ff1c9..7cf7126 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLTransformFeedback.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLTransformFeedback.idl
@@ -5,6 +5,6 @@ // https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.5 [ - DependentLifetime, + DependentLifetime ] interface WebGLTransformFeedback { };
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObject.idl b/third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObject.idl index 0b2e25a..ec3f3ad 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObject.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObject.idl
@@ -5,6 +5,6 @@ // https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.6 [ - DependentLifetime, + DependentLifetime ] interface WebGLVertexArrayObject { };
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectOES.idl b/third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectOES.idl index 1c2777f..fb85de4c 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectOES.idl +++ b/third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectOES.idl
@@ -26,6 +26,6 @@ // https://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/ [ - NoInterfaceObject, + NoInterfaceObject ] interface WebGLVertexArrayObjectOES { };
diff --git a/third_party/WebKit/Source/modules/webmidi/MIDIAccess.idl b/third_party/WebKit/Source/modules/webmidi/MIDIAccess.idl index 5cab713e..0216c517 100644 --- a/third_party/WebKit/Source/modules/webmidi/MIDIAccess.idl +++ b/third_party/WebKit/Source/modules/webmidi/MIDIAccess.idl
@@ -32,7 +32,7 @@ [ ActiveScriptWrappable, - DependentLifetime, + DependentLifetime ] interface MIDIAccess : EventTarget { readonly attribute MIDIInputMap inputs; readonly attribute MIDIOutputMap outputs;
diff --git a/third_party/WebKit/Source/modules/webmidi/MIDIConnectionEvent.idl b/third_party/WebKit/Source/modules/webmidi/MIDIConnectionEvent.idl index ebea324..a63c28926 100644 --- a/third_party/WebKit/Source/modules/webmidi/MIDIConnectionEvent.idl +++ b/third_party/WebKit/Source/modules/webmidi/MIDIConnectionEvent.idl
@@ -31,7 +31,7 @@ // https://webaudio.github.io/web-midi-api/#MIDIConnectionEvent [ - Constructor(DOMString type, optional MIDIConnectionEventInit eventInitDict), + Constructor(DOMString type, optional MIDIConnectionEventInit eventInitDict) ] interface MIDIConnectionEvent : Event { readonly attribute MIDIPort port; };
diff --git a/third_party/WebKit/Source/modules/webmidi/MIDIInput.idl b/third_party/WebKit/Source/modules/webmidi/MIDIInput.idl index e6088d5..51e4d3e 100644 --- a/third_party/WebKit/Source/modules/webmidi/MIDIInput.idl +++ b/third_party/WebKit/Source/modules/webmidi/MIDIInput.idl
@@ -31,7 +31,7 @@ // https://webaudio.github.io/web-midi-api/#MIDIInput [ - DependentLifetime, + DependentLifetime ] interface MIDIInput : MIDIPort { attribute EventHandler onmidimessage; };
diff --git a/third_party/WebKit/Source/modules/webmidi/MIDIOutput.idl b/third_party/WebKit/Source/modules/webmidi/MIDIOutput.idl index 699af30..4289366 100644 --- a/third_party/WebKit/Source/modules/webmidi/MIDIOutput.idl +++ b/third_party/WebKit/Source/modules/webmidi/MIDIOutput.idl
@@ -31,7 +31,7 @@ // https://webaudio.github.io/web-midi-api/#MIDIOutput [ - DependentLifetime, + DependentLifetime ] interface MIDIOutput : MIDIPort { // TODO(toyoshim): implement void clear() [RaisesException] void send(Uint8Array data, optional double timestamp);
diff --git a/third_party/WebKit/Source/modules/webmidi/MIDIPort.idl b/third_party/WebKit/Source/modules/webmidi/MIDIPort.idl index d3523bfb..c0e1fc411 100644 --- a/third_party/WebKit/Source/modules/webmidi/MIDIPort.idl +++ b/third_party/WebKit/Source/modules/webmidi/MIDIPort.idl
@@ -54,7 +54,7 @@ [ ActiveScriptWrappable, - DependentLifetime, + DependentLifetime ] interface MIDIPort : EventTarget { readonly attribute MIDIPortConnectionState connection; readonly attribute DOMString id;
diff --git a/third_party/WebKit/Source/modules/webshare/NavigatorShare.idl b/third_party/WebKit/Source/modules/webshare/NavigatorShare.idl index 27e55b4..764b523d 100644 --- a/third_party/WebKit/Source/modules/webshare/NavigatorShare.idl +++ b/third_party/WebKit/Source/modules/webshare/NavigatorShare.idl
@@ -5,7 +5,7 @@ // https://github.com/WICG/web-share/blob/master/docs/interface.md [ - OriginTrialEnabled=WebShare, + OriginTrialEnabled=WebShare ] partial interface Navigator { [CallWith=ScriptState, MeasureAs=WebShareShare] Promise<void> share(ShareData data);
diff --git a/third_party/WebKit/Source/modules/websockets/CloseEvent.idl b/third_party/WebKit/Source/modules/websockets/CloseEvent.idl index 7371ad94..a9d727d 100644 --- a/third_party/WebKit/Source/modules/websockets/CloseEvent.idl +++ b/third_party/WebKit/Source/modules/websockets/CloseEvent.idl
@@ -32,7 +32,7 @@ [ Constructor(DOMString type, optional CloseEventInit eventInitDict), - Exposed=(Window,Worker), + Exposed=(Window,Worker) ] interface CloseEvent : Event { readonly attribute boolean wasClean; readonly attribute unsigned short code;
diff --git a/third_party/WebKit/Source/modules/websockets/WebSocket.idl b/third_party/WebKit/Source/modules/websockets/WebSocket.idl index 83dd66c9..3a8d9f9 100644 --- a/third_party/WebKit/Source/modules/websockets/WebSocket.idl +++ b/third_party/WebKit/Source/modules/websockets/WebSocket.idl
@@ -40,7 +40,7 @@ DependentLifetime, Exposed=(Window,Worker), ImplementedAs=DOMWebSocket, - RaisesException=Constructor, + RaisesException=Constructor ] interface WebSocket : EventTarget { readonly attribute DOMString url;
diff --git a/third_party/WebKit/Source/modules/webusb/USB.idl b/third_party/WebKit/Source/modules/webusb/USB.idl index 1c7a34f..81f8af54 100644 --- a/third_party/WebKit/Source/modules/webusb/USB.idl +++ b/third_party/WebKit/Source/modules/webusb/USB.idl
@@ -5,7 +5,7 @@ // https://wicg.github.io/webusb/#usb [ - RuntimeEnabled=WebUSB, + RuntimeEnabled=WebUSB ] interface USB : EventTarget { attribute EventHandler onconnect; attribute EventHandler ondisconnect;
diff --git a/third_party/WebKit/Source/modules/webusb/USBAlternateInterface.idl b/third_party/WebKit/Source/modules/webusb/USBAlternateInterface.idl index 61a79baf..d951461 100644 --- a/third_party/WebKit/Source/modules/webusb/USBAlternateInterface.idl +++ b/third_party/WebKit/Source/modules/webusb/USBAlternateInterface.idl
@@ -7,7 +7,7 @@ [ Constructor(USBInterface deviceInterface, octet alternateSetting), RaisesException=Constructor, - RuntimeEnabled=WebUSB, + RuntimeEnabled=WebUSB ] interface USBAlternateInterface { readonly attribute octet alternateSetting; readonly attribute octet interfaceClass;
diff --git a/third_party/WebKit/Source/modules/webusb/USBConfiguration.idl b/third_party/WebKit/Source/modules/webusb/USBConfiguration.idl index 0fe7083..48b7c33 100644 --- a/third_party/WebKit/Source/modules/webusb/USBConfiguration.idl +++ b/third_party/WebKit/Source/modules/webusb/USBConfiguration.idl
@@ -7,7 +7,7 @@ [ Constructor(USBDevice device, octet configurationValue), RaisesException=Constructor, - RuntimeEnabled=WebUSB, + RuntimeEnabled=WebUSB ] interface USBConfiguration { readonly attribute octet configurationValue; readonly attribute DOMString? configurationName;
diff --git a/third_party/WebKit/Source/modules/webusb/USBConnectionEvent.idl b/third_party/WebKit/Source/modules/webusb/USBConnectionEvent.idl index cbc9f81796..b0865a7 100644 --- a/third_party/WebKit/Source/modules/webusb/USBConnectionEvent.idl +++ b/third_party/WebKit/Source/modules/webusb/USBConnectionEvent.idl
@@ -6,7 +6,7 @@ [ Constructor(DOMString type, USBConnectionEventInit eventInitDict), - RuntimeEnabled=WebUSB, + RuntimeEnabled=WebUSB ] interface USBConnectionEvent : Event { [SameObject] readonly attribute USBDevice device; };
diff --git a/third_party/WebKit/Source/modules/webusb/USBDevice.idl b/third_party/WebKit/Source/modules/webusb/USBDevice.idl index 4d5dbe8c..def29e3f 100644 --- a/third_party/WebKit/Source/modules/webusb/USBDevice.idl +++ b/third_party/WebKit/Source/modules/webusb/USBDevice.idl
@@ -13,7 +13,7 @@ // https://wicg.github.io/webusb/#device-usage [ - RuntimeEnabled=WebUSB, + RuntimeEnabled=WebUSB ] interface USBDevice { readonly attribute octet usbVersionMajor; readonly attribute octet usbVersionMinor;
diff --git a/third_party/WebKit/Source/modules/webusb/USBEndpoint.idl b/third_party/WebKit/Source/modules/webusb/USBEndpoint.idl index d991059..07b815bb 100644 --- a/third_party/WebKit/Source/modules/webusb/USBEndpoint.idl +++ b/third_party/WebKit/Source/modules/webusb/USBEndpoint.idl
@@ -18,7 +18,7 @@ [ Constructor(USBAlternateInterface alternate, octet endpointNumber, USBDirection direction), RaisesException=Constructor, - RuntimeEnabled=WebUSB, + RuntimeEnabled=WebUSB ] interface USBEndpoint { readonly attribute octet endpointNumber; readonly attribute USBDirection direction;
diff --git a/third_party/WebKit/Source/modules/webusb/USBInterface.idl b/third_party/WebKit/Source/modules/webusb/USBInterface.idl index 5bce5290..3768cd5 100644 --- a/third_party/WebKit/Source/modules/webusb/USBInterface.idl +++ b/third_party/WebKit/Source/modules/webusb/USBInterface.idl
@@ -7,7 +7,7 @@ [ Constructor(USBConfiguration configuration, octet interfaceNumber), RaisesException=Constructor, - RuntimeEnabled=WebUSB, + RuntimeEnabled=WebUSB ] interface USBInterface { readonly attribute octet interfaceNumber; readonly attribute USBAlternateInterface? alternate;
diff --git a/third_party/WebKit/Source/platform/loader/fetch/FetchUtils.cpp b/third_party/WebKit/Source/platform/loader/fetch/FetchUtils.cpp index 1d0781d..bc306cd 100644 --- a/third_party/WebKit/Source/platform/loader/fetch/FetchUtils.cpp +++ b/third_party/WebKit/Source/platform/loader/fetch/FetchUtils.cpp
@@ -27,8 +27,8 @@ public: bool Has(const String& name) const { return fixed_names_.Contains(name) || - name.StartsWith(proxy_header_prefix_, kTextCaseASCIIInsensitive) || - name.StartsWith(sec_header_prefix_, kTextCaseASCIIInsensitive); + name.StartsWithIgnoringASCIICase(proxy_header_prefix_) || + name.StartsWithIgnoringASCIICase(sec_header_prefix_); } static const ForbiddenHeaderNames& Get();
diff --git a/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp b/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp index 1d1f861b7..0984dc5 100644 --- a/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp +++ b/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp
@@ -105,8 +105,8 @@ } for (size_t i = 0; i < WTF_ARRAY_LENGTH(kHeaderPrefixesToIgnoreAfterRevalidation); i++) { - if (header.StartsWith(kHeaderPrefixesToIgnoreAfterRevalidation[i], - kTextCaseASCIIInsensitive)) + if (header.StartsWithIgnoringASCIICase( + kHeaderPrefixesToIgnoreAfterRevalidation[i])) return false; } return true;
diff --git a/third_party/WebKit/Source/platform/mhtml/MHTMLParser.cpp b/third_party/WebKit/Source/platform/mhtml/MHTMLParser.cpp index 10ba89323..f1e3d25 100644 --- a/third_party/WebKit/Source/platform/mhtml/MHTMLParser.cpp +++ b/third_party/WebKit/Source/platform/mhtml/MHTMLParser.cpp
@@ -60,7 +60,7 @@ static MIMEHeader* ParseHeader(SharedBufferChunkReader* cr_lf_line_reader); bool IsMultipart() const { - return content_type_.StartsWith("multipart/", kTextCaseASCIIInsensitive); + return content_type_.StartsWithIgnoringASCIICase("multipart/"); } String ContentType() const { return content_type_; }
diff --git a/third_party/WebKit/Source/platform/network/mime/MIMETypeRegistry.cpp b/third_party/WebKit/Source/platform/network/mime/MIMETypeRegistry.cpp index bdb38ae..58d4071 100644 --- a/third_party/WebKit/Source/platform/network/mime/MIMETypeRegistry.cpp +++ b/third_party/WebKit/Source/platform/network/mime/MIMETypeRegistry.cpp
@@ -188,12 +188,9 @@ // with the overhead of using a hash set. Any of the MIME types below may be // followed by any number of specific versions of the JVM, which is why we use // startsWith() - return mime_type.StartsWith("application/x-java-applet", - kTextCaseASCIIInsensitive) || - mime_type.StartsWith("application/x-java-bean", - kTextCaseASCIIInsensitive) || - mime_type.StartsWith("application/x-java-vm", - kTextCaseASCIIInsensitive); + return mime_type.StartsWithIgnoringASCIICase("application/x-java-applet") || + mime_type.StartsWithIgnoringASCIICase("application/x-java-bean") || + mime_type.StartsWithIgnoringASCIICase("application/x-java-vm"); } bool MIMETypeRegistry::IsSupportedStyleSheetMIMEType(const String& mime_type) { @@ -202,7 +199,7 @@ bool MIMETypeRegistry::IsSupportedFontMIMEType(const String& mime_type) { static const unsigned kFontLen = 5; - if (!mime_type.StartsWith("font/", kTextCaseASCIIInsensitive)) + if (!mime_type.StartsWithIgnoringASCIICase("font/")) return false; String sub_type = mime_type.Substring(kFontLen).DeprecatedLower(); return sub_type == "woff" || sub_type == "woff2" || sub_type == "otf" ||
diff --git a/third_party/WebKit/Source/platform/wtf/RefVector.h b/third_party/WebKit/Source/platform/wtf/RefVector.h index 40ec976..c7fd805 100644 --- a/third_party/WebKit/Source/platform/wtf/RefVector.h +++ b/third_party/WebKit/Source/platform/wtf/RefVector.h
@@ -5,6 +5,8 @@ #ifndef RefVector_h #define RefVector_h +#include <utility> + #include "platform/wtf/RefCounted.h" #include "platform/wtf/RefPtr.h" #include "platform/wtf/Vector.h" @@ -14,14 +16,14 @@ template <typename T> class RefVector : public RefCounted<RefVector<T>> { public: - static PassRefPtr<RefVector> Create() { return AdoptRef(new RefVector<T>); } - static PassRefPtr<RefVector> Create(const Vector<T>& vector) { + static RefPtr<RefVector> Create() { return AdoptRef(new RefVector<T>); } + static RefPtr<RefVector> Create(const Vector<T>& vector) { return AdoptRef(new RefVector<T>(vector)); } - static PassRefPtr<RefVector> Create(Vector<T>&& vector) { - return AdoptRef(new RefVector<T>(vector)); + static RefPtr<RefVector> Create(Vector<T>&& vector) { + return AdoptRef(new RefVector<T>(std::move(vector))); } - PassRefPtr<RefVector> Copy() { return Create(GetVector()); } + RefPtr<RefVector> Copy() { return Create(GetVector()); } const T& operator[](size_t i) const { return vector_[i]; } T& operator[](size_t i) { return vector_[i]; }
diff --git a/third_party/WebKit/Source/platform/wtf/StdLibExtras.h b/third_party/WebKit/Source/platform/wtf/StdLibExtras.h index 092d2ee6..e30adfd 100644 --- a/third_party/WebKit/Source/platform/wtf/StdLibExtras.h +++ b/third_party/WebKit/Source/platform/wtf/StdLibExtras.h
@@ -185,7 +185,7 @@ // DEFINE_STATIC_LOCAL macro, as this macro does not lead to an extra memory // allocation. #define DEFINE_STATIC_REF(type, name, arguments) \ - static type* name = PassRefPtr<type>(arguments).LeakRef(); + static type* name = RefPtr<type>(arguments).LeakRef(); /* * The reinterpret_cast<Type1*>([pointer to Type2]) expressions - where
diff --git a/third_party/WebKit/Source/platform/wtf/TreeNodeTest.cpp b/third_party/WebKit/Source/platform/wtf/TreeNodeTest.cpp index 058c164..a8c24824c 100644 --- a/third_party/WebKit/Source/platform/wtf/TreeNodeTest.cpp +++ b/third_party/WebKit/Source/platform/wtf/TreeNodeTest.cpp
@@ -25,7 +25,6 @@ #include "platform/wtf/TreeNode.h" -#include "platform/wtf/PassRefPtr.h" #include "platform/wtf/RefCounted.h" #include "platform/wtf/RefPtr.h" #include "testing/gtest/include/gtest/gtest.h" @@ -34,7 +33,7 @@ class TestTree : public RefCounted<TestTree>, public TreeNode<TestTree> { public: - static PassRefPtr<TestTree> Create() { return AdoptRef(new TestTree()); } + static RefPtr<TestTree> Create() { return AdoptRef(new TestTree()); } }; TEST(TreeNodeTest, AppendChild) {
diff --git a/third_party/WebKit/Source/platform/wtf/text/AtomicString.h b/third_party/WebKit/Source/platform/wtf/text/AtomicString.h index ecdb99fe..4e6dffd 100644 --- a/third_party/WebKit/Source/platform/wtf/text/AtomicString.h +++ b/third_party/WebKit/Source/platform/wtf/text/AtomicString.h
@@ -152,6 +152,12 @@ TextCaseSensitivity case_sensitivity = kTextCaseSensitive) const { return string_.StartsWith(prefix, case_sensitivity); } + bool StartsWithIgnoringCase(const StringView& prefix) const { + return string_.StartsWithIgnoringCase(prefix); + } + bool StartsWithIgnoringASCIICase(const StringView& prefix) const { + return string_.StartsWithIgnoringASCIICase(prefix); + } bool StartsWith(UChar character) const { return string_.StartsWith(character); }
diff --git a/third_party/WebKit/Source/platform/wtf/text/WTFString.h b/third_party/WebKit/Source/platform/wtf/text/WTFString.h index 3916624..7280886 100644 --- a/third_party/WebKit/Source/platform/wtf/text/WTFString.h +++ b/third_party/WebKit/Source/platform/wtf/text/WTFString.h
@@ -225,6 +225,13 @@ ? DISPATCH_CASE_OP(case_sensitivity, impl_->StartsWith, (prefix)) : prefix.IsEmpty(); } + bool StartsWithIgnoringCase(const StringView& prefix) const { + return impl_ ? impl_->StartsWithIgnoringCase(prefix) : prefix.IsEmpty(); + } + bool StartsWithIgnoringASCIICase(const StringView& prefix) const { + return impl_ ? impl_->StartsWithIgnoringASCIICase(prefix) + : prefix.IsEmpty(); + } bool StartsWith(UChar character) const { return impl_ ? impl_->StartsWith(character) : false; } @@ -235,6 +242,12 @@ return impl_ ? DISPATCH_CASE_OP(case_sensitivity, impl_->EndsWith, (suffix)) : suffix.IsEmpty(); } + bool EndsWithIgnoringCase(const StringView& prefix) const { + return impl_ ? impl_->EndsWithIgnoringCase(prefix) : prefix.IsEmpty(); + } + bool EndsWithIgnoringASCIICase(const StringView& prefix) const { + return impl_ ? impl_->EndsWithIgnoringASCIICase(prefix) : prefix.IsEmpty(); + } bool EndsWith(UChar character) const { return impl_ ? impl_->EndsWith(character) : false; }
diff --git a/third_party/WebKit/Source/platform/wtf/text/WTFStringTest.cpp b/third_party/WebKit/Source/platform/wtf/text/WTFStringTest.cpp index c1ed457d..d00de30 100644 --- a/third_party/WebKit/Source/platform/wtf/text/WTFStringTest.cpp +++ b/third_party/WebKit/Source/platform/wtf/text/WTFStringTest.cpp
@@ -343,58 +343,45 @@ TEST(StringTest, StartsWithIgnoringUnicodeCase) { // [U+017F U+212A i a] starts with "sk". - EXPECT_TRUE(String::FromUTF8("\xC5\xBF\xE2\x84\xAAia") - .StartsWith("sk", kTextCaseUnicodeInsensitive)); + EXPECT_TRUE( + String::FromUTF8("\xC5\xBF\xE2\x84\xAAia").StartsWithIgnoringCase("sk")); } TEST(StringTest, StartsWithIgnoringASCIICase) { String all_ascii("LINK"); String all_ascii_lower_case("link"); - EXPECT_TRUE( - all_ascii.StartsWith(all_ascii_lower_case, kTextCaseASCIIInsensitive)); + EXPECT_TRUE(all_ascii.StartsWithIgnoringASCIICase(all_ascii_lower_case)); String all_ascii_mixed_case("lInK"); - EXPECT_TRUE( - all_ascii.StartsWith(all_ascii_mixed_case, kTextCaseASCIIInsensitive)); + EXPECT_TRUE(all_ascii.StartsWithIgnoringASCIICase(all_ascii_mixed_case)); String all_ascii_different("foo"); - EXPECT_FALSE( - all_ascii.StartsWith(all_ascii_different, kTextCaseASCIIInsensitive)); + EXPECT_FALSE(all_ascii.StartsWithIgnoringASCIICase(all_ascii_different)); String non_ascii = String::FromUTF8("LIN\xE2\x84\xAA"); - EXPECT_FALSE(all_ascii.StartsWith(non_ascii, kTextCaseASCIIInsensitive)); - EXPECT_TRUE(all_ascii.StartsWith(non_ascii.DeprecatedLower(), - kTextCaseASCIIInsensitive)); + EXPECT_FALSE(all_ascii.StartsWithIgnoringASCIICase(non_ascii)); + EXPECT_TRUE( + all_ascii.StartsWithIgnoringASCIICase(non_ascii.DeprecatedLower())); - EXPECT_FALSE(non_ascii.StartsWith(all_ascii, kTextCaseASCIIInsensitive)); - EXPECT_FALSE( - non_ascii.StartsWith(all_ascii_lower_case, kTextCaseASCIIInsensitive)); - EXPECT_FALSE( - non_ascii.StartsWith(all_ascii_mixed_case, kTextCaseASCIIInsensitive)); - EXPECT_FALSE( - non_ascii.StartsWith(all_ascii_different, kTextCaseASCIIInsensitive)); + EXPECT_FALSE(non_ascii.StartsWithIgnoringASCIICase(all_ascii)); + EXPECT_FALSE(non_ascii.StartsWithIgnoringASCIICase(all_ascii_lower_case)); + EXPECT_FALSE(non_ascii.StartsWithIgnoringASCIICase(all_ascii_mixed_case)); + EXPECT_FALSE(non_ascii.StartsWithIgnoringASCIICase(all_ascii_different)); } TEST(StringTest, EndsWithIgnoringASCIICase) { String all_ascii("LINK"); String all_ascii_lower_case("link"); - EXPECT_TRUE( - all_ascii.EndsWith(all_ascii_lower_case, kTextCaseASCIIInsensitive)); + EXPECT_TRUE(all_ascii.EndsWithIgnoringASCIICase(all_ascii_lower_case)); String all_ascii_mixed_case("lInK"); - EXPECT_TRUE( - all_ascii.EndsWith(all_ascii_mixed_case, kTextCaseASCIIInsensitive)); + EXPECT_TRUE(all_ascii.EndsWithIgnoringASCIICase(all_ascii_mixed_case)); String all_ascii_different("foo"); - EXPECT_FALSE( - all_ascii.EndsWith(all_ascii_different, kTextCaseASCIIInsensitive)); + EXPECT_FALSE(all_ascii.EndsWithIgnoringASCIICase(all_ascii_different)); String non_ascii = String::FromUTF8("LIN\xE2\x84\xAA"); - EXPECT_FALSE(all_ascii.EndsWith(non_ascii, kTextCaseASCIIInsensitive)); - EXPECT_TRUE(all_ascii.EndsWith(non_ascii.DeprecatedLower(), - kTextCaseASCIIInsensitive)); + EXPECT_FALSE(all_ascii.EndsWithIgnoringASCIICase(non_ascii)); + EXPECT_TRUE(all_ascii.EndsWithIgnoringASCIICase(non_ascii.DeprecatedLower())); - EXPECT_FALSE(non_ascii.EndsWith(all_ascii, kTextCaseASCIIInsensitive)); - EXPECT_FALSE( - non_ascii.EndsWith(all_ascii_lower_case, kTextCaseASCIIInsensitive)); - EXPECT_FALSE( - non_ascii.EndsWith(all_ascii_mixed_case, kTextCaseASCIIInsensitive)); - EXPECT_FALSE( - non_ascii.EndsWith(all_ascii_different, kTextCaseASCIIInsensitive)); + EXPECT_FALSE(non_ascii.EndsWithIgnoringASCIICase(all_ascii)); + EXPECT_FALSE(non_ascii.EndsWithIgnoringASCIICase(all_ascii_lower_case)); + EXPECT_FALSE(non_ascii.EndsWithIgnoringASCIICase(all_ascii_mixed_case)); + EXPECT_FALSE(non_ascii.EndsWithIgnoringASCIICase(all_ascii_different)); } TEST(StringTest, EqualIgnoringASCIICase) {
diff --git a/third_party/WebKit/Source/web/AssertMatchingEnums.cpp b/third_party/WebKit/Source/web/AssertMatchingEnums.cpp index b30c167..5fba494 100644 --- a/third_party/WebKit/Source/web/AssertMatchingEnums.cpp +++ b/third_party/WebKit/Source/web/AssertMatchingEnums.cpp
@@ -32,15 +32,11 @@ // matching blink defined enum values. #include "bindings/core/v8/serialization/SerializedScriptValue.h" -#include "core/dom/AXObjectCache.h" #include "core/dom/IconURL.h" #include "core/editing/SelectionType.h" -#include "core/editing/TextAffinity.h" -#include "core/editing/markers/DocumentMarker.h" #if OS(MACOSX) #include "core/events/WheelEvent.h" #endif -#include "core/dom/AXObject.h" #include "core/fileapi/FileError.h" #include "core/frame/Frame.h" #include "core/frame/FrameTypes.h" @@ -114,8 +110,6 @@ #include "public/platform/modules/indexeddb/WebIDBKeyPath.h" #include "public/platform/modules/indexeddb/WebIDBMetadata.h" #include "public/platform/modules/indexeddb/WebIDBTypes.h" -#include "public/web/WebAXEnums.h" -#include "public/web/WebAXObject.h" #include "public/web/WebClientRedirectPolicy.h" #include "public/web/WebConsoleMessage.h" #include "public/web/WebFrameClient.h" @@ -143,303 +137,6 @@ static_assert(static_cast<int>(a) == static_cast<int>(b), \ "mismatching enum: " #a) -STATIC_ASSERT_ENUM(kWebAXEventActiveDescendantChanged, - AXObjectCache::kAXActiveDescendantChanged); -STATIC_ASSERT_ENUM(kWebAXEventAlert, AXObjectCache::kAXAlert); -STATIC_ASSERT_ENUM(kWebAXEventAriaAttributeChanged, - AXObjectCache::kAXAriaAttributeChanged); -STATIC_ASSERT_ENUM(kWebAXEventAutocorrectionOccured, - AXObjectCache::kAXAutocorrectionOccured); -STATIC_ASSERT_ENUM(kWebAXEventBlur, AXObjectCache::kAXBlur); -STATIC_ASSERT_ENUM(kWebAXEventCheckedStateChanged, - AXObjectCache::kAXCheckedStateChanged); -STATIC_ASSERT_ENUM(kWebAXEventChildrenChanged, - AXObjectCache::kAXChildrenChanged); -STATIC_ASSERT_ENUM(kWebAXEventClicked, AXObjectCache::kAXClicked); -STATIC_ASSERT_ENUM(kWebAXEventDocumentSelectionChanged, - AXObjectCache::kAXDocumentSelectionChanged); -STATIC_ASSERT_ENUM(kWebAXEventExpandedChanged, - AXObjectCache::kAXExpandedChanged); -STATIC_ASSERT_ENUM(kWebAXEventFocus, AXObjectCache::kAXFocusedUIElementChanged); -STATIC_ASSERT_ENUM(kWebAXEventHide, AXObjectCache::kAXHide); -STATIC_ASSERT_ENUM(kWebAXEventHover, AXObjectCache::kAXHover); -STATIC_ASSERT_ENUM(kWebAXEventInvalidStatusChanged, - AXObjectCache::kAXInvalidStatusChanged); -STATIC_ASSERT_ENUM(kWebAXEventLayoutComplete, AXObjectCache::kAXLayoutComplete); -STATIC_ASSERT_ENUM(kWebAXEventLiveRegionChanged, - AXObjectCache::kAXLiveRegionChanged); -STATIC_ASSERT_ENUM(kWebAXEventLoadComplete, AXObjectCache::kAXLoadComplete); -STATIC_ASSERT_ENUM(kWebAXEventLocationChanged, - AXObjectCache::kAXLocationChanged); -STATIC_ASSERT_ENUM(kWebAXEventMenuListItemSelected, - AXObjectCache::kAXMenuListItemSelected); -STATIC_ASSERT_ENUM(kWebAXEventMenuListItemUnselected, - AXObjectCache::kAXMenuListItemUnselected); -STATIC_ASSERT_ENUM(kWebAXEventMenuListValueChanged, - AXObjectCache::kAXMenuListValueChanged); -STATIC_ASSERT_ENUM(kWebAXEventRowCollapsed, AXObjectCache::kAXRowCollapsed); -STATIC_ASSERT_ENUM(kWebAXEventRowCountChanged, - AXObjectCache::kAXRowCountChanged); -STATIC_ASSERT_ENUM(kWebAXEventRowExpanded, AXObjectCache::kAXRowExpanded); -STATIC_ASSERT_ENUM(kWebAXEventScrollPositionChanged, - AXObjectCache::kAXScrollPositionChanged); -STATIC_ASSERT_ENUM(kWebAXEventScrolledToAnchor, - AXObjectCache::kAXScrolledToAnchor); -STATIC_ASSERT_ENUM(kWebAXEventSelectedChildrenChanged, - AXObjectCache::kAXSelectedChildrenChanged); -STATIC_ASSERT_ENUM(kWebAXEventSelectedTextChanged, - AXObjectCache::kAXSelectedTextChanged); -STATIC_ASSERT_ENUM(kWebAXEventShow, AXObjectCache::kAXShow); -STATIC_ASSERT_ENUM(kWebAXEventTextChanged, AXObjectCache::kAXTextChanged); -STATIC_ASSERT_ENUM(kWebAXEventTextInserted, AXObjectCache::kAXTextInserted); -STATIC_ASSERT_ENUM(kWebAXEventTextRemoved, AXObjectCache::kAXTextRemoved); -STATIC_ASSERT_ENUM(kWebAXEventValueChanged, AXObjectCache::kAXValueChanged); - -STATIC_ASSERT_ENUM(kWebAXRoleAbbr, kAbbrRole); -STATIC_ASSERT_ENUM(kWebAXRoleAlertDialog, kAlertDialogRole); -STATIC_ASSERT_ENUM(kWebAXRoleAlert, kAlertRole); -STATIC_ASSERT_ENUM(kWebAXRoleAnchor, kAnchorRole); -STATIC_ASSERT_ENUM(kWebAXRoleAnnotation, kAnnotationRole); -STATIC_ASSERT_ENUM(kWebAXRoleApplication, kApplicationRole); -STATIC_ASSERT_ENUM(kWebAXRoleArticle, kArticleRole); -STATIC_ASSERT_ENUM(kWebAXRoleAudio, kAudioRole); -STATIC_ASSERT_ENUM(kWebAXRoleBanner, kBannerRole); -STATIC_ASSERT_ENUM(kWebAXRoleBlockquote, kBlockquoteRole); -STATIC_ASSERT_ENUM(kWebAXRoleBusyIndicator, kBusyIndicatorRole); -STATIC_ASSERT_ENUM(kWebAXRoleButton, kButtonRole); -STATIC_ASSERT_ENUM(kWebAXRoleCanvas, kCanvasRole); -STATIC_ASSERT_ENUM(kWebAXRoleCaption, kCaptionRole); -STATIC_ASSERT_ENUM(kWebAXRoleCell, kCellRole); -STATIC_ASSERT_ENUM(kWebAXRoleCheckBox, kCheckBoxRole); -STATIC_ASSERT_ENUM(kWebAXRoleColorWell, kColorWellRole); -STATIC_ASSERT_ENUM(kWebAXRoleColumnHeader, kColumnHeaderRole); -STATIC_ASSERT_ENUM(kWebAXRoleColumn, kColumnRole); -STATIC_ASSERT_ENUM(kWebAXRoleComboBox, kComboBoxRole); -STATIC_ASSERT_ENUM(kWebAXRoleComplementary, kComplementaryRole); -STATIC_ASSERT_ENUM(kWebAXRoleContentInfo, kContentInfoRole); -STATIC_ASSERT_ENUM(kWebAXRoleDate, kDateRole); -STATIC_ASSERT_ENUM(kWebAXRoleDateTime, kDateTimeRole); -STATIC_ASSERT_ENUM(kWebAXRoleDefinition, kDefinitionRole); -STATIC_ASSERT_ENUM(kWebAXRoleDescriptionListDetail, kDescriptionListDetailRole); -STATIC_ASSERT_ENUM(kWebAXRoleDescriptionList, kDescriptionListRole); -STATIC_ASSERT_ENUM(kWebAXRoleDescriptionListTerm, kDescriptionListTermRole); -STATIC_ASSERT_ENUM(kWebAXRoleDetails, kDetailsRole); -STATIC_ASSERT_ENUM(kWebAXRoleDialog, kDialogRole); -STATIC_ASSERT_ENUM(kWebAXRoleDirectory, kDirectoryRole); -STATIC_ASSERT_ENUM(kWebAXRoleDisclosureTriangle, kDisclosureTriangleRole); -STATIC_ASSERT_ENUM(kWebAXRoleDocument, kDocumentRole); -STATIC_ASSERT_ENUM(kWebAXRoleEmbeddedObject, kEmbeddedObjectRole); -STATIC_ASSERT_ENUM(kWebAXRoleFeed, kFeedRole); -STATIC_ASSERT_ENUM(kWebAXRoleFigcaption, kFigcaptionRole); -STATIC_ASSERT_ENUM(kWebAXRoleFigure, kFigureRole); -STATIC_ASSERT_ENUM(kWebAXRoleFooter, kFooterRole); -STATIC_ASSERT_ENUM(kWebAXRoleForm, kFormRole); -STATIC_ASSERT_ENUM(kWebAXRoleGenericContainer, kGenericContainerRole); -STATIC_ASSERT_ENUM(kWebAXRoleGrid, kGridRole); -STATIC_ASSERT_ENUM(kWebAXRoleGroup, kGroupRole); -STATIC_ASSERT_ENUM(kWebAXRoleHeading, kHeadingRole); -STATIC_ASSERT_ENUM(kWebAXRoleIframe, kIframeRole); -STATIC_ASSERT_ENUM(kWebAXRoleIframePresentational, kIframePresentationalRole); -STATIC_ASSERT_ENUM(kWebAXRoleIgnored, kIgnoredRole); -STATIC_ASSERT_ENUM(kWebAXRoleImageMapLink, kImageMapLinkRole); -STATIC_ASSERT_ENUM(kWebAXRoleImageMap, kImageMapRole); -STATIC_ASSERT_ENUM(kWebAXRoleImage, kImageRole); -STATIC_ASSERT_ENUM(kWebAXRoleInlineTextBox, kInlineTextBoxRole); -STATIC_ASSERT_ENUM(kWebAXRoleInputTime, kInputTimeRole); -STATIC_ASSERT_ENUM(kWebAXRoleLabel, kLabelRole); -STATIC_ASSERT_ENUM(kWebAXRoleLegend, kLegendRole); -STATIC_ASSERT_ENUM(kWebAXRoleLineBreak, kLineBreakRole); -STATIC_ASSERT_ENUM(kWebAXRoleLink, kLinkRole); -STATIC_ASSERT_ENUM(kWebAXRoleListBoxOption, kListBoxOptionRole); -STATIC_ASSERT_ENUM(kWebAXRoleListBox, kListBoxRole); -STATIC_ASSERT_ENUM(kWebAXRoleListItem, kListItemRole); -STATIC_ASSERT_ENUM(kWebAXRoleListMarker, kListMarkerRole); -STATIC_ASSERT_ENUM(kWebAXRoleList, kListRole); -STATIC_ASSERT_ENUM(kWebAXRoleLog, kLogRole); -STATIC_ASSERT_ENUM(kWebAXRoleMain, kMainRole); -STATIC_ASSERT_ENUM(kWebAXRoleMark, kMarkRole); -STATIC_ASSERT_ENUM(kWebAXRoleMarquee, kMarqueeRole); -STATIC_ASSERT_ENUM(kWebAXRoleMath, kMathRole); -STATIC_ASSERT_ENUM(kWebAXRoleMenuBar, kMenuBarRole); -STATIC_ASSERT_ENUM(kWebAXRoleMenuButton, kMenuButtonRole); -STATIC_ASSERT_ENUM(kWebAXRoleMenuItem, kMenuItemRole); -STATIC_ASSERT_ENUM(kWebAXRoleMenuItemCheckBox, kMenuItemCheckBoxRole); -STATIC_ASSERT_ENUM(kWebAXRoleMenuItemRadio, kMenuItemRadioRole); -STATIC_ASSERT_ENUM(kWebAXRoleMenuListOption, kMenuListOptionRole); -STATIC_ASSERT_ENUM(kWebAXRoleMenuListPopup, kMenuListPopupRole); -STATIC_ASSERT_ENUM(kWebAXRoleMenu, kMenuRole); -STATIC_ASSERT_ENUM(kWebAXRoleMeter, kMeterRole); -STATIC_ASSERT_ENUM(kWebAXRoleNavigation, kNavigationRole); -STATIC_ASSERT_ENUM(kWebAXRoleNone, kNoneRole); -STATIC_ASSERT_ENUM(kWebAXRoleNote, kNoteRole); -STATIC_ASSERT_ENUM(kWebAXRoleOutline, kOutlineRole); -STATIC_ASSERT_ENUM(kWebAXRoleParagraph, kParagraphRole); -STATIC_ASSERT_ENUM(kWebAXRolePopUpButton, kPopUpButtonRole); -STATIC_ASSERT_ENUM(kWebAXRolePre, kPreRole); -STATIC_ASSERT_ENUM(kWebAXRolePresentational, kPresentationalRole); -STATIC_ASSERT_ENUM(kWebAXRoleProgressIndicator, kProgressIndicatorRole); -STATIC_ASSERT_ENUM(kWebAXRoleRadioButton, kRadioButtonRole); -STATIC_ASSERT_ENUM(kWebAXRoleRadioGroup, kRadioGroupRole); -STATIC_ASSERT_ENUM(kWebAXRoleRegion, kRegionRole); -STATIC_ASSERT_ENUM(kWebAXRoleRootWebArea, kRootWebAreaRole); -STATIC_ASSERT_ENUM(kWebAXRoleRowHeader, kRowHeaderRole); -STATIC_ASSERT_ENUM(kWebAXRoleRow, kRowRole); -STATIC_ASSERT_ENUM(kWebAXRoleRuby, kRubyRole); -STATIC_ASSERT_ENUM(kWebAXRoleRuler, kRulerRole); -STATIC_ASSERT_ENUM(kWebAXRoleSVGRoot, kSVGRootRole); -STATIC_ASSERT_ENUM(kWebAXRoleScrollArea, kScrollAreaRole); -STATIC_ASSERT_ENUM(kWebAXRoleScrollBar, kScrollBarRole); -STATIC_ASSERT_ENUM(kWebAXRoleSeamlessWebArea, kSeamlessWebAreaRole); -STATIC_ASSERT_ENUM(kWebAXRoleSearch, kSearchRole); -STATIC_ASSERT_ENUM(kWebAXRoleSearchBox, kSearchBoxRole); -STATIC_ASSERT_ENUM(kWebAXRoleSlider, kSliderRole); -STATIC_ASSERT_ENUM(kWebAXRoleSliderThumb, kSliderThumbRole); -STATIC_ASSERT_ENUM(kWebAXRoleSpinButtonPart, kSpinButtonPartRole); -STATIC_ASSERT_ENUM(kWebAXRoleSpinButton, kSpinButtonRole); -STATIC_ASSERT_ENUM(kWebAXRoleSplitter, kSplitterRole); -STATIC_ASSERT_ENUM(kWebAXRoleStaticText, kStaticTextRole); -STATIC_ASSERT_ENUM(kWebAXRoleStatus, kStatusRole); -STATIC_ASSERT_ENUM(kWebAXRoleSwitch, kSwitchRole); -STATIC_ASSERT_ENUM(kWebAXRoleTabGroup, kTabGroupRole); -STATIC_ASSERT_ENUM(kWebAXRoleTabList, kTabListRole); -STATIC_ASSERT_ENUM(kWebAXRoleTabPanel, kTabPanelRole); -STATIC_ASSERT_ENUM(kWebAXRoleTab, kTabRole); -STATIC_ASSERT_ENUM(kWebAXRoleTableHeaderContainer, kTableHeaderContainerRole); -STATIC_ASSERT_ENUM(kWebAXRoleTable, kTableRole); -STATIC_ASSERT_ENUM(kWebAXRoleTerm, kTermRole); -STATIC_ASSERT_ENUM(kWebAXRoleTextField, kTextFieldRole); -STATIC_ASSERT_ENUM(kWebAXRoleTime, kTimeRole); -STATIC_ASSERT_ENUM(kWebAXRoleTimer, kTimerRole); -STATIC_ASSERT_ENUM(kWebAXRoleToggleButton, kToggleButtonRole); -STATIC_ASSERT_ENUM(kWebAXRoleToolbar, kToolbarRole); -STATIC_ASSERT_ENUM(kWebAXRoleTreeGrid, kTreeGridRole); -STATIC_ASSERT_ENUM(kWebAXRoleTreeItem, kTreeItemRole); -STATIC_ASSERT_ENUM(kWebAXRoleTree, kTreeRole); -STATIC_ASSERT_ENUM(kWebAXRoleUnknown, kUnknownRole); -STATIC_ASSERT_ENUM(kWebAXRoleUserInterfaceTooltip, kUserInterfaceTooltipRole); -STATIC_ASSERT_ENUM(kWebAXRoleVideo, kVideoRole); -STATIC_ASSERT_ENUM(kWebAXRoleWebArea, kWebAreaRole); -STATIC_ASSERT_ENUM(kWebAXRoleWindow, kWindowRole); - -STATIC_ASSERT_ENUM(kWebAXStateBusy, kAXBusyState); -STATIC_ASSERT_ENUM(kWebAXStateEnabled, kAXEnabledState); -STATIC_ASSERT_ENUM(kWebAXStateExpanded, kAXExpandedState); -STATIC_ASSERT_ENUM(kWebAXStateFocusable, kAXFocusableState); -STATIC_ASSERT_ENUM(kWebAXStateFocused, kAXFocusedState); -STATIC_ASSERT_ENUM(kWebAXStateHaspopup, kAXHaspopupState); -STATIC_ASSERT_ENUM(kWebAXStateHovered, kAXHoveredState); -STATIC_ASSERT_ENUM(kWebAXStateInvisible, kAXInvisibleState); -STATIC_ASSERT_ENUM(kWebAXStateLinked, kAXLinkedState); -STATIC_ASSERT_ENUM(kWebAXStateMultiline, kAXMultilineState); -STATIC_ASSERT_ENUM(kWebAXStateMultiselectable, kAXMultiselectableState); -STATIC_ASSERT_ENUM(kWebAXStateOffscreen, kAXOffscreenState); -STATIC_ASSERT_ENUM(kWebAXStateProtected, kAXProtectedState); -STATIC_ASSERT_ENUM(kWebAXStateReadonly, kAXReadonlyState); -STATIC_ASSERT_ENUM(kWebAXStateRequired, kAXRequiredState); -STATIC_ASSERT_ENUM(kWebAXStateSelectable, kAXSelectableState); -STATIC_ASSERT_ENUM(kWebAXStateSelected, kAXSelectedState); -STATIC_ASSERT_ENUM(kWebAXStateVertical, kAXVerticalState); -STATIC_ASSERT_ENUM(kWebAXStateVisited, kAXVisitedState); - -STATIC_ASSERT_ENUM(WebAXDefaultActionVerb::kNone, AXDefaultActionVerb::kNone); -STATIC_ASSERT_ENUM(WebAXDefaultActionVerb::kActivate, - AXDefaultActionVerb::kActivate); -STATIC_ASSERT_ENUM(WebAXDefaultActionVerb::kCheck, AXDefaultActionVerb::kCheck); -STATIC_ASSERT_ENUM(WebAXDefaultActionVerb::kClick, AXDefaultActionVerb::kClick); -STATIC_ASSERT_ENUM(WebAXDefaultActionVerb::kJump, AXDefaultActionVerb::kJump); -STATIC_ASSERT_ENUM(WebAXDefaultActionVerb::kOpen, AXDefaultActionVerb::kOpen); -STATIC_ASSERT_ENUM(WebAXDefaultActionVerb::kPress, AXDefaultActionVerb::kPress); -STATIC_ASSERT_ENUM(WebAXDefaultActionVerb::kSelect, - AXDefaultActionVerb::kSelect); -STATIC_ASSERT_ENUM(WebAXDefaultActionVerb::kUncheck, - AXDefaultActionVerb::kUncheck); - -STATIC_ASSERT_ENUM(kWebAXTextDirectionLR, kAccessibilityTextDirectionLTR); -STATIC_ASSERT_ENUM(kWebAXTextDirectionRL, kAccessibilityTextDirectionRTL); -STATIC_ASSERT_ENUM(kWebAXTextDirectionTB, kAccessibilityTextDirectionTTB); -STATIC_ASSERT_ENUM(kWebAXTextDirectionBT, kAccessibilityTextDirectionBTT); - -STATIC_ASSERT_ENUM(kWebAXSortDirectionUndefined, kSortDirectionUndefined); -STATIC_ASSERT_ENUM(kWebAXSortDirectionNone, kSortDirectionNone); -STATIC_ASSERT_ENUM(kWebAXSortDirectionAscending, kSortDirectionAscending); -STATIC_ASSERT_ENUM(kWebAXSortDirectionDescending, kSortDirectionDescending); -STATIC_ASSERT_ENUM(kWebAXSortDirectionOther, kSortDirectionOther); - -STATIC_ASSERT_ENUM(kWebAXExpandedUndefined, kExpandedUndefined); -STATIC_ASSERT_ENUM(kWebAXExpandedCollapsed, kExpandedCollapsed); -STATIC_ASSERT_ENUM(kWebAXExpandedExpanded, kExpandedExpanded); - -STATIC_ASSERT_ENUM(kWebAXOrientationUndefined, - kAccessibilityOrientationUndefined); -STATIC_ASSERT_ENUM(kWebAXOrientationVertical, - kAccessibilityOrientationVertical); -STATIC_ASSERT_ENUM(kWebAXOrientationHorizontal, - kAccessibilityOrientationHorizontal); - -STATIC_ASSERT_ENUM(kWebAXAriaCurrentStateUndefined, kAriaCurrentStateUndefined); -STATIC_ASSERT_ENUM(kWebAXAriaCurrentStateFalse, kAriaCurrentStateFalse); -STATIC_ASSERT_ENUM(kWebAXAriaCurrentStateTrue, kAriaCurrentStateTrue); -STATIC_ASSERT_ENUM(kWebAXAriaCurrentStatePage, kAriaCurrentStatePage); -STATIC_ASSERT_ENUM(kWebAXAriaCurrentStateStep, kAriaCurrentStateStep); -STATIC_ASSERT_ENUM(kWebAXAriaCurrentStateLocation, kAriaCurrentStateLocation); -STATIC_ASSERT_ENUM(kWebAXAriaCurrentStateDate, kAriaCurrentStateDate); -STATIC_ASSERT_ENUM(kWebAXAriaCurrentStateTime, kAriaCurrentStateTime); - -STATIC_ASSERT_ENUM(kWebAXInvalidStateUndefined, kInvalidStateUndefined); -STATIC_ASSERT_ENUM(kWebAXInvalidStateFalse, kInvalidStateFalse); -STATIC_ASSERT_ENUM(kWebAXInvalidStateTrue, kInvalidStateTrue); -STATIC_ASSERT_ENUM(kWebAXInvalidStateSpelling, kInvalidStateSpelling); -STATIC_ASSERT_ENUM(kWebAXInvalidStateGrammar, kInvalidStateGrammar); -STATIC_ASSERT_ENUM(kWebAXInvalidStateOther, kInvalidStateOther); - -STATIC_ASSERT_ENUM(kWebAXMarkerTypeSpelling, DocumentMarker::kSpelling); -STATIC_ASSERT_ENUM(kWebAXMarkerTypeGrammar, DocumentMarker::kGrammar); -STATIC_ASSERT_ENUM(kWebAXMarkerTypeTextMatch, DocumentMarker::kTextMatch); -STATIC_ASSERT_ENUM(kWebAXMarkerTypeActiveSuggestion, - DocumentMarker::kActiveSuggestion); - -STATIC_ASSERT_ENUM(kWebAXTextStyleNone, kTextStyleNone); -STATIC_ASSERT_ENUM(kWebAXTextStyleBold, kTextStyleBold); -STATIC_ASSERT_ENUM(kWebAXTextStyleItalic, kTextStyleItalic); -STATIC_ASSERT_ENUM(kWebAXTextStyleUnderline, kTextStyleUnderline); -STATIC_ASSERT_ENUM(kWebAXTextStyleLineThrough, kTextStyleLineThrough); - -STATIC_ASSERT_ENUM(kWebAXNameFromUninitialized, kAXNameFromUninitialized); -STATIC_ASSERT_ENUM(kWebAXNameFromAttribute, kAXNameFromAttribute); -STATIC_ASSERT_ENUM(kWebAXNameFromAttributeExplicitlyEmpty, - kAXNameFromAttributeExplicitlyEmpty); -STATIC_ASSERT_ENUM(kWebAXNameFromCaption, kAXNameFromCaption); -STATIC_ASSERT_ENUM(kWebAXNameFromContents, kAXNameFromContents); -STATIC_ASSERT_ENUM(kWebAXNameFromPlaceholder, kAXNameFromPlaceholder); -STATIC_ASSERT_ENUM(kWebAXNameFromRelatedElement, kAXNameFromRelatedElement); -STATIC_ASSERT_ENUM(kWebAXNameFromValue, kAXNameFromValue); -STATIC_ASSERT_ENUM(kWebAXNameFromTitle, kAXNameFromTitle); - -STATIC_ASSERT_ENUM(kWebAXDescriptionFromUninitialized, - kAXDescriptionFromUninitialized); -STATIC_ASSERT_ENUM(kWebAXDescriptionFromAttribute, kAXDescriptionFromAttribute); -STATIC_ASSERT_ENUM(kWebAXDescriptionFromContents, kAXDescriptionFromContents); -STATIC_ASSERT_ENUM(kWebAXDescriptionFromRelatedElement, - kAXDescriptionFromRelatedElement); - -STATIC_ASSERT_ENUM(kWebAXTextAffinityUpstream, TextAffinity::kUpstream); -STATIC_ASSERT_ENUM(kWebAXTextAffinityDownstream, TextAffinity::kDownstream); - -STATIC_ASSERT_ENUM(WebAXStringAttribute::kAriaKeyShortcuts, - AXStringAttribute::kAriaKeyShortcuts); -STATIC_ASSERT_ENUM(WebAXStringAttribute::kAriaRoleDescription, - AXStringAttribute::kAriaRoleDescription); -STATIC_ASSERT_ENUM(WebAXObjectAttribute::kAriaActiveDescendant, - AXObjectAttribute::kAriaActiveDescendant); -STATIC_ASSERT_ENUM(WebAXObjectAttribute::kAriaErrorMessage, - AXObjectAttribute::kAriaErrorMessage); -STATIC_ASSERT_ENUM(WebAXObjectVectorAttribute::kAriaControls, - AXObjectVectorAttribute::kAriaControls); -STATIC_ASSERT_ENUM(WebAXObjectVectorAttribute::kAriaDetails, - AXObjectVectorAttribute::kAriaDetails); -STATIC_ASSERT_ENUM(WebAXObjectVectorAttribute::kAriaFlowTo, - AXObjectVectorAttribute::kAriaFlowTo); - STATIC_ASSERT_ENUM(WebApplicationCacheHost::kUncached, ApplicationCacheHost::kUncached); STATIC_ASSERT_ENUM(WebApplicationCacheHost::kIdle, ApplicationCacheHost::kIdle);
diff --git a/third_party/WebKit/Source/web/BUILD.gn b/third_party/WebKit/Source/web/BUILD.gn index 459112d7..02f43dc0 100644 --- a/third_party/WebKit/Source/web/BUILD.gn +++ b/third_party/WebKit/Source/web/BUILD.gn
@@ -43,12 +43,8 @@ "InspectorOverlayAgent.h", "LocalFrameClientImpl.cpp", "LocalFrameClientImpl.h", - "MediaKeysClientImpl.cpp", - "MediaKeysClientImpl.h", "PageOverlay.cpp", "PageOverlay.h", - "PrerendererClientImpl.cpp", - "PrerendererClientImpl.h", "WebDevToolsAgentImpl.cpp", "WebDevToolsAgentImpl.h", "WebDevToolsFrontendImpl.cpp", @@ -69,7 +65,6 @@ "WebLocalFrameImpl.h", "WebPagePopupImpl.cpp", "WebPagePopupImpl.h", - "WebSurroundingText.cpp", "WebViewImpl.cpp", "WebViewImpl.h", ] @@ -120,7 +115,6 @@ visibility = [ "*" ] sources = [ - "ExternalPopupMenuTest.cpp", "PageOverlayTest.cpp", "WebAssociatedURLLoaderImplTest.cpp", "WebDragDataTest.cpp",
diff --git a/third_party/WebKit/Source/web/MediaKeysClientImpl.h b/third_party/WebKit/Source/web/MediaKeysClientImpl.h deleted file mode 100644 index 1b193b848..0000000 --- a/third_party/WebKit/Source/web/MediaKeysClientImpl.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 MediaKeysClientImpl_h -#define MediaKeysClientImpl_h - -#include "modules/encryptedmedia/MediaKeysClient.h" - -namespace blink { - -class MediaKeysClientImpl final : public MediaKeysClient { - public: - MediaKeysClientImpl(); - - // MediaKeysClient implementation. - WebEncryptedMediaClient* EncryptedMediaClient(ExecutionContext*) override; -}; - -} // namespace blink - -#endif // MediaKeysClientImpl_h
diff --git a/third_party/WebKit/Source/web/PrerendererClientImpl.cpp b/third_party/WebKit/Source/web/PrerendererClientImpl.cpp deleted file mode 100644 index ec4c602..0000000 --- a/third_party/WebKit/Source/web/PrerendererClientImpl.cpp +++ /dev/null
@@ -1,56 +0,0 @@ -/* - * Copyright (C) 2012 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include "web/PrerendererClientImpl.h" - -#include "core/exported/WebViewBase.h" -#include "platform/Prerender.h" -#include "public/platform/WebPrerender.h" -#include "public/web/WebPrerendererClient.h" - -namespace blink { - -PrerendererClientImpl::PrerendererClientImpl(Page& page, - WebPrerendererClient* client) - : PrerendererClient(page), client_(client) {} - -void PrerendererClientImpl::WillAddPrerender(Prerender* prerender) { - if (!client_) - return; - WebPrerender web_prerender(prerender); - client_->WillAddPrerender(&web_prerender); -} - -bool PrerendererClientImpl::IsPrefetchOnly() { - return client_ && client_->IsPrefetchOnly(); -} - -} // namespace blink
diff --git a/third_party/WebKit/Source/web/PrerendererClientImpl.h b/third_party/WebKit/Source/web/PrerendererClientImpl.h deleted file mode 100644 index c617079..0000000 --- a/third_party/WebKit/Source/web/PrerendererClientImpl.h +++ /dev/null
@@ -1,64 +0,0 @@ -/* - * Copyright (C) 2012 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef PrerendererClientImpl_h -#define PrerendererClientImpl_h - -#include "core/loader/PrerendererClient.h" -#include "platform/wtf/Noncopyable.h" -#include "platform/wtf/PassRefPtr.h" - -namespace blink { - -class Prerender; -class WebPrerendererClient; - -class PrerendererClientImpl final - : public GarbageCollected<PrerendererClientImpl>, - public PrerendererClient { - USING_GARBAGE_COLLECTED_MIXIN(PrerendererClientImpl); - WTF_MAKE_NONCOPYABLE(PrerendererClientImpl); - - public: - PrerendererClientImpl(Page&, WebPrerendererClient*); - - void WillAddPrerender(Prerender*) override; - bool IsPrefetchOnly() override; - - DEFINE_INLINE_VIRTUAL_TRACE() { PrerendererClient::Trace(visitor); } - - private: - WebPrerendererClient* client_; -}; - -} // namespace blink - -#endif // PrerendererClientImpl_h
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp index c90140f..b78d1351 100644 --- a/third_party/WebKit/Source/web/WebViewImpl.cpp +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -85,6 +85,7 @@ #include "core/loader/FrameLoadRequest.h" #include "core/loader/FrameLoader.h" #include "core/loader/FrameLoaderStateMachine.h" +#include "core/loader/PrerendererClient.h" #include "core/page/ContextMenuController.h" #include "core/page/ContextMenuProvider.h" #include "core/page/FocusController.h" @@ -170,7 +171,6 @@ #include "public/web/WebViewClient.h" #include "public/web/WebWindowFeatures.h" #include "web/PageOverlay.h" -#include "web/PrerendererClientImpl.h" #include "web/WebDevToolsAgentImpl.h" #if USE(DEFAULT_RENDER_THEME) @@ -318,8 +318,8 @@ void WebViewImpl::SetPrerendererClient( WebPrerendererClient* prerenderer_client) { DCHECK(page_); - ProvidePrerendererClientTo( - *page_, new PrerendererClientImpl(*page_, prerenderer_client)); + ProvidePrerendererClientTo(*page_, + new PrerendererClient(*page_, prerenderer_client)); } // static
diff --git a/third_party/WebKit/Source/web/WebViewImpl.h b/third_party/WebKit/Source/web/WebViewImpl.h index 42c02dc4..08957dd 100644 --- a/third_party/WebKit/Source/web/WebViewImpl.h +++ b/third_party/WebKit/Source/web/WebViewImpl.h
@@ -41,6 +41,7 @@ #include "core/page/EditorClient.h" #include "core/page/EventWithHitTestResults.h" #include "core/page/PageWidgetDelegate.h" +#include "modules/encryptedmedia/MediaKeysClient.h" #include "modules/storage/StorageClient.h" #include "platform/animation/CompositorAnimationTimeline.h" #include "platform/geometry/IntPoint.h" @@ -66,7 +67,6 @@ #include "public/platform/WebVector.h" #include "public/web/WebNavigationPolicy.h" #include "public/web/WebPageImportanceSignals.h" -#include "web/MediaKeysClientImpl.h" #include "web/WebExport.h" #include "web/WebPagePopupImpl.h" @@ -676,7 +676,7 @@ bool matches_heuristics_for_gpu_rasterization_; static const WebInputEvent* current_input_event_; - MediaKeysClientImpl media_keys_client_impl_; + MediaKeysClient media_keys_client_impl_; std::unique_ptr<WebActiveGestureAnimation> gesture_animation_; WebPoint position_on_fling_start_; WebPoint global_position_on_fling_start_;
diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp index 0465221..76a6b11 100644 --- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp +++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -290,7 +290,7 @@ ToLocalFrame(web_view_helper->WebView()->GetPage()->MainFrame()); DCHECK(frame); Element* element = frame->GetDocument()->getElementById(testcase.c_str()); - return frame->NodeImage(*element); + return DataTransfer::NodeImage(*frame, *element); } void RemoveElementById(WebLocalFrameBase* frame, const AtomicString& id) {
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index 89839114..bd9f8b1d 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -10694,6 +10694,7 @@ <int value="369" label="RemoteAccessHostClientDomainList"/> <int value="370" label="NetworkTimeQueriesEnabled"/> <int value="371" label="DownloadRestrictions"/> + <int value="372" label="DeviceSecondFactorAuthentication"/> </enum> <enum name="EnterprisePolicyInvalidations"> @@ -37856,7 +37857,6 @@ <int value="0" label="No WebContents"/> <int value="1" label="Prerendered WebContents"/> <int value="2" label="Spare WebContents"/> - <int value="3" label="Transferred WebContents"/> </enum> <enum name="WebFontCacheHit">