diff --git a/AUTHORS b/AUTHORS index e244d396..27124a2 100644 --- a/AUTHORS +++ b/AUTHORS
@@ -777,6 +777,7 @@ Xiangze Zhang <xiangze.zhang@intel.com> Xiaofeng Zhang <xiaofeng.zhang@intel.com> Xiaolei Yu <dreifachstein@gmail.com> +Xiaoshu Zhang <xiaoshu@amazon.com> Xiaoyin Liu <xiaoyin.l@outlook.com> Xinchao He <hexinchao@gmail.com> Xing Zhang <xzhang@adobe.com>
diff --git a/BUILD.gn b/BUILD.gn index 7cebd59..7c186c5 100644 --- a/BUILD.gn +++ b/BUILD.gn
@@ -161,6 +161,7 @@ "//chrome/test:unit_tests", "//components:components_browsertests", "//components/policy:policy_templates", + "//components/viz/common:viz_benchmark", "//content/shell:content_shell", "//content/test:content_browsertests", "//content/test:content_perftests",
diff --git a/DEPS b/DEPS index ed89047..1d1aa13 100644 --- a/DEPS +++ b/DEPS
@@ -40,11 +40,11 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Skia # and whatever else without interference from each other. - 'skia_revision': '3921ba236f1e3320b5999fe472f0acfbb6b6f75a', + 'skia_revision': '111f8a9eea6980a70a300e3a8bfd758257310fe2', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'v8_revision': '23203004176173339487767d9a9ff0968f5641e5', + 'v8_revision': '72bc0e4aefdec87d88b618fc89c8904476c1b2b1', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling swarming_client # and whatever else without interference from each other. @@ -64,7 +64,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling PDFium # and whatever else without interference from each other. - 'pdfium_revision': '22eb7ae54e4351f70a5a01b0130c8b0dc713586c', + 'pdfium_revision': '0646275cd9c19e9fb97eaa023494bb771e47e095', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling openmax_dl # and whatever else without interference from each other. @@ -96,7 +96,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling catapult # and whatever else without interference from each other. - 'catapult_revision': 'bdff8501d71be9e9e710f3effa09a5c3a7acaa6a', + 'catapult_revision': 'aff474911e21bccfa564c08712b13f4cd3ad75ba', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libFuzzer # and whatever else without interference from each other.
diff --git a/android_webview/browser/aw_safe_browsing_blocking_page.cc b/android_webview/browser/aw_safe_browsing_blocking_page.cc index ea80eb1..1ed0424 100644 --- a/android_webview/browser/aw_safe_browsing_blocking_page.cc +++ b/android_webview/browser/aw_safe_browsing_blocking_page.cc
@@ -78,6 +78,7 @@ false, // is_extended_reporting false, // is_scout false, // kSafeBrowsingProceedAnywayDisabled + false, // should_open_links_in_new_tab "cpn_safe_browsing_wv"); // help_center_article_link ErrorUiType errorType =
diff --git a/android_webview/browser/aw_safe_browsing_resource_throttle.cc b/android_webview/browser/aw_safe_browsing_resource_throttle.cc index 8f7815280..a43fe85 100644 --- a/android_webview/browser/aw_safe_browsing_resource_throttle.cc +++ b/android_webview/browser/aw_safe_browsing_resource_throttle.cc
@@ -43,8 +43,7 @@ resource_type, safe_browsing::CreateSBThreatTypeSet( {safe_browsing::SB_THREAT_TYPE_URL_MALWARE, - safe_browsing::SB_THREAT_TYPE_URL_PHISHING, - safe_browsing::SB_THREAT_TYPE_URL_UNWANTED}), + safe_browsing::SB_THREAT_TYPE_URL_PHISHING}), database_manager, ui_manager), request_(request) {} @@ -57,17 +56,4 @@ Cancel(); } -void AwSafeBrowsingResourceThrottle::OnCheckBrowseUrlResult( - const GURL& url, - SBThreatType threat_type, - const ThreatMetadata& metadata) { - if (threat_type != safe_browsing::SB_THREAT_TYPE_URL_PHISHING && - threat_type != safe_browsing::SB_THREAT_TYPE_URL_MALWARE) { - // If we don't recognize the threat type, just mark it as safe - threat_type = safe_browsing::SB_THREAT_TYPE_SAFE; - } - - BaseResourceThrottle::OnCheckBrowseUrlResult(url, threat_type, metadata); -} - } // namespace android_webview
diff --git a/android_webview/browser/aw_safe_browsing_resource_throttle.h b/android_webview/browser/aw_safe_browsing_resource_throttle.h index 5991c84bb..65a17e6 100644 --- a/android_webview/browser/aw_safe_browsing_resource_throttle.h +++ b/android_webview/browser/aw_safe_browsing_resource_throttle.h
@@ -35,10 +35,6 @@ static const void* kUserDataKey; - void OnCheckBrowseUrlResult(const GURL& url, - SBThreatType threat_type, - const ThreatMetadata& metadata) override; - private: AwSafeBrowsingResourceThrottle( net::URLRequest* request,
diff --git a/android_webview/browser/net/aw_cookie_store_wrapper.cc b/android_webview/browser/net/aw_cookie_store_wrapper.cc index 5a92c05b..88b8a60 100644 --- a/android_webview/browser/net/aw_cookie_store_wrapper.cc +++ b/android_webview/browser/net/aw_cookie_store_wrapper.cc
@@ -246,7 +246,7 @@ bool secure_source, bool modify_http_only, SetCookiesCallback callback) { - DCHECK(client_task_runner_->RunsTasksOnCurrentThread()); + DCHECK(client_task_runner_->RunsTasksInCurrentSequence()); PostTaskToCookieStoreTaskRunner(base::BindOnce( &SetCanonicalCookieAsyncOnCookieThread, std::move(cookie), secure_source, modify_http_only, CreateWrappedCallback<bool>(std::move(callback))));
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/SafeBrowsingTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/SafeBrowsingTest.java index b4a26bf..a1ddd7a 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/SafeBrowsingTest.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/SafeBrowsingTest.java
@@ -35,6 +35,8 @@ import org.chromium.content_public.browser.WebContents; import org.chromium.net.test.EmbeddedTestServer; +import java.util.Arrays; + /** * Test suite for SafeBrowsing. * @@ -79,10 +81,9 @@ public static class MockSafeBrowsingApiHandler implements SafeBrowsingApiHandler { private Observer mObserver; private static final String SAFE_METADATA = "{}"; - private static final String PHISHING_METADATA = "{\"matches\":[{\"threat_type\":\"5\"}]}"; - private static final String MALWARE_METADATA = "{\"matches\":[{\"threat_type\":\"4\"}]}"; - private static final String UNWANTED_SOFTWARE_METADATA = - "{\"matches\":[{\"threat_type\":\"3\"}]}"; + private static final int PHISHING_CODE = 5; + private static final int MALWARE_CODE = 4; + private static final int UNWANTED_SOFTWARE_CODE = 3; @Override public boolean init(Context context, Observer result) { @@ -90,15 +91,27 @@ return true; } + private String buildMetadataFromCode(int code) { + return "{\"matches\":[{\"threat_type\":\"" + code + "\"}]}"; + } + @Override public void startUriLookup(final long callbackId, String uri, int[] threatsOfInterest) { final String metadata; - if (uri.endsWith(PHISHING_HTML_PATH)) { - metadata = PHISHING_METADATA; - } else if (uri.endsWith(MALWARE_HTML_PATH)) { - metadata = MALWARE_METADATA; - } else if (uri.endsWith(UNWANTED_SOFTWARE_HTML_PATH)) { - metadata = UNWANTED_SOFTWARE_METADATA; + Arrays.sort(threatsOfInterest); + + // TODO(ntfschr): remove this assert once we support UwS warnings (crbug/729272) + assertEquals(Arrays.binarySearch(threatsOfInterest, UNWANTED_SOFTWARE_CODE), -1); + + if (uri.endsWith(PHISHING_HTML_PATH) + && Arrays.binarySearch(threatsOfInterest, PHISHING_CODE) >= 0) { + metadata = buildMetadataFromCode(PHISHING_CODE); + } else if (uri.endsWith(MALWARE_HTML_PATH) + && Arrays.binarySearch(threatsOfInterest, MALWARE_CODE) >= 0) { + metadata = buildMetadataFromCode(MALWARE_CODE); + } else if (uri.endsWith(UNWANTED_SOFTWARE_HTML_PATH) + && Arrays.binarySearch(threatsOfInterest, UNWANTED_SOFTWARE_CODE) >= 0) { + metadata = buildMetadataFromCode(UNWANTED_SOFTWARE_CODE); } else { metadata = SAFE_METADATA; } @@ -280,8 +293,8 @@ @Feature({"AndroidWebView"}) @CommandLineFlags.Add(AwSwitches.WEBVIEW_ENABLE_SAFEBROWSING_SUPPORT) public void testSafeBrowsingDoesNotBlockUnwantedSoftwarePages() throws Throwable { - // TODO(ntfschr): this is a temporary check until we add support for Unwanted Software - // warnings + // TODO(ntfschr): this is a temporary check until we add support for UwS warnings + // (crbug/729272) loadGreenPage(); final String responseUrl = mTestServer.getURL(UNWANTED_SOFTWARE_HTML_PATH); loadUrlSync(mAwContents, mContentsClient.getOnPageFinishedHelper(), responseUrl);
diff --git a/ash/ime/ime_controller_unittest.cc b/ash/ime/ime_controller_unittest.cc index 46a93cf..d454d86 100644 --- a/ash/ime/ime_controller_unittest.cc +++ b/ash/ime/ime_controller_unittest.cc
@@ -19,10 +19,9 @@ namespace { // Refreshes the IME list with fake IMEs and fake menu items. -void RefreshImes(const std::string& current_ime_id, - const std::vector<std::string>& ime_ids, - const std::vector<std::string>& menu_item_keys = - std::vector<std::string>()) { +void RefreshImesWithMenuItems(const std::string& current_ime_id, + const std::vector<std::string>& ime_ids, + const std::vector<std::string>& menu_item_keys) { std::vector<mojom::ImeInfoPtr> available_imes; for (const std::string& ime_id : ime_ids) { mojom::ImeInfoPtr ime = mojom::ImeInfo::New(); @@ -39,6 +38,13 @@ current_ime_id, std::move(available_imes), std::move(menu_items)); } +// Refreshes the IME list without adding any menu items. +void RefreshImes(const std::string& current_ime_id, + const std::vector<std::string>& ime_ids) { + const std::vector<std::string> empty_menu_items; + RefreshImesWithMenuItems(current_ime_id, ime_ids, empty_menu_items); +} + class TestImeObserver : public IMEObserver { public: TestImeObserver() = default; @@ -92,7 +98,7 @@ TestImeObserver observer; Shell::Get()->system_tray_notifier()->AddIMEObserver(&observer); - RefreshImes("ime1", {"ime1", "ime2"}, {"menu1"}); + RefreshImesWithMenuItems("ime1", {"ime1", "ime2"}, {"menu1"}); // Cached data was updated. EXPECT_EQ("ime1", controller->current_ime().id);
diff --git a/base/task_scheduler/task_scheduler_impl.h b/base/task_scheduler/task_scheduler_impl.h index e1dfd4f..1e35639 100644 --- a/base/task_scheduler/task_scheduler_impl.h +++ b/base/task_scheduler/task_scheduler_impl.h
@@ -30,10 +30,6 @@ #include "base/task_scheduler/task_tracker_posix.h" #endif -#if defined(OS_WIN) -#include "base/win/com_init_check_hook.h" -#endif - namespace base { class HistogramBase; @@ -103,15 +99,6 @@ AtomicFlag join_for_testing_returned_; #endif -#if defined(OS_WIN) -// The check below cannot be &&'ed with defined(OS_WIN) since the preprocessor -// will find that the macro is undefined even if defined(OS_WIN) is not true. -#if COM_INIT_CHECK_HOOK_ENABLED() - // Provides COM initialization verification for supported builds. - base::win::ComInitCheckHook com_init_check_hook_; -#endif -#endif - DISALLOW_COPY_AND_ASSIGN(TaskSchedulerImpl); };
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index d6392d1..ac12aed 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn
@@ -1724,14 +1724,6 @@ # dump_syms, so this is still required (https://crbug.com/622406). cflags += [ "-fno-standalone-debug" ] } - } else if (is_android) { - # Breakpad can't handle DWARF 4 symbols properly yet, so use DWARF 3 - # explicitly on android where we are hitting https://crbug.com/638485. - # The arguments MUST be in this order because of a gcc arg parsing bug. - cflags = [ - "-gdwarf-3", - "-g2", - ] } else { cflags = [ "-g2" ] } @@ -1765,16 +1757,16 @@ cflags = [] ldflags = [ "/DEBUG" ] } else { + cflags = [ "-g1" ] if (is_android) { - # Breakpad can't handle DWARF 4 symbols properly yet, so use DWARF 3 - # explicitly on android where we are hitting https://crbug.com/638485. - # The arguments MUST be in this order because of a gcc arg parsing bug. - cflags = [ - "-gdwarf-3", - "-g1", - ] - } else { - cflags = [ "-g1" ] + # Android defaults to symbol_level=1 builds in production builds + # (https://crbug.com/648948), but clang, unlike gcc, doesn't emit + # DW_AT_linkage_name in -g1 builds. -fdebug-info-for-profiling enables + # that (and a bunch of other things we don't need), so that we get + # qualified names in stacks. + # TODO(thakis): Consider making clang emit DW_AT_linkage_name in -g1 mode; + # failing that consider doing this on non-Android too. + cflags += [ "-fdebug-info-for-profiling" ] } # Note: -gsplit-dwarf implicitly turns on -g2 with clang, so don't pass it.
diff --git a/build/config/ios/rules.gni b/build/config/ios/rules.gni index 5429938..fc6c681 100644 --- a/build/config/ios/rules.gni +++ b/build/config/ios/rules.gni
@@ -1614,3 +1614,75 @@ set_defaults("ios_xctest_test") { configs = default_executable_configs } + +# Template to build a XCUITest that consists of two parts: the test runner +# application bundle and the xctest dynamic library. +# +# Arguments +# +# deps: +# list of labels to depends on, these values are used to create the +# xctest dynamic library. +# +# This template defines two targets, one named "${target_name}" is the xctest +# dynamic library, and the other named "${target_name}_runner" is the test +# runner application bundle. +# +template("ios_xcuitest_test") { + assert(false, + "ios_xcuitest_test is incomplete and should not be used, see " + + "crbug.com/709289 for tracking") + + _xcuitest_target = target_name + _xcuitest_runner_target = _xcuitest_target + "_runner" + _xctrunner_path = + "$ios_sdk_platform_path/Developer/Library/Xcode/Agents/XCTRunner.app" + + _xcuitest_runner_info_plist_merge_plist = + _xcuitest_runner_target + "_info_plist_merge_plist" + _xcuitest_runner_info_plist_target = _xcuitest_runner_target + "_info_plist" + _xcuitest_runner_info_plist_bundle = + _xcuitest_runner_target + "_info_plist_bundle" + + action(_xcuitest_runner_info_plist_merge_plist) { + testonly = true + script = "//build/config/mac/plist_util.py" + + sources = [ + "$_xctrunner_path/Info.plist", + + # NOTE: The XCTRunnerAddition+Info.plist must come after the Info.plist + # because it overrides the values under "CFBundleIdentifier" and + # "CFBundleName". + "//ios/chrome/app/resources/XCTRunnerAddition+Info.plist", + ] + + _output_name = "$target_gen_dir/${_xcuitest_runner_target}_merged.plist" + outputs = [ + _output_name, + ] + args = [ + "merge", + "-f=xml1", + "-o=" + rebase_path(_output_name, root_build_dir), + ] + rebase_path(sources, root_build_dir) + } + + ios_info_plist(_xcuitest_runner_info_plist_target) { + testonly = true + visibility = [ ":$_xcuitest_runner_info_plist_bundle" ] + + executable_name = _xcuitest_target + info_plist_target = ":$_xcuitest_runner_info_plist_merge_plist" + if (ios_automatically_manage_certs) { + # Use the same bundle identifier for XCUITest tests as for unit tests + # when managing certificates as the number of free certs is limited. + extra_substitutions = + [ "PRODUCT_NAME=${ios_generic_test_bundle_id_suffix}" ] + } + } +} + +set_defaults("ios_xcuitest_test") { + configs = default_executable_configs +}
diff --git a/build/mac/should_use_hermetic_xcode.py b/build/mac/should_use_hermetic_xcode.py index 68e288e..dc1b930 100755 --- a/build/mac/should_use_hermetic_xcode.py +++ b/build/mac/should_use_hermetic_xcode.py
@@ -3,8 +3,11 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Prints "1" if Chrome targets should be built with hermetic xcode. Otherwise -prints "0". +""" +Prints "1" if Chrome targets should be built with hermetic Xcode. +Prints "2" if Chrome targets should be built with hermetic Xcode, but the OS +version does not meet the minimum requirements of the hermetic version of Xcode. +Otherwise prints "0". Usage: python should_use_hermetic_xcode.py <target_os> @@ -13,6 +16,12 @@ import os import sys +_THIS_DIR_PATH = os.path.abspath(os.path.dirname(os.path.realpath(__file__))) +_BUILD_PATH = os.path.join(_THIS_DIR_PATH, os.pardir) +sys.path.insert(0, _BUILD_PATH) + +import mac_toolchain + def _IsCorpMachine(): return os.path.isdir('/Library/GoogleCorpSupport/') @@ -21,6 +30,8 @@ def main(): allow_corp = sys.argv[1] == 'mac' and _IsCorpMachine() if os.environ.get('FORCE_MAC_TOOLCHAIN') or allow_corp: + if not mac_toolchain.PlatformMeetsHermeticXcodeRequirements(sys.argv[1]): + return "2" return "1" else: return "0"
diff --git a/build/mac_toolchain.py b/build/mac_toolchain.py index 123e5e0d3..534f9d198 100755 --- a/build/mac_toolchain.py +++ b/build/mac_toolchain.py
@@ -14,6 +14,7 @@ """ import os +import platform import plistlib import shutil import subprocess @@ -24,10 +25,14 @@ import urllib2 # This can be changed after running /build/package_mac_toolchain.py. -MAC_TOOLCHAIN_VERSION = '5B1008' +MAC_TOOLCHAIN_VERSION = '8E2002' MAC_TOOLCHAIN_SUB_REVISION = 3 MAC_TOOLCHAIN_VERSION = '%s-%s' % (MAC_TOOLCHAIN_VERSION, MAC_TOOLCHAIN_SUB_REVISION) +# The toolchain will not be downloaded if the minimum OS version is not met. +# 16 is the major version number for macOS 10.12. +MAC_MINIMUM_OS_VERSION = 16 + IOS_TOOLCHAIN_VERSION = '8C1002' IOS_TOOLCHAIN_SUB_REVISION = 1 IOS_TOOLCHAIN_VERSION = '%s-%s' % (IOS_TOOLCHAIN_VERSION, @@ -44,6 +49,13 @@ STAMP_FILE = os.path.join(BASE_DIR, '%s_files', 'toolchain_build_revision') TOOLCHAIN_URL = 'gs://chrome-mac-sdk/' + +def PlatformMeetsHermeticXcodeRequirements(target_os): + if target_os == 'ios': + return True + return int(platform.release().split('.')[0]) >= MAC_MINIMUM_OS_VERSION + + def GetPlatforms(): default_target_os = ["mac"] try: @@ -232,6 +244,10 @@ return 0 for target_os in GetPlatforms(): + if not PlatformMeetsHermeticXcodeRequirements(target_os): + print 'OS version does not support toolchain.' + continue + if target_os == 'ios': default_version = IOS_TOOLCHAIN_VERSION toolchain_filename = 'ios-toolchain-%s.tgz'
diff --git a/build_overrides/build.gni b/build_overrides/build.gni index 7b632bd..066298f 100644 --- a/build_overrides/build.gni +++ b/build_overrides/build.gni
@@ -58,5 +58,8 @@ _result = exec_script("//build/mac/should_use_hermetic_xcode.py", [ target_os ], "value") + assert(_result != 2, + "Do not allow building targets with the default" + + "hermetic toolchain if the minimum OS version is not met.") use_system_xcode = _result == 0 }
diff --git a/cc/blink/web_layer_impl.cc b/cc/blink/web_layer_impl.cc index d2c51d18..c89a657 100644 --- a/cc/blink/web_layer_impl.cc +++ b/cc/blink/web_layer_impl.cc
@@ -226,6 +226,10 @@ return layer_->HasTickingAnimationForTesting(); } +void WebLayerImpl::SetScrollable(const blink::WebSize& size) { + layer_->SetScrollable(size); +} + void WebLayerImpl::SetScrollPosition(blink::WebFloatPoint position) { layer_->SetScrollOffset(gfx::ScrollOffset(position.x, position.y)); } @@ -235,14 +239,6 @@ layer_->scroll_offset().y()); } -void WebLayerImpl::SetScrollClipLayer(WebLayer* clip_layer) { - if (!clip_layer) { - layer_->SetScrollClipLayerId(Layer::INVALID_ID); - return; - } - layer_->SetScrollClipLayerId(clip_layer->Id()); -} - bool WebLayerImpl::Scrollable() const { return layer_->scrollable(); }
diff --git a/cc/blink/web_layer_impl.h b/cc/blink/web_layer_impl.h index f85b1d9..8f831166 100644 --- a/cc/blink/web_layer_impl.h +++ b/cc/blink/web_layer_impl.h
@@ -91,9 +91,9 @@ void SetFiltersOrigin(const blink::WebFloatPoint& origin) override; void SetBackgroundFilters(const cc::FilterOperations& filters) override; bool HasTickingAnimationForTesting() override; + void SetScrollable(const blink::WebSize&) override; void SetScrollPosition(blink::WebFloatPoint position) override; blink::WebFloatPoint ScrollPosition() const override; - void SetScrollClipLayer(blink::WebLayer* clip_layer) override; bool Scrollable() const override; void SetUserScrollable(bool horizontal, bool vertical) override; bool UserScrollableHorizontal() const override;
diff --git a/cc/input/scrollbar_animation_controller_unittest.cc b/cc/input/scrollbar_animation_controller_unittest.cc index 6a891258..19fea25 100644 --- a/cc/input/scrollbar_animation_controller_unittest.cc +++ b/cc/input/scrollbar_animation_controller_unittest.cc
@@ -82,7 +82,6 @@ clip_layer_ = clip.get(); scroll_layer->SetElementId( LayerIdToElementIdForTesting(scroll_layer->id())); - scroll_layer->SetScrollClipLayer(clip_layer_->id()); LayerImpl* scroll_layer_ptr = scroll_layer.get(); const int kTrackStart = 0; @@ -119,6 +118,7 @@ h_scrollbar_layer_->test_properties()->opacity_can_animate = true; clip_layer_->SetBounds(gfx::Size(100, 100)); + scroll_layer_ptr->SetScrollable(gfx::Size(100, 100)); scroll_layer_ptr->SetBounds(gfx::Size(200, 200)); host_impl_.active_tree()->BuildLayerListAndPropertyTreesForTesting(); host_impl_.active_tree()->UpdateScrollbarGeometries(); @@ -185,12 +185,15 @@ // Make the Layer non-scrollable, scrollbar disappears. clip_layer_->SetBounds(gfx::Size(200, 200)); + LayerImpl* scroll_layer = host_impl_.active_tree()->LayerById(1); + scroll_layer->SetScrollable(gfx::Size(200, 200)); host_impl_.active_tree()->BuildLayerListAndPropertyTreesForTesting(); scrollbar_controller_->DidScrollUpdate(); ExpectScrollbarsOpacity(0); // Make the layer scrollable, scrollbar appears again. clip_layer_->SetBounds(gfx::Size(100, 100)); + scroll_layer->SetScrollable(gfx::Size(100, 100)); host_impl_.active_tree()->BuildLayerListAndPropertyTreesForTesting(); scrollbar_controller_->DidScrollUpdate(); ExpectScrollbarsOpacity(1); @@ -208,6 +211,7 @@ // Shrink along X axis, horizontal scrollbar should appear. clip_layer_->SetBounds(gfx::Size(100, 200)); EXPECT_EQ(gfx::Size(100, 200), clip_layer_->bounds()); + scroll_layer->SetScrollable(gfx::Size(100, 200)); host_impl_.active_tree()->BuildLayerListAndPropertyTreesForTesting(); scrollbar_controller_->DidScrollBegin(); @@ -221,6 +225,7 @@ // should disappear. clip_layer_->SetBounds(gfx::Size(200, 100)); EXPECT_EQ(gfx::Size(200, 100), clip_layer_->bounds()); + scroll_layer->SetScrollable(gfx::Size(200, 100)); host_impl_.active_tree()->BuildLayerListAndPropertyTreesForTesting(); scrollbar_controller_->DidScrollBegin(); @@ -1353,20 +1358,18 @@ scrollbar->test_properties()->opacity = 0.0f; scrollbar_layer_ = scrollbar.get(); scrollbar_layer_->test_properties()->opacity_can_animate = true; - std::unique_ptr<LayerImpl> clip = + std::unique_ptr<LayerImpl> root = LayerImpl::Create(host_impl_.active_tree(), 3); - clip_layer_ = clip.get(); + + scroll_layer->SetScrollable(gfx::Size(100, 100)); scroll_layer->SetElementId( LayerIdToElementIdForTesting(scroll_layer->id())); - - scroll_layer->SetScrollClipLayer(clip_layer_->id()); LayerImpl* scroll_layer_ptr = scroll_layer.get(); scroll_layer->test_properties()->AddChild(std::move(scrollbar)); - clip->test_properties()->AddChild(std::move(scroll_layer)); - host_impl_.active_tree()->SetRootLayerForTesting(std::move(clip)); + root->test_properties()->AddChild(std::move(scroll_layer)); + host_impl_.active_tree()->SetRootLayerForTesting(std::move(root)); scrollbar_layer_->SetScrollElementId(scroll_layer_ptr->element_id()); - clip_layer_->SetBounds(gfx::Size(100, 100)); scroll_layer_ptr->SetBounds(gfx::Size(200, 200)); host_impl_.active_tree()->BuildLayerListAndPropertyTreesForTesting(); DCHECK(host_impl_.active_tree()->ScrollbarGeometriesNeedUpdate()); @@ -1385,7 +1388,6 @@ TestTaskGraphRunner task_graph_runner_; FakeLayerTreeHostImpl host_impl_; std::unique_ptr<ScrollbarAnimationController> scrollbar_controller_; - LayerImpl* clip_layer_; SolidColorScrollbarLayerImpl* scrollbar_layer_; base::Closure start_fade_; @@ -1451,21 +1453,17 @@ EXPECT_EQ(HORIZONTAL, scrollbar_layer_->orientation()); // Shrink along X axis, horizontal scrollbar should appear. - clip_layer_->SetBounds(gfx::Size(100, 200)); - EXPECT_EQ(gfx::Size(100, 200), clip_layer_->bounds()); + scroll_layer->SetScrollable(gfx::Size(100, 200)); host_impl_.active_tree()->BuildLayerListAndPropertyTreesForTesting(); - scrollbar_controller_->DidScrollBegin(); scrollbar_controller_->DidScrollUpdate(); EXPECT_FLOAT_EQ(1.0f, scrollbar_layer_->Opacity()); - scrollbar_controller_->DidScrollEnd(); // Shrink along Y axis and expand along X, horizontal scrollbar // should disappear. - clip_layer_->SetBounds(gfx::Size(200, 100)); - EXPECT_EQ(gfx::Size(200, 100), clip_layer_->bounds()); + scroll_layer->SetScrollable(gfx::Size(200, 100)); host_impl_.active_tree()->BuildLayerListAndPropertyTreesForTesting(); scrollbar_controller_->DidScrollBegin(); @@ -1484,20 +1482,16 @@ EXPECT_EQ(VERTICAL, scrollbar_layer_->orientation()); // Shrink along X axis, vertical scrollbar should remain invisible. - clip_layer_->SetBounds(gfx::Size(100, 200)); - EXPECT_EQ(gfx::Size(100, 200), clip_layer_->bounds()); + scroll_layer->SetScrollable(gfx::Size(100, 200)); host_impl_.active_tree()->BuildLayerListAndPropertyTreesForTesting(); - scrollbar_controller_->DidScrollBegin(); scrollbar_controller_->DidScrollUpdate(); EXPECT_FLOAT_EQ(0.0f, scrollbar_layer_->Opacity()); - scrollbar_controller_->DidScrollEnd(); // Shrink along Y axis and expand along X, vertical scrollbar should appear. - clip_layer_->SetBounds(gfx::Size(200, 100)); - EXPECT_EQ(gfx::Size(200, 100), clip_layer_->bounds()); + scroll_layer->SetScrollable(gfx::Size(200, 100)); host_impl_.active_tree()->BuildLayerListAndPropertyTreesForTesting(); scrollbar_controller_->DidScrollBegin();
diff --git a/cc/input/single_scrollbar_animation_controller_thinning_unittest.cc b/cc/input/single_scrollbar_animation_controller_thinning_unittest.cc index 8df33897..970afe6 100644 --- a/cc/input/single_scrollbar_animation_controller_thinning_unittest.cc +++ b/cc/input/single_scrollbar_animation_controller_thinning_unittest.cc
@@ -70,7 +70,6 @@ scroll_layer->SetElementId( LayerIdToElementIdForTesting(scroll_layer->id())); clip_layer_ = clip.get(); - scroll_layer->SetScrollClipLayer(clip_layer_->id()); LayerImpl* scroll_layer_ptr = scroll_layer.get(); const int kId = 2;
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc index 4740816bb..21f7f0d 100644 --- a/cc/layers/layer.cc +++ b/cc/layers/layer.cc
@@ -54,7 +54,6 @@ sorting_context_id(0), use_parent_backface_visibility(false), background_color(0), - scroll_clip_layer_id(INVALID_ID), scrollable(false), user_scrollable_horizontal(true), user_scrollable_vertical(true), @@ -92,10 +91,8 @@ force_render_surface_for_testing_(false), subtree_property_changed_(false), may_contain_video_(false), - is_scroll_clip_layer_(false), needs_show_scrollbars_(false), has_transform_node_(false), - has_scroll_node_(false), subtree_has_copy_request_(false), safe_opaque_background_color_(0), num_unclipped_descendants_(0) {} @@ -298,16 +295,14 @@ SetPropertyTreesNeedRebuild(); } - if (scrollable() && has_scroll_node_) { - if (ScrollNode* node = layer_tree_host_->property_trees()->scroll_tree.Node( - scroll_tree_index())) { - node->bounds = inputs_.bounds; - } + if (scrollable()) { + auto& scroll_tree = layer_tree_host_->property_trees()->scroll_tree; + if (auto* scroll_node = scroll_tree.Node(scroll_tree_index_)) + scroll_node->bounds = inputs_.bounds; + else + SetPropertyTreesNeedRebuild(); } - if (is_scroll_clip_layer_) - layer_tree_host_->property_trees()->scroll_tree.set_needs_update(true); - SetNeedsCommit(); } @@ -817,30 +812,24 @@ property_trees.transform_tree.set_needs_update(true); } -void Layer::SetScrollClipLayerId(int clip_layer_id) { +void Layer::SetScrollable(const gfx::Size& bounds) { DCHECK(IsPropertyChangeAllowed()); - if (inputs_.scroll_clip_layer_id == clip_layer_id) + if (inputs_.scrollable && inputs_.scroll_container_bounds == bounds) return; - inputs_.scroll_clip_layer_id = clip_layer_id; + bool was_scrollable = inputs_.scrollable; + inputs_.scrollable = true; + inputs_.scroll_container_bounds = bounds; - SetPropertyTreesNeedRebuild(); - - bool scrollable = clip_layer_id != Layer::INVALID_ID; - SetScrollable(scrollable); - - SetNeedsCommit(); -} - -Layer* Layer::scroll_clip_layer() const { - DCHECK(layer_tree_host_); - return layer_tree_host_->LayerById(inputs_.scroll_clip_layer_id); -} - -void Layer::SetScrollable(bool scrollable) { - DCHECK(IsPropertyChangeAllowed()); - if (inputs_.scrollable == scrollable) + if (!layer_tree_host_) return; - inputs_.scrollable = scrollable; + + auto& scroll_tree = layer_tree_host_->property_trees()->scroll_tree; + auto* scroll_node = scroll_tree.Node(scroll_tree_index_); + if (was_scrollable && scroll_node) + scroll_node->scroll_clip_layer_bounds = inputs_.scroll_container_bounds; + else + SetPropertyTreesNeedRebuild(); + SetNeedsCommit(); } @@ -854,13 +843,16 @@ if (!layer_tree_host_) return; - if (has_scroll_node_) { - if (ScrollNode* node = layer_tree_host_->property_trees()->scroll_tree.Node( - scroll_tree_index())) { - node->user_scrollable_horizontal = horizontal; - node->user_scrollable_vertical = vertical; + if (scrollable()) { + auto& scroll_tree = layer_tree_host_->property_trees()->scroll_tree; + if (auto* scroll_node = scroll_tree.Node(scroll_tree_index_)) { + scroll_node->user_scrollable_horizontal = horizontal; + scroll_node->user_scrollable_vertical = vertical; + } else { + SetPropertyTreesNeedRebuild(); } } + SetNeedsCommit(); } @@ -944,6 +936,8 @@ DCHECK(IsPropertyChangeAllowed()); if (transform_tree_index_ == index) return; + if (index == TransformTree::kInvalidNodeId) + has_transform_node_ = false; transform_tree_index_ = index; SetNeedsPushProperties(); } @@ -1182,8 +1176,8 @@ layer->SetUseParentBackfaceVisibility(inputs_.use_parent_backface_visibility); layer->SetShouldCheckBackfaceVisibility(should_check_backface_visibility_); - layer->SetScrollClipLayer(inputs_.scroll_clip_layer_id); - layer->SetScrollable(inputs_.scrollable); + if (scrollable()) + layer->SetScrollable(inputs_.scroll_container_bounds); layer->SetMutableProperties(inputs_.mutable_properties); // The property trees must be safe to access because they will be used below
diff --git a/cc/layers/layer.h b/cc/layers/layer.h index bbf9c0bbb..1dc0735e 100644 --- a/cc/layers/layer.h +++ b/cc/layers/layer.h
@@ -217,14 +217,13 @@ gfx::ScrollOffset scroll_offset() const { return inputs_.scroll_offset; } void SetScrollOffsetFromImplSide(const gfx::ScrollOffset& scroll_offset); - // TODO(pdr): Remove scroll_clip_layer_id and store the scroll clip bounds - // directly instead of using scroll_clip_layer's bounds. - void SetScrollClipLayerId(int clip_layer_id); - Layer* scroll_clip_layer() const; - - // Marks this layer as being scrollable and needing an associated scroll node - // with bounds synced to this layer's bounds. - void SetScrollable(bool scrollable = true); + // Marks this layer as being scrollable and needing an associated scroll node. + // The scroll node's bounds and scroll_clip_layer_bounds will be kept in sync + // with this layer. Once scrollable, a Layer cannot become un-scrollable. + void SetScrollable(const gfx::Size& scroll_container_bounds); + gfx::Size scroll_container_bounds() const { + return inputs_.scroll_container_bounds; + } bool scrollable() const { return inputs_.scrollable; } void SetUserScrollable(bool horizontal, bool vertical); @@ -256,8 +255,8 @@ } void set_did_scroll_callback( - const base::Callback<void(const gfx::ScrollOffset&)>& callback) { - inputs_.did_scroll_callback = callback; + base::Callback<void(const gfx::ScrollOffset&)> callback) { + inputs_.did_scroll_callback = std::move(callback); } void SetForceRenderSurfaceForTesting(bool force_render_surface); @@ -418,8 +417,6 @@ void SetScrollbarsHiddenFromImplSide(bool hidden); - void set_is_scroll_clip_layer() { is_scroll_clip_layer_ = true; } - const gfx::Rect& update_rect() const { return inputs_.update_rect; } LayerTreeHost* layer_tree_host() const { return layer_tree_host_; } @@ -429,7 +426,6 @@ bool has_transform_node() { return has_transform_node_; } void SetHasTransformNode(bool val) { has_transform_node_ = val; } - void SetHasScrollNode(bool val) { has_scroll_node_ = val; } protected: friend class LayerImpl; @@ -573,14 +569,14 @@ gfx::ScrollOffset scroll_offset; - // This variable indicates which ancestor layer (if any) whose size, - // transformed relative to this layer, defines the maximum scroll offset - // for this layer. - int scroll_clip_layer_id; + // Size of the scroll container that this layer scrolls in. + gfx::Size scroll_container_bounds; // Indicates that this layer will need a scroll property node and that this - // layer's bounds correspond to the scroll node's bounds. + // layer's bounds correspond to the scroll node's bounds (both |bounds| and + // |scroll_container_bounds|). bool scrollable : 1; + bool user_scrollable_horizontal : 1; bool user_scrollable_vertical : 1; @@ -633,12 +629,10 @@ bool force_render_surface_for_testing_ : 1; bool subtree_property_changed_ : 1; bool may_contain_video_ : 1; - bool is_scroll_clip_layer_ : 1; bool needs_show_scrollbars_ : 1; // Whether the nodes referred to by *_tree_index_ // "belong" to this layer. Only applicable if use_layer_lists is false. bool has_transform_node_ : 1; - bool has_scroll_node_ : 1; // This value is valid only when LayerTreeHost::has_copy_request() is true bool subtree_has_copy_request_ : 1; SkColor safe_opaque_background_color_;
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc index e30b44d..6e45fd3 100644 --- a/cc/layers/layer_impl.cc +++ b/cc/layers/layer_impl.cc
@@ -52,7 +52,6 @@ : layer_id_(id), layer_tree_impl_(tree_impl), test_properties_(nullptr), - scroll_clip_layer_id_(Layer::INVALID_ID), main_thread_scrolling_reasons_( MainThreadScrollingReason::kNotScrollingOnMain), scrollable_(false), @@ -271,30 +270,21 @@ return scroll_tree.ScrollBy(scroll_node, scroll, layer_tree_impl()); } -void LayerImpl::SetScrollClipLayer(int scroll_clip_layer_id) { - if (scroll_clip_layer_id_ == scroll_clip_layer_id) +void LayerImpl::SetScrollable(const gfx::Size& bounds) { + if (scrollable_ && scroll_container_bounds_ == bounds) return; - scroll_clip_layer_id_ = scroll_clip_layer_id; + scrollable_ = true; + scroll_container_bounds_ = bounds; - // The scrolling bounds are determined from the scroll clip layer's bounds. + // Scrollbar positions depend on the bounds. layer_tree_impl()->SetScrollbarGeometriesNeedUpdate(); - bool scrollable = scroll_clip_layer_id_ != Layer::INVALID_ID; - SetScrollable(scrollable); -} - -LayerImpl* LayerImpl::scroll_clip_layer() const { - return layer_tree_impl()->LayerById(scroll_clip_layer_id_); -} - -void LayerImpl::SetScrollable(bool scrollable) { - if (scrollable_ == scrollable) - return; - scrollable_ = scrollable; - if (scrollable && layer_tree_impl()->settings().scrollbar_animator == - LayerTreeSettings::AURA_OVERLAY) { + if (layer_tree_impl()->settings().scrollbar_animator == + LayerTreeSettings::AURA_OVERLAY) { set_needs_show_scrollbars(true); } + + NoteLayerPropertyChanged(); } std::unique_ptr<LayerImpl> LayerImpl::CreateLayerImpl( @@ -344,8 +334,8 @@ } layer->SetBounds(bounds_); - layer->SetScrollClipLayer(scroll_clip_layer_id_); - layer->SetScrollable(scrollable_); + if (scrollable_) + layer->SetScrollable(scroll_container_bounds_); layer->SetMutableProperties(mutable_properties_); // If the main thread commits multiple times before the impl thread actually @@ -511,8 +501,9 @@ bounds_ = bounds; - // Scrollbar positions depend on scrolling bounds and scroll clip bounds. - layer_tree_impl()->SetScrollbarGeometriesNeedUpdate(); + // Scrollbar positions depend on the scrolling layer bounds. + if (scrollable()) + layer_tree_impl()->SetScrollbarGeometriesNeedUpdate(); NoteLayerPropertyChanged(); }
diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h index c8e2610..65c190f2 100644 --- a/cc/layers/layer_impl.h +++ b/cc/layers/layer_impl.h
@@ -295,14 +295,11 @@ // initial scroll gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll); - // TODO(pdr): Remove scroll_clip_layer_id and use the scroll node's scroll - // clip bounds instead of the scroll_clip_layer bounds. - void SetScrollClipLayer(int scroll_clip_layer_id); - LayerImpl* scroll_clip_layer() const; - - // Marks this layer as being scrollable and having an associated scroll node - // with bounds synced to this layer's bounds. - void SetScrollable(bool scrollable = true); + // Marks this layer as being scrollable and needing an associated scroll node. + // The scroll node's bounds and scroll_clip_layer_bounds will be kept in sync + // with this layer. + void SetScrollable(const gfx::Size& bounds); + gfx::Size scroll_container_bounds() const { return scroll_container_bounds_; } bool scrollable() const { return scrollable_; } void set_main_thread_scrolling_reasons( @@ -476,13 +473,16 @@ // Properties synchronized from the associated Layer. gfx::Size bounds_; - int scroll_clip_layer_id_; gfx::Vector2dF offset_to_transform_parent_; uint32_t main_thread_scrolling_reasons_; - // Indicates that this layer is scrollable and has an associated scroll node - // with bounds synced to this layer's bounds. + // Size of the scroll container that this layer scrolls in. + gfx::Size scroll_container_bounds_; + + // Indicates that this layer will have a scroll property node and that this + // layer's bounds correspond to the scroll node's bounds (both |bounds| and + // |scroll_container_bounds|). bool scrollable_ : 1; bool should_flatten_transform_from_property_tree_ : 1;
diff --git a/cc/layers/layer_impl_unittest.cc b/cc/layers/layer_impl_unittest.cc index 326ef45..9a5f4db 100644 --- a/cc/layers/layer_impl_unittest.cc +++ b/cc/layers/layer_impl_unittest.cc
@@ -130,18 +130,13 @@ host_impl.SetVisible(true); EXPECT_TRUE(host_impl.InitializeRenderer(layer_tree_frame_sink.get())); host_impl.CreatePendingTree(); - std::unique_ptr<LayerImpl> root_clip_ptr = - LayerImpl::Create(host_impl.pending_tree(), 1); - LayerImpl* root_clip = root_clip_ptr.get(); std::unique_ptr<LayerImpl> root_ptr = LayerImpl::Create(host_impl.pending_tree(), 2); LayerImpl* root = root_ptr.get(); - root_clip_ptr->test_properties()->AddChild(std::move(root_ptr)); - host_impl.pending_tree()->SetRootLayerForTesting(std::move(root_clip_ptr)); + host_impl.pending_tree()->SetRootLayerForTesting(std::move(root_ptr)); root->test_properties()->force_render_surface = true; root->SetMasksToBounds(true); - root->SetScrollClipLayer(root_clip->id()); root->layer_tree_impl()->ResetAllChangeTracking(); root->test_properties()->AddChild( @@ -150,7 +145,6 @@ child->test_properties()->AddChild( LayerImpl::Create(host_impl.pending_tree(), 8)); LayerImpl* grand_child = child->test_properties()->children[0]; - root->SetScrollClipLayer(root_clip->id()); host_impl.pending_tree()->BuildLayerListAndPropertyTreesForTesting(); // Adding children is an internal operation and should not mark layers as @@ -224,19 +218,15 @@ FakeLayerTreeHostImpl host_impl(&task_runner_provider, &task_graph_runner); host_impl.SetVisible(true); EXPECT_TRUE(host_impl.InitializeRenderer(layer_tree_frame_sink.get())); - std::unique_ptr<LayerImpl> root_clip_ptr = - LayerImpl::Create(host_impl.active_tree(), 1); - LayerImpl* root_clip = root_clip_ptr.get(); std::unique_ptr<LayerImpl> root_ptr = LayerImpl::Create(host_impl.active_tree(), 2); LayerImpl* root = root_ptr.get(); - root_clip_ptr->test_properties()->AddChild(std::move(root_ptr)); - host_impl.active_tree()->SetRootLayerForTesting(std::move(root_clip_ptr)); + host_impl.active_tree()->SetRootLayerForTesting(std::move(root_ptr)); root->test_properties()->AddChild( LayerImpl::Create(host_impl.active_tree(), 7)); LayerImpl* child = root->test_properties()->children[0]; - root->SetScrollClipLayer(root_clip->id()); + root->SetScrollable(gfx::Size(100, 100)); host_impl.active_tree()->BuildLayerListAndPropertyTreesForTesting(); // Make root the inner viewport container layer. This ensures the later call @@ -306,7 +296,7 @@ LayerImpl::Create(host_impl.active_tree(), 2); LayerImpl* layer = layer_ptr.get(); root->test_properties()->AddChild(std::move(layer_ptr)); - layer->SetScrollClipLayer(root->id()); + layer->SetScrollable(gfx::Size(1, 1)); std::unique_ptr<LayerImpl> layer2_ptr = LayerImpl::Create(host_impl.active_tree(), 3); LayerImpl* layer2 = layer2_ptr.get(); @@ -493,12 +483,12 @@ ->root_layer_for_testing() ->test_properties() ->AddChild(LayerImpl::Create(host_impl_.active_tree(), root_id_ + 1)); - layer()->SetScrollClipLayer(root_id_); // Set the max scroll offset by noting that the root layer has bounds (1,1), // thus whatever bounds are set for the layer will be the max scroll // offset plus 1 in each direction. host_impl_.active_tree()->root_layer_for_testing()->SetBounds( gfx::Size(1, 1)); + layer()->SetScrollable(gfx::Size(1, 1)); gfx::Vector2d max_scroll_offset(51, 81); layer()->SetBounds(gfx::Size(max_scroll_offset.x(), max_scroll_offset.y())); host_impl_.active_tree()->BuildLayerListAndPropertyTreesForTesting();
diff --git a/cc/layers/layer_perftest.cc b/cc/layers/layer_perftest.cc index 61086a0..a0bee52 100644 --- a/cc/layers/layer_perftest.cc +++ b/cc/layers/layer_perftest.cc
@@ -79,8 +79,6 @@ test_layer->SetDoubleSided(double_sided); test_layer->SetHideLayerAndSubtree(hide_layer_and_subtree); test_layer->SetMasksToBounds(masks_to_bounds); - test_layer->SetScrollClipLayerId(scrollable ? test_layer->id() - : Layer::INVALID_ID); test_layer->PushPropertiesTo(impl_layer.get()); transform_origin_z += 0.01f;
diff --git a/cc/layers/layer_position_constraint_unittest.cc b/cc/layers/layer_position_constraint_unittest.cc index 89fc3d0..ad31d96 100644 --- a/cc/layers/layer_position_constraint_unittest.cc +++ b/cc/layers/layer_position_constraint_unittest.cc
@@ -124,15 +124,15 @@ inner_viewport_container_layer_->SetMasksToBounds(true); scroll_layer_->SetElementId( LayerIdToElementIdForTesting(scroll_layer_->id())); - scroll_layer_->SetScrollClipLayerId(inner_viewport_container_layer_->id()); + scroll_layer_->SetScrollable(clip_bounds); scroll_layer_->SetIsContainerForFixedPositionLayers(true); outer_viewport_container_layer_->SetMasksToBounds(true); child_->SetElementId(LayerIdToElementIdForTesting(child_->id())); - child_->SetScrollClipLayerId(outer_viewport_container_layer_->id()); + child_->SetScrollable(clip_bounds); grand_child_->SetElementId( LayerIdToElementIdForTesting(grand_child_->id())); - grand_child_->SetScrollClipLayerId(outer_viewport_container_layer_->id()); + grand_child_->SetScrollable(clip_bounds); grand_child_->AddChild(great_grand_child_); child_->AddChild(grand_child_); @@ -1071,7 +1071,7 @@ great_grand_child_->SetIsContainerForFixedPositionLayers(true); great_grand_child_->SetElementId( LayerIdToElementIdForTesting(great_grand_child_->id())); - great_grand_child_->SetScrollClipLayerId(root_->id()); + great_grand_child_->SetScrollable(gfx::Size(100, 100)); great_great_grand_child->SetPositionConstraint(fixed_to_top_left_); CommitAndUpdateImplPointers();
diff --git a/cc/layers/layer_unittest.cc b/cc/layers/layer_unittest.cc index b1808b9..6355412b 100644 --- a/cc/layers/layer_unittest.cc +++ b/cc/layers/layer_unittest.cc
@@ -913,8 +913,7 @@ EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetContentsOpaque(true)); EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetPosition(gfx::PointF(4.f, 9.f))); // We can use any layer pointer here since we aren't syncing for real. - EXPECT_SET_NEEDS_COMMIT(2, - test_layer->SetScrollClipLayerId(test_layer->id())); + EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetScrollable(gfx::Size(1, 1))); EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetUserScrollable(true, false)); EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetScrollOffset( gfx::ScrollOffset(10, 10)));
diff --git a/cc/layers/painted_scrollbar_layer_impl_unittest.cc b/cc/layers/painted_scrollbar_layer_impl_unittest.cc index 3932b0e..2dd6d0b7 100644 --- a/cc/layers/painted_scrollbar_layer_impl_unittest.cc +++ b/cc/layers/painted_scrollbar_layer_impl_unittest.cc
@@ -57,9 +57,6 @@ scrollbar_layer_impl->set_thumb_ui_resource_id(thumb_uid); scrollbar_layer_impl->set_thumb_opacity(thumb_opacity); - DCHECK(impl.host_impl()->active_tree()->ScrollbarGeometriesNeedUpdate()); - impl.host_impl()->active_tree()->UpdateScrollbarGeometries(); - impl.CalcDrawProps(viewport_size); gfx::Rect thumb_rect = scrollbar_layer_impl->ComputeThumbQuadRect();
diff --git a/cc/layers/scrollbar_layer_unittest.cc b/cc/layers/scrollbar_layer_unittest.cc index fcd74017..32c0f39 100644 --- a/cc/layers/scrollbar_layer_unittest.cc +++ b/cc/layers/scrollbar_layer_unittest.cc
@@ -297,9 +297,9 @@ // Choose bounds to give max_scroll_offset = (30, 50). layer_tree_root->SetBounds(gfx::Size(70, 150)); - scroll_layer->SetScrollClipLayerId(layer_tree_root->id()); scroll_layer->SetScrollOffset(gfx::ScrollOffset(10, 20)); scroll_layer->SetBounds(gfx::Size(100, 200)); + scroll_layer->SetScrollable(gfx::Size(70, 150)); content_layer->SetBounds(gfx::Size(100, 200)); layer_tree_host_->SetRootLayer(layer_tree_root); @@ -322,6 +322,7 @@ cc_scrollbar_layer->clip_layer_length()); layer_tree_root->SetBounds(gfx::Size(700, 1500)); + scroll_layer->SetScrollable(gfx::Size(700, 1500)); scroll_layer->SetBounds(gfx::Size(1000, 2000)); scroll_layer->SetScrollOffset(gfx::ScrollOffset(100, 200)); content_layer->SetBounds(gfx::Size(1000, 2000)); @@ -344,32 +345,28 @@ cc_scrollbar_layer->clip_layer_length()); } -#define UPDATE_AND_EXTRACT_LAYER_POINTERS() \ - do { \ - scrollbar_layer->UpdateInternalContentScale(); \ - scrollbar_layer->UpdateThumbAndTrackGeometry(); \ - root_clip_layer_impl = layer_tree_host_->CommitAndCreateLayerImplTree(); \ - root_clip_layer_impl->layer_tree_impl()->UpdateScrollbarGeometries(); \ - scrollbar_layer_impl = static_cast<PaintedScrollbarLayerImpl*>( \ - root_clip_layer_impl->layer_tree_impl()->LayerById( \ - scrollbar_layer->id())); \ +#define UPDATE_AND_EXTRACT_LAYER_POINTERS() \ + do { \ + scrollbar_layer->UpdateInternalContentScale(); \ + scrollbar_layer->UpdateThumbAndTrackGeometry(); \ + root_layer_impl = layer_tree_host_->CommitAndCreateLayerImplTree(); \ + root_layer_impl->layer_tree_impl()->UpdateScrollbarGeometries(); \ + scrollbar_layer_impl = static_cast<PaintedScrollbarLayerImpl*>( \ + root_layer_impl->layer_tree_impl()->LayerById(scrollbar_layer->id())); \ } while (false) TEST_F(ScrollbarLayerTest, UpdatePropertiesOfScrollBarWhenThumbRemoved) { - scoped_refptr<Layer> root_clip_layer = Layer::Create(); scoped_refptr<Layer> root_layer = Layer::Create(); scoped_refptr<Layer> content_layer = Layer::Create(); scoped_refptr<FakePaintedScrollbarLayer> scrollbar_layer = FakePaintedScrollbarLayer::Create(false, true, root_layer->element_id()); - root_layer->SetScrollClipLayerId(root_clip_layer->id()); - // Give the root-clip a size that will result in MaxScrollOffset = (80, 0). - root_clip_layer->SetBounds(gfx::Size(20, 50)); + // Give the root layer a size that will result in MaxScrollOffset = (80, 0). + root_layer->SetScrollable(gfx::Size(20, 50)); root_layer->SetBounds(gfx::Size(100, 50)); content_layer->SetBounds(gfx::Size(100, 50)); - layer_tree_host_->SetRootLayer(root_clip_layer); - root_clip_layer->AddChild(root_layer); + layer_tree_host_->SetRootLayer(root_layer); root_layer->AddChild(content_layer); root_layer->AddChild(scrollbar_layer); @@ -380,7 +377,7 @@ scrollbar_layer->fake_scrollbar()->set_track_rect(gfx::Rect(30, 10, 50, 10)); scrollbar_layer->fake_scrollbar()->set_thumb_thickness(10); scrollbar_layer->fake_scrollbar()->set_thumb_length(4); - LayerImpl* root_clip_layer_impl = nullptr; + LayerImpl* root_layer_impl = nullptr; PaintedScrollbarLayerImpl* scrollbar_layer_impl = nullptr; layer_tree_host_->BuildPropertyTreesForTesting(); @@ -396,21 +393,18 @@ } TEST_F(ScrollbarLayerTest, ThumbRect) { - scoped_refptr<Layer> root_clip_layer = Layer::Create(); scoped_refptr<Layer> root_layer = Layer::Create(); scoped_refptr<Layer> content_layer = Layer::Create(); scoped_refptr<FakePaintedScrollbarLayer> scrollbar_layer = FakePaintedScrollbarLayer::Create(false, true, root_layer->element_id()); root_layer->SetElementId(LayerIdToElementIdForTesting(root_layer->id())); - root_layer->SetScrollClipLayerId(root_clip_layer->id()); - // Give the root-clip a size that will result in MaxScrollOffset = (80, 0). - root_clip_layer->SetBounds(gfx::Size(20, 50)); + // Give the root layer a size that will result in MaxScrollOffset = (80, 0). + root_layer->SetScrollable(gfx::Size(20, 50)); root_layer->SetBounds(gfx::Size(100, 50)); content_layer->SetBounds(gfx::Size(100, 50)); - layer_tree_host_->SetRootLayer(root_clip_layer); - root_clip_layer->AddChild(root_layer); + layer_tree_host_->SetRootLayer(root_layer); root_layer->AddChild(content_layer); root_layer->AddChild(scrollbar_layer); @@ -422,7 +416,7 @@ scrollbar_layer->fake_scrollbar()->set_thumb_thickness(10); scrollbar_layer->fake_scrollbar()->set_thumb_length(4); layer_tree_host_->UpdateLayers(); - LayerImpl* root_clip_layer_impl = nullptr; + LayerImpl* root_layer_impl = nullptr; PaintedScrollbarLayerImpl* scrollbar_layer_impl = nullptr; // Thumb is at the edge of the scrollbar (should be inset to @@ -475,18 +469,15 @@ } TEST_F(ScrollbarLayerTest, ThumbRectForOverlayLeftSideVerticalScrollbar) { - scoped_refptr<Layer> root_clip_layer = Layer::Create(); scoped_refptr<Layer> root_layer = Layer::Create(); // Create an overlay left side vertical scrollbar. scoped_refptr<FakePaintedScrollbarLayer> scrollbar_layer = FakePaintedScrollbarLayer::Create(false, true, VERTICAL, true, true, root_layer->element_id()); - root_layer->SetScrollClipLayerId(root_clip_layer->id()); - root_clip_layer->SetBounds(gfx::Size(50, 20)); + root_layer->SetScrollable(gfx::Size(20, 50)); root_layer->SetBounds(gfx::Size(50, 100)); - layer_tree_host_->SetRootLayer(root_clip_layer); - root_clip_layer->AddChild(root_layer); + layer_tree_host_->SetRootLayer(root_layer); root_layer->AddChild(scrollbar_layer); root_layer->SetScrollOffset(gfx::ScrollOffset(0, 0)); @@ -496,7 +487,7 @@ scrollbar_layer->fake_scrollbar()->set_thumb_thickness(10); scrollbar_layer->fake_scrollbar()->set_thumb_length(4); layer_tree_host_->UpdateLayers(); - LayerImpl* root_clip_layer_impl = nullptr; + LayerImpl* root_layer_impl = nullptr; PaintedScrollbarLayerImpl* scrollbar_layer_impl = nullptr; // Thumb is at the edge of the scrollbar (should be inset to @@ -542,9 +533,6 @@ scrollbar_layer_impl->SetClipLayerLength(200 / 3.f); scrollbar_layer_impl->SetScrollLayerLength(100 + 200 / 3.f); - DCHECK(layer_tree_host_->active_tree()->ScrollbarGeometriesNeedUpdate()); - layer_tree_host_->active_tree()->UpdateScrollbarGeometries(); - // Thickness should be overridden to 3. { std::unique_ptr<RenderPass> render_pass = RenderPass::Create(); @@ -598,7 +586,6 @@ scoped_refptr<Layer> layer_tree_root = Layer::Create(); scoped_refptr<Layer> scroll_layer = Layer::Create(); scroll_layer->SetElementId(LayerIdToElementIdForTesting(scroll_layer->id())); - scroll_layer->SetScrollClipLayerId(layer_tree_root->id()); scoped_refptr<Layer> child1 = Layer::Create(); scoped_refptr<Layer> child2; const bool kIsLeftSideVerticalScrollbar = false; @@ -612,6 +599,7 @@ // Choose layer bounds to give max_scroll_offset = (8, 8). layer_tree_root->SetBounds(gfx::Size(2, 2)); + scroll_layer->SetScrollable(gfx::Size(2, 2)); scroll_layer->SetBounds(gfx::Size(10, 10)); layer_tree_host_->UpdateLayers(); @@ -653,7 +641,6 @@ scoped_refptr<Layer> layer_tree_root = Layer::Create(); scoped_refptr<Layer> scroll_layer = Layer::Create(); - scroll_layer->SetScrollClipLayerId(layer_tree_root->id()); scroll_layer->SetElementId(ElementId(200)); scoped_refptr<Layer> child1 = Layer::Create(); scoped_refptr<SolidColorScrollbarLayer> scrollbar_layer; @@ -732,7 +719,6 @@ scoped_refptr<Layer> layer_tree_root = Layer::Create(); scoped_refptr<Layer> scroll_layer = Layer::Create(); scroll_layer->SetElementId(LayerIdToElementIdForTesting(scroll_layer->id())); - scroll_layer->SetScrollClipLayerId(layer_tree_root->id()); scoped_refptr<Layer> child1 = Layer::Create(); scoped_refptr<Layer> scrollbar_layer; const bool kIsLeftSideVerticalScrollbar = false; @@ -746,6 +732,7 @@ layer_tree_root->SetBounds(gfx::Size(2, 2)); scroll_layer->SetBounds(gfx::Size(10, 10)); + scroll_layer->SetScrollable(layer_tree_root->bounds()); layer_tree_host_->UpdateLayers(); LayerTreeHostImpl* host_impl = layer_tree_host_->host_impl(); host_impl->CreatePendingTree(); @@ -772,10 +759,7 @@ LayerTestCommon::LayerImplTest impl; - LayerImpl* clip_layer = impl.AddChildToRoot<LayerImpl>(); - LayerImpl* scroll_layer = impl.AddChild<LayerImpl>(clip_layer); - - scroll_layer->SetScrollClipLayer(clip_layer->id()); + LayerImpl* scroll_layer = impl.AddChildToRoot<LayerImpl>(); scroll_layer->SetElementId(LayerIdToElementIdForTesting(scroll_layer->id())); const int kTrackStart = 0; @@ -789,7 +773,7 @@ kIsLeftSideVerticalScrollbar, kIsOverlayScrollbar); scrollbar_layer->SetScrollElementId(scroll_layer->element_id()); - clip_layer->SetBounds(gfx::Size(980, 980)); + scroll_layer->SetScrollable(gfx::Size(980, 980)); scroll_layer->SetBounds(gfx::Size(980, 980)); impl.host_impl()->active_tree()->BuildPropertyTreesForTesting(); @@ -835,32 +819,41 @@ scroll_layer, HORIZONTAL, kThumbThickness, kTrackStart, kIsLeftSideVerticalScrollbar, kIsOverlayScrollbar); scrollbar_layer->SetScrollElementId(scroll_layer->element_id()); - DCHECK(impl.host_impl()->active_tree()->ScrollbarGeometriesNeedUpdate()); + EXPECT_TRUE(impl.host_impl()->active_tree()->ScrollbarGeometriesNeedUpdate()); impl.host_impl()->active_tree()->UpdateScrollbarGeometries(); - scroll_layer->SetScrollClipLayer(clip_layer->id()); - scroll_layer->SetScrollable(); - DCHECK(impl.host_impl()->active_tree()->ScrollbarGeometriesNeedUpdate()); + scroll_layer->SetBounds(gfx::Size(900, 900)); + // If the scroll layer is not scrollable, the bounds do not affect scrollbar + // geometries. + EXPECT_FALSE( + impl.host_impl()->active_tree()->ScrollbarGeometriesNeedUpdate()); + + scroll_layer->SetScrollable(gfx::Size(900, 900)); + EXPECT_TRUE(impl.host_impl()->active_tree()->ScrollbarGeometriesNeedUpdate()); impl.host_impl()->active_tree()->UpdateScrollbarGeometries(); clip_layer->SetBounds(gfx::Size(900, 900)); - DCHECK(impl.host_impl()->active_tree()->ScrollbarGeometriesNeedUpdate()); - impl.host_impl()->active_tree()->UpdateScrollbarGeometries(); + // The clip layer for scrolling is managed independently of the scroll + // container bounds so changing the clip does not require an update. + EXPECT_FALSE( + impl.host_impl()->active_tree()->ScrollbarGeometriesNeedUpdate()); scroll_layer->SetBounds(gfx::Size(980, 980)); - DCHECK(impl.host_impl()->active_tree()->ScrollbarGeometriesNeedUpdate()); + // Changes to the bounds should also require an update. + EXPECT_TRUE(impl.host_impl()->active_tree()->ScrollbarGeometriesNeedUpdate()); impl.host_impl()->active_tree()->UpdateScrollbarGeometries(); clip_layer->SetViewportBoundsDelta(gfx::Vector2dF(1, 2)); - DCHECK(impl.host_impl()->active_tree()->ScrollbarGeometriesNeedUpdate()); + EXPECT_TRUE(impl.host_impl()->active_tree()->ScrollbarGeometriesNeedUpdate()); impl.host_impl()->active_tree()->UpdateScrollbarGeometries(); // Not changing the current value should not require an update. - scroll_layer->SetScrollClipLayer(clip_layer->id()); + scroll_layer->SetScrollable(gfx::Size(900, 900)); clip_layer->SetBounds(gfx::Size(900, 900)); scroll_layer->SetBounds(gfx::Size(980, 980)); clip_layer->SetViewportBoundsDelta(gfx::Vector2dF(1, 2)); - DCHECK(!impl.host_impl()->active_tree()->ScrollbarGeometriesNeedUpdate()); + EXPECT_TRUE( + !impl.host_impl()->active_tree()->ScrollbarGeometriesNeedUpdate()); } class ScrollbarLayerSolidColorThumbTest : public testing::Test { @@ -909,8 +902,6 @@ horizontal_scrollbar_layer_->SetClipLayerLength(5.f); horizontal_scrollbar_layer_->SetScrollLayerLength(15.f); horizontal_scrollbar_layer_->SetBounds(gfx::Size(100, 3)); - DCHECK(host_impl_->active_tree()->ScrollbarGeometriesNeedUpdate()); - host_impl_->active_tree()->UpdateScrollbarGeometries(); EXPECT_EQ(33, horizontal_scrollbar_layer_->ComputeThumbQuadRect().width()); // The thumb's length should never be less than its thickness. @@ -922,9 +913,6 @@ TEST_F(ScrollbarLayerSolidColorThumbTest, SolidColorThumbPosition) { horizontal_scrollbar_layer_->SetBounds(gfx::Size(100, 3)); - DCHECK(host_impl_->active_tree()->ScrollbarGeometriesNeedUpdate()); - host_impl_->active_tree()->UpdateScrollbarGeometries(); - horizontal_scrollbar_layer_->SetCurrentPos(0.f); horizontal_scrollbar_layer_->SetClipLayerLength(12.f); horizontal_scrollbar_layer_->SetScrollLayerLength(112.f); @@ -953,9 +941,6 @@ layers[0]->SetBounds(gfx::Size(100, 3)); layers[1]->SetBounds(gfx::Size(3, 100)); - DCHECK(host_impl_->active_tree()->ScrollbarGeometriesNeedUpdate()); - host_impl_->active_tree()->UpdateScrollbarGeometries(); - EXPECT_EQ(gfx::Rect(20, 0, 20, 3), horizontal_scrollbar_layer_->ComputeThumbQuadRect()); EXPECT_EQ(gfx::Rect(0, 20, 3, 20), @@ -982,7 +967,6 @@ int expected_deleted, bool use_solid_color_scrollbar) { std::unique_ptr<Scrollbar> scrollbar(new FakeScrollbar(false, true, false)); - scoped_refptr<Layer> root_clip_layer = Layer::Create(); scoped_refptr<Layer> layer_tree_root = Layer::Create(); scoped_refptr<Layer> content_layer = Layer::Create(); scoped_refptr<Layer> scrollbar_layer; @@ -1004,7 +988,7 @@ scrollbar_layer->SetIsDrawable(true); scrollbar_layer->SetBounds(gfx::Size(100, 100)); - layer_tree_root->SetScrollClipLayerId(root_clip_layer->id()); + layer_tree_root->SetScrollable(gfx::Size(100, 200)); layer_tree_root->SetScrollOffset(gfx::ScrollOffset(10, 20)); layer_tree_root->SetBounds(gfx::Size(100, 200)); content_layer->SetBounds(gfx::Size(100, 200));
diff --git a/cc/layers/solid_color_scrollbar_layer_impl_unittest.cc b/cc/layers/solid_color_scrollbar_layer_impl_unittest.cc index 4cff576..a2b24303 100644 --- a/cc/layers/solid_color_scrollbar_layer_impl_unittest.cc +++ b/cc/layers/solid_color_scrollbar_layer_impl_unittest.cc
@@ -39,9 +39,6 @@ // SolidColorScrollbarLayers construct with opacity = 0.f, so override. scrollbar_layer_impl->test_properties()->opacity = 1.f; - DCHECK(impl.host_impl()->active_tree()->ScrollbarGeometriesNeedUpdate()); - impl.host_impl()->active_tree()->UpdateScrollbarGeometries(); - impl.CalcDrawProps(viewport_size); gfx::Rect thumb_rect = scrollbar_layer_impl->ComputeThumbQuadRect();
diff --git a/cc/output/in_process_context_provider.cc b/cc/output/in_process_context_provider.cc index 79e7adf..acadc43 100644 --- a/cc/output/in_process_context_provider.cc +++ b/cc/output/in_process_context_provider.cc
@@ -30,7 +30,6 @@ #include "third_party/skia/include/gpu/GrContext.h" #include "third_party/skia/include/gpu/gl/GrGLInterface.h" #include "ui/gfx/native_widget_types.h" -#include "ui/gl/gl_share_group.h" namespace cc {
diff --git a/cc/test/layer_tree_json_parser.cc b/cc/test/layer_tree_json_parser.cc index 426bc6fe..8987791 100644 --- a/cc/test/layer_tree_json_parser.cc +++ b/cc/test/layer_tree_json_parser.cc
@@ -98,29 +98,6 @@ if (dict->GetBoolean("ContentsOpaque", &contents_opaque)) new_layer->SetContentsOpaque(contents_opaque); - bool scrollable; - // TODO(wjmaclean) At some time in the future we may wish to test that a - // reconstructed layer tree contains the correct linkage for the scroll - // clip layer. This is complicated by the fact that the json output doesn't - // (currently) re-construct the tree with the same layer IDs as the original. - // But, since a clip layer is always an ancestor of the scrollable layer, we - // can just count the number of upwards hops to the clip layer and write that - // into the json file (with 0 hops implying no clip layer, i.e. not - // scrollable). Reconstructing the tree can then be accomplished by passing - // the parent pointer to this function and traversing the same number of - // ancestors to determine the pointer to the clip layer. The LayerTreesMatch() - // function should then check that both original and reconstructed layers - // have the same positioning with respect to their clip layers. - // - // For now, we can safely indicate a layer is scrollable by giving it a - // pointer to itself, something not normally allowed in a working tree. - // - // https://code.google.com/p/chromium/issues/detail?id=330622 - // - if (dict->GetBoolean("Scrollable", &scrollable)) - new_layer->SetScrollClipLayerId(scrollable ? new_layer->id() - : Layer::INVALID_ID); - bool is_3d_sorted; if (dict->GetBoolean("Is3DSorted", &is_3d_sorted)) { // A non-zero context ID will put the layer into a 3D sorting context
diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc index 14666f6..c3b179f 100644 --- a/cc/test/layer_tree_test.cc +++ b/cc/test/layer_tree_test.cc
@@ -57,18 +57,16 @@ inner_viewport_scroll_layer->AddChild(outer_viewport_container_layer); outer_viewport_container_layer->AddChild(outer_scroll_layer); - inner_viewport_scroll_layer->SetScrollClipLayerId( - inner_viewport_container_layer->id()); inner_viewport_scroll_layer->SetElementId( LayerIdToElementIdForTesting(inner_viewport_scroll_layer->id())); - outer_scroll_layer->SetScrollClipLayerId( - outer_viewport_container_layer->id()); outer_scroll_layer->SetElementId( LayerIdToElementIdForTesting(outer_scroll_layer->id())); inner_viewport_container_layer->SetBounds(inner_bounds); + inner_viewport_scroll_layer->SetScrollable(inner_bounds); inner_viewport_scroll_layer->SetBounds(outer_bounds); outer_viewport_container_layer->SetBounds(outer_bounds); + outer_scroll_layer->SetScrollable(outer_bounds); inner_viewport_scroll_layer->SetIsContainerForFixedPositionLayers(true); outer_scroll_layer->SetIsContainerForFixedPositionLayers(true);
diff --git a/cc/test/test_layer_tree_host_base.cc b/cc/test/test_layer_tree_host_base.cc index a252a59..76aa612 100644 --- a/cc/test/test_layer_tree_host_base.cc +++ b/cc/test/test_layer_tree_host_base.cc
@@ -115,7 +115,7 @@ if (!tile_size.IsEmpty()) pending_layer->set_fixed_tile_size(tile_size); pending_layer->SetDrawsContent(true); - pending_layer->SetScrollClipLayer(new_pending_root->id()); + pending_layer->SetScrollable(gfx::Size(1, 1)); pending_root = new_pending_root.get(); pending_tree->SetRootLayerForTesting(std::move(new_pending_root)); } else {
diff --git a/cc/trees/draw_property_utils.cc b/cc/trees/draw_property_utils.cc index 7578582..d9de4290f 100644 --- a/cc/trees/draw_property_utils.cc +++ b/cc/trees/draw_property_utils.cc
@@ -735,23 +735,6 @@ } } -static void UpdateScrollTree(ScrollTree* scroll_tree, - const LayerTreeHost* layer_tree_host) { - if (!scroll_tree->needs_update()) - return; - - for (int i = ScrollTree::kRootNodeId; - i < static_cast<int>(scroll_tree->size()); ++i) { - ScrollNode* scroll_node = scroll_tree->Node(i); - if (Layer* scroll_layer = - layer_tree_host->LayerById(scroll_node->owning_layer_id)) { - if (Layer* scroll_clip_layer = scroll_layer->scroll_clip_layer()) { - scroll_node->scroll_clip_layer_bounds = scroll_clip_layer->bounds(); - } - } - } -} - static void ComputeClips(PropertyTrees* property_trees) { DCHECK(!property_trees->transform_tree.needs_update()); ClipTree* clip_tree = &property_trees->clip_tree; @@ -886,7 +869,6 @@ property_trees->clip_tree.set_needs_update(true); property_trees->effect_tree.set_needs_update(true); } - UpdateScrollTree(&property_trees->scroll_tree, layer_tree_host); ComputeTransforms(&property_trees->transform_tree); ComputeEffects(&property_trees->effect_tree); // Computation of clips uses ToScreen which is updated while computing
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc index 1fe36ba..f7210f02 100644 --- a/cc/trees/layer_tree_host_common_unittest.cc +++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -537,30 +537,23 @@ LayerImpl::Create(host_impl.active_tree(), 2)); LayerImpl* scroll_layer = scroll_layer_scoped_ptr.get(); scroll_layer->SetBounds(gfx::Size(10, 20)); - std::unique_ptr<LayerImpl> clip_layer_scoped_ptr( - LayerImpl::Create(host_impl.active_tree(), 4)); - LayerImpl* clip_layer = clip_layer_scoped_ptr.get(); scroll_layer->SetElementId(LayerIdToElementIdForTesting(scroll_layer->id())); - scroll_layer->SetScrollClipLayer(clip_layer->id()); - clip_layer->SetBounds( + scroll_layer->SetScrollable( gfx::Size(scroll_layer->bounds().width() + kMaxScrollOffset.x(), scroll_layer->bounds().height() + kMaxScrollOffset.y())); - scroll_layer->SetScrollClipLayer(clip_layer->id()); SetScrollOffsetDelta(scroll_layer, kScrollDelta); gfx::Transform impl_transform; scroll_layer->test_properties()->AddChild(std::move(sublayer_scoped_ptr)); - LayerImpl* scroll_layer_raw_ptr = scroll_layer_scoped_ptr.get(); - clip_layer->test_properties()->AddChild(std::move(scroll_layer_scoped_ptr)); - scroll_layer_raw_ptr->layer_tree_impl() + scroll_layer_scoped_ptr->layer_tree_impl() ->property_trees() ->scroll_tree.UpdateScrollOffsetBaseForTesting( - scroll_layer_raw_ptr->element_id(), kScrollOffset); + scroll_layer_scoped_ptr->element_id(), kScrollOffset); std::unique_ptr<LayerImpl> root( LayerImpl::Create(host_impl.active_tree(), 3)); root->SetBounds(gfx::Size(3, 4)); - root->test_properties()->AddChild(std::move(clip_layer_scoped_ptr)); + root->test_properties()->AddChild(std::move(scroll_layer_scoped_ptr)); LayerImpl* root_layer = root.get(); host_impl.active_tree()->SetRootLayerForTesting(std::move(root)); @@ -1169,7 +1162,6 @@ root->SetDrawsContent(true); root->SetBounds(gfx::Size(100, 100)); child->SetDrawsContent(true); - child->SetScrollClipLayer(root->id()); child->SetBounds(gfx::Size(100, 100)); child->SetMasksToBounds(true); @@ -5322,7 +5314,7 @@ intervening->SetMasksToBounds(true); clip_parent->SetMasksToBounds(true); - intervening->SetScrollClipLayer(clip_parent->id()); + intervening->SetScrollable(gfx::Size(1, 1)); intervening->SetElementId(LayerIdToElementIdForTesting(intervening->id())); intervening->SetCurrentScrollOffset(gfx::ScrollOffset(3, 3)); @@ -6108,7 +6100,6 @@ fixed->test_properties()->position_constraint = constraint; scroller->SetElementId(LayerIdToElementIdForTesting(scroller->id())); - scroller->SetScrollClipLayer(container->id()); gfx::Transform container_transform; container_transform.Translate3d(10.0, 20.0, 0.0); @@ -6119,6 +6110,7 @@ container->SetBounds(gfx::Size(40, 40)); container->SetDrawsContent(true); scroller->SetBounds(gfx::Size(30, 30)); + scroller->SetScrollable(container->bounds()); scroller->SetDrawsContent(true); fixed->SetBounds(gfx::Size(50, 50)); fixed->SetDrawsContent(true); @@ -6232,7 +6224,7 @@ container->SetBounds(gfx::Size(50, 50)); scroller->SetBounds(gfx::Size(100, 100)); scroller->SetElementId(LayerIdToElementIdForTesting(scroller->id())); - scroller->SetScrollClipLayer(container->id()); + scroller->SetScrollable(container->bounds()); scroller->SetDrawsContent(true); gfx::Transform end_scale; @@ -6275,7 +6267,6 @@ host()->SetRootLayer(root); scroller->SetElementId(LayerIdToElementIdForTesting(scroller->id())); - scroller->SetScrollClipLayerId(container->id()); scroll_child->SetScrollParent(scroller.get()); gfx::Transform rotate; @@ -6283,6 +6274,7 @@ root->SetBounds(gfx::Size(50, 50)); container->SetBounds(gfx::Size(50, 50)); scroller->SetBounds(gfx::Size(100, 100)); + scroller->SetScrollable(container->bounds()); scroller->SetPosition(gfx::PointF(10.3f, 10.3f)); scroll_child->SetBounds(gfx::Size(10, 10)); scroll_child->SetTransform(rotate); @@ -6323,7 +6315,6 @@ scroller->AddChild(sticky_pos); host()->SetRootLayer(root); scroller->SetElementId(LayerIdToElementIdForTesting(scroller->id())); - scroller->SetScrollClipLayerId(container->id()); LayerStickyPositionConstraint sticky_position; sticky_position.is_sticky = true; @@ -6338,6 +6329,7 @@ root->SetBounds(gfx::Size(100, 100)); container->SetBounds(gfx::Size(100, 100)); scroller->SetBounds(gfx::Size(1000, 1000)); + scroller->SetScrollable(container->bounds()); sticky_pos->SetBounds(gfx::Size(10, 10)); sticky_pos->SetPosition(gfx::PointF(10, 20)); @@ -6396,7 +6388,6 @@ sticky_pos->SetScrollParent(scroller.get()); host()->SetRootLayer(root); scroller->SetElementId(LayerIdToElementIdForTesting(scroller->id())); - scroller->SetScrollClipLayerId(container->id()); // The sticky layer has already been scrolled on the main thread side, and has // stuck. This test then checks that further changes from cc-only scrolling @@ -6415,6 +6406,7 @@ container->SetBounds(gfx::Size(100, 100)); container->SetPosition(gfx::PointF(50, 50)); scroller->SetBounds(gfx::Size(1000, 1000)); + scroller->SetScrollable(container->bounds()); sticky_pos->SetBounds(gfx::Size(10, 10)); sticky_pos->SetPosition(gfx::PointF(60, 70)); @@ -6472,7 +6464,6 @@ scroller->AddChild(sticky_pos); host()->SetRootLayer(root); scroller->SetElementId(LayerIdToElementIdForTesting(scroller->id())); - scroller->SetScrollClipLayerId(container->id()); LayerStickyPositionConstraint sticky_position; sticky_position.is_sticky = true; @@ -6487,6 +6478,7 @@ root->SetBounds(gfx::Size(100, 100)); container->SetBounds(gfx::Size(100, 100)); scroller->SetBounds(gfx::Size(100, 1000)); + scroller->SetScrollable(container->bounds()); sticky_pos->SetBounds(gfx::Size(10, 10)); sticky_pos->SetPosition(gfx::PointF(0, 200)); @@ -6518,7 +6510,6 @@ scroller->AddChild(sticky_pos); host()->SetRootLayer(root); scroller->SetElementId(LayerIdToElementIdForTesting(scroller->id())); - scroller->SetScrollClipLayerId(container->id()); LayerStickyPositionConstraint sticky_position; sticky_position.is_sticky = true; @@ -6533,6 +6524,7 @@ root->SetBounds(gfx::Size(100, 100)); container->SetBounds(gfx::Size(100, 100)); scroller->SetBounds(gfx::Size(1000, 1000)); + scroller->SetScrollable(container->bounds()); sticky_pos->SetBounds(gfx::Size(10, 10)); sticky_pos->SetPosition(gfx::PointF(0, 150)); @@ -6586,7 +6578,6 @@ scroller->AddChild(sticky_pos); host()->SetRootLayer(root); scroller->SetElementId(LayerIdToElementIdForTesting(scroller->id())); - scroller->SetScrollClipLayerId(root->id()); LayerTreeHost::ViewportLayers viewport_layers; viewport_layers.page_scale = root; viewport_layers.inner_viewport_container = root; @@ -6604,6 +6595,7 @@ sticky_pos->SetStickyPositionConstraint(sticky_position); root->SetBounds(gfx::Size(100, 100)); + scroller->SetScrollable(gfx::Size(100, 100)); scroller->SetBounds(gfx::Size(100, 1000)); sticky_pos->SetBounds(gfx::Size(10, 10)); sticky_pos->SetPosition(gfx::PointF(0, 70)); @@ -6662,8 +6654,6 @@ outer_viewport->AddChild(sticky_pos); host()->SetRootLayer(root); scroller->SetElementId(LayerIdToElementIdForTesting(scroller->id())); - scroller->SetScrollClipLayerId(root->id()); - outer_viewport->SetScrollClipLayerId(outer_clip->id()); LayerTreeHost::ViewportLayers viewport_layers; viewport_layers.page_scale = root; viewport_layers.inner_viewport_container = root; @@ -6683,8 +6673,10 @@ sticky_pos->SetStickyPositionConstraint(sticky_position); root->SetBounds(gfx::Size(100, 100)); + scroller->SetScrollable(gfx::Size(100, 100)); scroller->SetBounds(gfx::Size(100, 1000)); outer_clip->SetBounds(gfx::Size(100, 100)); + outer_viewport->SetScrollable(gfx::Size(100, 100)); sticky_pos->SetBounds(gfx::Size(10, 10)); sticky_pos->SetPosition(gfx::PointF(0, 70)); @@ -6745,7 +6737,6 @@ scroller->AddChild(sticky_pos); host()->SetRootLayer(root); scroller->SetElementId(LayerIdToElementIdForTesting(scroller->id())); - scroller->SetScrollClipLayerId(container->id()); LayerStickyPositionConstraint sticky_position; sticky_position.is_sticky = true; @@ -6762,6 +6753,7 @@ root->SetBounds(gfx::Size(100, 100)); container->SetBounds(gfx::Size(100, 100)); scroller->SetBounds(gfx::Size(1000, 1000)); + scroller->SetScrollable(container->bounds()); sticky_pos->SetBounds(gfx::Size(10, 10)); sticky_pos->SetPosition(gfx::PointF(145, 0)); @@ -6850,7 +6842,6 @@ scroller->AddChild(sticky_pos); host()->SetRootLayer(root); scroller->SetElementId(LayerIdToElementIdForTesting(scroller->id())); - scroller->SetScrollClipLayerId(container->id()); LayerStickyPositionConstraint sticky_position; sticky_position.is_sticky = true; @@ -6865,6 +6856,7 @@ root->SetBounds(gfx::Size(100, 100)); container->SetBounds(gfx::Size(100, 100)); scroller->SetBounds(gfx::Size(1000, 1000)); + scroller->SetScrollable(container->bounds()); sticky_pos->SetBounds(gfx::Size(10, 10)); sticky_pos->SetPosition(gfx::PointF(10, 20)); @@ -6943,7 +6935,6 @@ sticky_container->AddChild(sticky_pos); host()->SetRootLayer(root); scroller->SetElementId(LayerIdToElementIdForTesting(scroller->id())); - scroller->SetScrollClipLayerId(container->id()); LayerStickyPositionConstraint sticky_position; sticky_position.is_sticky = true; @@ -6958,6 +6949,7 @@ root->SetBounds(gfx::Size(100, 100)); container->SetBounds(gfx::Size(100, 100)); scroller->SetBounds(gfx::Size(1000, 1000)); + scroller->SetScrollable(container->bounds()); sticky_container->SetPosition(gfx::PointF(20, 20)); sticky_container->SetBounds(gfx::Size(30, 30)); sticky_pos->SetBounds(gfx::Size(10, 10)); @@ -7041,7 +7033,6 @@ scroller->AddChild(sticky_pos); host()->SetRootLayer(root); scroller->SetElementId(LayerIdToElementIdForTesting(scroller->id())); - scroller->SetScrollClipLayerId(container->id()); gfx::Transform t; t.Scale(2, 2); sticky_pos->SetTransform(t); @@ -7059,6 +7050,7 @@ root->SetBounds(gfx::Size(100, 100)); container->SetBounds(gfx::Size(100, 100)); scroller->SetBounds(gfx::Size(1000, 1000)); + scroller->SetScrollable(container->bounds()); sticky_pos->SetBounds(gfx::Size(10, 10)); sticky_pos->SetPosition(gfx::PointF(0, 20)); @@ -7120,7 +7112,6 @@ sticky_container->AddChild(sticky_pos); host()->SetRootLayer(root); scroller->SetElementId(LayerIdToElementIdForTesting(scroller->id())); - scroller->SetScrollClipLayerId(container->id()); gfx::Transform t; t.Scale(2, 2); sticky_container->SetTransform(t); @@ -7138,6 +7129,7 @@ root->SetBounds(gfx::Size(100, 100)); container->SetBounds(gfx::Size(100, 100)); scroller->SetBounds(gfx::Size(1000, 1000)); + scroller->SetScrollable(container->bounds()); sticky_container->SetBounds(gfx::Size(50, 50)); sticky_pos->SetBounds(gfx::Size(10, 10)); sticky_pos->SetPosition(gfx::PointF(0, 20)); @@ -7199,11 +7191,11 @@ outer_sticky->AddChild(inner_sticky); host()->SetRootLayer(root); scroller->SetElementId(LayerIdToElementIdForTesting(scroller->id())); - scroller->SetScrollClipLayerId(container->id()); root->SetBounds(gfx::Size(100, 100)); container->SetBounds(gfx::Size(100, 100)); scroller->SetBounds(gfx::Size(100, 1000)); + scroller->SetScrollable(container->bounds()); outer_sticky->SetBounds(gfx::Size(10, 50)); outer_sticky->SetPosition(gfx::PointF(0, 50)); inner_sticky->SetBounds(gfx::Size(10, 10)); @@ -7300,12 +7292,12 @@ LayerPositionConstraint fixed_position; fixed_position.set_is_fixed_position(true); scroller->SetElementId(LayerIdToElementIdForTesting(scroller->id())); - scroller->SetScrollClipLayerId(container->id()); fixed_pos->SetPositionConstraint(fixed_position); root->SetBounds(gfx::Size(50, 50)); container->SetBounds(gfx::Size(50, 50)); scroller->SetBounds(gfx::Size(50, 50)); + scroller->SetScrollable(container->bounds()); fixed_pos->SetBounds(gfx::Size(50, 50)); gfx::Transform rotate; @@ -7345,12 +7337,12 @@ LayerPositionConstraint fixed_position; fixed_position.set_is_fixed_position(true); scroller->SetElementId(LayerIdToElementIdForTesting(scroller->id())); - scroller->SetScrollClipLayerId(container->id()); fixed_pos->SetPositionConstraint(fixed_position); root->SetBounds(gfx::Size(50, 50)); container->SetBounds(gfx::Size(50, 50)); scroller->SetBounds(gfx::Size(100, 100)); + scroller->SetScrollable(container->bounds()); scroller->SetPosition(gfx::PointF(10.3f, 10.3f)); fixed_pos->SetBounds(gfx::Size(10, 10)); @@ -8212,11 +8204,6 @@ inner_viewport_scroll_layer->AddChild(outer_viewport_container_layer); outer_viewport_container_layer->AddChild(outer_viewport_scroll_layer); - inner_viewport_scroll_layer->SetScrollClipLayerId( - inner_viewport_container_layer->id()); - outer_viewport_scroll_layer->SetScrollClipLayerId( - outer_viewport_container_layer->id()); - inner_viewport_scroll_layer->SetIsContainerForFixedPositionLayers(true); outer_viewport_scroll_layer->SetIsContainerForFixedPositionLayers(true); @@ -8592,7 +8579,7 @@ scroller->SetElementId(LayerIdToElementIdForTesting(scroller->id())); scroller->SetCurrentScrollOffset(gfx::ScrollOffset(100, 100)); scroller->SetElementId(LayerIdToElementIdForTesting(scroller->id())); - scroller->SetScrollClipLayer(frame_clip->id()); + scroller->SetScrollable(frame_clip->bounds()); scroller->SetDrawsContent(true); fixed->SetPosition(gfx::PointF(100, 100)); fixed->SetBounds(gfx::Size(50, 50)); @@ -8943,7 +8930,6 @@ player.get()); player->AddAnimation(std::move(transform_animation)); grandchild_ptr->set_visible_layer_rect(gfx::Rect()); - child_ptr->SetScrollClipLayer(root_ptr->id()); root_ptr->test_properties()->transform = singular; child_ptr->test_properties()->transform = singular; root_ptr->layer_tree_impl()->property_trees()->needs_rebuild = true; @@ -9749,7 +9735,6 @@ scroll_parent->test_properties()->scroll_children = base::MakeUnique<std::set<LayerImpl*>>(); scroll_parent->test_properties()->scroll_children->insert(scroll_child); - scroll_parent->SetScrollClipLayer(scroll_clip->id()); scroll_parent->SetDrawsContent(true); scroll_child->SetDrawsContent(true); @@ -10037,22 +10022,25 @@ child9->AddChild(grand_child12); host()->SetRootLayer(root1); + root1->SetBounds(gfx::Size(1, 1)); parent2->AddMainThreadScrollingReasons( MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects); parent2->AddMainThreadScrollingReasons( MainThreadScrollingReason::kScrollbarScrolling); parent2->SetElementId(LayerIdToElementIdForTesting(parent2->id())); - parent2->SetScrollClipLayerId(root1->id()); + parent2->SetScrollable(root1->bounds()); child6->AddMainThreadScrollingReasons( MainThreadScrollingReason::kScrollbarScrolling); grand_child10->AddMainThreadScrollingReasons( MainThreadScrollingReason::kScrollbarScrolling); - child7->SetScrollClipLayerId(parent3->id()); + parent3->SetBounds(gfx::Size(2, 2)); + child7->SetScrollable(parent3->bounds()); child7->SetElementId(LayerIdToElementIdForTesting(child7->id())); child8->SetScrollParent(child7.get()); - grand_child11->SetScrollClipLayerId(parent3->id()); + child8->SetBounds(gfx::Size(3, 3)); + grand_child11->SetScrollable(child8->bounds()); grand_child11->SetElementId( LayerIdToElementIdForTesting(grand_child11->id())); @@ -10087,6 +10075,7 @@ // The node owned by root1 ScrollNode scroll_root1; scroll_root1.id = 1; + scroll_root1.bounds = root1->bounds(); scroll_root1.owning_layer_id = root1->id(); scroll_root1.user_scrollable_horizontal = true; scroll_root1.user_scrollable_vertical = true; @@ -10141,6 +10130,7 @@ scroll_grand_child11.owning_layer_id = grand_child11->id(); scroll_grand_child11.element_id = grand_child11->element_id(); scroll_grand_child11.scrollable = true; + scroll_grand_child11.scroll_clip_layer_bounds = child8->bounds(); scroll_grand_child11.user_scrollable_horizontal = true; scroll_grand_child11.user_scrollable_vertical = true; scroll_grand_child11.transform_id = grand_child11->transform_tree_index();
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc index 1aa17af9..3e781b3 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc
@@ -2017,6 +2017,10 @@ return !!InnerViewportScrollLayer(); } +LayerImpl* LayerTreeHostImpl::InnerViewportContainerLayer() const { + return active_tree_->InnerViewportContainerLayer(); +} + LayerImpl* LayerTreeHostImpl::InnerViewportScrollLayer() const { return active_tree_->InnerViewportScrollLayer(); } @@ -2029,6 +2033,10 @@ return scroll_tree.Node(inner_viewport_scroll_layer->scroll_tree_index()); } +LayerImpl* LayerTreeHostImpl::OuterViewportContainerLayer() const { + return active_tree_->OuterViewportContainerLayer(); +} + LayerImpl* LayerTreeHostImpl::OuterViewportScrollLayer() const { return active_tree_->OuterViewportScrollLayer(); }
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h index 8c765ef..b5510a6 100644 --- a/cc/trees/layer_tree_host_impl.h +++ b/cc/trees/layer_tree_host_impl.h
@@ -439,8 +439,10 @@ virtual void ActivateSyncTree(); // Shortcuts to layers/nodes on the active tree. + LayerImpl* InnerViewportContainerLayer() const; LayerImpl* InnerViewportScrollLayer() const; ScrollNode* InnerViewportScrollNode() const; + LayerImpl* OuterViewportContainerLayer() const; LayerImpl* OuterViewportScrollLayer() const; ScrollNode* OuterViewportScrollNode() const; ScrollNode* CurrentlyScrollingNode();
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc index f37061a..9f362a34 100644 --- a/cc/trees/layer_tree_host_impl_unittest.cc +++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -339,13 +339,14 @@ std::unique_ptr<LayerImpl> inner_clip = LayerImpl::Create(layer_tree_impl, kInnerViewportClipLayerId); - inner_clip->SetBounds( - gfx::Size(content_size.width() / 2, content_size.height() / 2)); + gfx::Size viewport_scroll_bounds = + gfx::Size(content_size.width() / 2, content_size.height() / 2); + inner_clip->SetBounds(viewport_scroll_bounds); std::unique_ptr<LayerImpl> page_scale = LayerImpl::Create(layer_tree_impl, kPageScaleLayerId); - inner_scroll->SetScrollClipLayer(inner_clip->id()); + inner_scroll->SetScrollable(viewport_scroll_bounds); inner_scroll->SetElementId( LayerIdToElementIdForTesting(inner_scroll->id())); inner_scroll->SetBounds(content_size); @@ -359,7 +360,7 @@ std::unique_ptr<LayerImpl> outer_scroll = LayerImpl::Create(layer_tree_impl, kOuterViewportScrollLayerId); - outer_scroll->SetScrollClipLayer(outer_clip->id()); + outer_scroll->SetScrollable(content_size); outer_scroll->SetElementId( LayerIdToElementIdForTesting(outer_scroll->id())); outer_scroll->layer_tree_impl() @@ -414,13 +415,9 @@ root->SetBounds(content_size); root->SetPosition(gfx::PointF()); - std::unique_ptr<LayerImpl> clip = LayerImpl::Create(layer_tree_impl, 2); - clip->SetBounds(content_size); - clip->SetPosition(gfx::PointF()); - std::unique_ptr<LayerImpl> scroll = LayerImpl::Create(layer_tree_impl, 3); scroll->SetBounds(scroll_content_size); - scroll->SetScrollClipLayer(clip->id()); + scroll->SetScrollable(content_size); scroll->SetElementId(LayerIdToElementIdForTesting(scroll->id())); scroll->SetDrawsContent(true); @@ -451,10 +448,9 @@ squash2->SetDrawsContent(true); scroll->test_properties()->AddChild(std::move(squash2)); - clip->test_properties()->AddChild(std::move(scroll)); - clip->test_properties()->AddChild(std::move(scrollbar)); - clip->test_properties()->AddChild(std::move(squash1)); - root->test_properties()->AddChild(std::move(clip)); + root->test_properties()->AddChild(std::move(scroll)); + root->test_properties()->AddChild(std::move(scrollbar)); + root->test_properties()->AddChild(std::move(squash1)); layer_tree_impl->SetRootLayerForTesting(std::move(root)); layer_tree_impl->BuildPropertyTreesForTesting(); @@ -496,6 +492,7 @@ ->children.back(); content_layer->SetBounds(content_size); host_impl_->OuterViewportScrollLayer()->SetBounds(content_size); + host_impl_->OuterViewportScrollLayer()->SetScrollable(viewport_size); LayerImpl* outer_clip = host_impl_->OuterViewportScrollLayer()->test_properties()->parent; @@ -507,6 +504,7 @@ ->parent; inner_clip_layer->SetBounds(viewport_size); host_impl_->InnerViewportScrollLayer()->SetBounds(viewport_size); + host_impl_->InnerViewportScrollLayer()->SetScrollable(viewport_size); host_impl_->active_tree()->BuildPropertyTreesForTesting(); @@ -517,17 +515,15 @@ } std::unique_ptr<LayerImpl> CreateScrollableLayer(int id, - const gfx::Size& size, - LayerImpl* clip_layer) { - DCHECK(clip_layer); - DCHECK(id != clip_layer->id()); + const gfx::Size& size) { std::unique_ptr<LayerImpl> layer = LayerImpl::Create(host_impl_->active_tree(), id); - layer->SetScrollClipLayer(clip_layer->id()); layer->SetElementId(LayerIdToElementIdForTesting(layer->id())); layer->SetDrawsContent(true); layer->SetBounds(size); - clip_layer->SetBounds(gfx::Size(size.width() / 2, size.height() / 2)); + gfx::Size scroll_container_bounds = + gfx::Size(size.width() / 2, size.height() / 2); + layer->SetScrollable(scroll_container_bounds); return layer; } @@ -809,21 +805,17 @@ gfx::ScrollOffset scroll_offset(20, 30); gfx::Vector2d scroll_delta(11, -15); - auto root_clip_owned = LayerImpl::Create(host_impl_->active_tree(), 2); - auto* root_clip = root_clip_owned.get(); auto root_owned = LayerImpl::Create(host_impl_->active_tree(), 1); auto* root = root_owned.get(); - root_clip->SetBounds(gfx::Size(10, 10)); - root_clip->test_properties()->AddChild(std::move(root_owned)); root->SetBounds(gfx::Size(110, 110)); - root->SetScrollClipLayer(root_clip->id()); + root->SetScrollable(gfx::Size(10, 10)); root->SetElementId(LayerIdToElementIdForTesting(root->id())); root->layer_tree_impl() ->property_trees() ->scroll_tree.UpdateScrollOffsetBaseForTesting(root->element_id(), scroll_offset); - host_impl_->active_tree()->SetRootLayerForTesting(std::move(root_clip_owned)); + host_impl_->active_tree()->SetRootLayerForTesting(std::move(root_owned)); host_impl_->active_tree()->BuildPropertyTreesForTesting(); std::unique_ptr<ScrollAndScaleSet> scroll_info; @@ -857,20 +849,14 @@ int id = outer_viewport_scroll_layer->id(); std::unique_ptr<LayerImpl> child = LayerImpl::Create(host_impl_->active_tree(), id + 2); - std::unique_ptr<LayerImpl> child_clip = - LayerImpl::Create(host_impl_->active_tree(), id + 3); - child_clip->SetBounds(gfx::Size(100, 100)); - - child->SetScrollClipLayer(child_clip->id()); + child->SetScrollable(gfx::Size(100, 100)); child->SetElementId(LayerIdToElementIdForTesting(child->id())); child->SetBounds(gfx::Size(100, 400)); child->SetPosition(gfx::PointF()); child->SetDrawsContent(true); - child_clip->test_properties()->AddChild(std::move(child)); - outer_viewport_scroll_layer->test_properties()->AddChild( - std::move(child_clip)); + outer_viewport_scroll_layer->test_properties()->AddChild(std::move(child)); host_impl_->active_tree()->BuildPropertyTreesForTesting(); base::HistogramTester histogram_tester; @@ -1196,13 +1182,9 @@ root->SetBounds(content_size); root->SetPosition(gfx::PointF()); - std::unique_ptr<LayerImpl> clip = LayerImpl::Create(layer_tree_impl, 2); - clip->SetBounds(content_size); - clip->SetPosition(gfx::PointF()); - std::unique_ptr<LayerImpl> scroll = LayerImpl::Create(layer_tree_impl, 3); scroll->SetBounds(scroll_content_size); - scroll->SetScrollClipLayer(clip->id()); + scroll->SetScrollable(content_size); scroll->SetElementId(LayerIdToElementIdForTesting(scroll->id())); scroll->SetDrawsContent(true); @@ -1222,8 +1204,7 @@ scroll->test_properties()->AddChild(std::move(drawn_scrollbar)); scroll->test_properties()->AddChild(std::move(squash)); - clip->test_properties()->AddChild(std::move(scroll)); - root->test_properties()->AddChild(std::move(clip)); + root->test_properties()->AddChild(std::move(scroll)); layer_tree_impl->SetRootLayerForTesting(std::move(root)); layer_tree_impl->BuildPropertyTreesForTesting(); @@ -1446,8 +1427,7 @@ ASSERT_EQ(1u, scroll_layer->test_properties()->children.size()); LayerImpl* overflow = scroll_layer->test_properties()->children[0]; overflow->SetBounds(overflow_size); - overflow->SetScrollClipLayer( - scroll_layer->test_properties()->parent->test_properties()->parent->id()); + overflow->SetScrollable(gfx::Size(100, 100)); overflow->SetElementId(LayerIdToElementIdForTesting(overflow->id())); overflow->layer_tree_impl() ->property_trees() @@ -1763,7 +1743,7 @@ DrawFrame(); EXPECT_EQ(scroll_layer, host_impl_->InnerViewportScrollLayer()); - LayerImpl* container_layer = scroll_layer->scroll_clip_layer(); + LayerImpl* container_layer = host_impl_->InnerViewportContainerLayer(); EXPECT_EQ(gfx::Size(50, 50), container_layer->bounds()); float min_page_scale = 1.f, max_page_scale = 4.f; @@ -2165,19 +2145,15 @@ LayerImpl* child; LayerImpl* child_clip; - std::unique_ptr<LayerImpl> scroll_parent_clip = - LayerImpl::Create(host_impl_->active_tree(), 6); std::unique_ptr<LayerImpl> scroll_parent = - CreateScrollableLayer(7, gfx::Size(10, 10), scroll_parent_clip.get()); + CreateScrollableLayer(7, gfx::Size(10, 10)); parent = scroll_parent.get(); - scroll_parent_clip->test_properties()->AddChild(std::move(scroll_parent)); - - viewport_scroll->test_properties()->AddChild(std::move(scroll_parent_clip)); + viewport_scroll->test_properties()->AddChild(std::move(scroll_parent)); std::unique_ptr<LayerImpl> scroll_child_clip = LayerImpl::Create(host_impl_->active_tree(), 8); std::unique_ptr<LayerImpl> scroll_child = - CreateScrollableLayer(9, gfx::Size(10, 10), scroll_child_clip.get()); + CreateScrollableLayer(9, gfx::Size(10, 10)); child = scroll_child.get(); scroll_child->SetPosition(gfx::PointF(20.f, 20.f)); scroll_child_clip->test_properties()->AddChild(std::move(scroll_child)); @@ -2791,7 +2767,7 @@ DrawFrame(); LayerImpl* inner_scroll = host_impl_->InnerViewportScrollLayer(); - LayerImpl* inner_container = inner_scroll->scroll_clip_layer(); + LayerImpl* inner_container = host_impl_->InnerViewportContainerLayer(); DCHECK(inner_scroll); DCHECK(inner_container); EXPECT_EQ(gfx::ScrollOffset(50, 50), inner_scroll->MaxScrollOffset()); @@ -3232,14 +3208,17 @@ gfx::Size content_size(1000, 1000); const int horiz_id = 11; - const int child_clip_id = 14; const int child_scroll_id = 15; CreateScrollAndContentsLayers(host_impl_->active_tree(), content_size); host_impl_->active_tree()->InnerViewportContainerLayer()->SetBounds( inner_viewport_size); + host_impl_->active_tree()->InnerViewportScrollLayer()->SetScrollable( + inner_viewport_size); host_impl_->active_tree()->OuterViewportContainerLayer()->SetBounds( outer_viewport_size); + host_impl_->active_tree()->OuterViewportScrollLayer()->SetScrollable( + outer_viewport_size); LayerImpl* root_scroll = host_impl_->active_tree()->OuterViewportScrollLayer(); std::unique_ptr<SolidColorScrollbarLayerImpl> horiz_scrollbar = @@ -3248,8 +3227,6 @@ std::unique_ptr<LayerImpl> child = LayerImpl::Create(host_impl_->active_tree(), child_scroll_id); child->SetBounds(content_size); - std::unique_ptr<LayerImpl> child_clip = - LayerImpl::Create(host_impl_->active_tree(), child_clip_id); child->SetBounds(inner_viewport_size); horiz_scrollbar->SetScrollElementId(root_scroll->element_id()); @@ -3274,7 +3251,6 @@ const int horiz_1_id = 11; const int vert_2_id = 12; const int horiz_2_id = 13; - const int child_clip_id = 14; const int child_scroll_id = 15; CreateScrollAndContentsLayers(host_impl_->active_tree(), content_size); @@ -3306,12 +3282,8 @@ std::unique_ptr<LayerImpl> child = LayerImpl::Create(host_impl_->active_tree(), child_scroll_id); - child->SetBounds(content_size); - std::unique_ptr<LayerImpl> child_clip = - LayerImpl::Create(host_impl_->active_tree(), child_clip_id); child->SetBounds(viewport_size); LayerImpl* child_ptr = child.get(); - LayerImpl* child_clip_ptr = child_clip.get(); host_impl_->active_tree()->BuildPropertyTreesForTesting(); @@ -3337,11 +3309,10 @@ animation_task_ = base::Closure(); // Check scrollbar registration on a sublayer. - child->SetScrollClipLayer(child_clip->id()); + child->SetScrollable(viewport_size); child->SetElementId(LayerIdToElementIdForTesting(child->id())); ElementId child_scroll_element_id = child->element_id(); - child_clip->test_properties()->AddChild(std::move(child)); - root_scroll->test_properties()->AddChild(std::move(child_clip)); + root_scroll->test_properties()->AddChild(std::move(child)); EXPECT_EQ(0ul, host_impl_->ScrollbarsFor(child_scroll_element_id).size()); EXPECT_EQ(nullptr, host_impl_->ScrollbarAnimationControllerForElementId( child_scroll_element_id)); @@ -3357,7 +3328,7 @@ // Changing one of the child layers should result in a scrollbar animation // update. animation_task_ = base::Closure(); - child_clip_ptr->SetBounds(gfx::Size(200, 200)); + child_ptr->SetBounds(gfx::Size(200, 200)); child_ptr->set_needs_show_scrollbars(true); host_impl_->active_tree()->BuildPropertyTreesForTesting(); host_impl_->active_tree()->HandleScrollbarShowRequestsFromMain(); @@ -4229,7 +4200,6 @@ TEST_F(LayerTreeHostImplTest, ScrollRootIgnored) { std::unique_ptr<LayerImpl> root = LayerImpl::Create(host_impl_->active_tree(), 1); - root->SetScrollClipLayer(Layer::INVALID_ID); root->test_properties()->force_render_surface = true; host_impl_->active_tree()->SetRootLayerForTesting(std::move(root)); host_impl_->active_tree()->BuildPropertyTreesForTesting(); @@ -4325,7 +4295,7 @@ std::unique_ptr<LayerImpl> outer_clip = LayerImpl::Create(tree_impl, 5); root_clip->SetBounds(inner_viewport_size); - root->SetScrollClipLayer(root_clip->id()); + root->SetScrollable(inner_viewport_size); root->SetElementId(LayerIdToElementIdForTesting(root->id())); root->SetBounds(outer_viewport_size); root->SetPosition(gfx::PointF()); @@ -4333,7 +4303,7 @@ root_clip->test_properties()->force_render_surface = true; root->test_properties()->is_container_for_fixed_position_layers = true; outer_clip->SetBounds(outer_viewport_size); - outer_scroll->SetScrollClipLayer(outer_clip->id()); + outer_scroll->SetScrollable(outer_viewport_size); outer_scroll->SetElementId( LayerIdToElementIdForTesting(outer_scroll->id())); outer_scroll->SetBounds(scroll_layer_size); @@ -4778,14 +4748,10 @@ LayerImpl* outer_viewport_scroll_layer = host_impl_->active_tree()->OuterViewportScrollLayer(); int id = outer_viewport_scroll_layer->id(); - std::unique_ptr<LayerImpl> child = LayerImpl::Create(host_impl_->active_tree(), id + 2); - std::unique_ptr<LayerImpl> child_clip = - LayerImpl::Create(host_impl_->active_tree(), id + 3); - child_clip->SetBounds(sub_content_layer_size); - child->SetScrollClipLayer(child_clip->id()); + child->SetScrollable(sub_content_layer_size); child->SetElementId(LayerIdToElementIdForTesting(child->id())); child->SetBounds(sub_content_size); child->SetPosition(gfx::PointF()); @@ -4794,9 +4760,7 @@ // scroll child to limit SetScrollOffsetDelta(child.get(), gfx::Vector2dF(0, 100.f)); - child_clip->test_properties()->AddChild(std::move(child)); - outer_viewport_scroll_layer->test_properties()->AddChild( - std::move(child_clip)); + outer_viewport_scroll_layer->test_properties()->AddChild(std::move(child)); host_impl_->active_tree()->BuildPropertyTreesForTesting(); // Scroll 25px to hide browser controls @@ -5329,19 +5293,19 @@ content_layer->SetPosition(gfx::PointF()); content_layer->SetBounds(contents_size); - LayerImpl* scroll_clip_layer = + LayerImpl* scroll_container_layer = CreateBasicVirtualViewportLayers(surface_size, surface_size); std::unique_ptr<LayerImpl> scroll_layer = LayerImpl::Create(host_impl_->active_tree(), 12); - scroll_layer->SetScrollClipLayer(scroll_clip_layer->id()); + scroll_layer->SetScrollable(surface_size); scroll_layer->SetElementId(LayerIdToElementIdForTesting(scroll_layer->id())); scroll_layer->SetBounds(contents_size); scroll_layer->SetPosition(gfx::PointF()); scroll_layer->test_properties()->AddChild(std::move(content_layer)); - scroll_clip_layer->test_properties()->AddChild(std::move(scroll_layer)); + scroll_container_layer->test_properties()->AddChild(std::move(scroll_layer)); - scroll_clip_layer->test_properties()->force_render_surface = true; + scroll_container_layer->test_properties()->force_render_surface = true; host_impl_->active_tree()->BuildPropertyTreesForTesting(); host_impl_->SetViewportSize(surface_size); @@ -5365,8 +5329,7 @@ LayerImpl* root = CreateBasicVirtualViewportLayers(surface_size, surface_size); - root->test_properties()->AddChild( - CreateScrollableLayer(12, contents_size, root)); + root->test_properties()->AddChild(CreateScrollableLayer(12, contents_size)); root->test_properties()->force_render_surface = true; host_impl_->active_tree()->BuildPropertyTreesForTesting(); @@ -5388,8 +5351,7 @@ gfx::Size surface_size(10, 10); std::unique_ptr<LayerImpl> root = LayerImpl::Create(host_impl_->active_tree(), 1); - root->test_properties()->AddChild( - CreateScrollableLayer(2, surface_size, root.get())); + root->test_properties()->AddChild(CreateScrollableLayer(2, surface_size)); root->test_properties()->force_render_surface = true; host_impl_->active_tree()->SetRootLayerForTesting(std::move(root)); host_impl_->active_tree()->BuildPropertyTreesForTesting(); @@ -5414,8 +5376,7 @@ std::unique_ptr<LayerImpl> root = LayerImpl::Create(host_impl_->active_tree(), 1); root->test_properties()->force_render_surface = true; - std::unique_ptr<LayerImpl> child = - CreateScrollableLayer(2, surface_size, root.get()); + std::unique_ptr<LayerImpl> child = CreateScrollableLayer(2, surface_size); gfx::Transform matrix; matrix.RotateAboutXAxis(180.0); @@ -5443,23 +5404,17 @@ TEST_F(LayerTreeHostImplTest, ScrollBlockedByContentLayer) { gfx::Size surface_size(10, 10); - std::unique_ptr<LayerImpl> clip_layer = - LayerImpl::Create(host_impl_->active_tree(), 3); std::unique_ptr<LayerImpl> content_layer = - CreateScrollableLayer(1, surface_size, clip_layer.get()); + CreateScrollableLayer(1, surface_size); content_layer->set_main_thread_scrolling_reasons( MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects); - content_layer->SetScrollClipLayer(Layer::INVALID_ID); // Note: we can use the same clip layer for both since both calls to // CreateScrollableLayer() use the same surface size. std::unique_ptr<LayerImpl> scroll_layer = - CreateScrollableLayer(2, surface_size, clip_layer.get()); + CreateScrollableLayer(2, surface_size); scroll_layer->test_properties()->AddChild(std::move(content_layer)); - clip_layer->test_properties()->AddChild(std::move(scroll_layer)); - clip_layer->test_properties()->force_render_surface = true; - - host_impl_->active_tree()->SetRootLayerForTesting(std::move(clip_layer)); + host_impl_->active_tree()->SetRootLayerForTesting(std::move(scroll_layer)); host_impl_->active_tree()->BuildPropertyTreesForTesting(); host_impl_->SetViewportSize(surface_size); @@ -5481,23 +5436,18 @@ SetupScrollAndContentsLayers(viewport_size); // Setup the layers so that the outer viewport is scrollable. - host_impl_->active_tree() - ->InnerViewportScrollLayer() - ->test_properties() - ->parent->SetBounds(viewport_size); - host_impl_->active_tree()->OuterViewportScrollLayer()->SetBounds( - gfx::Size(40, 40)); + host_impl_->InnerViewportScrollLayer()->test_properties()->parent->SetBounds( + viewport_size); + host_impl_->OuterViewportScrollLayer()->SetBounds(gfx::Size(40, 40)); host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 2.f); DrawFrame(); - LayerImpl* root_scroll = - host_impl_->active_tree()->OuterViewportScrollLayer(); - LayerImpl* inner_scroll = - host_impl_->active_tree()->InnerViewportScrollLayer(); - EXPECT_EQ(viewport_size, root_scroll->scroll_clip_layer()->bounds()); + LayerImpl* root_container = host_impl_->OuterViewportContainerLayer(); + EXPECT_EQ(viewport_size, root_container->bounds()); gfx::Vector2d scroll_delta(0, 10); gfx::Vector2d expected_scroll_delta = scroll_delta; + LayerImpl* root_scroll = host_impl_->OuterViewportScrollLayer(); gfx::ScrollOffset expected_max_scroll = root_scroll->MaxScrollOffset(); EXPECT_EQ( InputHandler::SCROLL_ON_IMPL_THREAD, @@ -5512,6 +5462,7 @@ std::unique_ptr<ScrollAndScaleSet> scroll_info = host_impl_->ProcessScrollDeltas(); + LayerImpl* inner_scroll = host_impl_->InnerViewportScrollLayer(); EXPECT_TRUE(ScrollInfoContains(*scroll_info.get(), inner_scroll->element_id(), expected_scroll_delta)); @@ -5530,25 +5481,20 @@ SetupScrollAndContentsLayers(viewport_size); // Setup the layers so that the outer viewport is scrollable. - host_impl_->active_tree() - ->InnerViewportScrollLayer() - ->test_properties() - ->parent->SetBounds(viewport_size); - host_impl_->active_tree()->OuterViewportScrollLayer()->SetBounds( - gfx::Size(40, 40)); + host_impl_->InnerViewportScrollLayer()->test_properties()->parent->SetBounds( + viewport_size); + host_impl_->OuterViewportScrollLayer()->SetBounds(gfx::Size(40, 40)); host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 2.f); host_impl_->active_tree()->BuildPropertyTreesForTesting(); DrawFrame(); - LayerImpl* root_scroll = - host_impl_->active_tree()->OuterViewportScrollLayer(); - LayerImpl* inner_scroll = - host_impl_->active_tree()->InnerViewportScrollLayer(); - EXPECT_EQ(viewport_size, root_scroll->scroll_clip_layer()->bounds()); + LayerImpl* root_container = host_impl_->OuterViewportContainerLayer(); + EXPECT_EQ(viewport_size, root_container->bounds()); gfx::Vector2d scroll_delta(0, 10); gfx::Vector2d expected_scroll_delta = scroll_delta; + LayerImpl* root_scroll = host_impl_->OuterViewportScrollLayer(); gfx::ScrollOffset expected_max_scroll = root_scroll->MaxScrollOffset(); EXPECT_EQ( InputHandler::SCROLL_ON_IMPL_THREAD, @@ -5571,6 +5517,7 @@ // The scroll delta is not scaled because the main thread did not scale. std::unique_ptr<ScrollAndScaleSet> scroll_info = host_impl_->ProcessScrollDeltas(); + LayerImpl* inner_scroll = host_impl_->InnerViewportScrollLayer(); EXPECT_TRUE(ScrollInfoContains(*scroll_info.get(), inner_scroll->element_id(), expected_scroll_delta)); @@ -5602,7 +5549,7 @@ std::unique_ptr<LayerImpl> scrollable_child_clip = LayerImpl::Create(host_impl_->active_tree(), 6); std::unique_ptr<LayerImpl> scrollable_child = - CreateScrollableLayer(7, surface_size, scrollable_child_clip.get()); + CreateScrollableLayer(7, surface_size); scrollable_child_clip->test_properties()->AddChild( std::move(scrollable_child)); child->test_properties()->AddChild(std::move(scrollable_child_clip)); @@ -5692,10 +5639,9 @@ root->test_properties()->force_render_surface = true; std::unique_ptr<LayerImpl> grand_child = - CreateScrollableLayer(13, content_size, root); + CreateScrollableLayer(13, content_size); - std::unique_ptr<LayerImpl> child = - CreateScrollableLayer(12, content_size, root); + std::unique_ptr<LayerImpl> child = CreateScrollableLayer(12, content_size); LayerImpl* grand_child_layer = grand_child.get(); child->test_properties()->AddChild(std::move(grand_child)); @@ -5758,10 +5704,9 @@ root->test_properties()->force_render_surface = true; std::unique_ptr<LayerImpl> grand_child = - CreateScrollableLayer(13, content_size, root); + CreateScrollableLayer(13, content_size); - std::unique_ptr<LayerImpl> child = - CreateScrollableLayer(12, content_size, root); + std::unique_ptr<LayerImpl> child = CreateScrollableLayer(12, content_size); LayerImpl* grand_child_layer = grand_child.get(); child->test_properties()->AddChild(std::move(grand_child)); @@ -5856,23 +5801,21 @@ std::unique_ptr<LayerImpl> root_clip = LayerImpl::Create(host_impl_->active_tree(), kViewportClipLayerId); root_clip->test_properties()->force_render_surface = true; - std::unique_ptr<LayerImpl> root_scrolling = CreateScrollableLayer( - kViewportScrollLayerId, surface_size, root_clip.get()); + std::unique_ptr<LayerImpl> root_scrolling = + CreateScrollableLayer(kViewportScrollLayerId, surface_size); root_scrolling->test_properties()->is_container_for_fixed_position_layers = true; std::unique_ptr<LayerImpl> grand_child = - CreateScrollableLayer(5, surface_size, root_clip.get()); + CreateScrollableLayer(5, surface_size); - std::unique_ptr<LayerImpl> child = - CreateScrollableLayer(4, surface_size, root_clip.get()); + std::unique_ptr<LayerImpl> child = CreateScrollableLayer(4, surface_size); LayerImpl* grand_child_layer = grand_child.get(); child->test_properties()->AddChild(std::move(grand_child)); LayerImpl* child_layer = child.get(); root_scrolling->test_properties()->AddChild(std::move(child)); root_clip->test_properties()->AddChild(std::move(root_scrolling)); - EXPECT_EQ(viewport_size, root_clip->bounds()); root_ptr->test_properties()->AddChild(std::move(root_clip)); host_impl_->active_tree()->SetRootLayerForTesting(std::move(root_ptr)); host_impl_->active_tree()->BuildPropertyTreesForTesting(); @@ -6007,14 +5950,15 @@ std::unique_ptr<LayerImpl> root_clip = LayerImpl::Create(host_impl_->active_tree(), 3); root_clip->test_properties()->force_render_surface = true; - std::unique_ptr<LayerImpl> root_scroll = CreateScrollableLayer( - kViewportClipLayerId, content_size, root_clip.get()); + std::unique_ptr<LayerImpl> root_scroll = + CreateScrollableLayer(kViewportClipLayerId, content_size); // Make 'root' the clip layer for child: since they have the same sizes the // child will have zero max_scroll_offset and scrolls will bubble. - std::unique_ptr<LayerImpl> child = CreateScrollableLayer( - kViewportScrollLayerId, content_size, root_scroll.get()); + std::unique_ptr<LayerImpl> child = + CreateScrollableLayer(kViewportScrollLayerId, content_size); child->test_properties()->is_container_for_fixed_position_layers = true; root_scroll->SetBounds(content_size); + child->SetScrollable(content_size); ElementId root_scroll_id = root_scroll->element_id(); root_scroll->test_properties()->AddChild(std::move(child)); @@ -6063,12 +6007,12 @@ LayerImpl::Create(host_impl_->active_tree(), kPageScaleLayerId); std::unique_ptr<LayerImpl> inner_clip = LayerImpl::Create(host_impl_->active_tree(), kInnerViewportClipLayerId); - std::unique_ptr<LayerImpl> inner_scroll = CreateScrollableLayer( - kInnerViewportScrollLayerId, surface_size, inner_clip.get()); + std::unique_ptr<LayerImpl> inner_scroll = + CreateScrollableLayer(kInnerViewportScrollLayerId, surface_size); std::unique_ptr<LayerImpl> outer_clip = LayerImpl::Create(host_impl_->active_tree(), kOuterViewportClipLayerId); - std::unique_ptr<LayerImpl> outer_scroll = CreateScrollableLayer( - kOuterViewportScrollLayerId, surface_size, outer_clip.get()); + std::unique_ptr<LayerImpl> outer_scroll = + CreateScrollableLayer(kOuterViewportScrollLayerId, surface_size); inner_clip->test_properties()->force_render_surface = true; inner_scroll->test_properties()->is_container_for_fixed_position_layers = true; @@ -6105,12 +6049,12 @@ LayerImpl::Create(host_impl_->active_tree(), 4); std::unique_ptr<LayerImpl> inner_clip2 = LayerImpl::Create(host_impl_->active_tree(), kInnerViewportClipLayerId2); - std::unique_ptr<LayerImpl> inner_scroll2 = CreateScrollableLayer( - kInnerViewportScrollLayerId2, surface_size, inner_clip2.get()); + std::unique_ptr<LayerImpl> inner_scroll2 = + CreateScrollableLayer(kInnerViewportScrollLayerId2, surface_size); std::unique_ptr<LayerImpl> outer_clip2 = LayerImpl::Create(host_impl_->active_tree(), kOuterViewportClipLayerId2); - std::unique_ptr<LayerImpl> outer_scroll2 = CreateScrollableLayer( - kOuterViewportScrollLayerId2, surface_size, outer_clip2.get()); + std::unique_ptr<LayerImpl> outer_scroll2 = + CreateScrollableLayer(kOuterViewportScrollLayerId2, surface_size); inner_scroll2->test_properties()->is_container_for_fixed_position_layers = true; outer_scroll2->test_properties()->is_container_for_fixed_position_layers = @@ -6198,8 +6142,8 @@ // Create a child layer that is rotated to a non-axis-aligned angle. std::unique_ptr<LayerImpl> clip_layer = LayerImpl::Create(host_impl_->active_tree(), child_clip_layer_id); - std::unique_ptr<LayerImpl> child = CreateScrollableLayer( - child_layer_id, scroll_layer->bounds(), clip_layer.get()); + std::unique_ptr<LayerImpl> child = + CreateScrollableLayer(child_layer_id, scroll_layer->bounds()); gfx::Transform rotate_transform; rotate_transform.Translate(-50.0, -50.0); rotate_transform.Rotate(child_layer_angle); @@ -6207,8 +6151,10 @@ clip_layer->test_properties()->transform = rotate_transform; // Only allow vertical scrolling. - clip_layer->SetBounds( - gfx::Size(child->bounds().width(), child->bounds().height() / 2)); + gfx::Size scroll_container_bounds = + gfx::Size(child->bounds().width(), child->bounds().height() / 2); + clip_layer->SetBounds(scroll_container_bounds); + child->SetScrollable(scroll_container_bounds); // The rotation depends on the layer's transform origin, and the child layer // is a different size than the clip, so make sure the clip layer's origin // lines up over the child. @@ -6216,6 +6162,7 @@ clip_layer->bounds().width() * 0.5f, clip_layer->bounds().height(), 0.f); LayerImpl* child_ptr = child.get(); clip_layer->test_properties()->AddChild(std::move(child)); + // TODO(pdr): Shouldn't clip_layer be scroll_layer's parent? scroll_layer->test_properties()->AddChild(std::move(clip_layer)); host_impl_->active_tree()->BuildPropertyTreesForTesting(); @@ -6286,8 +6233,8 @@ // Create a child layer that is rotated on its x axis, with perspective. std::unique_ptr<LayerImpl> clip_layer = LayerImpl::Create(host_impl_->active_tree(), child_clip_layer_id); - std::unique_ptr<LayerImpl> child = CreateScrollableLayer( - child_layer_id, scroll_layer->bounds(), clip_layer.get()); + std::unique_ptr<LayerImpl> child = + CreateScrollableLayer(child_layer_id, scroll_layer->bounds()); LayerImpl* child_ptr = child.get(); gfx::Transform perspective_transform; perspective_transform.Translate(-50.0, -50.0); @@ -6411,8 +6358,11 @@ int height = 20; int scale = 3; SetupScrollAndContentsLayers(gfx::Size(width, height)); + gfx::Size container_bounds = gfx::Size(width * scale - 1, height * scale); host_impl_->active_tree()->InnerViewportContainerLayer()->SetBounds( - gfx::Size(width * scale - 1, height * scale)); + container_bounds); + host_impl_->active_tree()->InnerViewportScrollLayer()->SetScrollable( + container_bounds); host_impl_->active_tree()->BuildPropertyTreesForTesting(); host_impl_->active_tree()->SetDeviceScaleFactor(scale); @@ -6431,6 +6381,7 @@ LayerImpl* clip_layer = scroll_layer->test_properties()->parent->test_properties()->parent; clip_layer->SetBounds(gfx::Size(10, 20)); + scroll_layer->SetScrollable(gfx::Size(10, 20)); host_impl_->active_tree()->BuildPropertyTreesForTesting(); host_impl_->BindToClient(&scroll_watcher, false); @@ -6543,6 +6494,7 @@ LayerImpl* clip_layer = scroll_layer->test_properties()->parent->test_properties()->parent; clip_layer->SetBounds(gfx::Size(10, 20)); + scroll_layer->SetScrollable(gfx::Size(10, 20)); scroll_layer->SetDrawsContent(true); // Draw first frame to clear any pending draws and check scroll. @@ -6705,14 +6657,13 @@ LayerImpl::Create(host_impl_->active_tree(), kInnerViewportClipLayerId); root_clip->test_properties()->force_render_surface = true; - std::unique_ptr<LayerImpl> root = CreateScrollableLayer( - kInnerViewportScrollLayerId, surface_size, root_clip.get()); + std::unique_ptr<LayerImpl> root = + CreateScrollableLayer(kInnerViewportScrollLayerId, surface_size); std::unique_ptr<LayerImpl> grand_child = - CreateScrollableLayer(3, surface_size, root_clip.get()); + CreateScrollableLayer(3, surface_size); - std::unique_ptr<LayerImpl> child = - CreateScrollableLayer(2, surface_size, root_clip.get()); + std::unique_ptr<LayerImpl> child = CreateScrollableLayer(2, surface_size); LayerImpl* grand_child_layer = grand_child.get(); child->test_properties()->AddChild(std::move(grand_child)); @@ -6845,6 +6796,7 @@ scroll_layer->test_properties()->parent->test_properties()->parent; clip_layer->SetBounds(gfx::Size(50, 50)); + scroll_layer->SetScrollable(gfx::Size(50, 50)); host_impl_->active_tree()->BuildPropertyTreesForTesting(); host_impl_->SetViewportSize(gfx::Size(50, 50)); @@ -7002,20 +6954,15 @@ // passing through the outer viewport still scroll correctly and affect // browser controls. { - std::unique_ptr<LayerImpl> clip = LayerImpl::Create(layer_tree_impl, 10); - clip->SetBounds(viewport_size); - clip->SetPosition(gfx::PointF()); - std::unique_ptr<LayerImpl> scroll = LayerImpl::Create(layer_tree_impl, 11); scroll->SetBounds(gfx::Size(400, 400)); - scroll->SetScrollClipLayer(clip->id()); + scroll->SetScrollable(viewport_size); scroll->SetElementId(LayerIdToElementIdForTesting(scroll->id())); scroll->SetDrawsContent(true); scroll_layer = scroll.get(); - clip->test_properties()->AddChild(std::move(scroll)); - inner_scroll_layer->test_properties()->AddChild(std::move(clip)); + inner_scroll_layer->test_properties()->AddChild(std::move(scroll)); // Move the outer viewport layer away so that scrolls won't target it. host_impl_->active_tree()->OuterViewportContainerLayer()->SetPosition( @@ -7093,35 +7040,23 @@ // with another scrolling div inside it. Set the outer "div" to be the outer // viewport. { - std::unique_ptr<LayerImpl> clip = LayerImpl::Create(layer_tree_impl, 10); - clip->SetBounds(content_size); - clip->SetPosition(gfx::PointF()); - std::unique_ptr<LayerImpl> scroll = LayerImpl::Create(layer_tree_impl, 11); scroll->SetBounds(gfx::Size(400, 400)); - scroll->SetScrollClipLayer(clip->id()); + scroll->SetScrollable(content_size); scroll->SetElementId(LayerIdToElementIdForTesting(scroll->id())); scroll->SetDrawsContent(true); - std::unique_ptr<LayerImpl> clip2 = LayerImpl::Create(layer_tree_impl, 12); - clip2->SetBounds(gfx::Size(300, 300)); - clip2->SetPosition(gfx::PointF()); - clip2->SetDrawsContent(true); - std::unique_ptr<LayerImpl> scroll2 = LayerImpl::Create(layer_tree_impl, 13); scroll2->SetBounds(gfx::Size(500, 500)); - scroll2->SetScrollClipLayer(clip2->id()); + scroll2->SetScrollable(gfx::Size(300, 300)); scroll2->SetElementId(LayerIdToElementIdForTesting(scroll2->id())); scroll2->SetDrawsContent(true); scroll_layer = scroll.get(); child_scroll_layer = scroll2.get(); - clip2->test_properties()->AddChild(std::move(scroll2)); - scroll->test_properties()->AddChild(std::move(clip2)); - - clip->test_properties()->AddChild(std::move(scroll)); - content_layer->test_properties()->AddChild(std::move(clip)); + scroll->test_properties()->AddChild(std::move(scroll2)); + content_layer->test_properties()->AddChild(std::move(scroll)); LayerTreeImpl::ViewportLayerIds viewport_ids; viewport_ids.page_scale = layer_tree_impl->PageScaleLayer()->id(); viewport_ids.inner_viewport_scroll = inner_scroll_layer->id(); @@ -7228,36 +7163,26 @@ // set as the outer viewport. Add a sibling scrolling layer that isn't a child // of the outer viewport scroll layer. { - std::unique_ptr<LayerImpl> clip = LayerImpl::Create(layer_tree_impl, 10); - clip->SetBounds(content_size); - clip->SetPosition(gfx::PointF(100, 100)); - std::unique_ptr<LayerImpl> scroll = LayerImpl::Create(layer_tree_impl, 11); scroll->SetBounds(gfx::Size(1200, 1200)); - scroll->SetScrollClipLayer(clip->id()); + scroll->SetScrollable(content_size); scroll->SetElementId(LayerIdToElementIdForTesting(scroll->id())); scroll->SetDrawsContent(true); outer_scroll_layer = scroll.get(); - clip->test_properties()->AddChild(std::move(scroll)); - content_layer->test_properties()->AddChild(std::move(clip)); + content_layer->test_properties()->AddChild(std::move(scroll)); // Create the non-descendant. - std::unique_ptr<LayerImpl> clip2 = LayerImpl::Create(layer_tree_impl, 14); - clip2->SetBounds(gfx::Size(600, 600)); - clip2->SetPosition(gfx::PointF()); - std::unique_ptr<LayerImpl> scroll2 = LayerImpl::Create(layer_tree_impl, 15); scroll2->SetBounds(gfx::Size(1200, 1200)); - scroll2->SetScrollClipLayer(clip2->id()); + scroll2->SetScrollable(gfx::Size(600, 600)); scroll2->SetElementId(LayerIdToElementIdForTesting(scroll2->id())); scroll2->SetDrawsContent(true); sibling_scroll_layer = scroll2.get(); - clip2->test_properties()->AddChild(std::move(scroll2)); - content_layer->test_properties()->AddChild(std::move(clip2)); + content_layer->test_properties()->AddChild(std::move(scroll2)); LayerImpl* inner_container = host_impl_->active_tree()->InnerViewportContainerLayer(); @@ -8468,7 +8393,7 @@ root->SetBounds(root_size); gfx::ScrollOffset scroll_offset(100000, 0); - scrolling_layer->SetScrollClipLayer(root->id()); + scrolling_layer->SetScrollable(content_layer_bounds); scrolling_layer->SetElementId( LayerIdToElementIdForTesting(scrolling_layer->id())); host_impl_->pending_tree()->BuildPropertyTreesForTesting(); @@ -8927,11 +8852,10 @@ LayerImpl::Create(host_impl_->active_tree(), kInnerViewportClipLayerId); root_clip->test_properties()->force_render_surface = true; - std::unique_ptr<LayerImpl> root_scroll = CreateScrollableLayer( - kInnerViewportScrollLayerId, content_size, root_clip.get()); + std::unique_ptr<LayerImpl> root_scroll = + CreateScrollableLayer(kInnerViewportScrollLayerId, content_size); root_scroll->test_properties()->is_container_for_fixed_position_layers = true; - std::unique_ptr<LayerImpl> child = - CreateScrollableLayer(2, content_size, root_clip.get()); + std::unique_ptr<LayerImpl> child = CreateScrollableLayer(2, content_size); root_scroll->test_properties()->AddChild(std::move(child)); ElementId root_id = root_scroll->element_id(); @@ -8982,17 +8906,17 @@ root->test_properties()->force_render_surface = true; std::unique_ptr<LayerImpl> root_scrolling_owned = - CreateScrollableLayer(12, surface_size, root); + CreateScrollableLayer(12, surface_size); auto* root_scrolling = root_scrolling_owned.get(); root->test_properties()->AddChild(std::move(root_scrolling_owned)); std::unique_ptr<LayerImpl> child_owned = - CreateScrollableLayer(13, surface_size, root); + CreateScrollableLayer(13, surface_size); auto* child = child_owned.get(); root_scrolling->test_properties()->AddChild(std::move(child_owned)); std::unique_ptr<LayerImpl> grand_child_owned = - CreateScrollableLayer(14, surface_size, root); + CreateScrollableLayer(14, surface_size); auto* grand_child = grand_child_owned.get(); child->test_properties()->AddChild(std::move(grand_child_owned)); @@ -9078,10 +9002,9 @@ CreateBasicVirtualViewportLayers(surface_size, surface_size); root_clip->test_properties()->force_render_surface = true; std::unique_ptr<LayerImpl> root_scroll = - CreateScrollableLayer(11, content_size, root_clip); + CreateScrollableLayer(11, content_size); ElementId root_scroll_id = root_scroll->element_id(); - std::unique_ptr<LayerImpl> child = - CreateScrollableLayer(12, content_size, root_clip); + std::unique_ptr<LayerImpl> child = CreateScrollableLayer(12, content_size); root_scroll->test_properties()->AddChild(std::move(child)); root_clip->test_properties()->AddChild(std::move(root_scroll)); @@ -9175,8 +9098,8 @@ LayerImpl::Create(host_impl_->active_tree(), child_scroll_clip_layer_id); int child_scroll_layer_id = 8; - std::unique_ptr<LayerImpl> child_scroll = CreateScrollableLayer( - child_scroll_layer_id, content_size, child_scroll_clip.get()); + std::unique_ptr<LayerImpl> child_scroll = + CreateScrollableLayer(child_scroll_layer_id, content_size); child_scroll->SetPosition(gfx::PointF(10.f, 10.f)); @@ -9198,15 +9121,13 @@ gfx::Size content_size(100, 100); SetupScrollAndContentsLayers(content_size); - LayerImpl* root = host_impl_->active_tree()->LayerById(1); - int scroll_layer_id = 2; LayerImpl* scroll_layer = host_impl_->active_tree()->LayerById(scroll_layer_id); int child_scroll_layer_id = 7; std::unique_ptr<LayerImpl> child_scroll = - CreateScrollableLayer(child_scroll_layer_id, content_size, root); + CreateScrollableLayer(child_scroll_layer_id, content_size); child_scroll->SetDrawsContent(false); scroll_layer->test_properties()->AddChild(std::move(child_scroll)); @@ -9966,7 +9887,7 @@ std::unique_ptr<LayerImpl> scroll = LayerImpl::Create(layer_tree_impl, 11); scroll->SetBounds(scroll_content_size); - scroll->SetScrollClipLayer(clip->id()); + scroll->SetScrollable(root_layer_size); scroll->SetElementId(LayerIdToElementIdForTesting(scroll->id())); scroll->SetDrawsContent(true); @@ -10034,7 +9955,7 @@ std::unique_ptr<LayerImpl> page_scale = LayerImpl::Create(layer_tree_impl, kPageScaleLayerId); - inner_scroll->SetScrollClipLayer(inner_clip->id()); + inner_scroll->SetScrollable(inner_viewport); inner_scroll->SetElementId( LayerIdToElementIdForTesting(inner_scroll->id())); inner_scroll->SetBounds(outer_viewport); @@ -10048,7 +9969,7 @@ std::unique_ptr<LayerImpl> outer_scroll = LayerImpl::Create(layer_tree_impl, kOuterViewportScrollLayerId); - outer_scroll->SetScrollClipLayer(outer_clip->id()); + outer_scroll->SetScrollable(outer_viewport); outer_scroll->SetElementId( LayerIdToElementIdForTesting(outer_scroll->id())); outer_scroll->layer_tree_impl() @@ -10260,8 +10181,7 @@ LayerImpl* outer_scroll = host_impl_->OuterViewportScrollLayer(); LayerImpl* inner_scroll = host_impl_->InnerViewportScrollLayer(); - std::unique_ptr<LayerImpl> child = - CreateScrollableLayer(10, outer_viewport, outer_scroll); + std::unique_ptr<LayerImpl> child = CreateScrollableLayer(10, outer_viewport); LayerImpl* child_scroll = child.get(); outer_scroll->test_properties()->children[0]->test_properties()->AddChild( std::move(child)); @@ -10333,8 +10253,7 @@ LayerImpl* outer_scroll = host_impl_->OuterViewportScrollLayer(); - std::unique_ptr<LayerImpl> child = - CreateScrollableLayer(10, outer_viewport, outer_scroll); + std::unique_ptr<LayerImpl> child = CreateScrollableLayer(10, outer_viewport); LayerImpl* child_scroll = child.get(); outer_scroll->test_properties()->children[0]->test_properties()->AddChild( std::move(child)); @@ -10510,14 +10429,13 @@ root->test_properties()->force_render_surface = true; // A div layer which has an event handler. - std::unique_ptr<LayerImpl> child = - CreateScrollableLayer(26, surface_size, root); + std::unique_ptr<LayerImpl> child = CreateScrollableLayer(26, surface_size); LayerImpl* child_layer = child.get(); // The layer tree should create a layer for the div layer, which is the // actual scrolling layer. std::unique_ptr<LayerImpl> grand_child = - CreateScrollableLayer(27, content_size, root); + CreateScrollableLayer(27, content_size); LayerImpl* grand_child_layer = grand_child.get(); child->test_properties()->AddChild(std::move(grand_child)); @@ -10571,19 +10489,18 @@ root->test_properties()->force_render_surface = true; // A div layer which has an event handler. - std::unique_ptr<LayerImpl> child = - CreateScrollableLayer(26, surface_size, root); + std::unique_ptr<LayerImpl> child = CreateScrollableLayer(26, surface_size); LayerImpl* child_layer = child.get(); // The layer tree should create a layer for the div layer, which is the // actual scrolling layer. std::unique_ptr<LayerImpl> grand_child = - CreateScrollableLayer(27, content_size, root); + CreateScrollableLayer(27, content_size); LayerImpl* grand_child_layer = grand_child.get(); // A child scrollable layer inside grand_child_layer. std::unique_ptr<LayerImpl> great_grand_child = - CreateScrollableLayer(28, inner_size, root); + CreateScrollableLayer(28, inner_size); LayerImpl* great_grand_child_layer = great_grand_child.get(); grand_child->test_properties()->AddChild(std::move(great_grand_child)); @@ -12223,7 +12140,6 @@ const int scrollbar_1_id = 10; const int scrollbar_2_id = 11; - const int child_clip_id = 12; const int child_scroll_id = 13; CreateHostImpl(settings, CreateLayerTreeFrameSink()); @@ -12341,14 +12257,12 @@ SolidColorScrollbarLayerImpl::Create(host_impl_->active_tree(), scrollbar_2_id, VERTICAL, 15, 0, true, true); - std::unique_ptr<LayerImpl> child_clip = - LayerImpl::Create(host_impl_->active_tree(), child_clip_id); std::unique_ptr<LayerImpl> child = LayerImpl::Create(host_impl_->active_tree(), child_scroll_id); child->SetPosition(gfx::PointF(50, 50)); child->SetBounds(child_layer_size); child->SetDrawsContent(true); - child->SetScrollClipLayer(child_clip_id); + child->SetScrollable(gfx::Size(100, 100)); child->SetElementId(LayerIdToElementIdForTesting(child->id())); ElementId child_element_id = child->element_id(); @@ -12364,8 +12278,7 @@ scrollbar_2->SetPosition(gfx::PointF(0, 0)); child->test_properties()->AddChild(std::move(scrollbar_2)); - child_clip->test_properties()->AddChild(std::move(child)); - root_scroll->test_properties()->AddChild(std::move(child_clip)); + root_scroll->test_properties()->AddChild(std::move(child)); host_impl_->active_tree()->BuildPropertyTreesForTesting(); host_impl_->active_tree()->UpdateScrollbarGeometries();
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc index cd297d7f..46bf072 100644 --- a/cc/trees/layer_tree_host_unittest.cc +++ b/cc/trees/layer_tree_host_unittest.cc
@@ -813,17 +813,18 @@ break; case 2: // child_ should create a scroll node. - child_->SetScrollClipLayerId(root_->id()); + child_->SetScrollable(gfx::Size(1, 1)); break; case 3: // child_ should create a clip node. child_->SetMasksToBounds(true); break; case 4: - // child_ should not create any property tree node. + // child_ should only create the scroll-related nodes. child_->SetMasksToBounds(false); child_->SetForceRenderSurfaceForTesting(false); - child_->SetScrollClipLayerId(Layer::INVALID_ID); + // Should have no effect because empty bounds do not prevent scrolling. + child_->SetScrollable(gfx::Size(0, 0)); } } @@ -877,11 +878,11 @@ EXPECT_NE(root_clip_node, child_clip_node); break; case 4: - // child_ should not create any property tree nodes. - EXPECT_EQ(child_transform_node, root_transform_node); + // child_ should only create the scroll-related nodes. + EXPECT_EQ(child_transform_node->id, child_scroll_node->transform_id); EXPECT_EQ(child_effect_node, root_effect_node); EXPECT_EQ(root_clip_node, child_clip_node); - EXPECT_EQ(root_scroll_node, child_scroll_node); + EXPECT_NE(root_scroll_node, child_scroll_node); EndTest(); break; } @@ -2742,7 +2743,7 @@ scoped_refptr<Layer> pinch = Layer::Create(); pinch->SetBounds(gfx::Size(500, 500)); - pinch->SetScrollClipLayerId(root_clip->id()); + pinch->SetScrollable(gfx::Size(200, 200)); pinch->SetIsContainerForFixedPositionLayers(true); page_scale_layer->AddChild(pinch); root_clip->AddChild(page_scale_layer); @@ -4766,8 +4767,8 @@ scoped_refptr<Layer> overscroll_elasticity_layer = Layer::Create(); scoped_refptr<Layer> page_scale_layer = Layer::Create(); scoped_refptr<Layer> inner_viewport_scroll_layer = Layer::Create(); - inner_viewport_scroll_layer->SetScrollClipLayerId( - inner_viewport_container_layer->id()); + inner_viewport_scroll_layer->SetScrollable( + inner_viewport_container_layer->bounds()); inner_viewport_scroll_layer->SetIsContainerForFixedPositionLayers(true); root_layer_->AddChild(inner_viewport_container_layer); @@ -6191,7 +6192,7 @@ scoped_refptr<Layer> pinch = Layer::Create(); pinch->SetBounds(gfx::Size(500, 500)); - pinch->SetScrollClipLayerId(root_clip->id()); + pinch->SetScrollable(gfx::Size(500, 500)); pinch->SetIsContainerForFixedPositionLayers(true); page_scale_layer->AddChild(pinch); root_clip->AddChild(page_scale_layer); @@ -6498,7 +6499,7 @@ scoped_refptr<Layer> pinch = Layer::Create(); pinch->SetBounds(gfx::Size(500, 500)); - pinch->SetScrollClipLayerId(root_clip->id()); + pinch->SetScrollable(gfx::Size(500, 500)); pinch->SetIsContainerForFixedPositionLayers(true); page_scale_layer->AddChild(pinch); root_clip->AddChild(page_scale_layer); @@ -6904,7 +6905,7 @@ CreateVirtualViewportLayers(root.get(), outer_viewport_scroll_layer, gfx::Size(50, 50), gfx::Size(50, 50), layer_tree_host()); - outer_viewport_scroll_layer->scroll_clip_layer()->SetMasksToBounds(true); + layer_tree_host()->outer_viewport_container_layer()->SetMasksToBounds(true); outer_viewport_scroll_layer->AddChild(content_layer); client_.set_bounds(root->bounds());
diff --git a/cc/trees/layer_tree_host_unittest_animation.cc b/cc/trees/layer_tree_host_unittest_animation.cc index b9fa010f..1574fb2 100644 --- a/cc/trees/layer_tree_host_unittest_animation.cc +++ b/cc/trees/layer_tree_host_unittest_animation.cc
@@ -724,7 +724,7 @@ LayerTreeHostAnimationTest::SetupTree(); scroll_layer_ = FakePictureLayer::Create(&client_); - scroll_layer_->SetScrollClipLayerId(layer_tree_host()->root_layer()->id()); + scroll_layer_->SetScrollable(gfx::Size(100, 100)); scroll_layer_->SetBounds(gfx::Size(1000, 1000)); client_.set_bounds(scroll_layer_->bounds()); scroll_layer_->SetScrollOffset(gfx::ScrollOffset(10, 20)); @@ -785,7 +785,7 @@ scroll_layer_->SetBounds(gfx::Size(10000, 10000)); client_.set_bounds(scroll_layer_->bounds()); scroll_layer_->SetScrollOffset(gfx::ScrollOffset(10, 20)); - scroll_layer_->SetScrollClipLayerId(layer_tree_host()->root_layer()->id()); + scroll_layer_->SetScrollable(gfx::Size(10, 10)); layer_tree_host()->root_layer()->AddChild(scroll_layer_); AttachPlayersToTimeline(); @@ -845,7 +845,7 @@ scroll_layer_->SetBounds(gfx::Size(10000, 10000)); client_.set_bounds(scroll_layer_->bounds()); scroll_layer_->SetScrollOffset(gfx::ScrollOffset(10, 20)); - scroll_layer_->SetScrollClipLayerId(layer_tree_host()->root_layer()->id()); + scroll_layer_->SetScrollable(gfx::Size(10, 10)); layer_tree_host()->root_layer()->AddChild(scroll_layer_); AttachPlayersToTimeline(); @@ -951,7 +951,7 @@ LayerTreeHostAnimationTest::SetupTree(); scroll_layer_ = FakePictureLayer::Create(&client_); - scroll_layer_->SetScrollClipLayerId(layer_tree_host()->root_layer()->id()); + scroll_layer_->SetScrollable(gfx::Size(100, 100)); scroll_layer_->SetBounds(gfx::Size(10000, 10000)); client_.set_bounds(scroll_layer_->bounds()); scroll_layer_->SetScrollOffset(gfx::ScrollOffset(100.0, 200.0));
diff --git a/cc/trees/layer_tree_host_unittest_damage.cc b/cc/trees/layer_tree_host_unittest_damage.cc index 578324f..34950c6e 100644 --- a/cc/trees/layer_tree_host_unittest_damage.cc +++ b/cc/trees/layer_tree_host_unittest_damage.cc
@@ -339,19 +339,14 @@ root_layer->SetMasksToBounds(true); layer_tree_host()->SetRootLayer(root_layer); - scoped_refptr<Layer> scroll_clip_layer = Layer::Create(); content_layer_ = FakePictureLayer::Create(&client_); content_layer_->SetElementId( LayerIdToElementIdForTesting(content_layer_->id())); - content_layer_->SetScrollClipLayerId(scroll_clip_layer->id()); + content_layer_->SetScrollable(root_layer->bounds()); content_layer_->SetScrollOffset(gfx::ScrollOffset(10, 20)); content_layer_->SetBounds(gfx::Size(100, 200)); content_layer_->SetIsDrawable(true); - scroll_clip_layer->SetBounds( - gfx::Size(content_layer_->bounds().width() - 30, - content_layer_->bounds().height() - 50)); - scroll_clip_layer->AddChild(content_layer_); - root_layer->AddChild(scroll_clip_layer); + root_layer->AddChild(content_layer_); scoped_refptr<Layer> scrollbar_layer = FakePaintedScrollbarLayer::Create( false, true, content_layer_->element_id());
diff --git a/cc/trees/layer_tree_host_unittest_picture.cc b/cc/trees/layer_tree_host_unittest_picture.cc index e4fefef..6579662 100644 --- a/cc/trees/layer_tree_host_unittest_picture.cc +++ b/cc/trees/layer_tree_host_unittest_picture.cc
@@ -224,7 +224,7 @@ // picture_'s transform is going to be changing on the compositor thread, so // force it to have a transform node by making it scrollable. - picture_->SetScrollClipLayerId(root->id()); + picture_->SetScrollable(root->bounds()); layer_tree_host()->SetRootLayer(root); LayerTreeHostPictureTest::SetupTree(); @@ -412,7 +412,7 @@ pinch_ = Layer::Create(); pinch_->SetBounds(gfx::Size(500, 500)); - pinch_->SetScrollClipLayerId(root_clip->id()); + pinch_->SetScrollable(root_clip->bounds()); pinch_->SetIsContainerForFixedPositionLayers(true); page_scale_layer->AddChild(pinch_); root_clip->AddChild(page_scale_layer);
diff --git a/cc/trees/layer_tree_host_unittest_scroll.cc b/cc/trees/layer_tree_host_unittest_scroll.cc index d3ac199..767c4e2 100644 --- a/cc/trees/layer_tree_host_unittest_scroll.cc +++ b/cc/trees/layer_tree_host_unittest_scroll.cc
@@ -94,10 +94,8 @@ num_scrolls_(0) {} void BeginTest() override { - outer_viewport_container_layer_id_ = layer_tree_host() - ->outer_viewport_scroll_layer() - ->scroll_clip_layer() - ->id(); + outer_viewport_container_layer_id_ = + layer_tree_host()->outer_viewport_container_layer()->id(); layer_tree_host()->outer_viewport_scroll_layer()->SetScrollOffset( initial_scroll_); layer_tree_host()->outer_viewport_scroll_layer()->set_did_scroll_callback( @@ -125,7 +123,6 @@ LayerImpl* scroll_layer = impl->OuterViewportScrollLayer(); EXPECT_VECTOR_EQ(gfx::Vector2d(), ScrollDelta(scroll_layer)); - scroll_layer->SetScrollClipLayer(outer_viewport_container_layer_id_); scroll_layer->SetBounds( gfx::Size(root->bounds().width() + 100, root->bounds().height() + 100)); scroll_layer->ScrollBy(scroll_amount_); @@ -505,15 +502,12 @@ void SetupTree() override { LayerTreeHostScrollTest::SetupTree(); layer_tree_host() - ->outer_viewport_scroll_layer() - ->scroll_clip_layer() + ->outer_viewport_container_layer() ->SetForceRenderSurfaceForTesting(true); gfx::Transform translate; translate.Translate(0.25f, 0.f); - layer_tree_host() - ->outer_viewport_scroll_layer() - ->scroll_clip_layer() - ->SetTransform(translate); + layer_tree_host()->outer_viewport_container_layer()->SetTransform( + translate); layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.1f, 100.f); } @@ -598,11 +592,8 @@ child_layer_->SetPosition(gfx::PointF(60.f, 5.f)); } - scoped_refptr<Layer> outer_container_layer = - layer_tree_host()->outer_viewport_scroll_layer()->parent(); - child_layer_->SetIsDrawable(true); - child_layer_->SetScrollClipLayerId(outer_container_layer->id()); + child_layer_->SetScrollable(root_layer->bounds()); child_layer_->SetElementId( LayerIdToElementIdForTesting(child_layer_->id())); child_layer_->SetBounds(root_scroll_layer_->bounds()); @@ -1102,10 +1093,8 @@ LayerTreeHostScrollTestScrollZeroMaxScrollOffset() {} void BeginTest() override { - outer_viewport_container_layer_id_ = layer_tree_host() - ->outer_viewport_scroll_layer() - ->scroll_clip_layer() - ->id(); + outer_viewport_container_layer_id_ = + layer_tree_host()->outer_viewport_container_layer()->id(); PostSetNeedsCommitToMainThread(); } @@ -1114,7 +1103,7 @@ Layer* scroll_layer = layer_tree_host()->outer_viewport_scroll_layer(); switch (layer_tree_host()->SourceFrameNumber()) { case 0: - scroll_layer->SetScrollClipLayerId(outer_viewport_container_layer_id_); + scroll_layer->SetScrollable(root->bounds()); // Set max_scroll_offset = (100, 100). scroll_layer->SetBounds(gfx::Size(root->bounds().width() + 100, root->bounds().height() + 100)); @@ -1442,10 +1431,9 @@ Layer* CreateScrollLayer(Layer* parent, FakeLayerScrollClient* client) { scoped_refptr<PictureLayer> scroll_layer = PictureLayer::Create(&fake_content_layer_client_); - scroll_layer->SetBounds(gfx::Size(110, 110)); scroll_layer->SetPosition(gfx::PointF()); scroll_layer->SetIsDrawable(true); - scroll_layer->SetScrollClipLayerId(parent->id()); + scroll_layer->SetScrollable(parent->bounds()); scroll_layer->SetElementId( LayerIdToElementIdForTesting(scroll_layer->id())); scroll_layer->SetBounds(gfx::Size(parent->bounds().width() + 100, @@ -1504,10 +1492,8 @@ } void BeginTest() override { - outer_viewport_container_layer_id_ = layer_tree_host() - ->outer_viewport_scroll_layer() - ->scroll_clip_layer() - ->id(); + outer_viewport_container_layer_id_ = + layer_tree_host()->outer_viewport_container_layer()->id(); layer_tree_host()->outer_viewport_scroll_layer()->SetScrollOffset( initial_scroll_); layer_tree_host()->outer_viewport_scroll_layer()->set_did_scroll_callback( @@ -1599,7 +1585,6 @@ LayerImpl* root = impl->active_tree()->root_layer_for_testing(); LayerImpl* scroll_layer = impl->OuterViewportScrollLayer(); - scroll_layer->SetScrollClipLayer(outer_viewport_container_layer_id_); scroll_layer->SetBounds( gfx::Size(root->bounds().width() + 100, root->bounds().height() + 100)); scroll_layer->ScrollBy(scroll_amount_);
diff --git a/cc/trees/property_tree.cc b/cc/trees/property_tree.cc index 6f2fcdd..b4a4222 100644 --- a/cc/trees/property_tree.cc +++ b/cc/trees/property_tree.cc
@@ -1248,9 +1248,6 @@ scale_factor = transform_tree.page_scale_factor(); gfx::SizeF scaled_scroll_bounds = gfx::ScaleSize(scroll_bounds, scale_factor); - scaled_scroll_bounds.SetSize(std::floor(scaled_scroll_bounds.width()), - std::floor(scaled_scroll_bounds.height())); - gfx::Size clip_layer_bounds = scroll_clip_layer_bounds(scroll_node->id); gfx::ScrollOffset max_offset(
diff --git a/cc/trees/property_tree_builder.cc b/cc/trees/property_tree_builder.cc index 2f287ca..af37d72 100644 --- a/cc/trees/property_tree_builder.cc +++ b/cc/trees/property_tree_builder.cc
@@ -140,12 +140,6 @@ return layer->test_properties()->transform; } -static void SetIsScrollClipLayer(Layer* layer) { - layer->set_is_scroll_clip_layer(); -} - -static void SetIsScrollClipLayer(LayerImpl* layer) {} - // Methods to query state from the AnimationHost ---------------------- template <typename LayerType> bool OpacityIsAnimating(LayerType* layer) { @@ -394,7 +388,6 @@ data_for_children->affected_by_outer_viewport_bounds_delta = layer == data_from_ancestor.outer_viewport_scroll_layer; if (is_scrollable) { - DCHECK(!is_root); DCHECK(Transform(layer).IsIdentity()); data_for_children->transform_fixed_parent = Parent(layer); } else { @@ -1001,11 +994,6 @@ layer->SetHasTransformNode(val); } -void SetHasScrollNode(LayerImpl* layer, bool val) {} -void SetHasScrollNode(Layer* layer, bool val) { - layer->SetHasScrollNode(val); -} - template <typename LayerType> void AddScrollNodeIfNeeded( const DataForRecursion<LayerType>& data_from_ancestor, @@ -1037,14 +1025,12 @@ if (!requires_node) { node_id = parent_id; data_for_children->scroll_tree_parent = node_id; - SetHasScrollNode(layer, false); } else { ScrollNode node; node.owning_layer_id = layer->id(); node.scrollable = scrollable; node.main_thread_scrolling_reasons = main_thread_scrolling_reasons; node.non_fast_scrollable_region = layer->non_fast_scrollable_region(); - node.scrolls_inner_viewport = layer == data_from_ancestor.inner_viewport_scroll_layer; node.scrolls_outer_viewport = @@ -1055,12 +1041,8 @@ node.max_scroll_offset_affected_by_page_scale = true; } - if (LayerType* scroll_clip_layer = layer->scroll_clip_layer()) { - SetIsScrollClipLayer(scroll_clip_layer); - node.scroll_clip_layer_bounds = scroll_clip_layer->bounds(); - } - node.bounds = layer->bounds(); + node.scroll_clip_layer_bounds = layer->scroll_container_bounds(); node.offset_to_transform_parent = layer->offset_to_transform_parent(); node.should_flatten = layer->should_flatten_transform_from_property_tree(); node.user_scrollable_horizontal = UserScrollableHorizontal(layer); @@ -1087,7 +1069,6 @@ data_for_children->property_trees->scroll_tree.SetBaseScrollOffset( layer->element_id(), layer->CurrentScrollOffset()); } - SetHasScrollNode(layer, true); } layer->SetScrollTreeIndex(node_id);
diff --git a/cc/trees/scroll_node.h b/cc/trees/scroll_node.h index 43841bf..60b3293 100644 --- a/cc/trees/scroll_node.h +++ b/cc/trees/scroll_node.h
@@ -30,6 +30,7 @@ // The layer id that corresponds to the layer contents that are scrolled. // Unlike |id|, this id is stable across frames that don't change the // composited layer list. + // TODO(pdr): This is no longer used and can be removed. int owning_layer_id; uint32_t main_thread_scrolling_reasons; @@ -38,6 +39,7 @@ // Size of the clipped area, not including non-overlay scrollbars. Overlay // scrollbars do not affect the clipped area. + // TODO(pdr): Rename this to scroll_container_bounds. gfx::Size scroll_clip_layer_bounds; // Bounds of the overflow scrolling area.
diff --git a/cc/trees/tree_synchronizer_unittest.cc b/cc/trees/tree_synchronizer_unittest.cc index 18ab0a7..daf5888 100644 --- a/cc/trees/tree_synchronizer_unittest.cc +++ b/cc/trees/tree_synchronizer_unittest.cc
@@ -494,22 +494,17 @@ host_impl->CreatePendingTree(); scoped_refptr<Layer> layer_tree_root = Layer::Create(); - scoped_refptr<Layer> scroll_clip_layer = Layer::Create(); scoped_refptr<Layer> scroll_layer = Layer::Create(); - scoped_refptr<Layer> transient_scroll_clip_layer = Layer::Create(); scoped_refptr<Layer> transient_scroll_layer = Layer::Create(); - layer_tree_root->AddChild(transient_scroll_clip_layer); - transient_scroll_clip_layer->AddChild(transient_scroll_layer); - transient_scroll_layer->AddChild(scroll_clip_layer); - scroll_clip_layer->AddChild(scroll_layer); + layer_tree_root->AddChild(transient_scroll_layer); + transient_scroll_layer->AddChild(scroll_layer); ElementId scroll_element_id = ElementId(5); scroll_layer->SetElementId(scroll_element_id); - transient_scroll_layer->SetScrollClipLayerId( - transient_scroll_clip_layer->id()); - scroll_layer->SetScrollClipLayerId(scroll_clip_layer->id()); + transient_scroll_layer->SetScrollable(gfx::Size(1, 1)); + scroll_layer->SetScrollable(gfx::Size(1, 1)); host_->SetRootLayer(layer_tree_root); host_->BuildPropertyTreesForTesting(); host_->CommitAndCreatePendingTree(); @@ -523,7 +518,7 @@ host_impl->active_tree()->property_trees()->scroll_tree.Node( scroll_layer->scroll_tree_index()); host_impl->active_tree()->SetCurrentlyScrollingNode(scroll_node); - transient_scroll_layer->SetScrollClipLayerId(Layer::INVALID_ID); + transient_scroll_layer->SetScrollable(gfx::Size(0, 0)); host_->BuildPropertyTreesForTesting(); host_impl->CreatePendingTree(); @@ -546,25 +541,20 @@ host_impl->CreatePendingTree(); scoped_refptr<Layer> layer_tree_root = Layer::Create(); - scoped_refptr<Layer> scroll_clip_layer = Layer::Create(); scoped_refptr<Layer> scroll_layer = Layer::Create(); - scoped_refptr<Layer> transient_scroll_clip_layer = Layer::Create(); scoped_refptr<Layer> transient_scroll_layer = Layer::Create(); ElementId scroll_element_id = ElementId(5); scroll_layer->SetElementId(scroll_element_id); - layer_tree_root->AddChild(transient_scroll_clip_layer); - transient_scroll_clip_layer->AddChild(transient_scroll_layer); - transient_scroll_layer->AddChild(scroll_clip_layer); - scroll_clip_layer->AddChild(scroll_layer); + layer_tree_root->AddChild(transient_scroll_layer); + transient_scroll_layer->AddChild(scroll_layer); ElementId transient_scroll_element_id = ElementId(7); transient_scroll_layer->SetElementId(transient_scroll_element_id); - transient_scroll_layer->SetScrollClipLayerId( - transient_scroll_clip_layer->id()); - scroll_layer->SetScrollClipLayerId(scroll_clip_layer->id()); + transient_scroll_layer->SetScrollable(gfx::Size(1, 1)); + scroll_layer->SetScrollable(gfx::Size(1, 1)); transient_scroll_layer->SetScrollOffset(gfx::ScrollOffset(1, 2)); scroll_layer->SetScrollOffset(gfx::ScrollOffset(10, 20)); @@ -624,8 +614,9 @@ host_impl->active_tree()->SetCurrentlyScrollingNode( scroll_tree.Node(scroll_layer_impl->scroll_tree_index())); - // Make one layer unscrollable so that scroll tree topology changes - transient_scroll_layer->SetScrollClipLayerId(Layer::INVALID_ID); + // Change the scroll tree topology by removing transient_scroll_layer. + transient_scroll_layer->RemoveFromParent(); + layer_tree_root->AddChild(scroll_layer); host_->BuildPropertyTreesForTesting(); host_impl->CreatePendingTree();
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn index 36b77b5..d8fe989 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn
@@ -391,7 +391,6 @@ "//chrome/common:features", "//chrome/install_static:install_static_util", "//chrome/install_static:secondary_module", - "//chrome/profiling", "//chrome_elf", "//components/crash/content/app", "//components/policy:generated", @@ -1415,6 +1414,7 @@ public_deps = [ "//chrome/browser", "//chrome/common", + "//chrome/profiling", "//components/sync", ] if (enable_plugins) {
diff --git a/chrome/VERSION b/chrome/VERSION index 11c5613..d3f4347 100644 --- a/chrome/VERSION +++ b/chrome/VERSION
@@ -1,4 +1,4 @@ MAJOR=61 MINOR=0 -BUILD=3143 +BUILD=3144 PATCH=0
diff --git a/chrome/android/java/res/layout/account_signin_view.xml b/chrome/android/java/res/layout/account_signin_view.xml index 09c3565..9139aad 100644 --- a/chrome/android/java/res/layout/account_signin_view.xml +++ b/chrome/android/java/res/layout/account_signin_view.xml
@@ -117,6 +117,7 @@ <View style="@style/Divider"/> <TextView + style="@style/RobotoMediumStyle" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="16dp" @@ -126,7 +127,6 @@ android:text="@string/sync_confirmation_chrome_sync_title" android:textColor="@color/default_text_color" android:textSize="@dimen/fre_normal_text_size" - android:fontFamily="sans-serif-medium" android:drawableStart="@drawable/chrome_sync_logo" android:drawablePadding="16dp"/> @@ -147,6 +147,7 @@ android:layout_marginEnd="16dp"/> <TextView + style="@style/RobotoMediumStyle" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="16dp" @@ -156,7 +157,6 @@ android:text="@string/sync_confirmation_personalize_services_title" android:textColor="@color/default_text_color" android:textSize="@dimen/fre_normal_text_size" - android:fontFamily="sans-serif-medium" android:drawableStart="@drawable/googleg" android:drawablePadding="16dp"/>
diff --git a/chrome/android/java/res/layout/contextual_search_peek_promo_text_view.xml b/chrome/android/java/res/layout/contextual_search_peek_promo_text_view.xml index 97fcef5..df0772b 100644 --- a/chrome/android/java/res/layout/contextual_search_peek_promo_text_view.xml +++ b/chrome/android/java/res/layout/contextual_search_peek_promo_text_view.xml
@@ -14,12 +14,12 @@ android:paddingEnd="@dimen/contextual_search_peek_promo_padding" android:visibility="invisible"> <TextView + style="@style/RobotoMediumStyle" android:id="@+id/contextual_search_peek_promo_new" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="@dimen/contextual_search_peek_promo_padding" android:background="@drawable/contextual_search_peek_promo_new_background" - android:fontFamily="sans-serif-medium" android:text="@string/contextual_search_peek_promo_new" android:textAllCaps="true" android:textColor="@color/light_active_color"
diff --git a/chrome/android/java/res/layout/contextual_search_promo_view.xml b/chrome/android/java/res/layout/contextual_search_promo_view.xml index e262beb6..18712fc 100644 --- a/chrome/android/java/res/layout/contextual_search_promo_view.xml +++ b/chrome/android/java/res/layout/contextual_search_promo_view.xml
@@ -39,7 +39,6 @@ android:layout_gravity="end" android:layout_marginTop="16dp" android:layout_marginEnd="16dp" - android:fontFamily="sans-serif-medium" android:paddingStart="8dp" android:paddingEnd="8dp" android:text="@string/contextual_search_allow_button" @@ -57,7 +56,6 @@ android:layout_gravity="end" android:layout_marginTop="16dp" android:layout_marginEnd="16dp" - android:fontFamily="sans-serif-medium" android:paddingStart="8dp" android:paddingEnd="8dp" android:text="@string/contextual_search_no_thanks_button"
diff --git a/chrome/android/java/res/layout/dialog_with_titlebar.xml b/chrome/android/java/res/layout/dialog_with_titlebar.xml deleted file mode 100644 index 3a4dd68e..0000000 --- a/chrome/android/java/res/layout/dialog_with_titlebar.xml +++ /dev/null
@@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2015 The Chromium Authors. All rights reserved. - Use of this source code is governed by a BSD-style license that can be - found in the LICENSE file. --> - -<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent" > - - <LinearLayout - android:layout_width="match_parent" - android:layout_height="@dimen/toolbar_height_no_shadow" - android:background="@color/default_primary_color" > - - <TextView - android:id="@+id/title" - android:layout_width="0dp" - android:layout_height="match_parent" - android:layout_weight="1" - android:fontFamily="sans-serif-medium" - android:gravity="center_vertical" - android:paddingStart="16dp" - android:paddingEnd="16dp" - android:textColor="#333333" - android:textSize="20sp" /> - - <ImageButton - android:id="@+id/close_button" - style="@style/ToolbarButton" - android:layout_width="52dp" - android:layout_height="match_parent" - android:layout_gravity="top" - android:contentDescription="@string/close" - android:src="@drawable/btn_close" /> - </LinearLayout> - - <ImageView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/toolbar_height_no_shadow" - android:contentDescription="@null" - android:scaleType="fitXY" - android:src="@drawable/toolbar_shadow" /> - - <!-- Dialog content will be inserted here from Java code --> - -</FrameLayout> \ No newline at end of file
diff --git a/chrome/android/java/res/layout/fre_data_reduction_proxy.xml b/chrome/android/java/res/layout/fre_data_reduction_proxy.xml index 08c7356..1be505b 100644 --- a/chrome/android/java/res/layout/fre_data_reduction_proxy.xml +++ b/chrome/android/java/res/layout/fre_data_reduction_proxy.xml
@@ -66,6 +66,7 @@ android:textSize="@dimen/fre_normal_text_size" /> <android.support.v7.widget.SwitchCompat + style="@style/RobotoMediumStyle" android:id="@+id/enable_data_saver_switch" android:layout_width="match_parent" android:layout_height="wrap_content" @@ -73,8 +74,7 @@ android:showText="false" android:text="@string/data_reduction_enabled_switch" android:textColor="@color/fre_text_color" - android:textSize="@dimen/fre_normal_text_size" - android:fontFamily="sans-serif-medium" /> + android:textSize="@dimen/fre_normal_text_size" /> </LinearLayout> </LinearLayout>
diff --git a/chrome/android/java/res/layout/new_tab_page_incognito.xml b/chrome/android/java/res/layout/new_tab_page_incognito.xml index 84f44dcf..f6be0ba3 100644 --- a/chrome/android/java/res/layout/new_tab_page_incognito.xml +++ b/chrome/android/java/res/layout/new_tab_page_incognito.xml
@@ -64,7 +64,6 @@ style="@style/IncognitoNewTabLearnMoreLink" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:fontFamily="sans-serif-medium" android:text="@string/learn_more" android:textColor="#03a9f4" />
diff --git a/chrome/android/java/res/layout/new_tab_page_incognito_md.xml b/chrome/android/java/res/layout/new_tab_page_incognito_md.xml index 2e1a7708..146fd29 100644 --- a/chrome/android/java/res/layout/new_tab_page_incognito_md.xml +++ b/chrome/android/java/res/layout/new_tab_page_incognito_md.xml
@@ -78,10 +78,10 @@ android:background="?attr/listChoiceBackgroundIndicator" android:clickable="true" android:focusable="true" - android:fontFamily="sans-serif-medium" android:text="@string/learn_more" android:textColor="@color/google_blue_300" - android:lineSpacingExtra="6sp" /> + android:lineSpacingExtra="6sp" + style="@style/RobotoMediumStyle" /> </LinearLayout>
diff --git a/chrome/android/java/res/layout/photo_picker_bitmap_view.xml b/chrome/android/java/res/layout/photo_picker_bitmap_view.xml index e84c8c3..22c50cc 100644 --- a/chrome/android/java/res/layout/photo_picker_bitmap_view.xml +++ b/chrome/android/java/res/layout/photo_picker_bitmap_view.xml
@@ -77,11 +77,10 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/photo_picker_label_gap" - android:fontFamily="sans-serif-medium" android:gravity="center" - android:textStyle="bold" android:textSize="14sp" android:textAllCaps="true" - android:textColor="@color/photo_picker_special_tile_color" /> + android:textColor="@color/photo_picker_special_tile_color" + style="@style/RobotoMediumStyle" /> </LinearLayout> </view>
diff --git a/chrome/android/java/res/layout/snackbar.xml b/chrome/android/java/res/layout/snackbar.xml index d9ba185..d466784 100644 --- a/chrome/android/java/res/layout/snackbar.xml +++ b/chrome/android/java/res/layout/snackbar.xml
@@ -41,7 +41,6 @@ android:layout_gravity="center_vertical" android:paddingEnd="24dp" android:paddingStart="24dp" - android:fontFamily="sans-serif-medium" android:textAllCaps="true" android:textColor="@color/snackbar_button_color" android:textSize="14sp"
diff --git a/chrome/android/java/res/values-v17/styles.xml b/chrome/android/java/res/values-v17/styles.xml index 80b0593e..09c67660 100644 --- a/chrome/android/java/res/values-v17/styles.xml +++ b/chrome/android/java/res/values-v17/styles.xml
@@ -130,10 +130,9 @@ <item name="android:paddingTop">16dp</item> <item name="android:layout_marginBottom">16dp</item> </style> - <style name="PreferenceCategoryTextStyle"> + <style name="PreferenceCategoryTextStyle" parent="RobotoMediumStyle"> <item name="android:textColor">@color/pref_accent_color</item> <item name="android:textSize">12sp</item> - <item name="android:textStyle">bold</item> </style> <style name="PreferenceTitle"> <item name="android:ellipsize">end</item> @@ -720,7 +719,7 @@ <item name="android:textSize">14sp</item> <item name="android:lineSpacingMultiplier">1.2</item> </style> - <style name="IncognitoNewTabLearnMoreLink"> + <style name="IncognitoNewTabLearnMoreLink" parent="RobotoMediumStyle"> <item name="android:background">?attr/listChoiceBackgroundIndicator</item> <item name="android:clickable">true</item> <item name="android:focusable">true</item>
diff --git a/chrome/android/java/res/values-v21/styles.xml b/chrome/android/java/res/values-v21/styles.xml index 51ade34..725a6828d 100644 --- a/chrome/android/java/res/values-v21/styles.xml +++ b/chrome/android/java/res/values-v21/styles.xml
@@ -25,8 +25,7 @@ <item name="android:paddingStart">?android:attr/listPreferredItemPaddingStart</item> <item name="android:paddingEnd">4dp</item> </style> - <style name="PreferenceCategoryTextStyle"> - <item name="android:fontFamily">sans-serif-medium</item> + <style name="PreferenceCategoryTextStyle" parent="RobotoMediumStyle"> <item name="android:textColor">@color/pref_accent_color</item> <item name="android:textSize">12sp</item> </style>
diff --git a/chrome/android/java/res/values-v21/values.xml b/chrome/android/java/res/values-v21/values.xml deleted file mode 100644 index d903908..0000000 --- a/chrome/android/java/res/values-v21/values.xml +++ /dev/null
@@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2015 The Chromium Authors. All rights reserved. - Use of this source code is governed by a BSD-style license that can be - found in the LICENSE file. --> - -<resources xmlns:android="http://schemas.android.com/apk/res/android"> - <!-- Font to use when a spec asks for "Roboto Medium". --> - <string name="roboto_medium_typeface">sans-serif-medium</string> - <integer name="roboto_medium_textstyle">0</integer> -</resources>
diff --git a/chrome/android/java/res/values/ids.xml b/chrome/android/java/res/values/ids.xml index ae55468..ab3adfd 100644 --- a/chrome/android/java/res/values/ids.xml +++ b/chrome/android/java/res/values/ids.xml
@@ -22,6 +22,7 @@ <!-- InfoBar constants --> <item type="id" name="button_primary" /> <item type="id" name="button_secondary" /> + <item type="id" name="infobar_icon" /> <item type="id" name="infobar_close_button" /> <item type="id" name="infobar_extra_check" /> <item type="id" name="infobar_message" />
diff --git a/chrome/android/java/res/values/values.xml b/chrome/android/java/res/values/values.xml index ef5aa31..8ea6bc2 100644 --- a/chrome/android/java/res/values/values.xml +++ b/chrome/android/java/res/values/values.xml
@@ -8,12 +8,6 @@ xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation"> - <!-- Font to use when a spec asks for "Roboto Medium". - Bolding the text makes it look almost, but not quite, entirely unlike Roboto Medium, - which doesn't exist pre-L. --> - <string name="roboto_medium_typeface">sans-serif</string> - <integer name="roboto_medium_textstyle">1</integer> - <!-- Menu Animation Constants --> <item type="fraction" format="fraction" name="menu_animation_pivot_x">95%</item>
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarLayout.java index ec47df7..312102d 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarLayout.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarLayout.java
@@ -8,7 +8,6 @@ import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.Bitmap; -import android.graphics.Typeface; import android.graphics.drawable.Drawable; import android.support.annotation.Nullable; import android.text.SpannableString; @@ -26,6 +25,7 @@ import org.chromium.base.ApiCompatibilityUtils; import org.chromium.chrome.R; import org.chromium.chrome.browser.widget.DualControlLayout; +import org.chromium.ui.UiUtils; import org.chromium.ui.text.NoUnderlineClickableSpan; import org.chromium.ui.widget.ButtonCompat; @@ -259,10 +259,8 @@ lp.endMargin = mBigIconMargin; Resources res = getContext().getResources(); - String typeface = res.getString(R.string.roboto_medium_typeface); - int textStyle = res.getInteger(R.integer.roboto_medium_textstyle); float textSize = res.getDimension(R.dimen.infobar_big_icon_message_size); - mMessageTextView.setTypeface(Typeface.create(typeface, textStyle)); + mMessageTextView.setTypeface(UiUtils.createRobotoMediumTypeface()); mMessageTextView.setMaxLines(1); mMessageTextView.setEllipsize(TextUtils.TruncateAt.END); mMessageTextView.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize); @@ -529,6 +527,7 @@ iconView.setImageBitmap(iconBitmap); } iconView.setFocusable(false); + iconView.setId(R.id.infobar_icon); iconView.setScaleType(ImageView.ScaleType.CENTER_INSIDE); } return iconView;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/infobar/ReaderModeInfoBar.java b/chrome/android/java/src/org/chromium/chrome/browser/infobar/ReaderModeInfoBar.java index 2eca9f3..14948a1 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/infobar/ReaderModeInfoBar.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/infobar/ReaderModeInfoBar.java
@@ -23,6 +23,16 @@ */ public class ReaderModeInfoBar extends InfoBar { /** + * Navigate to Reader Mode when the icon or the message text is clicked. + */ + private View.OnClickListener mNavigateListener = new View.OnClickListener() { + @Override + public void onClick(View v) { + if (getReaderModeManager() != null) getReaderModeManager().navigateToReaderMode(); + } + }; + + /** * Default constructor. */ private ReaderModeInfoBar() { @@ -44,14 +54,9 @@ prompt.setTextColor( ApiCompatibilityUtils.getColor(layout.getResources(), R.color.default_text_color)); prompt.setGravity(Gravity.CENTER_VERTICAL); + prompt.setOnClickListener(mNavigateListener); - prompt.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - if (getReaderModeManager() != null) getReaderModeManager().navigateToReaderMode(); - } - }); - + layout.findViewById(R.id.infobar_icon).setOnClickListener(mNavigateListener); layout.addContent(prompt, 1f); }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteMediaPlayerBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteMediaPlayerBridge.java index 2219914c..5cccb6c5 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteMediaPlayerBridge.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteMediaPlayerBridge.java
@@ -11,6 +11,7 @@ import org.chromium.base.annotations.JNINamespace; import org.chromium.blink_public.platform.modules.remoteplayback.WebRemotePlaybackAvailability; import org.chromium.chrome.browser.media.remote.RemoteVideoInfo.PlayerState; +import org.chromium.chrome.browser.vr_shell.VrShellDelegate; /** * Acts as a proxy between the remotely playing video and the HTMLMediaElement. @@ -202,6 +203,11 @@ @CalledByNative private void requestRemotePlayback(long startPositionMillis) { Log.d(TAG, "requestRemotePlayback at t=%d", startPositionMillis); + // TODO(crbug.com/736568): Re-enable dialog in VR. + if (VrShellDelegate.isInVr()) { + mMediaStateListener.onRouteDialogCancelled(); + return; + } if (mRouteController == null) return; // Clear out the state mPauseRequested = false; @@ -217,6 +223,11 @@ @CalledByNative private void requestRemotePlaybackControl() { Log.d(TAG, "requestRemotePlaybackControl"); + // TODO(crbug.com/736568): Re-enable dialog in VR. + if (VrShellDelegate.isInVr()) { + mMediaStateListener.onRouteDialogCancelled(); + return; + } RemoteMediaPlayerController.instance().requestRemotePlaybackControl(mMediaStateListener); }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NativePageDialog.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NativePageDialog.java deleted file mode 100644 index 63f0935..0000000 --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NativePageDialog.java +++ /dev/null
@@ -1,61 +0,0 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.chrome.browser.ntp; - -import android.app.Activity; -import android.os.Bundle; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup.LayoutParams; -import android.view.WindowManager; -import android.widget.FrameLayout; -import android.widget.ImageButton; -import android.widget.TextView; - -import org.chromium.chrome.R; -import org.chromium.chrome.browser.NativePage; -import org.chromium.chrome.browser.widget.AlwaysDismissedDialog; - -/** - * Displays a NativePage in a full screen dialog instead of like a regular Chrome page. - */ -public class NativePageDialog extends AlwaysDismissedDialog { - private final NativePage mPage; - - public NativePageDialog(Activity ownerActivity, NativePage page) { - super(ownerActivity, R.style.DialogWhenLarge); - mPage = page; - } - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - FrameLayout view = (FrameLayout) LayoutInflater.from(getContext()).inflate( - R.layout.dialog_with_titlebar, null); - view.addView(mPage.getView(), 0); - setContentView(view); - - getWindow().setLayout(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); - getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND); - - TextView title = (TextView) view.findViewById(R.id.title); - title.setText(mPage.getTitle()); - - ImageButton closeButton = (ImageButton) view.findViewById(R.id.close_button); - closeButton.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - dismiss(); - } - }); - } - - @Override - public void dismiss() { - super.dismiss(); - if (mPage != null) mPage.destroy(); - } -}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/prefetch/PrefetchBackgroundTask.java b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/prefetch/PrefetchBackgroundTask.java index 3d1741b3..62996a22 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/prefetch/PrefetchBackgroundTask.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/prefetch/PrefetchBackgroundTask.java
@@ -7,23 +7,17 @@ import android.content.Context; import org.chromium.base.ContextUtils; -import org.chromium.base.Log; import org.chromium.base.VisibleForTesting; import org.chromium.base.annotations.CalledByNative; import org.chromium.base.annotations.JNINamespace; -import org.chromium.base.annotations.SuppressFBWarnings; -import org.chromium.base.library_loader.LibraryProcessType; -import org.chromium.base.library_loader.ProcessInitException; -import org.chromium.chrome.browser.init.ChromeBrowserInitializer; +import org.chromium.chrome.browser.background_task_scheduler.NativeBackgroundTask; import org.chromium.chrome.browser.profiles.Profile; -import org.chromium.components.background_task_scheduler.BackgroundTask; import org.chromium.components.background_task_scheduler.BackgroundTask.TaskFinishedCallback; import org.chromium.components.background_task_scheduler.BackgroundTaskScheduler; import org.chromium.components.background_task_scheduler.BackgroundTaskSchedulerFactory; import org.chromium.components.background_task_scheduler.TaskIds; import org.chromium.components.background_task_scheduler.TaskInfo; import org.chromium.components.background_task_scheduler.TaskParameters; -import org.chromium.content.browser.BrowserStartupController; import java.util.concurrent.TimeUnit; @@ -34,7 +28,7 @@ * happens when a task fires. */ @JNINamespace("offline_pages::prefetch") -public class PrefetchBackgroundTask implements BackgroundTask { +public class PrefetchBackgroundTask extends NativeBackgroundTask { public static final long DEFAULT_START_DELAY_SECONDS = 15 * 60; private static final String TAG = "OPPrefetchBGTask"; @@ -43,16 +37,9 @@ private long mNativeTask = 0; private TaskFinishedCallback mTaskFinishedCallback = null; + private Profile mProfile = null; - private Profile mProfile; - - public PrefetchBackgroundTask() { - mProfile = Profile.getLastUsedProfile(); - } - - public PrefetchBackgroundTask(Profile profile) { - mProfile = profile; - } + public PrefetchBackgroundTask() {} static BackgroundTaskScheduler getScheduler() { if (sSchedulerInstance != null) { @@ -61,6 +48,11 @@ return BackgroundTaskSchedulerFactory.getScheduler(); } + protected Profile getProfile() { + if (mProfile == null) mProfile = Profile.getLastUsedProfile(); + return mProfile; + } + /** * Schedules the default 'NWake' task for the prefetching service. * @@ -94,39 +86,47 @@ ContextUtils.getApplicationContext(), TaskIds.OFFLINE_PAGES_PREFETCH_JOB_ID); } - /** - * Initializer that runs when the task wakes up Chrome. - * - * Loads the native library and then calls into the PrefetchService, which then manages the - * lifetime of this task. - */ @Override - public boolean onStartTask( + public int onStartTaskBeforeNativeLoaded( Context context, TaskParameters taskParameters, TaskFinishedCallback callback) { - assert taskParameters.getTaskId() == TaskIds.OFFLINE_PAGES_PREFETCH_JOB_ID; - if (mNativeTask != 0) return false; - // TODO(dewittj): Ensure that the conditions are right to do work. If the maximum time to // wait is reached, it is possible the task will fire even if network conditions are - // incorrect. - - // Ensures that native potion of the browser is launched. - launchBrowserIfNecessary(context); - - mTaskFinishedCallback = callback; - return nativeStartPrefetchTask(mProfile); + // incorrect. We want: + // * Unmetered WiFi connection + // * >50% battery + // * Preferences enabled. + return NativeBackgroundTask.LOAD_NATIVE; } @Override - public boolean onStopTask(Context context, TaskParameters taskParameters) { + protected void onStartTaskWithNative( + Context context, TaskParameters taskParameters, TaskFinishedCallback callback) { assert taskParameters.getTaskId() == TaskIds.OFFLINE_PAGES_PREFETCH_JOB_ID; - if (mNativeTask == 0) return false; + if (mNativeTask != 0) return; + + mTaskFinishedCallback = callback; + nativeStartPrefetchTask(getProfile()); + } + + @Override + protected boolean onStopTaskBeforeNativeLoaded(Context context, TaskParameters taskParameters) { + // TODO(dewittj): Implement this properly. + return true; + } + + @Override + protected boolean onStopTaskWithNative(Context context, TaskParameters taskParameters) { + assert taskParameters.getTaskId() == TaskIds.OFFLINE_PAGES_PREFETCH_JOB_ID; + assert mNativeTask != 0; return nativeOnStopTask(mNativeTask); } @Override - public void reschedule(Context context) {} + public void reschedule(Context context) { + // TODO(dewittj): Set the backoff time appropriately. + scheduleTask(0); + } /** * Called during construction of the native task. @@ -151,26 +151,6 @@ } @VisibleForTesting - @SuppressFBWarnings("DM_EXIT") - void launchBrowserIfNecessary(Context context) { - if (BrowserStartupController.get(LibraryProcessType.PROCESS_BROWSER) - .isStartupSuccessfullyCompleted()) { - return; - } - - // TODO(https://crbug.com/717251): Remove when BackgroundTaskScheduler supports loading the - // native library. - try { - ChromeBrowserInitializer.getInstance(context).handleSynchronousStartup(); - } catch (ProcessInitException e) { - Log.e(TAG, "ProcessInitException while starting the browser process."); - // Since the library failed to initialize nothing in the application can work, so kill - // the whole application not just the activity. - System.exit(-1); - } - } - - @VisibleForTesting static void setSchedulerForTesting(BackgroundTaskScheduler scheduler) { sSchedulerInstance = scheduler; }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/OmniboxPlaceholderFieldTrial.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/OmniboxPlaceholderFieldTrial.java index 99a70d5..08eddf5 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/OmniboxPlaceholderFieldTrial.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/OmniboxPlaceholderFieldTrial.java
@@ -17,12 +17,9 @@ public class OmniboxPlaceholderFieldTrial { private static final String FIELD_TRIAL_NAME = "OmniboxPlaceholderExperiment"; private static final String GROUP_SEARCH_OR_TYPE_URL = "SearchOrTypeUrl"; - private static final String GROUP_SEARCH_OR_TYPE_WEBSITE_NAME = "SearchOrTypeWebsiteName"; - private static final String GROUP_SEARCH_THE_WEB = "SearchTheWeb"; - private static final String GROUP_ENTER_A_SEARCH_OR_WEBSITE = "EnterASearchOrWebsite"; - private static final String GROUP_SEARCH_NEWS = "SearchNews"; - private static final String GROUP_SEARCH_RECIPES = "SearchRecipes"; - private static final String GROUP_SEARCH_WEATHER = "SearchWeather"; + private static final String GROUP_SEARCH_OR_TYPE_WEB_ADDRESS = "SearchOrTypeWebAddress"; + private static final String GROUP_TYPE_WHAT_YOU_ARE_LOOKING_FOR = "TypeWhatYouAreLookingFor"; + private static final String GROUP_FIND_NEWS_RECIPES_WEATHER = "FindNewsRecipesWeather"; private static final String GROUP_BLANK = "Blank"; private static String sCachedHint; @@ -50,23 +47,14 @@ case GROUP_SEARCH_OR_TYPE_URL: sCachedHint = resources.getString(R.string.search_or_type_url); break; - case GROUP_SEARCH_OR_TYPE_WEBSITE_NAME: - sCachedHint = resources.getString(R.string.search_or_type_website_name); + case GROUP_SEARCH_OR_TYPE_WEB_ADDRESS: + sCachedHint = resources.getString(R.string.search_or_type_web_address); break; - case GROUP_SEARCH_THE_WEB: - sCachedHint = resources.getString(R.string.search_the_web); + case GROUP_TYPE_WHAT_YOU_ARE_LOOKING_FOR: + sCachedHint = resources.getString(R.string.type_what_you_are_looking_for); break; - case GROUP_ENTER_A_SEARCH_OR_WEBSITE: - sCachedHint = resources.getString(R.string.enter_a_search_or_website); - break; - case GROUP_SEARCH_NEWS: - sCachedHint = resources.getString(R.string.search_news); - break; - case GROUP_SEARCH_RECIPES: - sCachedHint = resources.getString(R.string.search_recipes); - break; - case GROUP_SEARCH_WEATHER: - sCachedHint = resources.getString(R.string.search_weather); + case GROUP_FIND_NEWS_RECIPES_WEATHER: + sCachedHint = resources.getString(R.string.find_news_recipes_weather); break; case GROUP_BLANK: sCachedHint = "";
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/geo/GeolocationSnackbarController.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/geo/GeolocationSnackbarController.java index 8b1352d..d117f6ca7 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/geo/GeolocationSnackbarController.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/geo/GeolocationSnackbarController.java
@@ -9,7 +9,7 @@ import android.net.Uri; import android.os.Build; import android.text.SpannableString; -import android.text.style.TypefaceSpan; +import android.text.style.StyleSpan; import android.view.View; import org.chromium.base.ContextUtils; @@ -74,7 +74,7 @@ } Uri searchUri = Uri.parse(TemplateUrlService.getInstance().getUrlForSearchQuery("foo")); - TypefaceSpan robotoMediumSpan = new TypefaceSpan("sans-serif-medium"); + StyleSpan robotoMediumSpan = new StyleSpan(R.style.RobotoMediumStyle); String messageWithoutSpans = context.getResources().getString( R.string.omnibox_geolocation_disclosure, "<b>" + searchUri.getHost() + "</b>"); SpannableString message = SpanApplier.applySpans(messageWithoutSpans,
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/BillingAddressAdapter.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/BillingAddressAdapter.java index 51c340d..880cb980 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/BillingAddressAdapter.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/BillingAddressAdapter.java
@@ -6,7 +6,6 @@ import android.content.Context; import android.content.res.Resources; -import android.graphics.Typeface; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; @@ -14,6 +13,7 @@ import org.chromium.base.ApiCompatibilityUtils; import org.chromium.chrome.R; import org.chromium.chrome.browser.widget.TintedDrawable; +import org.chromium.ui.UiUtils; import java.util.List; @@ -116,9 +116,7 @@ // Set the correct appearance, face and style for the text. ApiCompatibilityUtils.setTextAppearance( textView, R.style.PaymentsUiSectionAddButtonLabel); - textView.setTypeface( - Typeface.create(resources.getString(R.string.roboto_medium_typeface), - R.integer.roboto_medium_textstyle)); + textView.setTypeface(UiUtils.createRobotoMediumTypeface()); // Padding at the bottom of the dropdown. ApiCompatibilityUtils.setPaddingRelative(convertView,
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestSection.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestSection.java index 8d5c0f97..834d19b2 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestSection.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestSection.java
@@ -7,7 +7,6 @@ import android.content.Context; import android.content.res.Resources; import android.graphics.Color; -import android.graphics.Typeface; import android.graphics.drawable.Drawable; import android.os.Handler; import android.support.v4.view.animation.LinearOutSlowInInterpolator; @@ -37,6 +36,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.widget.DualControlLayout; import org.chromium.chrome.browser.widget.TintedDrawable; +import org.chromium.ui.UiUtils; import java.util.ArrayList; import java.util.List; @@ -942,8 +942,6 @@ labelView.setEnabled(isEnabled); } else if (mRowType == OPTION_ROW_TYPE_ADD) { // Shows string saying that the user can add a new option, e.g. credit card no. - String typeface = resources.getString(R.string.roboto_medium_typeface); - int textStyle = resources.getInteger(R.integer.roboto_medium_textstyle); int buttonHeight = resources.getDimensionPixelSize( R.dimen.payments_section_add_button_height); @@ -951,7 +949,7 @@ labelView, R.style.PaymentsUiSectionAddButtonLabel); labelView.setMinimumHeight(buttonHeight); labelView.setGravity(Gravity.CENTER_VERTICAL); - labelView.setTypeface(Typeface.create(typeface, textStyle)); + labelView.setTypeface(UiUtils.createRobotoMediumTypeface()); } else if (mRowType == OPTION_ROW_TYPE_DESCRIPTION) { // The description spans all the columns. columnStart = 0;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/ExpandablePreferenceGroup.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/ExpandablePreferenceGroup.java index f709b697..49df02c 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/ExpandablePreferenceGroup.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/ExpandablePreferenceGroup.java
@@ -6,13 +6,11 @@ import android.content.Context; import android.graphics.drawable.Drawable; -import android.os.Build; import android.preference.PreferenceGroup; import android.text.Spannable; import android.text.SpannableStringBuilder; import android.text.style.ForegroundColorSpan; import android.text.style.StyleSpan; -import android.text.style.TypefaceSpan; import android.util.AttributeSet; import android.view.View; import android.widget.ImageView; @@ -47,18 +45,8 @@ new SpannableStringBuilder(getContext().getResources().getString(resourceId)); String prefCount = String.format(Locale.getDefault(), " - %d", count); spannable.append(prefCount); - - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { - spannable.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), - 0, - spannable.length() - prefCount.length(), - Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); - } else { - spannable.setSpan(new TypefaceSpan("sans-serif-medium"), - 0, - spannable.length() - prefCount.length(), - Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); - } + spannable.setSpan(new StyleSpan(R.style.RobotoMediumStyle), 0, + spannable.length() - prefCount.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); // Color the first part of the title blue. ForegroundColorSpan blueSpan = new ForegroundColorSpan(
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncErrorCardPreference.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncErrorCardPreference.java index 399fb26..a1c2350 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncErrorCardPreference.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncErrorCardPreference.java
@@ -5,7 +5,6 @@ package org.chromium.chrome.browser.preferences; import android.content.Context; -import android.graphics.Typeface; import android.preference.Preference; import android.util.AttributeSet; import android.util.TypedValue; @@ -15,6 +14,7 @@ import org.chromium.base.ApiCompatibilityUtils; import org.chromium.chrome.R; +import org.chromium.ui.UiUtils; /** * A preference that displays hint message to resolve sync error. Click of it navigates user to @@ -33,7 +33,7 @@ View view = super.onCreateView(parent); TextView title = (TextView) view.findViewById(android.R.id.title); title.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16); - title.setTypeface(Typeface.create("sans-serif-medium", Typeface.NORMAL)); + title.setTypeface(UiUtils.createRobotoMediumTypeface()); title.setTextColor(ApiCompatibilityUtils.getColor( getContext().getResources(), R.color.input_underline_error_color)); return view;
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd index 94f2e2b..d56817e 100644 --- a/chrome/android/java/strings/android_chrome_strings.grd +++ b/chrome/android/java/strings/android_chrome_strings.grd
@@ -1773,7 +1773,7 @@ <message name="IDS_BROWSER_ACTIONS_SINGLE_LINK_OPEN_NOTIFICATION_TITLE" desc="Content title displayed in the notification when one link is opened in the background from Browser Actions. [CHAR-LIMIT=30]"> Link opened in Chrome </message> - <message name="IDS_BROWSER_ACTIONS_MULTI_LINKS_OPEN_NOTIFICATION_TITLE" desc="Content title displayed in the notification when multiple links are opened in the background from Browser Actions. [CHAR-LIMIT=30]"> + <message name="IDS_BROWSER_ACTIONS_MULTI_LINKS_OPEN_NOTIFICATION_TITLE" desc="Content title displayed in the notification when multiple links are opened in the background from Browser Actions. [CHAR-LIMIT=41]"> Multiple links opened in Chrome </message> <message name="IDS_BROWSER_ACTIONS_NOTIFICATION_TEXT" desc="Context text displayed in the notification when links are opened in the background from Browser Actions. [CHAR-LIMIT=30]"> @@ -2541,31 +2541,19 @@ </message> <!-- Omnibox --> - <message name="IDS_SEARCH_OR_TYPE_URL" desc="Prompt to enter text into the text field that will either perform web searches or navigate to a URL. [CHAR-LIMIT=38]"> - Search or type URL - </message> <message name="IDS_LOCATION_BAR_VERBOSE_STATUS_OFFLINE" desc="Verbose indication of offline status in the location bar. [CHAR-LIMIT=20]"> Offline </message> <!-- Omnibox Placeholder Experiment --> - <message name="IDS_SEARCH_OR_TYPE_WEBSITE_NAME" desc="Prompt to enter text into the text field that will either perform web searches or navigate to a URL. [CHAR-LIMIT=38]"> - Search or type website name + <message name="IDS_SEARCH_OR_TYPE_WEB_ADDRESS" desc="Prompt to enter text into the text field that will either perform web searches or navigate to a website. [CHAR-LIMIT=38]"> + Search or type web address </message> - <message name="IDS_SEARCH_THE_WEB" desc="Prompt to enter text into the text field that will either perform web searches or navigate to a URL. [CHAR-LIMIT=38]"> - Search the web + <message name="IDS_TYPE_WHAT_YOU_ARE_LOOKING_FOR" desc="Prompt to enter what user is looking for into the text field that will either perform web searches or navigate to a website. [CHAR-LIMIT=38]"> + Type what you’re looking for </message> - <message name="IDS_ENTER_A_SEARCH_OR_WEBSITE" desc="Prompt to enter text into the text field that will either perform web searches or navigate to a URL. [CHAR-LIMIT=38]"> - Enter a search or website - </message> - <message name="IDS_SEARCH_NEWS" desc="Prompt to enter text into the text field that will either perform web searches or navigate to a URL, with a suggestion of searching news. [CHAR-LIMIT=38]"> - Search… news - </message> - <message name="IDS_SEARCH_RECIPES" desc="Prompt to enter text into the text field that will either perform web searches or navigate to a URL, with a suggestion of searching recipes. [CHAR-LIMIT=38]"> - Search… recipes - </message> - <message name="IDS_SEARCH_WEATHER" desc="Prompt to enter text into the text field that will either perform web searches or navigate to a URL, with a suggestion of searching weather. [CHAR-LIMIT=38]"> - Search… weather + <message name="IDS_FIND_NEWS_RECIPES_WEATHER" desc="Prompt to enter text into the text field that will either perform web searches or navigate to a website, with suggestions of finding news, recipes or weather. [CHAR-LIMIT=38]"> + Find news, recipes, weather... </message> <!-- Voice search -->
diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni index a72e0ac..158ce1e 100644 --- a/chrome/android/java_sources.gni +++ b/chrome/android/java_sources.gni
@@ -621,7 +621,6 @@ "java/src/org/chromium/chrome/browser/ntp/LogoDelegateImpl.java", "java/src/org/chromium/chrome/browser/ntp/LogoView.java", "java/src/org/chromium/chrome/browser/ntp/NativePageAssassin.java", - "java/src/org/chromium/chrome/browser/ntp/NativePageDialog.java", "java/src/org/chromium/chrome/browser/ntp/NativePageFactory.java", "java/src/org/chromium/chrome/browser/ntp/NativePageRootFrameLayout.java", "java/src/org/chromium/chrome/browser/ntp/NewTabPage.java",
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/WebShareTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/WebShareTest.java index 1dd80a0..84b1de4 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/WebShareTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/WebShareTest.java
@@ -101,25 +101,11 @@ } /** - * Verify that WebShare is missing by default (without a flag). - * @throws Exception - */ - @Test - @MediumTest - @Feature({"WebShare"}) - public void testWebShareMissingWithoutFlag() throws Exception { - mActivityTestRule.loadUrl(mUrl); - mActivityTestRule.runJavaScriptCodeInCurrentTab("initiate_share()"); - Assert.assertEquals("Fail: navigator.share === undefined", mUpdateWaiter.waitForUpdate()); - } - - /** * Verify that WebShare fails if called without a user gesture. * @throws Exception */ @Test @MediumTest - @CommandLineFlags.Add("enable-blink-features=WebShare") @Feature({"WebShare"}) public void testWebShareNoUserGesture() throws Exception { mActivityTestRule.loadUrl(mUrl); @@ -130,28 +116,11 @@ } /** - * Verify that WebShare fails if the origin trial is disabled. - * @throws Exception - */ - @Test - @MediumTest - @CommandLineFlags.Add({"enable-blink-features=WebShare", - "origin-trial-disabled-features=WebShare"}) - @Feature({"WebShare"}) - public void testWebShareOriginTrialDisabled() throws Exception { - mActivityTestRule.loadUrl(mUrl); - TouchCommon.singleClickView(mTab.getView()); - Assert.assertEquals( - "Fail: SecurityError: WebShare is disabled.", mUpdateWaiter.waitForUpdate()); - } - - /** * Verify WebShare fails if share is called from a user gesture, and canceled. * @throws Exception */ @Test @MediumTest - @CommandLineFlags.Add("enable-blink-features=WebShare") @Feature({"WebShare"}) public void testWebShareCancel() throws Exception { // This test tests functionality that is only available post Lollipop MR1. @@ -184,7 +153,6 @@ */ @Test @MediumTest - @CommandLineFlags.Add("enable-blink-features=WebShare") @Feature({"WebShare"}) public void testWebShareSuccess() throws Exception { // This test tests functionality that is only available post Lollipop MR1. @@ -240,7 +208,6 @@ */ @Test @MediumTest - @CommandLineFlags.Add("enable-blink-features=WebShare") @Feature({"WebShare"}) public void testWebShareCancelPreLMR1() throws Exception { ShareHelper.setFakeIntentReceiverForTesting(new ShareHelper.FakeIntentReceiver() { @@ -271,7 +238,6 @@ */ @Test @MediumTest - @CommandLineFlags.Add("enable-blink-features=WebShare") @Feature({"WebShare"}) public void testWebShareSuccessPreLMR1() throws Exception { ShareHelper.setFakeIntentReceiverForTesting(new ShareHelper.FakeIntentReceiver() {
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/prefetch/PrefetchBackgroundTaskTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/prefetch/PrefetchBackgroundTaskTest.java index 437bdd5..ef62836 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/prefetch/PrefetchBackgroundTaskTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/prefetch/PrefetchBackgroundTaskTest.java
@@ -22,7 +22,6 @@ import org.chromium.base.test.util.CommandLineFlags; import org.chromium.chrome.browser.ChromeActivity; import org.chromium.chrome.browser.ChromeSwitches; -import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.test.ChromeActivityTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.components.background_task_scheduler.BackgroundTask.TaskFinishedCallback; @@ -56,7 +55,6 @@ private Semaphore mStopSemaphore = new Semaphore(0); public TestPrefetchBackgroundTask(TaskInfo taskInfo) { - super(Profile.getLastUsedProfile()); mTaskInfo = taskInfo; }
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/prefetch/PrefetchBackgroundTaskUnitTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/prefetch/PrefetchBackgroundTaskUnitTest.java index 3c84028..06c1f88a 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/prefetch/PrefetchBackgroundTaskUnitTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/prefetch/PrefetchBackgroundTaskUnitTest.java
@@ -9,10 +9,12 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; +import static org.junit.Assert.fail; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -20,6 +22,9 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +import org.mockito.ArgumentCaptor; +import org.mockito.Captor; +import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.mockito.Spy; import org.mockito.invocation.InvocationOnMock; @@ -30,6 +35,9 @@ import org.robolectric.internal.ShadowExtractor; import org.robolectric.shadows.multidex.ShadowMultiDex; +import org.chromium.base.library_loader.ProcessInitException; +import org.chromium.chrome.browser.init.BrowserParts; +import org.chromium.chrome.browser.init.ChromeBrowserInitializer; import org.chromium.components.background_task_scheduler.BackgroundTask.TaskFinishedCallback; import org.chromium.components.background_task_scheduler.BackgroundTaskScheduler; import org.chromium.components.background_task_scheduler.BackgroundTaskSchedulerFactory; @@ -76,12 +84,33 @@ } @Spy - private PrefetchBackgroundTask mPrefetchBackgroundTask = new PrefetchBackgroundTask(null); + private PrefetchBackgroundTask mPrefetchBackgroundTask = new PrefetchBackgroundTask(); + @Mock + private ChromeBrowserInitializer mChromeBrowserInitializer; + @Captor + ArgumentCaptor<BrowserParts> mBrowserParts; private ShadowBackgroundTaskScheduler mShadowTaskScheduler; @Before public void setUp() { MockitoAnnotations.initMocks(this); + doNothing().when(mChromeBrowserInitializer).handlePreNativeStartup(any(BrowserParts.class)); + try { + doAnswer(new Answer<Void>() { + @Override + public Void answer(InvocationOnMock invocation) { + mBrowserParts.getValue().finishNativeInitialization(); + return null; + } + }) + .when(mChromeBrowserInitializer) + .handlePostNativeStartup(eq(true), mBrowserParts.capture()); + } catch (ProcessInitException ex) { + fail("Unexpected exception while initializing mock of ChromeBrowserInitializer."); + } + + ChromeBrowserInitializer.setForTesting(mChromeBrowserInitializer); + doAnswer(new Answer() { public Object answer(InvocationOnMock invocation) { mPrefetchBackgroundTask.setNativeTask(1); @@ -91,7 +120,7 @@ .when(mPrefetchBackgroundTask) .nativeStartPrefetchTask(any()); doReturn(true).when(mPrefetchBackgroundTask).nativeOnStopTask(1); - doNothing().when(mPrefetchBackgroundTask).launchBrowserIfNecessary(any()); + doReturn(null).when(mPrefetchBackgroundTask).getProfile(); mShadowTaskScheduler = (ShadowBackgroundTaskScheduler) ShadowExtractor.extract( BackgroundTaskSchedulerFactory.getScheduler());
diff --git a/chrome/app/chrome_main.cc b/chrome/app/chrome_main.cc index 25b891f3..234c16c 100644 --- a/chrome/app/chrome_main.cc +++ b/chrome/app/chrome_main.cc
@@ -4,6 +4,7 @@ #include <stdint.h> +#include "base/callback_helpers.h" #include "base/command_line.h" #include "base/time/time.h" #include "build/build_config.h" @@ -68,7 +69,11 @@ content::ContentMainParams params(&chrome_main_delegate); #if defined(OS_WIN) - // The process should crash when going through abnormal termination. + // The process should crash when going through abnormal termination, but we + // must be sure to reset this setting when ChromeMain returns normally. + auto crash_on_detach_resetter = base::ScopedClosureRunner( + base::Bind(&base::win::SetShouldCrashOnProcessDetach, + base::win::ShouldCrashOnProcessDetach())); base::win::SetShouldCrashOnProcessDetach(true); base::win::SetAbortBehaviorForCrashReporting(); params.instance = instance; @@ -124,9 +129,5 @@ int rv = content::ContentMain(params); -#if defined(OS_WIN) - base::win::SetShouldCrashOnProcessDetach(false); -#endif - return rv; }
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index dcc4e4d..f7bd9cc 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd
@@ -5406,6 +5406,11 @@ <message name="IDS_OMNIBOX_CLEAR_ALL" desc="Accessibility text for the button that deletes all text input from the omnibox on touch devices."> Clear input </message> + <if expr="is_android"> + <message name="IDS_SEARCH_OR_TYPE_URL" desc="Prompt to enter text into the text field that will either perform web searches or navigate to a URL. [CHAR-LIMIT=38]" formatter_data="android_java"> + Search or type URL + </message> + </if> <!--Tooltip strings--> <message name="IDS_TOOLTIP_BACK" desc="The tooltip for back button">
diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp index 03df9c6b..028cdb3b 100644 --- a/chrome/app/settings_strings.grdp +++ b/chrome/app/settings_strings.grdp
@@ -3176,20 +3176,14 @@ <message name="IDS_SETTINGS_POWER_IDLE_OTHER" desc="In Device Settings > Power, menu item for custom idle behavior."> Other </message> - <message name="IDS_SETTINGS_POWER_LID_CLOSED_LABEL" desc="In Device Settings > Power, label for behavior when lid is closed."> - When lid is closed + <message name="IDS_SETTINGS_POWER_LID_CLOSED_SLEEP_LABEL" desc="In Device Settings > Power, label for suspending when lid is closed."> + Sleep when lid is closed </message> - <message name="IDS_SETTINGS_POWER_LID_CLOSED_SLEEP" desc="In Device Settings > Power, menu item for lid-closed behavior that puts the device to sleep."> - Sleep + <message name="IDS_SETTINGS_POWER_LID_CLOSED_SIGN_OUT_LABEL" desc="In Device Settings > Power, label for signing out when lid is closed."> + Sign out when lid is closed </message> - <message name="IDS_SETTINGS_POWER_LID_CLOSED_STAY_AWAKE" desc="In Device Settings > Power, menu item for lid-closed behavior that prevents the device from sleeping."> - Stay awake - </message> - <message name="IDS_SETTINGS_POWER_LID_CLOSED_SIGN_OUT" desc="In Device Settings > Power, menu item for lid-closed behavior that signs the user out."> - Sign out - </message> - <message name="IDS_SETTINGS_POWER_LID_CLOSED_SHUT_DOWN" desc="In Device Settings > Power, menu item for lid-closed behavior that shuts the system down."> - Shut down + <message name="IDS_SETTINGS_POWER_LID_CLOSED_SHUT_DOWN_LABEL" desc="In Device Settings > Power, label for shutting down when lid is closed."> + Shut down when lid is closed </message> </if>
diff --git a/chrome/app/vector_icons/BUILD.gn b/chrome/app/vector_icons/BUILD.gn index 5b53ab1..b67298ac 100644 --- a/chrome/app/vector_icons/BUILD.gn +++ b/chrome/app/vector_icons/BUILD.gn
@@ -18,7 +18,6 @@ "apps.icon", "autologin.icon", "blocked_badge.icon", - "bluetooth_connected.icon", "browser_tools_animated.1x.icon", "browser_tools_animated.icon", "browser_tools.1x.icon",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn index 72df3d62..4616e29 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn
@@ -2181,6 +2181,8 @@ "offline_pages/offliner_user_data.h", "offline_pages/prefetch/offline_metrics_collector_impl.cc", "offline_pages/prefetch/offline_metrics_collector_impl.h", + "offline_pages/prefetch/offline_prefetch_download_client.cc", + "offline_pages/prefetch/offline_prefetch_download_client.h", "offline_pages/prefetch/prefetch_instance_id_proxy.cc", "offline_pages/prefetch/prefetch_instance_id_proxy.h", "offline_pages/prefetch/prefetch_service_factory.cc",
diff --git a/chrome/browser/android/chrome_feature_list.cc b/chrome/browser/android/chrome_feature_list.cc index c3bd542..608c851 100644 --- a/chrome/browser/android/chrome_feature_list.cc +++ b/chrome/browser/android/chrome_feature_list.cc
@@ -186,10 +186,10 @@ base::FEATURE_DISABLED_BY_DEFAULT}; const base::Feature kSearchEnginePromoExistingDevice{ - "SearchEnginePromo.ExistingDevice", base::FEATURE_DISABLED_BY_DEFAULT}; + "SearchEnginePromo.ExistingDevice", base::FEATURE_ENABLED_BY_DEFAULT}; const base::Feature kSearchEnginePromoNewDevice{ - "SearchEnginePromo.NewDevice", base::FEATURE_DISABLED_BY_DEFAULT}; + "SearchEnginePromo.NewDevice", base::FEATURE_ENABLED_BY_DEFAULT}; const base::Feature kNewPhotoPicker{"NewPhotoPicker", base::FEATURE_DISABLED_BY_DEFAULT};
diff --git a/chrome/browser/android/vr_shell/BUILD.gn b/chrome/browser/android/vr_shell/BUILD.gn index c58ac362..89c566d 100644 --- a/chrome/browser/android/vr_shell/BUILD.gn +++ b/chrome/browser/android/vr_shell/BUILD.gn
@@ -34,6 +34,8 @@ "textures/button_texture.h", "textures/close_button_texture.cc", "textures/close_button_texture.h", + "textures/exclusive_screen_toast_texture.cc", + "textures/exclusive_screen_toast_texture.h", "textures/exit_prompt_texture.cc", "textures/exit_prompt_texture.h", "textures/exit_warning_texture.cc", @@ -44,8 +46,6 @@ "textures/insecure_content_transient_texture.h", "textures/loading_indicator_texture.cc", "textures/loading_indicator_texture.h", - "textures/presentation_toast_texture.cc", - "textures/presentation_toast_texture.h", "textures/render_text_wrapper.cc", "textures/render_text_wrapper.h", "textures/splash_screen_icon_texture.cc",
diff --git a/chrome/browser/android/vr_shell/color_scheme.cc b/chrome/browser/android/vr_shell/color_scheme.cc index 5545ecd..178fe5b1 100644 --- a/chrome/browser/android/vr_shell/color_scheme.cc +++ b/chrome/browser/android/vr_shell/color_scheme.cc
@@ -40,9 +40,9 @@ normal_scheme.exit_warning_foreground; normal_scheme.transient_warning_background = normal_scheme.exit_warning_background; - normal_scheme.presentation_toast_foreground = + normal_scheme.exclusive_screen_toast_foreground = normal_scheme.exit_warning_foreground; - normal_scheme.presentation_toast_background = + normal_scheme.exclusive_screen_toast_background = normal_scheme.exit_warning_background; normal_scheme.permanent_warning_foreground = 0xFF444444;
diff --git a/chrome/browser/android/vr_shell/color_scheme.h b/chrome/browser/android/vr_shell/color_scheme.h index b6516343..ccefb8bb 100644 --- a/chrome/browser/android/vr_shell/color_scheme.h +++ b/chrome/browser/android/vr_shell/color_scheme.h
@@ -45,8 +45,8 @@ SkColor exit_warning_background; SkColor transient_warning_foreground; SkColor transient_warning_background; - SkColor presentation_toast_foreground; - SkColor presentation_toast_background; + SkColor exclusive_screen_toast_foreground; + SkColor exclusive_screen_toast_background; SkColor permanent_warning_foreground; SkColor permanent_warning_background; SkColor system_indicator_foreground;
diff --git a/chrome/browser/android/vr_shell/textures/presentation_toast_texture.cc b/chrome/browser/android/vr_shell/textures/exclusive_screen_toast_texture.cc similarity index 75% rename from chrome/browser/android/vr_shell/textures/presentation_toast_texture.cc rename to chrome/browser/android/vr_shell/textures/exclusive_screen_toast_texture.cc index 2729b85..62cb453b 100644 --- a/chrome/browser/android/vr_shell/textures/presentation_toast_texture.cc +++ b/chrome/browser/android/vr_shell/textures/exclusive_screen_toast_texture.cc
@@ -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 "chrome/browser/android/vr_shell/textures/presentation_toast_texture.h" +#include "chrome/browser/android/vr_shell/textures/exclusive_screen_toast_texture.h" #include "cc/paint/skia_paint_canvas.h" #include "chrome/grit/generated_resources.h" @@ -23,12 +23,12 @@ } // namespace -PresentationToastTexture::PresentationToastTexture() = default; +ExclusiveScreenToastTexture::ExclusiveScreenToastTexture() = default; -PresentationToastTexture::~PresentationToastTexture() = default; +ExclusiveScreenToastTexture::~ExclusiveScreenToastTexture() = default; -void PresentationToastTexture::Draw(SkCanvas* sk_canvas, - const gfx::Size& texture_size) { +void ExclusiveScreenToastTexture::Draw(SkCanvas* sk_canvas, + const gfx::Size& texture_size) { cc::SkiaPaintCanvas paint_canvas(sk_canvas); gfx::Canvas gfx_canvas(&paint_canvas, 1.0f); gfx::Canvas* canvas = &gfx_canvas; @@ -36,14 +36,14 @@ size_.set_width(texture_size.width()); SkPaint paint; - paint.setColor(color_scheme().presentation_toast_background); + paint.setColor(color_scheme().exclusive_screen_toast_background); auto text = l10n_util::GetStringUTF16(IDS_PRESS_APP_TO_EXIT); gfx::FontList fonts; GetFontList(size_.width() * kFontSizeFactor, text, &fonts); gfx::Rect text_size(size_.width() * kTextWidthFactor, 0); std::vector<std::unique_ptr<gfx::RenderText>> lines = PrepareDrawStringRect( - text, fonts, color_scheme().presentation_toast_foreground, &text_size, + text, fonts, color_scheme().exclusive_screen_toast_foreground, &text_size, kTextAlignmentCenter, kWrappingBehaviorWrap); DCHECK_LE(text_size.height(), @@ -61,12 +61,12 @@ canvas->Restore(); } -gfx::Size PresentationToastTexture::GetPreferredTextureSize( +gfx::Size ExclusiveScreenToastTexture::GetPreferredTextureSize( int maximum_width) const { return gfx::Size(maximum_width, maximum_width); } -gfx::SizeF PresentationToastTexture::GetDrawnSize() const { +gfx::SizeF ExclusiveScreenToastTexture::GetDrawnSize() const { return size_; }
diff --git a/chrome/browser/android/vr_shell/textures/exclusive_screen_toast_texture.h b/chrome/browser/android/vr_shell/textures/exclusive_screen_toast_texture.h new file mode 100644 index 0000000..6f7a49cc --- /dev/null +++ b/chrome/browser/android/vr_shell/textures/exclusive_screen_toast_texture.h
@@ -0,0 +1,30 @@ +// 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_ANDROID_VR_SHELL_TEXTURES_EXCLUSIVE_SCREEN_TOAST_TEXTURE_H_ +#define CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_EXCLUSIVE_SCREEN_TOAST_TEXTURE_H_ + +#include "base/macros.h" +#include "chrome/browser/android/vr_shell/textures/ui_texture.h" + +namespace vr_shell { + +class ExclusiveScreenToastTexture : public UiTexture { + public: + ExclusiveScreenToastTexture(); + ~ExclusiveScreenToastTexture() override; + gfx::Size GetPreferredTextureSize(int width) const override; + gfx::SizeF GetDrawnSize() const override; + + private: + void Draw(SkCanvas* canvas, const gfx::Size& texture_size) override; + + gfx::SizeF size_; + + DISALLOW_COPY_AND_ASSIGN(ExclusiveScreenToastTexture); +}; + +} // namespace vr_shell + +#endif // CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_EXCLUSIVE_SCREEN_TOAST_TEXTURE_H_
diff --git a/chrome/browser/android/vr_shell/textures/presentation_toast_texture.h b/chrome/browser/android/vr_shell/textures/presentation_toast_texture.h deleted file mode 100644 index 649b1e6..0000000 --- a/chrome/browser/android/vr_shell/textures/presentation_toast_texture.h +++ /dev/null
@@ -1,30 +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. - -#ifndef CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_PRESENTATION_TOAST_TEXTURE_H_ -#define CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_PRESENTATION_TOAST_TEXTURE_H_ - -#include "base/macros.h" -#include "chrome/browser/android/vr_shell/textures/ui_texture.h" - -namespace vr_shell { - -class PresentationToastTexture : public UiTexture { - public: - PresentationToastTexture(); - ~PresentationToastTexture() override; - gfx::Size GetPreferredTextureSize(int width) const override; - gfx::SizeF GetDrawnSize() const override; - - private: - void Draw(SkCanvas* canvas, const gfx::Size& texture_size) override; - - gfx::SizeF size_; - - DISALLOW_COPY_AND_ASSIGN(PresentationToastTexture); -}; - -} // namespace vr_shell - -#endif // CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_PRESENTATION_TOAST_TEXTURE_H_
diff --git a/chrome/browser/android/vr_shell/ui_elements/simple_textured_element.h b/chrome/browser/android/vr_shell/ui_elements/simple_textured_element.h index f170fab4..4494bbc 100644 --- a/chrome/browser/android/vr_shell/ui_elements/simple_textured_element.h +++ b/chrome/browser/android/vr_shell/ui_elements/simple_textured_element.h
@@ -9,10 +9,10 @@ #include "base/macros.h" #include "base/memory/ptr_util.h" +#include "chrome/browser/android/vr_shell/textures/exclusive_screen_toast_texture.h" #include "chrome/browser/android/vr_shell/textures/exit_warning_texture.h" #include "chrome/browser/android/vr_shell/textures/insecure_content_permanent_texture.h" #include "chrome/browser/android/vr_shell/textures/insecure_content_transient_texture.h" -#include "chrome/browser/android/vr_shell/textures/presentation_toast_texture.h" #include "chrome/browser/android/vr_shell/textures/splash_screen_icon_texture.h" #include "chrome/browser/android/vr_shell/textures/ui_texture.h" #include "chrome/browser/android/vr_shell/ui_elements/textured_element.h" @@ -42,7 +42,7 @@ PermanentSecurityWarning; typedef SimpleTexturedElement<InsecureContentTransientTexture> TransientSecurityWarning; -typedef SimpleTexturedElement<PresentationToastTexture> PresentationToast; +typedef SimpleTexturedElement<ExclusiveScreenToastTexture> ExclusiveScreenToast; typedef SimpleTexturedElement<SplashScreenIconTexture> SplashScreenIcon; } // namespace vr_shell
diff --git a/chrome/browser/android/vr_shell/ui_elements/ui_element_debug_id.h b/chrome/browser/android/vr_shell/ui_elements/ui_element_debug_id.h index 26c2f6a7..7051e44 100644 --- a/chrome/browser/android/vr_shell/ui_elements/ui_element_debug_id.h +++ b/chrome/browser/android/vr_shell/ui_elements/ui_element_debug_id.h
@@ -29,8 +29,9 @@ kExitPromptBackplane, kTransientUrlBar, kLocationAccessIndicator, - kPresentationToast, + kExclusiveScreenToast, kSplashScreenIcon, + kBluetoothConnectedIndicator, }; } // namespace vr_shell
diff --git a/chrome/browser/android/vr_shell/ui_scene_manager.cc b/chrome/browser/android/vr_shell/ui_scene_manager.cc index 1596a3c..f751a7e 100644 --- a/chrome/browser/android/vr_shell/ui_scene_manager.cc +++ b/chrome/browser/android/vr_shell/ui_scene_manager.cc
@@ -230,6 +230,8 @@ IDS_VIDEO_CALL_NOTIFICATION_TEXT_2}, {&screen_capture_indicator_, kScreenCaptureIndicator, vector_icons::kScreenShareIcon, IDS_SCREEN_CAPTURE_NOTIFICATION_TEXT_2}, + {&bluetooth_connected_indicator_, kBluetoothConnectedIndicator, + vector_icons::kBluetoothConnectedIcon, 0}, {&location_access_indicator_, kLocationAccessIndicator, ui::kLocationOnIcon, 0}, }; @@ -425,8 +427,9 @@ } void UiSceneManager::CreateToasts() { - std::unique_ptr<UiElement> element = base::MakeUnique<PresentationToast>(512); - element->set_debug_id(kPresentationToast); + std::unique_ptr<UiElement> element = + base::MakeUnique<ExclusiveScreenToast>(512); + element->set_debug_id(kExclusiveScreenToast); element->set_id(AllocateId()); element->set_fill(vr_shell::Fill::NONE); element->set_size({kToastWidth, kToastHeight, 1}); @@ -434,7 +437,7 @@ element->set_visible(false); element->set_hit_testable(false); element->set_lock_to_fov(true); - presentation_toast_ = element.get(); + exclusive_screen_toast_ = element.get(); scene_->AddUiElement(std::move(element)); } @@ -454,7 +457,7 @@ toast_state_ = SET_FOR_WEB_VR; ConfigureScene(); ConfigureSecurityWarnings(); - ConfigurePresentationToast(); + ConfigureExclusiveScreenToast(); } void UiSceneManager::ConfigureScene() { @@ -568,6 +571,11 @@ ConfigureIndicators(); } +void UiSceneManager::SetBluetoothConnectedIndicator(bool enabled) { + bluetooth_connected_ = enabled; + ConfigureIndicators(); +} + void UiSceneManager::SetWebVrSecureOrigin(bool secure) { secure_origin_ = secure; ConfigureSecurityWarnings(); @@ -601,7 +609,7 @@ fullscreen_ = fullscreen; toast_state_ = SET_FOR_FULLSCREEN; ConfigureScene(); - ConfigurePresentationToast(); + ConfigureExclusiveScreenToast(); } void UiSceneManager::ConfigureSecurityWarnings() { @@ -623,6 +631,7 @@ video_capture_indicator_->set_visible(allowed && video_capturing_); screen_capture_indicator_->set_visible(allowed && screen_capturing_); location_access_indicator_->set_visible(allowed && location_access_); + bluetooth_connected_indicator_->set_visible(allowed && bluetooth_connected_); if (!allowed) return; @@ -649,7 +658,7 @@ } } -void UiSceneManager::ConfigurePresentationToast() { +void UiSceneManager::ConfigureExclusiveScreenToast() { bool toast_visible = false; switch (toast_state_) { case SET_FOR_WEB_VR: @@ -661,13 +670,13 @@ case UNCHANGED: return; } - presentation_toast_->set_visible(toast_visible); + exclusive_screen_toast_->set_visible(toast_visible); if (toast_visible) { - presentation_toast_timer_.Start( + exclusive_screen_toast_timer_.Start( FROM_HERE, base::TimeDelta::FromSeconds(kToastTimeoutSeconds), this, - &UiSceneManager::OnPresentationToastTimer); + &UiSceneManager::OnExclusiveScreenToastTimer); } else { - presentation_toast_timer_.Stop(); + exclusive_screen_toast_timer_.Stop(); } toast_state_ = UNCHANGED; } @@ -692,8 +701,8 @@ transient_url_bar_->set_visible(false); } -void UiSceneManager::OnPresentationToastTimer() { - presentation_toast_->set_visible(false); +void UiSceneManager::OnExclusiveScreenToastTimer() { + exclusive_screen_toast_->set_visible(false); } void UiSceneManager::OnBackButtonClicked() {
diff --git a/chrome/browser/android/vr_shell/ui_scene_manager.h b/chrome/browser/android/vr_shell/ui_scene_manager.h index 7901ad99..5581043 100644 --- a/chrome/browser/android/vr_shell/ui_scene_manager.h +++ b/chrome/browser/android/vr_shell/ui_scene_manager.h
@@ -50,6 +50,7 @@ void SetAudioCapturingIndicator(bool enabled); void SetLocationAccessIndicator(bool enabled); void SetSplashScreenIcon(const SkBitmap& bitmap); + void SetBluetoothConnectedIndicator(bool enabled); // These methods are currently stubbed. void SetHistoryButtonsEnabled(bool can_go_back, bool can_go_forward); @@ -83,12 +84,12 @@ void ConfigureSecurityWarnings(); void ConfigureTransientUrlBar(); void ConfigureIndicators(); - void ConfigurePresentationToast(); + void ConfigureExclusiveScreenToast(); void UpdateBackgroundColor(); void CloseExitPrompt(); void OnSecurityWarningTimer(); void OnTransientUrlBarTimer(); - void OnPresentationToastTimer(); + void OnExclusiveScreenToastTimer(); void OnBackButtonClicked(); void OnSecurityIconClicked(); void OnExitPromptPrimaryButtonClicked(); @@ -106,12 +107,13 @@ // UI element pointers (not owned by the scene manager). UiElement* permanent_security_warning_ = nullptr; UiElement* transient_security_warning_ = nullptr; - UiElement* presentation_toast_ = nullptr; + UiElement* exclusive_screen_toast_ = nullptr; UiElement* exit_prompt_ = nullptr; UiElement* exit_prompt_backplane_ = nullptr; UiElement* exit_warning_ = nullptr; UiElement* main_content_ = nullptr; UiElement* audio_capture_indicator_ = nullptr; + UiElement* bluetooth_connected_indicator_ = nullptr; UiElement* video_capture_indicator_ = nullptr; UiElement* screen_capture_indicator_ = nullptr; UiElement* location_access_indicator_ = nullptr; @@ -137,6 +139,7 @@ bool video_capturing_ = false; bool screen_capturing_ = false; bool location_access_ = false; + bool bluetooth_connected_ = false; ToastState toast_state_ = UNCHANGED; int next_available_id_ = 1; @@ -147,7 +150,7 @@ base::OneShotTimer security_warning_timer_; base::OneShotTimer transient_url_bar_timer_; - base::OneShotTimer presentation_toast_timer_; + base::OneShotTimer exclusive_screen_toast_timer_; base::WeakPtrFactory<UiSceneManager> weak_ptr_factory_;
diff --git a/chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc b/chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc index 93d6988c..c8a4081 100644 --- a/chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc +++ b/chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc
@@ -167,28 +167,28 @@ // Tests toast not showing when directly entering VR though WebVR // presentation. MakeManager(kNotInCct, kInWebVr); - EXPECT_FALSE(IsVisible(kPresentationToast)); + EXPECT_FALSE(IsVisible(kExclusiveScreenToast)); MakeManager(kNotInCct, kNotInWebVr); - EXPECT_FALSE(IsVisible(kPresentationToast)); + EXPECT_FALSE(IsVisible(kExclusiveScreenToast)); manager_->SetFullscreen(true); - EXPECT_TRUE(IsVisible(kPresentationToast)); + EXPECT_TRUE(IsVisible(kExclusiveScreenToast)); manager_->SetWebVrMode(true, true); - EXPECT_TRUE(IsVisible(kPresentationToast)); + EXPECT_TRUE(IsVisible(kExclusiveScreenToast)); manager_->SetWebVrMode(false, false); - EXPECT_FALSE(IsVisible(kPresentationToast)); + EXPECT_FALSE(IsVisible(kExclusiveScreenToast)); manager_->SetFullscreen(false); - EXPECT_FALSE(IsVisible(kPresentationToast)); + EXPECT_FALSE(IsVisible(kExclusiveScreenToast)); manager_->SetWebVrMode(true, false); - EXPECT_FALSE(IsVisible(kPresentationToast)); + EXPECT_FALSE(IsVisible(kExclusiveScreenToast)); manager_->SetWebVrMode(false, true); - EXPECT_TRUE(IsVisible(kPresentationToast)); + EXPECT_TRUE(IsVisible(kExclusiveScreenToast)); } TEST_F(UiSceneManagerTest, CloseButtonVisibleInCctFullscreen) { @@ -295,7 +295,7 @@ TEST_F(UiSceneManagerTest, UiUpdatesForFullscreenChanges) { std::set<UiElementDebugId> visible_in_fullscreen = { kContentQuad, kCloseButton, kBackplane, - kCeiling, kFloor, kPresentationToast, + kCeiling, kFloor, kExclusiveScreenToast, }; MakeManager(kNotInCct, kNotInWebVr); @@ -366,6 +366,7 @@ manager_->SetVideoCapturingIndicator(true); manager_->SetScreenCapturingIndicator(true); manager_->SetLocationAccessIndicator(true); + manager_->SetBluetoothConnectedIndicator(true); // All elements should be hidden. VerifyElementsVisible("Elements hidden", std::set<UiElementDebugId>{}); @@ -377,6 +378,7 @@ manager_->SetVideoCapturingIndicator(true); manager_->SetScreenCapturingIndicator(true); manager_->SetLocationAccessIndicator(true); + manager_->SetBluetoothConnectedIndicator(true); // Transition to WebVR mode manager_->SetWebVrMode(true, false); @@ -388,8 +390,9 @@ TEST_F(UiSceneManagerTest, CaptureIndicatorsVisibility) { const std::set<UiElementDebugId> indicators = { - kAudioCaptureIndicator, kVideoCaptureIndicator, kScreenCaptureIndicator, - kLocationAccessIndicator, + kAudioCaptureIndicator, kVideoCaptureIndicator, + kScreenCaptureIndicator, kLocationAccessIndicator, + kBluetoothConnectedIndicator, }; MakeManager(kNotInCct, kNotInWebVr); @@ -399,6 +402,7 @@ manager_->SetVideoCapturingIndicator(true); manager_->SetScreenCapturingIndicator(true); manager_->SetLocationAccessIndicator(true); + manager_->SetBluetoothConnectedIndicator(true); EXPECT_TRUE(VerifyVisibility(indicators, true)); // Go into non-browser modes and make sure all indicators are hidden. @@ -417,6 +421,7 @@ manager_->SetVideoCapturingIndicator(false); manager_->SetScreenCapturingIndicator(false); manager_->SetLocationAccessIndicator(false); + manager_->SetBluetoothConnectedIndicator(false); EXPECT_TRUE(VerifyVisibility(indicators, false)); }
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc index efc1b8e..1d0f415 100644 --- a/chrome/browser/chrome_browser_main.cc +++ b/chrome/browser/chrome_browser_main.cc
@@ -1466,8 +1466,7 @@ parsed_command_line_); } - ui::SelectFileDialog::SetFactory(new ChromeSelectFileDialogFactory( - BrowserThread::GetTaskRunnerForThread(BrowserThread::IO))); + ui::SelectFileDialog::SetFactory(new ChromeSelectFileDialogFactory()); #endif // defined(OS_WIN) if (parsed_command_line().HasSwitch(switches::kMakeDefaultBrowser)) {
diff --git a/chrome/browser/chrome_browser_main_win.cc b/chrome/browser/chrome_browser_main_win.cc index 7e747d52..c5ec45e 100644 --- a/chrome/browser/chrome_browser_main_win.cc +++ b/chrome/browser/chrome_browser_main_win.cc
@@ -56,7 +56,6 @@ #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_result_codes.h" #include "chrome/common/chrome_switches.h" -#include "chrome/common/chrome_utility_messages.h" #include "chrome/common/conflicts/module_watcher_win.h" #include "chrome/common/crash_keys.h" #include "chrome/common/env_vars.h" @@ -70,8 +69,6 @@ #include "chrome/installer/util/l10n_string_util.h" #include "chrome/installer/util/shell_util.h" #include "content/public/browser/browser_thread.h" -#include "content/public/browser/utility_process_host.h" -#include "content/public/browser/utility_process_host_client.h" #include "content/public/common/content_switches.h" #include "content/public/common/main_function_params.h" #include "ui/base/cursor/cursor_loader_win.h"
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index 1b93edb..a6280f1 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc
@@ -112,7 +112,6 @@ #include "chrome/common/env_vars.h" #include "chrome/common/features.h" #include "chrome/common/logging_chrome.h" -#include "chrome/common/origin_trials/chrome_origin_trial_policy.h" #include "chrome/common/pepper_permission_util.h" #include "chrome/common/pref_names.h" #include "chrome/common/render_messages.h" @@ -3353,14 +3352,12 @@ } #endif - if (!ChromeOriginTrialPolicy().IsFeatureDisabled("WebShare")) { #if defined(OS_ANDROID) - frame_interfaces_parameterized_->AddInterface(base::Bind( - &ForwardToJavaWebContentsRegistry<blink::mojom::ShareService>)); + frame_interfaces_parameterized_->AddInterface(base::Bind( + &ForwardToJavaWebContentsRegistry<blink::mojom::ShareService>)); #elif defined(OS_LINUX) || defined(OS_WIN) - frame_interfaces_->AddInterface(base::Bind(&ShareServiceImpl::Create)); + frame_interfaces_->AddInterface(base::Bind(&ShareServiceImpl::Create)); #endif - } } #if BUILDFLAG(ENABLE_WEBRTC)
diff --git a/chrome/browser/chromeos/arc/arc_session_manager.cc b/chrome/browser/chromeos/arc/arc_session_manager.cc index 26322dc..a5e991a 100644 --- a/chrome/browser/chromeos/arc/arc_session_manager.cc +++ b/chrome/browser/chromeos/arc/arc_session_manager.cc
@@ -413,6 +413,8 @@ // Do not expect that SetProfile() is called for various Profile instances. // At the moment, it is used for testing purposes. DCHECK(profile != profile_); + // TODO(yusukes): Once Shutdown() is removed, always call RequestStop() with + // |true|. We can actually remove the boolean parameter then. Shutdown(); profile_ = profile; @@ -470,7 +472,7 @@ playstore_launcher_.reset(); terms_of_service_negotiator_.reset(); android_management_checker_.reset(); - arc_session_runner_->RequestStop(); + arc_session_runner_->RequestStop(false); // TODO(hidehiko): The ARC instance's stopping is asynchronous, so it might // still be running when we return from this function. Do not set the // STOPPED state immediately here. @@ -624,7 +626,9 @@ DCHECK(profile_); if (!enable_requested_) { - VLOG(1) << "ARC is already disabled. Do nothing."; + VLOG(1) << "ARC is already disabled. " + << "Killing an instance for login screen (if any)."; + arc_session_runner_->RequestStop(true); return; } enable_requested_ = false;
diff --git a/chrome/browser/chromeos/login/arc_kiosk_controller.cc b/chrome/browser/chromeos/login/arc_kiosk_controller.cc index 54ef284..9232886 100644 --- a/chrome/browser/chromeos/login/arc_kiosk_controller.cc +++ b/chrome/browser/chromeos/login/arc_kiosk_controller.cc
@@ -9,8 +9,10 @@ #include "base/timer/timer.h" #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" #include "chrome/browser/chromeos/login/auth/chrome_login_performer.h" +#include "chrome/browser/chromeos/login/screens/encryption_migration_screen.h" #include "chrome/browser/chromeos/login/ui/login_display_host.h" #include "chrome/browser/chromeos/login/ui/webui_login_view.h" +#include "chrome/browser/chromeos/login/wizard_controller.h" #include "chrome/browser/lifetime/application_lifetime.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" @@ -99,6 +101,19 @@ NOTREACHED(); } +void ArcKioskController::OnOldEncryptionDetected( + const UserContext& user_context, + bool has_incomplete_migration) { + host_->StartWizard(OobeScreen::SCREEN_ENCRYPTION_MIGRATION); + + EncryptionMigrationScreen* migration_screen = + static_cast<EncryptionMigrationScreen*>( + host_->GetWizardController()->current_screen()); + DCHECK(migration_screen); + migration_screen->SetUserContext(user_context); + migration_screen->SetupInitialView(); +} + void ArcKioskController::OnProfilePrepared(Profile* profile, bool browser_launched) { DVLOG(1) << "Profile loaded... Starting app launch.";
diff --git a/chrome/browser/chromeos/login/arc_kiosk_controller.h b/chrome/browser/chromeos/login/arc_kiosk_controller.h index 8408535..60814d80 100644 --- a/chrome/browser/chromeos/login/arc_kiosk_controller.h +++ b/chrome/browser/chromeos/login/arc_kiosk_controller.h
@@ -50,6 +50,8 @@ void WhiteListCheckFailed(const std::string& email) override; void PolicyLoadFailed() override; void SetAuthFlowOffline(bool offline) override; + void OnOldEncryptionDetected(const UserContext& user_context, + bool has_incomplete_migration) override; // UserSessionManagerDelegate implementation: void OnProfilePrepared(Profile* profile, bool browser_launched) override;
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc index 6541abb..4ffc5b6 100644 --- a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc +++ b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
@@ -638,10 +638,6 @@ ASSERT_FALSE(registry()->IsHandledProtocol("test")); } -// TODO(smckay): This is much more appropriately an integration -// test. Make that so, then update the -// ShellIntegretion{Delegate,Callback,Worker} test classes we use to fully -// isolate this test from the FILE thread. TEST_F(ProtocolHandlerRegistryTest, TestOSRegistration) { ProtocolHandler ph_do1 = CreateProtocolHandler("do", "test1"); ProtocolHandler ph_do2 = CreateProtocolHandler("do", "test2"); @@ -671,10 +667,6 @@ #define MAYBE_TestOSRegistrationFailure TestOSRegistrationFailure #endif -// TODO(smckay): This is much more appropriately an integration -// test. Make that so, then update the -// ShellIntegretion{Delegate,Callback,Worker} test classes we use to fully -// isolate this test from the FILE thread. TEST_F(ProtocolHandlerRegistryTest, MAYBE_TestOSRegistrationFailure) { ProtocolHandler ph_do = CreateProtocolHandler("do", "test1"); ProtocolHandler ph_dont = CreateProtocolHandler("dont", "test");
diff --git a/chrome/browser/download/download_service_factory.cc b/chrome/browser/download/download_service_factory.cc index 05a415bc..c37af5b 100644 --- a/chrome/browser/download/download_service_factory.cc +++ b/chrome/browser/download/download_service_factory.cc
@@ -19,12 +19,17 @@ #include "components/download/public/download_service.h" #include "components/download/public/task_scheduler.h" #include "components/keyed_service/content/browser_context_dependency_manager.h" +#include "components/offline_pages/features/features.h" #include "content/public/browser/browser_context.h" #if defined(OS_ANDROID) #include "chrome/browser/android/download/service/download_task_scheduler.h" #endif +#if BUILDFLAG(ENABLE_OFFLINE_PAGES) +#include "chrome/browser/offline_pages/prefetch/offline_prefetch_download_client.h" +#endif + // static DownloadServiceFactory* DownloadServiceFactory::GetInstance() { return base::Singleton<DownloadServiceFactory>::get(); @@ -48,7 +53,11 @@ content::BrowserContext* context) const { auto clients = base::MakeUnique<download::DownloadClientMap>(); - // TODO(dtrainor): Register all clients here. +#if BUILDFLAG(ENABLE_OFFLINE_PAGES) + clients->insert(std::make_pair( + download::DownloadClient::OFFLINE_PAGE_PREFETCH, + base::MakeUnique<offline_pages::OfflinePrefetchDownloadClient>(context))); +#endif // BUILDFLAG(ENABLE_OFFLINE_PAGES) auto* download_manager = content::BrowserContext::GetDownloadManager(context);
diff --git a/chrome/browser/extensions/api/desktop_capture/desktop_capture_apitest.cc b/chrome/browser/extensions/api/desktop_capture/desktop_capture_apitest.cc index 796f1f37..1001d5bf 100644 --- a/chrome/browser/extensions/api/desktop_capture/desktop_capture_apitest.cc +++ b/chrome/browser/extensions/api/desktop_capture/desktop_capture_apitest.cc
@@ -61,6 +61,30 @@ std::vector<std::unique_ptr<DesktopMediaList>> source_lists, bool request_audio, const DoneCallback& done_callback) override { + bool show_screens = false; + bool show_windows = false; + bool show_tabs = false; + + for (auto& source_list : source_lists) { + switch (source_list->GetMediaListType()) { + case DesktopMediaID::TYPE_NONE: + break; + case DesktopMediaID::TYPE_SCREEN: + show_screens = true; + break; + case DesktopMediaID::TYPE_WINDOW: + show_windows = true; + break; + case DesktopMediaID::TYPE_WEB_CONTENTS: + show_tabs = true; + break; + } + } + EXPECT_EQ(expectation_->expect_screens, show_screens); + EXPECT_EQ(expectation_->expect_windows, show_windows); + EXPECT_EQ(expectation_->expect_tabs, show_tabs); + EXPECT_EQ(expectation_->expect_audio, request_audio); + if (!expectation_->cancelled) { // Post a task to call the callback asynchronously. base::ThreadTaskRunnerHandle::Get()->PostTask( @@ -98,34 +122,6 @@ current_test_ = 0; } - // DesktopCaptureChooseDesktopMediaFunction::PickerFactory interface. - MediaListArray CreateModel( - bool show_screens, - bool show_windows, - bool show_tabs, - bool show_audio) override { - EXPECT_LE(current_test_, tests_count_); - MediaListArray media_lists; - if (current_test_ >= tests_count_) { - return media_lists; - } - EXPECT_EQ(test_flags_[current_test_].expect_screens, show_screens); - EXPECT_EQ(test_flags_[current_test_].expect_windows, show_windows); - EXPECT_EQ(test_flags_[current_test_].expect_tabs, show_tabs); - EXPECT_EQ(test_flags_[current_test_].expect_audio, show_audio); - - media_lists[0] = std::unique_ptr<DesktopMediaList>( - show_screens ? new FakeDesktopMediaList(DesktopMediaID::TYPE_SCREEN) - : nullptr); - media_lists[1] = std::unique_ptr<DesktopMediaList>( - show_windows ? new FakeDesktopMediaList(DesktopMediaID::TYPE_WINDOW) - : nullptr); - media_lists[2] = std::unique_ptr<DesktopMediaList>( - show_tabs ? new FakeDesktopMediaList(DesktopMediaID::TYPE_WEB_CONTENTS) - : nullptr); - return media_lists; - } - std::unique_ptr<DesktopMediaPicker> CreatePicker() override { EXPECT_LE(current_test_, tests_count_); if (current_test_ >= tests_count_) @@ -135,6 +131,12 @@ new FakeDesktopMediaPicker(test_flags_ + current_test_ - 1)); } + std::unique_ptr<DesktopMediaList> CreateMediaList( + DesktopMediaID::Type type) override { + EXPECT_LE(current_test_, tests_count_); + return std::unique_ptr<DesktopMediaList>(new FakeDesktopMediaList(type)); + } + private: TestFlags* test_flags_; int tests_count_;
diff --git a/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc b/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc index 29763ff..05ca164 100644 --- a/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc +++ b/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc
@@ -82,56 +82,6 @@ // Register to be notified when the tab is closed. Observe(web_contents); - bool show_screens = false; - bool show_windows = false; - bool show_tabs = false; - bool request_audio = false; - - std::vector<DesktopMediaID::Type> source_types; - - for (auto source_type : sources) { - // Avoid duplicates in the input |sources|. - if (std::find(source_types.begin(), source_types.end(), source_type) != - source_types.end()) { - continue; - } - - switch (source_type) { - case api::desktop_capture::DESKTOP_CAPTURE_SOURCE_TYPE_NONE: - error_ = kInvalidSourceNameError; - return false; - - case api::desktop_capture::DESKTOP_CAPTURE_SOURCE_TYPE_SCREEN: - source_types.push_back(DesktopMediaID::TYPE_SCREEN); - show_screens = true; - break; - - case api::desktop_capture::DESKTOP_CAPTURE_SOURCE_TYPE_WINDOW: - source_types.push_back(DesktopMediaID::TYPE_WINDOW); - show_windows = true; - break; - - case api::desktop_capture::DESKTOP_CAPTURE_SOURCE_TYPE_TAB: - if (!base::CommandLine::ForCurrentProcess()->HasSwitch( - extensions::switches::kDisableTabForDesktopShare)) { - source_types.push_back(DesktopMediaID::TYPE_WEB_CONTENTS); - show_tabs = true; - } - break; - - case api::desktop_capture::DESKTOP_CAPTURE_SOURCE_TYPE_AUDIO: - bool has_flag = base::CommandLine::ForCurrentProcess()->HasSwitch( - extensions::switches::kDisableDesktopCaptureAudio); - request_audio = !has_flag; - break; - } - } - - if (!show_screens && !show_windows && !show_tabs) { - error_ = kEmptySourcesListError; - return false; - } - gfx::NativeWindow parent_window = web_contents->GetTopLevelNativeWindow(); // In case of coming from background extension page, |parent_window| will // be null. We are going to make the picker modal to the current browser @@ -143,59 +93,110 @@ if (target_browser) parent_window = target_browser->window()->GetNativeWindow(); } - std::unique_ptr<DesktopMediaList> screen_list; - std::unique_ptr<DesktopMediaList> window_list; - std::unique_ptr<DesktopMediaList> tab_list; + + // Keep same order as the input |sources| and avoid duplicates. + std::vector<std::unique_ptr<DesktopMediaList>> source_lists; + bool have_screen_list = false; + bool have_window_list = false; + bool have_tab_list = false; + bool request_audio = false; + for (auto source_type : sources) { + switch (source_type) { + case api::desktop_capture::DESKTOP_CAPTURE_SOURCE_TYPE_NONE: { + error_ = kInvalidSourceNameError; + return false; + } + case api::desktop_capture::DESKTOP_CAPTURE_SOURCE_TYPE_SCREEN: { + if (have_screen_list) { + continue; + } + std::unique_ptr<DesktopMediaList> screen_list; + if (g_picker_factory) { + screen_list = + g_picker_factory->CreateMediaList(DesktopMediaID::TYPE_SCREEN); + } else { +#if defined(USE_ASH) + screen_list = base::MakeUnique<DesktopMediaListAsh>( + DesktopMediaID::TYPE_SCREEN); +#else // !defined(USE_ASH) + webrtc::DesktopCaptureOptions capture_options = + webrtc::DesktopCaptureOptions::CreateDefault(); + capture_options.set_disable_effects(false); + screen_list = base::MakeUnique<NativeDesktopMediaList>( + DesktopMediaID::TYPE_SCREEN, + webrtc::DesktopCapturer::CreateScreenCapturer(capture_options)); +#endif // !defined(USE_ASH) + } + have_screen_list = true; + source_lists.push_back(std::move(screen_list)); + break; + } + case api::desktop_capture::DESKTOP_CAPTURE_SOURCE_TYPE_WINDOW: { + if (have_window_list) { + continue; + } + std::unique_ptr<DesktopMediaList> window_list; + if (g_picker_factory) { + window_list = + g_picker_factory->CreateMediaList(DesktopMediaID::TYPE_WINDOW); + } else { +#if defined(USE_ASH) + window_list = base::MakeUnique<DesktopMediaListAsh>( + DesktopMediaID::TYPE_WINDOW); +#else // !defined(USE_ASH) + // NativeDesktopMediaList calls the capturers on a background thread. + // This means that the two DesktopCapturer instances (for screens and + // windows) created here cannot share the same DesktopCaptureOptions + // instance. DesktopCaptureOptions owns X connection, which cannot be + // used on multiple threads concurrently. + webrtc::DesktopCaptureOptions capture_options = + webrtc::DesktopCaptureOptions::CreateDefault(); + capture_options.set_disable_effects(false); + window_list = base::MakeUnique<NativeDesktopMediaList>( + DesktopMediaID::TYPE_WINDOW, + webrtc::DesktopCapturer::CreateWindowCapturer(capture_options)); +#endif // !defined(USE_ASH) + } + have_window_list = true; + source_lists.push_back(std::move(window_list)); + break; + } + case api::desktop_capture::DESKTOP_CAPTURE_SOURCE_TYPE_TAB: { + if (base::CommandLine::ForCurrentProcess()->HasSwitch( + extensions::switches::kDisableTabForDesktopShare) || + have_tab_list) { + continue; + } + std::unique_ptr<DesktopMediaList> tab_list; + if (g_picker_factory) { + tab_list = g_picker_factory->CreateMediaList( + DesktopMediaID::TYPE_WEB_CONTENTS); + } else { + tab_list = base::MakeUnique<TabDesktopMediaList>(); + } + have_tab_list = true; + source_lists.push_back(std::move(tab_list)); + break; + } + case api::desktop_capture::DESKTOP_CAPTURE_SOURCE_TYPE_AUDIO: { + bool audio_capture_disabled = + base::CommandLine::ForCurrentProcess()->HasSwitch( + extensions::switches::kDisableDesktopCaptureAudio); + if (!audio_capture_disabled) { + request_audio = true; + } + break; + } + } + } + if (source_lists.empty()) { + error_ = kEmptySourcesListError; + return false; + } + if (g_picker_factory) { - PickerFactory::MediaListArray media_lists = - g_picker_factory->CreateModel(show_screens, show_windows, show_tabs, - request_audio); - screen_list = std::move(media_lists[0]); - window_list = std::move(media_lists[1]); - tab_list = std::move(media_lists[2]); picker_ = g_picker_factory->CreatePicker(); } else { - // Create a screens list. - if (show_screens) { -#if defined(USE_ASH) - screen_list = - base::MakeUnique<DesktopMediaListAsh>(DesktopMediaID::TYPE_SCREEN); -#else // !defined(USE_ASH) - webrtc::DesktopCaptureOptions capture_options = - webrtc::DesktopCaptureOptions::CreateDefault(); - capture_options.set_disable_effects(false); - screen_list = base::MakeUnique<NativeDesktopMediaList>( - DesktopMediaID::TYPE_SCREEN, - webrtc::DesktopCapturer::CreateScreenCapturer(capture_options)); -#endif // !defined(USE_ASH) - } - - // Create a windows list. - if (show_windows) { -#if defined(USE_ASH) - window_list = - base::MakeUnique<DesktopMediaListAsh>(DesktopMediaID::TYPE_WINDOW); -#else // !defined(USE_ASH) - // NativeDesktopMediaList calls the capturers on a background - // thread. This means that the two DesktopCapturer instances (for screens - // and windows) created here cannot share the same DesktopCaptureOptions - // instance. DesktopCaptureOptions owns X connection, which cannot be used - // on multiple threads concurrently. - webrtc::DesktopCaptureOptions capture_options = - webrtc::DesktopCaptureOptions::CreateDefault(); - capture_options.set_disable_effects(false); - window_list = base::MakeUnique<NativeDesktopMediaList>( - DesktopMediaID::TYPE_WINDOW, - webrtc::DesktopCapturer::CreateWindowCapturer(capture_options)); -#endif // !defined(USE_ASH) - } - - if (show_tabs) - tab_list = base::MakeUnique<TabDesktopMediaList>(); - - DCHECK(screen_list || window_list || tab_list); - DCHECK(!source_types.empty()); - // DesktopMediaPicker is implemented only for Windows, OSX and // Aura Linux builds. #if defined(TOOLKIT_VIEWS) || defined(OS_MACOSX) @@ -206,28 +207,6 @@ #endif } - // Keep same order as the input |sources|. - std::vector<std::unique_ptr<DesktopMediaList>> source_lists; - for (auto source_type : source_types) { - switch (source_type) { - case DesktopMediaID::TYPE_NONE: - NOTREACHED(); - break; - case DesktopMediaID::TYPE_SCREEN: - if (screen_list) - source_lists.push_back(std::move(screen_list)); - break; - case DesktopMediaID::TYPE_WINDOW: - if (window_list) - source_lists.push_back(std::move(window_list)); - break; - case DesktopMediaID::TYPE_WEB_CONTENTS: - if (tab_list) - source_lists.push_back(std::move(tab_list)); - break; - } - } - DesktopMediaPicker::DoneCallback callback = base::Bind( &DesktopCaptureChooseDesktopMediaFunctionBase::OnPickerDialogResults, this);
diff --git a/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.h b/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.h index f4f03f04..a5643287 100644 --- a/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.h +++ b/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.h
@@ -28,13 +28,9 @@ // Used for tests to supply fake picker. class PickerFactory { public: - typedef std::array<std::unique_ptr<DesktopMediaList>, 3> MediaListArray; - virtual MediaListArray CreateModel( - bool show_screens, - bool show_windows, - bool show_tabs, - bool show_audio) = 0; virtual std::unique_ptr<DesktopMediaPicker> CreatePicker() = 0; + virtual std::unique_ptr<DesktopMediaList> CreateMediaList( + content::DesktopMediaID::Type type) = 0; protected: PickerFactory() = default;
diff --git a/chrome/browser/extensions/api/socket/socket_api_unittest.cc b/chrome/browser/extensions/api/socket/socket_api_unittest.cc index c174cc6..34e18a1 100644 --- a/chrome/browser/extensions/api/socket/socket_api_unittest.cc +++ b/chrome/browser/extensions/api/socket/socket_api_unittest.cc
@@ -5,6 +5,7 @@ #include <memory> #include "base/memory/ptr_util.h" +#include "base/threading/sequenced_task_runner_handle.h" #include "base/values.h" #include "chrome/browser/browser_process_impl.h" #include "chrome/browser/extensions/extension_api_unittest.h" @@ -35,13 +36,9 @@ }; TEST_F(SocketUnitTest, Create) { - // Get BrowserThread - content::BrowserThread::ID id; - CHECK(content::BrowserThread::GetCurrentThreadIdentifier(&id)); - // Create SocketCreateFunction and put it on BrowserThread SocketCreateFunction* function = new SocketCreateFunction(); - function->set_work_thread_id(id); + function->set_work_task_runner(base::SequencedTaskRunnerHandle::Get()); // Run tests std::unique_ptr<base::DictionaryValue> result(
diff --git a/chrome/browser/extensions/api/sockets_tcp_server/sockets_tcp_server_api_unittest.cc b/chrome/browser/extensions/api/sockets_tcp_server/sockets_tcp_server_api_unittest.cc index 7801b0d..dbcdc6a2 100644 --- a/chrome/browser/extensions/api/sockets_tcp_server/sockets_tcp_server_api_unittest.cc +++ b/chrome/browser/extensions/api/sockets_tcp_server/sockets_tcp_server_api_unittest.cc
@@ -5,6 +5,7 @@ #include <memory> #include "base/memory/ptr_util.h" +#include "base/threading/sequenced_task_runner_handle.h" #include "base/values.h" #include "chrome/browser/browser_process_impl.h" #include "chrome/browser/extensions/extension_api_unittest.h" @@ -48,14 +49,10 @@ }; TEST_F(SocketsTcpServerUnitTest, Create) { - // Get BrowserThread - content::BrowserThread::ID id; - CHECK(content::BrowserThread::GetCurrentThreadIdentifier(&id)); - // Create SocketCreateFunction and put it on BrowserThread SocketsTcpServerCreateFunction* function = new SocketsTcpServerCreateFunction(); - function->set_work_thread_id(id); + function->set_work_task_runner(base::SequencedTaskRunnerHandle::Get()); // Run tests std::unique_ptr<base::DictionaryValue> result(RunFunctionAndReturnDictionary(
diff --git a/chrome/browser/extensions/bookmark_app_helper.cc b/chrome/browser/extensions/bookmark_app_helper.cc index 9e9dd82..dd6db4ce 100644 --- a/chrome/browser/extensions/bookmark_app_helper.cc +++ b/chrome/browser/extensions/bookmark_app_helper.cc
@@ -9,6 +9,7 @@ #include <cctype> #include <string> +#include "base/command_line.h" #include "base/macros.h" #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" @@ -40,6 +41,7 @@ #include "content/public/browser/notification_service.h" #include "content/public/browser/notification_source.h" #include "content/public/browser/web_contents.h" +#include "content/public/common/content_switches.h" #include "extensions/browser/extension_registry.h" #include "extensions/browser/extension_system.h" #include "extensions/browser/image_loader.h" @@ -67,7 +69,6 @@ #include "ui/gfx/image/image_family.h" #if defined(OS_MACOSX) -#include "base/command_line.h" #include "chrome/browser/web_applications/web_app_mac.h" #include "chrome/common/chrome_switches.h" #endif @@ -590,8 +591,12 @@ UpdateWebAppInfoFromManifest(manifest, &web_app_info_); - if (!ChromeOriginTrialPolicy().IsFeatureDisabled("WebShare")) + // TODO(mgiuca): Web Share Target should have its own flag, rather than using + // the experimental-web-platform-features flag. https://crbug.com/736178. + if (base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kEnableExperimentalWebPlatformFeatures)) { UpdateShareTargetInPrefs(manifest_url, manifest, profile_->GetPrefs()); + } // Add urls from the WebApplicationInfo. std::vector<GURL> web_app_info_icon_urls;
diff --git a/chrome/browser/history/top_sites_factory.cc b/chrome/browser/history/top_sites_factory.cc index 97a0ac9a..dc0163a 100644 --- a/chrome/browser/history/top_sites_factory.cc +++ b/chrome/browser/history/top_sites_factory.cc
@@ -103,9 +103,7 @@ profile->GetPrefs(), HistoryServiceFactory::GetForProfile( profile, ServiceAccessType::EXPLICIT_ACCESS), prepopulated_page_list, base::Bind(CanAddURLToHistory))); - top_sites->Init(context->GetPath().Append(history::kTopSitesFilename), - content::BrowserThread::GetTaskRunnerForThread( - content::BrowserThread::DB)); + top_sites->Init(context->GetPath().Append(history::kTopSitesFilename)); return top_sites; }
diff --git a/chrome/browser/media/android/router/media_router_dialog_controller_android.cc b/chrome/browser/media/android/router/media_router_dialog_controller_android.cc index ca4ef76..08983f6 100644 --- a/chrome/browser/media/android/router/media_router_dialog_controller_android.cc +++ b/chrome/browser/media/android/router/media_router_dialog_controller_android.cc
@@ -18,8 +18,13 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_delegate.h" +#include "device/vr/features/features.h" #include "jni/ChromeMediaRouterDialogController_jni.h" +#if BUILDFLAG(ENABLE_VR) +#include "chrome/browser/android/vr_shell/vr_tab_helper.h" +#endif // BUILDFLAG(ENABLE_VR) + DEFINE_WEB_CONTENTS_USER_DATA_KEY( media_router::MediaRouterDialogControllerAndroid); @@ -143,6 +148,14 @@ } void MediaRouterDialogControllerAndroid::CreateMediaRouterDialog() { +#if BUILDFLAG(ENABLE_VR) + // TODO(crbug.com/736568): Re-enable dialog in VR. + if (vr_shell::VrTabHelper::IsInVr(initiator())) { + CancelPresentationRequest(); + return; + } +#endif // BUILDFLAG(ENABLE_VR) + JNIEnv* env = base::android::AttachCurrentThread(); const std::vector<MediaSource> sources =
diff --git a/chrome/browser/media/router/media_router_metrics.cc b/chrome/browser/media/router/media_router_metrics.cc index a64b98a81..1b1455ad 100644 --- a/chrome/browser/media/router/media_router_metrics.cc +++ b/chrome/browser/media/router/media_router_metrics.cc
@@ -25,14 +25,16 @@ "MediaRouter.Dial.KnownDevicesCount"; const char MediaRouterMetrics::kHistogramIconClickLocation[] = "MediaRouter.Icon.Click.Location"; +const char MediaRouterMetrics::kHistogramMediaRouterCastingSource[] = + "MediaRouter.Source.CastingSource"; +const char MediaRouterMetrics::kHistogramRouteCreationOutcome[] = + "MediaRouter.Route.CreationOutcome"; const char MediaRouterMetrics::kHistogramUiDialogPaint[] = "MediaRouter.Ui.Dialog.Paint"; const char MediaRouterMetrics::kHistogramUiDialogLoadedWithData[] = "MediaRouter.Ui.Dialog.LoadedWithData"; const char MediaRouterMetrics::kHistogramUiFirstAction[] = "MediaRouter.Ui.FirstAction"; -const char MediaRouterMetrics::kHistogramRouteCreationOutcome[] = - "MediaRouter.Route.CreationOutcome"; // static void MediaRouterMetrics::RecordMediaRouterDialogOrigin( @@ -76,6 +78,11 @@ static_cast<int>(MediaRouterRouteCreationOutcome::TOTAL_COUNT)); } +// static +void MediaRouterMetrics::RecordMediaRouterCastingSource(MediaCastMode source) { + UMA_HISTOGRAM_SPARSE_SLOWLY(kHistogramMediaRouterCastingSource, source); +} + void MediaRouterMetrics::RecordDialDeviceCounts(size_t available_device_count, size_t known_device_count) { if (clock_->Now() - device_count_metrics_record_time_ <
diff --git a/chrome/browser/media/router/media_router_metrics.h b/chrome/browser/media/router/media_router_metrics.h index 0276e6f..d78696d 100644 --- a/chrome/browser/media/router/media_router_metrics.h +++ b/chrome/browser/media/router/media_router_metrics.h
@@ -10,6 +10,7 @@ #include "base/gtest_prod_util.h" #include "base/time/clock.h" #include "base/time/time.h" +#include "chrome/browser/ui/webui/media_router/media_cast_mode.h" namespace media_router { @@ -64,10 +65,11 @@ static const char kHistogramDialAvailableDeviceCount[]; static const char kHistogramDialKnownDeviceCount[]; static const char kHistogramIconClickLocation[]; + static const char kHistogramMediaRouterCastingSource[]; + static const char kHistogramRouteCreationOutcome[]; static const char kHistogramUiDialogPaint[]; static const char kHistogramUiDialogLoadedWithData[]; static const char kHistogramUiFirstAction[]; - static const char kHistogramRouteCreationOutcome[]; // Records where the user clicked to open the Media Router dialog. static void RecordMediaRouterDialogOrigin( @@ -92,6 +94,9 @@ static void RecordRouteCreationOutcome( MediaRouterRouteCreationOutcome outcome); + // Records casting source. + static void RecordMediaRouterCastingSource(MediaCastMode source); + // Records device counts. // TODO(zhaobin): Move device count specific metrics and state into its own // class eventually.
diff --git a/chrome/browser/media/router/media_router_metrics_unittest.cc b/chrome/browser/media/router/media_router_metrics_unittest.cc index 3269c51d..c8de26e 100644 --- a/chrome/browser/media/router/media_router_metrics_unittest.cc +++ b/chrome/browser/media/router/media_router_metrics_unittest.cc
@@ -9,6 +9,7 @@ #include "base/test/histogram_tester.h" #include "base/test/simple_test_clock.h" #include "base/time/time.h" +#include "chrome/browser/ui/webui/media_router/media_cast_mode.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -95,6 +96,27 @@ Bucket(static_cast<int>(outcome2), 2))); } +TEST(MediaRouterMetricsTest, RecordMediaRouterCastingSource) { + base::HistogramTester tester; + const MediaCastMode source1 = MediaCastMode::PRESENTATION; + const MediaCastMode source2 = MediaCastMode::TAB_MIRROR; + const MediaCastMode source3 = MediaCastMode::LOCAL_FILE; + + tester.ExpectTotalCount( + MediaRouterMetrics::kHistogramMediaRouterCastingSource, 0); + MediaRouterMetrics::RecordMediaRouterCastingSource(source1); + MediaRouterMetrics::RecordMediaRouterCastingSource(source2); + MediaRouterMetrics::RecordMediaRouterCastingSource(source2); + MediaRouterMetrics::RecordMediaRouterCastingSource(source3); + tester.ExpectTotalCount( + MediaRouterMetrics::kHistogramMediaRouterCastingSource, 4); + EXPECT_THAT(tester.GetAllSamples( + MediaRouterMetrics::kHistogramMediaRouterCastingSource), + ElementsAre(Bucket(static_cast<int>(source1), 1), + Bucket(static_cast<int>(source2), 2), + Bucket(static_cast<int>(source3), 1))); +} + TEST(MediaRouterMetricsTest, RecordDialDeviceCounts) { MediaRouterMetrics metrics; base::SimpleTestClock* clock = new base::SimpleTestClock();
diff --git a/chrome/browser/offline_pages/prefetch/offline_prefetch_download_client.cc b/chrome/browser/offline_pages/prefetch/offline_prefetch_download_client.cc new file mode 100644 index 0000000..a2d49a9 --- /dev/null +++ b/chrome/browser/offline_pages/prefetch/offline_prefetch_download_client.cc
@@ -0,0 +1,67 @@ +// 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/offline_pages/prefetch/offline_prefetch_download_client.h" + +#include "base/logging.h" +#include "chrome/browser/download/download_service_factory.h" +#include "chrome/browser/offline_pages/prefetch/prefetch_service_factory.h" +#include "components/offline_pages/core/prefetch/prefetch_downloader.h" +#include "components/offline_pages/core/prefetch/prefetch_service.h" + +namespace offline_pages { + +OfflinePrefetchDownloadClient::OfflinePrefetchDownloadClient( + content::BrowserContext* context) + : context_(context) {} + +OfflinePrefetchDownloadClient::~OfflinePrefetchDownloadClient() = default; + +void OfflinePrefetchDownloadClient::OnServiceInitialized( + const std::vector<std::string>& outstanding_download_guids) { + // TODO(jianli): Remove orphaned downloads. + PrefetchDownloader* downloader = GetPrefetchDownloader(); + if (downloader) + downloader->OnDownloadServiceReady(); +} + +download::Client::ShouldDownload +OfflinePrefetchDownloadClient::OnDownloadStarted( + const std::string& guid, + const std::vector<GURL>& url_chain, + const scoped_refptr<const net::HttpResponseHeaders>& headers) { + return download::Client::ShouldDownload::CONTINUE; +} + +void OfflinePrefetchDownloadClient::OnDownloadUpdated( + const std::string& guid, + uint64_t bytes_downloaded) {} + +void OfflinePrefetchDownloadClient::OnDownloadFailed( + const std::string& guid, + download::Client::FailureReason reason) { + PrefetchDownloader* downloader = GetPrefetchDownloader(); + if (downloader) + downloader->OnDownloadFailed(guid); +} + +void OfflinePrefetchDownloadClient::OnDownloadSucceeded( + const std::string& guid, + const base::FilePath& path, + uint64_t size) { + PrefetchDownloader* downloader = GetPrefetchDownloader(); + if (downloader) + downloader->OnDownloadSucceeded(guid, path, size); +} + +PrefetchDownloader* OfflinePrefetchDownloadClient::GetPrefetchDownloader() + const { + PrefetchService* prefetch_service = + PrefetchServiceFactory::GetForBrowserContext(context_); + if (!prefetch_service) + return nullptr; + return prefetch_service->GetPrefetchDownloader(); +} + +} // namespace offline_pages
diff --git a/chrome/browser/offline_pages/prefetch/offline_prefetch_download_client.h b/chrome/browser/offline_pages/prefetch/offline_prefetch_download_client.h new file mode 100644 index 0000000..3a258ff --- /dev/null +++ b/chrome/browser/offline_pages/prefetch/offline_prefetch_download_client.h
@@ -0,0 +1,49 @@ +// 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_OFFLINE_PAGES_PREFETCH_OFFLINE_PREFETCH_DOWNLOAD_CLIENT_H_ +#define CHROME_BROWSER_OFFLINE_PAGES_PREFETCH_OFFLINE_PREFETCH_DOWNLOAD_CLIENT_H_ + +#include "base/macros.h" +#include "components/download/public/client.h" + +namespace content { +class BrowserContext; +} + +namespace offline_pages { + +class PrefetchDownloader; + +class OfflinePrefetchDownloadClient : public download::Client { + public: + explicit OfflinePrefetchDownloadClient(content::BrowserContext* context); + ~OfflinePrefetchDownloadClient() override; + + private: + // Overridden from Client: + void OnServiceInitialized( + const std::vector<std::string>& outstanding_download_guids) override; + download::Client::ShouldDownload OnDownloadStarted( + const std::string& guid, + const std::vector<GURL>& url_chain, + const scoped_refptr<const net::HttpResponseHeaders>& headers) override; + void OnDownloadUpdated(const std::string& guid, + uint64_t bytes_downloaded) override; + void OnDownloadFailed(const std::string& guid, + download::Client::FailureReason reason) override; + void OnDownloadSucceeded(const std::string& guid, + const base::FilePath& path, + uint64_t size) override; + + PrefetchDownloader* GetPrefetchDownloader() const; + + content::BrowserContext* context_; + + DISALLOW_COPY_AND_ASSIGN(OfflinePrefetchDownloadClient); +}; + +} // namespace offline_pages + +#endif // CHROME_BROWSER_OFFLINE_PAGES_PREFETCH_OFFLINE_PREFETCH_DOWNLOAD_CLIENT_H_
diff --git a/chrome/browser/offline_pages/prefetch/prefetch_service_factory.cc b/chrome/browser/offline_pages/prefetch/prefetch_service_factory.cc index 34eaf11..12dbcc3 100644 --- a/chrome/browser/offline_pages/prefetch/prefetch_service_factory.cc +++ b/chrome/browser/offline_pages/prefetch/prefetch_service_factory.cc
@@ -9,6 +9,7 @@ #include "base/memory/ptr_util.h" #include "base/memory/singleton.h" +#include "chrome/browser/download/download_service_factory.h" #include "chrome/browser/offline_pages/prefetch/offline_metrics_collector_impl.h" #include "chrome/browser/offline_pages/prefetch/prefetch_instance_id_proxy.h" #include "chrome/browser/profiles/profile.h" @@ -16,6 +17,7 @@ #include "chrome/common/chrome_content_client.h" #include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/offline_pages/core/prefetch/prefetch_dispatcher_impl.h" +#include "components/offline_pages/core/prefetch/prefetch_downloader.h" #include "components/offline_pages/core/prefetch/prefetch_gcm_app_handler.h" #include "components/offline_pages/core/prefetch/prefetch_network_request_factory_impl.h" #include "components/offline_pages/core/prefetch/prefetch_service_impl.h" @@ -27,7 +29,10 @@ PrefetchServiceFactory::PrefetchServiceFactory() : BrowserContextKeyedServiceFactory( "OfflinePagePrefetchService", - BrowserContextDependencyManager::GetInstance()) {} + BrowserContextDependencyManager::GetInstance()) { + DependsOn(DownloadServiceFactory::GetInstance()); +} + // static PrefetchServiceFactory* PrefetchServiceFactory::GetInstance() { return base::Singleton<PrefetchServiceFactory>::get(); @@ -55,11 +60,15 @@ auto suggested_articles_observer = base::MakeUnique<SuggestedArticlesObserver>(); - return new PrefetchServiceImpl(std::move(offline_metrics_collector), - std::move(prefetch_dispatcher), - std::move(prefetch_gcm_app_handler), - std::move(prefetch_network_request_factory), - std::move(suggested_articles_observer)); + auto prefetch_downloader = base::MakeUnique<PrefetchDownloader>( + DownloadServiceFactory::GetForBrowserContext(context), + chrome::GetChannel()); + + return new PrefetchServiceImpl( + std::move(offline_metrics_collector), std::move(prefetch_dispatcher), + std::move(prefetch_gcm_app_handler), + std::move(prefetch_network_request_factory), + std::move(suggested_articles_observer), std::move(prefetch_downloader)); } } // namespace offline_pages
diff --git a/chrome/browser/profiles/off_the_record_profile_io_data.cc b/chrome/browser/profiles/off_the_record_profile_io_data.cc index abab796..f04aef7 100644 --- a/chrome/browser/profiles/off_the_record_profile_io_data.cc +++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc
@@ -199,21 +199,6 @@ net::URLRequestContextStorage* main_context_storage = main_request_context_storage(); - IOThread* const io_thread = profile_params->io_thread; - IOThread::Globals* const io_thread_globals = io_thread->globals(); - - ApplyProfileParamsToContext(main_context); - - main_context->set_transport_security_state(transport_security_state()); - main_context->set_ct_policy_enforcer( - io_thread_globals->system_request_context->ct_policy_enforcer()); - - main_context->set_net_log(io_thread->net_log()); - - main_context->set_http_auth_handler_factory( - io_thread_globals->system_request_context->http_auth_handler_factory()); - main_context->set_proxy_service(proxy_service()); - // For incognito, we use the default non-persistent HttpServerPropertiesImpl. main_context_storage->set_http_server_properties( base::MakeUnique<net::HttpServerPropertiesImpl>());
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc index 81a5cbf2..f35c5a4 100644 --- a/chrome/browser/profiles/profile_impl_io_data.cc +++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -469,24 +469,12 @@ IOThread* const io_thread = profile_params->io_thread; IOThread::Globals* const io_thread_globals = io_thread->globals(); - ApplyProfileParamsToContext(main_context); - if (lazy_params_->http_server_properties_manager) { lazy_params_->http_server_properties_manager->InitializeOnNetworkSequence(); main_context_storage->set_http_server_properties( std::move(lazy_params_->http_server_properties_manager)); } - main_context->set_transport_security_state(transport_security_state()); - main_context->set_ct_policy_enforcer( - io_thread_globals->system_request_context->ct_policy_enforcer()); - - main_context->set_net_log(io_thread->net_log()); - - main_context->set_http_auth_handler_factory( - io_thread_globals->system_request_context->http_auth_handler_factory()); - - main_context->set_proxy_service(proxy_service()); main_context->set_network_quality_estimator( io_thread_globals->network_quality_estimator.get()); @@ -796,9 +784,9 @@ DCHECK_CURRENTLY_ON(BrowserThread::IO); DCHECK(initialized()); - DCHECK(transport_security_state()); // Completes synchronously. - transport_security_state()->DeleteAllDynamicDataSince(time); + main_request_context()->transport_security_state()->DeleteAllDynamicDataSince( + time); DCHECK(http_server_properties_manager_); http_server_properties_manager_->Clear(completion); }
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc index 128b17e..824002c 100644 --- a/chrome/browser/profiles/profile_io_data.cc +++ b/chrome/browser/profiles/profile_io_data.cc
@@ -658,39 +658,33 @@ static_cast<void*>(it->second), sizeof(void*)); } - // Prevent the TreeStateTracker from getting any more notifications by - // severing the link between it and the CTVerifier and unregistering it from - // new STH notifications. - // - // Only do this if the |cert_transparency_verifier_| is not null. - if (cert_transparency_verifier_) { - cert_transparency_verifier_->SetObserver(nullptr); + if (main_request_context_) { + // Prevent the TreeStateTracker from getting any more notifications by + // severing the link between it and the CTVerifier and unregistering it from + // new STH notifications. + main_request_context_->cert_transparency_verifier()->SetObserver(nullptr); ct_tree_tracker_unregistration_.Run(); - } - // Destroy certificate_report_sender_ before main_request_context_, - // since the former has a reference to the latter. - if (transport_security_state_) - transport_security_state_->SetReportSender(nullptr); - certificate_report_sender_.reset(); + // Destroy certificate_report_sender_ before main_request_context_, + // since the former has a reference to the latter. + main_request_context_->transport_security_state()->SetReportSender(nullptr); + certificate_report_sender_.reset(); - if (transport_security_state_) - transport_security_state_->SetExpectCTReporter(nullptr); - expect_ct_reporter_.reset(); + main_request_context_->transport_security_state()->SetExpectCTReporter( + nullptr); + expect_ct_reporter_.reset(); - if (transport_security_state_) - transport_security_state_->SetRequireCTDelegate(nullptr); + main_request_context_->transport_security_state()->SetRequireCTDelegate( + nullptr); - // And the same for the ReportingService. - if (main_request_context_storage()) { + // And the same for the ReportingService. main_request_context_storage()->set_reporting_service( std::unique_ptr<net::ReportingService>()); - } - // This should be shut down last, as any other requests may initiate more - // activity when the ProxyService aborts lookups. - if (proxy_service_) - proxy_service_->OnShutdown(); + // This should be shut down last, as any other requests may initiate more + // activity when the ProxyService aborts lookups. + main_request_context_->proxy_service()->OnShutdown(); + } // TODO(ajwong): These AssertNoURLRequests() calls are unnecessary since they // are already done in the URLRequestContext destructor. @@ -1004,13 +998,18 @@ const base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess(); - // Create the common request contexts. + // Create extension request context. Only used for cookies. + extensions_request_context_.reset(new net::URLRequestContext()); + extensions_request_context_->set_name("extensions"); + + // Create the main request context. main_request_context_.reset(new net::URLRequestContext()); main_request_context_storage_.reset( new net::URLRequestContextStorage(main_request_context_.get())); - extensions_request_context_.reset(new net::URLRequestContext()); main_request_context_->set_name("main"); - extensions_request_context_->set_name("extensions"); + + ApplyProfileParamsToContext(main_request_context_.get()); + main_request_context_->set_net_log(io_thread->net_log()); main_request_context_->set_enable_brotli(io_thread_globals->enable_brotli); @@ -1053,20 +1052,24 @@ main_request_context_->set_host_resolver( io_thread_globals->system_request_context->host_resolver()); - // NOTE: Proxy service uses the default io thread network delegate, not the - // delegate just created. - proxy_service_ = ProxyServiceFactory::CreateProxyService( - io_thread->net_log(), main_request_context_.get(), network_delegate.get(), - std::move(profile_params_->proxy_config_service), command_line, - io_thread->WpadQuickCheckEnabled(), - io_thread->PacHttpsUrlStrippingEnabled()); + main_request_context_->set_http_auth_handler_factory( + io_thread_globals->system_request_context->http_auth_handler_factory()); + + main_request_context_storage_->set_proxy_service( + ProxyServiceFactory::CreateProxyService( + io_thread->net_log(), main_request_context_.get(), + network_delegate.get(), + std::move(profile_params_->proxy_config_service), command_line, + io_thread->WpadQuickCheckEnabled(), + io_thread->PacHttpsUrlStrippingEnabled())); main_request_context_storage_->set_network_delegate( std::move(network_delegate)); - transport_security_state_.reset(new net::TransportSecurityState()); + std::unique_ptr<net::TransportSecurityState> transport_security_state( + base::MakeUnique<net::TransportSecurityState>()); transport_security_persister_.reset(new net::TransportSecurityPersister( - transport_security_state_.get(), profile_params_->path, + transport_security_state.get(), profile_params_->path, base::CreateSequencedTaskRunnerWithTraits( {base::MayBlock(), base::TaskPriority::BACKGROUND, base::TaskShutdownBehavior::BLOCK_SHUTDOWN}), @@ -1102,14 +1105,16 @@ })"); certificate_report_sender_.reset( new net::ReportSender(main_request_context_.get(), traffic_annotation)); - transport_security_state_->SetReportSender(certificate_report_sender_.get()); + transport_security_state->SetReportSender(certificate_report_sender_.get()); expect_ct_reporter_.reset( new ChromeExpectCTReporter(main_request_context_.get())); - transport_security_state_->SetExpectCTReporter(expect_ct_reporter_.get()); + transport_security_state->SetExpectCTReporter(expect_ct_reporter_.get()); - transport_security_state_->SetRequireCTDelegate( + transport_security_state->SetRequireCTDelegate( ct_policy_manager_->GetDelegate()); + main_request_context_storage_->set_transport_security_state( + std::move(transport_security_state)); // Take ownership over these parameters. cookie_settings_ = profile_params_->cookie_settings; @@ -1169,18 +1174,22 @@ std::unique_ptr<net::MultiLogCTVerifier> ct_verifier( new net::MultiLogCTVerifier()); ct_verifier->AddLogs(io_thread_globals->ct_logs); - main_request_context_->set_cert_transparency_verifier(ct_verifier.get()); ct_tree_tracker_.reset(new certificate_transparency::TreeStateTracker( io_thread_globals->ct_logs, io_thread->net_log())); ct_verifier->SetObserver(ct_tree_tracker_.get()); - cert_transparency_verifier_ = std::move(ct_verifier); + main_request_context_storage_->set_cert_transparency_verifier( + std::move(ct_verifier)); + io_thread->RegisterSTHObserver(ct_tree_tracker_.get()); ct_tree_tracker_unregistration_ = base::Bind(&IOThread::UnregisterSTHObserver, base::Unretained(io_thread), ct_tree_tracker_.get()); + main_request_context_->set_ct_policy_enforcer( + io_thread_globals->system_request_context->ct_policy_enforcer()); + InitializeInternal(profile_params_.get(), protocol_handlers, std::move(request_interceptors));
diff --git a/chrome/browser/profiles/profile_io_data.h b/chrome/browser/profiles/profile_io_data.h index a25e88d..d626a45 100644 --- a/chrome/browser/profiles/profile_io_data.h +++ b/chrome/browser/profiles/profile_io_data.h
@@ -77,15 +77,12 @@ class ChannelIDService; class ClientCertStore; class CookieStore; -class CTVerifier; class HttpTransactionFactory; class ProxyConfigService; -class ProxyService; class ReportingService; class ReportSender; class SSLConfigService; class TransportSecurityPersister; -class TransportSecurityState; class URLRequestContextStorage; class URLRequestJobFactoryImpl; } // namespace net @@ -187,10 +184,6 @@ return &network_controller_handle_; } - net::TransportSecurityState* transport_security_state() const { - return transport_security_state_.get(); - } - #if defined(OS_CHROMEOS) std::string username_hash() const { return username_hash_; @@ -383,10 +376,6 @@ void set_previews_io_data( std::unique_ptr<previews::PreviewsIOData> previews_io_data) const; - net::ProxyService* proxy_service() const { - return proxy_service_.get(); - } - net::URLRequestContext* main_request_context() const { return main_request_context_.get(); } @@ -564,10 +553,6 @@ mutable std::unique_ptr<data_reduction_proxy::DataReductionProxyIOData> data_reduction_proxy_io_data_; - mutable std::unique_ptr<net::ProxyService> proxy_service_; - mutable std::unique_ptr<net::TransportSecurityState> - transport_security_state_; - mutable std::unique_ptr<net::CTVerifier> cert_transparency_verifier_; mutable std::unique_ptr<ChromeExpectCTReporter> expect_ct_reporter_; #if defined(OS_CHROMEOS) // Set to |cert_verifier_| if it references a PolicyCertVerifier. In that @@ -579,13 +564,6 @@ mutable std::unique_ptr<chromeos::CertificateProvider> certificate_provider_; #endif - // Pointed to by the TransportSecurityState. - mutable std::unique_ptr<net::TransportSecurityPersister> - transport_security_persister_; - mutable std::unique_ptr<net::ReportSender> certificate_report_sender_; - mutable std::unique_ptr<certificate_transparency::CTPolicyManager> - ct_policy_manager_; - // Owns the subset of URLRequestContext's elements that are created by // subclasses of ProfileImplIOData, to ensure proper destruction ordering. // TODO(mmenke): Move ownship of net objects owned by the ProfileIOData @@ -594,6 +572,15 @@ main_request_context_storage_; mutable std::unique_ptr<net::URLRequestContext> main_request_context_; + // Pointed to by the TransportSecurityState (owned by + // URLRequestContextStorage), and must be disconnected from it before it's + // destroyed. + mutable std::unique_ptr<net::TransportSecurityPersister> + transport_security_persister_; + mutable std::unique_ptr<net::ReportSender> certificate_report_sender_; + mutable std::unique_ptr<certificate_transparency::CTPolicyManager> + ct_policy_manager_; + mutable std::unique_ptr<net::URLRequestContext> extensions_request_context_; // One URLRequestContext per isolated app for main and media requests. mutable URLRequestContextMap app_request_context_map_;
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.cc b/chrome/browser/renderer_context_menu/render_view_context_menu.cc index 034d12c..3351f16 100644 --- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc +++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -354,10 +354,10 @@ const size_t kMappingSize = arraysize(kUmaEnumToControlId); for (size_t i = 0; i < kMappingSize; ++i) { if (kUmaEnumToControlId[i].control_id == id) { - if (enum_lookup_type == GENERAL_ENUM_ID) { + if (enum_lookup_type == GENERAL_ENUM_ID) return kUmaEnumToControlId[i].enum_id; - } else if (enum_lookup_type == CONTEXT_SPECIFIC_ENUM_ID && - kUmaEnumToControlId[i].context_specific_enum_id > -1) { + if (enum_lookup_type == CONTEXT_SPECIFIC_ENUM_ID && + kUmaEnumToControlId[i].context_specific_enum_id > -1) { return kUmaEnumToControlId[i].context_specific_enum_id; } } @@ -514,9 +514,8 @@ // static bool RenderViewContextMenu::IsInternalResourcesURL(const GURL& url) { - if (!url.SchemeIs(content::kChromeUIScheme)) - return false; - return url.host_piece() == chrome::kChromeUISyncResourcesHost; + return url.SchemeIs(content::kChromeUIScheme) && + url.host_piece() == chrome::kChromeUISyncResourcesHost; } // static @@ -677,14 +676,14 @@ sorted_menu_titles.end()); int index = 0; - for (size_t i = 0; i < sorted_menu_titles.size(); ++i) { - std::vector<const Extension*>& extensions = - title_to_extensions_map[sorted_menu_titles[i]]; - for (auto* extension : extensions) { + for (const auto& title : sorted_menu_titles) { + const std::vector<const Extension*>& extensions = + title_to_extensions_map[title]; + for (const Extension* extension : extensions) { MenuItem::ExtensionKey extension_key(extension->id()); extension_items_.AppendExtensionItems(extension_key, printable_selection_text, &index, - false); // is_action_menu + /*is_action_menu=*/false); } } } @@ -712,7 +711,7 @@ // Only add extension items from this extension. int index = 0; extension_items_.AppendExtensionItems(key, PrintableSelectionText(), &index, - false /* is_action_menu */); + /*is_action_menu=*/false); } #endif // BUILDFLAG(ENABLE_EXTENSIONS) @@ -733,10 +732,10 @@ menu_model_.AddSeparator(ui::NORMAL_SEPARATOR); } - if (content_type_->SupportsGroup( - ContextMenuContentType::ITEM_GROUP_MEDIA_IMAGE)) { + bool media_image = content_type_->SupportsGroup( + ContextMenuContentType::ITEM_GROUP_MEDIA_IMAGE); + if (media_image) AppendImageItems(); - } if (content_type_->SupportsGroup( ContextMenuContentType::ITEM_GROUP_SEARCHWEBFORIMAGE)) { @@ -765,12 +764,13 @@ // ITEM_GROUP_MEDIA_FILE has no specific items. - if (content_type_->SupportsGroup(ContextMenuContentType::ITEM_GROUP_EDITABLE)) + bool editable = + content_type_->SupportsGroup(ContextMenuContentType::ITEM_GROUP_EDITABLE); + if (editable) AppendEditableItems(); if (content_type_->SupportsGroup(ContextMenuContentType::ITEM_GROUP_COPY)) { - DCHECK(!content_type_->SupportsGroup( - ContextMenuContentType::ITEM_GROUP_EDITABLE)); + DCHECK(!editable); AppendCopyItem(); } @@ -780,15 +780,12 @@ AppendSearchProvider(); } - if (content_type_->SupportsGroup(ContextMenuContentType::ITEM_GROUP_PRINT) && - !content_type_->SupportsGroup( - ContextMenuContentType::ITEM_GROUP_MEDIA_IMAGE)) { + if (!media_image && + content_type_->SupportsGroup(ContextMenuContentType::ITEM_GROUP_PRINT)) { AppendPrintItem(); } - if (content_type_->SupportsGroup( - ContextMenuContentType::ITEM_GROUP_EDITABLE) && - params_.misspelled_word.empty()) { + if (editable && params_.misspelled_word.empty()) { menu_model_.AddSeparator(ui::NORMAL_SEPARATOR); AppendLanguageSettings(); AppendPlatformEditableItems(); @@ -829,10 +826,10 @@ } // Remove any redundant trailing separator. - if (menu_model_.GetItemCount() > 0 && - menu_model_.GetTypeAt(menu_model_.GetItemCount() - 1) == - ui::MenuModel::TYPE_SEPARATOR) { - menu_model_.RemoveItemAt(menu_model_.GetItemCount() - 1); + int index = menu_model_.GetItemCount() - 1; + if (index >= 0 && + menu_model_.GetTypeAt(index) == ui::MenuModel::TYPE_SEPARATOR) { + menu_model_.RemoveItemAt(index); } } @@ -842,38 +839,37 @@ void RenderViewContextMenu::RecordUsedItem(int id) { int enum_id = FindUMAEnumValueForCommand(id, GENERAL_ENUM_ID); - if (enum_id != -1) { - const size_t kMappingSize = arraysize(kUmaEnumToControlId); - UMA_HISTOGRAM_EXACT_LINEAR("RenderViewContextMenu.Used", enum_id, - kUmaEnumToControlId[kMappingSize - 1].enum_id); - // Record to additional context specific histograms. - enum_id = FindUMAEnumValueForCommand(id, CONTEXT_SPECIFIC_ENUM_ID); - - // Linked image context. - if (content_type_->SupportsGroup(ContextMenuContentType::ITEM_GROUP_LINK) && - content_type_->SupportsGroup( - ContextMenuContentType::ITEM_GROUP_MEDIA_IMAGE)) { - UMA_HISTOGRAM_EXACT_LINEAR("ContextMenu.SelectedOption.ImageLink", - enum_id, - kUmaEnumToControlId[kMappingSize - 1].enum_id); - } - // Selected text context. - if (content_type_->SupportsGroup( - ContextMenuContentType::ITEM_GROUP_SEARCH_PROVIDER) && - content_type_->SupportsGroup( - ContextMenuContentType::ITEM_GROUP_PRINT)) { - UMA_HISTOGRAM_EXACT_LINEAR("ContextMenu.SelectedOption.SelectedText", - enum_id, - kUmaEnumToControlId[kMappingSize - 1].enum_id); - } - // Misspelled word context. - if (!params_.misspelled_word.empty()) { - UMA_HISTOGRAM_EXACT_LINEAR("ContextMenu.SelectedOption.MisspelledWord", - enum_id, - kUmaEnumToControlId[kMappingSize - 1].enum_id); - } - } else { + if (enum_id == -1) { NOTREACHED() << "Update kUmaEnumToControlId. Unhanded IDC: " << id; + return; + } + + const size_t kMappingSize = arraysize(kUmaEnumToControlId); + UMA_HISTOGRAM_EXACT_LINEAR("RenderViewContextMenu.Used", enum_id, + kUmaEnumToControlId[kMappingSize - 1].enum_id); + // Record to additional context specific histograms. + enum_id = FindUMAEnumValueForCommand(id, CONTEXT_SPECIFIC_ENUM_ID); + + // Linked image context. + if (content_type_->SupportsGroup(ContextMenuContentType::ITEM_GROUP_LINK) && + content_type_->SupportsGroup( + ContextMenuContentType::ITEM_GROUP_MEDIA_IMAGE)) { + UMA_HISTOGRAM_EXACT_LINEAR("ContextMenu.SelectedOption.ImageLink", enum_id, + kUmaEnumToControlId[kMappingSize - 1].enum_id); + } + // Selected text context. + if (content_type_->SupportsGroup( + ContextMenuContentType::ITEM_GROUP_SEARCH_PROVIDER) && + content_type_->SupportsGroup(ContextMenuContentType::ITEM_GROUP_PRINT)) { + UMA_HISTOGRAM_EXACT_LINEAR("ContextMenu.SelectedOption.SelectedText", + enum_id, + kUmaEnumToControlId[kMappingSize - 1].enum_id); + } + // Misspelled word context. + if (!params_.misspelled_word.empty()) { + UMA_HISTOGRAM_EXACT_LINEAR("ContextMenu.SelectedOption.MisspelledWord", + enum_id, + kUmaEnumToControlId[kMappingSize - 1].enum_id); } } @@ -909,9 +905,9 @@ void RenderViewContextMenu::AppendPrintPreviewItems() { #if BUILDFLAG(ENABLE_PRINT_PREVIEW) - if (!print_preview_menu_observer_.get()) { - print_preview_menu_observer_.reset( - new PrintPreviewContextMenuObserver(source_web_contents_)); + if (!print_preview_menu_observer_) { + print_preview_menu_observer_ = + base::MakeUnique<PrintPreviewContextMenuObserver>(source_web_contents_); } observers_.AddObserver(print_preview_menu_observer_.get()); @@ -1114,22 +1110,23 @@ } void RenderViewContextMenu::AppendSearchWebForImageItems() { + if (!params_.has_image_contents) + return; + TemplateURLService* service = TemplateURLServiceFactory::GetForProfile(GetProfile()); - const TemplateURL* const default_provider = - service->GetDefaultSearchProvider(); - if (params_.has_image_contents && default_provider && - !default_provider->image_url().empty() && - default_provider->image_url_ref().IsValid(service->search_terms_data())) { - menu_model_.AddItem( - IDC_CONTENT_CONTEXT_SEARCHWEBFORIMAGE, - l10n_util::GetStringFUTF16(IDS_CONTENT_CONTEXT_SEARCHWEBFORIMAGE, - default_provider->short_name())); - if (default_provider->image_url_ref().HasGoogleBaseURLs( - service->search_terms_data())) { - AddGoogleIconToLastMenuItem(&menu_model_); - } + const TemplateURL* const provider = service->GetDefaultSearchProvider(); + if (!provider || provider->image_url().empty() || + !provider->image_url_ref().IsValid(service->search_terms_data())) { + return; } + + menu_model_.AddItem( + IDC_CONTENT_CONTEXT_SEARCHWEBFORIMAGE, + l10n_util::GetStringFUTF16(IDS_CONTENT_CONTEXT_SEARCHWEBFORIMAGE, + provider->short_name())); + if (provider->image_url_ref().HasGoogleBaseURLs(service->search_terms_data())) + AddGoogleIconToLastMenuItem(&menu_model_); } void RenderViewContextMenu::AppendAudioItems() { @@ -1382,8 +1379,9 @@ #else if (!spelling_options_submenu_observer_) { const int kLanguageRadioGroup = 1; - spelling_options_submenu_observer_.reset( - new SpellingOptionsSubMenuObserver(this, this, kLanguageRadioGroup)); + spelling_options_submenu_observer_ = + base::MakeUnique<SpellingOptionsSubMenuObserver>(this, this, + kLanguageRadioGroup); } spelling_options_submenu_observer_->InitMenu(params_); @@ -1392,8 +1390,10 @@ } void RenderViewContextMenu::AppendSpellingSuggestionItems() { - if (!spelling_suggestions_menu_observer_) - spelling_suggestions_menu_observer_.reset(new SpellingMenuObserver(this)); + if (!spelling_suggestions_menu_observer_) { + spelling_suggestions_menu_observer_ = + base::MakeUnique<SpellingMenuObserver>(this); + } observers_.AddObserver(spelling_suggestions_menu_observer_.get()); spelling_suggestions_menu_observer_->InitMenu(params_); } @@ -1954,13 +1954,13 @@ bool RenderViewContextMenu::IsDevCommandEnabled(int id) const { if (id == IDC_CONTENT_CONTEXT_INSPECTELEMENT || id == IDC_CONTENT_CONTEXT_INSPECTBACKGROUNDPAGE) { - if (!GetPrefs(browser_context_) - ->GetBoolean(prefs::kWebKitJavascriptEnabled)) + PrefService* prefs = GetPrefs(browser_context_); + if (!prefs->GetBoolean(prefs::kWebKitJavascriptEnabled)) return false; // Don't enable the web inspector if the developer tools are disabled via // the preference dev-tools-disabled. - if (GetPrefs(browser_context_)->GetBoolean(prefs::kDevToolsDisabled)) + if (prefs->GetBoolean(prefs::kDevToolsDisabled)) return false; } @@ -2033,7 +2033,7 @@ url.is_valid() && ProfileIOData::IsHandledProtocol(url.scheme()); #if BUILDFLAG(ENABLE_PRINT_PREVIEW) - // Do not save the preview PDF on the print preview page. + // Do not save the preview PDF on the print preview page. can_save = can_save && !(printing::PrintPreviewDialogController::IsPrintPreviewURL(url)); #endif @@ -2211,11 +2211,11 @@ source_web_contents_->GetBrowserContext(), render_frame_host->GetSiteInstance()); - std::unique_ptr<DownloadUrlParameters> dl_params(new DownloadUrlParameters( + auto dl_params = base::MakeUnique<DownloadUrlParameters>( url, render_frame_host->GetProcess()->GetID(), render_frame_host->GetRenderViewHost()->GetRoutingID(), render_frame_host->GetRoutingID(), - storage_partition->GetURLRequestContext(), NO_TRAFFIC_ANNOTATION_YET)); + storage_partition->GetURLRequestContext(), NO_TRAFFIC_ANNOTATION_YET); dl_params->set_referrer(CreateReferrer(url, params_)); dl_params->set_referrer_encoding(params_.frame_charset); dl_params->set_suggested_name(params_.suggested_filename);
diff --git a/chrome/browser/resources/md_bookmarks/api_listener.js b/chrome/browser/resources/md_bookmarks/api_listener.js index d7907a4..1e8852c 100644 --- a/chrome/browser/resources/md_bookmarks/api_listener.js +++ b/chrome/browser/resources/md_bookmarks/api_listener.js
@@ -8,6 +8,27 @@ */ cr.define('bookmarks.ApiListener', function() { + + /** @type {?number} */ + var timerHandle; + + /** + * Batches UI updates so that no changes will be made to UI until the next + * task after the last call to this method. This is useful for listeners which + * can be called in a tight loop by UI actions. + */ + function batchUIUpdates() { + if (timerHandle) + clearTimeout(timerHandle); + else + bookmarks.Store.getInstance().beginBatchUpdate(); + + timerHandle = setTimeout(function() { + bookmarks.Store.getInstance().endBatchUpdate(); + timerHandle = null; + }); + } + /** @param {Action} action */ function dispatch(action) { bookmarks.Store.getInstance().dispatch(action); @@ -26,6 +47,7 @@ * @param {BookmarkTreeNode} treeNode */ function onBookmarkCreated(id, treeNode) { + batchUIUpdates(); dispatch(bookmarks.actions.createBookmark(id, treeNode)); } @@ -34,6 +56,7 @@ * @param {{parentId: string, index: number}} removeInfo */ function onBookmarkRemoved(id, removeInfo) { + batchUIUpdates(); var nodes = bookmarks.Store.getInstance().data.nodes; dispatch(bookmarks.actions.removeBookmark( id, removeInfo.parentId, removeInfo.index, nodes)); @@ -49,6 +72,7 @@ * }} moveInfo */ function onBookmarkMoved(id, moveInfo) { + batchUIUpdates(); dispatch(bookmarks.actions.moveBookmark( id, moveInfo.parentId, moveInfo.index, moveInfo.oldParentId, moveInfo.oldIndex));
diff --git a/chrome/browser/resources/md_bookmarks/store.js b/chrome/browser/resources/md_bookmarks/store.js index 9b47de1..7cbf93d8 100644 --- a/chrome/browser/resources/md_bookmarks/store.js +++ b/chrome/browser/resources/md_bookmarks/store.js
@@ -19,6 +19,8 @@ this.queuedActions_ = []; /** @type {!Array<!StoreObserver>} */ this.observers_ = []; + /** @private {boolean} */ + this.batchMode_ = false; } Store.prototype = { @@ -58,6 +60,25 @@ }, /** + * Begin a batch update to store data, which will disable updates to the + * UI until `endBatchUpdate` is called. This is useful when a single UI + * operation is likely to cause many sequential model updates (eg, deleting + * 100 bookmarks). + */ + beginBatchUpdate: function() { + this.batchMode_ = true; + }, + + /** + * End a batch update to the store data, notifying the UI of any changes + * which occurred while batch mode was enabled. + */ + endBatchUpdate: function() { + this.batchMode_ = false; + this.notifyObservers_(this.data); + }, + + /** * Handles a 'deferred' action, which can asynchronously dispatch actions * to the Store in order to reach a new UI state. DeferredActions have the * form `dispatchAsync(function(dispatch) { ... })`). Inside that function, @@ -104,7 +125,7 @@ this.data_ = bookmarks.reduceAction(this.data_, action); // Batch notifications until after all initialization queuedActions are // resolved. - if (this.isInitialized()) + if (this.isInitialized() && !this.batchMode_) this.notifyObservers_(this.data_); },
diff --git a/chrome/browser/resources/md_extensions/manager.html b/chrome/browser/resources/md_extensions/manager.html index 9f5f5a1d..c40b130 100644 --- a/chrome/browser/resources/md_extensions/manager.html +++ b/chrome/browser/resources/md_extensions/manager.html
@@ -80,7 +80,7 @@ on-cr-toolbar-menu-tap="onMenuButtonTap_" on-search-changed="onFilterChanged_"> </extensions-toolbar> - <dialog id="drawer" is="cr-drawer" title="$i18n{toolbarTitle}"> + <dialog id="drawer" is="cr-drawer" heading="$i18n{toolbarTitle}"> <div class="drawer-content"> <extensions-sidebar></extensions-sidebar> </div>
diff --git a/chrome/browser/resources/md_history/app.html b/chrome/browser/resources/md_history/app.html index c36a5bd1..36b380fe 100644 --- a/chrome/browser/resources/md_history/app.html +++ b/chrome/browser/resources/md_history/app.html
@@ -113,7 +113,7 @@ </div> <template is="cr-lazy-render" id="drawer"> - <dialog is="cr-drawer" title="$i18n{title}" swipe-open> + <dialog is="cr-drawer" heading="$i18n{title}" swipe-open> <history-side-bar id="drawer-side-bar" class="drawer-content" selected-page="{{selectedPage_}}" show-footer="[[showSidebarFooter]]">
diff --git a/chrome/browser/resources/offline_pages/offline_internals.html b/chrome/browser/resources/offline_pages/offline_internals.html index a90859c..7220e63a 100644 --- a/chrome/browser/resources/offline_pages/offline_internals.html +++ b/chrome/browser/resources/offline_pages/offline_internals.html
@@ -100,6 +100,10 @@ placeholder="operations/1234-5678"> <button id="get-operation">Get Operation</button> </div> + <div> + <input id="download-name" type="text" placeholder="us/page/1234-5678"> + <button id="download-archive">Download</button> + </div> </div> <div id="prefetch-actions-info" class="dump"></div> </body>
diff --git a/chrome/browser/resources/offline_pages/offline_internals.js b/chrome/browser/resources/offline_pages/offline_internals.js index 705eb4ac..5acddb5 100644 --- a/chrome/browser/resources/offline_pages/offline_internals.js +++ b/chrome/browser/resources/offline_pages/offline_internals.js
@@ -335,6 +335,9 @@ browserProxy.getOperation($('operation-name').value) .then(setPrefetchResult); }; + $('download-archive').onclick = function() { + browserProxy.downloadArchive($('download-name').value); + }; if (!incognito) refreshAll(); }
diff --git a/chrome/browser/resources/offline_pages/offline_internals_browser_proxy.js b/chrome/browser/resources/offline_pages/offline_internals_browser_proxy.js index 4066134..81d58c11 100644 --- a/chrome/browser/resources/offline_pages/offline_internals_browser_proxy.js +++ b/chrome/browser/resources/offline_pages/offline_internals_browser_proxy.js
@@ -145,6 +145,12 @@ * @return {!Promise<string>} A string describing the result. */ getOperation: function(name) {}, + + /** + * Downloads an archive. + * @param {string} name Name of archive to download. + */ + downloadArchive: function(name) {}, }; /** @@ -229,6 +235,11 @@ getOperation: function(name) { return cr.sendWithPromise('getOperation', name); }, + + /** @override */ + downloadArchive: function(name) { + chrome.send('downloadArchive', [name]); + }, }; return {
diff --git a/chrome/browser/resources/print_preview/native_layer.js b/chrome/browser/resources/print_preview/native_layer.js index 1a2b0e6..7e45ed32 100644 --- a/chrome/browser/resources/print_preview/native_layer.js +++ b/chrome/browser/resources/print_preview/native_layer.js
@@ -86,7 +86,6 @@ */ function NativeLayer() { // Bind global handlers - global.setUseCloudPrint = this.onSetUseCloudPrint_.bind(this); global.reloadPrintersList = this.onReloadPrintersList_.bind(this); global.printPreviewFailed = this.onPrintPreviewFailed_.bind(this); global.invalidPrinterSettings = this.onInvalidPrinterSettings_.bind(this); @@ -131,7 +130,6 @@ * @const */ NativeLayer.EventType = { - CLOUD_PRINT_ENABLE: 'print_preview.NativeLayer.CLOUD_PRINT_ENABLE', DESTINATIONS_RELOAD: 'print_preview.NativeLayer.DESTINATIONS_RELOAD', DISABLE_SCALING: 'print_preview.NativeLayer.DISABLE_SCALING', MANIPULATE_SETTINGS_FOR_TEST: @@ -554,20 +552,6 @@ chrome.send('forceOpenNewTab', [url]); }, - /** - * Turn on the integration of Cloud Print. - * @param {{cloudPrintURL: string, appKioskMode: string}} settings - * cloudPrintUrl: The URL to use for cloud print servers. - * @private - */ - onSetUseCloudPrint_: function(settings) { - var cloudPrintEnableEvent = - new Event(NativeLayer.EventType.CLOUD_PRINT_ENABLE); - cloudPrintEnableEvent.baseCloudPrintUrl = settings['cloudPrintUrl'] || ''; - cloudPrintEnableEvent.appKioskMode = settings['appKioskMode'] || false; - this.eventTarget_.dispatchEvent(cloudPrintEnableEvent); - }, - /** Reloads the printer list. */ onReloadPrintersList_: function() { cr.dispatchSimpleEvent(
diff --git a/chrome/browser/resources/print_preview/print_preview.js b/chrome/browser/resources/print_preview/print_preview.js index 741a50e..8e915cc5 100644 --- a/chrome/browser/resources/print_preview/print_preview.js +++ b/chrome/browser/resources/print_preview/print_preview.js
@@ -340,6 +340,8 @@ 'extension-printers-added', this.destinationStore_.onExtensionPrintersAdded_.bind( this.destinationStore_)); + this.listenerTracker.add( + 'use-cloud-print', this.onCloudPrintEnable_.bind(this)); }, /** @override */ @@ -348,10 +350,6 @@ var nativeLayerEventTarget = this.nativeLayer_.getEventTarget(); this.tracker.add( nativeLayerEventTarget, - print_preview.NativeLayer.EventType.CLOUD_PRINT_ENABLE, - this.onCloudPrintEnable_.bind(this)); - this.tracker.add( - nativeLayerEventTarget, print_preview.NativeLayer.EventType.SETTINGS_INVALID, this.onSettingsInvalid_.bind(this)); this.tracker.add( @@ -607,7 +605,8 @@ var boundHideDialog = function () { this.nativeLayer_.startHideDialog(); }.bind(this); - // Local printers resolve when print is started. Hide the dialog. + // Local printers resolve when print is ready to start. Hide the + // dialog. whenPrintDone.then(boundHideDialog, boundHideDialog); } @@ -688,16 +687,17 @@ }, /** - * Calls when the native layer enables Google Cloud Print integration. + * Called when Google Cloud Print integration is enabled by the + * PrintPreviewHandler. * Fetches the user's cloud printers. - * @param {Event} event Contains the base URL of the Google Cloud Print - * service. + * @param {string} cloudPrintUrl The URL to use for cloud print servers. + * @param {boolean} appKioskMode Whether to print automatically for kiosk + * mode. * @private */ - onCloudPrintEnable_: function(event) { + onCloudPrintEnable_: function(cloudPrintUrl, appKioskMode) { this.cloudPrintInterface_ = new cloudprint.CloudPrintInterface( - event.baseCloudPrintUrl, this.nativeLayer_, this.userInfo_, - event.appKioskMode); + cloudPrintUrl, this.nativeLayer_, this.userInfo_, appKioskMode); this.tracker.add( this.cloudPrintInterface_, cloudprint.CloudPrintInterfaceEventType.SUBMIT_DONE,
diff --git a/chrome/browser/resources/settings/about_page/about_page_browser_proxy.js b/chrome/browser/resources/settings/about_page/about_page_browser_proxy.js index 52f3ced..beb4b67 100644 --- a/chrome/browser/resources/settings/about_page/about_page_browser_proxy.js +++ b/chrome/browser/resources/settings/about_page/about_page_browser_proxy.js
@@ -130,35 +130,34 @@ } /** @interface */ - function AboutPageBrowserProxy() {} - - AboutPageBrowserProxy.prototype = { + class AboutPageBrowserProxy { /** * Indicates to the browser that the page is ready. */ - pageReady: function() {}, + pageReady() {} /** * Request update status from the browser. It results in one or more * 'update-status-changed' WebUI events. */ - refreshUpdateStatus: function() {}, + refreshUpdateStatus() {} /** Opens the help page. */ - openHelpPage: function() {}, + openHelpPage() {} // <if expr="_google_chrome"> /** * Opens the feedback dialog. */ - openFeedbackDialog: function() {}, + openFeedbackDialog() {} + // </if> // <if expr="chromeos"> /** * Checks for available update and applies if it exists. */ - requestUpdate: function() {}, + requestUpdate() {} /** * Checks for the update with specified version and size and applies over @@ -170,101 +169,102 @@ * @param {string} target_version * @param {string} target_size */ - requestUpdateOverCellular: function(target_version, target_size) {}, + requestUpdateOverCellular(target_version, target_size) {} /** * @param {!BrowserChannel} channel * @param {boolean} isPowerwashAllowed */ - setChannel: function(channel, isPowerwashAllowed) {}, + setChannel(channel, isPowerwashAllowed) {} /** @return {!Promise<!ChannelInfo>} */ - getChannelInfo: function() {}, + getChannelInfo() {} /** @return {!Promise<!VersionInfo>} */ - getVersionInfo: function() {}, + getVersionInfo() {} /** @return {!Promise<?RegulatoryInfo>} */ - getRegulatoryInfo: function() {}, + getRegulatoryInfo() {} + // </if> // <if expr="_google_chrome and is_macosx"> /** * Triggers setting up auto-updates for all users. */ - promoteUpdater: function() {}, + promoteUpdater() {} // </if> - }; + } /** * @implements {settings.AboutPageBrowserProxy} - * @constructor */ - function AboutPageBrowserProxyImpl() {} - cr.addSingletonGetter(AboutPageBrowserProxyImpl); - - AboutPageBrowserProxyImpl.prototype = { + class AboutPageBrowserProxyImpl { /** @override */ - pageReady: function() { + pageReady() { chrome.send('aboutPageReady'); - }, + } /** @override */ - refreshUpdateStatus: function() { + refreshUpdateStatus() { chrome.send('refreshUpdateStatus'); - }, + } // <if expr="_google_chrome and is_macosx"> /** @override */ - promoteUpdater: function() { + promoteUpdater() { chrome.send('promoteUpdater'); - }, + } + // </if> /** @override */ - openHelpPage: function() { + openHelpPage() { chrome.send('openHelpPage'); - }, + } // <if expr="_google_chrome"> /** @override */ - openFeedbackDialog: function() { + openFeedbackDialog() { chrome.send('openFeedbackDialog'); - }, + } + // </if> // <if expr="chromeos"> /** @override */ - requestUpdate: function() { + requestUpdate() { chrome.send('requestUpdate'); - }, + } /** @override */ - requestUpdateOverCellular: function(target_version, target_size) { + requestUpdateOverCellular(target_version, target_size) { chrome.send('requestUpdateOverCellular', [target_version, target_size]); - }, + } /** @override */ - setChannel: function(channel, isPowerwashAllowed) { + setChannel(channel, isPowerwashAllowed) { chrome.send('setChannel', [channel, isPowerwashAllowed]); - }, + } /** @override */ - getChannelInfo: function() { + getChannelInfo() { return cr.sendWithPromise('getChannelInfo'); - }, + } /** @override */ - getVersionInfo: function() { + getVersionInfo() { return cr.sendWithPromise('getVersionInfo'); - }, + } /** @override */ - getRegulatoryInfo: function() { + getRegulatoryInfo() { return cr.sendWithPromise('getRegulatoryInfo'); } // </if> - }; + } + + cr.addSingletonGetter(AboutPageBrowserProxyImpl); return { AboutPageBrowserProxy: AboutPageBrowserProxy,
diff --git a/chrome/browser/resources/settings/android_apps_page/android_apps_browser_proxy.js b/chrome/browser/resources/settings/android_apps_page/android_apps_browser_proxy.js index c5b32bd..6cb17f5f 100644 --- a/chrome/browser/resources/settings/android_apps_page/android_apps_browser_proxy.js +++ b/chrome/browser/resources/settings/android_apps_page/android_apps_browser_proxy.js
@@ -21,40 +21,35 @@ cr.define('settings', function() { /** @interface */ - function AndroidAppsBrowserProxy() {} - - AndroidAppsBrowserProxy.prototype = { - requestAndroidAppsInfo: function() {}, + class AndroidAppsBrowserProxy { + requestAndroidAppsInfo() {} /** * @param {boolean} keyboardAction True if the app was opened using a * keyboard action. */ - showAndroidAppsSettings: function(keyboardAction) {}, - }; + showAndroidAppsSettings(keyboardAction) {} + } /** - * @constructor * @implements {settings.AndroidAppsBrowserProxy} */ - function AndroidAppsBrowserProxyImpl() {} + class AndroidAppsBrowserProxyImpl { + /** @override */ + requestAndroidAppsInfo() { + chrome.send('requestAndroidAppsInfo'); + } + + /** @override */ + showAndroidAppsSettings(keyboardAction) { + chrome.send('showAndroidAppsSettings', [keyboardAction]); + } + } // The singleton instance_ can be replaced with a test version of this wrapper // during testing. cr.addSingletonGetter(AndroidAppsBrowserProxyImpl); - AndroidAppsBrowserProxyImpl.prototype = { - /** @override */ - requestAndroidAppsInfo: function() { - chrome.send('requestAndroidAppsInfo'); - }, - - /** @override */ - showAndroidAppsSettings: function(keyboardAction) { - chrome.send('showAndroidAppsSettings', [keyboardAction]); - }, - }; - return { AndroidAppsBrowserProxy: AndroidAppsBrowserProxy, AndroidAppsBrowserProxyImpl: AndroidAppsBrowserProxyImpl,
diff --git a/chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.js b/chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.js index 5006a3f..779818bd 100644 --- a/chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.js +++ b/chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.js
@@ -4,90 +4,89 @@ cr.define('settings', function() { /** @interface */ - function AppearanceBrowserProxy() {} - - AppearanceBrowserProxy.prototype = { + class AppearanceBrowserProxy { /** @return {!Promise<number>} */ - getDefaultZoom: assertNotReached, + getDefaultZoom() {} /** * @param {string} themeId * @return {!Promise<!chrome.management.ExtensionInfo>} Theme info. */ - getThemeInfo: assertNotReached, + getThemeInfo(themeId) {} /** @return {boolean} Whether the current profile is supervised. */ - isSupervised: assertNotReached, + isSupervised() {} // <if expr="chromeos"> - openWallpaperManager: assertNotReached, + openWallpaperManager() {} + // </if> - useDefaultTheme: assertNotReached, + useDefaultTheme() {} // <if expr="is_linux and not chromeos"> - useSystemTheme: assertNotReached, + useSystemTheme() {} + // </if> /** * @param {string} url The url of which to check validity. * @return {!Promise<boolean>} */ - validateStartupPage: assertNotReached, - }; + validateStartupPage(url) {} + } /** * @implements {settings.AppearanceBrowserProxy} - * @constructor */ - function AppearanceBrowserProxyImpl() {} - - cr.addSingletonGetter(AppearanceBrowserProxyImpl); - - AppearanceBrowserProxyImpl.prototype = { + class AppearanceBrowserProxyImpl { /** @override */ - getDefaultZoom: function() { + getDefaultZoom() { return new Promise(function(resolve) { chrome.settingsPrivate.getDefaultZoom(resolve); }); - }, + } /** @override */ - getThemeInfo: function(themeId) { + getThemeInfo(themeId) { return new Promise(function(resolve) { chrome.management.get(themeId, resolve); }); - }, + } /** @override */ - isSupervised: function() { + isSupervised() { return loadTimeData.getBoolean('isSupervised'); - }, + } // <if expr="chromeos"> /** @override */ - openWallpaperManager: function() { + openWallpaperManager() { chrome.send('openWallpaperManager'); - }, + } + // </if> /** @override */ - useDefaultTheme: function() { + useDefaultTheme() { chrome.send('useDefaultTheme'); - }, + } // <if expr="is_linux and not chromeos"> /** @override */ - useSystemTheme: function() { + useSystemTheme() { chrome.send('useSystemTheme'); - }, + } + // </if> /** @override */ - validateStartupPage: function(url) { + validateStartupPage(url) { return cr.sendWithPromise('validateStartupPage', url); - }, - }; + } + } + + cr.addSingletonGetter(AppearanceBrowserProxyImpl); return { AppearanceBrowserProxy: AppearanceBrowserProxy,
diff --git a/chrome/browser/resources/settings/appearance_page/fonts_browser_proxy.js b/chrome/browser/resources/settings/appearance_page/fonts_browser_proxy.js index b8b1263..d513b3ad 100644 --- a/chrome/browser/resources/settings/appearance_page/fonts_browser_proxy.js +++ b/chrome/browser/resources/settings/appearance_page/fonts_browser_proxy.js
@@ -12,44 +12,39 @@ cr.define('settings', function() { /** @interface */ - function FontsBrowserProxy() {} - - FontsBrowserProxy.prototype = { + class FontsBrowserProxy { /** * @return {!Promise<!FontsData>} Fonts and the advanced font settings * extension URL. */ - fetchFontsData: assertNotReached, + fetchFontsData() {} - observeAdvancedFontExtensionAvailable: assertNotReached, + observeAdvancedFontExtensionAvailable() {} - openAdvancedFontSettings: assertNotReached, - }; + openAdvancedFontSettings() {} + } /** * @implements {settings.FontsBrowserProxy} - * @constructor */ - function FontsBrowserProxyImpl() {} - - cr.addSingletonGetter(FontsBrowserProxyImpl); - - FontsBrowserProxyImpl.prototype = { + class FontsBrowserProxyImpl { /** @override */ - fetchFontsData: function() { + fetchFontsData() { return cr.sendWithPromise('fetchFontsData'); - }, + } /** @override */ - observeAdvancedFontExtensionAvailable: function() { + observeAdvancedFontExtensionAvailable() { chrome.send('observeAdvancedFontExtensionAvailable'); - }, + } /** @override */ - openAdvancedFontSettings: function() { + openAdvancedFontSettings() { chrome.send('openAdvancedFontSettings'); } - }; + } + + cr.addSingletonGetter(FontsBrowserProxyImpl); return { FontsBrowserProxy: FontsBrowserProxy,
diff --git a/chrome/browser/resources/settings/certificate_manager_page/certificates_browser_proxy.js b/chrome/browser/resources/settings/certificate_manager_page/certificates_browser_proxy.js index eb89020..3501b77 100644 --- a/chrome/browser/resources/settings/certificate_manager_page/certificates_browser_proxy.js +++ b/chrome/browser/resources/settings/certificate_manager_page/certificates_browser_proxy.js
@@ -83,36 +83,33 @@ var CertificatesImportError; cr.define('settings', function() { - /** @interface */ - function CertificatesBrowserProxy() {} - - CertificatesBrowserProxy.prototype = { + class CertificatesBrowserProxy { /** * Triggers 5 events in the following order * 1x 'certificates-model-ready' event. * 4x 'certificates-changed' event, one for each certificate category. */ - refreshCertificates: function() {}, + refreshCertificates() {} /** @param {string} id */ - viewCertificate: function(id) {}, + viewCertificate(id) {} /** @param {string} id */ - exportCertificate: function(id) {}, + exportCertificate(id) {} /** * @param {string} id * @return {!Promise} A promise resolved when the certificate has been * deleted successfully or rejected with a CertificatesError. */ - deleteCertificate: function(id) {}, + deleteCertificate(id) {} /** * @param {string} id * @return {!Promise<!CaTrustInfo>} */ - getCaCertificateTrust: function(id) {}, + getCaCertificateTrust(id) {} /** * @param {string} id @@ -121,9 +118,9 @@ * @param {boolean} objSign * @return {!Promise} */ - editCaCertificateTrust: function(id, ssl, email, objSign) {}, + editCaCertificateTrust(id, ssl, email, objSign) {} - cancelImportExportCertificate: function() {}, + cancelImportExportCertificate() {} /** * @param {string} id @@ -133,13 +130,13 @@ * passed back via a call to * exportPersonalCertificatePasswordSelected(). */ - exportPersonalCertificate: function(id) {}, + exportPersonalCertificate(id) {} /** * @param {string} password * @return {!Promise} */ - exportPersonalCertificatePasswordSelected: function(password) {}, + exportPersonalCertificatePasswordSelected(password) {} /** * @param {boolean} useHardwareBacked @@ -148,13 +145,13 @@ * the user, and the password should be passed back via a call to * importPersonalCertificatePasswordSelected(). */ - importPersonalCertificate: function(useHardwareBacked) {}, + importPersonalCertificate(useHardwareBacked) {} /** * @param {string} password * @return {!Promise} */ - importPersonalCertificatePasswordSelected: function(password) {}, + importPersonalCertificatePasswordSelected(password) {} /** * @return {!Promise} A promise firing once the user has selected @@ -163,7 +160,7 @@ * trust levels, and that information should be passed back via a call * to importCaCertificateTrustSelected(). */ - importCaCertificate: function() {}, + importCaCertificate() {} /** * @param {boolean} ssl @@ -174,101 +171,99 @@ * error occurred with either a CertificatesError or * CertificatesImportError. */ - importCaCertificateTrustSelected: function(ssl, email, objSign) {}, + importCaCertificateTrustSelected(ssl, email, objSign) {} /** * @return {!Promise} A promise firing once the certificate has been * imported. The promise is rejected if an error occurred, with either * a CertificatesError or CertificatesImportError. */ - importServerCertificate: function() {}, - }; + importServerCertificate() {} + } /** - * @constructor * @implements {settings.CertificatesBrowserProxy} */ - function CertificatesBrowserProxyImpl() {} + class CertificatesBrowserProxyImpl { + /** @override */ + refreshCertificates() { + chrome.send('refreshCertificates'); + } + + /** @override */ + viewCertificate(id) { + chrome.send('viewCertificate', [id]); + } + + /** @override */ + exportCertificate(id) { + chrome.send('exportCertificate', [id]); + } + + /** @override */ + deleteCertificate(id) { + return cr.sendWithPromise('deleteCertificate', id); + } + + /** @override */ + exportPersonalCertificate(id) { + return cr.sendWithPromise('exportPersonalCertificate', id); + } + + /** @override */ + exportPersonalCertificatePasswordSelected(password) { + return cr.sendWithPromise( + 'exportPersonalCertificatePasswordSelected', password); + } + + /** @override */ + importPersonalCertificate(useHardwareBacked) { + return cr.sendWithPromise('importPersonalCertificate', useHardwareBacked); + } + + /** @override */ + importPersonalCertificatePasswordSelected(password) { + return cr.sendWithPromise( + 'importPersonalCertificatePasswordSelected', password); + } + + /** @override */ + getCaCertificateTrust(id) { + return cr.sendWithPromise('getCaCertificateTrust', id); + } + + /** @override */ + editCaCertificateTrust(id, ssl, email, objSign) { + return cr.sendWithPromise( + 'editCaCertificateTrust', id, ssl, email, objSign); + } + + /** @override */ + importCaCertificateTrustSelected(ssl, email, objSign) { + return cr.sendWithPromise( + 'importCaCertificateTrustSelected', ssl, email, objSign); + } + + /** @override */ + cancelImportExportCertificate() { + chrome.send('cancelImportExportCertificate'); + } + + /** @override */ + importCaCertificate() { + return cr.sendWithPromise('importCaCertificate'); + } + + /** @override */ + importServerCertificate() { + return cr.sendWithPromise('importServerCertificate'); + } + } + // The singleton instance_ is replaced with a test version of this wrapper // during testing. cr.addSingletonGetter(CertificatesBrowserProxyImpl); - CertificatesBrowserProxyImpl.prototype = { - /** @override */ - refreshCertificates: function() { - chrome.send('refreshCertificates'); - }, - - /** @override */ - viewCertificate: function(id) { - chrome.send('viewCertificate', [id]); - }, - - /** @override */ - exportCertificate: function(id) { - chrome.send('exportCertificate', [id]); - }, - - /** @override */ - deleteCertificate: function(id) { - return cr.sendWithPromise('deleteCertificate', id); - }, - - /** @override */ - exportPersonalCertificate: function(id) { - return cr.sendWithPromise('exportPersonalCertificate', id); - }, - - /** @override */ - exportPersonalCertificatePasswordSelected: function(password) { - return cr.sendWithPromise( - 'exportPersonalCertificatePasswordSelected', password); - }, - - /** @override */ - importPersonalCertificate: function(useHardwareBacked) { - return cr.sendWithPromise('importPersonalCertificate', useHardwareBacked); - }, - - /** @override */ - importPersonalCertificatePasswordSelected: function(password) { - return cr.sendWithPromise( - 'importPersonalCertificatePasswordSelected', password); - }, - - /** @override */ - getCaCertificateTrust: function(id) { - return cr.sendWithPromise('getCaCertificateTrust', id); - }, - - /** @override */ - editCaCertificateTrust: function(id, ssl, email, objSign) { - return cr.sendWithPromise( - 'editCaCertificateTrust', id, ssl, email, objSign); - }, - - /** @override */ - importCaCertificateTrustSelected: function(ssl, email, objSign) { - return cr.sendWithPromise( - 'importCaCertificateTrustSelected', ssl, email, objSign); - }, - - /** @override */ - cancelImportExportCertificate: function() { - chrome.send('cancelImportExportCertificate'); - }, - - /** @override */ - importCaCertificate: function() { - return cr.sendWithPromise('importCaCertificate'); - }, - - /** @override */ - importServerCertificate: function() { - return cr.sendWithPromise('importServerCertificate'); - }, - }; - return { CertificatesBrowserProxy: CertificatesBrowserProxy, CertificatesBrowserProxyImpl: CertificatesBrowserProxyImpl,
diff --git a/chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_proxy.js b/chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_proxy.js index 7edbab00..b032a5cd 100644 --- a/chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_proxy.js +++ b/chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_proxy.js
@@ -4,61 +4,56 @@ cr.define('settings', function() { /** @interface */ - function ChromeCleanupProxy() {} - - ChromeCleanupProxy.prototype = { + class ChromeCleanupProxy { /** * Registers the current ChromeCleanupHandler as an observer of * ChromeCleanerController events. */ - registerChromeCleanerObserver: assertNotReached, + registerChromeCleanerObserver() {} /** * Starts a cleanup on the user's computer. */ - startCleanup: assertNotReached, + startCleanup() {} /** * Restarts the user's computer. */ - restartComputer: assertNotReached, + restartComputer() {} /** * Hides the Cleanup page from the settings menu. */ - dismissCleanupPage: assertNotReached, - }; + dismissCleanupPage() {} + } /** * @implements {settings.ChromeCleanupProxy} - * @constructor */ - function ChromeCleanupProxyImpl() {} + class ChromeCleanupProxyImpl { + /** @override */ + registerChromeCleanerObserver() { + chrome.send('registerChromeCleanerObserver'); + } + + /** @override */ + startCleanup() { + chrome.send('startCleanup'); + } + + /** @override */ + restartComputer() { + chrome.send('restartComputer'); + } + + /** @override */ + dismissCleanupPage() { + chrome.send('dismissCleanupPage'); + } + } cr.addSingletonGetter(ChromeCleanupProxyImpl); - ChromeCleanupProxyImpl.prototype = { - /** @override */ - registerChromeCleanerObserver: function() { - chrome.send('registerChromeCleanerObserver'); - }, - - /** @override */ - startCleanup: function() { - chrome.send('startCleanup'); - }, - - /** @override */ - restartComputer: function() { - chrome.send('restartComputer'); - }, - - /** @override */ - dismissCleanupPage: function() { - chrome.send('dismissCleanupPage'); - }, - }; - return { ChromeCleanupProxy: ChromeCleanupProxy, ChromeCleanupProxyImpl: ChromeCleanupProxyImpl,
diff --git a/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_browser_proxy.js b/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_browser_proxy.js index 20e2ffe8..24bdd364 100644 --- a/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_browser_proxy.js +++ b/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_browser_proxy.js
@@ -26,52 +26,48 @@ cr.define('settings', function() { /** @interface */ - function ClearBrowsingDataBrowserProxy() {} - - ClearBrowsingDataBrowserProxy.prototype = { + class ClearBrowsingDataBrowserProxy { /** * @param {!Array<!ImportantSite>} importantSites * @return {!Promise<void>} * A promise resolved when data clearing has completed. */ - clearBrowsingData: function(importantSites) {}, + clearBrowsingData(importantSites) {} /** * @return {!Promise<!Array<!ImportantSite>>} * A promise resolved when imporant sites are retrieved. */ - getImportantSites: function() {}, + getImportantSites() {} /** * Kick off counter updates and return initial state. * @return {!Promise<void>} Signal when the setup is complete. */ - initialize: function() {}, - }; + initialize() {} + } /** - * @constructor * @implements {settings.ClearBrowsingDataBrowserProxy} */ - function ClearBrowsingDataBrowserProxyImpl() {} - cr.addSingletonGetter(ClearBrowsingDataBrowserProxyImpl); - - ClearBrowsingDataBrowserProxyImpl.prototype = { + class ClearBrowsingDataBrowserProxyImpl { /** @override */ - clearBrowsingData: function(importantSites) { + clearBrowsingData(importantSites) { return cr.sendWithPromise('clearBrowsingData', importantSites); - }, + } /** @override */ - getImportantSites: function() { + getImportantSites() { return cr.sendWithPromise('getImportantSites'); - }, + } /** @override */ - initialize: function() { + initialize() { return cr.sendWithPromise('initializeClearBrowsingData'); - }, - }; + } + } + + cr.addSingletonGetter(ClearBrowsingDataBrowserProxyImpl); return { ClearBrowsingDataBrowserProxy: ClearBrowsingDataBrowserProxy,
diff --git a/chrome/browser/resources/settings/default_browser_page/default_browser_browser_proxy.js b/chrome/browser/resources/settings/default_browser_page/default_browser_browser_proxy.js index e4f34da..bb8703a 100644 --- a/chrome/browser/resources/settings/default_browser_page/default_browser_browser_proxy.js +++ b/chrome/browser/resources/settings/default_browser_page/default_browser_browser_proxy.js
@@ -19,42 +19,38 @@ cr.define('settings', function() { /** @interface */ - function DefaultBrowserBrowserProxy() {} - - DefaultBrowserBrowserProxy.prototype = { + class DefaultBrowserBrowserProxy { /** * Get the initial DefaultBrowserInfo and begin sending updates to * 'settings.updateDefaultBrowserState'. * @return {!Promise<DefaultBrowserInfo>} */ - requestDefaultBrowserState: function() {}, + requestDefaultBrowserState() {} /* * Try to set the current browser as the default browser. The new status of * the settings will be sent to 'settings.updateDefaultBrowserState'. */ - setAsDefaultBrowser: function() {}, - }; + setAsDefaultBrowser() {} + } /** - * @constructor * @implements {settings.DefaultBrowserBrowserProxy} */ - function DefaultBrowserBrowserProxyImpl() {} - cr.addSingletonGetter(DefaultBrowserBrowserProxyImpl); - - DefaultBrowserBrowserProxyImpl.prototype = { + class DefaultBrowserBrowserProxyImpl { /** @override */ - requestDefaultBrowserState: function() { + requestDefaultBrowserState() { return cr.sendWithPromise( 'SettingsDefaultBrowser.requestDefaultBrowserState'); - }, + } /** @override */ - setAsDefaultBrowser: function() { + setAsDefaultBrowser() { chrome.send('SettingsDefaultBrowser.setAsDefaultBrowser'); - }, - }; + } + } + + cr.addSingletonGetter(DefaultBrowserBrowserProxyImpl); return { DefaultBrowserBrowserProxy: DefaultBrowserBrowserProxy,
diff --git a/chrome/browser/resources/settings/device_page/compiled_resources2.gyp b/chrome/browser/resources/settings/device_page/compiled_resources2.gyp index f93da31..97ba452 100644 --- a/chrome/browser/resources/settings/device_page/compiled_resources2.gyp +++ b/chrome/browser/resources/settings/device_page/compiled_resources2.gyp
@@ -118,6 +118,7 @@ 'dependencies': [ '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:i18n_behavior', '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:web_ui_listener_behavior', + '<(EXTERNS_GYP):settings_private', '../compiled_resources2.gyp:route', '../prefs/compiled_resources2.gyp:prefs_types', 'device_page_browser_proxy'
diff --git a/chrome/browser/resources/settings/device_page/device_page_browser_proxy.js b/chrome/browser/resources/settings/device_page/device_page_browser_proxy.js index 5e63b92..d84e6c06 100644 --- a/chrome/browser/resources/settings/device_page/device_page_browser_proxy.js +++ b/chrome/browser/resources/settings/device_page/device_page_browser_proxy.js
@@ -76,161 +76,157 @@ cr.define('settings', function() { /** @interface */ - function DevicePageBrowserProxy() {} - - DevicePageBrowserProxy.prototype = { + class DevicePageBrowserProxy { /** Initializes the mouse and touchpad handler. */ - initializePointers: function() {}, + initializePointers() {} /** Initializes the stylus handler. */ - initializeStylus: function() {}, + initializeStylus() {} /** * Override to interact with the on-tap/on-keydown event on the Learn More * link. * @param {!Event} e */ - handleLinkEvent: function(e) {}, + handleLinkEvent(e) {} /** Initializes the keyboard WebUI handler. */ - initializeKeyboard: function() {}, + initializeKeyboard() {} /** Shows the Ash keyboard shortcuts overlay. */ - showKeyboardShortcutsOverlay: function() {}, + showKeyboardShortcutsOverlay() {} /** Requests a power status update. */ - updatePowerStatus: function() {}, + updatePowerStatus() {} /** * Sets the ID of the power source to use. * @param {string} powerSourceId ID of the power source. '' denotes the * battery (no external power source). */ - setPowerSource: function(powerSourceId) {}, + setPowerSource(powerSourceId) {} /** Requests the current power management settings. */ - requestPowerManagementSettings: function() {}, + requestPowerManagementSettings() {} /** * Sets the idle power management behavior. * @param {settings.IdleBehavior} behavior Idle behavior. */ - setIdleBehavior: function(behavior) {}, + setIdleBehavior(behavior) {} /** * Sets the lid-closed power management behavior. * @param {settings.LidClosedBehavior} behavior Lid-closed behavior. */ - setLidClosedBehavior: function(behavior) {}, + setLidClosedBehavior(behavior) {} /** * |callback| is run when there is new note-taking app information * available or after |requestNoteTakingApps| has been called. * @param {function(Array<settings.NoteAppInfo>, boolean):void} callback */ - setNoteTakingAppsUpdatedCallback: function(callback) {}, + setNoteTakingAppsUpdatedCallback(callback) {} /** * Open up the play store with the given URL. * @param {string} url */ - showPlayStore: function(url) {}, + showPlayStore(url) {} /** * Request current note-taking app info. Invokes any callback registered in * |onNoteTakingAppsUpdated|. */ - requestNoteTakingApps: function() {}, + requestNoteTakingApps() {} /** * Changes the preferred note taking app. * @param {string} appId The app id. This should be a value retrieved from a * |onNoteTakingAppsUpdated| callback. */ - setPreferredNoteTakingApp: function(appId) {}, - }; + setPreferredNoteTakingApp(appId) {} + } /** - * @constructor * @implements {settings.DevicePageBrowserProxy} */ - function DevicePageBrowserProxyImpl() {} - cr.addSingletonGetter(DevicePageBrowserProxyImpl); - - DevicePageBrowserProxyImpl.prototype = { + class DevicePageBrowserProxyImpl { /** @override */ - initializePointers: function() { + initializePointers() { chrome.send('initializePointerSettings'); - }, + } /** @override */ - initializeStylus: function() { + initializeStylus() { chrome.send('initializeStylusSettings'); - }, + } /** override */ - handleLinkEvent: function(e) { + handleLinkEvent(e) { // Prevent the link from activating its parent element when tapped or // when Enter is pressed. if (e.type != 'keydown' || e.keyCode == 13) e.stopPropagation(); - }, + } /** @override */ - initializeKeyboard: function() { + initializeKeyboard() { chrome.send('initializeKeyboardSettings'); - }, + } /** @override */ - showKeyboardShortcutsOverlay: function() { + showKeyboardShortcutsOverlay() { chrome.send('showKeyboardShortcutsOverlay'); - }, + } /** @override */ - updatePowerStatus: function() { + updatePowerStatus() { chrome.send('updatePowerStatus'); - }, + } /** @override */ - setPowerSource: function(powerSourceId) { + setPowerSource(powerSourceId) { chrome.send('setPowerSource', [powerSourceId]); - }, + } /** @override */ - requestPowerManagementSettings: function() { + requestPowerManagementSettings() { chrome.send('requestPowerManagementSettings'); - }, + } /** @override */ - setIdleBehavior: function(behavior) { + setIdleBehavior(behavior) { chrome.send('setIdleBehavior', [behavior]); - }, + } /** @override */ - setLidClosedBehavior: function(behavior) { + setLidClosedBehavior(behavior) { chrome.send('setLidClosedBehavior', [behavior]); - }, + } /** @override */ - setNoteTakingAppsUpdatedCallback: function(callback) { + setNoteTakingAppsUpdatedCallback(callback) { cr.addWebUIListener('onNoteTakingAppsUpdated', callback); - }, + } /** @override */ - showPlayStore: function(url) { + showPlayStore(url) { chrome.send('showPlayStoreApps', [url]); - }, + } /** @override */ - requestNoteTakingApps: function() { + requestNoteTakingApps() { chrome.send('requestNoteTakingApps'); - }, + } /** @override */ - setPreferredNoteTakingApp: function(appId) { + setPreferredNoteTakingApp(appId) { chrome.send('setPreferredNoteTakingApp', [appId]); - }, - }; + } + } + + cr.addSingletonGetter(DevicePageBrowserProxyImpl); return { DevicePageBrowserProxy: DevicePageBrowserProxy,
diff --git a/chrome/browser/resources/settings/device_page/power.html b/chrome/browser/resources/settings/device_page/power.html index f007de7e..f0ee3e45 100644 --- a/chrome/browser/resources/settings/device_page/power.html +++ b/chrome/browser/resources/settings/device_page/power.html
@@ -5,6 +5,7 @@ <link rel="import" href="chrome://resources/html/i18n_behavior.html"> <link rel="import" href="chrome://resources/html/md_select_css.html"> <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html"> +<link rel="import" href="../controls/settings_toggle_button.html"> <link rel="import" href="../route.html"> <link rel="import" href="../settings_shared_css.html"> @@ -59,24 +60,11 @@ <div id="lidClosedRow" class="settings-box continuation" hidden$="[[!hasLid_]]"> - <div class="start">$i18n{powerLidClosedLabel}</div> - <template is="dom-if" if="[[lidClosedControlled_]]" restamp> - <cr-policy-indicator id="lidClosedControlledIndicator" - indicator-type="devicePolicy" - icon-aria-label="$i18n{powerLidClosedLabel}"> - </cr-policy-indicator> - </template> - <div class="md-select-wrapper"> - <select id="lidClosedSelect" class="md-select" - on-change="onLidClosedSelectChange_" - disabled="[[lidClosedControlled_]]" - aria-label="$i18n{powerLidClosedLabel}"> - <template is="dom-repeat" items="[[lidClosedOptions_]]"> - <option value="[[item.value]]">[[item.name]]</option> - </template> - </select> - <span class="md-select-underline"></span> - </div> + <settings-toggle-button class="start" id="lidClosedToggle" + pref="[[lidClosedPref_]]" label="[[lidClosedLabel_]]" + on-settings-boolean-control-change="onLidClosedToggleChange_" + no-set-pref> + </settings-toggle-button> </div> </template> <script src="power.js"></script>
diff --git a/chrome/browser/resources/settings/device_page/power.js b/chrome/browser/resources/settings/device_page/power.js index 61532061..842ab2dc 100644 --- a/chrome/browser/resources/settings/device_page/power.js +++ b/chrome/browser/resources/settings/device_page/power.js
@@ -30,10 +30,8 @@ /** @private {boolean} Whether the idle behavior is controlled by policy. */ idleControlled_: Boolean, - /** @private {boolean} Whether the lid-closed behavior is controlled by - * policy. - */ - lidClosedControlled_: Boolean, + /** @private {string} Text for label describing the lid-closed behavior. */ + lidClosedLabel_: String, /** @private {boolean} Whether the system posesses a lid. */ hasLid_: Boolean, @@ -73,10 +71,12 @@ computed: 'computeIdleOptions_(idleControlled_)', }, - /** @private */ - lidClosedOptions_: { - type: Array, - computed: 'computeLidClosedOptions_(lidClosedControlled_)', + /** @private {!chrome.settingsPrivate.PrefObject} */ + lidClosedPref_: { + type: Object, + value: function() { + return /** @type {!chrome.settingsPrivate.PrefObject} */ ({}); + }, }, }, @@ -172,36 +172,6 @@ return options; }, - /** - * @param {boolean} lidClosedControlled - * @return {!Array<!{value: settings.LidClosedBehavior, name: string}>} - * Options to display in lid-closed-behavior select. - * @private - */ - computeLidClosedOptions_: function(lidClosedControlled) { - var options = [ - { - value: settings.LidClosedBehavior.SUSPEND, - name: loadTimeData.getString('powerLidClosedSleep'), - }, - { - value: settings.LidClosedBehavior.DO_NOTHING, - name: loadTimeData.getString('powerLidClosedStayAwake'), - }, - ]; - if (lidClosedControlled) { - // Some options are only settable via policy. - options.push({ - value: settings.LidClosedBehavior.STOP_SESSION, - name: loadTimeData.getString('powerLidClosedSignOut'), - }, { - value: settings.LidClosedBehavior.SHUT_DOWN, - name: loadTimeData.getString('powerLidClosedShutDown'), - }); - } - return options; - }, - /** @private */ onPowerSourceChange_: function() { settings.DevicePageBrowserProxyImpl.getInstance().setPowerSource( @@ -216,11 +186,12 @@ }, /** @private */ - onLidClosedSelectChange_: function() { - var behavior = /** @type {settings.LidClosedBehavior} */ - (parseInt(this.$.lidClosedSelect.value, 10)); + onLidClosedToggleChange_: function() { + // Other behaviors are only displayed when the setting is controlled, in + // which case the toggle can't be changed by the user. settings.DevicePageBrowserProxyImpl.getInstance().setLidClosedBehavior( - behavior); + this.$.lidClosedToggle.checked ? settings.LidClosedBehavior.SUSPEND : + settings.LidClosedBehavior.DO_NOTHING); }, /** @@ -237,21 +208,58 @@ }, /** - * @param {!settings.PowerManagementSettings} settings Current power + * @param {settings.LidClosedBehavior} behavior Current behavior. + * @param {boolean} isControlled Whether the underlying pref is controlled. + * @private + */ + updateLidClosedLabelAndPref_: function(behavior, isControlled) { + var pref = { + key: '', + type: chrome.settingsPrivate.PrefType.BOOLEAN, + // Most behaviors get a dedicated label and appear as checked. + value: true, + }; + + switch (behavior) { + case settings.LidClosedBehavior.SUSPEND: + case settings.LidClosedBehavior.DO_NOTHING: + // "Suspend" and "do nothing" share the "sleep" label and communicate + // their state via the toggle state. + this.lidClosedLabel_ = loadTimeData.getString('powerLidSleepLabel'); + pref.value = behavior == settings.LidClosedBehavior.SUSPEND; + break; + case settings.LidClosedBehavior.STOP_SESSION: + this.lidClosedLabel_ = loadTimeData.getString('powerLidSignOutLabel'); + break; + case settings.LidClosedBehavior.SHUT_DOWN: + this.lidClosedLabel_ = loadTimeData.getString('powerLidShutDownLabel'); + break; + } + + if (isControlled) { + pref.enforcement = chrome.settingsPrivate.Enforcement.ENFORCED; + pref.controlledBy = chrome.settingsPrivate.ControlledBy.USER_POLICY; + } + + this.lidClosedPref_ = pref; + }, + + /** + * @param {!settings.PowerManagementSettings} browserSettings Current power * management settings. * @private */ - powerManagementSettingsChanged_: function(settings) { - this.idleControlled_ = settings.idleControlled; - this.lidClosedControlled_ = settings.lidClosedControlled; - this.hasLid_ = settings.hasLid; + powerManagementSettingsChanged_: function(browserSettings) { + this.idleControlled_ = browserSettings.idleControlled; + this.hasLid_ = browserSettings.hasLid; + this.updateLidClosedLabelAndPref_( + browserSettings.lidClosedBehavior, browserSettings.lidClosedControlled); - // The select elements include "Other" options when controlled but omit them - // otherwise. Make sure that the options are there before we potentially try - // to select them. + // The idle behavior select element includes an "Other" option when + // controlled but omits it otherwise. Make sure that the option is there + // before we potentially try to select it. this.async(function() { - this.$.idleSelect.value = settings.idleBehavior; - this.$.lidClosedSelect.value = settings.lidClosedBehavior; + this.$.idleSelect.value = browserSettings.idleBehavior; }); },
diff --git a/chrome/browser/resources/settings/downloads_page/downloads_browser_proxy.js b/chrome/browser/resources/settings/downloads_page/downloads_browser_proxy.js index 2f510a1..88c41db 100644 --- a/chrome/browser/resources/settings/downloads_page/downloads_browser_proxy.js +++ b/chrome/browser/resources/settings/downloads_page/downloads_browser_proxy.js
@@ -4,41 +4,34 @@ cr.define('settings', function() { /** @interface */ - function DownloadsBrowserProxy() {} - - DownloadsBrowserProxy.prototype = { - initializeDownloads: assertNotReached, - - selectDownloadLocation: assertNotReached, - - resetAutoOpenFileTypes: assertNotReached, - }; + class DownloadsBrowserProxy { + initializeDownloads() {} + selectDownloadLocation() {} + resetAutoOpenFileTypes() {} + } /** * @implements {settings.DownloadsBrowserProxy} - * @constructor */ - function DownloadsBrowserProxyImpl() {} + class DownloadsBrowserProxyImpl { + /** @override */ + initializeDownloads() { + chrome.send('initializeDownloads'); + } + + /** @override */ + selectDownloadLocation() { + chrome.send('selectDownloadLocation'); + } + + /** @override */ + resetAutoOpenFileTypes() { + chrome.send('resetAutoOpenFileTypes'); + } + } cr.addSingletonGetter(DownloadsBrowserProxyImpl); - DownloadsBrowserProxyImpl.prototype = { - /** @override */ - initializeDownloads: function() { - chrome.send('initializeDownloads'); - }, - - /** @override */ - selectDownloadLocation: function() { - chrome.send('selectDownloadLocation'); - }, - - /** @override */ - resetAutoOpenFileTypes: function() { - chrome.send('resetAutoOpenFileTypes'); - }, - }; - return { DownloadsBrowserProxy: DownloadsBrowserProxy, DownloadsBrowserProxyImpl: DownloadsBrowserProxyImpl,
diff --git a/chrome/browser/resources/settings/extension_control_browser_proxy.js b/chrome/browser/resources/settings/extension_control_browser_proxy.js index adbbd79..84b350e 100644 --- a/chrome/browser/resources/settings/extension_control_browser_proxy.js +++ b/chrome/browser/resources/settings/extension_control_browser_proxy.js
@@ -4,36 +4,32 @@ cr.define('settings', function() { /** @interface */ - function ExtensionControlBrowserProxy() {} - - ExtensionControlBrowserProxy.prototype = { + class ExtensionControlBrowserProxy { // TODO(dbeam): should be be returning !Promise<boolean> to indicate whether // it succeeded? /** @param {string} extensionId */ - disableExtension: assertNotReached, + disableExtension(extensionId) {} /** @param {string} extensionId */ - manageExtension: assertNotReached, - }; + manageExtension(extensionId) {} + } /** * @implements {settings.ExtensionControlBrowserProxy} - * @constructor */ - function ExtensionControlBrowserProxyImpl() {} - cr.addSingletonGetter(ExtensionControlBrowserProxyImpl); - - ExtensionControlBrowserProxyImpl.prototype = { + class ExtensionControlBrowserProxyImpl { /** @override */ - disableExtension: function(extensionId) { + disableExtension(extensionId) { chrome.send('disableExtension', [extensionId]); - }, + } /** @override */ - manageExtension: function(extensionId) { + manageExtension(extensionId) { window.open('chrome://extensions?id=' + extensionId); - }, - }; + } + } + + cr.addSingletonGetter(ExtensionControlBrowserProxyImpl); return { ExtensionControlBrowserProxy: ExtensionControlBrowserProxy,
diff --git a/chrome/browser/resources/settings/icons.html b/chrome/browser/resources/settings/icons.html index 8bdb3ad..c6f13cc 100644 --- a/chrome/browser/resources/settings/icons.html +++ b/chrome/browser/resources/settings/icons.html
@@ -8,6 +8,13 @@ <iron-iconset-svg name="settings" size="24"> <svg> <defs> + <!-- Ads icon in the Content Settings --> + <g id="ads"> + <path d="M19,3H5C3.89,3,3,3.9,3,5v14c0,1.1,0.89,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M11,15H9.5v-1.5h-2V15H6v-4.5V9h1.5h2H10h1V15z M18,14c0,0.55-0.45,1-1,1h-4V9h4c0.55,0,1,0.45,1,1V14z"></path> + <rect x="7.5" y="10.5" width="2" height="1.5"></rect> + <rect x="14.5" y="10.5" width="2" height="3"></rect> + </g> + <!-- Cookie SVG obtained from rolfe@ --> <g id="cookie"> <path d="M15.5 7.5V7c0-.98-.5-1.5-1.5-1.5h-.5c-.276 0-.5-.224-.5-.5V3c0-.98-1-1-1-1C6.3 2 1.712 6.77 2.014 12.54c.265 5.046 4.4 9.18 9.448 9.446C17.23 22.288 22 17.7 22 12v-1c0-.553-.447-1-1-1h-1.998c-.277 0-.502-.225-.502-.502V9c0-.938-.48-1.48-1.5-1.5h-1.5zm-9.706 4.972c-1.057.2-1.966-.71-1.766-1.766.112-.587.592-1.067 1.18-1.178 1.055-.2 1.965.71 1.764 1.765-.11.588-.59 1.068-1.178 1.18zm1.734-5.178c-.2-1.057.71-1.966 1.766-1.766.587.11 1.067.59 1.178 1.178.2 1.057-.708 1.966-1.765 1.766-.587-.11-1.068-.59-1.18-1.178zm3.766 12.178c-1.057.2-1.966-.71-1.766-1.766.112-.587.592-1.067 1.18-1.178 1.056-.2 1.965.71 1.764 1.766-.11.587-.59 1.067-1.178 1.178zM11.5 14c-.828 0-1.5-.67-1.5-1.5s.672-1.5 1.5-1.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5zm5 2c-.828 0-1.5-.67-1.5-1.5s.672-1.5 1.5-1.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z" fill-rule="evenodd"></path>
diff --git a/chrome/browser/resources/settings/languages_page/languages_browser_proxy.js b/chrome/browser/resources/settings/languages_page/languages_browser_proxy.js index 5edc03f..e23dd250 100644 --- a/chrome/browser/resources/settings/languages_page/languages_browser_proxy.js +++ b/chrome/browser/resources/settings/languages_page/languages_browser_proxy.js
@@ -9,65 +9,63 @@ cr.define('settings', function() { /** @interface */ - function LanguagesBrowserProxy() {} - - LanguagesBrowserProxy.prototype = { + class LanguagesBrowserProxy { // <if expr="chromeos or is_win"> /** * Sets the prospective UI language to the chosen language. This won't * affect the actual UI language until a restart. * @param {string} languageCode */ - setProspectiveUILanguage: function(languageCode) {}, + setProspectiveUILanguage(languageCode) {} /** @return {!Promise<string>} */ - getProspectiveUILanguage: function() {}, + getProspectiveUILanguage() {} + // </if> /** @return {!LanguageSettingsPrivate} */ - getLanguageSettingsPrivate: function() {}, + getLanguageSettingsPrivate() {} // <if expr="chromeos"> /** @return {!InputMethodPrivate} */ - getInputMethodPrivate: function() {}, + getInputMethodPrivate() {} // </if> - }; + } /** - * @constructor * @implements {settings.LanguagesBrowserProxy} */ - function LanguagesBrowserProxyImpl() {} - // The singleton instance_ is replaced with a test version of this wrapper - // during testing. - cr.addSingletonGetter(LanguagesBrowserProxyImpl); - - LanguagesBrowserProxyImpl.prototype = { + class LanguagesBrowserProxyImpl { // <if expr="chromeos or is_win"> /** @override */ - setProspectiveUILanguage: function(languageCode) { + setProspectiveUILanguage(languageCode) { chrome.send('setProspectiveUILanguage', [languageCode]); - }, + } /** @override */ - getProspectiveUILanguage: function() { + getProspectiveUILanguage() { return cr.sendWithPromise('getProspectiveUILanguage'); - }, + } + // </if> /** @override */ - getLanguageSettingsPrivate: function() { + getLanguageSettingsPrivate() { return /** @type {!LanguageSettingsPrivate} */ ( chrome.languageSettingsPrivate); - }, + } // <if expr="chromeos"> /** @override */ - getInputMethodPrivate: function() { + getInputMethodPrivate() { return /** @type {!InputMethodPrivate} */ (chrome.inputMethodPrivate); - }, + } // </if> - }; + } + + // The singleton instance_ is replaced with a test version of this wrapper + // during testing. + cr.addSingletonGetter(LanguagesBrowserProxyImpl); return { LanguagesBrowserProxy: LanguagesBrowserProxy,
diff --git a/chrome/browser/resources/settings/lifetime_browser_proxy.js b/chrome/browser/resources/settings/lifetime_browser_proxy.js index b9915c0..d97ac2d 100644 --- a/chrome/browser/resources/settings/lifetime_browser_proxy.js +++ b/chrome/browser/resources/settings/lifetime_browser_proxy.js
@@ -4,54 +4,50 @@ cr.define('settings', function() { /** @interface */ - function LifetimeBrowserProxy() {} - - LifetimeBrowserProxy.prototype = { + class LifetimeBrowserProxy { // Triggers a browser restart. - restart: function() {}, + restart() {} // Triggers a browser relaunch. - relaunch: function() {}, + relaunch() {} // <if expr="chromeos"> // First signs out current user and then performs a restart. - signOutAndRestart: function() {}, + signOutAndRestart() {} // Triggers a factory reset. - factoryReset: function() {}, + factoryReset() {} // </if> - }; + } /** - * @constructor * @implements {settings.LifetimeBrowserProxy} */ - function LifetimeBrowserProxyImpl() {} - cr.addSingletonGetter(LifetimeBrowserProxyImpl); - - LifetimeBrowserProxyImpl.prototype = { + class LifetimeBrowserProxyImpl { /** @override */ - restart: function() { + restart() { chrome.send('restart'); - }, + } /** @override */ - relaunch: function() { + relaunch() { chrome.send('relaunch'); - }, + } // <if expr="chromeos"> /** @override */ - signOutAndRestart: function() { + signOutAndRestart() { chrome.send('signOutAndRestart'); - }, + } /** @override */ - factoryReset: function() { + factoryReset() { chrome.send('factoryReset'); - }, + } // </if> - }; + } + + cr.addSingletonGetter(LifetimeBrowserProxyImpl); return { LifetimeBrowserProxy: LifetimeBrowserProxy,
diff --git a/chrome/browser/resources/settings/on_startup_page/on_startup_browser_proxy.js b/chrome/browser/resources/settings/on_startup_page/on_startup_browser_proxy.js index a99f618..917029b 100644 --- a/chrome/browser/resources/settings/on_startup_page/on_startup_browser_proxy.js +++ b/chrome/browser/resources/settings/on_startup_page/on_startup_browser_proxy.js
@@ -7,26 +7,22 @@ cr.define('settings', function() { /** @interface */ - function OnStartupBrowserProxy() {} - - OnStartupBrowserProxy.prototype = { + class OnStartupBrowserProxy { /** @return {!Promise<?NtpExtension>} */ - getNtpExtension: assertNotReached, - }; + getNtpExtension() {} + } /** - * @constructor * @implements {settings.OnStartupBrowserProxy} */ - function OnStartupBrowserProxyImpl() {} - cr.addSingletonGetter(OnStartupBrowserProxyImpl); - - OnStartupBrowserProxyImpl.prototype = { + class OnStartupBrowserProxyImpl { /** @override */ - getNtpExtension: function() { + getNtpExtension() { return cr.sendWithPromise('getNtpExtension'); - }, - }; + } + } + + cr.addSingletonGetter(OnStartupBrowserProxyImpl); return { OnStartupBrowserProxy: OnStartupBrowserProxy,
diff --git a/chrome/browser/resources/settings/on_startup_page/startup_urls_page_browser_proxy.js b/chrome/browser/resources/settings/on_startup_page/startup_urls_page_browser_proxy.js index b33e31a..ff13b19 100644 --- a/chrome/browser/resources/settings/on_startup_page/startup_urls_page_browser_proxy.js +++ b/chrome/browser/resources/settings/on_startup_page/startup_urls_page_browser_proxy.js
@@ -14,25 +14,22 @@ cr.define('settings', function() { /** @interface */ - function StartupUrlsPageBrowserProxy() {} - - StartupUrlsPageBrowserProxy.prototype = { - loadStartupPages: assertNotReached, - - useCurrentPages: assertNotReached, + class StartupUrlsPageBrowserProxy { + loadStartupPages() {} + useCurrentPages() {} /** * @param {string} url * @return {!Promise<boolean>} Whether the URL is valid. */ - validateStartupPage: assertNotReached, + validateStartupPage(url) {} /** * @param {string} url * @return {!Promise<boolean>} Whether the URL was actually added, or * ignored because it was invalid. */ - addStartupPage: assertNotReached, + addStartupPage(url) {} /** * @param {number} modelIndex @@ -40,52 +37,49 @@ * @return {!Promise<boolean>} Whether the URL was actually edited, or * ignored because it was invalid. */ - editStartupPage: assertNotReached, + editStartupPage(modelIndex, url) {} /** @param {number} index */ - removeStartupPage: assertNotReached, - }; + removeStartupPage(index) {} + } /** * @implements {settings.StartupUrlsPageBrowserProxy} - * @constructor */ - function StartupUrlsPageBrowserProxyImpl() {} + class StartupUrlsPageBrowserProxyImpl { + /** @override */ + loadStartupPages() { + chrome.send('onStartupPrefsPageLoad'); + } + + /** @override */ + useCurrentPages() { + chrome.send('setStartupPagesToCurrentPages'); + } + + /** @override */ + validateStartupPage(url) { + return cr.sendWithPromise('validateStartupPage', url); + } + + /** @override */ + addStartupPage(url) { + return cr.sendWithPromise('addStartupPage', url); + } + + /** @override */ + editStartupPage(modelIndex, url) { + return cr.sendWithPromise('editStartupPage', modelIndex, url); + } + + /** @override */ + removeStartupPage(index) { + chrome.send('removeStartupPage', [index]); + } + } cr.addSingletonGetter(StartupUrlsPageBrowserProxyImpl); - StartupUrlsPageBrowserProxyImpl.prototype = { - /** @override */ - loadStartupPages: function() { - chrome.send('onStartupPrefsPageLoad'); - }, - - /** @override */ - useCurrentPages: function() { - chrome.send('setStartupPagesToCurrentPages'); - }, - - /** @override */ - validateStartupPage: function(url) { - return cr.sendWithPromise('validateStartupPage', url); - }, - - /** @override */ - addStartupPage: function(url) { - return cr.sendWithPromise('addStartupPage', url); - }, - - /** @override */ - editStartupPage: function(modelIndex, url) { - return cr.sendWithPromise('editStartupPage', modelIndex, url); - }, - - /** @override */ - removeStartupPage: function(index) { - chrome.send('removeStartupPage', [index]); - }, - }; - return { StartupUrlsPageBrowserProxy: StartupUrlsPageBrowserProxy, StartupUrlsPageBrowserProxyImpl: StartupUrlsPageBrowserProxyImpl,
diff --git a/chrome/browser/resources/settings/people_page/change_picture_browser_proxy.js b/chrome/browser/resources/settings/people_page/change_picture_browser_proxy.js index 05e3dc6..d6dc9b9 100644 --- a/chrome/browser/resources/settings/people_page/change_picture_browser_proxy.js +++ b/chrome/browser/resources/settings/people_page/change_picture_browser_proxy.js
@@ -21,91 +21,87 @@ cr.define('settings', function() { /** @interface */ - function ChangePictureBrowserProxy() {} - - ChangePictureBrowserProxy.prototype = { + class ChangePictureBrowserProxy { /** * Retrieves the initial set of default images, profile image, etc. As a * response, the C++ sends these WebUIListener events: * 'default-images-changed', 'profile-image-changed', 'old-image-changed', * and 'selected-image-changed' */ - initialize: function() {}, + initialize() {} /** * Sets the user image to one of the default images. As a response, the C++ * sends the 'default-images-changed' WebUIListener event. * @param {string} imageUrl */ - selectDefaultImage: function(imageUrl) {}, + selectDefaultImage(imageUrl) {} /** * Sets the user image to the 'old' image. As a response, the C++ sends the * 'old-image-changed' WebUIListener event. */ - selectOldImage: function() {}, + selectOldImage() {} /** * Sets the user image to the profile image. As a response, the C++ sends * the 'profile-image-changed' WebUIListener event. */ - selectProfileImage: function() {}, + selectProfileImage() {} /** * Provides the taken photo as a data URL to the C++. No response is * expected. * @param {string} photoDataUrl */ - photoTaken: function(photoDataUrl) {}, + photoTaken(photoDataUrl) {} /** * Requests a file chooser to select a new user image. No response is * expected. */ - chooseFile: function() {}, - }; + chooseFile() {} + } /** - * @constructor * @implements {settings.ChangePictureBrowserProxy} */ - function ChangePictureBrowserProxyImpl() {} + class ChangePictureBrowserProxyImpl { + /** @override */ + initialize() { + chrome.send('onChangePicturePageInitialized'); + } + + /** @override */ + selectDefaultImage(imageUrl) { + chrome.send('selectImage', [imageUrl, 'default']); + } + + /** @override */ + selectOldImage() { + chrome.send('selectImage', ['', 'old']); + } + + /** @override */ + selectProfileImage() { + chrome.send('selectImage', ['', 'profile']); + } + + /** @override */ + photoTaken(photoDataUrl) { + chrome.send('photoTaken', [photoDataUrl]); + } + + /** @override */ + chooseFile() { + chrome.send('chooseFile'); + } + } + // The singleton instance_ is replaced with a test version of this wrapper // during testing. cr.addSingletonGetter(ChangePictureBrowserProxyImpl); - ChangePictureBrowserProxyImpl.prototype = { - /** @override */ - initialize: function() { - chrome.send('onChangePicturePageInitialized'); - }, - - /** @override */ - selectDefaultImage: function(imageUrl) { - chrome.send('selectImage', [imageUrl, 'default']); - }, - - /** @override */ - selectOldImage: function() { - chrome.send('selectImage', ['', 'old']); - }, - - /** @override */ - selectProfileImage: function() { - chrome.send('selectImage', ['', 'profile']); - }, - - /** @override */ - photoTaken: function(photoDataUrl) { - chrome.send('photoTaken', [photoDataUrl]); - }, - - /** @override */ - chooseFile: function() { - chrome.send('chooseFile'); - }, - }; - return { ChangePictureBrowserProxy: ChangePictureBrowserProxy, ChangePictureBrowserProxyImpl: ChangePictureBrowserProxyImpl,
diff --git a/chrome/browser/resources/settings/people_page/easy_unlock_browser_proxy.js b/chrome/browser/resources/settings/people_page/easy_unlock_browser_proxy.js index f43dfb6..008e6c94 100644 --- a/chrome/browser/resources/settings/people_page/easy_unlock_browser_proxy.js +++ b/chrome/browser/resources/settings/people_page/easy_unlock_browser_proxy.js
@@ -10,73 +10,69 @@ cr.define('settings', function() { /** @interface */ - function EasyUnlockBrowserProxy() {} - - EasyUnlockBrowserProxy.prototype = { + class EasyUnlockBrowserProxy { /** * Returns a true promise if Easy Unlock is already enabled on the device. * @return {!Promise<boolean>} */ - getEnabledStatus: function() {}, + getEnabledStatus() {} /** * Starts the Easy Unlock setup flow. */ - startTurnOnFlow: function() {}, + startTurnOnFlow() {} /** * Returns the Easy Unlock turn off flow status. * @return {!Promise<string>} */ - getTurnOffFlowStatus: function() {}, + getTurnOffFlowStatus() {} /** * Begins the Easy Unlock turn off flow. */ - startTurnOffFlow: function() {}, + startTurnOffFlow() {} /** * Cancels any in-progress Easy Unlock turn-off flows. */ - cancelTurnOffFlow: function() {}, - }; + cancelTurnOffFlow() {} + } /** - * @constructor * @implements {settings.EasyUnlockBrowserProxy} */ - function EasyUnlockBrowserProxyImpl() {} + class EasyUnlockBrowserProxyImpl { + /** @override */ + getEnabledStatus() { + return cr.sendWithPromise('easyUnlockGetEnabledStatus'); + } + + /** @override */ + startTurnOnFlow() { + chrome.send('easyUnlockStartTurnOnFlow'); + } + + /** @override */ + getTurnOffFlowStatus() { + return cr.sendWithPromise('easyUnlockGetTurnOffFlowStatus'); + } + + /** @override */ + startTurnOffFlow() { + chrome.send('easyUnlockStartTurnOffFlow'); + } + + /** @override */ + cancelTurnOffFlow() { + chrome.send('easyUnlockCancelTurnOffFlow'); + } + } + // The singleton instance_ is replaced with a test version of this wrapper // during testing. cr.addSingletonGetter(EasyUnlockBrowserProxyImpl); - EasyUnlockBrowserProxyImpl.prototype = { - /** @override */ - getEnabledStatus: function() { - return cr.sendWithPromise('easyUnlockGetEnabledStatus'); - }, - - /** @override */ - startTurnOnFlow: function() { - chrome.send('easyUnlockStartTurnOnFlow'); - }, - - /** @override */ - getTurnOffFlowStatus: function() { - return cr.sendWithPromise('easyUnlockGetTurnOffFlowStatus'); - }, - - /** @override */ - startTurnOffFlow: function() { - chrome.send('easyUnlockStartTurnOffFlow'); - }, - - /** @override */ - cancelTurnOffFlow: function() { - chrome.send('easyUnlockCancelTurnOffFlow'); - }, - }; - return { EasyUnlockBrowserProxy: EasyUnlockBrowserProxy, EasyUnlockBrowserProxyImpl: EasyUnlockBrowserProxyImpl,
diff --git a/chrome/browser/resources/settings/people_page/fingerprint_browser_proxy.js b/chrome/browser/resources/settings/people_page/fingerprint_browser_proxy.js index 09e2f8c0..71941a3a 100644 --- a/chrome/browser/resources/settings/people_page/fingerprint_browser_proxy.js +++ b/chrome/browser/resources/settings/people_page/fingerprint_browser_proxy.js
@@ -52,112 +52,106 @@ cr.define('settings', function() { /** @interface */ - function FingerprintBrowserProxy() {} - - FingerprintBrowserProxy.prototype = { + class FingerprintBrowserProxy { /** * @return {!Promise<!settings.FingerprintInfo>} */ - getFingerprintsList: function() {}, + getFingerprintsList() {} /** * @return {!Promise<number>} */ - getNumFingerprints: function() {}, + getNumFingerprints() {} - startEnroll: function() {}, - - cancelCurrentEnroll: function() {}, + startEnroll() {} + cancelCurrentEnroll() {} /** * @param {number} index * @return {!Promise<string>} */ - getEnrollmentLabel: function(index) {}, + getEnrollmentLabel(index) {} /** * @param {number} index * @return {!Promise<boolean>} */ - removeEnrollment: function(index) {}, + removeEnrollment(index) {} /** * @param {number} index * @param {string} newLabel * @return {!Promise<boolean>} */ - changeEnrollmentLabel: function(index, newLabel) {}, + changeEnrollmentLabel(index, newLabel) {} - startAuthentication: function() {}, - - endCurrentAuthentication: function() {}, + startAuthentication() {} + endCurrentAuthentication() {} /** * TODO(sammiequon): Temporary function to let the handler know when a * completed scan has been sent via click on the setup fingerprint dialog. * Remove this when real scans are implemented. */ - fakeScanComplete: function() {}, - }; + fakeScanComplete() {} + } /** - * @constructor * @implements {settings.FingerprintBrowserProxy} */ - function FingerprintBrowserProxyImpl() {} - cr.addSingletonGetter(FingerprintBrowserProxyImpl); - - FingerprintBrowserProxyImpl.prototype = { + class FingerprintBrowserProxyImpl { /** @override */ - getFingerprintsList: function() { + getFingerprintsList() { return cr.sendWithPromise('getFingerprintsList'); - }, + } /** @override */ - getNumFingerprints: function() { + getNumFingerprints() { return cr.sendWithPromise('getNumFingerprints'); - }, + } /** @override */ - startEnroll: function() { + startEnroll() { chrome.send('startEnroll'); - }, + } /** @override */ - cancelCurrentEnroll: function() { + cancelCurrentEnroll() { chrome.send('cancelCurrentEnroll'); - }, + } /** @override */ - getEnrollmentLabel: function(index) { + getEnrollmentLabel(index) { return cr.sendWithPromise('getEnrollmentLabel'); - }, + } /** @override */ - removeEnrollment: function(index) { + removeEnrollment(index) { return cr.sendWithPromise('removeEnrollment', index); - }, + } /** @override */ - changeEnrollmentLabel: function(index, newLabel) { + changeEnrollmentLabel(index, newLabel) { return cr.sendWithPromise('changeEnrollmentLabel', index, newLabel); - }, + } /** @override */ - startAuthentication: function() { + startAuthentication() { chrome.send('startAuthentication'); - }, + } /** @override */ - endCurrentAuthentication: function() { + endCurrentAuthentication() { chrome.send('endCurrentAuthentication'); - }, + } /** @override */ - fakeScanComplete: function() { + fakeScanComplete() { chrome.send('fakeScanComplete'); - }, - }; + } + } + + cr.addSingletonGetter(FingerprintBrowserProxyImpl); return { FingerprintBrowserProxy: FingerprintBrowserProxy,
diff --git a/chrome/browser/resources/settings/people_page/import_data_browser_proxy.js b/chrome/browser/resources/settings/people_page/import_data_browser_proxy.js index 24c108ec..5458bab 100644 --- a/chrome/browser/resources/settings/people_page/import_data_browser_proxy.js +++ b/chrome/browser/resources/settings/people_page/import_data_browser_proxy.js
@@ -36,54 +36,50 @@ cr.define('settings', function() { /** @interface */ - function ImportDataBrowserProxy() {} - - ImportDataBrowserProxy.prototype = { + class ImportDataBrowserProxy { /** * Returns the source profiles available for importing from other browsers. * @return {!Promise<!Array<!settings.BrowserProfile>>} */ - initializeImportDialog: function() {}, + initializeImportDialog() {} /** * Starts importing data for the specificed source browser profile. The C++ * responds with the 'import-data-status-changed' WebUIListener event. * @param {number} sourceBrowserProfileIndex */ - importData: function(sourceBrowserProfileIndex) {}, + importData(sourceBrowserProfileIndex) {} /** * Prompts the user to choose a bookmarks file to import bookmarks from. */ - importFromBookmarksFile: function() {}, - }; + importFromBookmarksFile() {} + } /** - * @constructor * @implements {settings.ImportDataBrowserProxy} */ - function ImportDataBrowserProxyImpl() {} + class ImportDataBrowserProxyImpl { + /** @override */ + initializeImportDialog() { + return cr.sendWithPromise('initializeImportDialog'); + } + + /** @override */ + importData(sourceBrowserProfileIndex) { + chrome.send('importData', [sourceBrowserProfileIndex]); + } + + /** @override */ + importFromBookmarksFile() { + chrome.send('importFromBookmarksFile'); + } + } + // The singleton instance_ is replaced with a test version of this wrapper // during testing. cr.addSingletonGetter(ImportDataBrowserProxyImpl); - ImportDataBrowserProxyImpl.prototype = { - /** @override */ - initializeImportDialog: function() { - return cr.sendWithPromise('initializeImportDialog'); - }, - - /** @override */ - importData: function(sourceBrowserProfileIndex) { - chrome.send('importData', [sourceBrowserProfileIndex]); - }, - - /** @override */ - importFromBookmarksFile: function() { - chrome.send('importFromBookmarksFile'); - }, - }; - return { ImportDataBrowserProxy: ImportDataBrowserProxy, ImportDataBrowserProxyImpl: ImportDataBrowserProxyImpl,
diff --git a/chrome/browser/resources/settings/people_page/manage_profile_browser_proxy.js b/chrome/browser/resources/settings/people_page/manage_profile_browser_proxy.js index 34e2d341..85a7259 100644 --- a/chrome/browser/resources/settings/people_page/manage_profile_browser_proxy.js +++ b/chrome/browser/resources/settings/people_page/manage_profile_browser_proxy.js
@@ -20,95 +20,91 @@ cr.define('settings', function() { /** @interface */ - function ManageProfileBrowserProxy() {} - - ManageProfileBrowserProxy.prototype = { + class ManageProfileBrowserProxy { /** * Gets the available profile icons to choose from. * @return {!Promise<!Array<!AvatarIcon>>} */ - getAvailableIcons: function() {}, + getAvailableIcons() {} /** * Sets the profile's icon to the GAIA avatar. */ - setProfileIconToGaiaAvatar: function() {}, + setProfileIconToGaiaAvatar() {} /** * Sets the profile's icon to one of the default avatars. * @param {string} iconUrl The new profile URL. */ - setProfileIconToDefaultAvatar: function(iconUrl) {}, + setProfileIconToDefaultAvatar(iconUrl) {} /** * Sets the profile's name. * @param {string} name The new profile name. */ - setProfileName: function(name) {}, + setProfileName(name) {} /** * Returns whether the current profile has a shortcut. * @return {!Promise<ProfileShortcutStatus>} */ - getProfileShortcutStatus: function() {}, + getProfileShortcutStatus() {} /** * Adds a shortcut for the current profile. */ - addProfileShortcut: function() {}, + addProfileShortcut() {} /** * Removes the shortcut of the current profile. */ - removeProfileShortcut: function() {}, - }; + removeProfileShortcut() {} + } /** - * @constructor * @implements {settings.ManageProfileBrowserProxy} */ - function ManageProfileBrowserProxyImpl() {} + class ManageProfileBrowserProxyImpl { + /** @override */ + getAvailableIcons() { + return cr.sendWithPromise('getAvailableIcons'); + } + + /** @override */ + setProfileIconToGaiaAvatar() { + chrome.send('setProfileIconToGaiaAvatar'); + } + + /** @override */ + setProfileIconToDefaultAvatar(iconUrl) { + chrome.send('setProfileIconToDefaultAvatar', [iconUrl]); + } + + /** @override */ + setProfileName(name) { + chrome.send('setProfileName', [name]); + } + + /** @override */ + getProfileShortcutStatus() { + return cr.sendWithPromise('requestProfileShortcutStatus'); + } + + /** @override */ + addProfileShortcut() { + chrome.send('addProfileShortcut'); + } + + /** @override */ + removeProfileShortcut() { + chrome.send('removeProfileShortcut'); + } + } + // The singleton instance_ is replaced with a test version of this wrapper // during testing. cr.addSingletonGetter(ManageProfileBrowserProxyImpl); - ManageProfileBrowserProxyImpl.prototype = { - /** @override */ - getAvailableIcons: function() { - return cr.sendWithPromise('getAvailableIcons'); - }, - - /** @override */ - setProfileIconToGaiaAvatar: function() { - chrome.send('setProfileIconToGaiaAvatar'); - }, - - /** @override */ - setProfileIconToDefaultAvatar: function(iconUrl) { - chrome.send('setProfileIconToDefaultAvatar', [iconUrl]); - }, - - /** @override */ - setProfileName: function(name) { - chrome.send('setProfileName', [name]); - }, - - /** @override */ - getProfileShortcutStatus: function() { - return cr.sendWithPromise('requestProfileShortcutStatus'); - }, - - /** @override */ - addProfileShortcut: function() { - chrome.send('addProfileShortcut'); - }, - - /** @override */ - removeProfileShortcut: function() { - chrome.send('removeProfileShortcut'); - }, - }; - return { ManageProfileBrowserProxy: ManageProfileBrowserProxy, ManageProfileBrowserProxyImpl: ManageProfileBrowserProxyImpl,
diff --git a/chrome/browser/resources/settings/people_page/profile_info_browser_proxy.js b/chrome/browser/resources/settings/people_page/profile_info_browser_proxy.js index 81eb71a..31f4824 100644 --- a/chrome/browser/resources/settings/people_page/profile_info_browser_proxy.js +++ b/chrome/browser/resources/settings/people_page/profile_info_browser_proxy.js
@@ -20,51 +20,47 @@ cr.define('settings', function() { /** @interface */ - function ProfileInfoBrowserProxy() {} - - ProfileInfoBrowserProxy.prototype = { + class ProfileInfoBrowserProxy { /** * Returns a Promise for the profile info. * @return {!Promise<!settings.ProfileInfo>} */ - getProfileInfo: function() {}, + getProfileInfo() {} /** * Requests the profile stats count. The result is returned by the * 'profile-stats-count-ready' WebUI listener event. */ - getProfileStatsCount: function() {}, + getProfileStatsCount() {} /** * Returns a Promise that's true if the profile manages supervised users. * @return {!Promise<boolean>} */ - getProfileManagesSupervisedUsers: function() {}, - }; + getProfileManagesSupervisedUsers() {} + } /** - * @constructor * @implements {ProfileInfoBrowserProxy} */ - function ProfileInfoBrowserProxyImpl() {} - cr.addSingletonGetter(ProfileInfoBrowserProxyImpl); - - ProfileInfoBrowserProxyImpl.prototype = { + class ProfileInfoBrowserProxyImpl { /** @override */ - getProfileInfo: function() { + getProfileInfo() { return cr.sendWithPromise('getProfileInfo'); - }, + } /** @override */ - getProfileStatsCount: function() { + getProfileStatsCount() { chrome.send('getProfileStatsCount'); - }, + } /** @override */ - getProfileManagesSupervisedUsers: function() { + getProfileManagesSupervisedUsers() { return cr.sendWithPromise('getProfileManagesSupervisedUsers'); - }, - }; + } + } + + cr.addSingletonGetter(ProfileInfoBrowserProxyImpl); return { ProfileInfoBrowserProxyImpl: ProfileInfoBrowserProxyImpl,
diff --git a/chrome/browser/resources/settings/people_page/sync_browser_proxy.js b/chrome/browser/resources/settings/people_page/sync_browser_proxy.js index 648d22f..05f345f3 100644 --- a/chrome/browser/resources/settings/people_page/sync_browser_proxy.js +++ b/chrome/browser/resources/settings/people_page/sync_browser_proxy.js
@@ -105,138 +105,138 @@ cr.define('settings', function() { /** @interface */ - function SyncBrowserProxy() {} - - SyncBrowserProxy.prototype = { + class SyncBrowserProxy { // <if expr="not chromeos"> /** * Starts the signin process for the user. Does nothing if the user is * already signed in. */ - startSignIn: function() {}, + startSignIn() {} /** * Signs out the signed-in user. * @param {boolean} deleteProfile */ - signOut: function(deleteProfile) {}, + signOut(deleteProfile) {} /** * Opens the multi-profile user manager. */ - manageOtherPeople: function() {}, + manageOtherPeople() {} + // </if> // <if expr="chromeos"> /** * Signs the user out. */ - attemptUserExit: function() {}, + attemptUserExit() {} + // </if> /** * Gets the current sync status. * @return {!Promise<!settings.SyncStatus>} */ - getSyncStatus: function() {}, + getSyncStatus() {} /** * Function to invoke when the sync page has been navigated to. This * registers the UI as the "active" sync UI so that if the user tries to * open another sync UI, this one will be shown instead. */ - didNavigateToSyncPage: function() {}, + didNavigateToSyncPage() {} /** * Function to invoke when leaving the sync page so that the C++ layer can * be notified that the sync UI is no longer open. */ - didNavigateAwayFromSyncPage: function() {}, + didNavigateAwayFromSyncPage() {} /** * Sets which types of data to sync. * @param {!settings.SyncPrefs} syncPrefs * @return {!Promise<!settings.PageStatus>} */ - setSyncDatatypes: function(syncPrefs) {}, + setSyncDatatypes(syncPrefs) {} /** * Sets the sync encryption options. * @param {!settings.SyncPrefs} syncPrefs * @return {!Promise<!settings.PageStatus>} */ - setSyncEncryption: function(syncPrefs) {}, + setSyncEncryption(syncPrefs) {} /** * Opens the Google Activity Controls url in a new tab. */ - openActivityControlsUrl: function() {}, - }; + openActivityControlsUrl() {} + } /** - * @constructor * @implements {settings.SyncBrowserProxy} */ - function SyncBrowserProxyImpl() {} - cr.addSingletonGetter(SyncBrowserProxyImpl); - - SyncBrowserProxyImpl.prototype = { + class SyncBrowserProxyImpl { // <if expr="not chromeos"> /** @override */ - startSignIn: function() { + startSignIn() { chrome.send('SyncSetupStartSignIn'); - }, + } /** @override */ - signOut: function(deleteProfile) { + signOut(deleteProfile) { chrome.send('SyncSetupStopSyncing', [deleteProfile]); - }, + } /** @override */ - manageOtherPeople: function() { + manageOtherPeople() { chrome.send('SyncSetupManageOtherPeople'); - }, + } + // </if> // <if expr="chromeos"> /** @override */ - attemptUserExit: function() { + attemptUserExit() { return chrome.send('AttemptUserExit'); - }, + } + // </if> /** @override */ - getSyncStatus: function() { + getSyncStatus() { return cr.sendWithPromise('SyncSetupGetSyncStatus'); - }, + } /** @override */ - didNavigateToSyncPage: function() { + didNavigateToSyncPage() { chrome.send('SyncSetupShowSetupUI'); - }, + } /** @override */ - didNavigateAwayFromSyncPage: function() { + didNavigateAwayFromSyncPage() { chrome.send('SyncSetupDidClosePage'); - }, + } /** @override */ - setSyncDatatypes: function(syncPrefs) { + setSyncDatatypes(syncPrefs) { return cr.sendWithPromise( 'SyncSetupSetDatatypes', JSON.stringify(syncPrefs)); - }, + } /** @override */ - setSyncEncryption: function(syncPrefs) { + setSyncEncryption(syncPrefs) { return cr.sendWithPromise( 'SyncSetupSetEncryption', JSON.stringify(syncPrefs)); - }, + } /** @override */ - openActivityControlsUrl: function() { + openActivityControlsUrl() { chrome.metricsPrivate.recordUserAction( 'Signin_AccountSettings_GoogleActivityControlsClicked'); } - }; + } + + cr.addSingletonGetter(SyncBrowserProxyImpl); return { SyncBrowserProxy: SyncBrowserProxy,
diff --git a/chrome/browser/resources/settings/printing_page/cups_printers_browser_proxy.js b/chrome/browser/resources/settings/printing_page/cups_printers_browser_proxy.js index 3af40d9..2a5eb45 100644 --- a/chrome/browser/resources/settings/printing_page/cups_printers_browser_proxy.js +++ b/chrome/browser/resources/settings/printing_page/cups_printers_browser_proxy.js
@@ -65,117 +65,111 @@ cr.define('settings', function() { /** @interface */ - function CupsPrintersBrowserProxy() {} - - CupsPrintersBrowserProxy.prototype = { - + class CupsPrintersBrowserProxy { /** * @return {!Promise<!CupsPrintersList>} */ - getCupsPrintersList: function() {}, + getCupsPrintersList() {} /** * @param {string} printerId * @param {string} printerName */ - updateCupsPrinter: function(printerId, printerName) {}, + updateCupsPrinter(printerId, printerName) {} /** * @param {string} printerId * @param {string} printerName */ - removeCupsPrinter: function(printerId, printerName) {}, + removeCupsPrinter(printerId, printerName) {} /** * @return {!Promise<string>} The full path of the printer PPD file. */ - getCupsPrinterPPDPath: function() {}, + getCupsPrinterPPDPath() {} /** * @param {!CupsPrinterInfo} newPrinter */ - addCupsPrinter: function(newPrinter) {}, + addCupsPrinter(newPrinter) {} - startDiscoveringPrinters: function() {}, - - stopDiscoveringPrinters: function() {}, + startDiscoveringPrinters() {} + stopDiscoveringPrinters() {} /** * @return {!Promise<!ManufacturersInfo>} */ - getCupsPrinterManufacturersList: function() {}, + getCupsPrinterManufacturersList() {} /** * @param {string} manufacturer * @return {!Promise<!ModelsInfo>} */ - getCupsPrinterModelsList: function(manufacturer) {}, + getCupsPrinterModelsList(manufacturer) {} /** * @param {!CupsPrinterInfo} newPrinter * @return {!Promise<!PrinterMakeModel>} */ - getPrinterInfo: function(newPrinter) {}, - }; + getPrinterInfo(newPrinter) {} + } /** - * @constructor * @implements {settings.CupsPrintersBrowserProxy} */ - function CupsPrintersBrowserProxyImpl() {} - cr.addSingletonGetter(CupsPrintersBrowserProxyImpl); - - CupsPrintersBrowserProxyImpl.prototype = { + class CupsPrintersBrowserProxyImpl { /** @override */ - getCupsPrintersList: function() { + getCupsPrintersList() { return cr.sendWithPromise('getCupsPrintersList'); - }, + } /** @override */ - updateCupsPrinter: function(printerId, printerName) { + updateCupsPrinter(printerId, printerName) { chrome.send('updateCupsPrinter', [printerId, printerName]); - }, + } /** @override */ - removeCupsPrinter: function(printerId, printerName) { + removeCupsPrinter(printerId, printerName) { chrome.send('removeCupsPrinter', [printerId, printerName]); - }, + } /** @override */ - addCupsPrinter: function(newPrinter) { + addCupsPrinter(newPrinter) { chrome.send('addCupsPrinter', [newPrinter]); - }, + } /** @override */ - getCupsPrinterPPDPath: function() { + getCupsPrinterPPDPath() { return cr.sendWithPromise('selectPPDFile'); - }, + } /** @override */ - startDiscoveringPrinters: function() { + startDiscoveringPrinters() { chrome.send('startDiscoveringPrinters'); - }, + } /** @override */ - stopDiscoveringPrinters: function() { + stopDiscoveringPrinters() { chrome.send('stopDiscoveringPrinters'); - }, + } /** @override */ - getCupsPrinterManufacturersList: function() { + getCupsPrinterManufacturersList() { return cr.sendWithPromise('getCupsPrinterManufacturersList'); - }, + } /** @override */ - getCupsPrinterModelsList: function(manufacturer) { + getCupsPrinterModelsList(manufacturer) { return cr.sendWithPromise('getCupsPrinterModelsList', manufacturer); - }, + } /** @override */ - getPrinterInfo: function(newPrinter) { + getPrinterInfo(newPrinter) { return cr.sendWithPromise('getPrinterInfo', newPrinter); - }, - }; + } + } + + cr.addSingletonGetter(CupsPrintersBrowserProxyImpl); return { CupsPrintersBrowserProxy: CupsPrintersBrowserProxy,
diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page_browser_proxy.js b/chrome/browser/resources/settings/privacy_page/privacy_page_browser_proxy.js index 38f544d..9d384a2 100644 --- a/chrome/browser/resources/settings/privacy_page/privacy_page_browser_proxy.js +++ b/chrome/browser/resources/settings/privacy_page/privacy_page_browser_proxy.js
@@ -9,66 +9,65 @@ cr.define('settings', function() { /** @interface */ - function PrivacyPageBrowserProxy() {} - - PrivacyPageBrowserProxy.prototype = { + class PrivacyPageBrowserProxy { // <if expr="_google_chrome and not chromeos"> /** @return {!Promise<!MetricsReporting>} */ - getMetricsReporting: assertNotReached, + getMetricsReporting() {} /** @param {boolean} enabled */ - setMetricsReportingEnabled: assertNotReached, + setMetricsReportingEnabled(enabled) {} + // </if> // <if expr="is_win or is_macosx"> /** Invokes the native certificate manager (used by win and mac). */ - showManageSSLCertificates: function() {}, + showManageSSLCertificates() {} + // </if> /** @return {!Promise<boolean>} */ - getSafeBrowsingExtendedReporting: assertNotReached, + getSafeBrowsingExtendedReporting() {} /** @param {boolean} enabled */ - setSafeBrowsingExtendedReportingEnabled: assertNotReached, - }; + setSafeBrowsingExtendedReportingEnabled(enabled) {} + } /** - * @constructor * @implements {settings.PrivacyPageBrowserProxy} */ - function PrivacyPageBrowserProxyImpl() {} - cr.addSingletonGetter(PrivacyPageBrowserProxyImpl); - - PrivacyPageBrowserProxyImpl.prototype = { + class PrivacyPageBrowserProxyImpl { // <if expr="_google_chrome and not chromeos"> /** @override */ - getMetricsReporting: function() { + getMetricsReporting() { return cr.sendWithPromise('getMetricsReporting'); - }, + } /** @override */ - setMetricsReportingEnabled: function(enabled) { + setMetricsReportingEnabled(enabled) { chrome.send('setMetricsReportingEnabled', [enabled]); - }, + } + // </if> /** @override */ - getSafeBrowsingExtendedReporting: function() { + getSafeBrowsingExtendedReporting() { return cr.sendWithPromise('getSafeBrowsingExtendedReporting'); - }, + } /** @override */ - setSafeBrowsingExtendedReportingEnabled: function(enabled) { + setSafeBrowsingExtendedReportingEnabled(enabled) { chrome.send('setSafeBrowsingExtendedReportingEnabled', [enabled]); - }, + } // <if expr="is_win or is_macosx"> /** @override */ - showManageSSLCertificates: function() { + showManageSSLCertificates() { chrome.send('showManageSSLCertificates'); - }, + } // </if> - }; + } + + cr.addSingletonGetter(PrivacyPageBrowserProxyImpl); return { PrivacyPageBrowserProxy: PrivacyPageBrowserProxy,
diff --git a/chrome/browser/resources/settings/reset_page/reset_browser_proxy.js b/chrome/browser/resources/settings/reset_page/reset_browser_proxy.js index ef80889..f43c9a0 100644 --- a/chrome/browser/resources/settings/reset_page/reset_browser_proxy.js +++ b/chrome/browser/resources/settings/reset_page/reset_browser_proxy.js
@@ -4,89 +4,83 @@ cr.define('settings', function() { /** @interface */ - function ResetBrowserProxy() {} - - ResetBrowserProxy.prototype = { + class ResetBrowserProxy { /** * @param {boolean} sendSettings Whether the user gave consent to upload * broken settings to Google for analysis. * @param {string} requestOrigin The origin of the reset request. * @return {!Promise} A promise firing once resetting has completed. */ - performResetProfileSettings: function(sendSettings, requestOrigin) {}, + performResetProfileSettings(sendSettings, requestOrigin) {} /** * A method to be called when the reset profile dialog is hidden. */ - onHideResetProfileDialog: function() {}, + onHideResetProfileDialog() {} /** * A method to be called when the reset profile banner is hidden. */ - onHideResetProfileBanner: function() {}, + onHideResetProfileBanner() {} /** * A method to be called when the reset profile dialog is shown. */ - onShowResetProfileDialog: function() {}, + onShowResetProfileDialog() {} /** * Shows the settings that are about to be reset and which will be reported * to Google for analysis, in a new tab. */ - showReportedSettings: function() {}, + showReportedSettings() {} /** * Retrieves the triggered reset tool name. * @return {!Promise<string>} A promise firing with the tool name, once it * has been retrieved. */ - getTriggeredResetToolName: function() {}, + getTriggeredResetToolName() {} // <if expr="chromeos"> /** * A method to be called when the reset powerwash dialog is shown. */ - onPowerwashDialogShow: function() {}, + onPowerwashDialogShow() {} /** * Initiates a factory reset and restarts ChromeOS. */ - requestFactoryResetRestart: function() {}, + requestFactoryResetRestart() {} // </if> - }; + } /** - * @constructor * @implements {settings.ResetBrowserProxy} */ - function ResetBrowserProxyImpl() {} - cr.addSingletonGetter(ResetBrowserProxyImpl); - - ResetBrowserProxyImpl.prototype = { + class ResetBrowserProxyImpl { /** @override */ - performResetProfileSettings: function(sendSettings, requestOrigin) { + performResetProfileSettings(sendSettings, requestOrigin) { return cr.sendWithPromise( 'performResetProfileSettings', sendSettings, requestOrigin); - }, + } /** @override */ - onHideResetProfileDialog: function() { + onHideResetProfileDialog() { chrome.send('onHideResetProfileDialog'); - }, + } /** @override */ - onHideResetProfileBanner: function() { + onHideResetProfileBanner() { chrome.send('onHideResetProfileBanner'); - }, + } /** @override */ - onShowResetProfileDialog: function() { + onShowResetProfileDialog() { chrome.send('onShowResetProfileDialog'); - }, + } /** @override */ - showReportedSettings: function() { + showReportedSettings() { cr.sendWithPromise('getReportedSettings').then(function(settings) { var output = settings.map(function(entry) { return entry.key + ': ' + entry.value.replace(/\n/g, ', '); @@ -97,25 +91,27 @@ div.style.whiteSpace = 'pre'; win.document.body.appendChild(div); }); - }, + } /** @override */ - getTriggeredResetToolName: function() { + getTriggeredResetToolName() { return cr.sendWithPromise('getTriggeredResetToolName'); - }, + } // <if expr="chromeos"> /** @override */ - onPowerwashDialogShow: function() { + onPowerwashDialogShow() { chrome.send('onPowerwashDialogShow'); - }, + } /** @override */ - requestFactoryResetRestart: function() { + requestFactoryResetRestart() { chrome.send('requestFactoryResetRestart'); - }, + } // </if> - }; + } + + cr.addSingletonGetter(ResetBrowserProxyImpl); return { ResetBrowserProxyImpl: ResetBrowserProxyImpl,
diff --git a/chrome/browser/resources/settings/search_engines_page/search_engines_browser_proxy.js b/chrome/browser/resources/settings/search_engines_page/search_engines_browser_proxy.js index 5423903..76642485 100644 --- a/chrome/browser/resources/settings/search_engines_page/search_engines_browser_proxy.js +++ b/chrome/browser/resources/settings/search_engines_page/search_engines_browser_proxy.js
@@ -51,112 +51,108 @@ cr.define('settings', function() { /** @interface */ - function SearchEnginesBrowserProxy() {} - - SearchEnginesBrowserProxy.prototype = { + class SearchEnginesBrowserProxy { /** @param {number} modelIndex */ - setDefaultSearchEngine: function(modelIndex) {}, + setDefaultSearchEngine(modelIndex) {} /** @param {number} modelIndex */ - removeSearchEngine: function(modelIndex) {}, + removeSearchEngine(modelIndex) {} /** @param {number} modelIndex */ - searchEngineEditStarted: function(modelIndex) {}, + searchEngineEditStarted(modelIndex) {} - searchEngineEditCancelled: function() {}, + searchEngineEditCancelled() {} /** * @param {string} searchEngine * @param {string} keyword * @param {string} queryUrl */ - searchEngineEditCompleted: function(searchEngine, keyword, queryUrl) {}, + searchEngineEditCompleted(searchEngine, keyword, queryUrl) {} /** @return {!Promise<!SearchEnginesInfo>} */ - getSearchEnginesList: function() {}, + getSearchEnginesList() {} /** * @param {string} fieldName * @param {string} fieldValue * @return {!Promise<boolean>} */ - validateSearchEngineInput: function(fieldName, fieldValue) {}, + validateSearchEngineInput(fieldName, fieldValue) {} /** @return {!Promise<!SearchPageHotwordInfo>} */ - getHotwordInfo: function() {}, + getHotwordInfo() {} /** @param {boolean} enabled */ - setHotwordSearchEnabled: function(enabled) {}, + setHotwordSearchEnabled(enabled) {} /** @return {!Promise<boolean>} */ - getGoogleNowAvailability: function() {}, - }; + getGoogleNowAvailability() {} + } /** - * @constructor * @implements {settings.SearchEnginesBrowserProxy} */ - function SearchEnginesBrowserProxyImpl() {} - // The singleton instance_ is replaced with a test version of this wrapper - // during testing. - cr.addSingletonGetter(SearchEnginesBrowserProxyImpl); - - SearchEnginesBrowserProxyImpl.prototype = { + class SearchEnginesBrowserProxyImpl { /** @override */ - setDefaultSearchEngine: function(modelIndex) { + setDefaultSearchEngine(modelIndex) { chrome.send('setDefaultSearchEngine', [modelIndex]); - }, + } /** @override */ - removeSearchEngine: function(modelIndex) { + removeSearchEngine(modelIndex) { chrome.send('removeSearchEngine', [modelIndex]); - }, + } /** @override */ - searchEngineEditStarted: function(modelIndex) { + searchEngineEditStarted(modelIndex) { chrome.send('searchEngineEditStarted', [modelIndex]); - }, + } /** @override */ - searchEngineEditCancelled: function() { + searchEngineEditCancelled() { chrome.send('searchEngineEditCancelled'); - }, + } /** @override */ - searchEngineEditCompleted: function(searchEngine, keyword, queryUrl) { + searchEngineEditCompleted(searchEngine, keyword, queryUrl) { chrome.send('searchEngineEditCompleted', [ searchEngine, keyword, queryUrl, ]); - }, + } /** @override */ - getSearchEnginesList: function() { + getSearchEnginesList() { return cr.sendWithPromise('getSearchEnginesList'); - }, + } /** @override */ - validateSearchEngineInput: function(fieldName, fieldValue) { + validateSearchEngineInput(fieldName, fieldValue) { return cr.sendWithPromise( 'validateSearchEngineInput', fieldName, fieldValue); - }, + } /** @override */ - getHotwordInfo: function() { + getHotwordInfo() { return cr.sendWithPromise('getHotwordInfo'); - }, + } /** @override */ - setHotwordSearchEnabled: function(enabled) { + setHotwordSearchEnabled(enabled) { chrome.send('setHotwordSearchEnabled', [enabled]); - }, + } /** @override */ - getGoogleNowAvailability: function() { + getGoogleNowAvailability() { return cr.sendWithPromise('getGoogleNowAvailability'); - }, - }; + } + } + + // The singleton instance_ is replaced with a test version of this wrapper + // during testing. + cr.addSingletonGetter(SearchEnginesBrowserProxyImpl); return { SearchEnginesBrowserProxy: SearchEnginesBrowserProxy,
diff --git a/chrome/browser/resources/settings/settings_shared_css.html b/chrome/browser/resources/settings/settings_shared_css.html index e2b6b6cc..395a62c 100644 --- a/chrome/browser/resources/settings/settings_shared_css.html +++ b/chrome/browser/resources/settings/settings_shared_css.html
@@ -6,6 +6,12 @@ <dom-module id="settings-shared"> <template> <style include="settings-icons cr-shared-style"> + /* Prevent action-links from being selected to avoid accidental + * selection when trying to click it. */ + a[is=action-link] { + -webkit-user-select: none; + } + /* Use <h2> as the "sub-header" mentioned in the UX design docs. */ h2 { align-items: center;
diff --git a/chrome/browser/resources/settings/settings_ui/settings_ui.html b/chrome/browser/resources/settings/settings_ui/settings_ui.html index c1f67ff..d44dea12 100644 --- a/chrome/browser/resources/settings/settings_ui/settings_ui.html +++ b/chrome/browser/resources/settings/settings_ui/settings_ui.html
@@ -89,7 +89,7 @@ show-menu> </cr-toolbar> <dialog id="drawer" is="cr-drawer" on-close="onMenuClosed_" - title="$i18n{settings}"> + heading="$i18n{settings}"> <div class="drawer-content"> <template is="dom-if" id="drawerTemplate"> <settings-menu page-visibility="[[pageVisibility_]]"
diff --git a/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js b/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js index ecbd1c1..e335cdf 100644 --- a/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js +++ b/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js
@@ -98,43 +98,41 @@ cr.define('settings', function() { /** @interface */ - function SiteSettingsPrefsBrowserProxy() {} - - SiteSettingsPrefsBrowserProxy.prototype = { + class SiteSettingsPrefsBrowserProxy { /** * Sets the default value for a site settings category. * @param {string} contentType The name of the category to change. * @param {string} defaultValue The name of the value to set as default. */ - setDefaultValueForContentType: function(contentType, defaultValue) {}, + setDefaultValueForContentType(contentType, defaultValue) {} /** * Gets the cookie details for a particular site. * @param {string} site The name of the site. * @return {!Promise<!CookieList>} */ - getCookieDetails: function(site) {}, + getCookieDetails(site) {} /** * Gets the default value for a site settings category. * @param {string} contentType The name of the category to query. * @return {!Promise<!DefaultContentSetting>} */ - getDefaultValueForContentType: function(contentType) {}, + getDefaultValueForContentType(contentType) {} /** * Gets the exceptions (site list) for a particular category. * @param {string} contentType The name of the category to query. * @return {!Promise<!Array<!RawSiteException>>} */ - getExceptionList: function(contentType) {}, + getExceptionList(contentType) {} /** * Gets the exception details for a particular site. * @param {string} site The name of the site. * @return {!Promise<!RawSiteException>} */ - getSiteDetails: function(site) {}, + getSiteDetails(site) {} /** * Resets the category permission for a given origin (expressed as primary @@ -146,8 +144,8 @@ * @param {boolean} incognito Whether this applies only to a current * incognito session exception. */ - resetCategoryPermissionForOrigin: function( - primaryPattern, secondaryPattern, contentType, incognito) {}, + resetCategoryPermissionForOrigin( + primaryPattern, secondaryPattern, contentType, incognito) {} /** * Sets the category permission for a given origin (expressed as primary @@ -160,36 +158,36 @@ * @param {boolean} incognito Whether this rule applies only to the current * incognito session. */ - setCategoryPermissionForOrigin: function( - primaryPattern, secondaryPattern, contentType, value, incognito) {}, + setCategoryPermissionForOrigin( + primaryPattern, secondaryPattern, contentType, value, incognito) {} /** * Checks whether a pattern is valid. * @param {string} pattern The pattern to check * @return {!Promise<boolean>} True if the pattern is valid. */ - isPatternValid: function(pattern) {}, + isPatternValid(pattern) {} /** * Gets the list of default capture devices for a given type of media. List * is returned through a JS call to updateDevicesMenu. * @param {string} type The type to look up. */ - getDefaultCaptureDevices: function(type) {}, + getDefaultCaptureDevices(type) {} /** * Sets a default devices for a given type of media. * @param {string} type The type of media to configure. * @param {string} defaultValue The id of the media device to set. */ - setDefaultCaptureDevice: function(type, defaultValue) {}, + setDefaultCaptureDevice(type, defaultValue) {} /** * Reloads all cookies. * @return {!Promise<!CookieList>} Returns the full cookie * list. */ - reloadCookies: function() {}, + reloadCookies() {} /** * Fetches all children of a given cookie. @@ -197,20 +195,20 @@ * @return {!Promise<!Array<!CookieDataSummaryItem>>} Returns a cookie list * for the given path. */ - loadCookieChildren: function(path) {}, + loadCookieChildren(path) {} /** * Removes a given cookie. * @param {string} path The path to the parent cookie. */ - removeCookie: function(path) {}, + removeCookie(path) {} /** * Removes all cookies. * @return {!Promise<!CookieList>} Returns the up to date * cookie list once deletion is complete (empty list). */ - removeAllCookies: function() {}, + removeAllCookies() {} /** * observes _all_ of the the protocol handler state, which includes a list @@ -218,7 +216,7 @@ * other state sent with the messages 'setIgnoredProtocolHandler' and * 'setHandlersEnabled'. */ - observeProtocolHandlers: function() {}, + observeProtocolHandlers() {} /** * Observes one aspect of the protocol handler so that updates to the @@ -229,34 +227,34 @@ * If |observeProtocolHandlers| is called, there's no need to call this * observe as well. */ - observeProtocolHandlersEnabledState: function() {}, + observeProtocolHandlersEnabledState() {} /** * Enables or disables the ability for sites to ask to become the default * protocol handlers. * @param {boolean} enabled Whether sites can ask to become default. */ - setProtocolHandlerDefault: function(enabled) {}, + setProtocolHandlerDefault(enabled) {} /** * Sets a certain url as default for a given protocol handler. * @param {string} protocol The protocol to set a default for. * @param {string} url The url to use as the default. */ - setProtocolDefault: function(protocol, url) {}, + setProtocolDefault(protocol, url) {} /** * Deletes a certain protocol handler by url. * @param {string} protocol The protocol to delete the url from. * @param {string} url The url to delete. */ - removeProtocolHandler: function(protocol, url) {}, + removeProtocolHandler(protocol, url) {} /** * Fetches a list of all USB devices and the sites permitted to use them. * @return {!Promise<!Array<!UsbDeviceEntry>>} The list of USB devices. */ - fetchUsbDevices: function() {}, + fetchUsbDevices() {} /** * Removes a particular USB device object permission by origin and embedding @@ -266,73 +264,66 @@ * @param {!UsbDeviceDetails} usbDevice The USB device to revoke permission * for. */ - removeUsbDevice: function(origin, embeddingOrigin, usbDevice) {}, + removeUsbDevice(origin, embeddingOrigin, usbDevice) {} /** * Fetches the incognito status of the current profile (whether an icognito * profile exists). Returns the results via onIncognitoStatusChanged. */ - updateIncognitoStatus: function() {}, + updateIncognitoStatus() {} /** * Fetches the currently defined zoom levels for sites. Returns the results * via onZoomLevelsChanged. */ - fetchZoomLevels: function() {}, + fetchZoomLevels() {} /** * Removes a zoom levels for a given host. * @param {string} host The host to remove zoom levels for. */ - removeZoomLevel: function(host) {}, - }; + removeZoomLevel(host) {} + } /** - * @constructor * @implements {settings.SiteSettingsPrefsBrowserProxy} */ - function SiteSettingsPrefsBrowserProxyImpl() {} - - // The singleton instance_ is replaced with a test version of this wrapper - // during testing. - cr.addSingletonGetter(SiteSettingsPrefsBrowserProxyImpl); - - SiteSettingsPrefsBrowserProxyImpl.prototype = { + class SiteSettingsPrefsBrowserProxyImpl { /** @override */ - setDefaultValueForContentType: function(contentType, defaultValue) { + setDefaultValueForContentType(contentType, defaultValue) { chrome.send('setDefaultValueForContentType', [contentType, defaultValue]); - }, + } /** @override */ - getCookieDetails: function(site) { + getCookieDetails(site) { return cr.sendWithPromise('getCookieDetails', site); - }, + } /** @override */ - getDefaultValueForContentType: function(contentType) { + getDefaultValueForContentType(contentType) { return cr.sendWithPromise('getDefaultValueForContentType', contentType); - }, + } /** @override */ - getExceptionList: function(contentType) { + getExceptionList(contentType) { return cr.sendWithPromise('getExceptionList', contentType); - }, + } /** @override */ - getSiteDetails: function(site) { + getSiteDetails(site) { return cr.sendWithPromise('getSiteDetails', site); - }, + } /** @override */ - resetCategoryPermissionForOrigin: function( + resetCategoryPermissionForOrigin( primaryPattern, secondaryPattern, contentType, incognito) { chrome.send( 'resetCategoryPermissionForOrigin', [primaryPattern, secondaryPattern, contentType, incognito]); - }, + } /** @override */ - setCategoryPermissionForOrigin: function( + setCategoryPermissionForOrigin( primaryPattern, secondaryPattern, contentType, value, incognito) { // TODO(dschuyler): It may be incorrect for JS to send the embeddingOrigin // pattern. Look into removing this parameter from site_settings_handler. @@ -340,93 +331,97 @@ chrome.send( 'setCategoryPermissionForOrigin', [primaryPattern, '', contentType, value, incognito]); - }, + } /** @override */ - isPatternValid: function(pattern) { + isPatternValid(pattern) { return cr.sendWithPromise('isPatternValid', pattern); - }, + } /** @override */ - getDefaultCaptureDevices: function(type) { + getDefaultCaptureDevices(type) { chrome.send('getDefaultCaptureDevices', [type]); - }, + } /** @override */ - setDefaultCaptureDevice: function(type, defaultValue) { + setDefaultCaptureDevice(type, defaultValue) { chrome.send('setDefaultCaptureDevice', [type, defaultValue]); - }, + } /** @override */ - reloadCookies: function() { + reloadCookies() { return cr.sendWithPromise('reloadCookies'); - }, + } /** @override */ - loadCookieChildren: function(path) { + loadCookieChildren(path) { return cr.sendWithPromise('loadCookie', path); - }, + } /** @override */ - removeCookie: function(path) { + removeCookie(path) { chrome.send('removeCookie', [path]); - }, + } /** @override */ - removeAllCookies: function() { + removeAllCookies() { return cr.sendWithPromise('removeAllCookies'); - }, + } /** @override */ - observeProtocolHandlers: function() { + observeProtocolHandlers() { chrome.send('observeProtocolHandlers'); - }, + } /** @override */ - observeProtocolHandlersEnabledState: function() { + observeProtocolHandlersEnabledState() { chrome.send('observeProtocolHandlersEnabledState'); - }, + } /** @override */ - setProtocolHandlerDefault: function(enabled) { + setProtocolHandlerDefault(enabled) { chrome.send('setHandlersEnabled', [enabled]); - }, + } /** @override */ - setProtocolDefault: function(protocol, url) { + setProtocolDefault(protocol, url) { chrome.send('setDefault', [[protocol, url]]); - }, + } /** @override */ - removeProtocolHandler: function(protocol, url) { + removeProtocolHandler(protocol, url) { chrome.send('removeHandler', [[protocol, url]]); - }, + } /** @override */ - fetchUsbDevices: function() { + fetchUsbDevices() { return cr.sendWithPromise('fetchUsbDevices'); - }, + } /** @override */ - removeUsbDevice: function(origin, embeddingOrigin, usbDevice) { + removeUsbDevice(origin, embeddingOrigin, usbDevice) { chrome.send('removeUsbDevice', [origin, embeddingOrigin, usbDevice]); - }, + } /** @override */ - updateIncognitoStatus: function() { + updateIncognitoStatus() { chrome.send('updateIncognitoStatus'); - }, + } /** @override */ - fetchZoomLevels: function() { + fetchZoomLevels() { chrome.send('fetchZoomLevels'); - }, + } /** @override */ - removeZoomLevel: function(host) { + removeZoomLevel(host) { chrome.send('removeZoomLevel', [host]); - }, - }; + } + } + + // The singleton instance_ is replaced with a test version of this wrapper + // during testing. + cr.addSingletonGetter(SiteSettingsPrefsBrowserProxyImpl); return { SiteSettingsPrefsBrowserProxy: SiteSettingsPrefsBrowserProxy,
diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_page.html b/chrome/browser/resources/settings/site_settings_page/site_settings_page.html index 3c4ca8c..50ef70e 100644 --- a/chrome/browser/resources/settings/site_settings_page/site_settings_page.html +++ b/chrome/browser/resources/settings/site_settings_page/site_settings_page.html
@@ -191,7 +191,7 @@ category$="[[ContentSettingsTypes.ADS]]" data-route="SITE_SETTINGS_ADS" on-tap="onTapNavigate_" actionable> - <iron-icon icon="cr:open-in-new"></iron-icon> + <iron-icon icon="settings:ads"></iron-icon> <div class="middle"> $i18n{siteSettingsAds} <div class="secondary" id="adsSecondary">
diff --git a/chrome/browser/resources/settings/system_page/system_page_browser_proxy.js b/chrome/browser/resources/settings/system_page/system_page_browser_proxy.js index b9ac51b3..3b4d509 100644 --- a/chrome/browser/resources/settings/system_page/system_page_browser_proxy.js +++ b/chrome/browser/resources/settings/system_page/system_page_browser_proxy.js
@@ -6,39 +6,34 @@ cr.define('settings', function() { /** @interface */ - function SystemPageBrowserProxy() {} - - SystemPageBrowserProxy.prototype = { + class SystemPageBrowserProxy { /** Shows the native system proxy settings. */ - showProxySettings: function() {}, + showProxySettings() {} /** * @return {boolean} Whether hardware acceleration was enabled when the user * started Chrome. */ - wasHardwareAccelerationEnabledAtStartup: function() {}, - }; + wasHardwareAccelerationEnabledAtStartup() {} + } /** - * @constructor * @implements {settings.SystemPageBrowserProxy} */ - function SystemPageBrowserProxyImpl() {} + class SystemPageBrowserProxyImpl { + /** @override */ + showProxySettings() { + chrome.send('showProxySettings'); + } + + /** @override */ + wasHardwareAccelerationEnabledAtStartup() { + return loadTimeData.getBoolean('hardwareAccelerationEnabledAtStartup'); + } + } cr.addSingletonGetter(SystemPageBrowserProxyImpl); - SystemPageBrowserProxyImpl.prototype = { - /** @override */ - showProxySettings: function() { - chrome.send('showProxySettings'); - }, - - /** @override */ - wasHardwareAccelerationEnabledAtStartup: function() { - return loadTimeData.getBoolean('hardwareAccelerationEnabledAtStartup'); - }, - }; - return { SystemPageBrowserProxy: SystemPageBrowserProxy, SystemPageBrowserProxyImpl: SystemPageBrowserProxyImpl,
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc index 9c9ac1ef..ffd3558 100644 --- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc +++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
@@ -78,6 +78,7 @@ web_contents->GetBrowserContext()->IsOffTheRecord(), IsExtendedReportingEnabled(*prefs), IsScout(*prefs), is_proceed_anyway_disabled, + true, // should_open_links_in_new_tab kHelpCenterLink); return new SafeBrowsingBlockingPage(ui_manager, web_contents,
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc index 111a544..1920c94 100644 --- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc +++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc
@@ -321,6 +321,7 @@ web_contents->GetBrowserContext()->IsOffTheRecord(), IsExtendedReportingEnabled(*prefs), IsScout(*prefs), is_proceed_anyway_disabled, + true, // should_open_links_in_new_tab "cpn_safe_browsing" /* help_center_article_link */); return new TestSafeBrowsingBlockingPage(delegate, web_contents, main_frame_url, unsafe_resources,
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc index 73ee029b..98325413 100644 --- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc +++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
@@ -92,6 +92,7 @@ web_contents->GetBrowserContext()->IsOffTheRecord(), IsExtendedReportingEnabled(*prefs), IsScout(*prefs), is_proceed_anyway_disabled, + true, // should_open_links_in_new_tab "cpn_safe_browsing" /* help_center_article_link */); return new TestSafeBrowsingBlockingPage(manager, web_contents, main_frame_url, unsafe_resources, @@ -173,6 +174,7 @@ web_contents->GetBrowserContext()->IsOffTheRecord(), IsExtendedReportingEnabled(*prefs), IsScout(*prefs), is_proceed_anyway_disabled, + true, // should_open_links_in_new_tab "cpn_safe_browsing" /* help_center_article_link */); return new TestSafeBrowsingBlockingPageQuiet( manager, web_contents, main_frame_url, unsafe_resources,
diff --git a/chrome/browser/safe_browsing/ui_manager_unittest.cc b/chrome/browser/safe_browsing/ui_manager_unittest.cc index 96aa526..fea272b3 100644 --- a/chrome/browser/safe_browsing/ui_manager_unittest.cc +++ b/chrome/browser/safe_browsing/ui_manager_unittest.cc
@@ -363,11 +363,12 @@ unsafe_resources, BaseSafeBrowsingErrorUI::SBErrorDisplayOptions( BaseBlockingPage::IsMainPageLoadBlocked(unsafe_resources), - false, // is_extended_reporting_opt_in_allowed - false, // is_off_the_record - false, // is_extended_reporting_enabled - false, // is_scout_reporting_enabled - false, // is_proceed_anyway_disabled + false, // is_extended_reporting_opt_in_allowed + false, // is_off_the_record + false, // is_extended_reporting_enabled + false, // is_scout_reporting_enabled + false, // is_proceed_anyway_disabled + true, // should_open_links_in_new_tab "cpn_safe_browsing")) { // help_center_article_link // Don't delay details at all for the unittest. SetThreatDetailsProceedDelayForTesting(0);
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn index 7d94805..2087ff7 100644 --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn
@@ -1101,6 +1101,7 @@ "//components/network_session_configurator/common", "//components/proximity_auth/webui", "//components/ui_metrics", + "//components/vector_icons", "//components/web_modal", "//components/zoom", "//device/bluetooth", @@ -1901,6 +1902,8 @@ "views/tabs/alert_indicator_button.h", "views/tabs/browser_tab_strip_controller.cc", "views/tabs/browser_tab_strip_controller.h", + "views/tabs/new_tab_button.cc", + "views/tabs/new_tab_button.h", "views/tabs/stacked_tab_strip_layout.cc", "views/tabs/stacked_tab_strip_layout.h", "views/tabs/tab.cc",
diff --git a/chrome/browser/ui/cocoa/device_chooser_content_view_cocoa.mm b/chrome/browser/ui/cocoa/device_chooser_content_view_cocoa.mm index 3586328f..f74ff11 100644 --- a/chrome/browser/ui/cocoa/device_chooser_content_view_cocoa.mm +++ b/chrome/browser/ui/cocoa/device_chooser_content_view_cocoa.mm
@@ -9,11 +9,11 @@ #include "base/macros.h" #include "base/strings/sys_string_conversions.h" -#include "chrome/app/vector_icons/vector_icons.h" #include "chrome/browser/chooser_controller/chooser_controller.h" #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_button.h" #include "chrome/browser/ui/cocoa/spinner_view.h" #include "chrome/grit/generated_resources.h" +#include "components/vector_icons/vector_icons.h" #include "skia/ext/skia_utils_mac.h" #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTweaker.h" #import "ui/base/cocoa/controls/hyperlink_button_cell.h" @@ -147,8 +147,8 @@ ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); NSImage* image = nullptr; if (isConnected) { - image = gfx::NSImageFromImageSkia( - gfx::CreateVectorIcon(kBluetoothConnectedIcon, gfx::kChromeIconGrey)); + image = gfx::NSImageFromImageSkia(gfx::CreateVectorIcon( + vector_icons::kBluetoothConnectedIcon, gfx::kChromeIconGrey)); } else if (level != -1) { DCHECK_GE(level, 0); DCHECK_LT(level, base::checked_cast<NSInteger>( @@ -857,7 +857,7 @@ if (chooserController_->IsConnected(rowIndex)) { [[self tableRowViewImage:rowIndex] setImage:gfx::NSImageFromImageSkia(gfx::CreateVectorIcon( - kBluetoothConnectedIcon, + vector_icons::kBluetoothConnectedIcon, isSelected ? SK_ColorWHITE : gfx::kChromeIconGrey))]; } else { int signalStrengthLevel =
diff --git a/chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa_controller_unittest.mm b/chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa_controller_unittest.mm index c4008ad..3d6b6f7 100644 --- a/chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa_controller_unittest.mm +++ b/chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa_controller_unittest.mm
@@ -10,7 +10,6 @@ #include <vector> #include "base/strings/utf_string_conversions.h" -#include "chrome/app/vector_icons/vector_icons.h" #include "chrome/browser/chooser_controller/mock_chooser_controller.h" #import "chrome/browser/ui/cocoa/device_chooser_content_view_cocoa.h" #import "chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa.h" @@ -18,6 +17,7 @@ #import "chrome/browser/ui/cocoa/test/cocoa_profile_test.h" #include "chrome/browser/ui/cocoa/test/cocoa_test_helper.h" #include "chrome/grit/generated_resources.h" +#include "components/vector_icons/vector_icons.h" #include "skia/ext/skia_utils_mac.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -116,10 +116,10 @@ NSImageView* image_view = [device_chooser_content_view_ tableRowViewImage:static_cast<NSInteger>(row)]; ASSERT_TRUE(image_view); - EXPECT_TRUE( - gfx::test::AreImagesEqual(gfx::Image(gfx::CreateVectorIcon( - kBluetoothConnectedIcon, expected_color)), - gfx::Image([[image_view image] copy]))); + EXPECT_TRUE(gfx::test::AreImagesEqual( + gfx::Image(gfx::CreateVectorIcon(vector_icons::kBluetoothConnectedIcon, + expected_color)), + gfx::Image([[image_view image] copy]))); } void ExpectRowTextIs(int row, NSString* expected_text) {
diff --git a/chrome/browser/ui/views/device_chooser_content_view.cc b/chrome/browser/ui/views/device_chooser_content_view.cc index e44477d..7ab38fe 100644 --- a/chrome/browser/ui/views/device_chooser_content_view.cc +++ b/chrome/browser/ui/views/device_chooser_content_view.cc
@@ -6,9 +6,9 @@ #include "base/memory/ptr_util.h" #include "base/numerics/safe_conversions.h" -#include "chrome/app/vector_icons/vector_icons.h" #include "chrome/browser/ui/views/harmony/chrome_layout_provider.h" #include "chrome/grit/generated_resources.h" +#include "components/vector_icons/vector_icons.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" #include "ui/gfx/color_palette.h" @@ -154,7 +154,8 @@ DCHECK_LT(row, base::checked_cast<int>(num_options)); if (chooser_controller_->IsConnected(row)) - return gfx::CreateVectorIcon(kBluetoothConnectedIcon, gfx::kChromeIconGrey); + return gfx::CreateVectorIcon(vector_icons::kBluetoothConnectedIcon, + gfx::kChromeIconGrey); int level = chooser_controller_->GetSignalStrengthLevel(row);
diff --git a/chrome/browser/ui/views/page_info/page_info_bubble_view.cc b/chrome/browser/ui/views/page_info/page_info_bubble_view.cc index 633de3c..5054dfc 100644 --- a/chrome/browser/ui/views/page_info/page_info_bubble_view.cc +++ b/chrome/browser/ui/views/page_info/page_info_bubble_view.cc
@@ -45,6 +45,7 @@ #include "ui/gfx/geometry/insets.h" #include "ui/gfx/image/image.h" #include "ui/views/border.h" +#include "ui/views/bubble/bubble_frame_view.h" #include "ui/views/controls/button/image_button.h" #include "ui/views/controls/button/md_text_button.h" #include "ui/views/controls/image_view.h" @@ -541,6 +542,15 @@ return summary_text_; } +void PageInfoBubbleView::AddedToWidget() { + std::unique_ptr<views::Label> title = + views::BubbleFrameView::CreateDefaultTitleLabel(GetWindowTitle()); + title->SetFontList( + ui::ResourceBundle::GetSharedInstance().GetFontListWithDelta( + kSummaryFontSizeDelta)); + GetBubbleFrameView()->SetTitleView(std::move(title)); +} + bool PageInfoBubbleView::ShouldShowCloseButton() const { return true; } @@ -555,11 +565,6 @@ return ui::DIALOG_BUTTON_NONE; } -const gfx::FontList& PageInfoBubbleView::GetTitleFontList() const { - return ui::ResourceBundle::GetSharedInstance().GetFontListWithDelta( - kSummaryFontSizeDelta); -} - void PageInfoBubbleView::ButtonPressed(views::Button* button, const ui::Event& event) { DCHECK_EQ(VIEW_ID_PAGE_INFO_BUTTON_CLOSE, button->id()); @@ -696,7 +701,8 @@ identity_info.GetSecurityDescription(); summary_text_ = security_description->summary; - GetWidget()->UpdateWindowTitle(); + static_cast<views::Label*>(GetBubbleFrameView()->title()) + ->SetText(GetWindowTitle()); if (identity_info.certificate) { certificate_ = identity_info.certificate;
diff --git a/chrome/browser/ui/views/page_info/page_info_bubble_view.h b/chrome/browser/ui/views/page_info/page_info_bubble_view.h index 41002b1f..77684c8 100644 --- a/chrome/browser/ui/views/page_info/page_info_bubble_view.h +++ b/chrome/browser/ui/views/page_info/page_info_bubble_view.h
@@ -116,10 +116,10 @@ // views::BubbleDialogDelegateView implementation. base::string16 GetWindowTitle() const override; + void AddedToWidget() override; bool ShouldShowCloseButton() const override; void OnWidgetDestroying(views::Widget* widget) override; int GetDialogButtons() const override; - const gfx::FontList& GetTitleFontList() const override; // views::ButtonListener implementation. void ButtonPressed(views::Button* button, const ui::Event& event) override;
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc index 4ca43f6..5fa6f30 100644 --- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc +++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
@@ -33,13 +33,13 @@ #include "ui/gfx/color_palette.h" #include "ui/gfx/image/image_skia.h" #include "ui/native_theme/native_theme.h" +#include "ui/views/bubble/bubble_frame_view.h" #include "ui/views/controls/button/blue_button.h" #include "ui/views/controls/button/md_text_button.h" #include "ui/views/controls/link.h" #include "ui/views/controls/link_listener.h" #include "ui/views/controls/separator.h" #include "ui/views/controls/styled_label.h" -#include "ui/views/controls/styled_label_listener.h" #include "ui/views/layout/fill_layout.h" #include "ui/views/layout/grid_layout.h" #include "ui/views/widget/widget.h" @@ -171,28 +171,6 @@ return result; } -// If a special title is required (i.e. one that contains links), creates a -// title view and a row for it in |layout|. -// TODO(estade): this should be removed and a replaced by a normal title (via -// GetWindowTitle). -void AddTitleRowWithLink(views::GridLayout* layout, - ManagePasswordsBubbleModel* model, - views::StyledLabelListener* listener) { - if (model->title_brand_link_range().is_empty()) - return; - - views::StyledLabel* title_label = - new views::StyledLabel(model->title(), listener); - title_label->SetBaseFontList(views::style::GetFont( - views::style::CONTEXT_DIALOG_TITLE, views::style::STYLE_PRIMARY)); - title_label->AddStyleRange(model->title_brand_link_range(), GetLinkStyle()); - layout->StartRow(0, SINGLE_VIEW_COLUMN_SET); - layout->AddView(title_label); - layout->AddPaddingRow(0, ChromeLayoutProvider::Get() - ->GetInsetsMetric(views::INSETS_DIALOG_CONTENTS) - .top()); -} - } // namespace // ManagePasswordsBubbleView::AutoSigninView ---------------------------------- @@ -291,10 +269,8 @@ // A view offering the user the ability to save credentials. Contains a // single ManagePasswordItemsView, along with a "Save Passwords" button, // a "Never" button and an "Edit" button to edit username field. -class ManagePasswordsBubbleView::PendingView - : public views::View, - public views::ButtonListener, - public views::StyledLabelListener { +class ManagePasswordsBubbleView::PendingView : public views::View, + public views::ButtonListener { public: explicit PendingView(ManagePasswordsBubbleView* parent); ~PendingView() override; @@ -303,11 +279,6 @@ // views::ButtonListener: void ButtonPressed(views::Button* sender, const ui::Event& event) override; - // views::StyledLabelListener: - void StyledLabelLinkClicked(views::StyledLabel* label, - const gfx::Range& range, - int event_flags) override; - ManagePasswordsBubbleView* parent_; views::Button* edit_button_; @@ -341,9 +312,7 @@ this, l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_BUBBLE_BLACKLIST_BUTTON)); - // Title row. BuildColumnSet(layout, SINGLE_VIEW_COLUMN_SET); - AddTitleRowWithLink(layout, parent_->model(), this); // Credential row. if (item) { @@ -393,14 +362,6 @@ parent_->CloseBubble(); } -void ManagePasswordsBubbleView::PendingView::StyledLabelLinkClicked( - views::StyledLabel* label, - const gfx::Range& range, - int event_flags) { - DCHECK_EQ(range, parent_->model()->title_brand_link_range()); - parent_->model()->OnBrandLinkClicked(); -} - // ManagePasswordsBubbleView::ManageView -------------------------------------- // A view offering the user a list of their currently saved credentials @@ -641,8 +602,7 @@ // and a rejection button. class ManagePasswordsBubbleView::UpdatePendingView : public views::View, - public views::ButtonListener, - public views::StyledLabelListener { + public views::ButtonListener { public: explicit UpdatePendingView(ManagePasswordsBubbleView* parent); ~UpdatePendingView() override; @@ -651,11 +611,6 @@ // views::ButtonListener: void ButtonPressed(views::Button* sender, const ui::Event& event) override; - // views::StyledLabelListener: - void StyledLabelLinkClicked(views::StyledLabel* label, - const gfx::Range& range, - int event_flags) override; - ManagePasswordsBubbleView* parent_; CredentialsSelectionView* selection_view_; @@ -689,9 +644,7 @@ update_button_ = views::MdTextButton::CreateSecondaryUiBlueButton( this, l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_UPDATE_BUTTON)); - // Title row. BuildColumnSet(layout, SINGLE_VIEW_COLUMN_SET); - AddTitleRowWithLink(layout, parent_->model(), this); // Credential row. layout->StartRow(0, SINGLE_VIEW_COLUMN_SET); @@ -731,14 +684,6 @@ parent_->CloseBubble(); } -void ManagePasswordsBubbleView::UpdatePendingView::StyledLabelLinkClicked( - views::StyledLabel* label, - const gfx::Range& range, - int event_flags) { - DCHECK_EQ(range, parent_->model()->title_brand_link_range()); - parent_->model()->OnBrandLinkClicked(); -} - // ManagePasswordsBubbleView -------------------------------------------------- // static @@ -848,6 +793,22 @@ LocationBarBubbleDelegateView::CloseBubble(); } +void ManagePasswordsBubbleView::AddedToWidget() { + auto title_view = + base::MakeUnique<views::StyledLabel>(base::string16(), this); + title_view->SetBaseFontList(views::style::GetFont( + views::style::CONTEXT_DIALOG_TITLE, views::style::STYLE_PRIMARY)); + UpdateTitleText(title_view.get()); + GetBubbleFrameView()->SetTitleView(std::move(title_view)); +} + +void ManagePasswordsBubbleView::UpdateTitleText( + views::StyledLabel* title_view) { + title_view->SetText(GetWindowTitle()); + if (!model_.title_brand_link_range().is_empty()) + title_view->AddStyleRange(model_.title_brand_link_range(), GetLinkStyle()); +} + base::string16 ManagePasswordsBubbleView::GetWindowTitle() const { return model_.title(); } @@ -863,13 +824,6 @@ return gfx::ImageSkia(); } -bool ManagePasswordsBubbleView::ShouldShowWindowTitle() const { - // Since bubble titles don't support links, fall back to a custom title view - // if we need to show a link. Only use the normal title path if there's no - // link. - return model_.title_brand_link_range().is_empty(); -} - bool ManagePasswordsBubbleView::ShouldShowWindowIcon() const { return model_.state() == password_manager::ui::CHROME_DESKTOP_IOS_PROMO_STATE; } @@ -880,6 +834,14 @@ model_.state() == password_manager::ui::CHROME_DESKTOP_IOS_PROMO_STATE; } +void ManagePasswordsBubbleView::StyledLabelLinkClicked( + views::StyledLabel* label, + const gfx::Range& range, + int event_flags) { + DCHECK_EQ(model_.title_brand_link_range(), range); + model_.OnBrandLinkClicked(); +} + void ManagePasswordsBubbleView::Refresh() { RemoveAllChildViews(true); initially_focused_view_ = NULL; @@ -887,7 +849,8 @@ // Show/hide the close button. GetWidget()->non_client_view()->ResetWindowControls(); GetWidget()->UpdateWindowIcon(); - GetWidget()->UpdateWindowTitle(); + UpdateTitleText( + static_cast<views::StyledLabel*>(GetBubbleFrameView()->title())); if (model_.state() == password_manager::ui::CHROME_DESKTOP_IOS_PROMO_STATE) { // Update the height and keep the existing width. gfx::Rect bubble_bounds = GetWidget()->GetWindowBoundsInScreen();
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h index ea2c923a..f35aa55 100644 --- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h +++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h
@@ -9,6 +9,7 @@ #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" #include "chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.h" #include "ui/base/ui_features.h" +#include "ui/views/controls/styled_label_listener.h" namespace content { class WebContents; @@ -22,7 +23,8 @@ // 2. ManageView: Displays the current page's saved credentials. // 3. BlacklistedView: Informs the user that the current page is blacklisted. // -class ManagePasswordsBubbleView : public LocationBarBubbleDelegateView { +class ManagePasswordsBubbleView : public LocationBarBubbleDelegateView, + public views::StyledLabelListener { public: static constexpr int kDesiredBubbleWidth = 370; @@ -77,17 +79,23 @@ views::View* GetInitiallyFocusedView() override; void Init() override; void CloseBubble() override; - - // WidgetDelegate: + void AddedToWidget() override; base::string16 GetWindowTitle() const override; gfx::ImageSkia GetWindowIcon() override; - bool ShouldShowWindowTitle() const override; bool ShouldShowWindowIcon() const override; bool ShouldShowCloseButton() const override; + // views::StyledLabelListener: + void StyledLabelLinkClicked(views::StyledLabel* label, + const gfx::Range& range, + int event_flags) override; + // Refreshes the bubble's state. void Refresh(); + // Updates |title_view|'s text and link styling from |model_|. + void UpdateTitleText(views::StyledLabel* title_view); + // Sets up a child view according to the model state. void CreateChild();
diff --git a/chrome/browser/ui/views/permission_bubble/permission_prompt_impl.cc b/chrome/browser/ui/views/permission_bubble/permission_prompt_impl.cc index 37470e6..b20417a 100644 --- a/chrome/browser/ui/views/permission_bubble/permission_prompt_impl.cc +++ b/chrome/browser/ui/views/permission_bubble/permission_prompt_impl.cc
@@ -59,8 +59,8 @@ // BubbleDialogDelegateView: bool ShouldShowCloseButton() const override; - const gfx::FontList& GetTitleFontList() const override; base::string16 GetWindowTitle() const override; + void AddedToWidget() override; void OnWidgetDestroying(views::Widget* widget) override; void GetAccessibleNodeData(ui::AXNodeData* node_data) override; bool Cancel() override; @@ -151,17 +151,19 @@ return true; } -const gfx::FontList& PermissionsBubbleDialogDelegateView::GetTitleFontList() - const { - ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); - return rb.GetFontList(ui::ResourceBundle::BaseFont); -} - base::string16 PermissionsBubbleDialogDelegateView::GetWindowTitle() const { return l10n_util::GetStringFUTF16(IDS_PERMISSIONS_BUBBLE_PROMPT, display_origin_); } +void PermissionsBubbleDialogDelegateView::AddedToWidget() { + std::unique_ptr<views::Label> title = + views::BubbleFrameView::CreateDefaultTitleLabel(GetWindowTitle()); + title->SetFontList(ui::ResourceBundle::GetSharedInstance().GetFontList( + ui::ResourceBundle::BaseFont)); + GetBubbleFrameView()->SetTitleView(std::move(title)); +} + void PermissionsBubbleDialogDelegateView::SizeToContents() { BubbleDialogDelegateView::SizeToContents(); }
diff --git a/chrome/browser/ui/views/tabs/new_tab_button.cc b/chrome/browser/ui/views/tabs/new_tab_button.cc new file mode 100644 index 0000000..abc5456c --- /dev/null +++ b/chrome/browser/ui/views/tabs/new_tab_button.cc
@@ -0,0 +1,263 @@ +// 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/ui/views/tabs/new_tab_button.h" + +#include "chrome/browser/themes/theme_properties.h" +#include "chrome/browser/ui/layout_constants.h" +#include "third_party/skia/include/core/SkColorFilter.h" +#include "third_party/skia/include/effects/SkBlurMaskFilter.h" +#include "third_party/skia/include/effects/SkLayerDrawLooper.h" +#include "third_party/skia/include/pathops/SkPathOps.h" +#include "ui/base/default_theme_provider.h" +#include "ui/gfx/scoped_canvas.h" + +#if defined(OS_WIN) +#include "ui/display/win/screen_win.h" +#include "ui/gfx/win/hwnd_util.h" +#include "ui/views/win/hwnd_util.h" +#endif + +namespace { + +sk_sp<SkDrawLooper> CreateShadowDrawLooper(SkColor color) { + SkLayerDrawLooper::Builder looper_builder; + looper_builder.addLayer(); + + SkLayerDrawLooper::LayerInfo layer_info; + layer_info.fPaintBits |= SkLayerDrawLooper::kMaskFilter_Bit; + layer_info.fPaintBits |= SkLayerDrawLooper::kColorFilter_Bit; + layer_info.fColorMode = SkBlendMode::kDst; + layer_info.fOffset.set(0, 1); + SkPaint* layer_paint = looper_builder.addLayer(layer_info); + layer_paint->setMaskFilter(SkBlurMaskFilter::Make( + kNormal_SkBlurStyle, 0.5, SkBlurMaskFilter::kHighQuality_BlurFlag)); + layer_paint->setColorFilter( + SkColorFilter::MakeModeFilter(color, SkBlendMode::kSrcIn)); + + return looper_builder.detach(); +} + +} // namespace + +NewTabButton::NewTabButton(TabStrip* tab_strip, views::ButtonListener* listener) + : views::ImageButton(listener), tab_strip_(tab_strip), destroyed_(NULL) { + set_animate_on_state_change(true); +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) + set_triggerable_event_flags(triggerable_event_flags() | + ui::EF_MIDDLE_MOUSE_BUTTON); +#endif +} + +NewTabButton::~NewTabButton() { + if (destroyed_) + *destroyed_ = true; +} + +// static +int NewTabButton::GetTopOffset() { + // The vertical distance between the bottom of the new tab button and the + // bottom of the tabstrip. + const int kNewTabButtonBottomOffset = 4; + return Tab::GetMinimumInactiveSize().height() - kNewTabButtonBottomOffset - + GetLayoutSize(NEW_TAB_BUTTON).height(); +} + +#if defined(OS_WIN) +void NewTabButton::OnMouseReleased(const ui::MouseEvent& event) { + if (event.IsOnlyRightMouseButton()) { + gfx::Point point = event.location(); + views::View::ConvertPointToScreen(this, &point); + point = display::win::ScreenWin::DIPToScreenPoint(point); + bool destroyed = false; + destroyed_ = &destroyed; + gfx::ShowSystemMenuAtPoint(views::HWNDForView(this), point); + if (destroyed) + return; + + destroyed_ = NULL; + SetState(views::CustomButton::STATE_NORMAL); + return; + } + views::ImageButton::OnMouseReleased(event); +} +#endif + +void NewTabButton::OnGestureEvent(ui::GestureEvent* event) { + // Consume all gesture events here so that the parent (Tab) does not + // start consuming gestures. + views::ImageButton::OnGestureEvent(event); + event->SetHandled(); +} + +void NewTabButton::PaintButtonContents(gfx::Canvas* canvas) { + gfx::ScopedCanvas scoped_canvas(canvas); + const int visible_height = GetLayoutSize(NEW_TAB_BUTTON).height(); + canvas->Translate(gfx::Vector2d(0, height() - visible_height)); + + const bool pressed = state() == views::CustomButton::STATE_PRESSED; + const float scale = canvas->image_scale(); + + // Fill. + SkPath fill; + const float fill_bottom = (visible_height - 2) * scale; + const float diag_height = fill_bottom - 3.5 * scale; + const float diag_width = diag_height * Tab::GetInverseDiagonalSlope(); + fill.moveTo(diag_width + 4 * scale, fill_bottom); + fill.rCubicTo(-0.75 * scale, 0, -1.625 * scale, -0.5 * scale, -2 * scale, + -1.5 * scale); + fill.rLineTo(-diag_width, -diag_height); + fill.rCubicTo(0, -0.5 * scale, 0.25 * scale, -scale, scale, -scale); + fill.lineTo((width() - 4) * scale - diag_width, scale); + fill.rCubicTo(0.75 * scale, 0, 1.625 * scale, 0.5 * scale, 2 * scale, + 1.5 * scale); + fill.rLineTo(diag_width, diag_height); + fill.rCubicTo(0, 0.5 * scale, -0.25 * scale, scale, -scale, scale); + fill.close(); + PaintFill(pressed, scale, fill, canvas); + + // Stroke. + canvas->UndoDeviceScaleFactor(); + SkPath stroke; + GetBorderPath(0, scale, false, &stroke); + // We want to draw a drop shadow either inside or outside the stroke, + // depending on whether we're pressed; so, either clip out what's outside + // the stroke, or clip out the fill inside it. + if (pressed) + canvas->ClipPath(stroke, true); + Op(stroke, fill, kDifference_SkPathOp, &stroke); + if (!pressed) + canvas->sk_canvas()->clipPath(fill, SkClipOp::kDifference, true); + // Now draw the stroke and shadow; the stroke will always be visible, while + // the shadow will be affected by the clip we set above. + cc::PaintFlags flags; + flags.setAntiAlias(true); + const SkColor stroke_color = tab_strip_->GetToolbarTopSeparatorColor(); + const float alpha = SkColorGetA(stroke_color); + const SkAlpha shadow_alpha = + base::saturated_cast<SkAlpha>(std::round(2.1875f * alpha)); + flags.setLooper( + CreateShadowDrawLooper(SkColorSetA(stroke_color, shadow_alpha))); + const SkAlpha path_alpha = + static_cast<SkAlpha>(std::round((pressed ? 0.875f : 0.609375f) * alpha)); + flags.setColor(SkColorSetA(stroke_color, path_alpha)); + canvas->DrawPath(stroke, flags); +} + +bool NewTabButton::GetHitTestMask(gfx::Path* mask) const { + DCHECK(mask); + + SkPath border; + const float scale = GetWidget()->GetCompositor()->device_scale_factor(); + GetBorderPath(GetTopOffset() * scale, scale, + tab_strip_->SizeTabButtonToTopOfTabStrip(), &border); + mask->addPath(border, SkMatrix::MakeScale(1 / scale)); + return true; +} + +void NewTabButton::GetBorderPath(float button_y, + float scale, + bool extend_to_top, + SkPath* path) const { + const float inverse_slope = Tab::GetInverseDiagonalSlope(); + const float fill_bottom = + (GetLayoutSize(NEW_TAB_BUTTON).height() - 2) * scale; + const float stroke_bottom = button_y + fill_bottom + 1; + const float diag_height = fill_bottom - 3.5 * scale; + const float diag_width = diag_height * inverse_slope; + path->moveTo(diag_width + 4 * scale - 1, stroke_bottom); + path->rCubicTo(-0.75 * scale, 0, -1.625 * scale, -0.5 * scale, -2 * scale, + -1.5 * scale); + path->rLineTo(-diag_width, -diag_height); + if (extend_to_top) { + // Create the vertical extension by extending the side diagonals at the + // upper left and lower right corners until they reach the top and bottom of + // the border, respectively (in other words, "un-round-off" those corners + // and turn them into sharp points). Then extend upward from the corner + // points to the top of the bounds. + const float dy = scale + 2; + const float dx = inverse_slope * dy; + path->rLineTo(-dx, -dy); + path->rLineTo(0, -button_y - scale + 1); + path->lineTo((width() - 2) * scale + 1 + dx, 0); + path->rLineTo(0, stroke_bottom); + } else { + path->rCubicTo(-0.5 * scale, -1.125 * scale, 0.5 * scale, -scale - 2, scale, + -scale - 2); + path->lineTo((width() - 4) * scale - diag_width + 1, button_y + scale - 1); + path->rCubicTo(0.75 * scale, 0, 1.625 * scale, 0.5 * scale, 2 * scale, + 1.5 * scale); + path->rLineTo(diag_width, diag_height); + path->rCubicTo(0.5 * scale, 1.125 * scale, -0.5 * scale, scale + 2, -scale, + scale + 2); + } + path->close(); +} + +void NewTabButton::PaintFill(bool pressed, + float scale, + const SkPath& fill, + gfx::Canvas* canvas) const { + gfx::ScopedCanvas scoped_canvas(canvas); + canvas->UndoDeviceScaleFactor(); + cc::PaintFlags flags; + flags.setAntiAlias(true); + + // For unpressed buttons, draw the fill and its shadow. + if (!pressed) { + // First we compute the background image coordinates and scale, in case we + // need to draw a custom background image. + const ui::ThemeProvider* tp = GetThemeProvider(); + bool custom_image; + const int bg_id = tab_strip_->GetBackgroundResourceId(&custom_image); + if (custom_image) { + // For custom tab backgrounds the background starts at the top of the tab + // strip. Otherwise the background starts at the top of the frame. + const int offset_y = + tp->HasCustomImage(bg_id) ? 0 : background_offset_.y(); + // The new tab background is mirrored in RTL mode, but the theme + // background should never be mirrored. Mirror it here to compensate. + float x_scale = 1.0f; + int x = GetMirroredX() + background_offset_.x(); + const gfx::Size size(GetLayoutSize(NEW_TAB_BUTTON)); + if (base::i18n::IsRTL()) { + x_scale = -1.0f; + // Offset by |width| such that the same region is painted as if there + // was no flip. + x += size.width(); + } + + const bool succeeded = canvas->InitPaintFlagsForTiling( + *tp->GetImageSkiaNamed(bg_id), x, GetTopOffset() + offset_y, + x_scale * scale, scale, 0, 0, &flags); + DCHECK(succeeded); + } else { + flags.setColor(tp->GetColor(ThemeProperties::COLOR_BACKGROUND_TAB)); + } + const SkColor stroke_color = tab_strip_->GetToolbarTopSeparatorColor(); + const SkAlpha alpha = + static_cast<SkAlpha>(std::round(SkColorGetA(stroke_color) * 0.59375f)); + cc::PaintFlags shadow_flags = flags; + shadow_flags.setLooper( + CreateShadowDrawLooper(SkColorSetA(stroke_color, alpha))); + canvas->DrawPath(fill, shadow_flags); + } + + // Draw a white highlight on hover. + const SkAlpha hover_alpha = + static_cast<SkAlpha>(hover_animation().CurrentValueBetween(0x00, 0x4D)); + if (hover_alpha != SK_AlphaTRANSPARENT) { + flags.setColor(SkColorSetA(SK_ColorWHITE, hover_alpha)); + canvas->DrawPath(fill, flags); + } + + // Most states' opacities are adjusted using an opacity recorder in + // TabStrip::PaintChildren(), but the pressed state is excluded there and + // instead rendered using a dark overlay here. Avoiding the use of the + // opacity recorder keeps the stroke more visible in this state. + if (pressed) { + flags.setColor(SkColorSetA(SK_ColorBLACK, 0x14)); + canvas->DrawPath(fill, flags); + } +}
diff --git a/chrome/browser/ui/views/tabs/new_tab_button.h b/chrome/browser/ui/views/tabs/new_tab_button.h new file mode 100644 index 0000000..667fef7 --- /dev/null +++ b/chrome/browser/ui/views/tabs/new_tab_button.h
@@ -0,0 +1,76 @@ +// 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_UI_VIEWS_TABS_NEW_TAB_BUTTON_H_ +#define CHROME_BROWSER_UI_VIEWS_TABS_NEW_TAB_BUTTON_H_ + +#include "chrome/browser/ui/views/frame/browser_view.h" +#include "chrome/browser/ui/views/tabs/tab_strip.h" +#include "ui/views/controls/button/image_button.h" +#include "ui/views/view.h" + +/////////////////////////////////////////////////////////////////////////////// +// NewTabButton +// +// A subclass of ImageButton that hit-tests to the shape of the new tab button +// and does custom drawing. +// +/////////////////////////////////////////////////////////////////////////////// +class NewTabButton : public views::ImageButton, + public views::MaskedTargeterDelegate { + public: + NewTabButton(TabStrip* tab_strip, views::ButtonListener* listener); + ~NewTabButton() override; + + // Set the background offset used to match the background image to the frame + // image. + void set_background_offset(const gfx::Point& offset) { + background_offset_ = offset; + } + + // Returns the offset from the top of the tabstrip at which the new tab + // button's visible region begins. + static int GetTopOffset(); + + private: +// views::ImageButton: +#if defined(OS_WIN) + void OnMouseReleased(const ui::MouseEvent& event) override; +#endif + void OnGestureEvent(ui::GestureEvent* event) override; + void PaintButtonContents(gfx::Canvas* canvas) override; + + // views::MaskedTargeterDelegate: + bool GetHitTestMask(gfx::Path* mask) const override; + + // Computes a path corresponding to the button's outer border for a given + // |scale| and stores it in |path|. |button_y| is used as the y-coordinate + // for the top of the button. If |extend_to_top| is true, the path is + // extended vertically to y = 0. The caller uses this for Fitts' Law purposes + // in maximized/fullscreen mode. + void GetBorderPath(float button_y, + float scale, + bool extend_to_top, + SkPath* path) const; + + // Paints the fill region of the button into |canvas|, according to the + // supplied values from GetImage() and the given |fill| path. + void PaintFill(bool pressed, + float scale, + const SkPath& fill, + gfx::Canvas* canvas) const; + + // Tab strip that contains this button. + TabStrip* tab_strip_; + + // The offset used to paint the background image. + gfx::Point background_offset_; + + // were we destroyed? + bool* destroyed_; + + DISALLOW_COPY_AND_ASSIGN(NewTabButton); +}; + +#endif // CHROME_BROWSER_UI_VIEWS_TABS_NEW_TAB_BUTTON_H_
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc index 2e6e23b..fda63fb 100644 --- a/chrome/browser/ui/views/tabs/tab_strip.cc +++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -25,6 +25,7 @@ #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/view_ids.h" #include "chrome/browser/ui/views/frame/browser_view.h" +#include "chrome/browser/ui/views/tabs/new_tab_button.h" #include "chrome/browser/ui/views/tabs/stacked_tab_strip_layout.h" #include "chrome/browser/ui/views/tabs/tab.h" #include "chrome/browser/ui/views/tabs/tab_drag_controller.h" @@ -111,40 +112,12 @@ const int kPinnedToNonPinnedOffset = 3; #endif -// Returns the offset from the top of the tabstrip at which the new tab button's -// visible region begins. -int GetNewTabButtonTopOffset() { - // The vertical distance between the bottom of the new tab button and the - // bottom of the tabstrip. - const int kNewTabButtonBottomOffset = 4; - return Tab::GetMinimumInactiveSize().height() - kNewTabButtonBottomOffset - - GetLayoutSize(NEW_TAB_BUTTON).height(); -} - // Returns the width needed for the new tab button (and padding). int GetNewTabButtonWidth() { return GetLayoutSize(NEW_TAB_BUTTON).width() - GetLayoutConstant(TABSTRIP_NEW_TAB_BUTTON_OVERLAP); } -sk_sp<SkDrawLooper> CreateShadowDrawLooper(SkColor color) { - SkLayerDrawLooper::Builder looper_builder; - looper_builder.addLayer(); - - SkLayerDrawLooper::LayerInfo layer_info; - layer_info.fPaintBits |= SkLayerDrawLooper::kMaskFilter_Bit; - layer_info.fPaintBits |= SkLayerDrawLooper::kColorFilter_Bit; - layer_info.fColorMode = SkBlendMode::kDst; - layer_info.fOffset.set(0, 1); - SkPaint* layer_paint = looper_builder.addLayer(layer_info); - layer_paint->setMaskFilter(SkBlurMaskFilter::Make( - kNormal_SkBlurStyle, 0.5, SkBlurMaskFilter::kHighQuality_BlurFlag)); - layer_paint->setColorFilter( - SkColorFilter::MakeModeFilter(color, SkBlendMode::kSrcIn)); - - return looper_builder.detach(); -} - // Animation delegate used for any automatic tab movement. Hides the tab if it // is not fully visible within the tabstrip area, to prevent overflow clipping. class TabAnimationDelegate : public gfx::AnimationDelegate { @@ -257,278 +230,6 @@ } // namespace -/////////////////////////////////////////////////////////////////////////////// -// NewTabButton -// -// A subclass of ImageButton that hit-tests to the shape of the new tab button -// and does custom drawing. - -class NewTabButton : public views::ImageButton, - public views::MaskedTargeterDelegate { - public: - NewTabButton(TabStrip* tab_strip, views::ButtonListener* listener); - ~NewTabButton() override; - - // Set the background offset used to match the background image to the frame - // image. - void set_background_offset(const gfx::Point& offset) { - background_offset_ = offset; - } - - private: - // views::ImageButton: -#if defined(OS_WIN) - void OnMouseReleased(const ui::MouseEvent& event) override; -#endif - void OnGestureEvent(ui::GestureEvent* event) override; - void PaintButtonContents(gfx::Canvas* canvas) override; - - // views::MaskedTargeterDelegate: - bool GetHitTestMask(gfx::Path* mask) const override; - - // Computes a path corresponding to the button's outer border for a given - // |scale| and stores it in |path|. |button_y| is used as the y-coordinate - // for the top of the button. If |extend_to_top| is true, the path is - // extended vertically to y = 0. The caller uses this for Fitts' Law purposes - // in maximized/fullscreen mode. - void GetBorderPath(float button_y, - float scale, - bool extend_to_top, - SkPath* path) const; - - // Paints the fill region of the button into |canvas|, according to the - // supplied values from GetImage() and the given |fill| path. - void PaintFill(bool pressed, - float scale, - const SkPath& fill, - gfx::Canvas* canvas) const; - - // Tab strip that contains this button. - TabStrip* tab_strip_; - - // The offset used to paint the background image. - gfx::Point background_offset_; - - // were we destroyed? - bool* destroyed_; - - DISALLOW_COPY_AND_ASSIGN(NewTabButton); -}; - -NewTabButton::NewTabButton(TabStrip* tab_strip, views::ButtonListener* listener) - : views::ImageButton(listener), - tab_strip_(tab_strip), - destroyed_(NULL) { - set_animate_on_state_change(true); -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) - set_triggerable_event_flags(triggerable_event_flags() | - ui::EF_MIDDLE_MOUSE_BUTTON); -#endif -} - -NewTabButton::~NewTabButton() { - if (destroyed_) - *destroyed_ = true; -} - -#if defined(OS_WIN) -void NewTabButton::OnMouseReleased(const ui::MouseEvent& event) { - if (event.IsOnlyRightMouseButton()) { - gfx::Point point = event.location(); - views::View::ConvertPointToScreen(this, &point); - point = display::win::ScreenWin::DIPToScreenPoint(point); - bool destroyed = false; - destroyed_ = &destroyed; - gfx::ShowSystemMenuAtPoint(views::HWNDForView(this), point); - if (destroyed) - return; - - destroyed_ = NULL; - SetState(views::CustomButton::STATE_NORMAL); - return; - } - views::ImageButton::OnMouseReleased(event); -} -#endif - -void NewTabButton::OnGestureEvent(ui::GestureEvent* event) { - // Consume all gesture events here so that the parent (Tab) does not - // start consuming gestures. - views::ImageButton::OnGestureEvent(event); - event->SetHandled(); -} - -void NewTabButton::PaintButtonContents(gfx::Canvas* canvas) { - gfx::ScopedCanvas scoped_canvas(canvas); - const int visible_height = GetLayoutSize(NEW_TAB_BUTTON).height(); - canvas->Translate(gfx::Vector2d(0, height() - visible_height)); - - const bool pressed = state() == views::CustomButton::STATE_PRESSED; - const float scale = canvas->image_scale(); - - // Fill. - SkPath fill; - const float fill_bottom = (visible_height - 2) * scale; - const float diag_height = fill_bottom - 3.5 * scale; - const float diag_width = diag_height * Tab::GetInverseDiagonalSlope(); - fill.moveTo(diag_width + 4 * scale, fill_bottom); - fill.rCubicTo(-0.75 * scale, 0, -1.625 * scale, -0.5 * scale, -2 * scale, - -1.5 * scale); - fill.rLineTo(-diag_width, -diag_height); - fill.rCubicTo(0, -0.5 * scale, 0.25 * scale, -scale, scale, -scale); - fill.lineTo((width() - 4) * scale - diag_width, scale); - fill.rCubicTo(0.75 * scale, 0, 1.625 * scale, 0.5 * scale, 2 * scale, - 1.5 * scale); - fill.rLineTo(diag_width, diag_height); - fill.rCubicTo(0, 0.5 * scale, -0.25 * scale, scale, -scale, scale); - fill.close(); - PaintFill(pressed, scale, fill, canvas); - - // Stroke. - canvas->UndoDeviceScaleFactor(); - SkPath stroke; - GetBorderPath(0, scale, false, &stroke); - // We want to draw a drop shadow either inside or outside the stroke, - // depending on whether we're pressed; so, either clip out what's outside - // the stroke, or clip out the fill inside it. - if (pressed) - canvas->ClipPath(stroke, true); - Op(stroke, fill, kDifference_SkPathOp, &stroke); - if (!pressed) - canvas->sk_canvas()->clipPath(fill, SkClipOp::kDifference, true); - // Now draw the stroke and shadow; the stroke will always be visible, while - // the shadow will be affected by the clip we set above. - cc::PaintFlags flags; - flags.setAntiAlias(true); - const SkColor stroke_color = tab_strip_->GetToolbarTopSeparatorColor(); - const float alpha = SkColorGetA(stroke_color); - const SkAlpha shadow_alpha = - base::saturated_cast<SkAlpha>(std::round(2.1875f * alpha)); - flags.setLooper( - CreateShadowDrawLooper(SkColorSetA(stroke_color, shadow_alpha))); - const SkAlpha path_alpha = static_cast<SkAlpha>( - std::round((pressed ? 0.875f : 0.609375f) * alpha)); - flags.setColor(SkColorSetA(stroke_color, path_alpha)); - canvas->DrawPath(stroke, flags); -} - -bool NewTabButton::GetHitTestMask(gfx::Path* mask) const { - DCHECK(mask); - - SkPath border; - const float scale = GetWidget()->GetCompositor()->device_scale_factor(); - GetBorderPath(GetNewTabButtonTopOffset() * scale, scale, - tab_strip_->SizeTabButtonToTopOfTabStrip(), &border); - mask->addPath(border, SkMatrix::MakeScale(1 / scale)); - return true; -} - -void NewTabButton::GetBorderPath(float button_y, - float scale, - bool extend_to_top, - SkPath* path) const { - const float inverse_slope = Tab::GetInverseDiagonalSlope(); - const float fill_bottom = - (GetLayoutSize(NEW_TAB_BUTTON).height() - 2) * scale; - const float stroke_bottom = button_y + fill_bottom + 1; - const float diag_height = fill_bottom - 3.5 * scale; - const float diag_width = diag_height * inverse_slope; - path->moveTo(diag_width + 4 * scale - 1, stroke_bottom); - path->rCubicTo(-0.75 * scale, 0, -1.625 * scale, -0.5 * scale, -2 * scale, - -1.5 * scale); - path->rLineTo(-diag_width, -diag_height); - if (extend_to_top) { - // Create the vertical extension by extending the side diagonals at the - // upper left and lower right corners until they reach the top and bottom of - // the border, respectively (in other words, "un-round-off" those corners - // and turn them into sharp points). Then extend upward from the corner - // points to the top of the bounds. - const float dy = scale + 2; - const float dx = inverse_slope * dy; - path->rLineTo(-dx, -dy); - path->rLineTo(0, -button_y - scale + 1); - path->lineTo((width() - 2) * scale + 1 + dx, 0); - path->rLineTo(0, stroke_bottom); - } else { - path->rCubicTo(-0.5 * scale, -1.125 * scale, 0.5 * scale, -scale - 2, scale, - -scale - 2); - path->lineTo((width() - 4) * scale - diag_width + 1, button_y + scale - 1); - path->rCubicTo(0.75 * scale, 0, 1.625 * scale, 0.5 * scale, 2 * scale, - 1.5 * scale); - path->rLineTo(diag_width, diag_height); - path->rCubicTo(0.5 * scale, 1.125 * scale, -0.5 * scale, scale + 2, -scale, - scale + 2); - } - path->close(); -} - -void NewTabButton::PaintFill(bool pressed, - float scale, - const SkPath& fill, - gfx::Canvas* canvas) const { - gfx::ScopedCanvas scoped_canvas(canvas); - canvas->UndoDeviceScaleFactor(); - cc::PaintFlags flags; - flags.setAntiAlias(true); - - // For unpressed buttons, draw the fill and its shadow. - if (!pressed) { - // First we compute the background image coordinates and scale, in case we - // need to draw a custom background image. - const ui::ThemeProvider* tp = GetThemeProvider(); - bool custom_image; - const int bg_id = tab_strip_->GetBackgroundResourceId(&custom_image); - if (custom_image) { - // For custom tab backgrounds the background starts at the top of the tab - // strip. Otherwise the background starts at the top of the frame. - const int offset_y = - tp->HasCustomImage(bg_id) ? 0 : background_offset_.y(); - // The new tab background is mirrored in RTL mode, but the theme - // background should never be mirrored. Mirror it here to compensate. - float x_scale = 1.0f; - int x = GetMirroredX() + background_offset_.x(); - const gfx::Size size(GetLayoutSize(NEW_TAB_BUTTON)); - if (base::i18n::IsRTL()) { - x_scale = -1.0f; - // Offset by |width| such that the same region is painted as if there - // was no flip. - x += size.width(); - } - - const bool succeeded = - canvas->InitPaintFlagsForTiling(*tp->GetImageSkiaNamed(bg_id), x, - GetNewTabButtonTopOffset() + offset_y, - x_scale * scale, scale, 0, 0, &flags); - DCHECK(succeeded); - } else { - flags.setColor(tp->GetColor(ThemeProperties::COLOR_BACKGROUND_TAB)); - } - const SkColor stroke_color = tab_strip_->GetToolbarTopSeparatorColor(); - const SkAlpha alpha = static_cast<SkAlpha>( - std::round(SkColorGetA(stroke_color) * 0.59375f)); - cc::PaintFlags shadow_flags = flags; - shadow_flags.setLooper( - CreateShadowDrawLooper(SkColorSetA(stroke_color, alpha))); - canvas->DrawPath(fill, shadow_flags); - } - - // Draw a white highlight on hover. - const SkAlpha hover_alpha = static_cast<SkAlpha>( - hover_animation().CurrentValueBetween(0x00, 0x4D)); - if (hover_alpha != SK_AlphaTRANSPARENT) { - flags.setColor(SkColorSetA(SK_ColorWHITE, hover_alpha)); - canvas->DrawPath(fill, flags); - } - - // Most states' opacities are adjusted using an opacity recorder in - // TabStrip::PaintChildren(), but the pressed state is excluded there and - // instead rendered using a dark overlay here. Avoiding the use of the - // opacity recorder keeps the stroke more visible in this state. - if (pressed) { - flags.setColor(SkColorSetA(SK_ColorBLACK, 0x14)); - canvas->DrawPath(fill, flags); - } -} /////////////////////////////////////////////////////////////////////////////// // TabStrip::RemoveTabDelegate @@ -1604,7 +1305,7 @@ set_notify_enter_exit_on_child(true); newtab_button_bounds_.set_size(GetLayoutSize(NEW_TAB_BUTTON)); - newtab_button_bounds_.Inset(0, 0, 0, -GetNewTabButtonTopOffset()); + newtab_button_bounds_.Inset(0, 0, 0, -NewTabButton::GetTopOffset()); newtab_button_ = new NewTabButton(this, this); newtab_button_->SetTooltipText( l10n_util::GetStringUTF16(IDS_TOOLTIP_NEW_TAB));
diff --git a/chrome/browser/ui/webui/chromeos/login/encryption_migration_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/encryption_migration_screen_handler.cc index edcbeb1..eed588d 100644 --- a/chrome/browser/ui/webui/chromeos/login/encryption_migration_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/encryption_migration_screen_handler.cc
@@ -75,6 +75,7 @@ FIRST_SCREEN_READY = 0, FIRST_SCREEN_RESUME = 1, FIRST_SCREEN_LOW_STORAGE = 2, + FIRST_SCREEN_ARC_KIOSK = 3, FIRST_SCREEN_COUNT }; @@ -102,6 +103,10 @@ REQUEST_FAILURE_IN_RESUMED_MIGRATION = 5, MOUNT_FAILURE_IN_NEW_MIGRATION = 6, MOUNT_FAILURE_IN_RESUMED_MIGRATION = 7, + SUCCESS_IN_ARC_KIOSK_MIGRATION = 8, + GENERAL_FAILURE_IN_ARC_KIOSK_MIGRATION = 9, + REQUEST_FAILURE_IN_ARC_KIOSK_MIGRATION = 10, + MOUNT_FAILURE_IN_ARC_KIOSK_MIGRATION = 11, COUNT }; @@ -113,6 +118,8 @@ SUCCESS_IN_RESUMED_MIGRATION = 1, FAILURE_IN_NEW_MIGRATION = 2, FAILURE_IN_RESUMED_MIGRATION = 3, + SUCCESS_IN_ARC_KIOSK_MIGRATION = 4, + FAILURE_IN_ARC_KIOSK_MIGRATION = 5, COUNT }; @@ -137,18 +144,81 @@ MigrationResult::COUNT); } -void RecordRemoveCryptohomeResult(bool success, bool is_resumed_migration) { - RemoveCryptohomeResult result = - success ? (is_resumed_migration - ? RemoveCryptohomeResult::SUCCESS_IN_RESUMED_MIGRATION - : RemoveCryptohomeResult::SUCCESS_IN_NEW_MIGRATION) - : (is_resumed_migration - ? RemoveCryptohomeResult::FAILURE_IN_RESUMED_MIGRATION - : RemoveCryptohomeResult::FAILURE_IN_NEW_MIGRATION); +void RecordMigrationResultSuccess(bool resume, bool arc_kiosk) { + if (arc_kiosk) + RecordMigrationResult(MigrationResult::SUCCESS_IN_ARC_KIOSK_MIGRATION); + else if (resume) + RecordMigrationResult(MigrationResult::SUCCESS_IN_RESUMED_MIGRATION); + else + RecordMigrationResult(MigrationResult::SUCCESS_IN_NEW_MIGRATION); +} + +void RecordMigrationResultGeneralFailure(bool resume, bool arc_kiosk) { + if (arc_kiosk) { + RecordMigrationResult( + MigrationResult::GENERAL_FAILURE_IN_ARC_KIOSK_MIGRATION); + } else if (resume) { + RecordMigrationResult( + MigrationResult::GENERAL_FAILURE_IN_RESUMED_MIGRATION); + } else { + RecordMigrationResult(MigrationResult::GENERAL_FAILURE_IN_NEW_MIGRATION); + } +} + +void RecordMigrationResultRequestFailure(bool resume, bool arc_kiosk) { + if (arc_kiosk) { + RecordMigrationResult( + MigrationResult::REQUEST_FAILURE_IN_ARC_KIOSK_MIGRATION); + } else if (resume) { + RecordMigrationResult( + MigrationResult::REQUEST_FAILURE_IN_RESUMED_MIGRATION); + } else { + RecordMigrationResult(MigrationResult::REQUEST_FAILURE_IN_NEW_MIGRATION); + } +} + +void RecordMigrationResultMountFailure(bool resume, bool arc_kiosk) { + if (arc_kiosk) { + RecordMigrationResult( + MigrationResult::MOUNT_FAILURE_IN_ARC_KIOSK_MIGRATION); + } else if (resume) { + RecordMigrationResult(MigrationResult::MOUNT_FAILURE_IN_RESUMED_MIGRATION); + } else { + RecordMigrationResult(MigrationResult::MOUNT_FAILURE_IN_NEW_MIGRATION); + } +} + +void RecordRemoveCryptohomeResult(RemoveCryptohomeResult result) { UMA_HISTOGRAM_ENUMERATION(kUmaNameRemoveCryptohomeResult, result, RemoveCryptohomeResult::COUNT); } +void RecordRemoveCryptohomeResultSuccess(bool resume, bool arc_kiosk) { + if (arc_kiosk) { + RecordRemoveCryptohomeResult( + RemoveCryptohomeResult::SUCCESS_IN_ARC_KIOSK_MIGRATION); + } else if (resume) { + RecordRemoveCryptohomeResult( + RemoveCryptohomeResult::SUCCESS_IN_RESUMED_MIGRATION); + } else { + RecordRemoveCryptohomeResult( + RemoveCryptohomeResult::SUCCESS_IN_NEW_MIGRATION); + } +} + +void RecordRemoveCryptohomeResultFailure(bool resume, bool arc_kiosk) { + if (arc_kiosk) { + RecordRemoveCryptohomeResult( + RemoveCryptohomeResult::FAILURE_IN_ARC_KIOSK_MIGRATION); + } else if (resume) { + RecordRemoveCryptohomeResult( + RemoveCryptohomeResult::FAILURE_IN_RESUMED_MIGRATION); + } else { + RecordRemoveCryptohomeResult( + RemoveCryptohomeResult::FAILURE_IN_NEW_MIGRATION); + } +} + } // namespace namespace chromeos { @@ -198,6 +268,14 @@ } void EncryptionMigrationScreenHandler::SetupInitialView() { + // If old encryption is detected in ARC kiosk mode, skip all checks (user + // confirmation, battery level, and remaining space) and start migration + // immediately. + if (IsArcKiosk()) { + RecordFirstScreen(FirstScreen::FIRST_SCREEN_ARC_KIOSK); + StartMigration(); + return; + } DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver(this); CheckAvailableStorage(); } @@ -419,11 +497,21 @@ // Mount the existing eCryptfs vault to a temporary location for migration. cryptohome::MountParameters mount(false); mount.to_migrate_from_ecryptfs = true; - cryptohome::HomedirMethods::GetInstance()->MountEx( - cryptohome::Identification(user_context_.GetAccountId()), - cryptohome::Authorization(GetAuthKey()), mount, - base::Bind(&EncryptionMigrationScreenHandler::OnMountExistingVault, - weak_ptr_factory_.GetWeakPtr())); + if (IsArcKiosk()) { + mount.public_mount = true; + cryptohome::HomedirMethods::GetInstance()->MountEx( + cryptohome::Identification(user_context_.GetAccountId()), + cryptohome::Authorization(cryptohome::KeyDefinition()), mount, + base::Bind(&EncryptionMigrationScreenHandler::OnMountExistingVault, + weak_ptr_factory_.GetWeakPtr())); + + } else { + cryptohome::HomedirMethods::GetInstance()->MountEx( + cryptohome::Identification(user_context_.GetAccountId()), + cryptohome::Authorization(GetAuthKey()), mount, + base::Bind(&EncryptionMigrationScreenHandler::OnMountExistingVault, + weak_ptr_factory_.GetWeakPtr())); + } } void EncryptionMigrationScreenHandler::OnMountExistingVault( @@ -431,9 +519,7 @@ cryptohome::MountError return_code, const std::string& mount_hash) { if (!success || return_code != cryptohome::MOUNT_ERROR_NONE) { - RecordMigrationResult( - should_resume_ ? MigrationResult::MOUNT_FAILURE_IN_RESUMED_MIGRATION - : MigrationResult::MOUNT_FAILURE_IN_NEW_MIGRATION); + RecordMigrationResultMountFailure(should_resume_, IsArcKiosk()); UpdateUIState(UIState::MIGRATION_FAILED); return; } @@ -493,7 +579,11 @@ cryptohome::MountError return_code) { LOG_IF(ERROR, !success) << "Removing cryptohome failed. return code: " << return_code; - RecordRemoveCryptohomeResult(success, should_resume_); + if (success) + RecordRemoveCryptohomeResultSuccess(should_resume_, IsArcKiosk()); + else + RecordRemoveCryptohomeResultFailure(should_resume_, IsArcKiosk()); + UpdateUIState(UIState::MIGRATION_FAILED); } @@ -512,6 +602,10 @@ cryptohome::PRIV_DEFAULT); } +bool EncryptionMigrationScreenHandler::IsArcKiosk() const { + return user_context_.GetUserType() == user_manager::USER_TYPE_ARC_KIOSK_APP; +} + void EncryptionMigrationScreenHandler::OnMigrationProgress( cryptohome::DircryptoMigrationStatus status, uint64_t current, @@ -525,9 +619,7 @@ CallJS("setMigrationProgress", static_cast<double>(current) / total); break; case cryptohome::DIRCRYPTO_MIGRATION_SUCCESS: - RecordMigrationResult(should_resume_ - ? MigrationResult::SUCCESS_IN_RESUMED_MIGRATION - : MigrationResult::SUCCESS_IN_NEW_MIGRATION); + RecordMigrationResultSuccess(should_resume_, IsArcKiosk()); // If the battery level decreased during migration, record the consumed // battery level. if (*current_battery_percent_ < initial_battery_percent_) { @@ -540,9 +632,7 @@ DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart(); break; case cryptohome::DIRCRYPTO_MIGRATION_FAILED: - RecordMigrationResult( - should_resume_ ? MigrationResult::GENERAL_FAILURE_IN_RESUMED_MIGRATION - : MigrationResult::GENERAL_FAILURE_IN_NEW_MIGRATION); + RecordMigrationResultGeneralFailure(should_resume_, IsArcKiosk()); // Stop listening to the progress updates. DBusThreadManager::Get() ->GetCryptohomeClient() @@ -559,9 +649,7 @@ void EncryptionMigrationScreenHandler::OnMigrationRequested(bool success) { if (!success) { LOG(ERROR) << "Requesting MigrateToDircrypto failed."; - RecordMigrationResult( - should_resume_ ? MigrationResult::REQUEST_FAILURE_IN_RESUMED_MIGRATION - : MigrationResult::REQUEST_FAILURE_IN_NEW_MIGRATION); + RecordMigrationResultRequestFailure(should_resume_, IsArcKiosk()); UpdateUIState(UIState::MIGRATION_FAILED); } }
diff --git a/chrome/browser/ui/webui/chromeos/login/encryption_migration_screen_handler.h b/chrome/browser/ui/webui/chromeos/login/encryption_migration_screen_handler.h index ac9378c..ebda3c7 100644 --- a/chrome/browser/ui/webui/chromeos/login/encryption_migration_screen_handler.h +++ b/chrome/browser/ui/webui/chromeos/login/encryption_migration_screen_handler.h
@@ -87,6 +87,9 @@ // Creates authorization key for MountEx method using |user_context_|. cryptohome::KeyDefinition GetAuthKey(); + // True if the session is in ARC kiosk mode. + bool IsArcKiosk() const; + // Handlers for cryptohome API callbacks. void OnMigrationProgress(cryptohome::DircryptoMigrationStatus status, uint64_t current,
diff --git a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc b/chrome/browser/ui/webui/interstitials/interstitial_ui.cc index f4123b4..7605395c 100644 --- a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc +++ b/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
@@ -137,8 +137,9 @@ if (net::GetValueForKeyInQuery(web_contents->GetURL(), "url", &url_param)) { - if (GURL(url_param).is_valid()) + if (GURL(url_param).is_valid()) { request_url = GURL(url_param); + } } std::string overridable_param; if (net::GetValueForKeyInQuery(web_contents->GetURL(), @@ -152,6 +153,12 @@ &strict_enforcement_param)) { strict_enforcement = strict_enforcement_param == "1"; } + std::string type_param; + if (net::GetValueForKeyInQuery(web_contents->GetURL(), "type", &type_param)) { + if (type_param == "hpkp_failure") { + cert_error = net::ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN; + } + } net::SSLInfo ssl_info; ssl_info.cert = ssl_info.unverified_cert = CreateFakeCert(); // This delegate doesn't create an interstitial. @@ -224,8 +231,9 @@ if (net::GetValueForKeyInQuery(web_contents->GetURL(), "url", &url_param)) { - if (GURL(url_param).is_valid()) + if (GURL(url_param).is_valid()) { request_url = GURL(url_param); + } } GURL main_frame_url(request_url); // TODO(mattm): add flag to change main_frame_url or add dedicated flag to
diff --git a/chrome/browser/ui/webui/interstitials/interstitial_ui_browsertest.cc b/chrome/browser/ui/webui/interstitials/interstitial_ui_browsertest.cc index 87e4fcd4..9147c8d 100644 --- a/chrome/browser/ui/webui/interstitials/interstitial_ui_browsertest.cc +++ b/chrome/browser/ui/webui/interstitials/interstitial_ui_browsertest.cc
@@ -52,6 +52,11 @@ "Privacy error"); } +IN_PROC_BROWSER_TEST_F(InterstitialUITest, PinnedCertInterstitial) { + TestInterstitial(GURL("chrome://interstitials/ssl?type=hpkp_failure"), + "Privacy error"); +} + IN_PROC_BROWSER_TEST_F(InterstitialUITest, MalwareInterstitial) { TestInterstitial( GURL("chrome://interstitials/safebrowsing?type=malware"),
diff --git a/chrome/browser/ui/webui/media_router/media_router_ui.cc b/chrome/browser/ui/webui/media_router/media_router_ui.cc index 2e50d55..71a1fe9b 100644 --- a/chrome/browser/ui/webui/media_router/media_router_ui.cc +++ b/chrome/browser/ui/webui/media_router/media_router_ui.cc
@@ -569,6 +569,10 @@ } } + route_response_callbacks->push_back( + base::Bind(&MediaRouterUI::MaybeReportCastingSource, + weak_factory_.GetWeakPtr(), cast_mode)); + *timeout = GetRouteRequestTimeout(cast_mode); *incognito = Profile::FromWebUI(web_ui())->IsOffTheRecord(); @@ -744,6 +748,12 @@ SendIssueForRouteTimeout(cast_mode, presentation_request_source_name); } +void MediaRouterUI::MaybeReportCastingSource(MediaCastMode cast_mode, + const RouteRequestResult& result) { + if (result.result_code() == RouteRequestResult::OK) + MediaRouterMetrics::RecordMediaRouterCastingSource(cast_mode); +} + void MediaRouterUI::HandleCreateSessionRequestRouteResponse( const RouteRequestResult&) { Close();
diff --git a/chrome/browser/ui/webui/media_router/media_router_ui.h b/chrome/browser/ui/webui/media_router/media_router_ui.h index 05f6048..1b664dd 100644 --- a/chrome/browser/ui/webui/media_router/media_router_ui.h +++ b/chrome/browser/ui/webui/media_router/media_router_ui.h
@@ -293,6 +293,10 @@ const base::string16& presentation_request_source_name, const RouteRequestResult& result); + // Logs a UMA stat for the source that was cast if the result is successful. + void MaybeReportCastingSource(MediaCastMode cast_mode, + const RouteRequestResult& result); + // Closes the dialog after receiving a route response when using // |create_session_request_|. This prevents the dialog from trying to use the // same presentation request again.
diff --git a/chrome/browser/ui/webui/offline/offline_internals_ui_message_handler.cc b/chrome/browser/ui/webui/offline/offline_internals_ui_message_handler.cc index ab599f61..de7fec7 100644 --- a/chrome/browser/ui/webui/offline/offline_internals_ui_message_handler.cc +++ b/chrome/browser/ui/webui/offline/offline_internals_ui_message_handler.cc
@@ -29,6 +29,7 @@ #include "components/offline_pages/core/offline_page_feature.h" #include "components/offline_pages/core/prefetch/generate_page_bundle_request.h" #include "components/offline_pages/core/prefetch/get_operation_request.h" +#include "components/offline_pages/core/prefetch/prefetch_downloader.h" #include "components/offline_pages/core/prefetch/prefetch_service.h" #include "content/public/browser/web_ui.h" #include "net/base/network_change_notifier.h" @@ -348,6 +349,19 @@ weak_ptr_factory_.GetWeakPtr(), callback_id))); } +void OfflineInternalsUIMessageHandler::HandleDownloadArchive( + const base::ListValue* args) { + AllowJavascript(); + std::string name; + CHECK(args->GetString(0, &name)); + base::TrimWhitespaceASCII(name, base::TRIM_ALL, &name); + + if (prefetch_service_) { + prefetch_service_->GetPrefetchDownloader()->StartDownload( + base::GenerateGUID(), name); + } +} + void OfflineInternalsUIMessageHandler::HandlePrefetchRequestCallback( std::string callback_id, offline_pages::PrefetchRequestStatus status, @@ -510,6 +524,10 @@ "getOperation", base::Bind(&OfflineInternalsUIMessageHandler::HandleGetOperation, weak_ptr_factory_.GetWeakPtr())); + web_ui()->RegisterMessageCallback( + "downloadArchive", + base::Bind(&OfflineInternalsUIMessageHandler::HandleDownloadArchive, + weak_ptr_factory_.GetWeakPtr())); // Get the offline page model associated with this web ui. Profile* profile = Profile::FromWebUI(web_ui());
diff --git a/chrome/browser/ui/webui/offline/offline_internals_ui_message_handler.h b/chrome/browser/ui/webui/offline/offline_internals_ui_message_handler.h index 61da1724..00a595de 100644 --- a/chrome/browser/ui/webui/offline/offline_internals_ui_message_handler.h +++ b/chrome/browser/ui/webui/offline/offline_internals_ui_message_handler.h
@@ -82,6 +82,9 @@ // Sends and processes a request to get the info about an operation. void HandleGetOperation(const base::ListValue* args); + // Downloads an archive. + void HandleDownloadArchive(const base::ListValue* args); + // Callback for async GetAllPages calls. void HandleStoredPagesCallback( std::string callback_id, @@ -109,12 +112,6 @@ const std::string& operation_name, const std::vector<offline_pages::RenderPageInfo>& pages); - // Callback for GetOperation calls. - void HandleGetOperationCallback( - std::string callback_id, - offline_pages::PrefetchRequestStatus status, - const std::vector<offline_pages::RenderPageInfo>& pages); - // Offline page model to call methods on. offline_pages::OfflinePageModel* offline_page_model_;
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc index 1f29ef4..7b05dfc 100644 --- a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc +++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
@@ -188,8 +188,6 @@ // Dictionary field to indicate whether Chrome is running in forced app (app // kiosk) mode. It's not the same as desktop Chrome kiosk (the one above). const char kAppKioskMode[] = "appKioskMode"; -// Dictionary field to store Cloud Print base URL. -const char kCloudPrintUrl[] = "cloudPrintUrl"; // Name of a dictionary field holding the state of selection for document. const char kDocumentHasSelection[] = "documentHasSelection"; // Dictionary field holding the default destination selection rules. @@ -1035,19 +1033,11 @@ // Set ID to know whether printing is for preview. settings->SetInteger(printing::kPreviewUIID, print_preview_ui()->GetIDForPrintPreviewUI()); - RenderFrameHost* rfh = preview_web_contents()->GetMainFrame(); - rfh->Send(new PrintMsg_PrintForPrintPreview(rfh->GetRoutingID(), *settings)); - // Set this so when print preview sends "hidePreviewDialog" we clear the - // initiator and call PrintPreviewDone(). In the cases above, the preview - // dialog stays open until printing is finished and we do this when the - // dialog is closed. In this case, we set this so that these tasks are - // done in HandleHidePreview(). - printing_started_ = true; - - // This will ultimately try to activate the initiator as well, so do not - // clear the association with the initiator until "hidePreviewDialog" is - // received from JS. + // Save the settings and notify print preview. Print preview will respond + // with a "hidePreviewDialog" message, and then the message can be sent to + // the renderer in HandleHidePreview(). + settings_ = std::move(settings); ResolveJavascriptCallback(base::Value(callback_id), base::Value()); #else @@ -1087,10 +1077,16 @@ } void PrintPreviewHandler::HandleHidePreview(const base::ListValue* /*args*/) { - if (printing_started_) { - // Printing has started, so clear the initiator so that it can open a new - // print preview dialog, while the current print preview dialog is still - // handling its print job. + if (settings_) { + // Print preview is responding to a resolution of "print" promise. Send the + // print message to the renderer. + RenderFrameHost* rfh = preview_web_contents()->GetMainFrame(); + rfh->Send( + new PrintMsg_PrintForPrintPreview(rfh->GetRoutingID(), *settings_)); + settings_.reset(); + + // Clear the initiator so that it can open a new print preview dialog, while + // the current print preview dialog is still handling its print job. WebContents* initiator = GetInitiator(); ClearInitiatorDetails(); @@ -1100,9 +1096,6 @@ auto* print_view_manager = PrintViewManager::FromWebContents(initiator); print_view_manager->PrintPreviewDone(); } - - // Since the initiator is cleared, only want to do this once. - printing_started_ = false; } print_preview_ui()->OnHidePreviewDialog(); @@ -1433,11 +1426,10 @@ preview_web_contents()->GetBrowserContext()); PrefService* prefs = profile->GetPrefs(); if (prefs->GetBoolean(prefs::kCloudPrintSubmitEnabled)) { - base::DictionaryValue settings; - settings.SetString(kCloudPrintUrl, - GURL(cloud_devices::GetCloudPrintURL()).spec()); - settings.SetBoolean(kAppKioskMode, chrome::IsRunningInForcedAppMode()); - web_ui()->CallJavascriptFunctionUnsafe("setUseCloudPrint", settings); + FireWebUIListener( + "use-cloud-print", + base::Value(GURL(cloud_devices::GetCloudPrintURL()).spec()), + base::Value(chrome::IsRunningInForcedAppMode())); } }
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.h b/chrome/browser/ui/webui/print_preview/print_preview_handler.h index 35b50cf..3fc478f6 100644 --- a/chrome/browser/ui/webui/print_preview/print_preview_handler.h +++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.h
@@ -432,7 +432,9 @@ // Callback ID to be used to notify UI that PDF file selection has finished. std::string pdf_callback_id_; - bool printing_started_ = false; + // Print settings to use in the local print request to send when + // HandleHidePreview() is called. + std::unique_ptr<base::DictionaryValue> settings_; // Proxy for calls to the print backend. Lazily initialized since web_ui() is // not available at construction time.
diff --git a/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc index 928d1b9..c6fe9e83 100644 --- a/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc +++ b/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
@@ -754,11 +754,9 @@ {"powerIdleDisplayOff", IDS_SETTINGS_POWER_IDLE_DISPLAY_OFF}, {"powerIdleDisplayOn", IDS_SETTINGS_POWER_IDLE_DISPLAY_ON}, {"powerIdleOther", IDS_SETTINGS_POWER_IDLE_OTHER}, - {"powerLidClosedLabel", IDS_SETTINGS_POWER_LID_CLOSED_LABEL}, - {"powerLidClosedSleep", IDS_SETTINGS_POWER_LID_CLOSED_SLEEP}, - {"powerLidClosedStayAwake", IDS_SETTINGS_POWER_LID_CLOSED_STAY_AWAKE}, - {"powerLidClosedSignOut", IDS_SETTINGS_POWER_LID_CLOSED_SIGN_OUT}, - {"powerLidClosedShutDown", IDS_SETTINGS_POWER_LID_CLOSED_SHUT_DOWN}, + {"powerLidSleepLabel", IDS_SETTINGS_POWER_LID_CLOSED_SLEEP_LABEL}, + {"powerLidSignOutLabel", IDS_SETTINGS_POWER_LID_CLOSED_SIGN_OUT_LABEL}, + {"powerLidShutDownLabel", IDS_SETTINGS_POWER_LID_CLOSED_SHUT_DOWN_LABEL}, }; AddLocalizedStringsBulk(html_source, power_strings, arraysize(power_strings));
diff --git a/chrome/browser/win/chrome_select_file_dialog_factory.cc b/chrome/browser/win/chrome_select_file_dialog_factory.cc index 87338fe..a0ea71c2 100644 --- a/chrome/browser/win/chrome_select_file_dialog_factory.cc +++ b/chrome/browser/win/chrome_select_file_dialog_factory.cc
@@ -4,319 +4,113 @@ #include "chrome/browser/win/chrome_select_file_dialog_factory.h" -#include <Windows.h> -#include <commdlg.h> +#include <utility> +#include <vector> #include "base/bind.h" #include "base/bind_helpers.h" -#include "base/callback.h" -#include "base/location.h" -#include "base/logging.h" -#include "base/macros.h" -#include "base/metrics/field_trial.h" +#include "base/feature_list.h" +#include "base/memory/ptr_util.h" #include "base/strings/string16.h" -#include "base/synchronization/waitable_event.h" -#include "chrome/common/chrome_utility_messages.h" +#include "base/strings/string_util.h" +#include "base/win/win_util.h" +#include "chrome/common/shell_handler_win.mojom.h" #include "chrome/grit/generated_resources.h" -#include "content/public/browser/utility_process_host.h" -#include "content/public/browser/utility_process_host_client.h" -#include "ipc/ipc_message_macros.h" +#include "content/public/browser/utility_process_mojo_client.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/win/open_file_name_win.h" #include "ui/shell_dialogs/select_file_dialog_win.h" namespace { -bool ShouldIsolateShellOperations() { - return base::FieldTrialList::FindFullName("IsolateShellOperations") == - "Enabled"; -} +constexpr base::Feature kIsolateShellOperations{ + "IsolateShellOperations", base::FEATURE_DISABLED_BY_DEFAULT}; -// Receives the GetOpenFileName result from the utility process. -class GetOpenFileNameClient : public content::UtilityProcessHostClient { - public: - GetOpenFileNameClient(); +using UtilityProcessClient = + content::UtilityProcessMojoClient<chrome::mojom::ShellHandler>; - // Blocks until the GetOpenFileName result is received (including failure to - // launch or a crash of the utility process). - void WaitForCompletion(); +std::unique_ptr<UtilityProcessClient> StartUtilityProcess() { + auto utility_process_client = base::MakeUnique<UtilityProcessClient>( + l10n_util::GetStringUTF16(IDS_UTILITY_PROCESS_FILE_DIALOG_NAME)); - // Returns the selected directory. - const base::FilePath& directory() const { return directory_; } + // TODO(crbug.com/618459): should we change the mojo utility client + // to allow an empty error callback? Currently, the client DCHECKs + // if no error callback is set when Start() is called. + utility_process_client->set_error_callback(base::Bind(&base::DoNothing)); - // Returns the list of selected filenames. Each should be interpreted as a - // child of directory(). - const std::vector<base::FilePath>& filenames() const { return filenames_; } + utility_process_client->set_disable_sandbox(); - // UtilityProcessHostClient implementation - void OnProcessCrashed(int exit_code) override; - void OnProcessLaunchFailed(int error_code) override; - bool OnMessageReceived(const IPC::Message& message) override; + utility_process_client->Start(); - protected: - ~GetOpenFileNameClient() override; - - private: - void OnResult(const base::FilePath& directory, - const std::vector<base::FilePath>& filenames); - void OnFailure(); - - base::FilePath directory_; - std::vector<base::FilePath> filenames_; - base::WaitableEvent event_; - - DISALLOW_COPY_AND_ASSIGN(GetOpenFileNameClient); -}; - -GetOpenFileNameClient::GetOpenFileNameClient() - : event_(base::WaitableEvent::ResetPolicy::MANUAL, - base::WaitableEvent::InitialState::NOT_SIGNALED) {} - -void GetOpenFileNameClient::WaitForCompletion() { - event_.Wait(); -} - -void GetOpenFileNameClient::OnProcessCrashed(int exit_code) { - event_.Signal(); -} - -void GetOpenFileNameClient::OnProcessLaunchFailed(int error_code) { - event_.Signal(); -} - -bool GetOpenFileNameClient::OnMessageReceived(const IPC::Message& message) { - bool handled = true; - IPC_BEGIN_MESSAGE_MAP(GetOpenFileNameClient, message) - IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_GetOpenFileName_Failed, - OnFailure) - IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_GetOpenFileName_Result, - OnResult) - IPC_MESSAGE_UNHANDLED(handled = false) - IPC_END_MESSAGE_MAP() - return handled; -} - -GetOpenFileNameClient::~GetOpenFileNameClient() {} - -void GetOpenFileNameClient::OnResult( - const base::FilePath& directory, - const std::vector<base::FilePath>& filenames) { - directory_ = directory; - filenames_ = filenames; - event_.Signal(); -} - -void GetOpenFileNameClient::OnFailure() { - event_.Signal(); -} - -// Initiates IPC with a new utility process using |client|. Instructs the -// utility process to call GetOpenFileName with |ofn|. |current_task_runner| -// must be the currently executing task runner. -void DoInvokeGetOpenFileName( - OPENFILENAME* ofn, - scoped_refptr<GetOpenFileNameClient> client, - const scoped_refptr<base::SequencedTaskRunner>& current_task_runner) { - DCHECK(current_task_runner->RunsTasksInCurrentSequence()); - - base::WeakPtr<content::UtilityProcessHost> utility_process_host( - content::UtilityProcessHost::Create(client, current_task_runner) - ->AsWeakPtr()); - utility_process_host->SetName(l10n_util::GetStringUTF16( - IDS_UTILITY_PROCESS_FILE_DIALOG_NAME)); - utility_process_host->DisableSandbox(); - utility_process_host->Send(new ChromeUtilityMsg_GetOpenFileName( - ofn->hwndOwner, - ofn->Flags & ~OFN_ENABLEHOOK, // We can't send a hook function over IPC. - ui::win::OpenFileName::GetFilters(ofn), - base::FilePath(ofn->lpstrInitialDir ? ofn->lpstrInitialDir - : base::string16()), - base::FilePath(ofn->lpstrFile))); -} - -// Invokes GetOpenFileName in a utility process. Blocks until the result is -// received. Uses |blocking_task_runner| for IPC. -bool GetOpenFileNameInUtilityProcess( - const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, - OPENFILENAME* ofn) { - scoped_refptr<GetOpenFileNameClient> client(new GetOpenFileNameClient); - blocking_task_runner->PostTask( - FROM_HERE, - base::Bind(&DoInvokeGetOpenFileName, - base::Unretained(ofn), client, blocking_task_runner)); - client->WaitForCompletion(); - - if (client->filenames().empty()) - return false; - - ui::win::OpenFileName::SetResult( - client->directory(), client->filenames(), ofn); - return true; -} - -// Implements GetOpenFileName for CreateWinSelectFileDialog by delegating to a -// utility process. -bool GetOpenFileNameImpl( - const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, - OPENFILENAME* ofn) { - if (ShouldIsolateShellOperations()) - return GetOpenFileNameInUtilityProcess(blocking_task_runner, ofn); - - return ::GetOpenFileName(ofn) == TRUE; -} - -class GetSaveFileNameClient : public content::UtilityProcessHostClient { - public: - GetSaveFileNameClient(); - - // Blocks until the GetSaveFileName result is received (including failure to - // launch or a crash of the utility process). - void WaitForCompletion(); - - // Returns the selected path. - const base::FilePath& path() const { return path_; } - - // Returns the index of the user-selected filter. - int one_based_filter_index() const { return one_based_filter_index_; } - - // UtilityProcessHostClient implementation - void OnProcessCrashed(int exit_code) override; - void OnProcessLaunchFailed(int error_code) override; - bool OnMessageReceived(const IPC::Message& message) override; - - protected: - ~GetSaveFileNameClient() override; - - private: - void OnResult(const base::FilePath& path, int one_based_filter_index); - void OnFailure(); - - base::FilePath path_; - int one_based_filter_index_; - base::WaitableEvent event_; - - DISALLOW_COPY_AND_ASSIGN(GetSaveFileNameClient); -}; - -GetSaveFileNameClient::GetSaveFileNameClient() - : one_based_filter_index_(0), - event_(base::WaitableEvent::ResetPolicy::MANUAL, - base::WaitableEvent::InitialState::NOT_SIGNALED) {} - -void GetSaveFileNameClient::WaitForCompletion() { - event_.Wait(); -} - -void GetSaveFileNameClient::OnProcessCrashed(int exit_code) { - event_.Signal(); -} - -void GetSaveFileNameClient::OnProcessLaunchFailed(int error_code) { - event_.Signal(); -} - -bool GetSaveFileNameClient::OnMessageReceived(const IPC::Message& message) { - bool handled = true; - IPC_BEGIN_MESSAGE_MAP(GetSaveFileNameClient, message) - IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_GetSaveFileName_Failed, - OnFailure) - IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_GetSaveFileName_Result, - OnResult) - IPC_MESSAGE_UNHANDLED(handled = false) - IPC_END_MESSAGE_MAP() - return handled; -} - -GetSaveFileNameClient::~GetSaveFileNameClient() {} - -void GetSaveFileNameClient::OnResult(const base::FilePath& path, - int one_based_filter_index) { - path_ = path; - one_based_filter_index_ = one_based_filter_index; - event_.Signal(); -} - -void GetSaveFileNameClient::OnFailure() { - event_.Signal(); -} - -// Initiates IPC with a new utility process using |client|. Instructs the -// utility process to call GetSaveFileName with |ofn|. |current_task_runner| -// must be the currently executing task runner. -void DoInvokeGetSaveFileName( - OPENFILENAME* ofn, - scoped_refptr<GetSaveFileNameClient> client, - const scoped_refptr<base::SequencedTaskRunner>& current_task_runner) { - DCHECK(current_task_runner->RunsTasksInCurrentSequence()); - - base::WeakPtr<content::UtilityProcessHost> utility_process_host( - content::UtilityProcessHost::Create(client, current_task_runner) - ->AsWeakPtr()); - utility_process_host->SetName(l10n_util::GetStringUTF16( - IDS_UTILITY_PROCESS_FILE_DIALOG_NAME)); - utility_process_host->DisableSandbox(); - ChromeUtilityMsg_GetSaveFileName_Params params; - params.owner = ofn->hwndOwner; - // We can't pass the hook function over IPC. - params.flags = ofn->Flags & ~OFN_ENABLEHOOK; - params.filters = ui::win::OpenFileName::GetFilters(ofn); - params.one_based_filter_index = ofn->nFilterIndex; - params.suggested_filename = base::FilePath(ofn->lpstrFile); - params.initial_directory = base::FilePath( - ofn->lpstrInitialDir ? ofn->lpstrInitialDir : base::string16()); - params.default_extension = - ofn->lpstrDefExt ? base::string16(ofn->lpstrDefExt) : base::string16(); - - utility_process_host->Send(new ChromeUtilityMsg_GetSaveFileName(params)); -} - -// Invokes GetSaveFileName in a utility process. Blocks until the result is -// received. Uses |blocking_task_runner| for IPC. -bool GetSaveFileNameInUtilityProcess( - const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, - OPENFILENAME* ofn) { - scoped_refptr<GetSaveFileNameClient> client(new GetSaveFileNameClient); - blocking_task_runner->PostTask( - FROM_HERE, - base::Bind(&DoInvokeGetSaveFileName, - base::Unretained(ofn), client, blocking_task_runner)); - client->WaitForCompletion(); - - if (client->path().empty()) - return false; - - base::wcslcpy(ofn->lpstrFile, client->path().value().c_str(), ofn->nMaxFile); - ofn->nFilterIndex = client->one_based_filter_index(); - - return true; -} - -// Implements GetSaveFileName for CreateWinSelectFileDialog by delegating to a -// utility process. -bool GetSaveFileNameImpl( - const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, - OPENFILENAME* ofn) { - if (ShouldIsolateShellOperations()) - return GetSaveFileNameInUtilityProcess(blocking_task_runner, ofn); - - return ::GetSaveFileName(ofn) == TRUE; + return utility_process_client; } } // namespace -ChromeSelectFileDialogFactory::ChromeSelectFileDialogFactory( - const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner) - : blocking_task_runner_(blocking_task_runner) { -} +ChromeSelectFileDialogFactory::ChromeSelectFileDialogFactory() = default; -ChromeSelectFileDialogFactory::~ChromeSelectFileDialogFactory() {} +ChromeSelectFileDialogFactory::~ChromeSelectFileDialogFactory() = default; ui::SelectFileDialog* ChromeSelectFileDialogFactory::Create( ui::SelectFileDialog::Listener* listener, ui::SelectFilePolicy* policy) { return ui::CreateWinSelectFileDialog( - listener, - policy, - base::Bind(GetOpenFileNameImpl, blocking_task_runner_), - base::Bind(GetSaveFileNameImpl, blocking_task_runner_)); + listener, policy, + base::Bind(&ChromeSelectFileDialogFactory::BlockingGetOpenFileName), + base::Bind(&ChromeSelectFileDialogFactory::BlockingGetSaveFileName)); +} + +// static +bool ChromeSelectFileDialogFactory::BlockingGetOpenFileName(OPENFILENAME* ofn) { + if (!base::FeatureList::IsEnabled(kIsolateShellOperations)) + return ::GetOpenFileName(ofn) == TRUE; + + auto utility_process_client = StartUtilityProcess(); + + mojo::SyncCallRestrictions::ScopedAllowSyncCall allow_sync_call; + std::vector<base::FilePath> files; + base::FilePath directory; + + utility_process_client->service()->CallGetOpenFileName( + base::win::HandleToUint32(ofn->hwndOwner), + static_cast<uint32_t>(ofn->Flags & ~OFN_ENABLEHOOK), + ui::win::OpenFileName::GetFilters(ofn), + ofn->lpstrInitialDir ? base::FilePath(ofn->lpstrInitialDir) + : base::FilePath(), + base::FilePath(ofn->lpstrFile), &directory, &files); + + if (files.empty()) + return false; + + ui::win::OpenFileName::SetResult(directory, files, ofn); + return true; +} + +// static +bool ChromeSelectFileDialogFactory::BlockingGetSaveFileName(OPENFILENAME* ofn) { + if (!base::FeatureList::IsEnabled(kIsolateShellOperations)) + return ::GetSaveFileName(ofn) == TRUE; + + auto utility_process_client = StartUtilityProcess(); + + mojo::SyncCallRestrictions::ScopedAllowSyncCall allow_sync_call; + uint32_t filter_index = 0; + base::FilePath path; + + utility_process_client->service()->CallGetSaveFileName( + base::win::HandleToUint32(ofn->hwndOwner), + static_cast<uint32_t>(ofn->Flags & ~OFN_ENABLEHOOK), + ui::win::OpenFileName::GetFilters(ofn), ofn->nFilterIndex, + ofn->lpstrInitialDir ? base::FilePath(ofn->lpstrInitialDir) + : base::FilePath(), + base::FilePath(ofn->lpstrFile), + ofn->lpstrDefExt ? base::string16(ofn->lpstrDefExt) : base::string16(), + &path, &filter_index); + + if (path.empty()) + return false; + + base::wcslcpy(ofn->lpstrFile, path.value().c_str(), ofn->nMaxFile); + ofn->nFilterIndex = static_cast<DWORD>(filter_index); + return true; }
diff --git a/chrome/browser/win/chrome_select_file_dialog_factory.h b/chrome/browser/win/chrome_select_file_dialog_factory.h index b1d8745f..6c0f1c0 100644 --- a/chrome/browser/win/chrome_select_file_dialog_factory.h +++ b/chrome/browser/win/chrome_select_file_dialog_factory.h
@@ -5,32 +5,27 @@ #ifndef CHROME_BROWSER_WIN_CHROME_SELECT_FILE_DIALOG_FACTORY_H_ #define CHROME_BROWSER_WIN_CHROME_SELECT_FILE_DIALOG_FACTORY_H_ -#include "base/compiler_specific.h" +#include <Windows.h> +#include <commdlg.h> + #include "base/macros.h" -#include "base/memory/ref_counted.h" #include "ui/shell_dialogs/select_file_dialog_factory.h" -namespace base { -class SequencedTaskRunner; -} // namespace base - -// Implements a Select File dialog that delegates to a Metro file picker on -// Metro and to a utility process otherwise. The utility process is used in -// order to isolate the Chrome browser process from potential instability -// caused by Shell extension modules loaded by GetOpenFileName. +// Implements a file Open / Save dialog in a utility process. The utility +// process is used to isolate the Chrome browser process from potential +// instability caused by Shell extension modules loaded by ::GetOpenFileName +// and ::GetSaveFileName. class ChromeSelectFileDialogFactory : public ui::SelectFileDialogFactory { public: - // Uses |blocking_task_runner| to perform IPC with the utility process. - explicit ChromeSelectFileDialogFactory( - const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner); + ChromeSelectFileDialogFactory(); ~ChromeSelectFileDialogFactory() override; - // ui::SelectFileDialogFactory implementation + // ui::SelectFileDialogFactory: ui::SelectFileDialog* Create(ui::SelectFileDialog::Listener* listener, ui::SelectFilePolicy* policy) override; - private: - scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; + static bool BlockingGetOpenFileName(OPENFILENAME* ofn); + static bool BlockingGetSaveFileName(OPENFILENAME* ofn); DISALLOW_COPY_AND_ASSIGN(ChromeSelectFileDialogFactory); };
diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn index 5a5cd912..be73029 100644 --- a/chrome/common/BUILD.gn +++ b/chrome/common/BUILD.gn
@@ -659,7 +659,6 @@ mojom("mojo_bindings") { sources = [ "cache_stats_recorder.mojom", - "conflicts/module_event_sink_win.mojom", "file_patcher.mojom", "image_context_menu_renderer.mojom", "insecure_content_renderer.mojom", @@ -669,10 +668,16 @@ "prerender.mojom", "renderer_configuration.mojom", "resource_usage_reporter.mojom", - "shell_handler_win.mojom", "thumbnail_capturer.mojom", ] + if (is_win) { + sources += [ + "conflicts/module_event_sink_win.mojom", + "shell_handler_win.mojom", + ] + } + if (is_chromeos) { sources += [ "zip_file_creator.mojom" ] }
diff --git a/chrome/common/chrome_utility_messages.h b/chrome/common/chrome_utility_messages.h index 045a338..a60c443 100644 --- a/chrome/common/chrome_utility_messages.h +++ b/chrome/common/chrome_utility_messages.h
@@ -4,17 +4,9 @@ // Multiply-included message file, so no include guard. -#if defined(OS_WIN) -#include <Windows.h> -#endif // defined(OS_WIN) +// TODO(noel): rename this file to a param traits variant for the full safe +// browsing feature, and remove all remaining #include of this file. -#include <string> -#include <tuple> -#include <vector> - -#include "base/files/file_path.h" -#include "base/strings/string16.h" -#include "base/values.h" #include "build/build_config.h" #include "ipc/ipc_message_macros.h" @@ -24,21 +16,6 @@ #include "chrome/common/safe_browsing/protobuf_message_param_traits.h" #endif -// Singly-included section for typedefs. -#ifndef CHROME_COMMON_CHROME_UTILITY_MESSAGES_H_ -#define CHROME_COMMON_CHROME_UTILITY_MESSAGES_H_ - -#if defined(OS_WIN) -// A vector of filters, each being a tuple containing a display string (i.e. -// "Text Files") and a filter pattern (i.e. "*.txt"). -typedef std::vector<std::tuple<base::string16, base::string16>> - GetOpenFileNameFilter; -#endif // OS_WIN - -#endif // CHROME_COMMON_CHROME_UTILITY_MESSAGES_H_ - -#define IPC_MESSAGE_START ChromeUtilityMsgStart - #if defined(FULL_SAFE_BROWSING) IPC_ENUM_TRAITS_VALIDATE( safe_browsing::ClientDownloadRequest_DownloadType, @@ -120,53 +97,3 @@ IPC_STRUCT_TRAITS_MEMBER(archived_archive_filenames) IPC_STRUCT_TRAITS_END() #endif // FULL_SAFE_BROWSING - -#if defined(OS_WIN) -IPC_STRUCT_BEGIN(ChromeUtilityMsg_GetSaveFileName_Params) - IPC_STRUCT_MEMBER(HWND, owner) - IPC_STRUCT_MEMBER(DWORD, flags) - IPC_STRUCT_MEMBER(GetOpenFileNameFilter, filters) - IPC_STRUCT_MEMBER(int, one_based_filter_index) - IPC_STRUCT_MEMBER(base::FilePath, suggested_filename) - IPC_STRUCT_MEMBER(base::FilePath, initial_directory) - IPC_STRUCT_MEMBER(base::string16, default_extension) -IPC_STRUCT_END() -#endif // OS_WIN - -//------------------------------------------------------------------------------ -// Utility process messages: -// These are messages from the browser to the utility process. - -#if defined(OS_WIN) -// Instructs the utility process to invoke GetOpenFileName. |owner| is the -// parent of the modal dialog, |flags| are OFN_* flags. |filter| constrains the -// user's file choices. |initial_directory| and |filename| select the directory -// to be displayed and the file to be initially selected. -// -// Either ChromeUtilityHostMsg_GetOpenFileName_Failed or -// ChromeUtilityHostMsg_GetOpenFileName_Result will be returned when the -// operation completes whether due to error or user action. -IPC_MESSAGE_CONTROL5(ChromeUtilityMsg_GetOpenFileName, - HWND /* owner */, - DWORD /* flags */, - GetOpenFileNameFilter /* filter */, - base::FilePath /* initial_directory */, - base::FilePath /* filename */) -IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_GetSaveFileName, - ChromeUtilityMsg_GetSaveFileName_Params /* params */) -#endif // defined(OS_WIN) - -//------------------------------------------------------------------------------ -// Utility process host messages: -// These are messages from the utility process to the browser. - -#if defined(OS_WIN) -IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_GetOpenFileName_Failed) -IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_GetOpenFileName_Result, - base::FilePath /* directory */, - std::vector<base::FilePath> /* filenames */) -IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_GetSaveFileName_Failed) -IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_GetSaveFileName_Result, - base::FilePath /* path */, - int /* one_based_filter_index */) -#endif // defined(OS_WIN)
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc index efd6292..fc7203d 100644 --- a/chrome/common/pref_names.cc +++ b/chrome/common/pref_names.cc
@@ -57,6 +57,12 @@ // A preference that indicates that user accepted Assistant Value Prop. const char kArcVoiceInteractionValuePropAccepted[] = "arc.voice_interaction_value_prop.accepted"; +// A preference that indicates the user has enabled voice interaction services. +const char kVoiceInteractionEnabled[] = "settings.voice_interaction.enabled"; +// A preference that indicates the user has enabled providing context to +// voice interaction services. +const char kVoiceInteractionContextEnabled[] = + "settings.voice_interaction.context.enabled"; #endif // A bool pref that keeps whether the child status for this profile was already
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h index 184079a..a788216a 100644 --- a/chrome/common/pref_names.h +++ b/chrome/common/pref_names.h
@@ -34,6 +34,8 @@ extern const char kArcSignedIn[]; extern const char kArcCompatibleFilesystemChosen[]; extern const char kArcVoiceInteractionValuePropAccepted[]; +extern const char kVoiceInteractionEnabled[]; +extern const char kVoiceInteractionContextEnabled[]; #endif extern const char kChildAccountStatusKnown[]; extern const char kDefaultApps[];
diff --git a/chrome/common/profiling/BUILD.gn b/chrome/common/profiling/BUILD.gn index 16464eea..b455adbb 100644 --- a/chrome/common/profiling/BUILD.gn +++ b/chrome/common/profiling/BUILD.gn
@@ -12,6 +12,8 @@ "memlog_sender.cc", "memlog_sender.h", "memlog_sender_pipe.h", + "memlog_sender_pipe_posix.cc", + "memlog_sender_pipe_posix.h", "memlog_sender_pipe_win.cc", "memlog_sender_pipe_win.h", "memlog_stream.cc",
diff --git a/chrome/common/profiling/memlog_allocator_shim.cc b/chrome/common/profiling/memlog_allocator_shim.cc index 9ff84cf..346837f5 100644 --- a/chrome/common/profiling/memlog_allocator_shim.cc +++ b/chrome/common/profiling/memlog_allocator_shim.cc
@@ -5,10 +5,12 @@ #include "chrome/common/profiling/memlog_allocator_shim.h" #include "base/allocator/allocator_shim.h" +#include "base/allocator/features.h" #include "base/debug/debugging_flags.h" #include "base/debug/stack_trace.h" #include "base/synchronization/lock.h" #include "base/trace_event/heap_profiler_allocation_register.h" +#include "build/build_config.h" #include "chrome/common/profiling/memlog_stream.h" namespace profiling { @@ -71,6 +73,7 @@ g_send_buffers[bin_to_use].Send(data, size); } +#if BUILDFLAG(USE_ALLOCATOR_SHIM) void* HookAlloc(const AllocatorDispatch* self, size_t size, void* context) { const AllocatorDispatch* const next = self->next; void* ptr = next->alloc_function(next, size, context); @@ -167,6 +170,7 @@ &HookFreeDefiniteSize, // free_definite_size_function nullptr, // next }; +#endif // BUILDFLAG(USE_ALLOCATOR_SHIM) } // namespace @@ -174,7 +178,7 @@ g_send_buffers = new SendBuffer[kNumSendBuffers]; g_sender_pipe = sender_pipe; -#ifdef NDEBUG +#if BUILDFLAG(USE_ALLOCATOR_SHIM) base::allocator::InsertAllocatorDispatch(&g_memlog_hooks); #endif }
diff --git a/chrome/common/profiling/memlog_sender_pipe.h b/chrome/common/profiling/memlog_sender_pipe.h index ba2653e..5123ff0 100644 --- a/chrome/common/profiling/memlog_sender_pipe.h +++ b/chrome/common/profiling/memlog_sender_pipe.h
@@ -9,6 +9,8 @@ #if defined(OS_WIN) #include "chrome/common/profiling/memlog_sender_pipe_win.h" +#else +#include "chrome/common/profiling/memlog_sender_pipe_posix.h" #endif #endif // CHROME_COMMON_PROFILING_MEMLOG_SENDER_PIPE_H_
diff --git a/chrome/common/profiling/memlog_sender_pipe_posix.cc b/chrome/common/profiling/memlog_sender_pipe_posix.cc new file mode 100644 index 0000000..23cd27761 --- /dev/null +++ b/chrome/common/profiling/memlog_sender_pipe_posix.cc
@@ -0,0 +1,31 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/common/profiling/memlog_sender_pipe_posix.h" + +#include <unistd.h> + +#include "base/logging.h" +#include "base/posix/eintr_wrapper.h" +#include "chrome/common/profiling/memlog_stream.h" + +namespace profiling { + +MemlogSenderPipe::MemlogSenderPipe(const std::string& pipe_id) + : pipe_id_(pipe_id), fd_(-1) {} + +MemlogSenderPipe::~MemlogSenderPipe() { + if (fd_ != -1) + IGNORE_EINTR(::close(fd_)); +} + +bool MemlogSenderPipe::Connect() { + return false; +} + +bool MemlogSenderPipe::Send(const void* data, size_t sz) { + return false; +} + +} // namespace profiling
diff --git a/chrome/common/profiling/memlog_sender_pipe_posix.h b/chrome/common/profiling/memlog_sender_pipe_posix.h new file mode 100644 index 0000000..41aef2f --- /dev/null +++ b/chrome/common/profiling/memlog_sender_pipe_posix.h
@@ -0,0 +1,33 @@ +// 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_COMMON_PROFILING_MEMLOG_SENDER_PIPE_POSIX_H_ +#define CHROME_COMMON_PROFILING_MEMLOG_SENDER_PIPE_POSIX_H_ + +#include <string> + +#include "base/macros.h" + +namespace profiling { + +class MemlogSenderPipe { + public: + explicit MemlogSenderPipe(const std::string& pipe_id); + ~MemlogSenderPipe(); + + bool Connect(); + + bool Send(const void* data, size_t sz); + + private: + std::string pipe_id_; + + int fd_; + + DISALLOW_COPY_AND_ASSIGN(MemlogSenderPipe); +}; + +} // namespace profiling + +#endif // CHROME_COMMON_PROFILING_MEMLOG_SENDER_PIPE_POSIX_H_
diff --git a/chrome/common/shell_handler_win.mojom b/chrome/common/shell_handler_win.mojom index 0739aad99..099e084 100644 --- a/chrome/common/shell_handler_win.mojom +++ b/chrome/common/shell_handler_win.mojom
@@ -2,9 +2,59 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// Utility process interface exposed to the browser process on OS_WIN, for +// calling OS_WIN task pinning and file open/save dialog API. + module chrome.mojom; +import "mojo/common/file_path.mojom"; +import "mojo/common/string16.mojom"; + interface ShellHandler { // Returns the pinned state of the current executable. IsPinnedToTaskbar() => (bool succeeded, bool is_pinned_to_taskbar); + + // Calls OS_WIN ::GetOpenFileName() with parameters: + // |owner| HWND to use as the parent of the modal dialog. + // |flags| OFN_* flags to use with OPENFILENAME. + // |filters| constrains the user's file type selections. + // |initial_directory| initial directory to be displayed. + // |initial_filename| file name initially selected. + // + // Returns the list of selected |files| from |directory|. On cancelation + // or failure, |files| will be empty. + [Sync] + CallGetOpenFileName(uint32 owner, + uint32 flags, + FileExtensionFilters filters, + mojo.common.mojom.FilePath initial_directory, + mojo.common.mojom.FilePath initial_filename) => + (mojo.common.mojom.FilePath directory, + array<mojo.common.mojom.FilePath> files); + + // Calls OS_WIN ::GetSaveFileName() with parameters: + // |owner| HWND to use as the parent of the modal dialog. + // |flags| OFN_* flags to use with OPENFILENAME. + // |filters| constrains the user's file type selections. + // |one_based_filter_index| index of the selected filter in |filters|. + // |initial_directory| initial directory to be displayed. + // |suggested_filename| save file name to suggest. + // |default_extension| file extension to use if the user doesn't type one. + // + // Returns the save file |path| selected, and the |filter_index| of the + // filter selected, by the user. On cancelation or failure, |path| will + // be empty. + [Sync] + CallGetSaveFileName(uint32 owner, + uint32 flags, + FileExtensionFilters filters, + uint32 one_based_filter_index, + mojo.common.mojom.FilePath initial_directory, + mojo.common.mojom.FilePath suggested_filename, + mojo.common.mojom.String16 default_extension) => + (mojo.common.mojom.FilePath path, + uint32 filter_index); }; + +[Native] +struct FileExtensionFilters;
diff --git a/chrome/common/shell_handler_win.typemap b/chrome/common/shell_handler_win.typemap new file mode 100644 index 0000000..0a596ac --- /dev/null +++ b/chrome/common/shell_handler_win.typemap
@@ -0,0 +1,14 @@ +# Copyright 2017 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +mojom = "//chrome/common/shell_handler_win.mojom" + +public_headers = [ "//base/strings/string16.h" ] + +deps = [ + "//base", +] + +type_mappings = [ "chrome.mojom.FileExtensionFilters=" + + "std::vector<std::tuple<base::string16, base::string16>>" ]
diff --git a/chrome/profiling/BUILD.gn b/chrome/profiling/BUILD.gn index 1adceab..5cd6cc4 100644 --- a/chrome/profiling/BUILD.gn +++ b/chrome/profiling/BUILD.gn
@@ -17,7 +17,11 @@ "memlog_connection_manager.cc", "memlog_connection_manager.h", "memlog_receiver.h", + "memlog_receiver_pipe_posix.cc", + "memlog_receiver_pipe_posix.h", "memlog_receiver_pipe_server.h", + "memlog_receiver_pipe_server_posix.cc", + "memlog_receiver_pipe_server_posix.h", "memlog_receiver_pipe_server_win.cc", "memlog_receiver_pipe_server_win.h", "memlog_receiver_pipe_win.cc",
diff --git a/chrome/profiling/README.md b/chrome/profiling/README.md index 4501ecf3..39beecd 100644 --- a/chrome/profiling/README.md +++ b/chrome/profiling/README.md
@@ -9,3 +9,5 @@ is enabled by setting the GN flag `enable_oop_heap_profiling`. The in-process code that communicates with the profiling process is in `//chrome/common/profiling`. + +The browser must be started with `--memlog`.
diff --git a/chrome/profiling/allocation_tracker.cc b/chrome/profiling/allocation_tracker.cc index 89c3b4b0..69fab82d 100644 --- a/chrome/profiling/allocation_tracker.cc +++ b/chrome/profiling/allocation_tracker.cc
@@ -13,6 +13,10 @@ AllocationTracker::Alloc::Alloc(size_t sz, BacktraceStorage::Key key) : size(sz), backtrace_key(key) {} +AllocationTracker::Alloc::~Alloc() {} +AllocationTracker::Alloc::Alloc(const Alloc& other) + : size(other.size), backtrace_key(other.backtrace_key) {} + AllocationTracker::AllocationTracker(CompleteCallback complete_cb) : complete_callback_(std::move(complete_cb)), backtrace_storage_(ProfilingGlobals::Get()->GetBacktraceStorage()) {}
diff --git a/chrome/profiling/allocation_tracker.h b/chrome/profiling/allocation_tracker.h index 5aa8ea4..3ee5f64 100644 --- a/chrome/profiling/allocation_tracker.h +++ b/chrome/profiling/allocation_tracker.h
@@ -34,6 +34,8 @@ struct Alloc { Alloc(size_t sz, BacktraceStorage::Key key); + Alloc(const Alloc& other); + ~Alloc(); size_t size; BacktraceStorage::Key backtrace_key;
diff --git a/chrome/profiling/memlog_receiver_pipe_posix.cc b/chrome/profiling/memlog_receiver_pipe_posix.cc new file mode 100644 index 0000000..dbce9ca --- /dev/null +++ b/chrome/profiling/memlog_receiver_pipe_posix.cc
@@ -0,0 +1,57 @@ +// 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/profiling/memlog_receiver_pipe_posix.h" + +#include "base/bind.h" +#include "base/logging.h" +#include "base/posix/eintr_wrapper.h" +#include "base/strings/utf_string_conversions.h" +#include "base/threading/thread.h" +#include "chrome/profiling/memlog_stream_receiver.h" + +namespace profiling { + +MemlogReceiverPipe::CompletionThunk::CompletionThunk(int fd, Callback cb) + : controller_(FROM_HERE), fd_(fd), callback_(cb) { + base::MessageLoopForIO::current()->WatchFileDescriptor( + fd_, true, base::MessageLoopForIO::WATCH_READ, &controller_, this); +} + +MemlogReceiverPipe::CompletionThunk::~CompletionThunk() { + if (fd_ != -1) + IGNORE_EINTR(::close(fd_)); +} + +void MemlogReceiverPipe::CompletionThunk::OnFileCanReadWithoutBlocking(int fd) { + callback_.Run(fd); +} + +void MemlogReceiverPipe::CompletionThunk::OnFileCanWriteWithoutBlocking( + int fd) { + NOTREACHED(); +} + +MemlogReceiverPipe::MemlogReceiverPipe(std::unique_ptr<CompletionThunk> thunk) { +} + +MemlogReceiverPipe::~MemlogReceiverPipe() {} + +void MemlogReceiverPipe::StartReadingOnIOThread() { + // TODO(ajwong): Implement with something useful. +} + +int MemlogReceiverPipe::GetRemoteProcessID() { + // TODO(ajwong): Implement with something useful. + return 0; +} + +void MemlogReceiverPipe::SetReceiver( + scoped_refptr<base::TaskRunner> task_runner, + scoped_refptr<MemlogStreamReceiver> receiver) { + receiver_task_runner_ = task_runner; + receiver_ = receiver; +} + +} // namespace profiling
diff --git a/chrome/profiling/memlog_receiver_pipe_posix.h b/chrome/profiling/memlog_receiver_pipe_posix.h new file mode 100644 index 0000000..a5abb43 --- /dev/null +++ b/chrome/profiling/memlog_receiver_pipe_posix.h
@@ -0,0 +1,67 @@ +// 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_PROFILING_MEMLOG_RECEIVER_PIPE_POSIX_H_ +#define CHROME_PROFILING_MEMLOG_RECEIVER_PIPE_POSIX_H_ + +#include <string> + +#include "base/macros.h" +#include "base/memory/ref_counted.h" +#include "base/message_loop/message_loop.h" +#include "build/build_config.h" + +namespace base { +class TaskRunner; +} // namespace base + +namespace profiling { + +class MemlogStreamReceiver; + +class MemlogReceiverPipe + : public base::RefCountedThreadSafe<MemlogReceiverPipe> { + public: + class CompletionThunk : public base::MessageLoopForIO::Watcher { + public: + using Callback = base::RepeatingCallback<void(int)>; + + CompletionThunk(int fd, Callback cb); + ~CompletionThunk() override; + + void set_callback(Callback cb) { callback_ = cb; } + + void OnFileCanReadWithoutBlocking(int fd) override; + void OnFileCanWriteWithoutBlocking(int fd) override; + + private: + base::MessageLoopForIO::FileDescriptorWatcher controller_; + + int fd_; + Callback callback_; + }; + + explicit MemlogReceiverPipe(std::unique_ptr<CompletionThunk> thunk); + + void StartReadingOnIOThread(); + + int GetRemoteProcessID(); + void SetReceiver(scoped_refptr<base::TaskRunner> task_runner, + scoped_refptr<MemlogStreamReceiver> receiver); + + private: + friend class base::RefCountedThreadSafe<MemlogReceiverPipe>; + ~MemlogReceiverPipe(); + + std::unique_ptr<CompletionThunk> thunk_; + + scoped_refptr<base::TaskRunner> receiver_task_runner_; + scoped_refptr<MemlogStreamReceiver> receiver_; + + DISALLOW_COPY_AND_ASSIGN(MemlogReceiverPipe); +}; + +} // namespace profiling + +#endif // CHROME_PROFILING_MEMLOG_RECEIVER_PIPE_POSIX_H_
diff --git a/chrome/profiling/memlog_receiver_pipe_server.h b/chrome/profiling/memlog_receiver_pipe_server.h index 5ef925ac3..8650479 100644 --- a/chrome/profiling/memlog_receiver_pipe_server.h +++ b/chrome/profiling/memlog_receiver_pipe_server.h
@@ -9,6 +9,8 @@ #if defined(OS_WIN) #include "memlog_receiver_pipe_server_win.h" +#else +#include "memlog_receiver_pipe_server_posix.h" #endif #endif // CHROME_PROFILING_MEMLOG_RECEIVER_PIPE_SERVER_H_
diff --git a/chrome/profiling/memlog_receiver_pipe_server_posix.cc b/chrome/profiling/memlog_receiver_pipe_server_posix.cc new file mode 100644 index 0000000..86540d1 --- /dev/null +++ b/chrome/profiling/memlog_receiver_pipe_server_posix.cc
@@ -0,0 +1,27 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/profiling/memlog_receiver_pipe_server_posix.h" + +#include "base/bind.h" +#include "base/memory/ptr_util.h" +#include "base/message_loop/message_loop.h" +#include "base/strings/utf_string_conversions.h" +#include "chrome/common/profiling/memlog_stream.h" + +namespace profiling { + +MemlogReceiverPipeServer::MemlogReceiverPipeServer( + base::TaskRunner* io_runner, + const std::string& pipe_id, + NewConnectionCallback on_new_conn) + : io_runner_(io_runner), + pipe_id_(pipe_id), + on_new_connection_(on_new_conn) {} + +MemlogReceiverPipeServer::~MemlogReceiverPipeServer() {} + +void MemlogReceiverPipeServer::Start() {} + +} // namespace profiling
diff --git a/chrome/profiling/memlog_receiver_pipe_server_posix.h b/chrome/profiling/memlog_receiver_pipe_server_posix.h new file mode 100644 index 0000000..8cc511a --- /dev/null +++ b/chrome/profiling/memlog_receiver_pipe_server_posix.h
@@ -0,0 +1,58 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_PROFILING_MEMLOG_RECEIVER_PIPE_SERVER_POSIX_H_ +#define CHROME_PROFILING_MEMLOG_RECEIVER_PIPE_SERVER_POSIX_H_ + +#include <memory> + +#include "base/callback_forward.h" +#include "base/macros.h" +#include "base/memory/ref_counted.h" +#include "base/message_loop/message_pump_libevent.h" +#include "chrome/profiling/memlog_receiver_pipe_posix.h" + +namespace base { +class TaskRunner; +} // namespace base + +namespace profiling { + +class MemlogReceiverPipe; + +// This class listens for new pipe connections and creates new +// MemlogReceiverPipe objects for each one. +class MemlogReceiverPipeServer + : public base::RefCountedThreadSafe<MemlogReceiverPipeServer> { + public: + using NewConnectionCallback = + base::RepeatingCallback<void(scoped_refptr<MemlogReceiverPipe>)>; + + // |io_runner| is the task runner for the I/O thread. When a new connection is + // established, the |on_new_conn| callback is called with the pipe. + MemlogReceiverPipeServer(base::TaskRunner* io_runner, + const std::string& pipe_id, + NewConnectionCallback on_new_conn); + + void set_on_new_connection(NewConnectionCallback on_new_connection) { + on_new_connection_ = on_new_connection; + } + + // Starts the server which opens the pipe and begins accepting connections. + void Start(); + + private: + friend class base::RefCountedThreadSafe<MemlogReceiverPipeServer>; + ~MemlogReceiverPipeServer(); + + scoped_refptr<base::TaskRunner> io_runner_; + std::string pipe_id_; + NewConnectionCallback on_new_connection_; + + DISALLOW_COPY_AND_ASSIGN(MemlogReceiverPipeServer); +}; + +} // namespace profiling + +#endif // CHROME_PROFILING_MEMLOG_RECEIVER_PIPE_SERVER_POSIX_H_
diff --git a/chrome/profiling/memlog_receiver_pipe_server_win.h b/chrome/profiling/memlog_receiver_pipe_server_win.h index c6ace10..8f12a7f 100644 --- a/chrome/profiling/memlog_receiver_pipe_server_win.h +++ b/chrome/profiling/memlog_receiver_pipe_server_win.h
@@ -60,6 +60,8 @@ // Current connection we're waiting on creation for. std::unique_ptr<MemlogReceiverPipe::CompletionThunk> current_; + + DISALLOW_COPY_AND_ASSIGN(MemlogReceiverPipeServer); }; } // namespace profiling
diff --git a/chrome/profiling/memlog_stream_parser.cc b/chrome/profiling/memlog_stream_parser.cc index b67d0d7..3fbc60f 100644 --- a/chrome/profiling/memlog_stream_parser.cc +++ b/chrome/profiling/memlog_stream_parser.cc
@@ -24,6 +24,8 @@ MemlogStreamParser::Block::Block(std::unique_ptr<char[]> d, size_t s) : data(std::move(d)), size(s) {} +MemlogStreamParser::Block::~Block() {} + MemlogStreamParser::MemlogStreamParser(MemlogReceiver* receiver) : receiver_(receiver) {}
diff --git a/chrome/profiling/memlog_stream_parser.h b/chrome/profiling/memlog_stream_parser.h index e2d0e48a..1418d0b 100644 --- a/chrome/profiling/memlog_stream_parser.h +++ b/chrome/profiling/memlog_stream_parser.h
@@ -18,7 +18,6 @@ public: // Receiver must outlive this class. explicit MemlogStreamParser(MemlogReceiver* receiver); - ~MemlogStreamParser() override; // StreamReceiver implementation. void OnStreamData(std::unique_ptr<char[]> data, size_t sz) override; @@ -27,6 +26,7 @@ private: struct Block { Block(std::unique_ptr<char[]> d, size_t s); + ~Block(); std::unique_ptr<char[]> data; size_t size; @@ -38,6 +38,8 @@ READ_NO_DATA // Not enough data, try again when we get more }; + ~MemlogStreamParser() override; + // Returns true if the given number of bytes are available now. bool AreBytesAvailable(size_t count) const;
diff --git a/chrome/profiling/memlog_stream_receiver.h b/chrome/profiling/memlog_stream_receiver.h index ea8a6d6..bd21d11a 100644 --- a/chrome/profiling/memlog_stream_receiver.h +++ b/chrome/profiling/memlog_stream_receiver.h
@@ -17,7 +17,6 @@ : public base::RefCountedThreadSafe<MemlogStreamReceiver> { public: MemlogStreamReceiver() {} - virtual ~MemlogStreamReceiver() {} // Returns true on success, false on unrecoverable error (in which case no // more blocks will be sent). May take a ref to the block, so the caller @@ -25,6 +24,10 @@ virtual void OnStreamData(std::unique_ptr<char[]> data, size_t sz) = 0; virtual void OnStreamComplete() = 0; + + protected: + friend class base::RefCountedThreadSafe<MemlogStreamReceiver>; + ~MemlogStreamReceiver() override {} }; } // namespace profiling
diff --git a/chrome/profiling/profiling_browsertest.cc b/chrome/profiling/profiling_browsertest.cc new file mode 100644 index 0000000..0f1f968 --- /dev/null +++ b/chrome/profiling/profiling_browsertest.cc
@@ -0,0 +1,38 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "base/command_line.h" +#include "base/process/launch.h" +#include "chrome/common/chrome_switches.h" +#include "chrome/test/base/in_process_browser_test.h" +#include "chrome/test/base/ui_test_utils.h" + +namespace profiling { + +#if !defined(OS_MACOSX) +class ProfilingBrowserTest : public InProcessBrowserTest { + protected: + void RelaunchWithMemlog() { + // TODO(ajwong): Remove this once Brett lands is process model change so the + // browser process actually launches the profiling process. Until then, it's + // okay to have this skip on Mac (which has a different launch setup such + // that this sort of relaunch doesn't work). See GetCommandLineForRelaunch() + // function for details. + // TODO(awong): Can we do this with just SetUpCommandLine() and no Relaunch? + base::CommandLine new_command_line(GetCommandLineForRelaunch()); + new_command_line.AppendSwitch(switches::kMemlog); + + ui_test_utils::BrowserAddedObserver observer; + base::LaunchProcess(new_command_line, base::LaunchOptionsForTest()); + + observer.WaitForSingleNewBrowser(); + } +}; + +IN_PROC_BROWSER_TEST_F(ProfilingBrowserTest, InterceptsNew) { + RelaunchWithMemlog(); +} +#endif + +} // namespace profiling
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 9294036..0db81e0 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -1568,6 +1568,7 @@ "../common/mac/mock_launchd.cc", "../common/mac/mock_launchd.h", "../common/time_format_browsertest.cc", + "../profiling/profiling_browsertest.cc", "../renderer/autofill/autofill_renderer_browsertest.cc", "../renderer/autofill/fake_content_password_manager_driver.cc", "../renderer/autofill/fake_content_password_manager_driver.h", @@ -1733,6 +1734,9 @@ if (!enable_one_click_signin) { sources -= [ "../browser/ui/sync/one_click_signin_links_delegate_impl_browsertest.cc" ] } + if (!enable_oop_heap_profiling) { + sources -= [ "../profiling/profiling_browsertest.cc" ] + } if (enable_nacl) { sources += [ "../browser/chrome_service_worker_browsertest.cc",
diff --git a/chrome/test/data/webui/md_bookmarks/md_bookmarks_browsertest.js b/chrome/test/data/webui/md_bookmarks/md_bookmarks_browsertest.js index 06c33b8..ff64baf0 100644 --- a/chrome/test/data/webui/md_bookmarks/md_bookmarks_browsertest.js +++ b/chrome/test/data/webui/md_bookmarks/md_bookmarks_browsertest.js
@@ -206,17 +206,17 @@ mocha.run(); }); -function MaterialBookmarksStoreClientTest() {} +function MaterialBookmarksStoreTest() {} -MaterialBookmarksStoreClientTest.prototype = { +MaterialBookmarksStoreTest.prototype = { __proto__: MaterialBookmarksBrowserTest.prototype, extraLibraries: MaterialBookmarksBrowserTest.prototype.extraLibraries.concat([ - 'store_client_test.js', + 'store_test.js', ]), }; -TEST_F('MaterialBookmarksStoreClientTest', 'All', function() { +TEST_F('MaterialBookmarksStoreTest', 'All', function() { mocha.run(); });
diff --git a/chrome/test/data/webui/md_bookmarks/store_client_test.js b/chrome/test/data/webui/md_bookmarks/store_test.js similarity index 70% rename from chrome/test/data/webui/md_bookmarks/store_client_test.js rename to chrome/test/data/webui/md_bookmarks/store_test.js index 80bfa84..e342c0e3 100644 --- a/chrome/test/data/webui/md_bookmarks/store_client_test.js +++ b/chrome/test/data/webui/md_bookmarks/store_test.js
@@ -2,6 +2,46 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +suite('bookmarks.Store', function() { + var store; + + setup(function() { + store = new bookmarks.TestStore({ + nodes: testTree(createFolder( + '1', + [ + createItem('11'), + createItem('12'), + createItem('13'), + ])), + }); + store.setReducersEnabled(true); + store.replaceSingleton(); + }); + + test('batch mode disables updates', function() { + var lastStateChange = null; + var observer = { + onStateChanged: function(state) { + lastStateChange = state; + }, + }; + + store.addObserver(observer); + store.beginBatchUpdate(); + + store.dispatch( + bookmarks.actions.removeBookmark('11', '1', 0, store.data.nodes)); + assertEquals(null, lastStateChange); + store.dispatch( + bookmarks.actions.removeBookmark('12', '1', 0, store.data.nodes)); + assertEquals(null, lastStateChange); + + store.endBatchUpdate(); + assertDeepEquals(['13'], lastStateChange.nodes['1'].children); + }); +}); + suite('bookmarks.StoreClient', function() { var store; var client;
diff --git a/chrome/test/data/webui/print_preview/print_preview_tests.js b/chrome/test/data/webui/print_preview/print_preview_tests.js index 9af4ebd..b952e2f 100644 --- a/chrome/test/data/webui/print_preview/print_preview_tests.js +++ b/chrome/test/data/webui/print_preview/print_preview_tests.js
@@ -312,12 +312,7 @@ // addCloudPrinters with an empty list. test('PrinterListCloudEmpty', function() { return setupSettingsAndDestinationsWithCapabilities().then(function() { - var cloudPrintEnableEvent = new Event( - print_preview.NativeLayer.EventType.CLOUD_PRINT_ENABLE); - cloudPrintEnableEvent.baseCloudPrintUrl = 'cloudprint url'; - nativeLayer.getEventTarget().dispatchEvent( - cloudPrintEnableEvent); - + cr.webUIListenerCallback('use-cloud-print', 'cloudprint url', false); var searchDoneEvent = new Event(cloudprint.CloudPrintInterfaceEventType.SEARCH_DONE); searchDoneEvent.printers = [];
diff --git a/chrome/test/data/webui/settings/device_page_tests.js b/chrome/test/data/webui/settings/device_page_tests.js index 1fdbe06..c818b96 100644 --- a/chrome/test/data/webui/settings/device_page_tests.js +++ b/chrome/test/data/webui/settings/device_page_tests.js
@@ -682,7 +682,7 @@ var powerSourceWrapper; var powerSourceSelect; var idleSelect; - var lidClosedSelect; + var lidClosedToggle; suiteSetup(function() { // Always show power settings. @@ -705,7 +705,7 @@ .updatePowerStatusCalled_); idleSelect = assert(powerPage.$$('#idleSelect')); - lidClosedSelect = assert(powerPage.$$('#lidClosedSelect')); + lidClosedToggle = assert(powerPage.$$('#lidClosedToggle')); assertEquals( 1, @@ -802,17 +802,31 @@ }); test('set lid behavior', function() { - selectValue(lidClosedSelect, settings.LidClosedBehavior.DO_NOTHING); + var sendLid = function(lidBehavior) { + sendPowerManagementSettings( + settings.IdleBehavior.DISPLAY_OFF, + false /* idleControlled */, lidBehavior, + false /* lidClosedControlled */, true /* hasLid */); + }; + + sendLid(settings.LidClosedBehavior.SUSPEND); + assertTrue(lidClosedToggle.checked); + + MockInteractions.tap(lidClosedToggle.$$('#control')); expectEquals( settings.LidClosedBehavior.DO_NOTHING, settings.DevicePageBrowserProxyImpl.getInstance() .lidClosedBehavior_); + sendLid(settings.LidClosedBehavior.DO_NOTHING); + expectFalse(lidClosedToggle.checked); - selectValue(lidClosedSelect, settings.LidClosedBehavior.SUSPEND); + MockInteractions.tap(lidClosedToggle.$$('#control')); expectEquals( settings.LidClosedBehavior.SUSPEND, settings.DevicePageBrowserProxyImpl.getInstance() .lidClosedBehavior_); + sendLid(settings.LidClosedBehavior.SUSPEND); + expectTrue(lidClosedToggle.checked); }); test('display idle and lid behavior', function() { @@ -827,11 +841,10 @@ settings.IdleBehavior.DISPLAY_ON.toString(), idleSelect.value); expectFalse(idleSelect.disabled); expectEquals(null, powerPage.$$('#idleControlledIndicator')); - expectEquals( - settings.LidClosedBehavior.DO_NOTHING.toString(), - lidClosedSelect.value); - expectFalse(lidClosedSelect.disabled); - expectEquals(null, powerPage.$$('#lidClosedControlledIndicator')); + expectEquals(loadTimeData.getString('powerLidSleepLabel'), + lidClosedToggle.label); + expectFalse(lidClosedToggle.checked); + expectFalse(lidClosedToggle.isPrefEnforced()); }).then(function() { sendPowerManagementSettings( settings.IdleBehavior.DISPLAY_OFF, @@ -843,21 +856,20 @@ idleSelect.value); expectFalse(idleSelect.disabled); expectEquals(null, powerPage.$$('#idleControlledIndicator')); - expectEquals( - settings.LidClosedBehavior.SUSPEND.toString(), - lidClosedSelect.value); - expectFalse(lidClosedSelect.disabled); - expectEquals(null, powerPage.$$('#lidClosedControlledIndicator')); + expectEquals(loadTimeData.getString('powerLidSleepLabel'), + lidClosedToggle.label); + expectTrue(lidClosedToggle.checked); + expectFalse(lidClosedToggle.isPrefEnforced()); }); }); test('display controlled idle and lid behavior', function() { - // When settings are controlled, the selects should be disabled and + // When settings are controlled, the controls should be disabled and // the indicators should be shown. return new Promise(function(resolve) { sendPowerManagementSettings( settings.IdleBehavior.OTHER, true /* idleControlled */, - settings.LidClosedBehavior.SUSPEND, + settings.LidClosedBehavior.SHUT_DOWN, true /* lidClosedControlled */, true /* hasLid */); powerPage.async(resolve); }).then(function() { @@ -865,12 +877,27 @@ settings.IdleBehavior.OTHER.toString(), idleSelect.value); expectTrue(idleSelect.disabled); expectNotEquals(null, powerPage.$$('#idleControlledIndicator')); + expectEquals(loadTimeData.getString('powerLidShutDownLabel'), + lidClosedToggle.label); + expectTrue(lidClosedToggle.checked); + expectTrue(lidClosedToggle.isPrefEnforced()); + }).then(function() { + sendPowerManagementSettings( + settings.IdleBehavior.DISPLAY_OFF, + true /* idleControlled */, + settings.LidClosedBehavior.STOP_SESSION, + true /* lidClosedControlled */, true /* hasLid */); + return new Promise(function(resolve) { powerPage.async(resolve); }); + }).then(function() { expectEquals( - settings.LidClosedBehavior.SUSPEND.toString(), - lidClosedSelect.value); - expectTrue(lidClosedSelect.disabled); - expectNotEquals( - null, powerPage.$$('#lidClosedControlledIndicator')); + settings.IdleBehavior.DISPLAY_OFF.toString(), + idleSelect.value); + expectTrue(idleSelect.disabled); + expectNotEquals(null, powerPage.$$('#idleControlledIndicator')); + expectEquals(loadTimeData.getString('powerLidSignOutLabel'), + lidClosedToggle.label); + expectTrue(lidClosedToggle.checked); + expectTrue(lidClosedToggle.isPrefEnforced()); }); });
diff --git a/chrome/test/media_router/telemetry/benchmarks/pagesets/media_router_perf_pages.py b/chrome/test/media_router/telemetry/benchmarks/pagesets/media_router_perf_pages.py index 803bb6f..1be7da6 100644 --- a/chrome/test/media_router/telemetry/benchmarks/pagesets/media_router_perf_pages.py +++ b/chrome/test/media_router/telemetry/benchmarks/pagesets/media_router_perf_pages.py
@@ -31,11 +31,11 @@ """Cast page to open a cast-enabled page and open media router dialog.""" def __init__(self, page_set, url='file://basic_test.html', - shared_page_state_class=shared_page_state.SharedPageState): + shared_page_state_class=shared_page_state.SharedPageState, + name='basic_test.html'): super(CastDialogPage, self).__init__( url=url, page_set=page_set, - shared_page_state_class=shared_page_state_class, - name='basic_test.html') + shared_page_state_class=shared_page_state_class, name=name) def RunPageInteractions(self, action_runner): # Wait for 5s after Chrome is opened in order to get consistent results.
diff --git a/chrome/typemaps.gni b/chrome/typemaps.gni index b26165c..539ad98 100644 --- a/chrome/typemaps.gni +++ b/chrome/typemaps.gni
@@ -3,6 +3,7 @@ # found in the LICENSE file. typemaps = [ - "//chrome/common/safe_archive_analyzer.typemap", "//chrome/common/instant.typemap", + "//chrome/common/safe_archive_analyzer.typemap", + "//chrome/common/shell_handler_win.typemap", ]
diff --git a/chrome/utility/BUILD.gn b/chrome/utility/BUILD.gn index ad67a975..3c64214 100644 --- a/chrome/utility/BUILD.gn +++ b/chrome/utility/BUILD.gn
@@ -16,8 +16,6 @@ "cloud_print/bitmap_image.h", "cloud_print/pwg_encoder.cc", "cloud_print/pwg_encoder.h", - "ipc_shell_handler_win.cc", - "ipc_shell_handler_win.h", "printing_handler.cc", "printing_handler.h", "shell_handler_impl_win.cc",
diff --git a/chrome/utility/chrome_content_utility_client.cc b/chrome/utility/chrome_content_utility_client.cc index 4f308fc7..50f5ee4 100644 --- a/chrome/utility/chrome_content_utility_client.cc +++ b/chrome/utility/chrome_content_utility_client.cc
@@ -43,7 +43,6 @@ #endif #if defined(OS_WIN) -#include "chrome/utility/ipc_shell_handler_win.h" #include "chrome/utility/shell_handler_impl_win.h" #endif @@ -241,10 +240,6 @@ (BUILDFLAG(ENABLE_BASIC_PRINTING) && defined(OS_WIN)) handlers_.push_back(base::MakeUnique<printing::PrintingHandler>()); #endif - -#if defined(OS_WIN) - handlers_.push_back(base::MakeUnique<IPCShellHandler>()); -#endif } ChromeContentUtilityClient::~ChromeContentUtilityClient() = default;
diff --git a/chrome/utility/ipc_shell_handler_win.cc b/chrome/utility/ipc_shell_handler_win.cc deleted file mode 100644 index cfdb765b..0000000 --- a/chrome/utility/ipc_shell_handler_win.cc +++ /dev/null
@@ -1,79 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/utility/ipc_shell_handler_win.h" - -#include <commdlg.h> - -#include <memory> - -#include "base/files/file_path.h" -#include "chrome/common/chrome_utility_messages.h" -#include "content/public/utility/utility_thread.h" -#include "ui/base/win/open_file_name_win.h" - -IPCShellHandler::IPCShellHandler() {} -IPCShellHandler::~IPCShellHandler() {} - -bool IPCShellHandler::OnMessageReceived(const IPC::Message& message) { - bool handled = true; - IPC_BEGIN_MESSAGE_MAP(IPCShellHandler, message) - IPC_MESSAGE_HANDLER(ChromeUtilityMsg_GetOpenFileName, OnGetOpenFileName) - IPC_MESSAGE_HANDLER(ChromeUtilityMsg_GetSaveFileName, OnGetSaveFileName) - IPC_MESSAGE_UNHANDLED(handled = false) - IPC_END_MESSAGE_MAP() - return handled; -} - -void IPCShellHandler::OnGetOpenFileName(HWND owner, - DWORD flags, - const GetOpenFileNameFilter& filter, - const base::FilePath& initial_directory, - const base::FilePath& filename) { - ui::win::OpenFileName open_file_name(owner, flags); - open_file_name.SetInitialSelection(initial_directory, filename); - open_file_name.SetFilters(filter); - - base::FilePath directory; - std::vector<base::FilePath> filenames; - - if (::GetOpenFileName(open_file_name.GetOPENFILENAME())) - open_file_name.GetResult(&directory, &filenames); - - if (filenames.size()) { - content::UtilityThread::Get()->Send( - new ChromeUtilityHostMsg_GetOpenFileName_Result(directory, filenames)); - } else { - content::UtilityThread::Get()->Send( - new ChromeUtilityHostMsg_GetOpenFileName_Failed()); - } -} - -void IPCShellHandler::OnGetSaveFileName( - const ChromeUtilityMsg_GetSaveFileName_Params& params) { - ui::win::OpenFileName open_file_name(params.owner, params.flags); - open_file_name.SetInitialSelection(params.initial_directory, - params.suggested_filename); - open_file_name.SetFilters(params.filters); - open_file_name.GetOPENFILENAME()->nFilterIndex = - params.one_based_filter_index; - open_file_name.GetOPENFILENAME()->lpstrDefExt = - params.default_extension.c_str(); - - if (::GetSaveFileName(open_file_name.GetOPENFILENAME())) { - content::UtilityThread::Get()->Send( - new ChromeUtilityHostMsg_GetSaveFileName_Result( - base::FilePath(open_file_name.GetOPENFILENAME()->lpstrFile), - open_file_name.GetOPENFILENAME()->nFilterIndex)); - return; - } - - // Zero means the dialog was closed, otherwise we had an error. - DWORD error_code = ::CommDlgExtendedError(); - if (error_code != 0) - NOTREACHED() << "GetSaveFileName failed with code: " << error_code; - - content::UtilityThread::Get()->Send( - new ChromeUtilityHostMsg_GetSaveFileName_Failed()); -}
diff --git a/chrome/utility/ipc_shell_handler_win.h b/chrome/utility/ipc_shell_handler_win.h deleted file mode 100644 index 5c71df7..0000000 --- a/chrome/utility/ipc_shell_handler_win.h +++ /dev/null
@@ -1,53 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_UTILITY_IPC_SHELL_HANDLER_WIN_H_ -#define CHROME_UTILITY_IPC_SHELL_HANDLER_WIN_H_ - -#include <Windows.h> - -#include <tuple> -#include <vector> - -#include "base/compiler_specific.h" -#include "base/macros.h" -#include "base/strings/string16.h" -#include "chrome/utility/utility_message_handler.h" - -namespace base { -class FilePath; -} // namespace base - -using GetOpenFileNameFilter = - std::vector<std::tuple<base::string16, base::string16>>; - -struct ChromeUtilityMsg_GetSaveFileName_Params; - -// Handles requests to execute shell operations. Used to protect the browser -// process from instability due to 3rd-party shell extensions. Must be invoked -// in a non-sandboxed utility process. -// Note: This class is deprecated in favor of the Mojo version. -// See chrome/common/shell_handler_win.mojom and -// chrome/utility/shell_handler_impl_win.h -class IPCShellHandler : public UtilityMessageHandler { - public: - IPCShellHandler(); - ~IPCShellHandler() override; - - // IPC::Listener implementation - bool OnMessageReceived(const IPC::Message& message) override; - - private: - void OnGetOpenFileName(HWND owner, - DWORD flags, - const GetOpenFileNameFilter& filter, - const base::FilePath& initial_directory, - const base::FilePath& filename); - - void OnGetSaveFileName(const ChromeUtilityMsg_GetSaveFileName_Params& params); - - DISALLOW_COPY_AND_ASSIGN(IPCShellHandler); -}; - -#endif // CHROME_UTILITY_IPC_SHELL_HANDLER_WIN_H_
diff --git a/chrome/utility/shell_handler_impl_win.cc b/chrome/utility/shell_handler_impl_win.cc index 33119500..e4879a36 100644 --- a/chrome/utility/shell_handler_impl_win.cc +++ b/chrome/utility/shell_handler_impl_win.cc
@@ -12,14 +12,17 @@ #include "base/memory/ptr_util.h" #include "base/path_service.h" #include "base/scoped_native_library.h" +#include "base/strings/string16.h" #include "base/win/scoped_bstr.h" #include "base/win/scoped_com_initializer.h" #include "base/win/scoped_comptr.h" #include "base/win/scoped_variant.h" #include "base/win/shortcut.h" +#include "base/win/win_util.h" #include "chrome/installer/util/install_util.h" #include "content/public/utility/utility_thread.h" #include "mojo/public/cpp/bindings/strong_binding.h" +#include "ui/base/win/open_file_name_win.h" namespace { @@ -230,3 +233,58 @@ bool is_pinned_to_taskbar = helper.GetResult(); callback.Run(!helper.error_occured(), is_pinned_to_taskbar); } + +void ShellHandlerImpl::CallGetOpenFileName( + uint32_t owner, + uint32_t flags, + const std::vector<std::tuple<base::string16, base::string16>>& filters, + const base::FilePath& initial_directory, + const base::FilePath& initial_filename, + const CallGetOpenFileNameCallback& callback) { + ui::win::OpenFileName open_file_name( + reinterpret_cast<HWND>(base::win::Uint32ToHandle(owner)), flags); + + open_file_name.SetInitialSelection(initial_directory, initial_filename); + open_file_name.SetFilters(filters); + + base::FilePath directory; + std::vector<base::FilePath> files; + if (::GetOpenFileName(open_file_name.GetOPENFILENAME())) + open_file_name.GetResult(&directory, &files); + + if (!files.empty()) { + callback.Run(directory, files); + } else { + callback.Run(base::FilePath(), std::vector<base::FilePath>()); + } +} + +void ShellHandlerImpl::CallGetSaveFileName( + uint32_t owner, + uint32_t flags, + const std::vector<std::tuple<base::string16, base::string16>>& filters, + uint32_t one_based_filter_index, + const base::FilePath& initial_directory, + const base::FilePath& suggested_filename, + const base::string16& default_extension, + const CallGetSaveFileNameCallback& callback) { + ui::win::OpenFileName open_file_name( + reinterpret_cast<HWND>(base::win::Uint32ToHandle(owner)), flags); + + open_file_name.SetInitialSelection(initial_directory, suggested_filename); + open_file_name.SetFilters(filters); + open_file_name.GetOPENFILENAME()->nFilterIndex = one_based_filter_index; + open_file_name.GetOPENFILENAME()->lpstrDefExt = default_extension.c_str(); + + if (::GetSaveFileName(open_file_name.GetOPENFILENAME())) { + callback.Run(base::FilePath(open_file_name.GetOPENFILENAME()->lpstrFile), + open_file_name.GetOPENFILENAME()->nFilterIndex); + return; + } + + // Error code 0 means the dialog was closed, otherwise there was an error. + if (DWORD error_code = ::CommDlgExtendedError()) + NOTREACHED() << "::GetSaveFileName() failed: error code " << error_code; + + callback.Run(base::FilePath(), 0); +}
diff --git a/chrome/utility/shell_handler_impl_win.h b/chrome/utility/shell_handler_impl_win.h index 1badd896..788152b 100644 --- a/chrome/utility/shell_handler_impl_win.h +++ b/chrome/utility/shell_handler_impl_win.h
@@ -7,9 +7,11 @@ #include "base/macros.h" #include "chrome/common/shell_handler_win.mojom.h" -#include "services/service_manager/public/cpp/bind_source_info.h" -// Implements the ShellHandler mojo interface. +namespace service_manager { +struct BindSourceInfo; +} + class ShellHandlerImpl : public chrome::mojom::ShellHandler { public: ShellHandlerImpl(); @@ -22,6 +24,24 @@ // chrome::mojom::ShellHandler: void IsPinnedToTaskbar(const IsPinnedToTaskbarCallback& callback) override; + void CallGetOpenFileName( + uint32_t owner, + uint32_t flags, + const std::vector<std::tuple<base::string16, base::string16>>& filters, + const base::FilePath& initial_directory, + const base::FilePath& initial_filename, + const CallGetOpenFileNameCallback& callback) override; + + void CallGetSaveFileName( + uint32_t owner, + uint32_t flags, + const std::vector<std::tuple<base::string16, base::string16>>& filters, + uint32_t one_based_filter_index, + const base::FilePath& initial_directory, + const base::FilePath& suggested_filename, + const base::string16& default_extension, + const CallGetSaveFileNameCallback& callback) override; + DISALLOW_COPY_AND_ASSIGN(ShellHandlerImpl); };
diff --git a/chromeos/cryptohome/cryptohome_parameters.h b/chromeos/cryptohome/cryptohome_parameters.h index bf3d290..8525f7f 100644 --- a/chromeos/cryptohome/cryptohome_parameters.h +++ b/chromeos/cryptohome/cryptohome_parameters.h
@@ -174,6 +174,9 @@ // If |true|, mounts the existing ecryptfs vault to a temporary location while // setting up a new dircrypto directory. bool to_migrate_from_ecryptfs = false; + + // If |true|, the home dir will be mounted as public mount. + bool public_mount = false; }; // This function returns true if cryptohome of |account_id| is migrated to
diff --git a/chromeos/cryptohome/homedir_methods.cc b/chromeos/cryptohome/homedir_methods.cc index e4ba8755..9671ae1 100644 --- a/chromeos/cryptohome/homedir_methods.cc +++ b/chromeos/cryptohome/homedir_methods.cc
@@ -225,6 +225,9 @@ if (request.to_migrate_from_ecryptfs) request_proto.set_to_migrate_from_ecryptfs(true); + if (request.public_mount) + request_proto.set_public_mount(true); + DBusThreadManager::Get()->GetCryptohomeClient()->MountEx( id, auth_proto, request_proto, base::Bind(&HomedirMethodsImpl::OnMountExCallback,
diff --git a/chromeos/dbus/fake_session_manager_client.cc b/chromeos/dbus/fake_session_manager_client.cc index 232d77a..763d491 100644 --- a/chromeos/dbus/fake_session_manager_client.cc +++ b/chromeos/dbus/fake_session_manager_client.cc
@@ -84,6 +84,8 @@ } void FakeSessionManagerClient::EmitLoginPromptVisible() { + for (auto& observer : observers_) + observer.EmitLoginPromptVisibleCalled(); } void FakeSessionManagerClient::RestartJob(
diff --git a/chromeos/login/auth/cryptohome_authenticator.cc b/chromeos/login/auth/cryptohome_authenticator.cc index f43aafc..e766360 100644 --- a/chromeos/login/auth/cryptohome_authenticator.cc +++ b/chromeos/login/auth/cryptohome_authenticator.cc
@@ -40,6 +40,9 @@ // The label used for the key derived from the user's GAIA credentials. const char kCryptohomeGAIAKeyLabel[] = "gaia"; +// The label used for the key generated by Cryptohome for public mount. +const char kCryptohomePublicMountKeyLabel[] = "publicmount"; + // The name under which the type of key generated from the user's GAIA // credentials is stored. const char kKeyProviderDataTypeName[] = "type"; @@ -132,8 +135,14 @@ bool success, cryptohome::MountError return_code, const std::string& mount_hash) { - chromeos::LoginEventRecorder::Get()->AddLoginTimeMarker("CryptohomeMount-End", - false); + const bool public_mount = attempt->user_context.GetUserType() == + user_manager::USER_TYPE_KIOSK_APP || + attempt->user_context.GetUserType() == + user_manager::USER_TYPE_ARC_KIOSK_APP; + + chromeos::LoginEventRecorder::Get()->AddLoginTimeMarker( + public_mount ? "CryptohomeMountPublic-End" : "CryptohomeMount-End", + false); attempt->RecordCryptohomeStatus(success, return_code); if (success) attempt->RecordUsernameHash(mount_hash); @@ -403,17 +412,25 @@ base::Bind(&TriggerResolveHash, attempt, resolver)); } -// Calls cryptohome's MountPublic method +// Calls cryptohome's MountEx method with the public_mount option. void MountPublic(const base::WeakPtr<AuthAttemptState>& attempt, scoped_refptr<CryptohomeAuthenticator> resolver, - int flags) { - cryptohome::AsyncMethodCaller::GetInstance()->AsyncMountPublic( - cryptohome::Identification(attempt->user_context.GetAccountId()), flags, - base::Bind(&TriggerResolveWithLoginTimeMarker, - "CryptohomeMountPublic-End", attempt, resolver)); - cryptohome::AsyncMethodCaller::GetInstance()->AsyncGetSanitizedUsername( + bool force_dircrypto_if_available) { + cryptohome::MountParameters mount(false /* ephemeral */); + mount.force_dircrypto_if_available = force_dircrypto_if_available; + mount.public_mount = true; + // Set the request to create a new homedir when missing. + mount.create_keys.push_back(cryptohome::KeyDefinition( + std::string(), kCryptohomePublicMountKeyLabel, cryptohome::PRIV_DEFAULT)); + + // For public mounts, authorization secret is filled by cryptohomed, hence it + // is left empty. Authentication's key label is also set to an empty string, + // which is a wildcard allowing any key to match to allow cryptohomes created + // in a legacy way. (See comments in DoMount.) + cryptohome::HomedirMethods::GetInstance()->MountEx( cryptohome::Identification(attempt->user_context.GetAccountId()), - base::Bind(&TriggerResolveHash, attempt, resolver)); + cryptohome::Authorization(cryptohome::KeyDefinition()), mount, + base::Bind(&OnMount, attempt, resolver)); } // Calls cryptohome's key migration method. @@ -612,7 +629,7 @@ if (!use_guest_mount) { MountPublic(current_state_->AsWeakPtr(), scoped_refptr<CryptohomeAuthenticator>(this), - cryptohome::CREATE_IF_MISSING); + false); // force_dircrypto_if_available } else { ephemeral_mount_attempted_ = true; MountGuestAndGetHash(current_state_->AsWeakPtr(), @@ -633,7 +650,7 @@ remove_user_data_on_failure_ = true; MountPublic(current_state_->AsWeakPtr(), scoped_refptr<CryptohomeAuthenticator>(this), - cryptohome::CREATE_IF_MISSING); + true); // force_dircrypto_if_available } void CryptohomeAuthenticator::OnAuthSuccess() {
diff --git a/components/BUILD.gn b/components/BUILD.gn index 98b413b..91a0c0e1 100644 --- a/components/BUILD.gn +++ b/components/BUILD.gn
@@ -39,10 +39,6 @@ # no tests will run) and add a reference here. You can add more than one unit # test target if convenient. test("components_unittests") { - sources = [ - "test/run_all_unittests.cc", - ] - if (is_android || is_linux || is_mac || is_win) { data = [ "test/data/", @@ -142,7 +138,7 @@ "//components/sync_preferences:unit_tests", "//components/sync_sessions:unit_tests", "//components/task_scheduler_util/common:unit_tests", - "//components/test:test_support", + "//components/test:run_all_unittests", "//components/translate/core/browser:unit_tests", "//components/translate/core/common:unit_tests", "//components/translate/core/language_detection:unit_tests", @@ -225,6 +221,7 @@ "//components/subresource_filter/content/common:unit_tests", "//components/subresource_filter/content/renderer:unit_tests", "//components/tracing:unit_tests", + "//components/translate/content/renderer:unit_tests", "//components/visitedlink/test:unit_tests", "//components/viz/host:unit_tests", "//components/viz/service:unit_tests",
diff --git a/components/arc/BUILD.gn b/components/arc/BUILD.gn index d228c05..d80c79b 100644 --- a/components/arc/BUILD.gn +++ b/components/arc/BUILD.gn
@@ -233,6 +233,7 @@ "//base", "//base/test:test_support", "//chromeos", + "//chromeos:test_support_without_gmock", "//components/signin/core/account_id", "//components/user_manager", "//components/user_manager:test_support",
diff --git a/components/arc/arc_session.cc b/components/arc/arc_session.cc index f589ed3..69e0423 100644 --- a/components/arc/arc_session.cc +++ b/components/arc/arc_session.cc
@@ -17,6 +17,7 @@ #include "base/location.h" #include "base/macros.h" #include "base/memory/ptr_util.h" +#include "base/memory/ref_counted.h" #include "base/posix/eintr_wrapper.h" #include "base/sys_info.h" #include "base/task_runner_util.h" @@ -125,9 +126,26 @@ // ConnectMojo() -> OnMojoConnected() -> // RUNNING // - // At any state, Stop() can be called. It does not immediately stop the - // instance, but will eventually stop it. - // The actual stop will be notified via ArcSession::Observer::OnStopped(). + // Also, StartForLoginScreen() may start ARC instance with + // |login_screen_instance_requested_| set to |true|. In that case, the state + // changes like the following: + // + // NOT_STARTED + // StartForLoginScreen() -> + // CREATING_SOCKET + // CreateSocket() -> OnSocketCreated() -> + // STARTING_INSTANCE + // -> OnInstanceStarted() -> + // RUNNING_FOR_LOGIN_SCREEN + // + // Start() can also be used at any of these 3 state (from CREATING_SOCKET to + // RUNNING_FOR_LOGIN_SCREEN) to turn the instance for login screen into a + // fully functional one. + // + // Regardless of whether the instance is for login screen or not, at any + // state, Stop() can be called. It may not immediately stop the instance, + // but will eventually stop it. The actual stop will be notified via + // ArcSession::Observer::OnSessionStopped(). // // When Stop() is called, it makes various behavior based on the current // phase. @@ -153,6 +171,7 @@ // whose read side is also polled. Then, in its callback, similar to // STARTING_INSTANCE, a request to stop the ARC instance is sent to // SessionManager, and ArcInstanceStopped handles remaining procedure. + // RUNNING_FOR_LOGIN_SCREEN: // RUNNING: // There is no more callback which runs on normal flow, so Stop() requests // to stop the ARC instance via SessionManager. @@ -161,19 +180,6 @@ // is an event ArcInstanceStopped() sent from SessionManager, when ARC // instace unexpectedly terminates. ArcInstanceStopped() turns the state into // STOPPED immediately. - // This happens only when STARTING_INSTANCE, CONNECTING_MOJO or RUNNING - // state. - // - // STARTING_INSTANCE: - // In OnInstanceStarted(), |state_| is checked at the beginning. If it is - // STOPPED, then ArcInstanceStopped() is called. Do nothing in that case. - // CONNECTING_MOJO: - // Similar to Stop() case above, ArcInstanceStopped() also notifies to - // BlockingPool thread to cancel it to unblock the thread. In - // OnMojoConnected(), similar to OnInstanceStarted(), check if |state_| is - // STOPPED, then do nothing. - // RUNNING: - // It is not necessary to do anything special here. // // In NOT_STARTED or STOPPED state, the instance can be safely destructed. // Specifically, in STOPPED state, there may be inflight operations or @@ -189,9 +195,13 @@ // An UNIX socket is being created. CREATING_SOCKET, - // The request to start the instance has been sent. + // The request to start or resume the instance has been sent. STARTING_INSTANCE, + // The instance is set up, but only a handful of processes NOT including + // arcbridgeservice (i.e. mojo endpoint) are running. + RUNNING_FOR_LOGIN_SCREEN, + // The instance has started. Waiting for it to connect to the IPC bridge. CONNECTING_MOJO, @@ -207,6 +217,8 @@ ~ArcSessionImpl() override; // ArcSession overrides: + void StartForLoginScreen() override; + bool IsForLoginScreen() override; void Start() override; void Stop() override; void OnShutdown() override; @@ -215,10 +227,12 @@ // Creates the UNIX socket on a worker pool and then processes its file // descriptor. static mojo::edk::ScopedPlatformHandle CreateSocket(); - void OnSocketCreated(mojo::edk::ScopedPlatformHandle fd); + void OnSocketCreated(bool instance_is_for_login_screen, + mojo::edk::ScopedPlatformHandle fd); // DBus callback for StartArcInstance(). - void OnInstanceStarted(mojo::edk::ScopedPlatformHandle socket_fd, + void OnInstanceStarted(bool instance_is_for_login_screen, + mojo::edk::ScopedPlatformHandle socket_fd, StartArcInstanceResult result, const std::string& container_instance_id); @@ -236,9 +250,15 @@ void ArcInstanceStopped(bool clean, const std::string& container_instance_id) override; - // Completes the termination procedure. + // Completes the termination procedure. Note that calling this may end up with + // deleting |this| because the function calls observers' OnSessionStopped(). void OnStopped(ArcStopReason reason); + // Sends a StartArcInstance D-Bus request to session_manager. + static void SendStartArcInstanceDBusMessage( + bool instance_is_for_login_screen, + const chromeos::SessionManagerClient::StartArcInstanceCallback& cb); + // Checks whether a function runs on the thread where the instance is // created. THREAD_CHECKER(thread_checker_); @@ -255,6 +275,14 @@ // When Stop() is called, this flag is set. bool stop_requested_ = false; + // When StartForLoginScreen() is called, this flag is set. After + // that, when Start() is called to resume the boot, the flag is unset. + bool login_screen_instance_requested_ = false; + + // The handle StartForLoginScreen() has created. The variable has a + // valid handle only when |state_| is RUNNING_FOR_LOGIN_SCREEN. + mojo::edk::ScopedPlatformHandle socket_fd_; + // Container instance id passed from session_manager. // Should be available only after OnInstanceStarted(). std::string container_instance_id_; @@ -296,15 +324,42 @@ void ArcSessionImpl::Start() { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); - DCHECK_EQ(state_, State::NOT_STARTED); - VLOG(2) << "Starting ARC session."; - VLOG(2) << "Creating socket..."; + // Start() can be called either for starting ARC from scratch or for + // resuming an existing one. Start() must be able to start a fully + // functional instance from all of |state_| up to and including + // RUNNING_FOR_LOGIN_SCREEN. + DCHECK_GE(State::RUNNING_FOR_LOGIN_SCREEN, state_); - state_ = State::CREATING_SOCKET; - base::PostTaskAndReplyWithResult( - blocking_task_runner_.get(), FROM_HERE, - base::Bind(&ArcSessionImpl::CreateSocket), - base::Bind(&ArcSessionImpl::OnSocketCreated, weak_factory_.GetWeakPtr())); + // Flip the flag now so that callback functions like OnSocketCreated() + // can do the right thing. + login_screen_instance_requested_ = false; + + if (state_ == State::NOT_STARTED) { + // An instance for login screen does not exist. Start a new one from + // scratch. + VLOG(2) << "Starting ARC session"; + VLOG(2) << "Creating socket..."; + state_ = State::CREATING_SOCKET; + base::PostTaskAndReplyWithResult( + blocking_task_runner_.get(), FROM_HERE, + base::Bind(&ArcSessionImpl::CreateSocket), + base::Bind(&ArcSessionImpl::OnSocketCreated, weak_factory_.GetWeakPtr(), + false /* not for login screen */)); + } else if (state_ == State::CREATING_SOCKET) { + VLOG(2) << "Requested to start ARC instance with an existing socket"; + // OnSocketCreated() will start a fully featured instance. + } else if (state_ == State::STARTING_INSTANCE) { + VLOG(2) << "Requested to resume an existing ARC instance"; + // OnInstanceStarted() will start a fully featured instance. + } else if (state_ == State::RUNNING_FOR_LOGIN_SCREEN) { + VLOG(2) << "Resuming an existing ARC instance"; + state_ = State::STARTING_INSTANCE; + SendStartArcInstanceDBusMessage( + false /* not for login screen */, + base::Bind(&ArcSessionImpl::OnInstanceStarted, + weak_factory_.GetWeakPtr(), false /* the same */, + base::Passed(&socket_fd_))); + } } // static @@ -346,6 +401,7 @@ } void ArcSessionImpl::OnSocketCreated( + bool instance_is_for_login_screen, mojo::edk::ScopedPlatformHandle socket_fd) { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); DCHECK_EQ(state_, State::CREATING_SOCKET); @@ -362,8 +418,29 @@ return; } - VLOG(2) << "Socket is created. Starting ARC instance..."; + VLOG(2) << "Socket is created. Starting ARC instance" + << (instance_is_for_login_screen ? " for login screen" : ""); state_ = State::STARTING_INSTANCE; + SendStartArcInstanceDBusMessage( + instance_is_for_login_screen, + base::Bind(&ArcSessionImpl::OnInstanceStarted, weak_factory_.GetWeakPtr(), + instance_is_for_login_screen, base::Passed(&socket_fd))); +} + +// static +void ArcSessionImpl::SendStartArcInstanceDBusMessage( + bool instance_is_for_login_screen, + const chromeos::SessionManagerClient::StartArcInstanceCallback& cb) { + chromeos::SessionManagerClient* session_manager_client = + chromeos::DBusThreadManager::Get()->GetSessionManagerClient(); + if (instance_is_for_login_screen) { + session_manager_client->StartArcInstance( + chromeos::SessionManagerClient::ArcStartupMode::LOGIN_SCREEN, + // All variables below except |cb| will be ignored. + cryptohome::Identification(), false, false, cb); + return; + } + user_manager::UserManager* user_manager = user_manager::UserManager::Get(); DCHECK(user_manager->GetPrimaryUser()); const cryptohome::Identification cryptohome_id( @@ -377,22 +454,29 @@ const bool scan_vendor_priv_app = chromeos::switches::IsVoiceInteractionEnabled(); - chromeos::SessionManagerClient* session_manager_client = - chromeos::DBusThreadManager::Get()->GetSessionManagerClient(); session_manager_client->StartArcInstance( chromeos::SessionManagerClient::ArcStartupMode::FULL, cryptohome_id, - skip_boot_completed_broadcast, scan_vendor_priv_app, - base::Bind(&ArcSessionImpl::OnInstanceStarted, weak_factory_.GetWeakPtr(), - base::Passed(&socket_fd))); + skip_boot_completed_broadcast, scan_vendor_priv_app, cb); } void ArcSessionImpl::OnInstanceStarted( + bool instance_is_for_login_screen, mojo::edk::ScopedPlatformHandle socket_fd, StartArcInstanceResult result, const std::string& container_instance_id) { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); DCHECK_EQ(state_, State::STARTING_INSTANCE); - container_instance_id_ = container_instance_id; + + bool resumed = false; + if (!container_instance_id_.empty()) { + // |container_instance_id_| has already been initialized when the instance + // for login screen was started. + DCHECK(container_instance_id.empty()); + DCHECK(!instance_is_for_login_screen); + resumed = true; + } else { + container_instance_id_ = container_instance_id; + } if (stop_requested_) { if (result == StartArcInstanceResult::SUCCESS) { @@ -412,7 +496,26 @@ return; } - VLOG(2) << "ARC instance is successfully started. Connecting Mojo..."; + if (instance_is_for_login_screen) { + VLOG(2) << "ARC instance for login screen is successfully started."; + if (login_screen_instance_requested_) { + state_ = State::RUNNING_FOR_LOGIN_SCREEN; + socket_fd_ = std::move(socket_fd); + } else { + // Start() has been called. + VLOG(2) << "Resuming an existing ARC instance"; + state_ = State::STARTING_INSTANCE; + SendStartArcInstanceDBusMessage( + false /* not for login screen */, + base::Bind(&ArcSessionImpl::OnInstanceStarted, + weak_factory_.GetWeakPtr(), false /* the same */, + base::Passed(&socket_fd_))); + } + return; + } + + VLOG(2) << "ARC instance is successfully " + << (resumed ? "resumed" : "started") << ". Connecting Mojo..."; state_ = State::CONNECTING_MOJO; // Prepare a pipe so that AcceptInstanceConnection can be interrupted on @@ -539,6 +642,11 @@ // clean it up. return; + case State::RUNNING_FOR_LOGIN_SCREEN: + // An ARC instance for login screen is running. Request to stop it. + StopArcInstance(); + return; + case State::CONNECTING_MOJO: // Mojo connection is being waited on a BlockingPool thread. // Request to cancel it. Following stopping procedure will run @@ -560,10 +668,13 @@ void ArcSessionImpl::StopArcInstance() { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); DCHECK(state_ == State::STARTING_INSTANCE || + state_ == State::RUNNING_FOR_LOGIN_SCREEN || state_ == State::CONNECTING_MOJO || state_ == State::RUNNING); - // Notification will arrive through ArcInstanceStopped(). - VLOG(2) << "Requesting to stop ARC instance"; + VLOG(2) << "Requesting session_manager to stop ARC instance"; + + // When the instance is not for login screen, change the |state_| in + // ArcInstanceStopped(). chromeos::SessionManagerClient* session_manager_client = chromeos::DBusThreadManager::Get()->GetSessionManagerClient(); session_manager_client->StopArcInstance( @@ -578,6 +689,8 @@ << (clean ? "cleanly" : "uncleanly"); if (container_instance_id != container_instance_id_) { + // This path is taken e.g. when an instance for login screen is Stop()ped + // by ArcSessionRunner. VLOG(1) << "Container instance id mismatch. Do nothing." << container_instance_id << " vs " << container_instance_id_; return; @@ -607,6 +720,24 @@ OnStopped(reason); } +void ArcSessionImpl::StartForLoginScreen() { + DCHECK_EQ(State::NOT_STARTED, state_); + + VLOG(2) << "Starting ARC session for login screen"; + VLOG(2) << "Creating socket..."; + login_screen_instance_requested_ = true; + state_ = State::CREATING_SOCKET; + base::PostTaskAndReplyWithResult( + blocking_task_runner_.get(), FROM_HERE, + base::Bind(&ArcSessionImpl::CreateSocket), + base::Bind(&ArcSessionImpl::OnSocketCreated, weak_factory_.GetWeakPtr(), + true /* for login screen */)); +} + +bool ArcSessionImpl::IsForLoginScreen() { + return login_screen_instance_requested_; +} + void ArcSessionImpl::OnStopped(ArcStopReason reason) { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); // OnStopped() should be called once per instance. @@ -634,10 +765,12 @@ // Note that this may fail if ARC container is not actually running, but // ignore an error as described below. if (state_ == State::STARTING_INSTANCE || - state_ == State::CONNECTING_MOJO || state_ == State::RUNNING) + state_ == State::RUNNING_FOR_LOGIN_SCREEN || + state_ == State::CONNECTING_MOJO || state_ == State::RUNNING) { StopArcInstance(); + } - // Directly set to the STOPPED stateby OnStopped(). Note that calling + // Directly set to the STOPPED state by OnStopped(). Note that calling // StopArcInstance() may not work well. At least, because the UI thread is // already stopped here, ArcInstanceStopped() callback cannot be invoked. OnStopped(ArcStopReason::SHUTDOWN);
diff --git a/components/arc/arc_session.h b/components/arc/arc_session.h index 4f9f387..7ae7a19 100644 --- a/components/arc/arc_session.h +++ b/components/arc/arc_session.h
@@ -8,10 +8,7 @@ #include <memory> #include "base/macros.h" -#include "base/memory/ref_counted.h" #include "base/observer_list.h" -#include "base/sequenced_task_runner.h" -#include "base/single_thread_task_runner.h" #include "base/task_runner.h" #include "components/arc/arc_bridge_service.h" #include "components/arc/arc_stop_reason.h" @@ -21,8 +18,8 @@ // Starts the ARC instance and bootstraps the bridge connection. // Clients should implement the Delegate to be notified upon communications // being available. -// The instance can be safely removed 1) before Start() is called, or 2) after -// OnStopped() is called. +// The instance can be safely removed 1) before Start*() is called, or 2) after +// OnSessionStopped() is called. // The number of instances must be at most one. Otherwise, ARC instances will // conflict. class ArcSession { @@ -47,17 +44,29 @@ const scoped_refptr<base::TaskRunner>& blocking_task_runner); virtual ~ArcSession(); + // Starts an instance for login screen. The instance is not a fully functional + // one, and Observer::OnSessionReady() will *never* be called. + virtual void StartForLoginScreen() = 0; + + // Returns true if StartForLoginScreen() has been called but Start() hasn't. + virtual bool IsForLoginScreen() = 0; + // Starts and bootstraps a connection with the instance. The Observer's - // OnReady() will be called if the bootstrapping is successful, or - // OnStopped() if it is not. Start() should not be called twice or more. + // OnSessionReady() will be called if the bootstrapping is successful, or + // OnSessionStopped() if it is not. Start() should not be called twice or + // more. When StartForLoginScreen() has already been called, Start() turns + // the mini instance to a fully functional one. virtual void Start() = 0; - // Requests to stop the currently-running instance. - // The completion is notified via OnStopped() of the Delegate. + // Requests to stop the currently-running instance whether or not it is for + // login screen. + // The completion is notified via OnSessionStopped() of the Observer. virtual void Stop() = 0; // Called when Chrome is in shutdown state. This is called when the message - // loop is already stopped, and the instance will soon be deleted. + // loop is already stopped, and the instance will soon be deleted. Caller + // may expect that OnSessionStopped() is synchronously called back except + // when it has already been called before. virtual void OnShutdown() = 0; void AddObserver(Observer* observer);
diff --git a/components/arc/arc_session_runner.cc b/components/arc/arc_session_runner.cc index 4c3e8d9..d16f5efc 100644 --- a/components/arc/arc_session_runner.cc +++ b/components/arc/arc_session_runner.cc
@@ -7,6 +7,7 @@ #include "base/logging.h" #include "base/memory/ref_counted.h" #include "base/task_runner.h" +#include "chromeos/dbus/dbus_thread_manager.h" namespace arc { @@ -15,17 +16,34 @@ constexpr base::TimeDelta kDefaultRestartDelay = base::TimeDelta::FromSeconds(5); +chromeos::SessionManagerClient* GetSessionManagerClient() { + // If the DBusThreadManager or the SessionManagerClient aren't available, + // there isn't much we can do. This should only happen when running tests. + if (!chromeos::DBusThreadManager::IsInitialized() || + !chromeos::DBusThreadManager::Get() || + !chromeos::DBusThreadManager::Get()->GetSessionManagerClient()) + return nullptr; + return chromeos::DBusThreadManager::Get()->GetSessionManagerClient(); +} + } // namespace ArcSessionRunner::ArcSessionRunner(const ArcSessionFactory& factory) : restart_delay_(kDefaultRestartDelay), factory_(factory), - weak_ptr_factory_(this) {} + weak_ptr_factory_(this) { + chromeos::SessionManagerClient* client = GetSessionManagerClient(); + if (client) + client->AddObserver(this); +} ArcSessionRunner::~ArcSessionRunner() { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); if (arc_session_) arc_session_->RemoveObserver(this); + chromeos::SessionManagerClient* client = GetSessionManagerClient(); + if (client) + client->RemoveObserver(this); } void ArcSessionRunner::AddObserver(Observer* observer) { @@ -52,30 +70,33 @@ // previous RequestStop() call). DCHECK(!restart_timer_.IsRunning()); - if (arc_session_) { + if (arc_session_ && state_ >= State::STARTING) { // In this case, RequestStop() was called, and before |arc_session_| had // finished stopping, RequestStart() was called. Do nothing in that case, // since when |arc_session_| does actually stop, OnSessionStopped() will // be called, where it should automatically restart. DCHECK_EQ(state_, State::STOPPING); } else { - DCHECK_EQ(state_, State::STOPPED); + DCHECK_LE(state_, State::STARTING_FOR_LOGIN_SCREEN); StartArcSession(); } } -void ArcSessionRunner::RequestStop() { +void ArcSessionRunner::RequestStop(bool always_stop_session) { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); - // Consecutive RequestStop() call. Do nothing. - if (!run_requested_) - return; + if (!run_requested_) { + // Call Stop() to stop an instance for login screen (if any.) If this is + // just a consecutive RequestStop() call, Stop() does nothing. + if (!always_stop_session || !arc_session_) + return; + } VLOG(1) << "Session ended"; run_requested_ = false; if (arc_session_) { - // The |state_| could be either STARTING, RUNNING or STOPPING. + // The |state_| could be either STARTING*, RUNNING or STOPPING. DCHECK_NE(state_, State::STOPPED); if (state_ == State::STOPPING) { @@ -124,20 +145,22 @@ void ArcSessionRunner::SetRestartDelayForTesting( const base::TimeDelta& restart_delay) { DCHECK_EQ(state_, State::STOPPED); - DCHECK(!arc_session_); DCHECK(!restart_timer_.IsRunning()); restart_delay_ = restart_delay; } void ArcSessionRunner::StartArcSession() { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); - DCHECK_EQ(state_, State::STOPPED); - DCHECK(!arc_session_); DCHECK(!restart_timer_.IsRunning()); VLOG(1) << "Starting ARC instance"; - arc_session_ = factory_.Run(); - arc_session_->AddObserver(this); + if (!arc_session_) { + DCHECK_EQ(state_, State::STOPPED); + arc_session_ = factory_.Run(); + arc_session_->AddObserver(this); + } else { + DCHECK_EQ(state_, State::STARTING_FOR_LOGIN_SCREEN); + } state_ = State::STARTING; arc_session_->Start(); } @@ -159,6 +182,11 @@ DCHECK(!restart_timer_.IsRunning()); VLOG(0) << "ARC stopped: " << stop_reason; + + // The observers should be agnostic to the existence of the limited-purpose + // instance. + const bool notify_observers = !arc_session_->IsForLoginScreen(); + arc_session_->RemoveObserver(this); arc_session_.reset(); @@ -188,8 +216,23 @@ } state_ = State::STOPPED; - for (auto& observer : observer_list_) - observer.OnSessionStopped(stop_reason, restarting); + if (notify_observers) { + for (auto& observer : observer_list_) + observer.OnSessionStopped(stop_reason, restarting); + } +} + +void ArcSessionRunner::EmitLoginPromptVisibleCalled() { + DCHECK(!arc_session_); + // Since 'login-prompt-visible' Upstart signal starts all Upstart jobs the + // container may depend on such as cras, EmitLoginPromptVisibleCalled() is the + // safe place to start the container for login screen. + // TODO(yusukes): Once Chrome OS side is ready, uncomment the following: + + // arc_session_ = factory_.Run(); + // arc_session_->AddObserver(this); + // state_ = State::STARTING_FOR_LOGIN_SCREEN; + // arc_session_->StartForLoginScreen(); } } // namespace arc
diff --git a/components/arc/arc_session_runner.h b/components/arc/arc_session_runner.h index f5898b9..13bf3ea 100644 --- a/components/arc/arc_session_runner.h +++ b/components/arc/arc_session_runner.h
@@ -11,6 +11,7 @@ #include "base/macros.h" #include "base/time/time.h" #include "base/timer/timer.h" +#include "chromeos/dbus/session_manager_client.h" #include "components/arc/arc_session.h" #include "components/arc/arc_stop_reason.h" @@ -18,7 +19,8 @@ // Accept requests to start/stop ARC instance. Also supports automatic // restarting on unexpected ARC instance crash. -class ArcSessionRunner : public ArcSession::Observer { +class ArcSessionRunner : public ArcSession::Observer, + public chromeos::SessionManagerClient::Observer { public: // Observer to notify events across multiple ARC session runs. class Observer { @@ -50,7 +52,8 @@ void RequestStart(); // Stops the ARC service. - void RequestStop(); + // TODO(yusukes): Remove the parameter. + void RequestStop(bool always_stop_session); // OnShutdown() should be called when the browser is shutting down. This can // only be called on the thread that this class was created on. We assume that @@ -94,6 +97,10 @@ // ARC instance is not currently running. STOPPED, + // Request to start ARC instance for login screen is received. Starting an + // ARC instance. + STARTING_FOR_LOGIN_SCREEN, + // Request to start ARC instance is received. Starting an ARC instance. STARTING, @@ -112,6 +119,9 @@ void OnSessionReady() override; void OnSessionStopped(ArcStopReason reason) override; + // chromeos::SessionManagerClient::Observer: + void EmitLoginPromptVisibleCalled() override; + THREAD_CHECKER(thread_checker_); // Observers for the ARC instance state change events.
diff --git a/components/arc/arc_session_runner_unittest.cc b/components/arc/arc_session_runner_unittest.cc index c407a09..144d0b0b 100644 --- a/components/arc/arc_session_runner_unittest.cc +++ b/components/arc/arc_session_runner_unittest.cc
@@ -14,6 +14,7 @@ #include "base/single_thread_task_runner.h" #include "base/test/scoped_task_environment.h" #include "chromeos/dbus/dbus_thread_manager.h" +#include "chromeos/dbus/fake_session_manager_client.h" #include "components/arc/arc_session_runner.h" #include "components/arc/test/fake_arc_session.h" #include "mojo/public/cpp/system/message_pipe.h" @@ -40,10 +41,13 @@ base::test::ScopedTaskEnvironment::MainThreadType::UI) {} void SetUp() override { + chromeos::DBusThreadManager::GetSetterForTesting()->SetSessionManagerClient( + base::MakeUnique<chromeos::FakeSessionManagerClient>()); chromeos::DBusThreadManager::Initialize(); stop_reason_ = ArcStopReason::SHUTDOWN; restarting_ = false; + stopped_called_ = false; // We inject FakeArcSession here so we do not need task_runner. arc_session_runner_ = @@ -65,8 +69,17 @@ arc_session_runner_->GetArcSessionForTesting()); } - ArcStopReason stop_reason() { return stop_reason_; } - bool restarting() { return restarting_; } + ArcStopReason stop_reason() { + EXPECT_TRUE(stopped_called()); + return stop_reason_; + } + + bool restarting() { + EXPECT_TRUE(stopped_called()); + return restarting_; + } + + bool stopped_called() { return stopped_called_; } void ResetArcSessionFactory( const ArcSessionRunner::ArcSessionFactory& factory) { @@ -95,10 +108,12 @@ // ArcSessionRunner::OnSessionStopped(). stop_reason_ = stop_reason; restarting_ = restarting; + stopped_called_ = true; } ArcStopReason stop_reason_; bool restarting_; + bool stopped_called_; std::unique_ptr<ArcSessionRunner> arc_session_runner_; base::test::ScopedTaskEnvironment scoped_task_environment_; @@ -138,7 +153,7 @@ arc_session_runner()->RequestStart(); EXPECT_TRUE(arc_session_runner()->IsRunning()); - arc_session_runner()->RequestStop(); + arc_session_runner()->RequestStop(false); EXPECT_TRUE(arc_session_runner()->IsStopped()); EXPECT_TRUE(observer.stopped_called()); } @@ -154,7 +169,7 @@ EXPECT_FALSE(arc_session_runner()->IsStopped()); EXPECT_FALSE(arc_session_runner()->IsRunning()); - arc_session_runner()->RequestStop(); + arc_session_runner()->RequestStop(false); EXPECT_TRUE(arc_session_runner()->IsStopped()); } @@ -171,6 +186,47 @@ EXPECT_TRUE(arc_session_runner()->IsStopped()); } +// Does the same with the mini instance for login screen. +// TODO(yusukes): Enable the test once EmitLoginPromptVisibleCalled() is fully +// enabled. +TEST_F(ArcSessionRunnerTest, DISABLED_BootFailureForLoginScreen) { + ResetArcSessionFactory( + base::Bind(&ArcSessionRunnerTest::CreateBootFailureArcSession, + ArcStopReason::CRASH)); + EXPECT_TRUE(arc_session_runner()->IsStopped()); + + chromeos::DBusThreadManager::Get() + ->GetSessionManagerClient() + ->EmitLoginPromptVisible(); + // If starting the mini instance fails, arc_session_runner()'s state goes back + // to STOPPED, but its observers won't be notified. + EXPECT_TRUE(arc_session_runner()->IsStopped()); + EXPECT_FALSE(stopped_called()); + + // Also make sure that RequestStart() works just fine after the boot + // failure. + ResetArcSessionFactory(base::Bind(FakeArcSession::Create)); + arc_session_runner()->RequestStart(); + EXPECT_TRUE(arc_session_runner()->IsRunning()); +} + +// Tests that RequestStart() works even after EmitLoginPromptVisibleCalled() +// is called. +// TODO(yusukes): Enable the test once EmitLoginPromptVisibleCalled() is fully +// enabled. +TEST_F(ArcSessionRunnerTest, DISABLED_StartWithLoginScreenInstance) { + EXPECT_TRUE(arc_session_runner()->IsStopped()); + + chromeos::DBusThreadManager::Get() + ->GetSessionManagerClient() + ->EmitLoginPromptVisible(); + EXPECT_FALSE(arc_session_runner()->IsStopped()); + EXPECT_FALSE(arc_session_runner()->IsRunning()); + + arc_session_runner()->RequestStart(); + EXPECT_TRUE(arc_session_runner()->IsRunning()); +} + // If the instance is stopped, it should be re-started. TEST_F(ArcSessionRunnerTest, Restart) { arc_session_runner()->SetRestartDelayForTesting(base::TimeDelta()); @@ -186,7 +242,7 @@ base::RunLoop().RunUntilIdle(); EXPECT_TRUE(arc_session_runner()->IsRunning()); - arc_session_runner()->RequestStop(); + arc_session_runner()->RequestStop(false); EXPECT_TRUE(arc_session_runner()->IsStopped()); } @@ -217,7 +273,7 @@ EXPECT_TRUE(arc_session_runner()->IsRunning()); // Graceful stop. - arc_session_runner()->RequestStop(); + arc_session_runner()->RequestStop(false); EXPECT_EQ(ArcStopReason::SHUTDOWN, stop_reason()); EXPECT_FALSE(restarting()); EXPECT_TRUE(arc_session_runner()->IsStopped());
diff --git a/components/arc/test/fake_arc_session.cc b/components/arc/test/fake_arc_session.cc index 93a99967..6b3b5c1 100644 --- a/components/arc/test/fake_arc_session.cc +++ b/components/arc/test/fake_arc_session.cc
@@ -15,7 +15,20 @@ FakeArcSession::~FakeArcSession() = default; +void FakeArcSession::StartForLoginScreen() { + is_for_login_screen_ = true; + if (boot_failure_emulation_enabled_) { + for (auto& observer : observer_list_) + observer.OnSessionStopped(boot_failure_reason_); + } +} + +bool FakeArcSession::IsForLoginScreen() { + return is_for_login_screen_; +} + void FakeArcSession::Start() { + is_for_login_screen_ = false; if (boot_failure_emulation_enabled_) { for (auto& observer : observer_list_) observer.OnSessionStopped(boot_failure_reason_);
diff --git a/components/arc/test/fake_arc_session.h b/components/arc/test/fake_arc_session.h index 132c86a..9e272d2 100644 --- a/components/arc/test/fake_arc_session.h +++ b/components/arc/test/fake_arc_session.h
@@ -20,6 +20,8 @@ ~FakeArcSession() override; // ArcSession overrides: + void StartForLoginScreen() override; + bool IsForLoginScreen() override; void Start() override; void Stop() override; void OnShutdown() override; @@ -29,11 +31,12 @@ // The following control Start() behavior for testing various situations. - // Enables/disables boot failure emulation, in which OnStopped(reason) will - // be called when Start() is called. + // Enables/disables boot failure emulation, in which OnSessionStopped(reason) + // will be called when Start() or StartForLoginScreen() is called. void EnableBootFailureEmulation(ArcStopReason reason); - // Emulate Start() is suspended at some phase, before OnReady() is invoked. + // Emulate Start() is suspended at some phase, before OnSessionReady() is + // invoked. void SuspendBoot(); // Returns FakeArcSession instance. This can be used for a factory @@ -45,6 +48,7 @@ ArcStopReason boot_failure_reason_; bool boot_suspended_ = false; + bool is_for_login_screen_ = false; DISALLOW_COPY_AND_ASSIGN(FakeArcSession); };
diff --git a/components/autofill/core/browser/webdata/autofill_table.cc b/components/autofill/core/browser/webdata/autofill_table.cc index df5890d..cba036d 100644 --- a/components/autofill/core/browser/webdata/autofill_table.cc +++ b/components/autofill/core/browser/webdata/autofill_table.cc
@@ -2621,23 +2621,27 @@ } bool AutofillTable::MigrateToVersion73AddMaskedCardBankName() { - sql::Transaction transaction(db_); - if (!transaction.Begin()) - return false; - // Add the new bank_name column to the masked_credit_cards table. - if (!db_->DoesColumnExist("masked_credit_cards", "bank_name") && - !db_->Execute("ALTER TABLE masked_credit_cards ADD COLUMN " - "bank_name VARCHAR")) { - return false; - } - - return transaction.Commit(); + return db_->DoesColumnExist("masked_credit_cards", "bank_name") || + db_->Execute( + "ALTER TABLE masked_credit_cards ADD COLUMN bank_name VARCHAR"); } bool AutofillTable::MigrateToVersion74AddServerCardTypeColumn() { - return db_->Execute( - "ALTER TABLE masked_credit_cards ADD COLUMN type INTEGER DEFAULT 0"); + // Version 73 was actually used by two different schemas; an attempt to add + // the "type" column (as in this version 74) was landed and reverted, and then + // the "bank_name" column was added (and stuck). Some clients may have been + // upgraded to one and some the other. Figure out which is the case. + const bool added_type_column_in_v73 = + db_->DoesColumnExist("masked_credit_cards", "type"); + + // If we previously added the "type" column, then it's already present with + // the correct semantics, but we now need to run the "bank_name" migration. + // Otherwise, we need to add "type" now. + return added_type_column_in_v73 ? MigrateToVersion73AddMaskedCardBankName() + : db_->Execute( + "ALTER TABLE masked_credit_cards ADD " + "COLUMN type INTEGER DEFAULT 0"); } } // namespace autofill
diff --git a/components/cast_certificate/cast_cert_validator.cc b/components/cast_certificate/cast_cert_validator.cc index 8ea624b..f10080e6 100644 --- a/components/cast_certificate/cast_cert_validator.cc +++ b/components/cast_certificate/cast_cert_validator.cc
@@ -158,15 +158,48 @@ return false; } +// Cast device certificates use the policy 1.3.6.1.4.1.11129.2.5.2 to indicate +// it is *restricted* to an audio-only device whereas the absence of a policy +// means it is unrestricted. +// +// This is somewhat different than RFC 5280's notion of policies, so policies +// are checked separately outside of path building. +// +// See the unit-tests VerifyCastDeviceCertTest.Policies* for some +// concrete examples of how this works. +void DetermineDeviceCertificatePolicy( + const net::CertPathBuilder::ResultPath* result_path, + CastDeviceCertPolicy* policy) { + // Iterate over all the certificates, including the root certificate. If any + // certificate contains the audio-only policy, the whole chain is considered + // constrained to audio-only device certificates. + // + // Policy mappings are not accounted for. The expectation is that top-level + // intermediates issued with audio-only will have no mappings. If subsequent + // certificates in the chain do, it won't matter as the chain is already + // restricted to being audio-only. + bool audio_only = false; + for (const auto& cert : result_path->path.certs) { + if (cert->has_policy_oids()) { + const std::vector<net::der::Input>& policies = cert->policy_oids(); + if (std::find(policies.begin(), policies.end(), AudioOnlyPolicyOid()) != + policies.end()) { + audio_only = true; + break; + } + } + } + + *policy = audio_only ? CastDeviceCertPolicy::AUDIO_ONLY + : CastDeviceCertPolicy::NONE; +} + // Checks properties on the target certificate. // // * The Key Usage must include Digital Signature -// * May have the policy 1.3.6.1.4.1.11129.2.5.2 to indicate it -// is an audio-only device. WARN_UNUSED_RESULT bool CheckTargetCertificate( const net::ParsedCertificate* cert, - std::unique_ptr<CertVerificationContext>* context, - CastDeviceCertPolicy* policy) { + std::unique_ptr<CertVerificationContext>* context) { // Get the Key Usage extension. if (!cert->has_key_usage()) return false; @@ -175,22 +208,6 @@ if (!cert->key_usage().AssertsBit(net::KEY_USAGE_BIT_DIGITAL_SIGNATURE)) return false; - // Check for an optional audio-only policy extension. - // - // TODO(eroman): Use |user_constrained_policy_set| that was output from - // verification instead. (Checking just the leaf certificate's policy - // assertion doesn't take into account policy restrictions on intermediates, - // policy constraints/inhibits, or policy re-mappings). - *policy = CastDeviceCertPolicy::NONE; - if (cert->has_policy_oids()) { - const std::vector<net::der::Input>& policies = cert->policy_oids(); - // Look for an audio-only policy. Disregard any other policy found. - if (std::find(policies.begin(), policies.end(), AudioOnlyPolicyOid()) != - policies.end()) { - *policy = CastDeviceCertPolicy::AUDIO_ONLY; - } - } - // Get the Common Name for the certificate. std::string common_name; if (!GetCommonNameFromSubject(cert->tbs().subject_tlv, &common_name)) @@ -281,9 +298,13 @@ return false; } - // Check properties of the leaf certificate (key usage, policy), and construct - // a CertVerificationContext that uses its public key. - if (!CheckTargetCertificate(target_cert.get(), context, policy)) + // Determine whether this device certificate is restricted to audio-only. + DetermineDeviceCertificatePolicy(result.GetBestValidPath(), policy); + + // Check properties of the leaf certificate not already verified by path + // building (key usage), and construct a CertVerificationContext that uses + // its public key. + if (!CheckTargetCertificate(target_cert.get(), context)) return false; // Check if a CRL is available.
diff --git a/components/cast_certificate/cast_cert_validator_unittest.cc b/components/cast_certificate/cast_cert_validator_unittest.cc index 43f9aea..7a8d1e5 100644 --- a/components/cast_certificate/cast_cert_validator_unittest.cc +++ b/components/cast_certificate/cast_cert_validator_unittest.cc
@@ -416,6 +416,138 @@ TRUST_STORE_FROM_TEST_FILE, ""); } +// Tests verifying a certificate chain with the policies: +// +// Root: policies={} +// Intermediate: policies={anyPolicy} +// Leaf: policies={anyPolicy} +TEST(VerifyCastDeviceCertTest, PoliciesIcaAnypolicyLeafAnypolicy) { + RunTest(RESULT_SUCCESS, "Leaf", CastDeviceCertPolicy::NONE, + "certificates/policies_ica_anypolicy_leaf_anypolicy.pem", + AprilFirst2016(), TRUST_STORE_FROM_TEST_FILE, ""); +} + +// Test verifying a certificate chain with the policies: +// +// Root: policies={} +// Intermediate: policies={anyPolicy} +// Leaf: policies={audioOnly} +TEST(VerifyCastDeviceCertTest, PoliciesIcaAnypolicyLeafAudioonly) { + RunTest(RESULT_SUCCESS, "Leaf", CastDeviceCertPolicy::AUDIO_ONLY, + "certificates/policies_ica_anypolicy_leaf_audioonly.pem", + AprilFirst2016(), TRUST_STORE_FROM_TEST_FILE, ""); +} + +// Test verifying a certificate chain with the policies: +// +// Root: policies={} +// Intermediate: policies={anyPolicy} +// Leaf: policies={foo} +TEST(VerifyCastDeviceCertTest, PoliciesIcaAnypolicyLeafFoo) { + RunTest(RESULT_SUCCESS, "Leaf", CastDeviceCertPolicy::NONE, + "certificates/policies_ica_anypolicy_leaf_foo.pem", AprilFirst2016(), + TRUST_STORE_FROM_TEST_FILE, ""); +} + +// Test verifying a certificate chain with the policies: +// +// Root: policies={} +// Intermediate: policies={anyPolicy} +// Leaf: policies={} +TEST(VerifyCastDeviceCertTest, PoliciesIcaAnypolicyLeafNone) { + RunTest(RESULT_SUCCESS, "Leaf", CastDeviceCertPolicy::NONE, + "certificates/policies_ica_anypolicy_leaf_none.pem", AprilFirst2016(), + TRUST_STORE_FROM_TEST_FILE, ""); +} + +// Test verifying a certificate chain with the policies: +// +// Root: policies={} +// Intermediate: policies={audioOnly} +// Leaf: policies={anyPolicy} +TEST(VerifyCastDeviceCertTest, PoliciesIcaAudioonlyLeafAnypolicy) { + RunTest(RESULT_SUCCESS, "Leaf", CastDeviceCertPolicy::AUDIO_ONLY, + "certificates/policies_ica_audioonly_leaf_anypolicy.pem", + AprilFirst2016(), TRUST_STORE_FROM_TEST_FILE, ""); +} + +// Test verifying a certificate chain with the policies: +// +// Root: policies={} +// Intermediate: policies={audioOnly} +// Leaf: policies={audioOnly} +TEST(VerifyCastDeviceCertTest, PoliciesIcaAudioonlyLeafAudioonly) { + RunTest(RESULT_SUCCESS, "Leaf", CastDeviceCertPolicy::AUDIO_ONLY, + "certificates/policies_ica_audioonly_leaf_audioonly.pem", + AprilFirst2016(), TRUST_STORE_FROM_TEST_FILE, ""); +} + +// Test verifying a certificate chain with the policies: +// +// Root: policies={} +// Intermediate: policies={audioOnly} +// Leaf: policies={foo} +TEST(VerifyCastDeviceCertTest, PoliciesIcaAudioonlyLeafFoo) { + RunTest(RESULT_SUCCESS, "Leaf", CastDeviceCertPolicy::AUDIO_ONLY, + "certificates/policies_ica_audioonly_leaf_foo.pem", AprilFirst2016(), + TRUST_STORE_FROM_TEST_FILE, ""); +} + +// Test verifying a certificate chain with the policies: +// +// Root: policies={} +// Intermediate: policies={audioOnly} +// Leaf: policies={} +TEST(VerifyCastDeviceCertTest, PoliciesIcaAudioonlyLeafNone) { + RunTest(RESULT_SUCCESS, "Leaf", CastDeviceCertPolicy::AUDIO_ONLY, + "certificates/policies_ica_audioonly_leaf_none.pem", AprilFirst2016(), + TRUST_STORE_FROM_TEST_FILE, ""); +} + +// Test verifying a certificate chain with the policies: +// +// Root: policies={} +// Intermediate: policies={} +// Leaf: policies={anyPolicy} +TEST(VerifyCastDeviceCertTest, PoliciesIcaNoneLeafAnypolicy) { + RunTest(RESULT_SUCCESS, "Leaf", CastDeviceCertPolicy::NONE, + "certificates/policies_ica_none_leaf_anypolicy.pem", AprilFirst2016(), + TRUST_STORE_FROM_TEST_FILE, ""); +} + +// Test verifying a certificate chain with the policies: +// +// Root: policies={} +// Intermediate: policies={} +// Leaf: policies={audioOnly} +TEST(VerifyCastDeviceCertTest, PoliciesIcaNoneLeafAudioonly) { + RunTest(RESULT_SUCCESS, "Leaf", CastDeviceCertPolicy::AUDIO_ONLY, + "certificates/policies_ica_none_leaf_audioonly.pem", AprilFirst2016(), + TRUST_STORE_FROM_TEST_FILE, ""); +} + +// Test verifying a certificate chain with the policies: +// +// Root: policies={} +// Intermediate: policies={} +// Leaf: policies={foo} +TEST(VerifyCastDeviceCertTest, PoliciesIcaNoneLeafFoo) { + RunTest(RESULT_SUCCESS, "Leaf", CastDeviceCertPolicy::NONE, + "certificates/policies_ica_none_leaf_foo.pem", AprilFirst2016(), + TRUST_STORE_FROM_TEST_FILE, ""); +} + +// Test verifying a certificate chain with the policies: +// +// Root: policies={} +// Intermediate: policies={} +// Leaf: policies={} +TEST(VerifyCastDeviceCertTest, PoliciesIcaNoneLeafNone) { + RunTest(RESULT_SUCCESS, "Leaf", CastDeviceCertPolicy::NONE, + "certificates/policies_ica_none_leaf_none.pem", AprilFirst2016(), + TRUST_STORE_FROM_TEST_FILE, ""); +} + // ------------------------------------------------------ // Valid signature using 1024-bit RSA key // ------------------------------------------------------
diff --git a/components/exo/wayland/clients/client_base.cc b/components/exo/wayland/clients/client_base.cc index 5ae9136..5ca4fee 100644 --- a/components/exo/wayland/clients/client_base.cc +++ b/components/exo/wayland/clients/client_base.cc
@@ -16,6 +16,7 @@ #include "base/command_line.h" #include "base/logging.h" +#include "base/message_loop/message_loop.h" #include "base/strings/string_number_conversions.h" #include "base/strings/stringprintf.h" #include "third_party/skia/include/core/SkCanvas.h" @@ -260,7 +261,7 @@ LOG(ERROR) << "Can't create gbm device"; return false; } - + ui_loop_.reset(new base::MessageLoopForUI); ui::OzonePlatform::InitParams params; params.single_process = true; ui::OzonePlatform::InitializeForGPU(params);
diff --git a/components/exo/wayland/clients/client_base.h b/components/exo/wayland/clients/client_base.h index be00a8c..2fef99a 100644 --- a/components/exo/wayland/clients/client_base.h +++ b/components/exo/wayland/clients/client_base.h
@@ -19,6 +19,7 @@ namespace base { class CommandLine; +class MessageLoopForUI; } namespace exo { @@ -92,6 +93,7 @@ std::unique_ptr<wl_shell_surface> shell_surface_; Globals globals_; #if defined(OZONE_PLATFORM_GBM) + std::unique_ptr<base::MessageLoopForUI> ui_loop_; base::ScopedFD drm_fd_; std::unique_ptr<gbm_device> device_; #endif
diff --git a/components/history/core/browser/expire_history_backend_unittest.cc b/components/history/core/browser/expire_history_backend_unittest.cc index 11cd46f..0a554fa8 100644 --- a/components/history/core/browser/expire_history_backend_unittest.cc +++ b/components/history/core/browser/expire_history_backend_unittest.cc
@@ -16,11 +16,11 @@ #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" #include "base/macros.h" -#include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "base/scoped_observer.h" #include "base/strings/string16.h" #include "base/strings/utf_string_conversions.h" +#include "base/test/scoped_task_environment.h" #include "components/history/core/browser/history_backend_client.h" #include "components/history/core/browser/history_backend_notifier.h" #include "components/history/core/browser/history_constants.h" @@ -55,7 +55,9 @@ public: ExpireHistoryTest() : backend_client_(history_client_.CreateBackendClient()), - expirer_(this, backend_client_.get(), message_loop_.task_runner()), + expirer_(this, + backend_client_.get(), + scoped_task_environment_.GetMainThreadTaskRunner()), now_(base::Time::Now()) {} protected: @@ -96,11 +98,11 @@ // This must be destroyed last. base::ScopedTempDir tmp_dir_; + base::test::ScopedTaskEnvironment scoped_task_environment_; + HistoryClientFakeBookmarks history_client_; std::unique_ptr<HistoryBackendClient> backend_client_; - base::MessageLoopForUI message_loop_; - ExpireHistoryBackend expirer_; std::unique_ptr<TestingPrefServiceSimple> pref_service_; @@ -139,8 +141,7 @@ PrepopulatedPageList(), base::Bind(MockCanAddURLToHistory)); WaitTopSitesLoadedObserver wait_top_sites_observer(top_sites_); - top_sites_->Init(path().Append(kTopSitesFilename), - message_loop_.task_runner()); + top_sites_->Init(path().Append(kTopSitesFilename)); wait_top_sites_observer.Run(); }
diff --git a/components/history/core/browser/top_sites_backend.cc b/components/history/core/browser/top_sites_backend.cc index 7124e82..7b0437e 100644 --- a/components/history/core/browser/top_sites_backend.cc +++ b/components/history/core/browser/top_sites_backend.cc
@@ -14,6 +14,8 @@ #include "base/metrics/histogram_macros.h" #include "base/single_thread_task_runner.h" #include "base/task/cancelable_task_tracker.h" +#include "base/task_scheduler/post_task.h" +#include "base/task_scheduler/task_traits.h" #include "base/time/time.h" #include "base/trace_event/trace_event.h" #include "components/history/core/browser/top_sites_database.h" @@ -21,9 +23,10 @@ namespace history { -TopSitesBackend::TopSitesBackend( - const scoped_refptr<base::SingleThreadTaskRunner>& db_task_runner) - : db_(new TopSitesDatabase()), db_task_runner_(db_task_runner) { +TopSitesBackend::TopSitesBackend() + : db_(new TopSitesDatabase()), + db_task_runner_(base::CreateSequencedTaskRunnerWithTraits( + {base::TaskPriority::USER_VISIBLE, base::MayBlock()})) { DCHECK(db_task_runner_); } @@ -83,7 +86,7 @@ } void TopSitesBackend::InitDBOnDBThread(const base::FilePath& path) { - DCHECK(db_task_runner_->BelongsToCurrentThread()); + DCHECK(db_task_runner_->RunsTasksOnCurrentThread()); if (!db_->Init(path)) { LOG(ERROR) << "Failed to initialize database."; db_.reset(); @@ -91,13 +94,13 @@ } void TopSitesBackend::ShutdownDBOnDBThread() { - DCHECK(db_task_runner_->BelongsToCurrentThread()); + DCHECK(db_task_runner_->RunsTasksOnCurrentThread()); db_.reset(); } void TopSitesBackend::GetMostVisitedThumbnailsOnDBThread( scoped_refptr<MostVisitedThumbnails> thumbnails) { - DCHECK(db_task_runner_->BelongsToCurrentThread()); + DCHECK(db_task_runner_->RunsTasksOnCurrentThread()); if (db_) { db_->GetPageThumbnails(&(thumbnails->most_visited), @@ -139,7 +142,7 @@ } void TopSitesBackend::ResetDatabaseOnDBThread(const base::FilePath& file_path) { - DCHECK(db_task_runner_->BelongsToCurrentThread()); + DCHECK(db_task_runner_->RunsTasksOnCurrentThread()); db_.reset(NULL); sql::Connection::Delete(db_path_); db_.reset(new TopSitesDatabase());
diff --git a/components/history/core/browser/top_sites_backend.h b/components/history/core/browser/top_sites_backend.h index 807f337..620a76ac 100644 --- a/components/history/core/browser/top_sites_backend.h +++ b/components/history/core/browser/top_sites_backend.h
@@ -16,7 +16,7 @@ namespace base { class CancelableTaskTracker; class FilePath; -class SingleThreadTaskRunner; +class SequencedTaskRunner; } namespace history { @@ -42,8 +42,7 @@ typedef base::Callback<void(const scoped_refptr<MostVisitedThumbnails>&)> GetMostVisitedThumbnailsCallback; - explicit TopSitesBackend( - const scoped_refptr<base::SingleThreadTaskRunner>& db_task_runner); + TopSitesBackend(); void Init(const base::FilePath& path); @@ -103,7 +102,7 @@ base::FilePath db_path_; std::unique_ptr<TopSitesDatabase> db_; - scoped_refptr<base::SingleThreadTaskRunner> db_task_runner_; + scoped_refptr<base::SequencedTaskRunner> db_task_runner_; DISALLOW_COPY_AND_ASSIGN(TopSitesBackend); };
diff --git a/components/history/core/browser/top_sites_impl.cc b/components/history/core/browser/top_sites_impl.cc index f983265..aa758327 100644 --- a/components/history/core/browser/top_sites_impl.cc +++ b/components/history/core/browser/top_sites_impl.cc
@@ -120,12 +120,10 @@ DCHECK(!can_add_url_to_history_.is_null()); } -void TopSitesImpl::Init( - const base::FilePath& db_name, - const scoped_refptr<base::SingleThreadTaskRunner>& db_task_runner) { +void TopSitesImpl::Init(const base::FilePath& db_name) { // Create the backend here, rather than in the constructor, so that // unit tests that do not need the backend can run without a problem. - backend_ = new TopSitesBackend(db_task_runner); + backend_ = new TopSitesBackend(); backend_->Init(db_name); backend_->GetMostVisitedThumbnails( base::Bind(&TopSitesImpl::OnGotMostVisitedThumbnails,
diff --git a/components/history/core/browser/top_sites_impl.h b/components/history/core/browser/top_sites_impl.h index 98bc72f..e8d1023 100644 --- a/components/history/core/browser/top_sites_impl.h +++ b/components/history/core/browser/top_sites_impl.h
@@ -39,7 +39,6 @@ class FilePath; class RefCountedBytes; class RefCountedMemory; -class SingleThreadTaskRunner; } namespace history { @@ -64,8 +63,7 @@ const CanAddURLToHistoryFn& can_add_url_to_history); // Initializes TopSitesImpl. - void Init(const base::FilePath& db_name, - const scoped_refptr<base::SingleThreadTaskRunner>& db_task_runner); + void Init(const base::FilePath& db_name); // TopSites implementation. bool SetPageThumbnail(const GURL& url,
diff --git a/components/history/core/browser/top_sites_impl_unittest.cc b/components/history/core/browser/top_sites_impl_unittest.cc index 25c83ff..00d1e107 100644 --- a/components/history/core/browser/top_sites_impl_unittest.cc +++ b/components/history/core/browser/top_sites_impl_unittest.cc
@@ -11,10 +11,10 @@ #include "base/files/scoped_temp_dir.h" #include "base/macros.h" #include "base/memory/weak_ptr.h" -#include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "base/strings/utf_string_conversions.h" #include "base/task/cancelable_task_tracker.h" +#include "base/test/scoped_task_environment.h" #include "build/build_config.h" #include "components/history/core/browser/history_client.h" #include "components/history/core/browser/history_constants.h" @@ -72,13 +72,14 @@ bool wait, bool include_forced_urls) { int start_number_of_callbacks = number_of_callbacks_; + base::RunLoop run_loop; top_sites->GetMostVisitedURLs( base::Bind(&TopSitesQuerier::OnTopSitesAvailable, - weak_ptr_factory_.GetWeakPtr()), + weak_ptr_factory_.GetWeakPtr(), &run_loop), include_forced_urls); if (wait && start_number_of_callbacks == number_of_callbacks_) { waiting_ = true; - base::RunLoop().Run(); + run_loop.Run(); } } @@ -91,11 +92,12 @@ private: // Callback for TopSitesImpl::GetMostVisitedURLs. - void OnTopSitesAvailable(const history::MostVisitedURLList& data) { + void OnTopSitesAvailable(base::RunLoop* run_loop, + const history::MostVisitedURLList& data) { urls_ = data; number_of_callbacks_++; if (waiting_) { - base::MessageLoop::current()->QuitWhenIdle(); + run_loop->QuitWhenIdle(); waiting_ = false; } } @@ -166,15 +168,6 @@ BlockUntilHistoryProcessesPendingRequests(history_service()); } - // Waits for top sites to finish processing a task. This is useful if you need - // to wait until top sites finishes processing a task. - void WaitForTopSites() { - top_sites()->backend_->DoEmptyRequest( - base::Bind(&TopSitesImplTest::QuitCallback, base::Unretained(this)), - &top_sites_tracker_); - base::RunLoop().Run(); - } - TopSitesImpl* top_sites() { return top_sites_impl_.get(); } HistoryService* history_service() { return history_service_.get(); } @@ -196,10 +189,6 @@ } } - // Quit the current message loop when invoked. Useful when running a nested - // message loop. - void QuitCallback() { base::MessageLoop::current()->QuitWhenIdle(); } - // Adds a page to history. void AddPageToHistory(const GURL& url) { RedirectList redirects; @@ -299,8 +288,7 @@ top_sites_impl_ = new TopSitesImpl( pref_service_.get(), history_service_.get(), prepopulated_pages, base::Bind(MockCanAddURLToHistory)); - top_sites_impl_->Init(scoped_temp_dir_.GetPath().Append(kTopSitesFilename), - message_loop_.task_runner()); + top_sites_impl_->Init(scoped_temp_dir_.GetPath().Append(kTopSitesFilename)); } void DestroyTopSites() { @@ -308,8 +296,7 @@ top_sites_impl_->ShutdownOnUIThread(); top_sites_impl_ = nullptr; - if (base::MessageLoop::current()) - base::RunLoop().RunUntilIdle(); + scoped_task_environment_.RunUntilIdle(); } } @@ -320,8 +307,9 @@ } private: + base::test::ScopedTaskEnvironment scoped_task_environment_; + base::ScopedTempDir scoped_temp_dir_; - base::MessageLoopForUI message_loop_; std::unique_ptr<TestingPrefServiceSimple> pref_service_; std::unique_ptr<HistoryService> history_service_;
diff --git a/components/offline_pages/core/prefetch/BUILD.gn b/components/offline_pages/core/prefetch/BUILD.gn index e9c5d80..4604e9c4 100644 --- a/components/offline_pages/core/prefetch/BUILD.gn +++ b/components/offline_pages/core/prefetch/BUILD.gn
@@ -23,6 +23,8 @@ "prefetch_dispatcher.h", "prefetch_dispatcher_impl.cc", "prefetch_dispatcher_impl.h", + "prefetch_downloader.cc", + "prefetch_downloader.h", "prefetch_gcm_app_handler.cc", "prefetch_gcm_app_handler.h", "prefetch_gcm_handler.h", @@ -35,6 +37,8 @@ "prefetch_proto_utils.h", "prefetch_request_fetcher.cc", "prefetch_request_fetcher.h", + "prefetch_server_urls.cc", + "prefetch_server_urls.h", "prefetch_service.h", "prefetch_service_impl.cc", "prefetch_service_impl.h", @@ -50,6 +54,7 @@ deps = [ "//base", + "//components/download/public", "//components/gcm_driver", "//components/gcm_driver/common", "//components/keyed_service/core", @@ -109,6 +114,7 @@ "get_operation_request_unittest.cc", "get_operation_task_unittest.cc", "prefetch_dispatcher_impl_unittest.cc", + "prefetch_downloader_unittest.cc", "prefetch_gcm_app_handler_unittest.cc", "prefetch_item_unittest.cc", "prefetch_network_request_factory_impl_unittest.cc", @@ -120,6 +126,7 @@ deps = [ ":prefetch", ":test_support", + "//components/download/public", "//components/gcm_driver/instance_id", "//components/offline_pages/core", "//components/offline_pages/core:switches",
diff --git a/components/offline_pages/core/prefetch/DEPS b/components/offline_pages/core/prefetch/DEPS index 4a85e6c..5214a88 100644 --- a/components/offline_pages/core/prefetch/DEPS +++ b/components/offline_pages/core/prefetch/DEPS
@@ -1,4 +1,5 @@ include_rules = [ + "+components/download/public", "+google_apis", "+components/gcm_driver", "+components/ntp_snippets",
diff --git a/components/offline_pages/core/prefetch/generate_page_bundle_request.cc b/components/offline_pages/core/prefetch/generate_page_bundle_request.cc index 94f9155..3cb6b2b6 100644 --- a/components/offline_pages/core/prefetch/generate_page_bundle_request.cc +++ b/components/offline_pages/core/prefetch/generate_page_bundle_request.cc
@@ -9,16 +9,13 @@ #include "base/logging.h" #include "components/offline_pages/core/prefetch/prefetch_proto_utils.h" #include "components/offline_pages/core/prefetch/prefetch_request_fetcher.h" +#include "components/offline_pages/core/prefetch/prefetch_server_urls.h" #include "components/offline_pages/core/prefetch/proto/offline_pages.pb.h" #include "net/url_request/url_request_context_getter.h" #include "url/gurl.h" namespace offline_pages { -namespace { -const char kGeneratePageBundleRequestURLPath[] = "v1:GeneratePageBundle"; -} // namespace - GeneratePageBundleRequest::GeneratePageBundleRequest( const std::string& user_agent, const std::string& gcm_registration_id, @@ -44,7 +41,7 @@ request.SerializeToString(&upload_data); fetcher_ = PrefetchRequestFetcher::CreateForPost( - kGeneratePageBundleRequestURLPath, upload_data, channel, + GeneratePageBundleRequestURL(channel), upload_data, request_context_getter, base::Bind(&GeneratePageBundleRequest::OnCompleted, // Fetcher is owned by this instance.
diff --git a/components/offline_pages/core/prefetch/get_operation_request.cc b/components/offline_pages/core/prefetch/get_operation_request.cc index 77d2cd2..a8541ce8 100644 --- a/components/offline_pages/core/prefetch/get_operation_request.cc +++ b/components/offline_pages/core/prefetch/get_operation_request.cc
@@ -9,25 +9,20 @@ #include "base/logging.h" #include "components/offline_pages/core/prefetch/prefetch_proto_utils.h" #include "components/offline_pages/core/prefetch/prefetch_request_fetcher.h" +#include "components/offline_pages/core/prefetch/prefetch_server_urls.h" #include "net/url_request/url_request_context_getter.h" #include "url/gurl.h" namespace offline_pages { -namespace { -const char kGetOperationURLPath[] = "v1/"; -} // namespace - GetOperationRequest::GetOperationRequest( const std::string& name, version_info::Channel channel, net::URLRequestContextGetter* request_context_getter, const PrefetchRequestFinishedCallback& callback) : callback_(callback) { - std::string path(kGetOperationURLPath); - path += name; fetcher_ = PrefetchRequestFetcher::CreateForGet( - path, channel, request_context_getter, + GetOperationRequestURL(name, channel), request_context_getter, base::Bind(&GetOperationRequest::OnCompleted, // Fetcher is owned by this instance. base::Unretained(this)));
diff --git a/components/offline_pages/core/prefetch/prefetch_downloader.cc b/components/offline_pages/core/prefetch/prefetch_downloader.cc new file mode 100644 index 0000000..8f03b67 --- /dev/null +++ b/components/offline_pages/core/prefetch/prefetch_downloader.cc
@@ -0,0 +1,113 @@ +// 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 "components/offline_pages/core/prefetch/prefetch_downloader.h" + +#include "base/bind.h" +#include "base/logging.h" +#include "base/strings/string_util.h" +#include "components/download/public/download_service.h" +#include "components/offline_pages/core/prefetch/prefetch_server_urls.h" +#include "url/gurl.h" + +namespace offline_pages { + +PrefetchDownloader::PrefetchDownloader( + download::DownloadService* download_service, + version_info::Channel channel) + : download_service_(download_service), + channel_(channel), + weak_ptr_factory_(this) { + DCHECK(download_service); + service_started_ = download_service->GetStatus() == + download::DownloadService::ServiceStatus::READY; +} + +PrefetchDownloader::PrefetchDownloader(version_info::Channel channel) + : channel_(channel), weak_ptr_factory_(this) {} + +PrefetchDownloader::~PrefetchDownloader() = default; + +void PrefetchDownloader::SetCompletedCallback( + const PrefetchDownloadCompletedCallback& callback) { + callback_ = callback; +} + +void PrefetchDownloader::StartDownload(const std::string& download_id, + const std::string& download_location) { + if (!service_started_) { + pending_downloads_.push_back( + std::make_pair(download_id, download_location)); + return; + } + + // TODO(jianli): Specify scheduling parameters, i.e. battery, network and etc. + // http://crbug.com/736156 + download::DownloadParams params; + params.client = download::DownloadClient::OFFLINE_PAGE_PREFETCH; + // TODO(jianli): Remove the uppercase after the download service fixes + // this issue. + params.guid = base::ToUpperASCII(download_id); + params.callback = base::Bind(&PrefetchDownloader::OnStartDownload, + weak_ptr_factory_.GetWeakPtr()); + params.request_params.url = PrefetchDownloadURL(download_location, channel_); + download_service_->StartDownload(params); +} + +void PrefetchDownloader::CancelDownload(const std::string& download_id) { + if (service_started_) { + download_service_->CancelDownload(download_id); + return; + } + for (auto iter = pending_downloads_.begin(); iter != pending_downloads_.end(); + ++iter) { + if (iter->first == download_id) { + pending_downloads_.erase(iter); + return; + } + } + pending_cancellations_.push_back(download_id); +} + +void PrefetchDownloader::OnDownloadServiceReady() { + DCHECK_EQ(download::DownloadService::ServiceStatus::READY, + download_service_->GetStatus()); + service_started_ = true; + + for (const auto& entry : pending_downloads_) + StartDownload(entry.first, entry.second); + pending_downloads_.clear(); + + for (const auto& entry : pending_cancellations_) + download_service_->CancelDownload(entry); + pending_cancellations_.clear(); +} + +void PrefetchDownloader::OnDownloadServiceShutdown() { + service_started_ = false; +} + +void PrefetchDownloader::OnDownloadSucceeded(const std::string& download_id, + const base::FilePath& file_path, + uint64_t file_size) { + if (callback_) + callback_.Run(PrefetchDownloadResult(download_id, file_path, file_size)); +} + +void PrefetchDownloader::OnDownloadFailed(const std::string& download_id) { + if (callback_) { + PrefetchDownloadResult result; + result.download_id = download_id; + callback_.Run(result); + } +} + +void PrefetchDownloader::OnStartDownload( + const std::string& download_id, + download::DownloadParams::StartResult result) { + if (result != download::DownloadParams::StartResult::ACCEPTED) + OnDownloadFailed(download_id); +} + +} // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/prefetch_downloader.h b/components/offline_pages/core/prefetch/prefetch_downloader.h new file mode 100644 index 0000000..4dd0f24 --- /dev/null +++ b/components/offline_pages/core/prefetch/prefetch_downloader.h
@@ -0,0 +1,96 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_DOWNLOADER_H_ +#define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_DOWNLOADER_H_ + +#include <string> +#include <utility> +#include <vector> + +#include "base/callback.h" +#include "base/macros.h" +#include "base/memory/weak_ptr.h" +#include "components/download/public/download_params.h" +#include "components/offline_pages/core/prefetch/prefetch_types.h" +#include "components/version_info/channel.h" + +namespace download { +class DownloadService; +} // namespace download + +namespace offline_pages { + +class PrefetchServiceTestTaco; + +// Asynchronously downloads the archive. +class PrefetchDownloader { + public: + PrefetchDownloader(download::DownloadService* download_service, + version_info::Channel channel); + ~PrefetchDownloader(); + + void SetCompletedCallback(const PrefetchDownloadCompletedCallback& callback); + + // Starts to download an archive from |download_location|. + void StartDownload(const std::string& download_id, + const std::string& download_location); + + // Cancels a previous scheduled download. + void CancelDownload(const std::string& download_id); + + // Responding to download client event. + + // Called when the download service is initialized and can accept the + // downloads. + void OnDownloadServiceReady(); + + // Called when the download service is tearing down. + void OnDownloadServiceShutdown(); + + // Called when a download is completed successfully. Note that the download + // can be scheduled in preious sessions. + void OnDownloadSucceeded(const std::string& download_id, + const base::FilePath& file_path, + uint64_t file_size); + + // Called when a download fails. + void OnDownloadFailed(const std::string& download_id); + + private: + friend class PrefetchServiceTestTaco; + + // For test only. + explicit PrefetchDownloader(version_info::Channel channel); + + // Callback for StartDownload. + void OnStartDownload(const std::string& download_id, + download::DownloadParams::StartResult result); + + // Unowned. It is valid until |this| instance is disposed. + download::DownloadService* download_service_; + + version_info::Channel channel_; + PrefetchDownloadCompletedCallback callback_; + + // Flag to indicate if the download service is ready to take downloads. + bool service_started_ = false; + + // TODO(jianli): Investigate making PrefetchService waits for DownloadService + // ready in order to avoid queueing. + // List of downloads pending to start after the download service starts. Each + // item is a pair of download id and download location. + std::vector<std::pair<std::string, std::string>> pending_downloads_; + // List of ids of downloads waiting to be cancelled after the download service + // starts. + std::vector<std::string> pending_cancellations_; + + base::WeakPtrFactory<PrefetchDownloader> weak_ptr_factory_; + + DISALLOW_COPY_AND_ASSIGN(PrefetchDownloader); +}; + +} // namespace offline_pages + +#endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_DOWNLOADER_H_
diff --git a/components/offline_pages/core/prefetch/prefetch_downloader_unittest.cc b/components/offline_pages/core/prefetch/prefetch_downloader_unittest.cc new file mode 100644 index 0000000..9823617 --- /dev/null +++ b/components/offline_pages/core/prefetch/prefetch_downloader_unittest.cc
@@ -0,0 +1,285 @@ +// 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 "components/offline_pages/core/prefetch/prefetch_downloader.h" + +#include <list> +#include <utility> +#include <vector> + +#include "base/bind.h" +#include "base/test/test_simple_task_runner.h" +#include "base/threading/thread_task_runner_handle.h" +#include "components/download/public/download_service.h" +#include "components/download/public/service_config.h" +#include "components/offline_pages/core/prefetch/prefetch_service.h" +#include "components/offline_pages/core/prefetch/prefetch_service_test_taco.h" +#include "net/base/url_util.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace { +const version_info::Channel kTestChannel = version_info::Channel::UNKNOWN; +const char kDownloadId[] = "1234"; +const char kDownloadId2[] = "ABCD"; +const char kFailedDownloadId[] = "FFFFFF"; +const char kDownloadLocation[] = "page/1"; +const char kDownloadLocation2[] = "page/zz"; +const char kServerPathForDownload[] = "/v1/media/page/1"; +const uint64_t kTestFileSize = 12345678u; +} // namespace + +namespace download { +class TestServiceConfig : public ServiceConfig { + public: + TestServiceConfig() = default; + ~TestServiceConfig() override = default; + + uint32_t GetMaxScheduledDownloadsPerClient() const override { return 0; } + const base::TimeDelta& GetFileKeepAliveTime() const override { + return time_delta_; + } + + private: + base::TimeDelta time_delta_; +}; + +class TestDownloadService : public DownloadService { + public: + TestDownloadService() = default; + ~TestDownloadService() override = default; + + // DownloadService implementation. + const ServiceConfig& GetConfig() override { return service_config_; } + void OnStartScheduledTask(DownloadTaskType task_type, + const TaskFinishedCallback& callback) override {} + bool OnStopScheduledTask(DownloadTaskType task_type) override { return true; } + ServiceStatus GetStatus() override { + return ready_ ? DownloadService::ServiceStatus::READY + : DownloadService::ServiceStatus::STARTING_UP; + } + + void StartDownload(const DownloadParams& download_params) override { + if (!ready_) { + OnDownloadFailed(download_params.guid); + return; + } + downloads_.push_back(download_params); + base::ThreadTaskRunnerHandle::Get()->PostTask( + FROM_HERE, base::Bind(&TestDownloadService::ProcessDownload, + base::Unretained(this))); + } + + void PauseDownload(const std::string& guid) override {} + void ResumeDownload(const std::string& guid) override {} + + void CancelDownload(const std::string& guid) override { + for (auto iter = downloads_.begin(); iter != downloads_.end(); ++iter) { + if (iter->guid == guid) { + downloads_.erase(iter); + return; + } + } + } + + void ChangeDownloadCriteria(const std::string& guid, + const SchedulingParams& params) override {} + + DownloadParams GetDownload(const std::string& guid) const { + for (auto iter = downloads_.begin(); iter != downloads_.end(); ++iter) { + if (iter->guid == guid) + return *iter; + } + return DownloadParams(); + } + + void set_ready(bool ready) { ready_ = ready; } + void set_prefetch_downloader( + offline_pages::PrefetchDownloader* prefetch_downloader) { + prefetch_downloader_ = prefetch_downloader; + } + + private: + void ProcessDownload() { + if (!ready_ || downloads_.empty()) + return; + DownloadParams params = downloads_.front(); + downloads_.pop_front(); + if (params.guid == kFailedDownloadId) + OnDownloadFailed(params.guid); + else + OnDownloadSucceeded(params.guid, base::FilePath(), kTestFileSize); + } + + void OnDownloadSucceeded(const std::string& guid, + const base::FilePath& file_path, + uint64_t file_size) { + if (prefetch_downloader_) + prefetch_downloader_->OnDownloadSucceeded(guid, file_path, file_size); + } + + void OnDownloadFailed(const std::string& guid) { + if (prefetch_downloader_) + prefetch_downloader_->OnDownloadFailed(guid); + } + + bool ready_ = false; + offline_pages::PrefetchDownloader* prefetch_downloader_ = nullptr; + TestServiceConfig service_config_; + std::list<DownloadParams> downloads_; + + DISALLOW_COPY_AND_ASSIGN(TestDownloadService); +}; +} // namespace download + +namespace offline_pages { + +class PrefetchDownloaderTest : public testing::Test { + public: + PrefetchDownloaderTest() + : task_runner_(new base::TestSimpleTaskRunner), + task_runner_handle_(task_runner_) {} + + void SetUp() override { + auto downloader = + base::MakeUnique<PrefetchDownloader>(&download_service_, kTestChannel); + download_service_.set_prefetch_downloader(downloader.get()); + prefetch_service_taco_.SetPrefetchDownloader(std::move(downloader)); + + prefetch_service_taco_.CreatePrefetchService(); + GetPrefetchDownloader()->SetCompletedCallback(base::Bind( + &PrefetchDownloaderTest::OnDownloadCompleted, base::Unretained(this))); + } + + void SetDownloadServiceReady(bool ready) { + download_service_.set_ready(ready); + if (ready) + GetPrefetchDownloader()->OnDownloadServiceReady(); + else + GetPrefetchDownloader()->OnDownloadServiceShutdown(); + } + + void StartDownload(const std::string& download_id, + const std::string& download_location) { + GetPrefetchDownloader()->StartDownload(download_id, download_location); + } + + void CancelDownload(const std::string& download_id) { + GetPrefetchDownloader()->CancelDownload(download_id); + } + + download::DownloadParams GetDownload(const std::string& guid) const { + return download_service_.GetDownload(guid); + } + + void PumpLoop() { task_runner_->RunUntilIdle(); } + + const std::vector<PrefetchDownloadResult>& completed_downloads() const { + return completed_downloads_; + } + + private: + void OnDownloadCompleted(const PrefetchDownloadResult& result) { + completed_downloads_.push_back(result); + } + + PrefetchDownloader* GetPrefetchDownloader() const { + return prefetch_service_taco_.prefetch_service()->GetPrefetchDownloader(); + } + + scoped_refptr<base::TestSimpleTaskRunner> task_runner_; + base::ThreadTaskRunnerHandle task_runner_handle_; + download::TestDownloadService download_service_; + PrefetchServiceTestTaco prefetch_service_taco_; + std::vector<PrefetchDownloadResult> completed_downloads_; +}; + +TEST_F(PrefetchDownloaderTest, DownloadParams) { + SetDownloadServiceReady(true); + StartDownload(kDownloadId, kDownloadLocation); + download::DownloadParams params = GetDownload(kDownloadId); + EXPECT_EQ(kDownloadId, params.guid); + EXPECT_EQ(download::DownloadClient::OFFLINE_PAGE_PREFETCH, params.client); + GURL download_url = params.request_params.url; + EXPECT_TRUE(download_url.SchemeIs(url::kHttpsScheme)); + EXPECT_EQ(kServerPathForDownload, download_url.path()); + std::string key_value; + EXPECT_TRUE(net::GetValueForKeyInQuery(download_url, "key", &key_value)); + EXPECT_FALSE(key_value.empty()); + std::string alt_value; + EXPECT_TRUE(net::GetValueForKeyInQuery(download_url, "alt", &alt_value)); + EXPECT_EQ("media", alt_value); +} + +TEST_F(PrefetchDownloaderTest, StartDownloadBeforeServiceReady) { + SetDownloadServiceReady(false); + StartDownload(kDownloadId, kDownloadLocation); + StartDownload(kDownloadId2, kDownloadLocation2); + PumpLoop(); + ASSERT_EQ(0u, completed_downloads().size()); + SetDownloadServiceReady(true); + PumpLoop(); + ASSERT_EQ(2u, completed_downloads().size()); + EXPECT_EQ(kDownloadId, completed_downloads()[0].download_id); + EXPECT_TRUE(completed_downloads()[0].success); + EXPECT_EQ(kDownloadId2, completed_downloads()[1].download_id); + EXPECT_TRUE(completed_downloads()[1].success); +} + +TEST_F(PrefetchDownloaderTest, StartDownloadAfterServiceReady) { + SetDownloadServiceReady(true); + StartDownload(kDownloadId, kDownloadLocation); + StartDownload(kDownloadId2, kDownloadLocation2); + PumpLoop(); + ASSERT_EQ(2u, completed_downloads().size()); + EXPECT_EQ(kDownloadId, completed_downloads()[0].download_id); + EXPECT_TRUE(completed_downloads()[0].success); + EXPECT_EQ(kDownloadId2, completed_downloads()[1].download_id); + EXPECT_TRUE(completed_downloads()[1].success); +} + +TEST_F(PrefetchDownloaderTest, DownloadFailed) { + SetDownloadServiceReady(true); + StartDownload(kFailedDownloadId, kDownloadLocation); + PumpLoop(); + ASSERT_EQ(1u, completed_downloads().size()); + EXPECT_EQ(kFailedDownloadId, completed_downloads()[0].download_id); + EXPECT_FALSE(completed_downloads()[0].success); +} + +TEST_F(PrefetchDownloaderTest, CancelPendingDownloadBeforeServiceReady) { + SetDownloadServiceReady(false); + StartDownload(kDownloadId, kDownloadLocation); + StartDownload(kDownloadId2, kDownloadLocation2); + PumpLoop(); + ASSERT_EQ(0u, completed_downloads().size()); + CancelDownload(kDownloadId); + SetDownloadServiceReady(true); + PumpLoop(); + ASSERT_EQ(1u, completed_downloads().size()); + EXPECT_EQ(kDownloadId2, completed_downloads()[0].download_id); + EXPECT_TRUE(completed_downloads()[0].success); +} + +TEST_F(PrefetchDownloaderTest, CancelStartedDownloadBeforeServiceReady) { + SetDownloadServiceReady(true); + StartDownload(kDownloadId, kDownloadLocation); + SetDownloadServiceReady(false); + CancelDownload(kDownloadId); + SetDownloadServiceReady(true); + PumpLoop(); + ASSERT_EQ(0u, completed_downloads().size()); +} + +TEST_F(PrefetchDownloaderTest, CancelDownloadAfterServiceReady) { + SetDownloadServiceReady(true); + StartDownload(kDownloadId, kDownloadLocation); + StartDownload(kDownloadId2, kDownloadLocation2); + CancelDownload(kDownloadId); + PumpLoop(); + ASSERT_EQ(1u, completed_downloads().size()); + EXPECT_EQ(kDownloadId2, completed_downloads()[0].download_id); + EXPECT_TRUE(completed_downloads()[0].success); +} + +} // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/prefetch_request_fetcher.cc b/components/offline_pages/core/prefetch/prefetch_request_fetcher.cc index cda960a3..d533ab1 100644 --- a/components/offline_pages/core/prefetch/prefetch_request_fetcher.cc +++ b/components/offline_pages/core/prefetch/prefetch_request_fetcher.cc
@@ -6,6 +6,7 @@ #include "base/logging.h" #include "base/memory/ptr_util.h" +#include "components/offline_pages/core/prefetch/prefetch_server_urls.h" #include "google_apis/google_api_keys.h" #include "net/base/load_flags.h" #include "net/base/url_util.h" @@ -21,57 +22,34 @@ namespace { -const char kPrefetchServer[] = "https://offlinepages-pa.googleapis.com/"; -const char kPrefetchStagingServer[] = - "https://staging-offlinepages-pa.sandbox.googleapis.com/"; - -// Used in all offline prefetch request URLs to specify API Key. -const char kApiKeyName[] = "key"; - // Content type needed in order to communicate with the server in binary // proto format. const char kRequestContentType[] = "application/x-protobuf"; -GURL CompleteURL(const std::string& url_path, version_info::Channel channel) { - bool is_stable_channel = channel == version_info::Channel::STABLE; - GURL server_url(is_stable_channel ? kPrefetchServer : kPrefetchStagingServer); - - GURL::Replacements replacements; - replacements.SetPathStr(url_path); - GURL url = server_url.ReplaceComponents(replacements); - - std::string api_key = is_stable_channel ? google_apis::GetAPIKey() - : google_apis::GetNonStableAPIKey(); - return net::AppendQueryParameter(url, kApiKeyName, api_key); -} - } // namespace // static std::unique_ptr<PrefetchRequestFetcher> PrefetchRequestFetcher::CreateForGet( - const std::string& url_path, - version_info::Channel channel, + const GURL& url, net::URLRequestContextGetter* request_context_getter, const FinishedCallback& callback) { return base::WrapUnique(new PrefetchRequestFetcher( - url_path, std::string(), channel, request_context_getter, callback)); + url, std::string(), request_context_getter, callback)); } // static std::unique_ptr<PrefetchRequestFetcher> PrefetchRequestFetcher::CreateForPost( - const std::string& url_path, + const GURL& url, const std::string& message, - version_info::Channel channel, net::URLRequestContextGetter* request_context_getter, const FinishedCallback& callback) { return base::WrapUnique(new PrefetchRequestFetcher( - url_path, message, channel, request_context_getter, callback)); + url, message, request_context_getter, callback)); } PrefetchRequestFetcher::PrefetchRequestFetcher( - const std::string& url_path, + const GURL& url, const std::string& message, - version_info::Channel channel, net::URLRequestContextGetter* request_context_getter, const FinishedCallback& callback) : request_context_getter_(request_context_getter), callback_(callback) { @@ -97,8 +75,7 @@ "Not implemented, considered not useful." })"); url_fetcher_ = net::URLFetcher::Create( - CompleteURL(url_path, channel), - message.empty() ? net::URLFetcher::GET : net::URLFetcher::POST, this, + url, message.empty() ? net::URLFetcher::GET : net::URLFetcher::POST, this, traffic_annotation); url_fetcher_->SetRequestContext(request_context_getter_.get()); url_fetcher_->SetAutomaticallyRetryOn5xx(false);
diff --git a/components/offline_pages/core/prefetch/prefetch_request_fetcher.h b/components/offline_pages/core/prefetch/prefetch_request_fetcher.h index ea3d7c1..4ac8640 100644 --- a/components/offline_pages/core/prefetch/prefetch_request_fetcher.h +++ b/components/offline_pages/core/prefetch/prefetch_request_fetcher.h
@@ -9,8 +9,8 @@ #include "base/macros.h" #include "base/memory/ref_counted.h" #include "components/offline_pages/core/prefetch/prefetch_types.h" -#include "components/version_info/channel.h" #include "net/url_request/url_fetcher_delegate.h" +#include "url/gurl.h" namespace net { class URLRequestContextGetter; @@ -26,16 +26,14 @@ // Creates a fetcher that will sends a GET request to the server. static std::unique_ptr<PrefetchRequestFetcher> CreateForGet( - const std::string& url_path, - version_info::Channel channel, + const GURL& url, net::URLRequestContextGetter* request_context_getter, const FinishedCallback& callback); // Creates a fetcher that will sends a POST request to the server. static std::unique_ptr<PrefetchRequestFetcher> CreateForPost( - const std::string& url_path, + const GURL& url, const std::string& message, - version_info::Channel channel, net::URLRequestContextGetter* request_context_getter, const FinishedCallback& callback); @@ -47,9 +45,8 @@ private: // If |message| is empty, the GET request is sent. Otherwise, the POST request // is sent with |message| as post data. - PrefetchRequestFetcher(const std::string& url_path, + PrefetchRequestFetcher(const GURL& url, const std::string& message, - version_info::Channel channel, net::URLRequestContextGetter* request_context_getter, const FinishedCallback& callback);
diff --git a/components/offline_pages/core/prefetch/prefetch_request_fetcher_unittest.cc b/components/offline_pages/core/prefetch/prefetch_request_fetcher_unittest.cc index 8464c3c..39b5d218 100644 --- a/components/offline_pages/core/prefetch/prefetch_request_fetcher_unittest.cc +++ b/components/offline_pages/core/prefetch/prefetch_request_fetcher_unittest.cc
@@ -20,8 +20,7 @@ namespace offline_pages { namespace { -const version_info::Channel kTestChannel = version_info::Channel::UNKNOWN; -const char kTestURLPath[] = "/test"; +const GURL kTestURL("http://exmaple.org"); const char kTestMessage[] = "Testing"; } // namespace @@ -73,9 +72,8 @@ std::string* data_received) { base::MockCallback<PrefetchRequestFetcher::FinishedCallback> callback; std::unique_ptr<PrefetchRequestFetcher> fetcher = - PrefetchRequestFetcher::CreateForPost(kTestURLPath, kTestMessage, - kTestChannel, request_context(), - callback.Get()); + PrefetchRequestFetcher::CreateForPost(kTestURL, kTestMessage, + request_context(), callback.Get()); PrefetchRequestStatus status; std::string data;
diff --git a/components/offline_pages/core/prefetch/prefetch_server_urls.cc b/components/offline_pages/core/prefetch/prefetch_server_urls.cc new file mode 100644 index 0000000..84135e6ba --- /dev/null +++ b/components/offline_pages/core/prefetch/prefetch_server_urls.cc
@@ -0,0 +1,71 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "components/offline_pages/core/prefetch/prefetch_server_urls.h" + +#include "google_apis/google_api_keys.h" +#include "net/base/url_util.h" + +namespace offline_pages { + +namespace { + +const char kPrefetchServer[] = "https://offlinepages-pa.googleapis.com/"; +const char kPrefetchStagingServer[] = + "https://staging-offlinepages-pa.sandbox.googleapis.com/"; + +const char kGeneratePageBundleRequestURLPath[] = "v1:GeneratePageBundle"; +const char kGetOperationLeadingURLPath[] = "v1/"; +const char kDownloadLeadingURLPath[] = "v1/media/"; + +// Used in all offline prefetch request URLs to specify API Key. +const char kApiKeyName[] = "key"; +// Needed to download as a file. +const char kAltKeyName[] = "alt"; +const char kAltKeyValueForDownload[] = "media"; + +GURL GetServerURLForPath(const std::string& url_path, + version_info::Channel channel) { + bool is_stable_channel = channel == version_info::Channel::STABLE; + GURL server_url(is_stable_channel ? kPrefetchServer : kPrefetchStagingServer); + + GURL::Replacements replacements; + replacements.SetPathStr(url_path); + return server_url.ReplaceComponents(replacements); +} + +GURL AppendApiKeyToURL(const GURL& url, version_info::Channel channel) { + bool is_stable_channel = channel == version_info::Channel::STABLE; + std::string api_key = is_stable_channel ? google_apis::GetAPIKey() + : google_apis::GetNonStableAPIKey(); + return net::AppendQueryParameter(url, kApiKeyName, api_key); +} + +} // namespace + +GURL GeneratePageBundleRequestURL(version_info::Channel channel) { + GURL server_url = + GetServerURLForPath(kGeneratePageBundleRequestURLPath, channel); + return AppendApiKeyToURL(server_url, channel); +} + +GURL GetOperationRequestURL(const std::string& name, + version_info::Channel channel) { + std::string url_path = kGetOperationLeadingURLPath + name; + GURL server_url = GetServerURLForPath(url_path, channel); + return AppendApiKeyToURL(server_url, channel); +} + +GURL PrefetchDownloadURL(const std::string& download_location, + version_info::Channel channel) { + std::string url_path = kDownloadLeadingURLPath + download_location; + GURL server_url = GetServerURLForPath(url_path, channel); + + server_url = net::AppendQueryParameter(server_url, kAltKeyName, + kAltKeyValueForDownload); + + return AppendApiKeyToURL(server_url, channel); +} + +} // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/prefetch_server_urls.h b/components/offline_pages/core/prefetch/prefetch_server_urls.h new file mode 100644 index 0000000..626b4684 --- /dev/null +++ b/components/offline_pages/core/prefetch/prefetch_server_urls.h
@@ -0,0 +1,27 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_SERVER_URLS_H_ +#define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_SERVER_URLS_H_ + +#include <string> +#include "components/version_info/channel.h" +#include "url/gurl.h" + +namespace offline_pages { + +// Returns the URL to send a request to generate page bundle. +GURL GeneratePageBundleRequestURL(version_info::Channel channel); + +// Returns the URL to send a request to get operation info. +GURL GetOperationRequestURL(const std::string& name, + version_info::Channel channel); + +// Returns the URL to download an archive. +GURL PrefetchDownloadURL(const std::string& download_location, + version_info::Channel channel); + +} // namespace offline_pages + +#endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_SERVER_URLS_H_
diff --git a/components/offline_pages/core/prefetch/prefetch_service.h b/components/offline_pages/core/prefetch/prefetch_service.h index a168a1d..10e7105 100644 --- a/components/offline_pages/core/prefetch/prefetch_service.h +++ b/components/offline_pages/core/prefetch/prefetch_service.h
@@ -11,6 +11,7 @@ class OfflineEventLogger; class OfflineMetricsCollector; class PrefetchDispatcher; +class PrefetchDownloader; class PrefetchGCMHandler; class PrefetchNetworkRequestFactory; class SuggestedArticlesObserver; @@ -31,6 +32,7 @@ virtual PrefetchDispatcher* GetPrefetchDispatcher() = 0; virtual PrefetchGCMHandler* GetPrefetchGCMHandler() = 0; virtual PrefetchNetworkRequestFactory* GetPrefetchNetworkRequestFactory() = 0; + virtual PrefetchDownloader* GetPrefetchDownloader() = 0; // May be |nullptr| in tests. The PrefetchService does not depend on the // SuggestedArticlesObserver, it merely owns it for lifetime purposes.
diff --git a/components/offline_pages/core/prefetch/prefetch_service_impl.cc b/components/offline_pages/core/prefetch/prefetch_service_impl.cc index 2c07a03..478d4109 100644 --- a/components/offline_pages/core/prefetch/prefetch_service_impl.cc +++ b/components/offline_pages/core/prefetch/prefetch_service_impl.cc
@@ -10,6 +10,7 @@ #include "base/memory/ptr_util.h" #include "components/offline_pages/core/prefetch/offline_metrics_collector.h" #include "components/offline_pages/core/prefetch/prefetch_dispatcher.h" +#include "components/offline_pages/core/prefetch/prefetch_downloader.h" #include "components/offline_pages/core/prefetch/prefetch_gcm_handler.h" #include "components/offline_pages/core/prefetch/prefetch_network_request_factory.h" #include "components/offline_pages/core/prefetch/suggested_articles_observer.h" @@ -21,15 +22,19 @@ std::unique_ptr<PrefetchDispatcher> dispatcher, std::unique_ptr<PrefetchGCMHandler> gcm_handler, std::unique_ptr<PrefetchNetworkRequestFactory> network_request_factory, - std::unique_ptr<SuggestedArticlesObserver> suggested_articles_observer) + std::unique_ptr<SuggestedArticlesObserver> suggested_articles_observer, + std::unique_ptr<PrefetchDownloader> prefetch_downloader) : offline_metrics_collector_(std::move(offline_metrics_collector)), prefetch_dispatcher_(std::move(dispatcher)), prefetch_gcm_handler_(std::move(gcm_handler)), network_request_factory_(std::move(network_request_factory)), - suggested_articles_observer_(std::move(suggested_articles_observer)) { + suggested_articles_observer_(std::move(suggested_articles_observer)), + prefetch_downloader_(std::move(prefetch_downloader)) { prefetch_dispatcher_->SetService(this); prefetch_gcm_handler_->SetService(this); suggested_articles_observer_->SetPrefetchService(this); + prefetch_downloader_->SetCompletedCallback(base::Bind( + &PrefetchServiceImpl::OnDownloadCompleted, base::Unretained(this))); } PrefetchServiceImpl::~PrefetchServiceImpl() = default; @@ -59,8 +64,23 @@ return &logger_; } +PrefetchDownloader* PrefetchServiceImpl::GetPrefetchDownloader() { + return prefetch_downloader_.get(); +} + void PrefetchServiceImpl::Shutdown() { suggested_articles_observer_.reset(); + prefetch_downloader_.reset(); +} + +void PrefetchServiceImpl::OnDownloadCompleted( + const PrefetchDownloadResult& result) { + logger_.RecordActivity("Download " + result.download_id + + (result.success ? " succeeded" : " failed")); + if (result.success) { + logger_.RecordActivity("Downloaded as " + result.file_path.MaybeAsASCII() + + " with size " + std::to_string(result.file_size)); + } } } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/prefetch_service_impl.h b/components/offline_pages/core/prefetch/prefetch_service_impl.h index ed1b629..98e5d61 100644 --- a/components/offline_pages/core/prefetch/prefetch_service_impl.h +++ b/components/offline_pages/core/prefetch/prefetch_service_impl.h
@@ -10,10 +10,12 @@ #include "base/macros.h" #include "components/offline_pages/core/offline_event_logger.h" #include "components/offline_pages/core/prefetch/prefetch_service.h" +#include "components/offline_pages/core/prefetch/prefetch_types.h" namespace offline_pages { class OfflineMetricsCollector; class PrefetchDispatcher; +class PrefetchDownloader; class PrefetchGCMHandler; class PrefetchNetworkRequestFactory; class SuggestedArticlesObserver; @@ -25,7 +27,8 @@ std::unique_ptr<PrefetchDispatcher> dispatcher, std::unique_ptr<PrefetchGCMHandler> gcm_handler, std::unique_ptr<PrefetchNetworkRequestFactory> network_request_factory, - std::unique_ptr<SuggestedArticlesObserver> suggested_articles_observer); + std::unique_ptr<SuggestedArticlesObserver> suggested_articles_observer, + std::unique_ptr<PrefetchDownloader> prefetch_downloader); ~PrefetchServiceImpl() override; // PrefetchService implementation: @@ -35,11 +38,15 @@ PrefetchNetworkRequestFactory* GetPrefetchNetworkRequestFactory() override; SuggestedArticlesObserver* GetSuggestedArticlesObserver() override; OfflineEventLogger* GetLogger() override; + PrefetchDownloader* GetPrefetchDownloader() override; // KeyedService implementation: void Shutdown() override; private: + // Called when a download completes. + void OnDownloadCompleted(const PrefetchDownloadResult& result); + OfflineEventLogger logger_; std::unique_ptr<OfflineMetricsCollector> offline_metrics_collector_; @@ -47,6 +54,7 @@ std::unique_ptr<PrefetchGCMHandler> prefetch_gcm_handler_; std::unique_ptr<PrefetchNetworkRequestFactory> network_request_factory_; std::unique_ptr<SuggestedArticlesObserver> suggested_articles_observer_; + std::unique_ptr<PrefetchDownloader> prefetch_downloader_; DISALLOW_COPY_AND_ASSIGN(PrefetchServiceImpl); };
diff --git a/components/offline_pages/core/prefetch/prefetch_service_test_taco.cc b/components/offline_pages/core/prefetch/prefetch_service_test_taco.cc index f16cd86..d18c8b9 100644 --- a/components/offline_pages/core/prefetch/prefetch_service_test_taco.cc +++ b/components/offline_pages/core/prefetch/prefetch_service_test_taco.cc
@@ -10,6 +10,7 @@ #include "base/test/test_simple_task_runner.h" #include "components/offline_pages/core/prefetch/offline_metrics_collector.h" #include "components/offline_pages/core/prefetch/prefetch_dispatcher.h" +#include "components/offline_pages/core/prefetch/prefetch_downloader.h" #include "components/offline_pages/core/prefetch/prefetch_gcm_handler.h" #include "components/offline_pages/core/prefetch/prefetch_service_impl.h" #include "components/offline_pages/core/prefetch/suggested_articles_observer.h" @@ -20,6 +21,10 @@ namespace offline_pages { +namespace { +const version_info::Channel kTestChannel = version_info::Channel::UNKNOWN; +} // namespace + PrefetchServiceTestTaco::PrefetchServiceTestTaco() { metrics_collector_ = base::MakeUnique<TestOfflineMetricsCollector>(); dispatcher_ = base::MakeUnique<TestPrefetchDispatcher>(); @@ -28,6 +33,7 @@ base::MakeUnique<TestPrefetchNetworkRequestFactory>(); suggested_articles_observer_ = base::MakeUnique<SuggestedArticlesObserver>(); + prefetch_downloader_ = base::WrapUnique(new PrefetchDownloader(kTestChannel)); // This sets up the testing articles as an empty vector, we can ignore the // result here. This allows us to not create a ContentSuggestionsService. suggested_articles_observer_->GetTestingArticles(); @@ -65,13 +71,20 @@ suggested_articles_observer_ = std::move(suggested_articles_observer); } +void PrefetchServiceTestTaco::SetPrefetchDownloader( + std::unique_ptr<PrefetchDownloader> prefetch_downloader) { + CHECK(!prefetch_service_); + prefetch_downloader_ = std::move(prefetch_downloader); +} + void PrefetchServiceTestTaco::CreatePrefetchService() { CHECK(metrics_collector_ && dispatcher_ && gcm_handler_ && - suggested_articles_observer_ && network_request_factory_); + suggested_articles_observer_ && network_request_factory_ && + prefetch_downloader_); prefetch_service_ = base::MakeUnique<PrefetchServiceImpl>( std::move(metrics_collector_), std::move(dispatcher_), std::move(gcm_handler_), std::move(network_request_factory_), - std::move(suggested_articles_observer_)); + std::move(suggested_articles_observer_), std::move(prefetch_downloader_)); } std::unique_ptr<PrefetchService>
diff --git a/components/offline_pages/core/prefetch/prefetch_service_test_taco.h b/components/offline_pages/core/prefetch/prefetch_service_test_taco.h index 4b7668e3..aa56544 100644 --- a/components/offline_pages/core/prefetch/prefetch_service_test_taco.h +++ b/components/offline_pages/core/prefetch/prefetch_service_test_taco.h
@@ -14,6 +14,7 @@ namespace offline_pages { class OfflineMetricsCollector; class PrefetchDispatcher; +class PrefetchDownloader; class PrefetchGCMHandler; class PrefetchService; class PrefetchNetworkRequestFactory; @@ -46,6 +47,8 @@ // by default, so no ContentSuggestionsService is required.. void SetSuggestedArticlesObserver( std::unique_ptr<SuggestedArticlesObserver> suggested_articles_observer); + void SetPrefetchDownloader( + std::unique_ptr<PrefetchDownloader> prefetch_downloader); // Creates and caches an instance of PrefetchService, using default or // overridden test dependencies. @@ -53,7 +56,7 @@ // Once CreatePrefetchService() is called, this accessor method starts // returning the PrefetchService. - PrefetchService* prefetch_service() { + PrefetchService* prefetch_service() const { CHECK(prefetch_service_); return prefetch_service_.get(); } @@ -68,6 +71,7 @@ std::unique_ptr<PrefetchGCMHandler> gcm_handler_; std::unique_ptr<PrefetchNetworkRequestFactory> network_request_factory_; std::unique_ptr<SuggestedArticlesObserver> suggested_articles_observer_; + std::unique_ptr<PrefetchDownloader> prefetch_downloader_; std::unique_ptr<PrefetchService> prefetch_service_; };
diff --git a/components/offline_pages/core/prefetch/prefetch_types.cc b/components/offline_pages/core/prefetch/prefetch_types.cc index 8f06ddd..7f68f57 100644 --- a/components/offline_pages/core/prefetch/prefetch_types.cc +++ b/components/offline_pages/core/prefetch/prefetch_types.cc
@@ -6,8 +6,21 @@ namespace offline_pages { -RenderPageInfo::RenderPageInfo() {} +RenderPageInfo::RenderPageInfo() = default; RenderPageInfo::RenderPageInfo(const RenderPageInfo& other) = default; +PrefetchDownloadResult::PrefetchDownloadResult() = default; + +PrefetchDownloadResult::PrefetchDownloadResult(const std::string& download_id, + const base::FilePath& file_path, + uint64_t file_size) + : download_id(download_id), + success(true), + file_path(file_path), + file_size(file_size) {} + +PrefetchDownloadResult::PrefetchDownloadResult( + const PrefetchDownloadResult& other) = default; + } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/prefetch_types.h b/components/offline_pages/core/prefetch/prefetch_types.h index 20d9abea..1fdb49a 100644 --- a/components/offline_pages/core/prefetch/prefetch_types.h +++ b/components/offline_pages/core/prefetch/prefetch_types.h
@@ -8,6 +8,7 @@ #include <string> #include <vector> +#include "base/files/file_path.h" #include "base/time/time.h" #include "components/offline_pages/core/client_id.h" #include "url/gurl.h" @@ -123,6 +124,24 @@ GURL url; }; +// Result of a completed download. +struct PrefetchDownloadResult { + PrefetchDownloadResult(); + PrefetchDownloadResult(const std::string& download_id, + const base::FilePath& file_path, + uint64_t file_size); + PrefetchDownloadResult(const PrefetchDownloadResult& other); + + std::string download_id; + bool success = false; + base::FilePath file_path; + uint64_t file_size = 0u; +}; + +// Callback invoked upon completion of a download. +using PrefetchDownloadCompletedCallback = + base::Callback<void(const PrefetchDownloadResult& result)>; + } // namespace offline_pages #endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_TYPES_H_
diff --git a/components/safe_browsing/base_blocking_page.cc b/components/safe_browsing/base_blocking_page.cc index 674fd63..31d08bd 100644 --- a/components/safe_browsing/base_blocking_page.cc +++ b/components/safe_browsing/base_blocking_page.cc
@@ -79,6 +79,7 @@ false, // is_extended_reporting false, // is_scout false, // kSafeBrowsingProceedAnywayDisabled + false, // should_open_links_in_new_tab "cpn_safe_browsing"); // help_center_article_link }
diff --git a/components/safe_browsing/triggers/trigger_manager.cc b/components/safe_browsing/triggers/trigger_manager.cc index 157c205..a8bccd7 100644 --- a/components/safe_browsing/triggers/trigger_manager.cc +++ b/components/safe_browsing/triggers/trigger_manager.cc
@@ -51,6 +51,7 @@ IsExtendedReportingEnabled(pref_service), /*is_scout_reporting_enabled=*/false, /*is_proceed_anyway_disabled=*/false, + /*should_open_links_in_new_tab=*/false, /*help_center_article_link=*/std::string()); }
diff --git a/components/security_interstitials/core/base_safe_browsing_error_ui.cc b/components/security_interstitials/core/base_safe_browsing_error_ui.cc index ad7c340..7a7ca52 100644 --- a/components/security_interstitials/core/base_safe_browsing_error_ui.cc +++ b/components/security_interstitials/core/base_safe_browsing_error_ui.cc
@@ -31,6 +31,7 @@ bool is_extended_reporting_enabled, bool is_scout_reporting_enabled, bool is_proceed_anyway_disabled, + bool should_open_links_in_new_tab, const std::string& help_center_article_link) : is_main_frame_load_blocked(is_main_frame_load_blocked), is_extended_reporting_opt_in_allowed( @@ -39,6 +40,7 @@ is_extended_reporting_enabled(is_extended_reporting_enabled), is_scout_reporting_enabled(is_scout_reporting_enabled), is_proceed_anyway_disabled(is_proceed_anyway_disabled), + should_open_links_in_new_tab(should_open_links_in_new_tab), help_center_article_link(help_center_article_link) {} BaseSafeBrowsingErrorUI::SBErrorDisplayOptions::SBErrorDisplayOptions( @@ -50,6 +52,7 @@ is_extended_reporting_enabled(other.is_extended_reporting_enabled), is_scout_reporting_enabled(other.is_scout_reporting_enabled), is_proceed_anyway_disabled(other.is_proceed_anyway_disabled), + should_open_links_in_new_tab(other.should_open_links_in_new_tab), help_center_article_link(other.help_center_article_link) {} } // security_interstitials
diff --git a/components/security_interstitials/core/base_safe_browsing_error_ui.h b/components/security_interstitials/core/base_safe_browsing_error_ui.h index d001b36417a..ccbf9f9 100644 --- a/components/security_interstitials/core/base_safe_browsing_error_ui.h +++ b/components/security_interstitials/core/base_safe_browsing_error_ui.h
@@ -32,6 +32,7 @@ bool is_extended_reporting_enabled, bool is_scout_reporting_enabled, bool is_proceed_anyway_disabled, + bool should_open_links_in_new_tab, const std::string& help_center_article_link); SBErrorDisplayOptions(const SBErrorDisplayOptions& other); @@ -54,6 +55,9 @@ // Indicates if kSafeBrowsingProceedAnywayDisabled preference is set. bool is_proceed_anyway_disabled; + // Indicates if links should use a new foreground tab or the current tab. + bool should_open_links_in_new_tab; + // The p= query parameter used when visiting the Help Center. If this is // nullptr, then a default value will be used for the SafeBrowsing article. std::string help_center_article_link; @@ -95,6 +99,10 @@ return display_options_.is_proceed_anyway_disabled; } + bool should_open_links_in_new_tab() const { + return display_options_.should_open_links_in_new_tab; + } + const std::string& get_help_center_article_link() const { return display_options_.help_center_article_link; }
diff --git a/components/security_interstitials/core/browser/resources/list_of_interstitials.html b/components/security_interstitials/core/browser/resources/list_of_interstitials.html index a759c82..9f53597 100644 --- a/components/security_interstitials/core/browser/resources/list_of_interstitials.html +++ b/components/security_interstitials/core/browser/resources/list_of_interstitials.html
@@ -40,6 +40,9 @@ <li> <a href="clock?clock_manipulation=-2">Clock is behind</a> </li> + <li> + <a href="ssl?type=hpkp_failure">Pinned certificate error</a> + </li> </ul> <h3>SafeBrowsing</h3> <h4>Loud</h4>
diff --git a/components/test/BUILD.gn b/components/test/BUILD.gn index 0a62f38..f6402ed 100644 --- a/components/test/BUILD.gn +++ b/components/test/BUILD.gn
@@ -36,3 +36,16 @@ public_deps += [ "//content/test:test_support" ] } } + +# Defines a main() function that uses components_test_suite.h +source_set("run_all_unittests") { + testonly = true + + sources = [ + "run_all_unittests.cc", + ] + + deps = [ + ":test_support", + ] +}
diff --git a/components/test/data/cast_certificate/certificates/generate_policies_tests.py b/components/test/data/cast_certificate/certificates/generate_policies_tests.py new file mode 100755 index 0000000..f2ae18f --- /dev/null +++ b/components/test/data/cast_certificate/certificates/generate_policies_tests.py
@@ -0,0 +1,124 @@ +#!/usr/bin/python +# Copyright (c) 2017 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +""" +This python script generates a number of test certificate chains for policies +(in particular the Audio Only policy). The resulting files have the name +format: + + policies_ica_%s_leaf_%s.pem + +Must be run from the current directory. +""" + +import sys +sys.path += ['../../../../../net/data/verify_certificate_chain_unittest'] + +import common + + +# OID for Cast's "Audio Only" policy. +AUDIO_ONLY = 'audioOnly' + +# Symbolic OID for anyPolicy (2.5.29.32.0). +ANY_POLICY = 'anyPolicy' + +# Random unknown OID (https://davidben.net/oid), used as unrecognized policy. +FOO = 'foo' + +POLICY_SYMBOL_TO_OID = {} +POLICY_SYMBOL_TO_OID[AUDIO_ONLY] = '1.3.6.1.4.1.11129.2.5.2' +POLICY_SYMBOL_TO_OID[ANY_POLICY] = '2.5.29.32.0' +POLICY_SYMBOL_TO_OID[FOO] = '1.2.840.113554.4.1.72585.2' + + +def set_policies_from_list(certificate, policies): + if len(policies) == 0: + certificate.get_extensions().remove_property('certificatePolicies') + return + + # OpenSSL expects a comma-separate list of OIDs. Translate occurrences of + # our symbolic values into dotted OIDs. + policies = [POLICY_SYMBOL_TO_OID.get(x, x) for x in policies] + certificate.get_extensions().set_property('certificatePolicies', + ','.join(policies)) + + +def policies_to_filename(policies): + if len(policies) == 0: + return 'none' + return ('_'.join(policies)).lower() + + +JAN_2015 = '150101120000Z' +JAN_2018 = '180101120000Z' + +def generate_policies_chain(intermediate_policies, leaf_policies): + """Creates a certificate chain and writes it to a PEM file (in the current + directory). + + The chain has 3 certificates (root, intermediate, leaf). The root has no + policies extension, whereas the intermediate has policies given by + |intermediate_policies| and the leaf has policies given by |leaf_policies|. + + The policies are specified as a list, with the empty list meaning no policies + extension. Values in the list should be one of the OID constants (AUDIO_ONLY, + ANY_POLICY). + + The name of the generated file is a human-readable serialization of this + function's parameters. + """ + + # Self-signed root certificate. + root = common.create_self_signed_root_certificate('Root') + root.set_validity_range(JAN_2015, JAN_2018) + + # Intermediate certificate. + intermediate = common.create_intermediate_certificate('Intermediate', root) + set_policies_from_list(intermediate, intermediate_policies) + intermediate.set_validity_range(JAN_2015, JAN_2018) + + # Leaf certificate. + leaf = common.create_end_entity_certificate('Leaf', intermediate) + set_policies_from_list(leaf, leaf_policies) + leaf.get_extensions().set_property('extendedKeyUsage', 'clientAuth') + leaf.set_validity_range(JAN_2015, JAN_2018) + + chain = [leaf, intermediate, root] + chain_description = """Cast certificate chain with the following policies: + + Root: policies={} + Intermediate: policies={%s} + Leaf: policies={%s}""" % (', '.join(intermediate_policies), + ', '.join(leaf_policies)) + + chain_file_name = 'policies_ica_%s_leaf_%s.pem' % ( + policies_to_filename(intermediate_policies), + policies_to_filename(leaf_policies)) + + common.write_chain(chain_description, chain, chain_file_name) + + +# ----------------------------------------------------- +# Generate a number of permutations for policies. +# ----------------------------------------------------- + +# audioOnly restricted ICA. +generate_policies_chain([AUDIO_ONLY], []) +generate_policies_chain([AUDIO_ONLY], [AUDIO_ONLY]) +generate_policies_chain([AUDIO_ONLY], [ANY_POLICY]) +generate_policies_chain([AUDIO_ONLY], [FOO]) + +# Unrestricted ICA (by ommission). +generate_policies_chain([], []) +generate_policies_chain([], [AUDIO_ONLY]) +generate_policies_chain([], [ANY_POLICY]) +generate_policies_chain([], [FOO]) + +# Unrestricted ICA (by anyPolicy). +generate_policies_chain([ANY_POLICY], []) +generate_policies_chain([ANY_POLICY], [AUDIO_ONLY]) +generate_policies_chain([ANY_POLICY], [ANY_POLICY]) +generate_policies_chain([ANY_POLICY], [FOO])
diff --git a/components/test/data/cast_certificate/certificates/policies_ica_anypolicy_leaf_anypolicy.pem b/components/test/data/cast_certificate/certificates/policies_ica_anypolicy_leaf_anypolicy.pem new file mode 100644 index 0000000..7f0628d --- /dev/null +++ b/components/test/data/cast_certificate/certificates/policies_ica_anypolicy_leaf_anypolicy.pem
@@ -0,0 +1,281 @@ +[Created by: generate_policies_tests.py] + +Cast certificate chain with the following policies: + + Root: policies={} + Intermediate: policies={anyPolicy} + Leaf: policies={anyPolicy} + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 11 (0xb) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Intermediate + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Leaf + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:bc:42:b8:af:d7:ce:53:49:1d:f9:fd:41:b0:ce: + 40:7a:c1:5d:79:db:a8:9d:6b:7b:f9:ef:8d:b8:f4: + 22:e3:80:f9:5c:67:e1:91:a0:66:c2:d7:07:0a:ef: + ed:86:ab:c0:9e:d0:b1:95:cf:83:9b:ce:7b:0c:75: + 05:8c:2f:44:e4:2f:ba:d8:17:04:ec:37:a2:6f:20: + 66:d9:09:a9:20:e2:43:d8:d4:77:26:82:ec:a7:ca: + 48:2b:19:73:73:fd:4b:d4:a6:38:e3:ea:6e:d7:02: + cd:18:e6:bd:c2:c6:9a:bf:ec:1f:ce:b0:e9:03:eb: + 03:65:cd:e2:46:ad:a3:c1:4d:23:b3:d1:b1:52:e2: + 5d:56:dc:bd:21:35:17:4b:65:e9:3b:e8:9a:f5:7b: + 30:74:3f:da:e7:5a:8b:4e:74:53:56:db:f2:15:f6: + 7d:bb:20:f0:fd:e5:bb:8b:a3:7d:10:f3:f2:d1:76: + d6:99:fc:0b:29:cb:bc:ec:dd:ed:85:54:01:a2:07: + 96:ce:7e:24:ee:1b:12:2e:e0:65:8f:3d:de:e2:75: + 64:a1:2f:1c:43:dd:d1:e9:6f:80:58:b0:11:d6:8a: + 76:48:b5:60:38:7e:c0:52:7a:4a:6d:7d:b4:c2:4b: + d8:d2:f8:27:8a:88:54:f2:05:a0:65:12:ff:26:27: + bc:bb + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 63:5A:64:7F:7A:5B:13:1C:41:A8:00:23:5D:9E:D5:4E:86:22:FC:56 + X509v3 Authority Key Identifier: + keyid:29:2B:35:96:F9:DF:46:CD:68:36:D9:20:F1:95:F7:40:FB:C6:58:33 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Intermediate.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Intermediate.crl + + X509v3 Key Usage: critical + Digital Signature, Key Encipherment + X509v3 Extended Key Usage: + TLS Web Client Authentication + X509v3 Certificate Policies: + Policy: X509v3 Any Policy + + Signature Algorithm: sha256WithRSAEncryption + 0c:f9:f7:0f:75:d6:67:f3:5b:a1:3a:3a:20:8b:d3:3a:f6:14: + f8:ac:89:22:2e:36:03:d3:7f:3f:bc:19:9f:2d:b7:c4:c9:99: + 3d:85:10:a7:ca:d6:d5:97:56:8d:56:f1:98:d8:43:29:b2:87: + 3c:6d:6f:52:00:8c:1d:3a:04:2b:f5:7b:75:40:7c:01:79:22: + 00:10:48:a4:27:b6:30:b9:29:2b:14:de:cc:bf:f4:1e:cc:8c: + 7f:6e:97:18:cf:03:f6:5d:ea:d1:47:2c:e8:78:73:31:e8:48: + c8:54:76:f6:b1:5b:a2:70:7e:8f:7f:12:2d:fa:2f:fd:d8:97: + 34:90:fb:d4:2a:d3:3c:65:cc:25:1b:b0:d9:b9:8e:2e:e2:9a: + 31:ce:4e:2f:df:7e:ee:0e:da:a0:3b:cd:12:8a:0d:6b:e0:10: + 81:25:8e:25:25:a0:91:7a:e2:a5:ee:aa:d1:8f:cf:03:ca:d5: + 45:1d:a2:14:67:7d:ac:cb:d9:1d:0a:af:e0:e9:b6:e9:53:27: + b7:63:bf:59:00:fb:8d:bc:17:00:fb:92:74:30:9c:f8:86:bf: + 2f:94:73:32:af:95:a7:12:96:bf:37:6a:d7:9d:87:1e:17:27: + 41:a7:6a:bc:9b:fa:ae:12:b3:ec:96:3c:5e:62:80:4f:3c:e7: + 9f:a4:0a:ed +-----BEGIN CERTIFICATE----- +MIIDlDCCAnygAwIBAgIBCzANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTgwMTAxMTIwMDAwWjAPMQ0wCwYD +VQQDDARMZWFmMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvEK4r9fO +U0kd+f1BsM5AesFdeduonWt7+e+NuPQi44D5XGfhkaBmwtcHCu/thqvAntCxlc+D +m857DHUFjC9E5C+62BcE7DeibyBm2QmpIOJD2NR3JoLsp8pIKxlzc/1L1KY44+pu +1wLNGOa9wsaav+wfzrDpA+sDZc3iRq2jwU0js9GxUuJdVty9ITUXS2XpO+ia9Xsw +dD/a51qLTnRTVtvyFfZ9uyDw/eW7i6N9EPPy0XbWmfwLKcu87N3thVQBogeWzn4k +7hsSLuBljz3e4nVkoS8cQ93R6W+AWLAR1op2SLVgOH7AUnpKbX20wkvY0vgniohU +8gWgZRL/Jie8uwIDAQABo4HyMIHvMB0GA1UdDgQWBBRjWmR/elsTHEGoACNdntVO +hiL8VjAfBgNVHSMEGDAWgBQpKzWW+d9GzWg22SDxlfdA+8ZYMzA/BggrBgEFBQcB +AQQzMDEwLwYIKwYBBQUHMAKGI2h0dHA6Ly91cmwtZm9yLWFpYS9JbnRlcm1lZGlh +dGUuY2VyMDQGA1UdHwQtMCswKaAnoCWGI2h0dHA6Ly91cmwtZm9yLWNybC9JbnRl +cm1lZGlhdGUuY3JsMA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcD +AjARBgNVHSAECjAIMAYGBFUdIAAwDQYJKoZIhvcNAQELBQADggEBAAz59w911mfz +W6E6OiCL0zr2FPisiSIuNgPTfz+8GZ8tt8TJmT2FEKfK1tWXVo1W8ZjYQymyhzxt +b1IAjB06BCv1e3VAfAF5IgAQSKQntjC5KSsU3sy/9B7MjH9ulxjPA/Zd6tFHLOh4 +czHoSMhUdvaxW6Jwfo9/Ei36L/3YlzSQ+9Qq0zxlzCUbsNm5ji7imjHOTi/ffu4O +2qA7zRKKDWvgEIEljiUloJF64qXuqtGPzwPK1UUdohRnfazL2R0Kr+DptulTJ7dj +v1kA+428FwD7knQwnPiGvy+UczKvlacSlr83atedhx4XJ0Gnaryb+q4Ss+yWPF5i +gE8855+kCu0= +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 22 (0x16) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Intermediate + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:cc:f0:0a:27:5e:f1:ca:c1:d3:fd:33:14:dc:25: + 7a:49:89:89:c5:67:fd:e4:56:aa:2b:1b:40:80:84: + b8:48:7e:ed:66:4c:23:82:99:5b:86:db:fc:82:35: + b3:56:01:bf:01:14:f6:46:5d:c7:96:5d:55:a7:a7: + e7:5c:8d:a7:c9:e9:a2:20:e4:ad:4c:8c:fe:2e:17: + 59:56:8d:ed:7c:97:68:5a:0d:dd:b1:41:b7:24:44: + bc:77:84:f1:af:fe:87:1c:83:c7:10:72:8a:44:62: + 99:a0:5c:78:f0:28:73:bf:2c:de:d1:8e:69:01:b6: + 5a:39:20:2c:d9:fe:11:5f:09:27:5d:ff:2a:98:9a: + a8:6b:6a:e4:40:27:0d:b7:a7:2d:85:fa:7d:7a:08: + d4:bb:9f:ff:27:e8:3a:d4:f5:15:a0:40:4f:c1:11: + 13:26:d7:1b:39:96:12:b7:19:aa:73:5c:4c:f7:ea: + d0:95:4d:14:a4:aa:73:63:58:8f:fe:e0:5a:83:31: + 7f:34:aa:02:e1:d9:6c:ed:84:7b:7f:ec:6b:7e:d9: + 3f:65:98:87:28:18:d5:aa:0f:d5:2f:ec:1a:86:19: + ed:3c:c6:a1:10:4a:fd:ac:60:6a:7a:ff:6a:66:c4: + 99:49:67:7c:3f:37:32:eb:80:48:e5:0b:6a:1d:3d: + 6a:47 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 29:2B:35:96:F9:DF:46:CD:68:36:D9:20:F1:95:F7:40:FB:C6:58:33 + X509v3 Authority Key Identifier: + keyid:FF:6B:55:E3:48:07:3A:7D:A5:37:EE:4C:93:43:81:21:0E:CD:5F:D0 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Certificate Policies: + Policy: X509v3 Any Policy + + Signature Algorithm: sha256WithRSAEncryption + 1a:0b:d3:2f:32:36:12:5e:be:00:85:07:03:11:d9:af:0e:54: + fe:c6:02:a0:f3:40:e3:4e:7d:52:b3:8b:24:75:c9:9e:de:0c: + a3:30:6e:8d:1f:e4:ea:cc:97:96:5e:b3:ad:78:34:99:05:d1: + 69:99:09:fd:e3:3a:0c:ab:df:d0:7b:61:9d:af:da:71:96:8d: + 6d:26:da:16:bd:54:f8:e9:12:7e:e6:1b:f6:d2:d3:69:a4:ba: + 1f:4f:5c:8c:66:d7:2f:42:79:51:98:6e:55:4c:da:2a:d2:7d: + 48:22:bc:33:65:d1:87:6b:df:f9:c7:7a:55:db:70:25:4f:14: + ef:15:07:aa:93:41:99:2c:f7:37:8f:e5:0f:73:41:05:18:d5: + f0:8a:e7:3e:4f:89:fa:a5:4d:86:16:12:63:6c:11:95:d0:a6: + 81:d2:63:68:51:0a:ae:8b:2c:17:24:32:3a:44:57:fc:a8:0f: + d3:5f:95:ca:24:6e:ee:03:85:54:95:3d:42:4a:b0:ed:7e:4e: + d5:2c:e7:e0:73:90:72:aa:6b:b6:2a:9a:65:6b:ce:c1:1d:1e: + 46:d0:a9:f5:7a:83:89:41:3c:e4:19:8b:b7:2a:93:23:d7:fb: + c5:a5:3f:4e:8d:7b:ec:d2:4f:b9:a9:4d:2b:f9:b5:7b:bb:a2: + 66:51:a2:56 +-----BEGIN CERTIFICATE----- +MIIDgDCCAmigAwIBAgIBFjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE4MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzPAKJ17x +ysHT/TMU3CV6SYmJxWf95FaqKxtAgIS4SH7tZkwjgplbhtv8gjWzVgG/ART2Rl3H +ll1Vp6fnXI2nyemiIOStTIz+LhdZVo3tfJdoWg3dsUG3JES8d4Txr/6HHIPHEHKK +RGKZoFx48Chzvyze0Y5pAbZaOSAs2f4RXwknXf8qmJqoa2rkQCcNt6cthfp9egjU +u5//J+g61PUVoEBPwRETJtcbOZYStxmqc1xM9+rQlU0UpKpzY1iP/uBagzF/NKoC +4dls7YR7f+xrftk/ZZiHKBjVqg/VL+wahhntPMahEEr9rGBqev9qZsSZSWd8Pzcy +64BI5QtqHT1qRwIDAQABo4HeMIHbMB0GA1UdDgQWBBQpKzWW+d9GzWg22SDxlfdA ++8ZYMzAfBgNVHSMEGDAWgBT/a1XjSAc6faU37kyTQ4EhDs1f0DA3BggrBgEFBQcB +AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs +BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD +VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wEQYDVR0gBAowCDAGBgRVHSAA +MA0GCSqGSIb3DQEBCwUAA4IBAQAaC9MvMjYSXr4AhQcDEdmvDlT+xgKg80DjTn1S +s4skdcme3gyjMG6NH+TqzJeWXrOteDSZBdFpmQn94zoMq9/Qe2Gdr9pxlo1tJtoW +vVT46RJ+5hv20tNppLofT1yMZtcvQnlRmG5VTNoq0n1IIrwzZdGHa9/5x3pV23Al +TxTvFQeqk0GZLPc3j+UPc0EFGNXwiuc+T4n6pU2GFhJjbBGV0KaB0mNoUQquiywX +JDI6RFf8qA/TX5XKJG7uA4VUlT1CSrDtfk7VLOfgc5Byqmu2Kppla87BHR5G0Kn1 +eoOJQTzkGYu3KpMj1/vFpT9OjXvs0k+5qU0r+bV7u6JmUaJW +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 21 (0x15) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:be:a1:75:40:5a:14:73:94:76:9e:7d:38:ff:ed: + a8:db:dc:94:ad:5e:90:c1:fa:4f:c6:8f:5c:0d:17: + fd:08:d4:34:2d:4a:1d:b7:a3:bc:88:ae:f0:fc:7a: + bb:ea:fe:c8:e6:4f:5b:64:bc:0c:f8:64:01:cc:ae: + 82:68:69:d5:b0:fb:a5:31:01:ba:5d:f9:6d:85:c2: + b1:c9:da:1c:84:01:24:dc:bb:de:52:54:f2:a2:a4: + 0e:25:d8:c1:07:7f:e9:80:1a:1f:f8:7e:6b:d0:1f: + c3:6d:1e:69:0e:eb:dc:07:ad:e4:92:d8:34:7d:11: + 19:27:ea:e1:ef:54:92:ae:2d:34:8e:80:06:84:2e: + 3e:b3:63:06:63:c2:db:88:7b:2a:f2:67:63:e3:d3: + 31:cb:4a:05:6f:c3:85:8c:00:4a:c1:1a:0b:cb:c4: + 90:fa:db:1d:97:b2:33:5a:86:b4:81:9b:48:f1:ca: + 59:88:cf:c7:05:fd:18:75:a9:c3:7f:20:7a:aa:25: + ec:a4:db:1f:ea:76:b2:f7:a5:2d:57:90:ab:e7:de: + fe:d1:d7:71:8e:2b:46:64:7c:e3:8c:ab:88:84:7d: + 64:3e:39:0f:8a:ab:99:7d:5a:63:08:1d:28:49:45: + 6e:99:4f:f6:b9:86:bb:d1:46:6c:97:ec:36:29:5a: + bc:15 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + FF:6B:55:E3:48:07:3A:7D:A5:37:EE:4C:93:43:81:21:0E:CD:5F:D0 + X509v3 Authority Key Identifier: + keyid:FF:6B:55:E3:48:07:3A:7D:A5:37:EE:4C:93:43:81:21:0E:CD:5F:D0 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 34:45:fc:7c:c8:38:e2:42:87:f6:de:f2:07:ad:9a:94:ce:af: + e7:09:2e:05:68:4f:25:01:1b:ae:0c:c9:55:21:42:55:02:42: + 02:83:af:cf:72:44:96:28:e9:43:e2:bc:53:38:67:f9:20:44: + 13:76:20:23:a5:3d:a1:8a:6d:bc:33:25:26:24:6f:ca:58:c6: + 26:ac:ad:cb:69:79:44:3d:01:fb:2f:6f:23:47:da:89:af:0b: + 22:1e:06:27:ea:08:b5:11:38:59:9d:87:19:b2:51:3c:22:ec: + c2:b1:e3:f4:6c:65:4a:ff:0d:a7:23:40:e7:d8:f3:3b:75:a1: + 36:bb:e0:aa:88:5d:14:cd:a5:6e:47:4b:09:e7:fb:12:d4:4e: + 31:e2:ff:58:ed:bd:06:2e:c2:27:8f:1e:bb:14:24:cf:23:9a: + 63:97:f7:c4:0b:98:98:2c:c4:58:a1:00:d1:32:74:7f:17:4f: + f5:bd:93:c2:4a:db:06:d3:91:16:4a:1b:72:c2:80:3a:e3:8b: + ca:8f:d7:49:1c:7b:76:6d:42:cb:97:af:fa:36:74:b1:5f:0a: + 0a:3a:c5:bd:6d:d7:2c:8a:d1:c8:cf:c2:b1:89:ed:0d:9a:6d: + a1:e8:d1:3b:1c:67:1b:26:10:3f:93:d2:1f:87:a4:69:1f:77: + 40:08:74:eb +-----BEGIN CERTIFICATE----- +MIIDZTCCAk2gAwIBAgIBFTANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE4MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL6hdUBaFHOUdp59OP/t +qNvclK1ekMH6T8aPXA0X/QjUNC1KHbejvIiu8Px6u+r+yOZPW2S8DPhkAcyugmhp +1bD7pTEBul35bYXCscnaHIQBJNy73lJU8qKkDiXYwQd/6YAaH/h+a9Afw20eaQ7r +3Aet5JLYNH0RGSfq4e9Ukq4tNI6ABoQuPrNjBmPC24h7KvJnY+PTMctKBW/DhYwA +SsEaC8vEkPrbHZeyM1qGtIGbSPHKWYjPxwX9GHWpw38geqol7KTbH+p2svelLVeQ +q+fe/tHXcY4rRmR844yriIR9ZD45D4qrmX1aYwgdKElFbplP9rmGu9FGbJfsNila +vBUCAwEAAaOByzCByDAdBgNVHQ4EFgQU/2tV40gHOn2lN+5Mk0OBIQ7NX9AwHwYD +VR0jBBgwFoAU/2tV40gHOn2lN+5Mk0OBIQ7NX9AwNwYIKwYBBQUHAQEEKzApMCcG +CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw +IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQA0Rfx8yDji +Qof23vIHrZqUzq/nCS4FaE8lARuuDMlVIUJVAkICg6/PckSWKOlD4rxTOGf5IEQT +diAjpT2him28MyUmJG/KWMYmrK3LaXlEPQH7L28jR9qJrwsiHgYn6gi1EThZnYcZ +slE8IuzCseP0bGVK/w2nI0Dn2PM7daE2u+CqiF0UzaVuR0sJ5/sS1E4x4v9Y7b0G +LsInjx67FCTPI5pjl/fEC5iYLMRYoQDRMnR/F0/1vZPCStsG05EWShtywoA644vK +j9dJHHt2bULLl6/6NnSxXwoKOsW9bdcsitHIz8Kxie0Nmm2h6NE7HGcbJhA/k9If +h6RpH3dACHTr +-----END CERTIFICATE-----
diff --git a/components/test/data/cast_certificate/certificates/policies_ica_anypolicy_leaf_audioonly.pem b/components/test/data/cast_certificate/certificates/policies_ica_anypolicy_leaf_audioonly.pem new file mode 100644 index 0000000..6f48ce9 --- /dev/null +++ b/components/test/data/cast_certificate/certificates/policies_ica_anypolicy_leaf_audioonly.pem
@@ -0,0 +1,281 @@ +[Created by: generate_policies_tests.py] + +Cast certificate chain with the following policies: + + Root: policies={} + Intermediate: policies={anyPolicy} + Leaf: policies={audioOnly} + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 10 (0xa) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Intermediate + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Leaf + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:aa:66:11:71:cd:d4:a2:2e:2a:41:e4:75:b8:33: + b5:d8:22:c5:0a:fd:e3:07:8b:fb:2a:41:10:f3:2d: + 50:96:99:8f:ef:b1:f0:44:cc:fb:b2:b8:79:03:7a: + 0e:2e:73:8d:78:19:bc:d1:de:35:0e:02:e9:bb:a3: + a1:5b:77:6c:5c:c3:76:5d:68:f9:16:70:52:8a:e4: + 7c:7d:f0:c8:5b:6d:1b:8e:5d:29:30:47:cd:30:7a: + 3f:4b:e4:95:aa:56:84:d6:25:4e:04:13:b5:6c:97: + 15:73:37:49:44:e6:00:1d:24:e3:b9:92:ba:5e:c5: + 58:83:7d:8b:82:e1:9d:10:45:4b:72:9a:9b:54:0e: + 1a:a5:a1:b5:5d:05:79:27:8d:25:f7:f6:b3:b3:d5: + f6:cc:30:d3:da:64:6a:fd:fd:77:78:8c:ff:90:c8: + 10:40:57:e0:1d:e1:77:2d:f2:74:06:d4:e7:a1:2e: + b2:47:c9:f6:12:78:1b:d0:54:8f:4b:7e:64:80:18: + 33:c3:f5:ab:d1:d6:18:e4:b7:71:35:64:17:91:99: + 42:fb:23:34:57:4f:8b:df:ee:ba:6a:98:5f:3f:d1: + 40:51:f9:54:a1:16:09:35:4a:00:81:80:9c:54:51: + 5e:6b:d5:fb:9f:8b:2f:80:55:d7:21:14:d9:05:f3: + a4:37 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 42:53:CC:AE:2D:B6:E4:12:B4:D0:66:2E:0E:94:4E:0D:85:E1:78:BA + X509v3 Authority Key Identifier: + keyid:0C:C6:27:71:90:39:99:18:30:64:4C:47:3A:12:85:F8:6A:06:DD:51 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Intermediate.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Intermediate.crl + + X509v3 Key Usage: critical + Digital Signature, Key Encipherment + X509v3 Extended Key Usage: + TLS Web Client Authentication + X509v3 Certificate Policies: + Policy: 1.3.6.1.4.1.11129.2.5.2 + + Signature Algorithm: sha256WithRSAEncryption + 34:6a:30:41:b6:eb:36:6f:ac:bd:f2:84:ef:da:2c:79:33:e6: + a9:de:a5:78:e7:68:29:cd:52:11:37:fe:87:1a:c6:a3:1a:8f: + 4a:3b:ca:2b:5c:c5:6d:a7:f5:72:41:17:9f:41:a3:3c:fd:5a: + 9c:fe:10:af:93:96:1e:ca:79:b2:97:c3:3f:89:c8:91:96:fe: + 2a:fa:5f:67:bd:56:0f:b6:e2:53:0f:d7:6b:89:16:30:46:59: + 97:b0:b9:f3:09:8f:7d:94:73:70:b4:1c:27:de:72:39:14:bb: + e1:9b:72:07:53:e5:99:0b:df:12:9d:aa:d0:74:03:31:09:4e: + d2:c6:59:c9:29:2a:cd:72:6a:9a:80:ff:15:76:68:ce:37:df: + b5:e8:77:6c:51:1b:77:c3:0a:37:79:a9:ab:12:28:cd:98:01: + b8:bd:23:64:1f:25:e3:52:cf:c4:7b:ce:16:be:11:5e:9c:30: + 81:ec:17:2d:a0:ab:74:a2:ff:a4:06:cf:1d:d9:ab:c0:d5:d9: + eb:6b:a7:01:1e:c6:0b:0d:05:0f:3d:de:b1:06:e5:7f:fc:66: + 17:26:ab:b7:fe:e7:5a:c4:ae:3a:17:09:e7:4d:45:d2:57:2a: + fd:f4:c9:6e:84:5a:d4:b4:df:7f:92:fe:67:76:60:81:96:36: + c8:8a:5a:47 +-----BEGIN CERTIFICATE----- +MIIDmjCCAoKgAwIBAgIBCjANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTgwMTAxMTIwMDAwWjAPMQ0wCwYD +VQQDDARMZWFmMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqmYRcc3U +oi4qQeR1uDO12CLFCv3jB4v7KkEQ8y1QlpmP77HwRMz7srh5A3oOLnONeBm80d41 +DgLpu6OhW3dsXMN2XWj5FnBSiuR8ffDIW20bjl0pMEfNMHo/S+SVqlaE1iVOBBO1 +bJcVczdJROYAHSTjuZK6XsVYg32LguGdEEVLcpqbVA4apaG1XQV5J40l9/azs9X2 +zDDT2mRq/f13eIz/kMgQQFfgHeF3LfJ0BtTnoS6yR8n2Engb0FSPS35kgBgzw/Wr +0dYY5LdxNWQXkZlC+yM0V0+L3+66aphfP9FAUflUoRYJNUoAgYCcVFFea9X7n4sv +gFXXIRTZBfOkNwIDAQABo4H4MIH1MB0GA1UdDgQWBBRCU8yuLbbkErTQZi4OlE4N +heF4ujAfBgNVHSMEGDAWgBQMxidxkDmZGDBkTEc6EoX4agbdUTA/BggrBgEFBQcB +AQQzMDEwLwYIKwYBBQUHMAKGI2h0dHA6Ly91cmwtZm9yLWFpYS9JbnRlcm1lZGlh +dGUuY2VyMDQGA1UdHwQtMCswKaAnoCWGI2h0dHA6Ly91cmwtZm9yLWNybC9JbnRl +cm1lZGlhdGUuY3JsMA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcD +AjAXBgNVHSAEEDAOMAwGCisGAQQB1nkCBQIwDQYJKoZIhvcNAQELBQADggEBADRq +MEG26zZvrL3yhO/aLHkz5qnepXjnaCnNUhE3/ocaxqMaj0o7yitcxW2n9XJBF59B +ozz9Wpz+EK+Tlh7KebKXwz+JyJGW/ir6X2e9Vg+24lMP12uJFjBGWZewufMJj32U +c3C0HCfecjkUu+GbcgdT5ZkL3xKdqtB0AzEJTtLGWckpKs1yapqA/xV2aM4337Xo +d2xRG3fDCjd5qasSKM2YAbi9I2QfJeNSz8R7zha+EV6cMIHsFy2gq3Si/6QGzx3Z +q8DV2etrpwEexgsNBQ893rEG5X/8Zhcmq7f+51rErjoXCedNRdJXKv30yW6EWtS0 +33+S/md2YIGWNsiKWkc= +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 20 (0x14) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Intermediate + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:b3:7f:10:e7:62:fd:d6:aa:1f:7c:3a:51:70:cd: + 3c:9e:99:f9:32:1e:7d:7e:8a:98:86:26:72:15:7a: + cf:28:f2:f6:84:ad:37:51:67:b9:b5:92:f3:5e:2f: + 92:40:a1:3d:8e:08:8a:f7:76:28:17:21:86:4c:14: + 0a:0d:47:98:49:82:e1:e3:2f:53:76:a2:4c:2a:c1: + e8:36:0f:33:26:c6:19:b8:13:9a:a5:3b:d3:4e:91: + b5:15:d3:44:96:36:68:4c:40:6b:7c:ab:c9:e7:9b: + fd:7b:3f:47:18:6e:29:39:4a:2d:ab:e2:9d:68:15: + 0e:3f:a4:09:e4:0a:6f:c0:29:5e:10:71:0f:0f:33: + 46:00:95:ce:69:9b:0c:a2:d6:59:89:9f:ea:e5:99: + 58:23:2c:9a:de:02:75:bc:ea:e6:e1:30:98:19:d8: + e1:96:58:0d:ac:88:09:40:37:0d:e4:0d:47:a0:40: + 69:66:da:26:f6:3c:0a:3a:ff:76:7c:88:27:4f:f3: + 1e:04:ba:5f:dc:08:15:a8:8b:1d:2a:8d:0d:31:be: + 1f:55:19:3e:5e:76:4c:8f:b8:6f:79:7e:6d:c6:da: + 7d:ac:10:b3:e9:d3:40:e1:0d:35:ed:c5:a9:e4:4e: + 41:15:e1:ee:e1:cf:05:f2:64:61:15:d5:ad:1f:14: + 0f:c3 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 0C:C6:27:71:90:39:99:18:30:64:4C:47:3A:12:85:F8:6A:06:DD:51 + X509v3 Authority Key Identifier: + keyid:88:AD:0A:25:DB:A4:38:B4:C2:61:7D:D3:DD:5E:ED:57:50:B5:11:1E + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Certificate Policies: + Policy: X509v3 Any Policy + + Signature Algorithm: sha256WithRSAEncryption + 9f:22:58:d3:d7:92:4a:a6:63:c2:cc:e8:d7:c3:45:d6:3a:10: + a1:50:38:e8:f7:c3:b7:f9:46:95:68:4e:e7:6b:52:24:3f:27: + db:3a:34:a6:10:91:92:86:75:a2:09:16:6e:0f:2f:01:1b:a4: + 01:23:0c:16:35:f2:a5:30:72:af:e3:0e:20:d6:ff:32:76:fc: + 86:d7:08:11:6a:21:77:e3:19:d6:30:d1:f7:70:29:94:09:ca: + a7:ed:ce:b2:7c:0a:d9:43:89:a2:3d:bc:6b:02:35:51:bf:0a: + 1e:7b:8d:8b:82:80:7f:43:70:8b:e3:58:bd:d9:01:6b:0a:12: + ac:a1:cc:92:e7:3b:55:95:dc:03:b2:63:b0:29:a3:86:7d:5f: + db:a5:98:89:c1:59:9a:40:40:bf:79:22:cd:3b:8b:38:a6:98: + 06:1f:1f:66:79:f9:b9:a4:51:bc:48:54:f9:d9:1e:cf:ec:1f: + 30:d9:6c:41:d5:15:fb:07:b4:a3:ca:56:52:dd:ff:75:07:02: + 8c:28:9c:2b:31:2a:04:59:18:1c:7d:2f:98:a0:2d:23:bc:36: + 55:88:00:04:cd:07:01:a8:71:ff:a1:52:ce:f4:25:a0:02:b8: + d6:f5:3a:37:a1:20:24:84:da:f4:94:60:96:ea:75:93:d4:91: + fe:e7:a7:d5 +-----BEGIN CERTIFICATE----- +MIIDgDCCAmigAwIBAgIBFDANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE4MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs38Q52L9 +1qoffDpRcM08npn5Mh59foqYhiZyFXrPKPL2hK03UWe5tZLzXi+SQKE9jgiK93Yo +FyGGTBQKDUeYSYLh4y9TdqJMKsHoNg8zJsYZuBOapTvTTpG1FdNEljZoTEBrfKvJ +55v9ez9HGG4pOUotq+KdaBUOP6QJ5ApvwCleEHEPDzNGAJXOaZsMotZZiZ/q5ZlY +Iyya3gJ1vOrm4TCYGdjhllgNrIgJQDcN5A1HoEBpZtom9jwKOv92fIgnT/MeBLpf +3AgVqIsdKo0NMb4fVRk+XnZMj7hveX5txtp9rBCz6dNA4Q017cWp5E5BFeHu4c8F +8mRhFdWtHxQPwwIDAQABo4HeMIHbMB0GA1UdDgQWBBQMxidxkDmZGDBkTEc6EoX4 +agbdUTAfBgNVHSMEGDAWgBSIrQol26Q4tMJhfdPdXu1XULURHjA3BggrBgEFBQcB +AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs +BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD +VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wEQYDVR0gBAowCDAGBgRVHSAA +MA0GCSqGSIb3DQEBCwUAA4IBAQCfIljT15JKpmPCzOjXw0XWOhChUDjo98O3+UaV +aE7na1IkPyfbOjSmEJGShnWiCRZuDy8BG6QBIwwWNfKlMHKv4w4g1v8ydvyG1wgR +aiF34xnWMNH3cCmUCcqn7c6yfArZQ4miPbxrAjVRvwoee42LgoB/Q3CL41i92QFr +ChKsocyS5ztVldwDsmOwKaOGfV/bpZiJwVmaQEC/eSLNO4s4ppgGHx9mefm5pFG8 +SFT52R7P7B8w2WxB1RX7B7SjylZS3f91BwKMKJwrMSoEWRgcfS+YoC0jvDZViAAE +zQcBqHH/oVLO9CWgArjW9To3oSAkhNr0lGCW6nWT1JH+56fV +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 19 (0x13) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:a4:63:1e:fa:9f:47:22:9a:2c:8f:27:ae:15:a2: + 15:21:73:02:44:7f:9b:62:7b:d6:47:1c:21:1c:66: + 01:95:c5:28:6a:b7:bf:3d:3a:03:7e:82:b1:ca:08: + 28:ef:c7:03:e6:2b:37:70:d0:54:11:09:0d:a3:3c: + c5:08:ec:f3:5b:1d:2f:ce:62:6b:17:fb:da:e9:39: + 4a:4b:a8:14:fa:ea:c3:f8:29:e4:35:e8:85:0a:31: + fb:ce:7c:ae:20:37:d2:c2:9e:e8:fa:0f:ad:59:d5: + 0c:f0:7f:f1:9c:56:23:f4:62:0d:54:16:7a:bf:83: + d1:07:c0:60:8e:7c:9a:72:44:75:87:cc:a2:31:bc: + 3e:81:80:e6:ae:8b:ae:2a:c7:d4:31:29:03:d8:71: + 12:f2:3b:cc:62:22:ff:03:42:2a:ca:4a:50:11:9e: + 64:cb:ce:26:87:fc:80:39:5c:53:97:93:c8:e2:9b: + ce:99:e6:c6:db:09:f7:be:84:b3:37:b1:ce:45:89: + 32:1b:5d:b1:70:10:b4:45:73:92:94:3b:46:9e:3f: + ab:80:30:6d:a3:f4:26:9d:be:9c:cd:da:fd:b9:80: + 87:95:97:e7:bd:de:07:2c:2e:6c:c4:c5:3f:0f:b2: + 58:7a:22:cf:72:96:e2:13:95:e9:06:50:b6:be:fa: + c4:e7 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 88:AD:0A:25:DB:A4:38:B4:C2:61:7D:D3:DD:5E:ED:57:50:B5:11:1E + X509v3 Authority Key Identifier: + keyid:88:AD:0A:25:DB:A4:38:B4:C2:61:7D:D3:DD:5E:ED:57:50:B5:11:1E + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 34:c3:8e:fb:f4:47:10:2f:d1:74:7f:71:97:24:80:94:aa:27: + a7:e1:be:1b:d3:f9:65:0e:97:49:c8:df:1f:e7:07:3c:56:ad: + 00:2a:52:b0:85:72:f2:9c:3b:3e:39:3d:80:76:b9:8e:44:da: + 66:4d:4a:7a:9d:be:a6:a6:d7:ff:42:f3:66:1b:14:2d:6d:37: + 68:5f:55:3e:85:fe:a6:e6:7f:0d:21:eb:6f:86:49:b8:0e:e2: + 3d:26:7c:39:34:ab:66:db:62:ab:42:55:b8:ba:60:b4:ae:bc: + 05:5b:1a:4f:82:de:ec:ae:a0:ca:1d:01:6e:b5:d5:9e:ef:6a: + 17:0e:d2:c6:50:2e:27:09:6e:c4:cf:45:50:94:92:0a:ea:7b: + d2:1b:db:ab:30:8f:1e:5c:14:8b:1f:f5:90:0f:38:00:82:df: + 28:99:5a:20:86:30:e6:6f:1b:16:92:ec:02:0b:41:be:b4:01: + fe:1c:ee:3a:14:0b:9c:70:33:87:05:e7:61:f2:ff:9b:d5:45: + 8c:9e:04:85:43:a0:8a:42:ae:e4:5d:17:74:bf:9e:02:f3:c4: + fb:48:ae:67:b3:25:5c:38:f7:e8:62:ed:1f:90:4c:ec:c8:9d: + 81:59:9a:50:22:bf:3f:4b:03:27:6d:2b:3c:80:92:fc:a5:7f: + 1a:05:1e:07 +-----BEGIN CERTIFICATE----- +MIIDZTCCAk2gAwIBAgIBEzANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE4MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKRjHvqfRyKaLI8nrhWi +FSFzAkR/m2J71kccIRxmAZXFKGq3vz06A36CscoIKO/HA+YrN3DQVBEJDaM8xQjs +81sdL85iaxf72uk5SkuoFPrqw/gp5DXohQox+858riA30sKe6PoPrVnVDPB/8ZxW +I/RiDVQWer+D0QfAYI58mnJEdYfMojG8PoGA5q6LrirH1DEpA9hxEvI7zGIi/wNC +KspKUBGeZMvOJof8gDlcU5eTyOKbzpnmxtsJ976EszexzkWJMhtdsXAQtEVzkpQ7 +Rp4/q4AwbaP0Jp2+nM3a/bmAh5WX573eBywubMTFPw+yWHoiz3KW4hOV6QZQtr76 +xOcCAwEAAaOByzCByDAdBgNVHQ4EFgQUiK0KJdukOLTCYX3T3V7tV1C1ER4wHwYD +VR0jBBgwFoAUiK0KJdukOLTCYX3T3V7tV1C1ER4wNwYIKwYBBQUHAQEEKzApMCcG +CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw +IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQA0w4779EcQ +L9F0f3GXJICUqien4b4b0/llDpdJyN8f5wc8Vq0AKlKwhXLynDs+OT2AdrmORNpm +TUp6nb6mptf/QvNmGxQtbTdoX1U+hf6m5n8NIetvhkm4DuI9Jnw5NKtm22KrQlW4 +umC0rrwFWxpPgt7srqDKHQFutdWe72oXDtLGUC4nCW7Ez0VQlJIK6nvSG9urMI8e +XBSLH/WQDzgAgt8omVoghjDmbxsWkuwCC0G+tAH+HO46FAuccDOHBedh8v+b1UWM +ngSFQ6CKQq7kXRd0v54C88T7SK5nsyVcOPfoYu0fkEzsyJ2BWZpQIr8/SwMnbSs8 +gJL8pX8aBR4H +-----END CERTIFICATE-----
diff --git a/components/test/data/cast_certificate/certificates/policies_ica_anypolicy_leaf_foo.pem b/components/test/data/cast_certificate/certificates/policies_ica_anypolicy_leaf_foo.pem new file mode 100644 index 0000000..9666ed59 --- /dev/null +++ b/components/test/data/cast_certificate/certificates/policies_ica_anypolicy_leaf_foo.pem
@@ -0,0 +1,281 @@ +[Created by: generate_policies_tests.py] + +Cast certificate chain with the following policies: + + Root: policies={} + Intermediate: policies={anyPolicy} + Leaf: policies={foo} + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 12 (0xc) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Intermediate + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Leaf + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:e9:db:75:48:f4:dd:0f:37:9a:8e:72:10:80:aa: + 7c:80:08:d2:ab:a2:1d:28:df:78:9c:52:72:c1:b9: + 7d:e0:03:a5:53:e9:70:96:0a:be:b9:9e:c0:f7:3e: + 23:33:15:42:66:5d:64:13:c0:7a:23:6d:7f:71:13: + c3:bd:da:d1:39:11:38:1e:91:bc:b3:f8:cb:90:9d: + fd:a6:b2:90:cb:fa:1b:70:11:a5:b4:03:25:78:dc: + d2:f6:1e:64:74:9b:2c:f4:3d:13:b2:ef:7e:8f:c4: + ad:98:8b:0b:df:1c:08:f5:34:9f:78:ca:35:52:b5: + 1c:b4:fc:f8:60:d7:ef:b4:74:1c:93:f1:80:87:3a: + 84:ac:43:2e:ce:a2:00:07:83:7e:6d:03:b5:2e:53: + c3:9c:ee:88:12:af:50:5c:42:e3:46:12:f1:20:10: + a3:fc:90:07:d7:29:04:9b:f6:50:9b:ff:3e:27:0b: + 29:e4:e4:d6:f9:00:46:82:c6:2a:63:11:9a:b9:6c: + fd:e1:fc:34:48:60:9b:8d:7e:3a:4c:ce:ee:28:2d: + 25:63:8d:07:43:69:3c:fa:d7:3c:bd:5d:40:b7:d7: + da:f2:74:ef:d3:00:bf:ac:3b:75:a0:0e:ae:52:63: + 3c:45:fa:e2:10:82:2b:c9:0f:02:18:c6:c6:09:02: + e6:f7 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 94:8A:74:F5:0F:9F:53:34:47:02:B5:04:8D:45:57:79:9B:98:7B:27 + X509v3 Authority Key Identifier: + keyid:9C:53:7F:7A:7F:4E:F2:C0:A5:1A:96:FB:9E:8D:08:DC:DD:73:92:61 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Intermediate.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Intermediate.crl + + X509v3 Key Usage: critical + Digital Signature, Key Encipherment + X509v3 Extended Key Usage: + TLS Web Client Authentication + X509v3 Certificate Policies: + Policy: 1.2.840.113554.4.1.72585.2 + + Signature Algorithm: sha256WithRSAEncryption + 04:86:bc:a3:cc:94:a3:b5:97:a6:ca:b4:21:d6:f9:37:f7:b1: + ed:d0:4a:43:ff:93:ec:42:62:05:1d:11:df:18:94:c2:fc:63: + ad:0b:db:f4:cc:8a:7c:e9:69:29:b3:df:7c:a5:79:31:01:6a: + fc:18:6f:fd:5b:f9:11:68:53:0b:78:53:1a:08:6f:5a:33:72: + 30:25:76:21:45:fb:a2:79:d5:d9:f7:60:1b:3b:cd:21:3d:66: + 72:73:4a:fa:cd:86:13:54:ca:44:87:97:55:ec:dc:dc:76:24: + 9e:43:17:ad:f9:2c:29:bc:4a:b3:01:95:bb:83:a6:d0:fa:c6: + 7d:d8:1d:7d:66:95:b7:fd:80:60:dd:8d:02:8c:80:cb:57:4f: + c1:7a:8f:2c:34:1e:5c:08:4f:76:a6:42:c2:66:39:24:5b:46: + 12:f0:6e:30:51:be:27:03:be:69:f5:b3:b7:6f:25:7e:0b:c8: + 52:48:90:12:59:54:5a:07:32:2b:3b:a7:13:31:92:5f:c2:5c: + 61:90:d9:70:04:e6:6f:7f:fa:ec:36:a5:6a:38:49:8d:a2:51: + e0:68:b3:c9:f6:c7:3a:99:7f:89:a5:17:d5:1b:fd:39:13:51: + 2d:26:8f:33:a8:61:86:d8:fe:b4:d4:d7:69:26:bb:4c:b1:a8: + cb:4b:a3:6f +-----BEGIN CERTIFICATE----- +MIIDnDCCAoSgAwIBAgIBDDANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTgwMTAxMTIwMDAwWjAPMQ0wCwYD +VQQDDARMZWFmMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6dt1SPTd +DzeajnIQgKp8gAjSq6IdKN94nFJywbl94AOlU+lwlgq+uZ7A9z4jMxVCZl1kE8B6 +I21/cRPDvdrRORE4HpG8s/jLkJ39prKQy/obcBGltAMleNzS9h5kdJss9D0Tsu9+ +j8StmIsL3xwI9TSfeMo1UrUctPz4YNfvtHQck/GAhzqErEMuzqIAB4N+bQO1LlPD +nO6IEq9QXELjRhLxIBCj/JAH1ykEm/ZQm/8+Jwsp5OTW+QBGgsYqYxGauWz94fw0 +SGCbjX46TM7uKC0lY40HQ2k8+tc8vV1At9fa8nTv0wC/rDt1oA6uUmM8RfriEIIr +yQ8CGMbGCQLm9wIDAQABo4H6MIH3MB0GA1UdDgQWBBSUinT1D59TNEcCtQSNRVd5 +m5h7JzAfBgNVHSMEGDAWgBScU396f07ywKUalvuejQjc3XOSYTA/BggrBgEFBQcB +AQQzMDEwLwYIKwYBBQUHMAKGI2h0dHA6Ly91cmwtZm9yLWFpYS9JbnRlcm1lZGlh +dGUuY2VyMDQGA1UdHwQtMCswKaAnoCWGI2h0dHA6Ly91cmwtZm9yLWNybC9JbnRl +cm1lZGlhdGUuY3JsMA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcD +AjAZBgNVHSAEEjAQMA4GDCqGSIb3EgQBhLcJAjANBgkqhkiG9w0BAQsFAAOCAQEA +BIa8o8yUo7WXpsq0Idb5N/ex7dBKQ/+T7EJiBR0R3xiUwvxjrQvb9MyKfOlpKbPf +fKV5MQFq/Bhv/Vv5EWhTC3hTGghvWjNyMCV2IUX7onnV2fdgGzvNIT1mcnNK+s2G +E1TKRIeXVezc3HYknkMXrfksKbxKswGVu4Om0PrGfdgdfWaVt/2AYN2NAoyAy1dP +wXqPLDQeXAhPdqZCwmY5JFtGEvBuMFG+JwO+afWzt28lfgvIUkiQEllUWgcyKzun +EzGSX8JcYZDZcATmb3/67DalajhJjaJR4GizyfbHOpl/iaUX1Rv9ORNRLSaPM6hh +htj+tNTXaSa7TLGoy0ujbw== +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 24 (0x18) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Intermediate + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:c0:06:6e:cf:e3:c9:e6:4a:99:bf:9d:a9:cc:42: + b0:e3:95:f4:5c:16:5d:6c:c3:3b:7b:65:f9:68:27: + 07:75:e9:60:fc:c5:1e:37:71:05:e6:f4:c4:8e:76: + cf:dd:b3:7a:dd:14:d4:4c:96:1a:5f:b4:c5:04:9a: + 32:e6:f7:16:4c:38:4a:99:e5:3a:24:85:c3:06:bc: + c1:9e:4c:ac:6b:14:9d:49:8c:ec:cd:9a:43:60:09: + d8:d0:81:8f:a3:b9:9f:e8:13:fb:69:95:27:7b:fe: + 6a:d8:9e:42:4b:96:47:ee:1c:69:c6:5a:d7:28:a4: + c2:91:46:bf:7a:c6:69:12:96:c8:68:fa:46:cf:fb: + 92:ca:12:a7:7a:58:39:6f:d1:26:07:2a:59:c5:fb: + 86:94:33:45:65:04:55:c4:a5:0c:da:e5:56:30:0d: + 46:32:ce:fe:9b:00:2d:3f:24:64:81:c2:f2:3f:f5: + af:71:1d:0e:69:ae:5e:43:28:e5:98:65:b7:16:ee: + 42:13:26:9d:a5:db:21:aa:85:1b:38:12:eb:f0:0a: + 93:ef:eb:5c:56:0d:cf:4a:13:4b:03:64:03:59:d9: + 59:05:f8:e0:79:49:68:44:98:ad:41:a7:9a:d3:9a: + 0b:74:73:79:b7:84:14:f6:b6:40:0f:68:1e:be:94: + 50:59 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 9C:53:7F:7A:7F:4E:F2:C0:A5:1A:96:FB:9E:8D:08:DC:DD:73:92:61 + X509v3 Authority Key Identifier: + keyid:02:F4:E3:B3:B5:C8:56:E5:72:02:9D:7A:97:A4:73:0A:88:EF:9C:40 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Certificate Policies: + Policy: X509v3 Any Policy + + Signature Algorithm: sha256WithRSAEncryption + 4f:f7:81:68:2c:99:55:0d:b9:0c:cb:18:bf:cd:c9:a3:1d:05: + 3e:53:e2:87:0e:94:20:6c:c9:77:4e:25:a0:f3:de:a2:52:3c: + 2a:4d:31:dc:d5:fc:19:bf:d9:d8:18:88:bf:9a:ff:9f:71:18: + 25:da:91:49:52:fc:d0:14:e0:97:cc:78:dd:4c:3f:4e:35:c8: + 57:12:40:a0:ac:1f:81:93:50:db:1b:17:be:e8:76:51:e8:e9: + 2d:2b:28:eb:cb:23:a7:58:b0:b4:53:f2:21:ef:6e:5d:a6:d3: + 36:92:da:90:cf:c4:fd:0b:4d:26:88:05:2a:6d:22:48:d2:4e: + 5f:3a:e0:ee:1a:70:a8:ab:58:ec:24:b4:61:84:f9:f0:8d:f4: + 93:38:49:f0:d2:14:ba:7d:ca:9e:04:a4:02:7e:e0:1e:9e:40: + c5:04:4a:69:fc:9e:fd:9b:2c:e1:c5:1f:ad:95:45:92:bd:38: + 74:07:2a:1f:cf:91:b3:f1:5a:88:d1:ca:97:1e:8f:6d:62:86: + b6:71:93:6f:d4:84:5c:fe:bb:56:d1:5c:01:0b:f0:1f:d5:27: + a3:8b:cd:8d:aa:ae:d7:ed:fc:c0:c9:30:89:7a:d2:34:d5:98: + ef:a7:44:4c:f9:8d:bd:6b:6c:6b:7c:a5:36:d0:f6:07:47:9f: + c3:d2:07:f5 +-----BEGIN CERTIFICATE----- +MIIDgDCCAmigAwIBAgIBGDANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE4MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwAZuz+PJ +5kqZv52pzEKw45X0XBZdbMM7e2X5aCcHdelg/MUeN3EF5vTEjnbP3bN63RTUTJYa +X7TFBJoy5vcWTDhKmeU6JIXDBrzBnkysaxSdSYzszZpDYAnY0IGPo7mf6BP7aZUn +e/5q2J5CS5ZH7hxpxlrXKKTCkUa/esZpEpbIaPpGz/uSyhKnelg5b9EmBypZxfuG +lDNFZQRVxKUM2uVWMA1GMs7+mwAtPyRkgcLyP/WvcR0Oaa5eQyjlmGW3Fu5CEyad +pdshqoUbOBLr8AqT7+tcVg3PShNLA2QDWdlZBfjgeUloRJitQaea05oLdHN5t4QU +9rZAD2gevpRQWQIDAQABo4HeMIHbMB0GA1UdDgQWBBScU396f07ywKUalvuejQjc +3XOSYTAfBgNVHSMEGDAWgBQC9OOztchW5XICnXqXpHMKiO+cQDA3BggrBgEFBQcB +AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs +BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD +VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wEQYDVR0gBAowCDAGBgRVHSAA +MA0GCSqGSIb3DQEBCwUAA4IBAQBP94FoLJlVDbkMyxi/zcmjHQU+U+KHDpQgbMl3 +TiWg896iUjwqTTHc1fwZv9nYGIi/mv+fcRgl2pFJUvzQFOCXzHjdTD9ONchXEkCg +rB+Bk1DbGxe+6HZR6OktKyjryyOnWLC0U/Ih725dptM2ktqQz8T9C00miAUqbSJI +0k5fOuDuGnCoq1jsJLRhhPnwjfSTOEnw0hS6fcqeBKQCfuAenkDFBEpp/J79myzh +xR+tlUWSvTh0Byofz5Gz8VqI0cqXHo9tYoa2cZNv1IRc/rtW0VwBC/Af1Seji82N +qq7X7fzAyTCJetI01Zjvp0RM+Y29a2xrfKU20PYHR5/D0gf1 +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 23 (0x17) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:a5:3e:c8:1f:15:65:7f:e7:ab:7e:07:f3:8e:4d: + 07:09:61:1c:db:01:f6:0c:7b:b2:a9:c5:49:c4:ae: + f6:d9:bc:b5:7d:36:0e:c2:7d:de:38:cd:97:a5:ca: + 9a:9c:c9:e7:21:83:50:0f:89:98:e2:ce:2b:44:48: + ff:3a:05:1d:b2:9e:6a:3e:3b:40:d9:78:bf:97:52: + df:62:5d:59:2d:f0:bd:54:f7:21:fb:21:02:fd:38: + af:d7:2b:42:16:db:d6:a3:58:9c:a6:4f:85:75:58: + 6f:aa:c3:e3:8e:59:eb:c3:49:ba:99:c9:ba:03:74: + ca:e7:26:d8:1d:5c:2a:c1:f7:a8:3c:31:5b:20:b5: + 9e:ec:7d:a8:00:cd:f7:6e:5a:57:42:fd:49:66:39: + bb:55:95:38:64:51:3a:13:59:86:0e:f2:db:49:07: + eb:02:84:00:95:4d:23:b3:72:10:8d:f3:a1:6b:34: + 68:63:97:0f:69:18:80:4f:ae:d4:f4:a1:f3:21:62: + 74:04:7a:07:0b:e3:61:cf:ff:07:75:27:78:0a:4e: + e3:e5:a2:51:9c:2f:d1:04:3c:7a:1c:0e:b3:bb:e7: + db:10:67:c8:c1:af:ce:9a:57:35:77:22:3c:48:fe: + 31:9b:7d:95:5e:e1:3d:32:99:9d:97:85:a4:7b:fd: + 1f:5d + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 02:F4:E3:B3:B5:C8:56:E5:72:02:9D:7A:97:A4:73:0A:88:EF:9C:40 + X509v3 Authority Key Identifier: + keyid:02:F4:E3:B3:B5:C8:56:E5:72:02:9D:7A:97:A4:73:0A:88:EF:9C:40 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 9a:7a:13:1c:1e:b6:30:f4:70:d0:47:ce:e6:31:fe:63:ae:08: + aa:8e:91:14:1f:1a:08:1b:c3:0e:e5:06:72:cd:28:df:16:73: + 98:9b:25:78:7c:61:05:6c:68:09:7e:33:9c:49:7e:7c:d2:53: + fa:f2:fe:fc:59:8a:2d:04:66:1e:0f:91:98:08:2a:ea:fd:23: + 22:5d:4b:1e:e3:e9:1a:4f:1d:3d:d0:49:13:af:d8:83:4e:8b: + 10:da:1b:b6:82:a3:4f:cb:ff:f4:28:2d:a6:88:63:07:db:72: + 13:fd:e7:c7:e9:77:1d:40:56:39:64:84:24:a8:20:dc:e1:f2: + e3:ad:ef:07:03:66:e8:3b:5d:30:82:ba:50:9c:b0:82:c1:14: + dd:23:9f:ea:56:02:77:63:56:e3:f4:5f:ef:05:cc:5e:cb:8f: + 3e:4d:c2:10:8d:e2:82:2f:52:91:d9:d0:d2:c1:6b:56:d2:f2: + 0c:b8:47:c8:52:69:ba:ce:fa:7d:f7:d5:dd:5d:cc:15:ef:9d: + 73:1b:6e:6d:ab:76:96:8a:06:94:68:6b:ea:36:44:54:66:66: + 05:40:1d:31:05:03:2a:78:10:cf:fa:90:dd:eb:9d:61:b5:3c: + e5:ec:8e:39:6b:1b:c5:1b:0c:cc:6a:3e:86:d8:ea:6e:d9:5a: + d1:8e:ea:a3 +-----BEGIN CERTIFICATE----- +MIIDZTCCAk2gAwIBAgIBFzANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE4MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKU+yB8VZX/nq34H845N +BwlhHNsB9gx7sqnFScSu9tm8tX02DsJ93jjNl6XKmpzJ5yGDUA+JmOLOK0RI/zoF +HbKeaj47QNl4v5dS32JdWS3wvVT3IfshAv04r9crQhbb1qNYnKZPhXVYb6rD445Z +68NJupnJugN0yucm2B1cKsH3qDwxWyC1nux9qADN925aV0L9SWY5u1WVOGRROhNZ +hg7y20kH6wKEAJVNI7NyEI3zoWs0aGOXD2kYgE+u1PSh8yFidAR6BwvjYc//B3Un +eApO4+WiUZwv0QQ8ehwOs7vn2xBnyMGvzppXNXciPEj+MZt9lV7hPTKZnZeFpHv9 +H10CAwEAAaOByzCByDAdBgNVHQ4EFgQUAvTjs7XIVuVyAp16l6RzCojvnEAwHwYD +VR0jBBgwFoAUAvTjs7XIVuVyAp16l6RzCojvnEAwNwYIKwYBBQUHAQEEKzApMCcG +CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw +IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCaehMcHrYw +9HDQR87mMf5jrgiqjpEUHxoIG8MO5QZyzSjfFnOYmyV4fGEFbGgJfjOcSX580lP6 +8v78WYotBGYeD5GYCCrq/SMiXUse4+kaTx090EkTr9iDTosQ2hu2gqNPy//0KC2m +iGMH23IT/efH6XcdQFY5ZIQkqCDc4fLjre8HA2boO10wgrpQnLCCwRTdI5/qVgJ3 +Y1bj9F/vBcxey48+TcIQjeKCL1KR2dDSwWtW0vIMuEfIUmm6zvp999XdXcwV751z +G25tq3aWigaUaGvqNkRUZmYFQB0xBQMqeBDP+pDd651htTzl7I45axvFGwzMaj6G +2Opu2VrRjuqj +-----END CERTIFICATE-----
diff --git a/components/test/data/cast_certificate/certificates/policies_ica_anypolicy_leaf_none.pem b/components/test/data/cast_certificate/certificates/policies_ica_anypolicy_leaf_none.pem new file mode 100644 index 0000000..0b79d97 --- /dev/null +++ b/components/test/data/cast_certificate/certificates/policies_ica_anypolicy_leaf_none.pem
@@ -0,0 +1,277 @@ +[Created by: generate_policies_tests.py] + +Cast certificate chain with the following policies: + + Root: policies={} + Intermediate: policies={anyPolicy} + Leaf: policies={} + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 9 (0x9) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Intermediate + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Leaf + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:92:c3:4f:27:2a:f3:65:b4:aa:df:99:ec:02:e1: + 4e:00:79:b1:96:25:09:94:ac:44:02:4b:99:d5:ed: + 0a:a9:7d:6e:7d:b7:71:b9:cb:c7:0d:54:5c:62:28: + 18:e3:81:27:65:b5:df:6c:1c:4b:ab:5a:e2:e1:0c: + d1:2c:ef:cd:65:d3:74:4c:e0:23:64:94:6c:c1:eb: + c7:5c:91:01:90:c3:0e:c7:da:a7:56:79:0c:1d:f7: + ce:3d:02:fe:62:0c:c8:fd:fc:52:c8:f2:1a:23:54: + a9:71:11:ef:52:4a:ba:89:2e:1c:82:c9:7b:aa:8d: + 07:4a:38:54:23:45:a2:08:4a:98:6f:37:4e:1d:f8: + de:16:2a:88:d6:3a:37:bb:31:b0:6b:18:bd:0d:b5: + 8d:b9:7a:1b:be:2a:ce:95:f7:ff:2f:6d:28:fd:f8: + bc:40:95:d7:c6:5c:0f:da:3e:b1:f2:2c:ad:c1:56: + cd:69:9a:d3:79:d6:9a:46:68:f9:93:2e:e4:6f:87: + a8:2c:91:d9:47:60:42:cd:d6:ab:2f:b1:6a:98:c1: + 2f:2e:14:ff:d5:c4:ec:64:78:fa:09:1d:2e:1e:40: + 8d:64:19:50:ec:f4:7f:bf:50:cb:1b:de:01:9f:8f: + 6f:d3:32:97:84:32:bd:6f:a4:3d:e1:0b:b8:ee:1d: + 3f:8f + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 6A:26:EF:38:8A:E3:00:ED:26:C5:C5:6B:3D:FD:98:60:10:2B:89:02 + X509v3 Authority Key Identifier: + keyid:79:CC:A4:3E:7B:31:9A:1B:9A:80:35:C3:8B:2A:C1:5A:8F:0A:BD:29 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Intermediate.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Intermediate.crl + + X509v3 Key Usage: critical + Digital Signature, Key Encipherment + X509v3 Extended Key Usage: + TLS Web Client Authentication + Signature Algorithm: sha256WithRSAEncryption + 1c:7a:7e:77:39:3c:fc:94:ec:e5:5e:69:5d:70:ef:dc:85:3d: + a3:40:ea:8e:5d:86:c1:62:16:d3:55:03:b8:dd:c7:52:7f:c3: + 43:85:05:4e:3a:4a:49:2a:49:01:35:a3:f2:60:46:d6:70:24: + 37:b8:2b:e8:cf:39:18:a1:1e:cf:64:e1:ff:2b:ae:14:99:e4: + c4:58:e6:d1:fa:d6:fa:1d:b2:69:a0:9a:9f:ce:70:8d:e7:b5: + cb:a0:79:1e:12:33:e3:c5:84:37:80:da:3e:68:58:71:ce:1c: + d4:51:b9:b9:2a:5b:26:36:a7:ed:4d:3c:1b:95:17:5b:47:0b: + 9e:a1:65:70:73:5a:4a:27:45:8f:b1:52:26:d9:74:7e:bd:e6: + 49:a7:d7:d4:c8:03:6f:d3:87:49:5b:06:55:aa:a7:b4:a5:a5: + 4b:6e:1d:00:ae:1a:e6:b5:0b:6d:04:8b:34:1b:a0:4c:fd:e3: + e0:ad:e7:f1:e4:c4:89:ae:22:e0:fd:04:cf:0a:2b:9e:b1:ed: + 68:71:bb:4f:0e:67:55:ff:03:e1:1c:76:7c:c8:12:e1:62:c8: + df:c4:47:b8:2d:71:50:99:01:ca:4a:69:76:eb:2b:77:20:c0: + 83:a9:e9:4c:2c:02:81:92:66:70:28:d5:4a:26:9a:b8:08:b3: + d0:d5:a6:9b +-----BEGIN CERTIFICATE----- +MIIDgTCCAmmgAwIBAgIBCTANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTgwMTAxMTIwMDAwWjAPMQ0wCwYD +VQQDDARMZWFmMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAksNPJyrz +ZbSq35nsAuFOAHmxliUJlKxEAkuZ1e0KqX1ufbdxucvHDVRcYigY44EnZbXfbBxL +q1ri4QzRLO/NZdN0TOAjZJRswevHXJEBkMMOx9qnVnkMHffOPQL+YgzI/fxSyPIa +I1SpcRHvUkq6iS4cgsl7qo0HSjhUI0WiCEqYbzdOHfjeFiqI1jo3uzGwaxi9DbWN +uXobvirOlff/L20o/fi8QJXXxlwP2j6x8iytwVbNaZrTedaaRmj5ky7kb4eoLJHZ +R2BCzdarL7FqmMEvLhT/1cTsZHj6CR0uHkCNZBlQ7PR/v1DLG94Bn49v0zKXhDK9 +b6Q94Qu47h0/jwIDAQABo4HfMIHcMB0GA1UdDgQWBBRqJu84iuMA7SbFxWs9/Zhg +ECuJAjAfBgNVHSMEGDAWgBR5zKQ+ezGaG5qANcOLKsFajwq9KTA/BggrBgEFBQcB +AQQzMDEwLwYIKwYBBQUHMAKGI2h0dHA6Ly91cmwtZm9yLWFpYS9JbnRlcm1lZGlh +dGUuY2VyMDQGA1UdHwQtMCswKaAnoCWGI2h0dHA6Ly91cmwtZm9yLWNybC9JbnRl +cm1lZGlhdGUuY3JsMA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcD +AjANBgkqhkiG9w0BAQsFAAOCAQEAHHp+dzk8/JTs5V5pXXDv3IU9o0Dqjl2GwWIW +01UDuN3HUn/DQ4UFTjpKSSpJATWj8mBG1nAkN7gr6M85GKEez2Th/yuuFJnkxFjm +0frW+h2yaaCan85wjee1y6B5HhIz48WEN4DaPmhYcc4c1FG5uSpbJjan7U08G5UX +W0cLnqFlcHNaSidFj7FSJtl0fr3mSafX1MgDb9OHSVsGVaqntKWlS24dAK4a5rUL +bQSLNBugTP3j4K3n8eTEia4i4P0EzwornrHtaHG7Tw5nVf8D4Rx2fMgS4WLI38RH +uC1xUJkBykppdusrdyDAg6npTCwCgZJmcCjVSiaauAiz0NWmmw== +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 18 (0x12) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Intermediate + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:db:cc:7a:15:d2:86:e2:27:87:c8:bb:a5:50:65: + 03:38:43:3a:9d:aa:87:52:86:b5:45:04:1e:9f:81: + 22:f3:4e:62:e6:78:ff:e4:39:8a:3a:4a:55:3e:54: + 90:2a:e1:fe:62:ff:b7:d1:b1:06:37:eb:81:c7:4d: + 18:87:bb:24:6d:6c:26:63:15:7f:a1:d6:ab:3b:77: + 2b:7d:c8:74:9c:54:33:34:cd:cf:f6:7e:6d:1f:05: + ea:ba:bf:ae:5e:ca:f5:a9:47:3b:27:61:24:3c:ba: + 74:58:70:27:68:b6:0b:fd:30:c6:f4:b6:56:4b:78: + 9e:ea:21:86:88:63:db:ae:b8:1d:ea:b0:f3:d8:bf: + 3f:9e:8c:69:cd:9e:40:41:10:41:48:01:cc:e4:3b: + 3c:9b:74:ea:e5:d9:37:bf:ce:2c:59:81:b3:f4:bb: + b7:61:df:f9:ac:be:a3:63:22:bf:05:5a:46:d5:b8: + 68:fa:95:60:1e:25:b7:49:7b:4f:e0:d0:49:e9:f9: + 22:11:36:fe:4d:87:88:99:62:21:6e:ac:c7:d7:ee: + 64:07:bc:c9:87:78:67:8b:8a:40:3d:6a:c6:a7:e2: + a2:e8:2b:f5:33:5d:0e:e6:8c:b7:85:63:11:d4:fa: + fe:aa:5e:fc:a5:86:b4:b4:4d:dd:5f:f8:be:38:27: + 9f:75 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 79:CC:A4:3E:7B:31:9A:1B:9A:80:35:C3:8B:2A:C1:5A:8F:0A:BD:29 + X509v3 Authority Key Identifier: + keyid:4E:EC:98:88:CE:93:B8:9B:D0:A3:12:F9:03:90:96:AE:FF:AD:25:CE + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Certificate Policies: + Policy: X509v3 Any Policy + + Signature Algorithm: sha256WithRSAEncryption + 1e:2c:c2:5f:5e:25:2e:7a:aa:4e:2e:05:a1:7e:dc:59:b6:43: + a7:bb:91:91:ce:78:89:0c:76:82:b7:39:79:b1:3e:f2:a2:8b: + cd:63:aa:d5:dd:c2:20:64:db:a7:d0:21:64:e6:fe:4c:b3:5c: + 70:7b:f8:31:1b:7c:c3:e6:c1:1e:42:d9:9c:a1:bb:24:e3:f8: + 94:26:3b:e3:81:11:ca:0a:f7:a6:e5:94:ad:1b:c6:4d:f6:b0: + 43:0f:13:1f:d6:c2:e3:bd:d8:aa:04:43:04:07:bf:b8:0d:86: + f7:d0:e5:1e:35:00:e6:94:e6:53:b5:4b:ee:10:dc:65:49:b3: + e9:1d:53:b6:9f:6a:83:39:9c:df:bd:40:f6:be:97:fa:81:82: + 6a:81:44:ad:15:50:2e:bb:22:e1:b6:0d:e2:2c:6b:66:14:59: + bc:0d:8b:02:39:d0:d2:88:7c:ef:c6:2b:42:19:08:3e:52:70: + 6a:68:7b:4e:66:18:66:3f:73:9a:5e:30:65:37:96:79:03:50: + a4:13:1a:2f:30:e1:37:b3:4d:14:9f:0f:a4:59:5c:f1:bb:eb: + 8b:c2:77:82:fa:00:15:66:bb:12:4c:17:7b:65:c7:6e:45:30: + b4:99:a8:8a:bc:73:cd:92:56:78:3d:1d:79:93:e6:95:12:7a: + 0f:c9:92:5d +-----BEGIN CERTIFICATE----- +MIIDgDCCAmigAwIBAgIBEjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE4MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA28x6FdKG +4ieHyLulUGUDOEM6naqHUoa1RQQen4Ei805i5nj/5DmKOkpVPlSQKuH+Yv+30bEG +N+uBx00Yh7skbWwmYxV/odarO3crfch0nFQzNM3P9n5tHwXqur+uXsr1qUc7J2Ek +PLp0WHAnaLYL/TDG9LZWS3ie6iGGiGPbrrgd6rDz2L8/noxpzZ5AQRBBSAHM5Ds8 +m3Tq5dk3v84sWYGz9Lu3Yd/5rL6jYyK/BVpG1bho+pVgHiW3SXtP4NBJ6fkiETb+ +TYeImWIhbqzH1+5kB7zJh3hni4pAPWrGp+Ki6Cv1M10O5oy3hWMR1Pr+ql78pYa0 +tE3dX/i+OCefdQIDAQABo4HeMIHbMB0GA1UdDgQWBBR5zKQ+ezGaG5qANcOLKsFa +jwq9KTAfBgNVHSMEGDAWgBRO7JiIzpO4m9CjEvkDkJau/60lzjA3BggrBgEFBQcB +AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs +BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD +VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wEQYDVR0gBAowCDAGBgRVHSAA +MA0GCSqGSIb3DQEBCwUAA4IBAQAeLMJfXiUueqpOLgWhftxZtkOnu5GRzniJDHaC +tzl5sT7yoovNY6rV3cIgZNun0CFk5v5Ms1xwe/gxG3zD5sEeQtmcobsk4/iUJjvj +gRHKCvem5ZStG8ZN9rBDDxMf1sLjvdiqBEMEB7+4DYb30OUeNQDmlOZTtUvuENxl +SbPpHVO2n2qDOZzfvUD2vpf6gYJqgUStFVAuuyLhtg3iLGtmFFm8DYsCOdDSiHzv +xitCGQg+UnBqaHtOZhhmP3OaXjBlN5Z5A1CkExovMOE3s00Unw+kWVzxu+uLwneC ++gAVZrsSTBd7ZcduRTC0maiKvHPNklZ4PR15k+aVEnoPyZJd +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 17 (0x11) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:bd:a8:ec:69:2b:0e:2d:98:61:a7:c3:3b:d2:a6: + b5:d1:35:42:b6:f2:b1:3f:78:fa:3a:8a:8a:53:7f: + f4:f5:4e:03:c0:fa:06:df:ef:7c:83:a1:4e:78:80: + d0:22:53:20:7b:0c:ac:0e:00:67:52:a5:39:c9:6c: + b6:91:64:d0:75:61:62:aa:cd:b4:14:b8:06:14:d6: + 62:b2:71:ac:bb:f5:44:53:0f:ef:f4:ee:ba:a1:1d: + f9:40:97:50:ee:a3:a1:0e:a2:d2:45:85:66:26:55: + 70:f1:f5:9c:c2:1e:38:e6:80:3c:98:e2:be:4c:79: + c9:42:5a:5a:28:ef:18:48:73:a7:2d:b7:b5:ab:c9: + ea:7a:2a:ae:f8:34:f2:66:bf:67:82:49:b0:27:34: + 62:8b:73:49:c2:02:66:e5:a5:86:31:80:e9:ae:33: + 99:b2:9d:dc:37:aa:a0:02:35:80:de:ed:73:15:3f: + c7:77:ba:49:d9:8c:1b:b4:6e:5d:a4:2f:89:bf:e4: + c1:39:3b:bb:f6:54:59:b6:86:7e:78:da:02:5f:41: + 19:e9:ef:b3:28:9b:dc:b2:56:a1:8f:b4:be:d2:af: + 28:a9:dc:84:e8:e1:d9:86:b9:3c:87:38:3a:b2:68: + 36:29:1b:a2:57:f7:fe:2b:e5:7b:27:67:a7:bd:ed: + 88:81 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 4E:EC:98:88:CE:93:B8:9B:D0:A3:12:F9:03:90:96:AE:FF:AD:25:CE + X509v3 Authority Key Identifier: + keyid:4E:EC:98:88:CE:93:B8:9B:D0:A3:12:F9:03:90:96:AE:FF:AD:25:CE + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 1e:96:67:78:64:ad:6c:ec:da:97:18:00:95:1d:b8:3d:cb:31: + 69:5f:08:a0:f0:b6:13:13:ea:d0:1c:bb:17:74:ff:e4:0f:e9: + d8:d2:77:5c:31:c2:47:03:41:cd:8e:ed:83:ff:a9:03:b4:ff: + 41:da:f3:d6:18:c7:15:82:a8:4e:e4:1c:e0:df:b2:c3:b5:fb: + 61:e3:6c:98:f2:64:96:9d:11:c9:74:79:9b:a0:5b:7c:b9:fe: + 04:d2:9b:fc:c2:1e:d8:71:c7:44:6f:19:45:84:40:4a:5a:d9: + 61:bf:da:39:47:44:59:b1:df:b4:80:a9:7b:1c:32:98:ff:c0: + 40:75:bd:a8:4c:c9:aa:92:f7:5a:1e:de:f0:92:26:3c:b3:08: + 94:ba:d4:64:2b:32:1b:9a:6e:fb:8b:e6:8a:9b:5c:85:3f:88: + 21:6d:85:ba:fd:1b:19:d7:48:63:4b:1f:83:33:9f:97:e7:b2: + 2f:de:dd:e3:1d:19:d3:15:69:01:38:b3:ff:e5:35:d4:4e:16: + 44:59:2a:3c:4e:18:c9:b0:d5:9f:b6:fa:4a:04:ab:bb:70:7d: + e6:4e:27:55:9d:4c:b9:a0:53:f0:b1:b8:4b:0e:d7:72:0f:b4: + 64:53:24:76:c8:a7:58:c0:15:0e:7e:d7:20:6e:60:d5:01:6d: + 47:b2:66:29 +-----BEGIN CERTIFICATE----- +MIIDZTCCAk2gAwIBAgIBETANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE4MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL2o7GkrDi2YYafDO9Km +tdE1QrbysT94+jqKilN/9PVOA8D6Bt/vfIOhTniA0CJTIHsMrA4AZ1KlOclstpFk +0HVhYqrNtBS4BhTWYrJxrLv1RFMP7/TuuqEd+UCXUO6joQ6i0kWFZiZVcPH1nMIe +OOaAPJjivkx5yUJaWijvGEhzpy23tavJ6noqrvg08ma/Z4JJsCc0YotzScICZuWl +hjGA6a4zmbKd3DeqoAI1gN7tcxU/x3e6SdmMG7RuXaQvib/kwTk7u/ZUWbaGfnja +Al9BGenvsyib3LJWoY+0vtKvKKnchOjh2Ya5PIc4OrJoNikbolf3/ivleydnp73t +iIECAwEAAaOByzCByDAdBgNVHQ4EFgQUTuyYiM6TuJvQoxL5A5CWrv+tJc4wHwYD +VR0jBBgwFoAUTuyYiM6TuJvQoxL5A5CWrv+tJc4wNwYIKwYBBQUHAQEEKzApMCcG +CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw +IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAelmd4ZK1s +7NqXGACVHbg9yzFpXwig8LYTE+rQHLsXdP/kD+nY0ndcMcJHA0HNju2D/6kDtP9B +2vPWGMcVgqhO5Bzg37LDtfth42yY8mSWnRHJdHmboFt8uf4E0pv8wh7YccdEbxlF +hEBKWtlhv9o5R0RZsd+0gKl7HDKY/8BAdb2oTMmqkvdaHt7wkiY8swiUutRkKzIb +mm77i+aKm1yFP4ghbYW6/RsZ10hjSx+DM5+X57Iv3t3jHRnTFWkBOLP/5TXUThZE +WSo8ThjJsNWftvpKBKu7cH3mTidVnUy5oFPwsbhLDtdyD7RkUyR2yKdYwBUOftcg +bmDVAW1HsmYp +-----END CERTIFICATE-----
diff --git a/components/test/data/cast_certificate/certificates/policies_ica_audioonly_leaf_anypolicy.pem b/components/test/data/cast_certificate/certificates/policies_ica_audioonly_leaf_anypolicy.pem new file mode 100644 index 0000000..ebc2957 --- /dev/null +++ b/components/test/data/cast_certificate/certificates/policies_ica_audioonly_leaf_anypolicy.pem
@@ -0,0 +1,281 @@ +[Created by: generate_policies_tests.py] + +Cast certificate chain with the following policies: + + Root: policies={} + Intermediate: policies={audioOnly} + Leaf: policies={anyPolicy} + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 3 (0x3) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Intermediate + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Leaf + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:f6:c9:53:09:29:9f:0f:b2:8a:f9:79:7c:26:b6: + 14:bb:53:9b:96:13:72:bb:e8:04:7a:c2:b4:d3:3d: + 44:d4:ee:d5:f0:cc:0e:1b:6d:39:26:02:79:57:41: + 26:06:19:0a:72:be:db:db:a0:3a:d1:ab:34:00:9d: + 17:06:21:be:e0:26:b6:23:b4:09:d2:8c:c1:4c:57: + d6:67:6a:5f:dd:43:b1:ce:ec:b9:01:fd:c7:a3:90: + 0e:8e:6a:d1:ce:83:a0:05:d6:67:c7:be:bf:6e:1c: + bb:ba:40:52:65:5a:4e:84:d1:a9:d1:5a:9c:70:65: + 44:05:38:05:73:8e:0f:a4:9f:b3:03:a5:ff:a3:a0: + d8:f1:77:01:d5:ca:9e:77:27:37:7a:9c:ba:75:13: + 45:ee:93:57:d3:8d:b8:cc:ea:9f:ff:bf:ca:1f:63: + 22:50:13:02:2b:81:a5:d6:4a:21:97:f1:8a:0d:d5: + 59:30:0a:f9:b7:f0:6b:c4:16:13:da:af:36:b2:ef: + 52:06:eb:b2:11:64:69:ba:64:0f:6d:a6:fe:5a:92: + c9:c7:97:03:0f:4e:7b:f1:f3:af:6b:52:ac:94:3e: + b8:70:7c:eb:5d:b3:04:41:24:3a:b7:ba:cc:4c:44: + 90:51:08:07:b9:67:04:44:71:6c:df:ee:fb:55:ed: + 32:9d + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + B1:D8:81:D5:6B:69:FA:FC:E9:97:E3:E2:9E:74:21:7A:7C:0C:E2:1E + X509v3 Authority Key Identifier: + keyid:69:AD:46:2C:89:44:30:3B:CF:B4:E5:C1:46:D9:B6:D0:E9:4B:D9:F0 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Intermediate.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Intermediate.crl + + X509v3 Key Usage: critical + Digital Signature, Key Encipherment + X509v3 Extended Key Usage: + TLS Web Client Authentication + X509v3 Certificate Policies: + Policy: X509v3 Any Policy + + Signature Algorithm: sha256WithRSAEncryption + 5a:0a:be:50:a0:12:fb:d4:4c:65:d1:c5:d8:14:f7:25:e8:6d: + 93:14:cc:de:79:9f:b2:74:f3:5f:4a:87:33:11:db:5a:df:83: + aa:13:05:ad:0b:92:0f:ba:78:93:ce:0f:2e:cb:d5:cc:cc:b7: + f3:48:2d:89:81:ce:62:46:31:65:83:d0:42:df:93:0c:fc:6a: + d1:74:6f:f2:8e:28:94:cc:af:0d:0c:ed:29:35:97:f4:dd:87: + 88:e6:37:ba:b8:b4:fe:16:20:5d:a4:9f:2c:13:6e:35:41:74: + 8d:bd:83:ae:52:25:17:a0:07:26:e9:98:ec:c0:b7:46:18:9e: + a9:62:04:14:53:91:b9:7b:5a:27:92:b9:e8:46:e7:28:8f:51: + 72:4d:36:51:54:12:e3:eb:4b:bb:28:1d:18:d8:88:2b:04:f9: + de:4a:45:b2:30:69:73:79:05:90:8c:b1:b4:48:c5:d3:e9:f2: + 01:82:34:ca:e9:10:bc:ca:bc:aa:b9:08:16:a1:d3:6d:8a:b5: + 67:bd:e1:3c:1b:fb:26:a0:f7:f4:ae:ac:1a:e1:7c:b0:b7:90: + 6f:4c:f3:e0:00:83:2f:7b:ba:b5:36:3b:ab:71:b7:b5:79:db: + 50:f7:48:89:94:86:af:fe:3e:32:7a:91:d4:fb:4b:10:b0:9f: + cc:6f:a4:9c +-----BEGIN CERTIFICATE----- +MIIDlDCCAnygAwIBAgIBAzANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTgwMTAxMTIwMDAwWjAPMQ0wCwYD +VQQDDARMZWFmMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA9slTCSmf +D7KK+Xl8JrYUu1OblhNyu+gEesK00z1E1O7V8MwOG205JgJ5V0EmBhkKcr7b26A6 +0as0AJ0XBiG+4Ca2I7QJ0ozBTFfWZ2pf3UOxzuy5Af3Ho5AOjmrRzoOgBdZnx76/ +bhy7ukBSZVpOhNGp0VqccGVEBTgFc44PpJ+zA6X/o6DY8XcB1cqedyc3epy6dRNF +7pNX0424zOqf/7/KH2MiUBMCK4Gl1kohl/GKDdVZMAr5t/BrxBYT2q82su9SBuuy +EWRpumQPbab+WpLJx5cDD0578fOva1KslD64cHzrXbMEQSQ6t7rMTESQUQgHuWcE +RHFs3+77Ve0ynQIDAQABo4HyMIHvMB0GA1UdDgQWBBSx2IHVa2n6/OmX4+KedCF6 +fAziHjAfBgNVHSMEGDAWgBRprUYsiUQwO8+05cFG2bbQ6UvZ8DA/BggrBgEFBQcB +AQQzMDEwLwYIKwYBBQUHMAKGI2h0dHA6Ly91cmwtZm9yLWFpYS9JbnRlcm1lZGlh +dGUuY2VyMDQGA1UdHwQtMCswKaAnoCWGI2h0dHA6Ly91cmwtZm9yLWNybC9JbnRl +cm1lZGlhdGUuY3JsMA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcD +AjARBgNVHSAECjAIMAYGBFUdIAAwDQYJKoZIhvcNAQELBQADggEBAFoKvlCgEvvU +TGXRxdgU9yXobZMUzN55n7J0819KhzMR21rfg6oTBa0Lkg+6eJPODy7L1czMt/NI +LYmBzmJGMWWD0ELfkwz8atF0b/KOKJTMrw0M7Sk1l/Tdh4jmN7q4tP4WIF2knywT +bjVBdI29g65SJRegBybpmOzAt0YYnqliBBRTkbl7WieSuehG5yiPUXJNNlFUEuPr +S7soHRjYiCsE+d5KRbIwaXN5BZCMsbRIxdPp8gGCNMrpELzKvKq5CBah022KtWe9 +4Twb+yag9/SurBrhfLC3kG9M8+AAgy97urU2O6txt7V521D3SImUhq/+PjJ6kdT7 +SxCwn8xvpJw= +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 6 (0x6) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Intermediate + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:a8:13:59:fd:9e:9b:cb:c9:02:2c:44:ff:d7:e7: + 1d:10:62:8b:db:1d:ed:85:0b:c4:0c:01:7b:71:54: + e6:83:a3:56:e3:39:cb:52:0e:5a:25:97:55:82:47: + 46:e6:c1:8d:24:09:c0:ae:44:f1:b7:e8:6c:b3:4f: + 81:b2:32:31:36:b4:92:21:d7:f3:bd:d4:2e:90:43: + 09:49:20:91:b7:dd:3e:eb:54:03:b4:8a:b0:f3:1c: + 44:04:82:f8:b1:65:ae:24:57:47:87:af:9d:a2:21: + 4a:3b:6b:36:66:1e:cf:af:cb:be:b7:5c:85:a1:22: + c1:f0:a0:6c:d7:f7:d7:33:ec:86:f0:32:2f:91:5d: + 70:fc:a1:3d:7c:7b:4d:7f:3e:8a:ef:ef:3f:18:c9: + 5a:bd:b0:01:fd:a1:2c:f9:e8:80:a1:43:07:c8:b2: + c0:ed:70:47:b6:46:65:90:53:49:00:e7:f8:43:68: + ed:02:27:89:f8:d5:b8:0d:97:6b:1a:c1:37:71:e2: + 85:bb:db:3b:8b:f6:82:a4:5c:da:6a:a0:e5:4c:1b: + 09:50:3e:28:a4:ad:e6:86:95:6a:c7:b5:21:ed:aa: + 29:ad:64:9b:94:0a:44:ec:7d:45:fc:9f:3d:7a:8c: + 65:21:eb:45:f2:d3:49:98:fd:0f:69:f0:3b:f9:c8: + f3:33 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 69:AD:46:2C:89:44:30:3B:CF:B4:E5:C1:46:D9:B6:D0:E9:4B:D9:F0 + X509v3 Authority Key Identifier: + keyid:82:D5:80:DD:3D:8B:A3:17:84:E6:C1:77:1A:72:12:B7:0B:3A:11:DF + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Certificate Policies: + Policy: 1.3.6.1.4.1.11129.2.5.2 + + Signature Algorithm: sha256WithRSAEncryption + c0:7b:5c:a8:bd:53:58:86:46:19:a5:bd:4a:0c:29:35:f1:3f: + 77:23:52:87:b3:d1:79:16:51:14:bc:1b:37:33:be:96:86:37: + c9:9e:43:a8:3b:7e:80:45:22:e0:00:79:d9:01:ba:f6:fa:91: + 05:11:a3:0c:ce:27:48:fb:1d:45:1f:fc:eb:9a:3d:be:c2:0e: + 9c:42:ba:6c:68:6e:96:56:e9:81:b8:65:34:68:7e:84:f6:eb: + cc:67:b1:00:4b:8d:9e:19:89:be:29:c8:7f:9b:78:f6:50:68: + 88:c4:c3:82:40:76:87:7e:34:a3:16:58:9a:84:bf:0d:23:79: + 24:97:c8:34:59:71:d5:28:99:ed:a3:10:71:a0:08:1e:01:23: + 60:58:95:b6:c4:00:7e:6d:f3:e8:59:9f:fd:92:05:ed:da:e0: + b5:e3:6f:46:cc:6f:1f:ee:d4:21:4d:19:18:85:1d:ae:e6:9e: + 04:21:6c:fe:d7:b0:8a:15:54:30:3d:16:c3:97:70:67:c8:51: + 3b:a8:42:fa:85:b1:14:54:c8:43:ba:4c:8c:cf:88:87:f3:29: + 55:7e:51:5d:ef:19:4b:9e:0a:92:e5:09:29:8a:d3:2e:9e:26: + 2d:87:17:23:ff:93:7d:a6:64:fb:3a:8f:56:99:31:8a:8a:b9: + 09:4b:1d:c0 +-----BEGIN CERTIFICATE----- +MIIDhjCCAm6gAwIBAgIBBjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE4MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqBNZ/Z6b +y8kCLET/1+cdEGKL2x3thQvEDAF7cVTmg6NW4znLUg5aJZdVgkdG5sGNJAnArkTx +t+hss0+BsjIxNrSSIdfzvdQukEMJSSCRt90+61QDtIqw8xxEBIL4sWWuJFdHh6+d +oiFKO2s2Zh7Pr8u+t1yFoSLB8KBs1/fXM+yG8DIvkV1w/KE9fHtNfz6K7+8/GMla +vbAB/aEs+eiAoUMHyLLA7XBHtkZlkFNJAOf4Q2jtAieJ+NW4DZdrGsE3ceKFu9s7 +i/aCpFzaaqDlTBsJUD4opK3mhpVqx7Uh7aoprWSblApE7H1F/J89eoxlIetF8tNJ +mP0PafA7+cjzMwIDAQABo4HkMIHhMB0GA1UdDgQWBBRprUYsiUQwO8+05cFG2bbQ +6UvZ8DAfBgNVHSMEGDAWgBSC1YDdPYujF4TmwXcachK3CzoR3zA3BggrBgEFBQcB +AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs +BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD +VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wFwYDVR0gBBAwDjAMBgorBgEE +AdZ5AgUCMA0GCSqGSIb3DQEBCwUAA4IBAQDAe1yovVNYhkYZpb1KDCk18T93I1KH +s9F5FlEUvBs3M76WhjfJnkOoO36ARSLgAHnZAbr2+pEFEaMMzidI+x1FH/zrmj2+ +wg6cQrpsaG6WVumBuGU0aH6E9uvMZ7EAS42eGYm+Kch/m3j2UGiIxMOCQHaHfjSj +FliahL8NI3kkl8g0WXHVKJntoxBxoAgeASNgWJW2xAB+bfPoWZ/9kgXt2uC1429G +zG8f7tQhTRkYhR2u5p4EIWz+17CKFVQwPRbDl3BnyFE7qEL6hbEUVMhDukyMz4iH +8ylVflFd7xlLngqS5QkpitMuniYthxcj/5N9pmT7Oo9WmTGKirkJSx3A +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 5 (0x5) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:de:c6:19:7e:66:50:27:4f:e1:53:c8:c1:db:27: + 48:07:35:5d:51:84:f0:8e:62:64:9b:6f:b0:25:76: + e7:d5:e3:c2:2a:57:5a:11:9d:93:e6:97:e1:bb:24: + 77:88:e4:bd:65:d9:07:a4:7d:12:67:18:19:e3:ab: + 41:85:4b:39:54:d7:bc:36:8b:e5:69:b6:38:8e:e1: + 3a:c2:8c:61:08:34:db:0a:43:fb:1c:0b:ff:ed:fe: + 8c:65:8d:76:00:8c:0b:9c:f8:51:f4:e6:e2:cf:07: + 23:b1:95:30:b7:c7:e4:b8:4f:29:54:81:c3:9a:af: + 7e:43:59:85:56:57:8e:3d:9c:ec:e4:f0:a5:c6:bd: + fa:d5:f5:19:eb:b1:90:f6:86:ae:80:f9:2b:c0:d3: + a2:87:59:97:c6:36:a6:ab:4a:60:31:ba:c6:35:72: + 30:29:3c:14:54:6b:1a:5b:72:f0:3a:eb:22:2e:d3: + 44:38:c2:f3:c8:f3:cc:32:45:71:f8:a3:98:dc:4e: + 0b:0a:f4:31:c9:31:58:1b:fa:d3:d7:73:95:05:59: + 6d:73:32:dd:97:2f:fd:89:e0:0f:49:a0:16:8e:f0: + c8:91:88:d6:08:2d:44:82:17:07:12:57:fb:f6:76: + b3:d7:09:33:29:f4:24:34:33:a3:c9:b3:33:be:4b: + 85:bb + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 82:D5:80:DD:3D:8B:A3:17:84:E6:C1:77:1A:72:12:B7:0B:3A:11:DF + X509v3 Authority Key Identifier: + keyid:82:D5:80:DD:3D:8B:A3:17:84:E6:C1:77:1A:72:12:B7:0B:3A:11:DF + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 24:50:5b:fc:90:33:66:c4:43:81:73:1e:23:c6:da:63:06:4f: + 12:ee:7d:0e:a2:1e:01:66:a4:db:b4:0d:a1:45:be:4e:ed:e2: + 6d:22:bc:60:e5:18:8f:21:b5:bf:56:d5:f4:1b:de:1f:c1:18: + f1:d1:a7:88:62:3c:79:d0:aa:08:7e:65:be:09:83:70:f2:27: + 3c:48:8d:5e:59:eb:cc:c7:3a:f8:f4:81:e0:af:95:53:1b:dc: + 44:af:f0:f6:cd:cd:0f:d1:d3:9c:4c:f3:b3:48:68:ef:b3:5d: + c4:33:5c:ea:08:7d:00:75:78:07:c4:86:b6:a2:45:86:3f:20: + ee:47:4e:c3:2b:70:a5:09:cc:69:af:db:0b:ce:6d:b5:79:7e: + 9c:fd:8f:db:11:96:19:19:85:10:76:c3:ca:e8:db:98:02:bd: + 3d:40:ac:21:4a:70:0e:cb:3f:02:f2:11:1e:fa:da:90:ac:1b: + f7:c8:3e:ec:32:c7:97:01:a7:9d:94:db:ed:65:dd:5f:6c:da: + 5a:a9:5f:63:0e:1a:84:82:e4:63:32:75:79:ca:23:dc:17:02: + 13:65:1c:b0:e8:70:5a:62:25:36:24:f6:5e:47:ed:3f:d7:42: + 16:ee:59:96:80:bb:e1:7d:31:9d:e3:00:b2:8b:9e:da:89:e5: + d5:60:f4:9b +-----BEGIN CERTIFICATE----- +MIIDZTCCAk2gAwIBAgIBBTANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE4MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN7GGX5mUCdP4VPIwdsn +SAc1XVGE8I5iZJtvsCV259XjwipXWhGdk+aX4bskd4jkvWXZB6R9EmcYGeOrQYVL +OVTXvDaL5Wm2OI7hOsKMYQg02wpD+xwL/+3+jGWNdgCMC5z4UfTm4s8HI7GVMLfH +5LhPKVSBw5qvfkNZhVZXjj2c7OTwpca9+tX1GeuxkPaGroD5K8DToodZl8Y2pqtK +YDG6xjVyMCk8FFRrGlty8DrrIi7TRDjC88jzzDJFcfijmNxOCwr0MckxWBv609dz +lQVZbXMy3Zcv/YngD0mgFo7wyJGI1ggtRIIXBxJX+/Z2s9cJMyn0JDQzo8mzM75L +hbsCAwEAAaOByzCByDAdBgNVHQ4EFgQUgtWA3T2LoxeE5sF3GnIStws6Ed8wHwYD +VR0jBBgwFoAUgtWA3T2LoxeE5sF3GnIStws6Ed8wNwYIKwYBBQUHAQEEKzApMCcG +CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw +IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAkUFv8kDNm +xEOBcx4jxtpjBk8S7n0Ooh4BZqTbtA2hRb5O7eJtIrxg5RiPIbW/VtX0G94fwRjx +0aeIYjx50KoIfmW+CYNw8ic8SI1eWevMxzr49IHgr5VTG9xEr/D2zc0P0dOcTPOz +SGjvs13EM1zqCH0AdXgHxIa2okWGPyDuR07DK3ClCcxpr9sLzm21eX6c/Y/bEZYZ +GYUQdsPK6NuYAr09QKwhSnAOyz8C8hEe+tqQrBv3yD7sMseXAaedlNvtZd1fbNpa +qV9jDhqEguRjMnV5yiPcFwITZRyw6HBaYiU2JPZeR+0/10IW7lmWgLvhfTGd4wCy +i57aieXVYPSb +-----END CERTIFICATE-----
diff --git a/components/test/data/cast_certificate/certificates/policies_ica_audioonly_leaf_audioonly.pem b/components/test/data/cast_certificate/certificates/policies_ica_audioonly_leaf_audioonly.pem new file mode 100644 index 0000000..85ac096 --- /dev/null +++ b/components/test/data/cast_certificate/certificates/policies_ica_audioonly_leaf_audioonly.pem
@@ -0,0 +1,281 @@ +[Created by: generate_policies_tests.py] + +Cast certificate chain with the following policies: + + Root: policies={} + Intermediate: policies={audioOnly} + Leaf: policies={audioOnly} + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 2 (0x2) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Intermediate + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Leaf + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:d0:0b:d7:3e:98:8e:bb:3e:3c:0b:89:5d:95:79: + a7:6a:14:3e:6b:b2:0c:02:01:25:51:9d:3a:fc:ea: + b7:ee:d1:5d:e6:c1:c1:59:a9:e3:59:10:d3:04:6a: + a4:ab:33:f0:e6:cf:70:44:a6:14:88:5f:dd:63:b6: + b7:d6:ce:4b:bd:05:3f:61:7a:6d:01:5a:38:4b:64: + a3:63:d0:1b:7c:7a:37:ab:eb:a8:5b:e0:50:e6:5f: + f5:90:20:8d:76:51:5a:2b:82:4c:60:89:7d:f7:df: + d2:6d:e4:e3:65:63:13:65:90:13:91:d7:c2:f6:61: + 82:b2:4d:cc:db:47:e3:f6:cd:c4:62:f9:95:36:04: + cd:19:85:54:a6:8e:5c:28:0f:0d:22:13:d7:8d:16: + 1d:1a:68:7a:40:d6:c8:0f:e8:60:c8:fe:16:fe:45: + e1:e4:a8:b8:b8:e5:fb:40:51:2a:70:e0:de:62:35: + 78:b6:70:59:f6:7b:a2:7c:03:9c:69:8b:29:a5:3b: + fd:b9:89:ec:58:3b:c5:2e:71:f7:d5:bb:48:b3:8b: + 92:1a:a6:8a:33:1e:b7:55:c5:ff:d7:e9:f1:ef:e4: + d8:67:ae:58:51:18:66:24:f1:1b:12:1f:a1:90:f7: + d0:ba:4d:cb:a4:9e:af:ec:6d:b1:a9:f6:f2:2d:fe: + 41:01 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 49:8A:C6:9F:50:B0:1A:C4:63:BF:03:F3:E8:D1:62:7B:4F:8E:8E:6E + X509v3 Authority Key Identifier: + keyid:1A:DF:4D:09:A0:4D:8D:18:9E:B2:43:6B:AF:D5:99:96:0D:C6:6E:0A + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Intermediate.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Intermediate.crl + + X509v3 Key Usage: critical + Digital Signature, Key Encipherment + X509v3 Extended Key Usage: + TLS Web Client Authentication + X509v3 Certificate Policies: + Policy: 1.3.6.1.4.1.11129.2.5.2 + + Signature Algorithm: sha256WithRSAEncryption + 1b:08:f3:4d:5a:ab:a0:3a:39:fd:08:5e:bf:d1:02:07:92:af: + 79:8b:5d:c5:67:df:cc:53:77:4a:98:84:62:13:19:e1:83:61: + c8:f6:4e:5c:34:1b:98:49:82:24:d0:13:77:be:08:87:22:02: + 3e:54:aa:a0:dc:ff:ac:50:09:98:98:e7:f5:b0:e6:53:29:71: + 62:82:95:6b:37:cd:01:a4:42:aa:6b:80:c1:70:d7:66:6c:c6: + 21:7f:7c:b0:c3:71:44:ad:ca:68:db:04:cd:ef:a5:18:75:e4: + 12:40:b1:05:47:c9:bc:86:fb:a4:2f:bf:eb:5a:3b:ff:ff:99: + 8b:2a:6f:20:0a:dc:6e:ad:79:cc:b0:aa:46:a0:d6:3c:90:b7: + c6:36:99:03:e1:ca:d2:39:5f:69:c9:e5:eb:c9:03:05:85:d8: + c2:6f:b8:75:a2:e2:77:3c:c6:24:dd:84:78:9e:b4:0e:a3:00: + 3d:50:bc:9d:5f:62:b9:75:46:3b:66:42:fd:85:93:fc:1c:41: + c7:e2:58:07:cd:ba:27:3c:58:92:7f:6f:60:e4:9c:68:cb:8d: + 3d:a9:f6:ad:e3:4d:17:e5:ff:c3:9f:7a:c1:96:7a:a2:99:79: + 7a:2d:ce:9d:49:59:20:6e:89:f9:6e:17:aa:97:44:1d:ed:28: + c2:8d:48:0c +-----BEGIN CERTIFICATE----- +MIIDmjCCAoKgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTgwMTAxMTIwMDAwWjAPMQ0wCwYD +VQQDDARMZWFmMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0AvXPpiO +uz48C4ldlXmnahQ+a7IMAgElUZ06/Oq37tFd5sHBWanjWRDTBGqkqzPw5s9wRKYU +iF/dY7a31s5LvQU/YXptAVo4S2SjY9AbfHo3q+uoW+BQ5l/1kCCNdlFaK4JMYIl9 +99/SbeTjZWMTZZATkdfC9mGCsk3M20fj9s3EYvmVNgTNGYVUpo5cKA8NIhPXjRYd +Gmh6QNbID+hgyP4W/kXh5Ki4uOX7QFEqcODeYjV4tnBZ9nuifAOcaYsppTv9uYns +WDvFLnH31btIs4uSGqaKMx63VcX/1+nx7+TYZ65YURhmJPEbEh+hkPfQuk3LpJ6v +7G2xqfbyLf5BAQIDAQABo4H4MIH1MB0GA1UdDgQWBBRJisafULAaxGO/A/Po0WJ7 +T46ObjAfBgNVHSMEGDAWgBQa300JoE2NGJ6yQ2uv1ZmWDcZuCjA/BggrBgEFBQcB +AQQzMDEwLwYIKwYBBQUHMAKGI2h0dHA6Ly91cmwtZm9yLWFpYS9JbnRlcm1lZGlh +dGUuY2VyMDQGA1UdHwQtMCswKaAnoCWGI2h0dHA6Ly91cmwtZm9yLWNybC9JbnRl +cm1lZGlhdGUuY3JsMA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcD +AjAXBgNVHSAEEDAOMAwGCisGAQQB1nkCBQIwDQYJKoZIhvcNAQELBQADggEBABsI +801aq6A6Of0IXr/RAgeSr3mLXcVn38xTd0qYhGITGeGDYcj2Tlw0G5hJgiTQE3e+ +CIciAj5UqqDc/6xQCZiY5/Ww5lMpcWKClWs3zQGkQqprgMFw12ZsxiF/fLDDcUSt +ymjbBM3vpRh15BJAsQVHybyG+6Qvv+taO///mYsqbyAK3G6tecywqkag1jyQt8Y2 +mQPhytI5X2nJ5evJAwWF2MJvuHWi4nc8xiTdhHietA6jAD1QvJ1fYrl1RjtmQv2F +k/wcQcfiWAfNuic8WJJ/b2DknGjLjT2p9q3jTRfl/8OfesGWeqKZeXotzp1JWSBu +ifluF6qXRB3tKMKNSAw= +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 4 (0x4) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Intermediate + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:cb:9b:d4:8f:6f:27:f3:b7:4d:01:80:93:70:2a: + c0:14:26:ae:44:a8:0e:e7:3e:2f:fb:f8:07:4b:79: + 2d:e9:5f:90:ba:b4:fd:43:76:f9:1b:56:59:a1:76: + 81:75:7f:d5:8c:35:bc:d5:9f:10:f8:cd:dc:3d:40: + 6b:3d:66:eb:e5:41:06:c3:85:e9:d9:64:ff:36:41: + 99:f1:8d:cc:a2:95:7a:86:ad:16:67:cf:40:c3:bc: + 1b:b0:90:1d:8d:a7:8e:7c:89:01:f2:11:2d:b6:53: + 13:20:bb:2a:ec:9a:ba:e6:b0:5a:ee:6a:b4:aa:82: + 47:eb:cd:32:b0:c7:4b:92:11:3a:58:3c:9e:bf:7f: + df:ef:bc:fa:2c:d2:29:fb:95:76:4f:27:2d:14:a9: + 3e:34:39:29:18:84:01:c5:27:8f:d2:e4:85:72:6d: + b1:43:d7:b8:56:a7:9d:0f:c3:45:b9:3e:27:c8:c1: + 05:a4:23:aa:4d:85:77:08:91:a3:fc:ca:5f:a7:bd: + 25:fb:57:a6:d3:29:e0:b0:39:87:6e:26:a7:f1:c0: + 65:ba:9d:80:e3:26:42:b9:d7:9a:e8:2f:c9:94:67: + 08:87:f8:2a:54:72:69:36:d9:87:e9:a5:e8:91:39: + 41:66:a4:7d:d7:ec:d4:7b:8e:b9:65:05:ad:90:0c: + b3:a1 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 1A:DF:4D:09:A0:4D:8D:18:9E:B2:43:6B:AF:D5:99:96:0D:C6:6E:0A + X509v3 Authority Key Identifier: + keyid:8C:07:70:06:02:9A:7D:D2:99:47:6E:2F:63:D8:B8:67:2F:CE:E3:3B + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Certificate Policies: + Policy: 1.3.6.1.4.1.11129.2.5.2 + + Signature Algorithm: sha256WithRSAEncryption + df:31:6f:7a:51:9b:68:73:12:e2:74:a7:c1:58:43:d1:fd:c4: + 64:1a:0c:17:9d:5c:d0:9b:ab:f6:5b:de:f1:6a:08:7d:20:db: + c2:f6:4c:87:af:ad:c1:ba:52:15:04:2e:6d:5a:61:bd:e2:73: + 15:c5:62:99:56:47:86:ce:c9:28:44:37:c7:0e:7e:af:5c:1d: + 4a:4c:ac:74:e5:74:16:81:76:5c:ec:40:72:35:41:f0:9f:ec: + 14:7f:ee:c2:35:ae:9f:57:e3:e9:68:48:c9:33:f8:ca:d5:9c: + 0e:1a:ec:83:bf:fc:02:0c:3d:30:3b:f5:aa:a8:c0:8f:36:45: + f4:0c:48:bd:d9:11:c2:b5:b0:c0:78:6d:3c:c1:1f:96:ae:01: + 31:e8:b9:9f:1f:65:41:bd:89:2b:ce:8f:cb:59:e3:8b:d1:97: + a8:83:f8:dd:63:13:e9:53:4f:0d:41:73:97:c5:06:4e:09:33: + e8:37:23:ad:5e:26:69:4c:70:7a:eb:cf:50:c0:b1:40:42:a3: + 7c:37:ad:48:d4:a5:ee:44:b5:64:43:e6:52:ac:00:f3:fc:03: + 9e:ab:fb:8d:03:4c:d3:2f:fc:b3:cb:31:9e:42:08:e1:c8:d1: + 3d:d3:a7:ec:9b:f2:11:75:15:19:b3:30:25:c5:de:a5:06:b1: + 44:17:bd:b9 +-----BEGIN CERTIFICATE----- +MIIDhjCCAm6gAwIBAgIBBDANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE4MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy5vUj28n +87dNAYCTcCrAFCauRKgO5z4v+/gHS3kt6V+QurT9Q3b5G1ZZoXaBdX/VjDW81Z8Q ++M3cPUBrPWbr5UEGw4Xp2WT/NkGZ8Y3MopV6hq0WZ89Aw7wbsJAdjaeOfIkB8hEt +tlMTILsq7Jq65rBa7mq0qoJH680ysMdLkhE6WDyev3/f77z6LNIp+5V2TyctFKk+ +NDkpGIQBxSeP0uSFcm2xQ9e4VqedD8NFuT4nyMEFpCOqTYV3CJGj/Mpfp70l+1em +0yngsDmHbian8cBlup2A4yZCudea6C/JlGcIh/gqVHJpNtmH6aXokTlBZqR91+zU +e465ZQWtkAyzoQIDAQABo4HkMIHhMB0GA1UdDgQWBBQa300JoE2NGJ6yQ2uv1ZmW +DcZuCjAfBgNVHSMEGDAWgBSMB3AGApp90plHbi9j2LhnL87jOzA3BggrBgEFBQcB +AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs +BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD +VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wFwYDVR0gBBAwDjAMBgorBgEE +AdZ5AgUCMA0GCSqGSIb3DQEBCwUAA4IBAQDfMW96UZtocxLidKfBWEPR/cRkGgwX +nVzQm6v2W97xagh9INvC9kyHr63BulIVBC5tWmG94nMVxWKZVkeGzskoRDfHDn6v +XB1KTKx05XQWgXZc7EByNUHwn+wUf+7CNa6fV+PpaEjJM/jK1ZwOGuyDv/wCDD0w +O/WqqMCPNkX0DEi92RHCtbDAeG08wR+WrgEx6LmfH2VBvYkrzo/LWeOL0Zeog/jd +YxPpU08NQXOXxQZOCTPoNyOtXiZpTHB6689QwLFAQqN8N61I1KXuRLVkQ+ZSrADz +/AOeq/uNA0zTL/yzyzGeQgjhyNE906fsm/IRdRUZszAlxd6lBrFEF725 +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 3 (0x3) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:ee:16:50:2d:c1:27:44:01:0a:3f:67:6c:a5:e2: + 9c:5a:30:1a:81:73:ee:0c:07:51:44:01:0a:cc:cf: + 3a:a2:86:06:06:aa:54:46:d0:01:3e:3d:08:9d:74: + 6c:86:92:df:0c:bf:2c:ec:11:18:30:0c:a7:20:7b: + 9e:66:6b:a2:6b:fc:0d:53:5e:f1:49:69:56:ac:8d: + b6:d2:18:79:59:8b:30:dc:1d:70:86:85:7f:2a:c2: + 33:df:a2:f2:35:6b:52:8e:14:41:a0:10:c9:aa:f9: + 94:2c:f3:09:ec:9f:c9:61:da:71:47:d2:b1:76:8a: + c8:e2:2d:2b:48:b5:6d:f2:87:88:ce:97:b4:2d:53: + 99:35:7a:59:75:79:c7:e9:ed:d5:9a:03:81:f2:b5: + bb:30:50:5a:8d:4b:c0:a5:55:0c:97:ff:f4:5a:ef: + a1:4a:ae:ce:74:70:29:60:d7:84:a5:49:dd:c9:8c: + d9:cd:e8:66:cd:59:af:b5:cf:8b:d5:3d:9b:80:2c: + 9c:eb:e4:04:11:3f:1a:a6:15:bf:96:66:bf:83:9b: + 4b:e4:49:4f:17:0d:df:42:5f:af:06:a1:50:5e:aa: + c7:1f:a9:2e:7a:f0:49:6d:77:cd:e3:78:4c:3e:4b: + f9:67:60:a3:f6:18:28:ba:7d:5a:df:9b:66:02:ca: + 38:1b + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 8C:07:70:06:02:9A:7D:D2:99:47:6E:2F:63:D8:B8:67:2F:CE:E3:3B + X509v3 Authority Key Identifier: + keyid:8C:07:70:06:02:9A:7D:D2:99:47:6E:2F:63:D8:B8:67:2F:CE:E3:3B + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 49:1d:f3:68:30:35:e7:2a:2d:8c:9c:fd:83:de:44:bd:1f:1e: + bf:f7:d6:ee:03:5f:e7:21:4f:f9:ca:08:ca:d4:99:ff:ab:8f: + 42:3d:02:de:3f:7d:c1:4b:fc:aa:f3:b5:cc:b4:d9:04:b6:4e: + 5a:bd:5a:65:de:2e:06:f4:90:a2:fb:18:e7:b3:54:b2:ff:37: + 2b:15:de:26:2b:d7:11:1e:17:58:f3:b8:6d:10:ba:b7:8e:9a: + 5d:8a:d7:5c:69:28:0c:0e:8b:ce:b4:e1:4a:a3:58:82:a6:f6: + 21:39:fb:eb:5b:20:12:e2:7b:36:4e:be:cf:a6:dc:29:6c:ef: + 01:44:07:e8:1f:a2:b4:7c:b1:84:c3:4b:ba:a8:bd:d8:e0:f9: + 82:49:e9:f8:08:a5:c9:d6:3a:62:ce:ad:9e:57:ed:1a:92:e2: + d9:f1:7d:46:a4:6b:72:db:16:f8:61:75:50:5b:0a:30:62:13: + 12:14:16:cc:6b:1c:f3:c4:df:a7:83:ad:c6:ee:d1:34:45:d7: + 36:14:fc:5b:82:96:87:ad:45:bc:15:40:70:ea:e1:17:62:e7: + 45:aa:a3:7f:33:f0:3f:32:8d:2a:98:64:62:17:f9:9a:8d:32: + e5:db:79:aa:50:8c:5d:91:40:76:b4:d6:92:5c:2f:81:86:92: + 0e:8f:2b:12 +-----BEGIN CERTIFICATE----- +MIIDZTCCAk2gAwIBAgIBAzANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE4MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAO4WUC3BJ0QBCj9nbKXi +nFowGoFz7gwHUUQBCszPOqKGBgaqVEbQAT49CJ10bIaS3wy/LOwRGDAMpyB7nmZr +omv8DVNe8UlpVqyNttIYeVmLMNwdcIaFfyrCM9+i8jVrUo4UQaAQyar5lCzzCeyf +yWHacUfSsXaKyOItK0i1bfKHiM6XtC1TmTV6WXV5x+nt1ZoDgfK1uzBQWo1LwKVV +DJf/9FrvoUquznRwKWDXhKVJ3cmM2c3oZs1Zr7XPi9U9m4AsnOvkBBE/GqYVv5Zm +v4ObS+RJTxcN30JfrwahUF6qxx+pLnrwSW13zeN4TD5L+Wdgo/YYKLp9Wt+bZgLK +OBsCAwEAAaOByzCByDAdBgNVHQ4EFgQUjAdwBgKafdKZR24vY9i4Zy/O4zswHwYD +VR0jBBgwFoAUjAdwBgKafdKZR24vY9i4Zy/O4zswNwYIKwYBBQUHAQEEKzApMCcG +CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw +IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBJHfNoMDXn +Ki2MnP2D3kS9Hx6/99buA1/nIU/5ygjK1Jn/q49CPQLeP33BS/yq87XMtNkEtk5a +vVpl3i4G9JCi+xjns1Sy/zcrFd4mK9cRHhdY87htELq3jppditdcaSgMDovOtOFK +o1iCpvYhOfvrWyAS4ns2Tr7PptwpbO8BRAfoH6K0fLGEw0u6qL3Y4PmCSen4CKXJ +1jpizq2eV+0akuLZ8X1GpGty2xb4YXVQWwowYhMSFBbMaxzzxN+ng63G7tE0Rdc2 +FPxbgpaHrUW8FUBw6uEXYudFqqN/M/A/Mo0qmGRiF/majTLl23mqUIxdkUB2tNaS +XC+BhpIOjysS +-----END CERTIFICATE-----
diff --git a/components/test/data/cast_certificate/certificates/policies_ica_audioonly_leaf_foo.pem b/components/test/data/cast_certificate/certificates/policies_ica_audioonly_leaf_foo.pem new file mode 100644 index 0000000..cf0e866 --- /dev/null +++ b/components/test/data/cast_certificate/certificates/policies_ica_audioonly_leaf_foo.pem
@@ -0,0 +1,281 @@ +[Created by: generate_policies_tests.py] + +Cast certificate chain with the following policies: + + Root: policies={} + Intermediate: policies={audioOnly} + Leaf: policies={foo} + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 4 (0x4) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Intermediate + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Leaf + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:b4:ac:61:51:0e:40:b5:27:19:06:0b:a9:13:d8: + ec:a4:ab:ae:df:94:33:27:7e:e3:2b:0f:4b:b0:2c: + 6a:41:38:b4:0b:aa:29:31:9c:1d:17:42:32:e0:81: + bb:a3:ea:52:c0:43:f3:f1:2c:3a:5d:22:9c:e6:e9: + cc:96:3b:69:4f:63:e0:29:57:47:4c:94:02:64:39: + 52:38:2a:5e:f4:93:12:e1:85:16:87:e8:b4:15:80: + 02:ba:af:61:2e:e6:14:2a:39:81:67:27:c4:c7:fc: + 4b:f9:e6:f7:b1:84:eb:bd:b6:b0:df:01:11:49:94: + 39:8b:b3:2e:0b:c9:46:de:b9:63:ba:d2:d1:60:21: + d0:d2:e2:4a:5f:7c:df:3c:99:6f:c9:e8:a5:9f:be: + d3:76:89:dd:99:f1:fe:6e:53:bd:b2:19:f1:9f:dc: + 68:84:7f:a6:1c:81:4d:c7:7e:b1:ba:bf:d8:05:46: + 9a:43:c4:ef:08:08:80:40:49:32:ef:f8:84:0e:da: + 67:bf:7b:4b:14:69:f7:e7:c6:16:40:c5:75:21:a1: + 19:48:6e:81:88:2a:70:b0:23:87:da:43:ab:b5:f3: + 45:2b:c1:31:44:31:2d:94:a5:f6:e4:97:16:54:aa: + 76:e4:bc:4f:f9:14:59:83:61:7e:ed:4e:6a:c6:3b: + c8:0b + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 5B:20:CE:3D:64:B6:89:52:42:76:50:2E:B6:50:8C:8C:88:BD:44:6A + X509v3 Authority Key Identifier: + keyid:D7:30:75:D1:B9:8A:C0:67:E9:D7:FB:C4:45:99:2F:AF:B4:E0:DF:2A + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Intermediate.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Intermediate.crl + + X509v3 Key Usage: critical + Digital Signature, Key Encipherment + X509v3 Extended Key Usage: + TLS Web Client Authentication + X509v3 Certificate Policies: + Policy: 1.2.840.113554.4.1.72585.2 + + Signature Algorithm: sha256WithRSAEncryption + 23:67:1e:34:11:31:20:b8:a4:6c:36:ae:71:5a:23:6d:73:72: + 4e:5b:65:b9:8b:4a:bb:6c:c1:ba:87:24:3a:98:42:59:a3:c3: + 75:bf:1d:b4:c7:c4:c8:b9:87:a0:d8:6d:98:14:34:c6:2a:8b: + b4:e2:3a:4a:10:b7:fd:52:8e:33:7a:8b:1d:b7:28:f4:99:12: + 93:65:f9:1a:66:42:6f:da:19:f9:33:a6:72:9e:f9:15:c6:61: + 28:05:92:04:1e:9f:d9:e8:a6:81:11:32:82:38:db:61:68:24: + 7f:f8:5b:db:55:78:7c:d8:65:2b:c5:4c:78:31:f6:0e:bc:73: + 0c:33:81:47:10:bb:fe:49:66:2a:2c:2c:4c:40:23:06:97:26: + b5:d1:b9:a3:9f:0c:7d:e9:1b:6a:f9:61:fd:29:bc:6d:85:68: + 92:8f:f6:94:25:c7:85:3a:d1:ee:28:45:06:11:af:a0:0c:7d: + a9:da:02:ff:bf:d7:d2:96:7c:6e:34:bf:35:2d:85:64:79:2c: + 23:59:c9:e1:fe:0e:56:91:47:a8:22:d1:10:2d:d4:44:38:44: + ca:58:59:04:d6:81:60:7f:bc:08:a5:f3:3f:f8:8e:fa:c1:40: + 2e:40:8b:5a:15:84:17:a0:92:59:55:97:83:fe:9b:32:95:94: + a8:51:99:42 +-----BEGIN CERTIFICATE----- +MIIDnDCCAoSgAwIBAgIBBDANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTgwMTAxMTIwMDAwWjAPMQ0wCwYD +VQQDDARMZWFmMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtKxhUQ5A +tScZBgupE9jspKuu35QzJ37jKw9LsCxqQTi0C6opMZwdF0Iy4IG7o+pSwEPz8Sw6 +XSKc5unMljtpT2PgKVdHTJQCZDlSOCpe9JMS4YUWh+i0FYACuq9hLuYUKjmBZyfE +x/xL+eb3sYTrvbaw3wERSZQ5i7MuC8lG3rljutLRYCHQ0uJKX3zfPJlvyeiln77T +dondmfH+blO9shnxn9xohH+mHIFNx36xur/YBUaaQ8TvCAiAQEky7/iEDtpnv3tL +FGn358YWQMV1IaEZSG6BiCpwsCOH2kOrtfNFK8ExRDEtlKX25JcWVKp25LxP+RRZ +g2F+7U5qxjvICwIDAQABo4H6MIH3MB0GA1UdDgQWBBRbIM49ZLaJUkJ2UC62UIyM +iL1EajAfBgNVHSMEGDAWgBTXMHXRuYrAZ+nX+8RFmS+vtODfKjA/BggrBgEFBQcB +AQQzMDEwLwYIKwYBBQUHMAKGI2h0dHA6Ly91cmwtZm9yLWFpYS9JbnRlcm1lZGlh +dGUuY2VyMDQGA1UdHwQtMCswKaAnoCWGI2h0dHA6Ly91cmwtZm9yLWNybC9JbnRl +cm1lZGlhdGUuY3JsMA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcD +AjAZBgNVHSAEEjAQMA4GDCqGSIb3EgQBhLcJAjANBgkqhkiG9w0BAQsFAAOCAQEA +I2ceNBExILikbDaucVojbXNyTltluYtKu2zBuockOphCWaPDdb8dtMfEyLmHoNht +mBQ0xiqLtOI6ShC3/VKOM3qLHbco9JkSk2X5GmZCb9oZ+TOmcp75FcZhKAWSBB6f +2eimgREygjjbYWgkf/hb21V4fNhlK8VMeDH2DrxzDDOBRxC7/klmKiwsTEAjBpcm +tdG5o58Mfekbavlh/Sm8bYVoko/2lCXHhTrR7ihFBhGvoAx9qdoC/7/X0pZ8bjS/ +NS2FZHksI1nJ4f4OVpFHqCLREC3URDhEylhZBNaBYH+8CKXzP/iO+sFALkCLWhWE +F6CSWVWXg/6bMpWUqFGZQg== +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 8 (0x8) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Intermediate + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:a9:b2:82:36:54:a8:98:d5:fd:3d:04:24:22:7a: + 96:60:e6:b9:00:f2:b5:30:fe:2a:e7:01:d7:18:08: + 14:af:09:2c:2b:fc:09:1c:c5:8f:dc:80:68:0e:e4: + 33:6b:6a:e0:9a:e5:5d:7f:72:71:b6:bf:9a:c2:42: + 72:2f:02:64:a6:b1:31:9c:3b:f8:f6:f1:5f:58:c6: + 15:e7:09:d5:d7:ca:85:48:24:e9:ba:4b:77:dd:55: + 52:38:b7:98:6f:98:ac:6b:cb:aa:6b:31:9a:7e:8d: + 72:35:ff:d2:13:47:60:39:b6:c9:97:1b:6d:e6:95: + 33:c5:df:74:d3:37:7e:5d:92:11:6b:ad:74:0a:5f: + 2c:62:56:d2:f2:2e:9f:02:47:66:e4:9c:e9:67:ed: + 92:9e:5f:6c:2e:87:ea:ad:c8:b0:d2:72:be:19:7c: + a8:bb:10:e7:76:5c:74:8c:42:9c:c0:91:58:e9:ba: + b7:6a:71:4a:6f:c0:3c:5d:42:e7:e6:8d:53:57:d5: + 06:5d:80:da:f5:97:f3:a7:32:71:49:99:c0:ef:a2: + 77:3f:c0:42:a4:6e:1f:ca:41:f5:37:a0:a9:e8:f9: + f8:b0:16:5e:a3:98:e7:87:9d:31:c8:c3:c1:0c:34: + 8b:e9:0e:9b:30:b7:fc:2a:d0:ff:7d:c8:bc:b5:d6: + 7d:6f + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + D7:30:75:D1:B9:8A:C0:67:E9:D7:FB:C4:45:99:2F:AF:B4:E0:DF:2A + X509v3 Authority Key Identifier: + keyid:97:9F:F1:88:19:93:DC:19:55:06:EB:83:28:9D:18:F0:1E:50:99:EB + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Certificate Policies: + Policy: 1.3.6.1.4.1.11129.2.5.2 + + Signature Algorithm: sha256WithRSAEncryption + 93:84:5b:28:41:82:e9:d3:62:fb:5b:6b:2f:03:53:bf:2e:c2: + e1:65:15:5b:6d:fc:56:16:d0:d8:c5:45:b6:ce:c8:e3:76:d5: + 35:00:02:ab:b9:e1:23:ca:7d:0d:80:d6:e4:dc:70:50:56:4f: + 6f:a8:80:c5:45:40:0b:3e:6d:88:02:bc:37:e1:b2:f6:ec:d0: + 88:27:49:f6:98:2e:03:35:98:13:04:4e:25:c9:0e:65:70:f7: + 7a:da:1c:32:cb:40:3f:8b:54:75:b2:c8:63:45:45:fe:01:af: + d9:04:8b:58:18:55:ac:78:3a:20:04:7a:1e:bb:43:49:0b:cd: + ac:09:08:0a:c2:96:6f:4f:a0:4e:d5:48:f8:40:e7:f5:46:11: + 58:f0:1c:ff:91:db:e9:e8:58:ad:45:dd:ed:06:ed:63:51:93: + 4d:40:fc:7e:d8:d3:e3:dc:36:20:63:9f:f0:fd:05:8a:b0:7d: + 2d:8a:99:93:fa:73:4e:b5:24:45:e8:bf:0f:a8:e0:ee:c7:18: + 2e:b6:b3:ed:52:ba:d1:94:0d:9f:8d:c7:66:a7:91:5d:bd:dc: + ca:ff:bb:99:31:1e:78:08:b4:4d:03:2e:af:a6:f1:87:f0:80: + e7:81:47:db:be:31:2c:ee:ef:ca:16:b1:15:9e:43:0d:10:ef: + 8c:22:be:fc +-----BEGIN CERTIFICATE----- +MIIDhjCCAm6gAwIBAgIBCDANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE4MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqbKCNlSo +mNX9PQQkInqWYOa5APK1MP4q5wHXGAgUrwksK/wJHMWP3IBoDuQza2rgmuVdf3Jx +tr+awkJyLwJkprExnDv49vFfWMYV5wnV18qFSCTpukt33VVSOLeYb5isa8uqazGa +fo1yNf/SE0dgObbJlxtt5pUzxd900zd+XZIRa610Cl8sYlbS8i6fAkdm5JzpZ+2S +nl9sLofqrciw0nK+GXyouxDndlx0jEKcwJFY6bq3anFKb8A8XULn5o1TV9UGXYDa +9ZfzpzJxSZnA76J3P8BCpG4fykH1N6Cp6Pn4sBZeo5jnh50xyMPBDDSL6Q6bMLf8 +KtD/fci8tdZ9bwIDAQABo4HkMIHhMB0GA1UdDgQWBBTXMHXRuYrAZ+nX+8RFmS+v +tODfKjAfBgNVHSMEGDAWgBSXn/GIGZPcGVUG64MonRjwHlCZ6zA3BggrBgEFBQcB +AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs +BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD +VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wFwYDVR0gBBAwDjAMBgorBgEE +AdZ5AgUCMA0GCSqGSIb3DQEBCwUAA4IBAQCThFsoQYLp02L7W2svA1O/LsLhZRVb +bfxWFtDYxUW2zsjjdtU1AAKrueEjyn0NgNbk3HBQVk9vqIDFRUALPm2IArw34bL2 +7NCIJ0n2mC4DNZgTBE4lyQ5lcPd62hwyy0A/i1R1sshjRUX+Aa/ZBItYGFWseDog +BHoeu0NJC82sCQgKwpZvT6BO1Uj4QOf1RhFY8Bz/kdvp6FitRd3tBu1jUZNNQPx+ +2NPj3DYgY5/w/QWKsH0tipmT+nNOtSRF6L8PqODuxxgutrPtUrrRlA2fjcdmp5Fd +vdzK/7uZMR54CLRNAy6vpvGH8IDngUfbvjEs7u/KFrEVnkMNEO+MIr78 +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 7 (0x7) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:9b:9c:73:93:62:04:5c:af:94:ef:7f:74:ac:8d: + 96:d4:50:8a:1f:08:eb:3a:2c:08:6e:53:2a:79:b7: + ee:03:31:43:0d:66:d2:af:ee:59:6c:bc:06:42:22: + cd:39:49:62:13:51:dd:94:fd:7f:03:d4:55:0f:e3: + 82:dd:f5:3f:2f:4b:01:38:e2:d2:31:e3:da:d9:b0: + 8e:c4:39:62:8a:dd:5a:68:0e:5c:65:80:e5:74:e7: + a3:5a:b7:23:eb:9c:26:6b:82:50:4e:49:f2:2a:15: + 41:0c:f8:03:7a:33:92:b6:e1:d0:de:1c:c4:08:74: + 4d:dc:e3:82:ab:0b:4e:ef:32:c7:bb:b3:45:30:3b: + d9:1e:6f:eb:6c:9a:c7:e4:9d:be:07:09:eb:43:20: + a7:b0:68:99:21:45:80:d3:90:71:ea:87:53:e1:20: + 99:ef:84:38:f5:71:0a:42:a3:30:b2:d8:6f:ab:87: + ac:9a:7c:01:b6:8a:3c:c1:c1:62:25:77:7e:51:f1: + 4f:88:92:b1:3d:16:fb:ba:3e:f9:d4:58:dd:6d:c0: + 18:a2:9e:f9:82:3f:7f:e9:de:f0:2d:a1:2a:b2:5e: + 38:15:73:15:80:ad:63:13:6b:96:4a:8e:cf:6c:f2: + 44:7b:7e:52:c6:53:1d:bc:b3:f5:1e:dd:ec:b7:19: + a0:eb + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 97:9F:F1:88:19:93:DC:19:55:06:EB:83:28:9D:18:F0:1E:50:99:EB + X509v3 Authority Key Identifier: + keyid:97:9F:F1:88:19:93:DC:19:55:06:EB:83:28:9D:18:F0:1E:50:99:EB + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 24:16:e4:a2:3a:5f:d6:97:f2:b9:26:a9:03:97:85:12:bb:02: + 22:b5:82:30:14:58:a4:c1:45:37:64:a4:8e:05:e0:cf:33:d7: + d7:74:f7:ca:ea:e9:19:c8:15:d9:b0:d4:25:d5:45:a8:bb:ff: + 7e:e6:9a:d2:9f:d2:a8:7d:ac:04:e7:ab:ed:76:0c:f1:e1:ee: + 13:03:6b:71:13:c3:e9:2e:28:aa:b2:4b:0e:7b:ec:b4:d9:bb: + 47:94:3a:25:b8:df:43:26:4b:b5:ba:7a:2f:3f:33:3f:f0:7f: + 8f:86:50:5a:95:1a:ed:84:f2:cf:84:f3:2b:e6:a6:bf:92:b3: + 80:5e:bc:7a:f0:f3:b4:00:2f:ea:2b:22:b4:2a:ea:b5:bb:b2: + 68:69:76:65:94:da:89:44:36:fa:83:81:00:af:d6:9b:e5:ec: + 77:1d:db:3a:91:17:2c:ba:4f:2e:0b:4a:d5:bb:c5:79:7d:1c: + 35:9b:fc:34:88:5d:a6:f7:bc:79:30:f2:05:27:3b:6f:ca:f8: + 18:90:15:91:12:9a:d6:56:ac:93:83:1e:28:7f:2b:25:dc:2b: + d1:2c:96:8b:60:53:a5:40:21:89:71:15:fe:2d:4c:74:2e:5c: + c9:4d:f0:3e:83:c6:54:71:86:a5:9b:6c:37:4b:1a:fe:f7:e7: + 46:02:0f:f5 +-----BEGIN CERTIFICATE----- +MIIDZTCCAk2gAwIBAgIBBzANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE4MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJucc5NiBFyvlO9/dKyN +ltRQih8I6zosCG5TKnm37gMxQw1m0q/uWWy8BkIizTlJYhNR3ZT9fwPUVQ/jgt31 +Py9LATji0jHj2tmwjsQ5YordWmgOXGWA5XTno1q3I+ucJmuCUE5J8ioVQQz4A3oz +krbh0N4cxAh0TdzjgqsLTu8yx7uzRTA72R5v62yax+SdvgcJ60Mgp7BomSFFgNOQ +ceqHU+Egme+EOPVxCkKjMLLYb6uHrJp8AbaKPMHBYiV3flHxT4iSsT0W+7o++dRY +3W3AGKKe+YI/f+ne8C2hKrJeOBVzFYCtYxNrlkqOz2zyRHt+UsZTHbyz9R7d7LcZ +oOsCAwEAAaOByzCByDAdBgNVHQ4EFgQUl5/xiBmT3BlVBuuDKJ0Y8B5QmeswHwYD +VR0jBBgwFoAUl5/xiBmT3BlVBuuDKJ0Y8B5QmeswNwYIKwYBBQUHAQEEKzApMCcG +CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw +IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAkFuSiOl/W +l/K5JqkDl4USuwIitYIwFFikwUU3ZKSOBeDPM9fXdPfK6ukZyBXZsNQl1UWou/9+ +5prSn9KofawE56vtdgzx4e4TA2txE8PpLiiqsksOe+y02btHlDoluN9DJku1unov +PzM/8H+PhlBalRrthPLPhPMr5qa/krOAXrx68PO0AC/qKyK0Kuq1u7JoaXZllNqJ +RDb6g4EAr9ab5ex3Hds6kRcsuk8uC0rVu8V5fRw1m/w0iF2m97x5MPIFJztvyvgY +kBWREprWVqyTgx4ofysl3CvRLJaLYFOlQCGJcRX+LUx0LlzJTfA+g8ZUcYalm2w3 +Sxr+9+dGAg/1 +-----END CERTIFICATE-----
diff --git a/components/test/data/cast_certificate/certificates/policies_ica_audioonly_leaf_none.pem b/components/test/data/cast_certificate/certificates/policies_ica_audioonly_leaf_none.pem new file mode 100644 index 0000000..836125d --- /dev/null +++ b/components/test/data/cast_certificate/certificates/policies_ica_audioonly_leaf_none.pem
@@ -0,0 +1,277 @@ +[Created by: generate_policies_tests.py] + +Cast certificate chain with the following policies: + + Root: policies={} + Intermediate: policies={audioOnly} + Leaf: policies={} + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Intermediate + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Leaf + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:97:f2:23:a5:ed:d0:98:d4:07:da:46:ef:ae:58: + 2b:4b:fb:3c:2c:41:a6:20:45:19:c4:61:3f:47:a4: + db:cf:16:73:25:56:fd:3d:db:02:60:3a:a6:7d:05: + 76:e9:4e:ca:51:64:78:58:82:55:42:43:92:e7:85: + e7:4f:cc:5e:92:fd:7a:bd:ea:ef:5f:33:33:44:6f: + 29:a5:e4:51:b1:57:ba:51:cc:b4:da:d9:99:24:5d: + 82:c7:88:b0:7c:97:f6:0a:3c:d1:14:a9:91:cc:b7: + 1b:14:98:b6:cc:c8:c8:e7:39:c7:bd:05:31:23:d2: + 95:17:61:c8:b7:8e:2d:70:84:3d:63:11:bb:d4:d5: + 92:e0:49:70:f1:2b:75:d6:a5:29:20:0f:02:ba:8f: + d3:cc:61:0b:7a:fa:bc:6c:be:4e:a0:39:ee:b4:e5: + 07:90:b7:77:98:96:95:45:38:b3:a5:c4:c3:97:ee: + ee:70:c7:78:be:b7:50:ba:62:00:2f:a6:9e:1a:9b: + 50:d6:08:fd:fe:b9:e0:85:ac:e7:91:ef:a9:41:a0: + 62:35:c4:8b:c0:78:59:6e:a8:a7:54:10:88:ed:28: + c9:19:9b:b0:4b:67:c1:42:ec:a3:5d:8b:bd:47:fd: + 9d:2c:ad:81:5c:2f:82:13:c4:cf:84:b4:64:ef:e9: + ef:7d + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 86:39:F7:45:1C:19:7F:C1:8D:93:B7:C6:18:53:8E:CD:82:EA:78:8A + X509v3 Authority Key Identifier: + keyid:05:83:C2:37:26:DF:09:D8:02:81:82:DF:E5:5C:1C:FC:EB:A2:36:22 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Intermediate.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Intermediate.crl + + X509v3 Key Usage: critical + Digital Signature, Key Encipherment + X509v3 Extended Key Usage: + TLS Web Client Authentication + Signature Algorithm: sha256WithRSAEncryption + 47:fd:b0:3b:f6:57:43:83:51:b5:c1:d2:fe:fa:b3:ee:54:6e: + 32:10:ce:da:18:be:2f:57:11:44:7e:5d:e8:09:54:dc:44:5b: + fd:17:ce:7f:97:64:1d:f8:32:61:33:55:2f:05:37:b8:35:49: + bf:41:9e:5a:0f:29:76:e2:f2:c6:f2:5a:9e:87:b9:2e:cd:ad: + 84:6b:8d:b9:71:df:a6:dc:32:36:69:25:29:8e:11:77:83:a8: + d6:aa:e5:18:89:ab:15:eb:0c:cd:24:56:6d:81:ed:08:ee:f3: + 57:59:97:41:74:3e:31:7d:ab:b1:32:bb:95:ae:1f:8a:83:60: + a4:3d:72:0e:c1:28:05:7e:4b:2e:37:64:36:f5:00:b8:50:6b: + 66:3f:23:b5:c6:1a:07:b6:c6:fa:44:69:f5:36:0a:3c:d0:16: + 00:db:4d:92:da:a6:27:89:25:df:9e:c9:48:9d:dd:10:d9:4e: + 2b:7a:cb:61:5d:32:3a:64:a8:8f:29:eb:19:68:0b:de:b5:3b: + e9:76:49:7d:93:c3:6e:75:b8:cf:ca:af:6e:37:1b:38:e4:c3: + e8:41:4f:99:dd:af:c0:4e:96:aa:50:70:95:a9:1a:cc:ef:43: + b7:08:f0:e9:0b:a7:d8:21:36:ba:98:ea:4f:db:3e:aa:4c:92: + 84:36:cd:1e +-----BEGIN CERTIFICATE----- +MIIDgTCCAmmgAwIBAgIBATANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTgwMTAxMTIwMDAwWjAPMQ0wCwYD +VQQDDARMZWFmMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAl/Ijpe3Q +mNQH2kbvrlgrS/s8LEGmIEUZxGE/R6TbzxZzJVb9PdsCYDqmfQV26U7KUWR4WIJV +QkOS54XnT8xekv16vervXzMzRG8ppeRRsVe6Ucy02tmZJF2Cx4iwfJf2CjzRFKmR +zLcbFJi2zMjI5znHvQUxI9KVF2HIt44tcIQ9YxG71NWS4Elw8St11qUpIA8Cuo/T +zGELevq8bL5OoDnutOUHkLd3mJaVRTizpcTDl+7ucMd4vrdQumIAL6aeGptQ1gj9 +/rnghaznke+pQaBiNcSLwHhZbqinVBCI7SjJGZuwS2fBQuyjXYu9R/2dLK2BXC+C +E8TPhLRk7+nvfQIDAQABo4HfMIHcMB0GA1UdDgQWBBSGOfdFHBl/wY2Tt8YYU47N +gup4ijAfBgNVHSMEGDAWgBQFg8I3Jt8J2AKBgt/lXBz866I2IjA/BggrBgEFBQcB +AQQzMDEwLwYIKwYBBQUHMAKGI2h0dHA6Ly91cmwtZm9yLWFpYS9JbnRlcm1lZGlh +dGUuY2VyMDQGA1UdHwQtMCswKaAnoCWGI2h0dHA6Ly91cmwtZm9yLWNybC9JbnRl +cm1lZGlhdGUuY3JsMA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcD +AjANBgkqhkiG9w0BAQsFAAOCAQEAR/2wO/ZXQ4NRtcHS/vqz7lRuMhDO2hi+L1cR +RH5d6AlU3ERb/RfOf5dkHfgyYTNVLwU3uDVJv0GeWg8pduLyxvJanoe5Ls2thGuN +uXHfptwyNmklKY4Rd4Oo1qrlGImrFesMzSRWbYHtCO7zV1mXQXQ+MX2rsTK7la4f +ioNgpD1yDsEoBX5LLjdkNvUAuFBrZj8jtcYaB7bG+kRp9TYKPNAWANtNktqmJ4kl +357JSJ3dENlOK3rLYV0yOmSojynrGWgL3rU76XZJfZPDbnW4z8qvbjcbOOTD6EFP +md2vwE6WqlBwlakazO9Dtwjw6Qun2CE2upjqT9s+qkyShDbNHg== +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 2 (0x2) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Intermediate + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:c5:f5:38:66:89:22:6a:2f:55:0b:c5:a1:bc:72: + 98:d9:66:94:3f:12:5c:a2:ec:6f:d1:5f:79:68:a2: + 3e:14:fd:b6:75:20:c6:ba:15:69:e4:10:8c:9e:fa: + bf:56:02:1b:c9:6b:f1:a2:d6:f1:cf:32:1e:37:db: + ae:a1:bd:af:57:b3:7a:de:52:44:46:d8:e5:34:41: + 51:55:87:4a:15:b1:a8:4e:ba:48:38:4f:41:b0:ae: + ef:c8:35:a1:ce:9f:2b:a0:84:89:a7:32:62:2e:85: + 66:90:a5:ba:e3:4f:4a:87:1c:4e:b1:59:1c:82:ce: + cd:32:f8:9c:3a:9e:79:32:88:f7:18:ea:7e:d0:f9: + 75:d1:b2:6c:bf:0c:7b:eb:52:80:2c:c0:0d:93:2d: + a5:45:5f:3d:3c:f2:9b:8a:a5:67:b0:bb:af:8d:1b: + f9:a3:57:55:f9:de:02:a9:4d:27:6d:ae:ff:65:04: + ce:22:2e:44:8f:3a:dd:e6:ee:07:a4:78:6f:a0:1e: + a8:f0:c1:35:bb:eb:6c:33:65:32:a8:e6:c9:38:8a: + cb:63:03:35:00:93:68:3f:2f:fc:f7:3e:2c:9d:4c: + 42:53:c4:49:8f:fe:2a:48:94:09:f5:dd:cd:bd:0e: + 44:21:6d:52:81:20:f4:f6:92:78:98:fd:4b:50:79: + 5e:7d + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 05:83:C2:37:26:DF:09:D8:02:81:82:DF:E5:5C:1C:FC:EB:A2:36:22 + X509v3 Authority Key Identifier: + keyid:3E:D6:2F:0D:F6:31:B3:AD:E0:AA:1D:00:88:8E:39:FB:C3:E4:BC:BA + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Certificate Policies: + Policy: 1.3.6.1.4.1.11129.2.5.2 + + Signature Algorithm: sha256WithRSAEncryption + 92:2c:74:a2:94:0e:a8:cc:ca:17:ab:1f:c1:35:97:45:2f:63: + 6c:a7:d7:6a:a6:5a:8d:d0:1d:d5:9f:35:9d:bb:10:ba:b2:2f: + c7:41:95:7c:ac:f7:12:3d:8e:6e:af:c5:f6:ff:c0:34:7b:b3: + d0:c8:f4:ba:3d:c1:72:9c:90:10:73:de:bf:9c:50:fe:a3:a5: + 1f:93:15:4b:30:a4:ae:6c:76:ac:7c:d2:94:45:0b:05:8a:ef: + f8:b3:a1:1e:e0:ca:ca:b6:3b:1f:11:a5:64:b7:d4:bd:67:7e: + da:2d:84:f5:ba:e9:42:da:49:cb:1e:b7:51:e6:12:1b:f2:1c: + 8e:79:10:f4:00:fd:8d:e4:26:75:0b:85:6a:48:74:f1:e6:cf: + b2:92:f2:ad:df:da:b9:3c:32:70:e6:b0:16:12:bd:bf:64:45: + a7:43:8d:47:1c:f9:13:04:6f:57:f8:72:d2:68:e9:f0:c7:1e: + c8:d9:b2:05:fd:aa:36:85:f9:2c:09:43:b4:8a:14:ee:7f:82: + f3:47:67:0a:bb:7e:a1:13:6f:38:54:88:5e:87:e3:79:ee:f0: + c4:3f:76:96:5e:1d:d0:c7:4a:23:3d:d2:d6:bd:b9:ce:fb:5f: + 69:92:e3:c9:b8:4a:be:75:32:e4:f6:61:0a:38:65:16:28:59: + 48:94:5d:58 +-----BEGIN CERTIFICATE----- +MIIDhjCCAm6gAwIBAgIBAjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE4MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxfU4Zoki +ai9VC8WhvHKY2WaUPxJcouxv0V95aKI+FP22dSDGuhVp5BCMnvq/VgIbyWvxotbx +zzIeN9uuob2vV7N63lJERtjlNEFRVYdKFbGoTrpIOE9BsK7vyDWhzp8roISJpzJi +LoVmkKW6409KhxxOsVkcgs7NMvicOp55Moj3GOp+0Pl10bJsvwx761KALMANky2l +RV89PPKbiqVnsLuvjRv5o1dV+d4CqU0nba7/ZQTOIi5Ejzrd5u4HpHhvoB6o8ME1 +u+tsM2UyqObJOIrLYwM1AJNoPy/89z4snUxCU8RJj/4qSJQJ9d3NvQ5EIW1SgSD0 +9pJ4mP1LUHlefQIDAQABo4HkMIHhMB0GA1UdDgQWBBQFg8I3Jt8J2AKBgt/lXBz8 +66I2IjAfBgNVHSMEGDAWgBQ+1i8N9jGzreCqHQCIjjn7w+S8ujA3BggrBgEFBQcB +AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs +BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD +VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wFwYDVR0gBBAwDjAMBgorBgEE +AdZ5AgUCMA0GCSqGSIb3DQEBCwUAA4IBAQCSLHSilA6ozMoXqx/BNZdFL2Nsp9dq +plqN0B3VnzWduxC6si/HQZV8rPcSPY5ur8X2/8A0e7PQyPS6PcFynJAQc96/nFD+ +o6UfkxVLMKSubHasfNKURQsFiu/4s6Ee4MrKtjsfEaVkt9S9Z37aLYT1uulC2knL +HrdR5hIb8hyOeRD0AP2N5CZ1C4VqSHTx5s+ykvKt39q5PDJw5rAWEr2/ZEWnQ41H +HPkTBG9X+HLSaOnwxx7I2bIF/ao2hfksCUO0ihTuf4LzR2cKu36hE284VIheh+N5 +7vDEP3aWXh3Qx0ojPdLWvbnO+19pkuPJuEq+dTLk9mEKOGUWKFlIlF1Y +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:de:b7:b7:b9:aa:ed:10:09:6d:50:62:43:51:cf: + e6:d8:4f:84:6c:98:1b:4d:a8:85:f0:d9:ae:db:4e: + 7d:c8:8d:1c:48:eb:24:7e:66:0d:9b:54:15:12:5c: + 07:e3:7a:db:4a:4a:8a:62:6b:71:8e:bc:55:0b:3f: + 9b:60:a3:15:6a:1f:2f:49:cc:2b:09:a3:1a:1f:4b: + 86:e1:82:5f:78:3e:e7:1e:84:42:1b:e1:fc:0c:f6: + 47:92:29:74:e8:49:c8:33:ee:25:ba:36:5a:8c:34: + ba:e4:07:a0:a4:eb:fb:cd:ab:ae:d4:d6:51:a1:63: + fb:e7:f3:03:c0:1b:8b:9b:a0:2a:9f:f6:ac:58:ef: + 3c:9d:58:42:b9:53:66:06:90:1d:0c:30:5d:db:f5: + 2d:13:da:ce:09:05:2d:d4:65:9b:c0:f8:37:07:95: + d4:fc:fc:a6:a0:cf:8f:77:b8:06:0f:22:5e:12:10: + 96:58:64:f1:d9:1a:9d:9e:16:47:3b:ce:dd:8f:8f: + 6e:06:23:1c:52:10:f1:3e:e6:4d:a8:40:fc:17:5f: + fa:9f:d9:1f:81:40:39:4f:8b:f3:74:ba:b5:07:b0: + fc:2d:ef:58:d2:db:3f:1f:04:b7:7c:d6:80:5c:59: + 4b:29:74:d8:5f:99:8e:f0:bc:c1:20:2c:34:24:eb: + be:e9 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 3E:D6:2F:0D:F6:31:B3:AD:E0:AA:1D:00:88:8E:39:FB:C3:E4:BC:BA + X509v3 Authority Key Identifier: + keyid:3E:D6:2F:0D:F6:31:B3:AD:E0:AA:1D:00:88:8E:39:FB:C3:E4:BC:BA + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 51:75:c8:11:3e:1f:f6:8f:29:97:5a:ef:41:d3:60:7c:61:41: + 4f:03:1a:17:db:92:a3:fd:72:11:05:c7:6a:5f:a7:30:76:41: + dd:b4:f0:f9:30:ab:d9:3f:6c:3e:2a:63:45:a9:7f:32:aa:05: + 0b:0f:c1:84:57:c9:0b:4e:f8:86:7e:c9:cc:e9:52:83:a2:c0: + 73:c1:06:f8:eb:af:0a:a9:8e:6a:12:77:f9:e3:77:f0:a8:fa: + fb:af:76:4e:c4:5a:e6:60:c6:8b:24:10:4f:5e:07:d4:4e:4d: + 78:c6:9b:5d:40:ef:a5:c3:2e:3b:1d:f6:1b:98:3c:d2:ed:ba: + 47:d6:11:af:f0:21:65:a3:72:f8:ce:29:5f:f4:e7:bc:2b:0a: + fe:d8:c3:76:28:73:67:5d:dd:9c:2c:7a:d7:f6:1b:c6:c3:10: + 10:9d:34:8e:bd:00:46:9e:9d:41:64:23:36:ed:b6:d0:29:2b: + 88:cc:9d:66:20:9f:14:d1:13:6c:9b:9f:84:04:c5:8c:e3:50: + 0c:2c:f5:2e:5c:e7:a2:74:b2:8a:ee:ae:2f:d0:c8:18:43:2d: + ad:3e:cb:f6:ad:9c:ab:27:ba:b3:15:82:03:e6:ee:69:0a:cb: + 01:4f:fb:54:b3:e0:75:d5:10:ad:7d:c5:f8:84:4a:d8:88:85: + 7a:20:0d:a6 +-----BEGIN CERTIFICATE----- +MIIDZTCCAk2gAwIBAgIBATANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE4MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN63t7mq7RAJbVBiQ1HP +5thPhGyYG02ohfDZrttOfciNHEjrJH5mDZtUFRJcB+N620pKimJrcY68VQs/m2Cj +FWofL0nMKwmjGh9LhuGCX3g+5x6EQhvh/Az2R5IpdOhJyDPuJbo2Wow0uuQHoKTr ++82rrtTWUaFj++fzA8Abi5ugKp/2rFjvPJ1YQrlTZgaQHQwwXdv1LRPazgkFLdRl +m8D4NweV1Pz8pqDPj3e4Bg8iXhIQllhk8dkanZ4WRzvO3Y+PbgYjHFIQ8T7mTahA +/Bdf+p/ZH4FAOU+L83S6tQew/C3vWNLbPx8Et3zWgFxZSyl02F+ZjvC8wSAsNCTr +vukCAwEAAaOByzCByDAdBgNVHQ4EFgQUPtYvDfYxs63gqh0AiI45+8PkvLowHwYD +VR0jBBgwFoAUPtYvDfYxs63gqh0AiI45+8PkvLowNwYIKwYBBQUHAQEEKzApMCcG +CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw +IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBRdcgRPh/2 +jymXWu9B02B8YUFPAxoX25Kj/XIRBcdqX6cwdkHdtPD5MKvZP2w+KmNFqX8yqgUL +D8GEV8kLTviGfsnM6VKDosBzwQb4668KqY5qEnf543fwqPr7r3ZOxFrmYMaLJBBP +XgfUTk14xptdQO+lwy47HfYbmDzS7bpH1hGv8CFlo3L4zilf9Oe8Kwr+2MN2KHNn +Xd2cLHrX9hvGwxAQnTSOvQBGnp1BZCM27bbQKSuIzJ1mIJ8U0RNsm5+EBMWM41AM +LPUuXOeidLKK7q4v0MgYQy2tPsv2rZyrJ7qzFYID5u5pCssBT/tUs+B11RCtfcX4 +hErYiIV6IA2m +-----END CERTIFICATE-----
diff --git a/components/test/data/cast_certificate/certificates/policies_ica_none_leaf_anypolicy.pem b/components/test/data/cast_certificate/certificates/policies_ica_none_leaf_anypolicy.pem new file mode 100644 index 0000000..6d5208d --- /dev/null +++ b/components/test/data/cast_certificate/certificates/policies_ica_none_leaf_anypolicy.pem
@@ -0,0 +1,278 @@ +[Created by: generate_policies_tests.py] + +Cast certificate chain with the following policies: + + Root: policies={} + Intermediate: policies={} + Leaf: policies={anyPolicy} + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 7 (0x7) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Intermediate + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Leaf + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:cf:15:82:72:db:54:3a:13:1f:6a:ec:55:74:fd: + c5:29:b8:33:8b:0e:f9:ab:33:6a:e7:46:e2:5c:96: + 2f:4d:50:42:a6:dc:2e:55:d3:61:01:6b:c4:a8:8d: + ab:05:79:e9:42:28:8a:5a:c2:47:29:9b:99:9a:ab: + f8:64:35:75:9b:a0:8e:ce:1e:f5:b2:47:ee:90:23: + 12:29:e9:4b:1b:1a:59:34:e3:ba:38:7a:83:d5:ce: + ce:39:39:78:8d:d1:93:20:4c:0f:60:b5:ac:9a:80: + a5:4c:d8:4e:f0:88:89:1b:d9:7a:63:8f:9b:19:75: + c5:d2:ef:48:6b:79:eb:cf:61:6d:22:a1:b7:3b:40: + 20:d2:ae:f6:48:b2:88:90:40:3f:f2:75:a9:ad:2c: + 76:ab:ca:d8:61:06:93:1c:d4:f5:a4:d8:d9:09:c9: + 1f:0d:ef:26:37:50:ad:cf:a1:a1:89:00:56:7f:92: + cf:6b:ec:0f:76:55:ab:81:55:a7:2e:8f:5e:69:c9: + 23:38:a2:18:61:20:bf:e5:c7:82:4a:d9:d0:77:03: + 35:8a:4d:43:c1:30:f8:67:b5:83:29:8c:df:a8:9d: + 0e:d6:98:64:8f:77:36:13:fc:1d:40:de:3b:3d:4c: + 19:24:cc:07:68:93:36:b5:1a:0c:fc:4e:17:95:6d: + 3a:55 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 69:F1:3A:B2:9E:B9:B5:10:AF:79:90:80:34:9D:B9:BD:1C:B0:90:A6 + X509v3 Authority Key Identifier: + keyid:2F:57:CF:1E:AE:33:BF:E2:E3:98:F4:28:80:63:6B:FF:29:21:8F:76 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Intermediate.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Intermediate.crl + + X509v3 Key Usage: critical + Digital Signature, Key Encipherment + X509v3 Extended Key Usage: + TLS Web Client Authentication + X509v3 Certificate Policies: + Policy: X509v3 Any Policy + + Signature Algorithm: sha256WithRSAEncryption + 22:71:c6:67:ab:c1:d7:29:f4:41:6a:da:54:06:9d:26:f2:10: + cd:04:0d:f5:99:34:3e:08:6a:be:ff:d0:18:10:63:4d:79:46: + b5:28:b4:db:d1:27:4f:79:55:dc:45:30:d9:ba:99:7a:d7:bc: + de:14:1e:73:f2:82:2e:ca:6d:45:e4:98:28:cd:a0:28:e9:86: + 33:93:c6:c4:f0:7a:b9:bf:1d:69:6d:b8:1e:eb:81:85:a6:ad: + d0:c9:af:e2:20:5f:e5:8b:40:7b:61:0c:b8:8c:9e:cc:14:9d: + 0e:c5:e9:13:e3:30:ed:83:d3:ac:ba:cf:3e:04:20:1c:ba:07: + 2d:e7:81:0b:b0:1b:d4:7c:d9:3a:92:5d:54:44:c0:79:b9:d8: + 4f:0f:79:b2:63:ee:2f:ae:2f:00:97:7b:47:92:97:19:dd:25: + 10:a7:5a:40:ec:eb:dc:b5:c8:05:ab:2e:dc:1a:c2:06:fb:90: + b1:88:af:27:56:b5:a1:c0:a8:f5:65:3f:98:bf:0f:16:70:41: + c3:cd:fa:c5:f2:fc:21:2a:25:db:98:1e:1f:ab:a7:b0:a2:7f: + 1a:72:9f:6f:9a:84:81:7d:99:4a:09:13:2f:30:50:fc:98:da: + 0c:c0:fd:bc:7c:84:66:dc:d3:8d:52:73:28:cd:ee:1e:c7:8f: + e5:5d:1c:f7 +-----BEGIN CERTIFICATE----- +MIIDlDCCAnygAwIBAgIBBzANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTgwMTAxMTIwMDAwWjAPMQ0wCwYD +VQQDDARMZWFmMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzxWCcttU +OhMfauxVdP3FKbgziw75qzNq50biXJYvTVBCptwuVdNhAWvEqI2rBXnpQiiKWsJH +KZuZmqv4ZDV1m6COzh71skfukCMSKelLGxpZNOO6OHqD1c7OOTl4jdGTIEwPYLWs +moClTNhO8IiJG9l6Y4+bGXXF0u9Ia3nrz2FtIqG3O0Ag0q72SLKIkEA/8nWprSx2 +q8rYYQaTHNT1pNjZCckfDe8mN1Ctz6GhiQBWf5LPa+wPdlWrgVWnLo9eackjOKIY +YSC/5ceCStnQdwM1ik1DwTD4Z7WDKYzfqJ0O1phkj3c2E/wdQN47PUwZJMwHaJM2 +tRoM/E4XlW06VQIDAQABo4HyMIHvMB0GA1UdDgQWBBRp8Tqynrm1EK95kIA0nbm9 +HLCQpjAfBgNVHSMEGDAWgBQvV88erjO/4uOY9CiAY2v/KSGPdjA/BggrBgEFBQcB +AQQzMDEwLwYIKwYBBQUHMAKGI2h0dHA6Ly91cmwtZm9yLWFpYS9JbnRlcm1lZGlh +dGUuY2VyMDQGA1UdHwQtMCswKaAnoCWGI2h0dHA6Ly91cmwtZm9yLWNybC9JbnRl +cm1lZGlhdGUuY3JsMA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcD +AjARBgNVHSAECjAIMAYGBFUdIAAwDQYJKoZIhvcNAQELBQADggEBACJxxmerwdcp +9EFq2lQGnSbyEM0EDfWZND4Iar7/0BgQY015RrUotNvRJ095VdxFMNm6mXrXvN4U +HnPygi7KbUXkmCjNoCjphjOTxsTwerm/HWltuB7rgYWmrdDJr+IgX+WLQHthDLiM +nswUnQ7F6RPjMO2D06y6zz4EIBy6By3ngQuwG9R82TqSXVREwHm52E8PebJj7i+u +LwCXe0eSlxndJRCnWkDs69y1yAWrLtwawgb7kLGIrydWtaHAqPVlP5i/DxZwQcPN ++sXy/CEqJduYHh+rp7Cifxpyn2+ahIF9mUoJEy8wUPyY2gzA/bx8hGbc041ScyjN +7h7Hj+VdHPc= +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 14 (0xe) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Intermediate + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:dc:65:d8:cd:cf:c3:59:0c:3f:6e:3a:3e:47:36: + 78:2b:84:8d:79:6d:e0:ca:4b:87:6c:48:6c:48:e4: + 55:83:5f:c9:32:65:56:6c:fa:13:67:1d:2b:da:8f: + 01:7e:ea:bd:fa:69:ed:29:9f:28:6a:b4:07:a2:10: + 15:28:46:01:b7:27:5b:3a:61:03:47:6a:fe:d2:71: + e7:aa:b7:f4:a8:29:74:cc:7e:a0:52:c1:f6:fb:81: + 90:77:55:e6:03:8a:d9:d0:e5:5e:31:1b:0d:52:7f: + 2c:4d:2d:37:7c:e9:66:1f:a9:eb:45:9a:e8:bd:a7: + 4d:5d:4a:fe:21:4b:2c:a2:3a:b5:e6:81:fd:fc:d0: + af:96:02:53:1e:b3:07:1c:9b:25:d5:a7:d9:22:6a: + e4:50:4a:86:bf:9b:54:02:04:28:6f:e2:47:c3:f8: + 02:af:ed:10:f3:f5:68:f3:ca:8b:41:85:b3:63:61: + 23:22:79:fa:0a:0f:5e:a0:5c:67:61:9b:12:e7:02: + 2f:63:da:a2:79:e3:94:10:44:2f:bd:78:62:c0:73: + f0:d0:76:ff:a1:8b:2f:be:f3:87:fa:5e:8b:63:5d: + cd:73:42:e3:a1:84:c5:a4:62:37:6f:8a:2c:2a:3d: + 97:5c:0c:00:52:e7:85:b5:a1:f9:39:b0:13:ca:a5: + 12:f3 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 2F:57:CF:1E:AE:33:BF:E2:E3:98:F4:28:80:63:6B:FF:29:21:8F:76 + X509v3 Authority Key Identifier: + keyid:E4:A1:AC:CB:CC:C3:AD:20:0C:B2:59:77:33:E0:71:96:CC:C3:13:75 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 9b:ee:65:41:e3:21:87:17:8e:50:68:34:5e:07:9e:bf:34:eb: + 73:db:d6:f9:a0:86:68:bc:e1:49:3a:81:fd:6b:16:ac:a9:fa: + c5:c9:04:78:3e:4a:00:1d:a9:67:a3:54:2a:40:44:bb:9a:6d: + 0f:e7:2d:97:0e:c3:0a:e9:78:87:90:e3:73:63:53:4e:96:e7: + 07:f0:04:9f:57:c4:7a:54:06:10:db:a9:b6:5e:c6:2e:64:62: + 5d:da:c9:ea:91:56:aa:b2:43:c9:00:6b:60:f8:ab:28:41:59: + 27:24:de:e7:bb:fd:54:49:d5:df:df:c2:b1:1b:ca:a7:37:83: + f6:bc:0e:d6:87:cb:f7:f1:8a:5f:31:a9:32:c8:ca:1c:bd:ab: + b8:0b:13:17:5a:ec:6a:57:7f:db:a6:9d:d8:e1:d5:50:f6:15: + 08:a2:95:6a:1e:c2:ae:8d:b0:72:bb:12:84:2d:ab:10:e0:2f: + af:28:33:64:1f:3d:9b:f3:03:60:8d:58:81:6e:9b:ac:89:c9: + 06:33:06:d5:4a:e6:c3:81:34:47:6d:9b:2d:a0:30:df:f3:a7: + 17:1d:07:29:55:20:97:20:69:5b:25:fe:c4:ff:ff:32:df:41: + a2:bc:6b:85:6d:f3:3a:d4:13:42:81:6c:5e:6b:5f:7f:fc:30: + d1:3a:13:b6 +-----BEGIN CERTIFICATE----- +MIIDbTCCAlWgAwIBAgIBDjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE4MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3GXYzc/D +WQw/bjo+RzZ4K4SNeW3gykuHbEhsSORVg1/JMmVWbPoTZx0r2o8Bfuq9+mntKZ8o +arQHohAVKEYBtydbOmEDR2r+0nHnqrf0qCl0zH6gUsH2+4GQd1XmA4rZ0OVeMRsN +Un8sTS03fOlmH6nrRZrovadNXUr+IUssojq15oH9/NCvlgJTHrMHHJsl1afZImrk +UEqGv5tUAgQob+JHw/gCr+0Q8/Vo88qLQYWzY2EjInn6Cg9eoFxnYZsS5wIvY9qi +eeOUEEQvvXhiwHPw0Hb/oYsvvvOH+l6LY13Nc0LjoYTFpGI3b4osKj2XXAwAUueF +taH5ObATyqUS8wIDAQABo4HLMIHIMB0GA1UdDgQWBBQvV88erjO/4uOY9CiAY2v/ +KSGPdjAfBgNVHSMEGDAWgBTkoazLzMOtIAyyWXcz4HGWzMMTdTA3BggrBgEFBQcB +AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs +BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD +VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB +AJvuZUHjIYcXjlBoNF4Hnr8063Pb1vmghmi84Uk6gf1rFqyp+sXJBHg+SgAdqWej +VCpARLuabQ/nLZcOwwrpeIeQ43NjU06W5wfwBJ9XxHpUBhDbqbZexi5kYl3ayeqR +VqqyQ8kAa2D4qyhBWSck3ue7/VRJ1d/fwrEbyqc3g/a8DtaHy/fxil8xqTLIyhy9 +q7gLExda7GpXf9umndjh1VD2FQiilWoewq6NsHK7EoQtqxDgL68oM2QfPZvzA2CN +WIFum6yJyQYzBtVK5sOBNEdtmy2gMN/zpxcdBylVIJcgaVsl/sT//zLfQaK8a4Vt +8zrUE0KBbF5rX3/8MNE6E7Y= +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 13 (0xd) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:df:14:ae:c9:18:37:0f:37:56:f3:f0:a6:cf:84: + 38:c2:48:88:e4:49:a5:db:0d:29:1c:71:e4:9b:2b: + 1b:23:c4:2f:2e:4a:02:c7:f7:d7:84:e5:67:f5:ab: + b2:99:49:65:82:96:70:3d:35:33:9b:da:77:4f:e0: + 02:01:dd:cb:a3:0f:1b:e4:48:6b:f1:d9:14:97:3d: + b5:b7:a7:29:6f:ce:74:47:73:df:23:3e:40:6f:01: + 4f:6e:d3:bd:0d:23:be:94:bd:e3:a0:34:1f:8c:3a: + 80:eb:98:4a:fa:2a:00:ee:0d:da:fb:f6:69:c1:73: + cc:0f:c0:23:c6:6f:1e:af:4c:d5:42:79:00:66:19: + ae:4b:c0:ed:52:a3:bf:40:4c:98:ec:92:97:d8:af: + d9:e7:47:8a:23:f7:76:b6:43:a7:bd:ee:4d:3a:4c: + 6f:1d:1b:2a:aa:c0:39:3a:e2:b5:27:dc:58:d9:b6: + 60:c5:84:77:9d:66:da:76:d3:12:de:93:37:c5:b8: + aa:dc:39:3a:2d:be:65:45:de:d9:eb:e0:0c:53:51: + ee:0b:96:9b:72:21:eb:53:5c:3b:3b:82:d8:2f:10: + 56:04:c3:12:73:f7:72:d3:30:50:ee:1d:99:6b:02: + 39:40:a1:36:fd:27:5d:f4:82:19:21:3c:68:54:e7: + d1:19 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + E4:A1:AC:CB:CC:C3:AD:20:0C:B2:59:77:33:E0:71:96:CC:C3:13:75 + X509v3 Authority Key Identifier: + keyid:E4:A1:AC:CB:CC:C3:AD:20:0C:B2:59:77:33:E0:71:96:CC:C3:13:75 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 7e:6f:b9:38:cc:e4:f7:f5:2b:de:1e:b4:1c:46:71:0e:f0:e0: + 2b:88:cd:e2:fe:d5:de:ec:87:c4:f2:fc:32:71:6d:f5:eb:f3: + 26:70:ae:48:45:6e:a6:8b:30:38:d1:30:8a:36:d8:27:6e:83: + f4:f2:96:68:db:d6:36:c7:ed:d7:d1:13:04:bf:5a:1c:8b:70: + 3e:fd:ca:50:ac:a6:21:0f:22:61:78:d8:5d:46:7e:48:ca:23: + 24:06:5e:91:09:cf:ef:0e:15:4c:c9:4a:83:b4:a7:c0:1b:93: + 9b:2a:a9:4d:3c:ad:49:b2:7c:6b:f3:b1:be:63:d2:80:c8:86: + 28:6f:87:f3:84:d2:c7:37:26:8b:f5:8c:93:89:8b:9a:32:bb: + e9:b6:50:b8:f2:8c:b8:06:f6:32:ee:2d:d4:d2:c8:bc:6d:8e: + ba:02:94:f7:68:c1:c5:6f:01:68:e3:14:31:2e:f8:90:6f:91: + 36:2e:ce:3d:3b:e3:f4:90:f8:7d:ac:b6:a2:ab:d2:ea:e1:24: + 67:25:4e:c0:65:d0:13:df:97:a6:02:b9:67:80:2d:4e:3d:da: + bc:d4:e5:53:9a:d2:91:48:33:47:d8:c4:e9:d0:8f:18:85:76: + df:d6:c0:92:90:8c:de:9e:7b:cc:1d:1c:3e:d3:c3:4b:be:e8: + e0:2c:3d:2b +-----BEGIN CERTIFICATE----- +MIIDZTCCAk2gAwIBAgIBDTANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE4MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN8UrskYNw83VvPwps+E +OMJIiORJpdsNKRxx5JsrGyPELy5KAsf314TlZ/WrsplJZYKWcD01M5vad0/gAgHd +y6MPG+RIa/HZFJc9tbenKW/OdEdz3yM+QG8BT27TvQ0jvpS946A0H4w6gOuYSvoq +AO4N2vv2acFzzA/AI8ZvHq9M1UJ5AGYZrkvA7VKjv0BMmOySl9iv2edHiiP3drZD +p73uTTpMbx0bKqrAOTritSfcWNm2YMWEd51m2nbTEt6TN8W4qtw5Oi2+ZUXe2evg +DFNR7guWm3Ih61NcOzuC2C8QVgTDEnP3ctMwUO4dmWsCOUChNv0nXfSCGSE8aFTn +0RkCAwEAAaOByzCByDAdBgNVHQ4EFgQU5KGsy8zDrSAMsll3M+BxlszDE3UwHwYD +VR0jBBgwFoAU5KGsy8zDrSAMsll3M+BxlszDE3UwNwYIKwYBBQUHAQEEKzApMCcG +CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw +IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQB+b7k4zOT3 +9SveHrQcRnEO8OAriM3i/tXe7IfE8vwycW316/MmcK5IRW6mizA40TCKNtgnboP0 +8pZo29Y2x+3X0RMEv1oci3A+/cpQrKYhDyJheNhdRn5IyiMkBl6RCc/vDhVMyUqD +tKfAG5ObKqlNPK1Jsnxr87G+Y9KAyIYob4fzhNLHNyaL9YyTiYuaMrvptlC48oy4 +BvYy7i3U0si8bY66ApT3aMHFbwFo4xQxLviQb5E2Ls49O+P0kPh9rLaiq9Lq4SRn +JU7AZdAT35emArlngC1OPdq81OVTmtKRSDNH2MTp0I8YhXbf1sCSkIzennvMHRw+ +08NLvujgLD0r +-----END CERTIFICATE-----
diff --git a/components/test/data/cast_certificate/certificates/policies_ica_none_leaf_audioonly.pem b/components/test/data/cast_certificate/certificates/policies_ica_none_leaf_audioonly.pem new file mode 100644 index 0000000..dd65056 --- /dev/null +++ b/components/test/data/cast_certificate/certificates/policies_ica_none_leaf_audioonly.pem
@@ -0,0 +1,278 @@ +[Created by: generate_policies_tests.py] + +Cast certificate chain with the following policies: + + Root: policies={} + Intermediate: policies={} + Leaf: policies={audioOnly} + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 6 (0x6) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Intermediate + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Leaf + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:ce:cf:14:1b:85:8a:fe:37:1a:11:aa:1b:4e:00: + f4:87:22:32:a2:69:45:94:a5:69:c3:06:ea:49:cf: + 1c:a3:37:70:e7:99:11:b6:cc:16:fa:ca:e7:a6:24: + 9e:1d:fb:29:08:87:3c:df:38:4d:86:c5:56:62:dc: + 47:8a:ba:89:93:97:08:3d:37:91:88:41:1c:c4:37: + 8f:c0:b5:90:2e:3d:67:8c:ea:49:30:c1:89:8e:7c: + 7e:a6:4a:9c:b7:66:6a:f3:fc:f4:00:ec:ca:52:d3: + 59:b3:ac:ef:d5:8b:71:1b:d0:4c:35:0c:ff:df:d8: + 7d:12:d6:98:78:08:02:49:2f:dc:ce:f2:1d:42:49: + b6:2c:9b:71:8e:c0:b6:61:a2:d7:5b:91:6d:36:1e: + 7d:9d:02:6e:b2:07:01:b1:33:13:a1:04:c9:1d:34: + 86:6a:2f:9f:37:7b:2e:51:03:3a:44:48:d3:a2:cf: + 91:de:62:84:a1:e7:8c:8d:cb:bf:ef:ef:50:81:a1: + 0b:19:ac:6b:91:a1:a0:d9:f9:a0:fb:b4:38:fb:99: + 84:ce:3f:61:0c:0f:5d:1f:63:3e:25:d2:75:35:af: + af:96:c8:94:a3:de:3f:0a:1d:1f:e0:6f:c8:8d:8a: + d6:f7:71:27:c2:15:ad:8c:d8:89:23:72:61:22:51: + 23:05 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + FC:0C:BC:60:61:F0:88:F1:90:76:19:33:F5:69:D3:B9:B3:4A:1B:C4 + X509v3 Authority Key Identifier: + keyid:2B:C4:DA:B5:A0:44:1C:31:AA:B3:55:36:E2:8B:DE:4A:47:67:81:40 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Intermediate.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Intermediate.crl + + X509v3 Key Usage: critical + Digital Signature, Key Encipherment + X509v3 Extended Key Usage: + TLS Web Client Authentication + X509v3 Certificate Policies: + Policy: 1.3.6.1.4.1.11129.2.5.2 + + Signature Algorithm: sha256WithRSAEncryption + 1f:da:82:97:e6:d1:3e:8a:15:f9:7f:eb:3f:2f:0b:e4:df:34: + fe:ad:97:3f:ed:12:61:20:ac:4d:09:d5:5e:d6:b2:b3:43:d7: + 24:76:49:c3:e8:15:e5:6a:7d:a8:e0:ee:06:96:73:42:75:e2: + d7:d3:87:e9:d7:c2:e0:cc:7c:38:81:75:fc:10:62:4f:1e:83: + 5c:4c:76:5d:40:8d:cb:1d:d2:ea:11:b9:13:93:08:98:80:ea: + d1:65:3d:e6:68:a7:5e:fe:24:f0:eb:65:0a:65:3e:39:dc:b1: + 20:52:5e:2e:c2:7f:29:07:9c:97:dd:12:29:da:44:b5:64:6c: + 77:e0:6d:43:3a:d3:bc:19:a2:6e:88:e6:27:4a:66:ba:55:cc: + d7:ab:61:75:f1:80:c1:95:e1:a6:76:1b:7b:7d:b1:fa:14:61: + 0e:21:5c:3c:72:ca:c9:4d:66:f9:d4:4d:8e:73:4f:ad:09:c3: + 60:c7:c6:09:f6:2a:1b:32:cf:e1:62:bd:45:35:ab:80:66:48: + 67:36:e2:94:21:44:b5:1e:6d:b0:99:d8:b7:d3:5a:67:f3:c3: + e4:78:41:64:44:45:cd:72:45:58:c0:fd:56:79:ea:d8:df:72: + 64:c4:2e:fe:e5:ee:93:44:3f:34:2f:70:6e:82:24:71:12:68: + a6:fc:22:f1 +-----BEGIN CERTIFICATE----- +MIIDmjCCAoKgAwIBAgIBBjANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTgwMTAxMTIwMDAwWjAPMQ0wCwYD +VQQDDARMZWFmMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzs8UG4WK +/jcaEaobTgD0hyIyomlFlKVpwwbqSc8cozdw55kRtswW+srnpiSeHfspCIc83zhN +hsVWYtxHirqJk5cIPTeRiEEcxDePwLWQLj1njOpJMMGJjnx+pkqct2Zq8/z0AOzK +UtNZs6zv1YtxG9BMNQz/39h9EtaYeAgCSS/czvIdQkm2LJtxjsC2YaLXW5FtNh59 +nQJusgcBsTMToQTJHTSGai+fN3suUQM6REjTos+R3mKEoeeMjcu/7+9QgaELGaxr +kaGg2fmg+7Q4+5mEzj9hDA9dH2M+JdJ1Na+vlsiUo94/Ch0f4G/IjYrW93EnwhWt +jNiJI3JhIlEjBQIDAQABo4H4MIH1MB0GA1UdDgQWBBT8DLxgYfCI8ZB2GTP1adO5 +s0obxDAfBgNVHSMEGDAWgBQrxNq1oEQcMaqzVTbii95KR2eBQDA/BggrBgEFBQcB +AQQzMDEwLwYIKwYBBQUHMAKGI2h0dHA6Ly91cmwtZm9yLWFpYS9JbnRlcm1lZGlh +dGUuY2VyMDQGA1UdHwQtMCswKaAnoCWGI2h0dHA6Ly91cmwtZm9yLWNybC9JbnRl +cm1lZGlhdGUuY3JsMA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcD +AjAXBgNVHSAEEDAOMAwGCisGAQQB1nkCBQIwDQYJKoZIhvcNAQELBQADggEBAB/a +gpfm0T6KFfl/6z8vC+TfNP6tlz/tEmEgrE0J1V7WsrND1yR2ScPoFeVqfajg7gaW +c0J14tfTh+nXwuDMfDiBdfwQYk8eg1xMdl1Ajcsd0uoRuROTCJiA6tFlPeZop17+ +JPDrZQplPjncsSBSXi7CfykHnJfdEinaRLVkbHfgbUM607wZom6I5idKZrpVzNer +YXXxgMGV4aZ2G3t9sfoUYQ4hXDxyyslNZvnUTY5zT60Jw2DHxgn2Khsyz+FivUU1 +q4BmSGc24pQhRLUebbCZ2LfTWmfzw+R4QWRERc1yRVjA/VZ56tjfcmTELv7l7pNE +PzQvcG6CJHESaKb8IvE= +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 12 (0xc) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Intermediate + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:de:a0:23:b3:bd:d5:d1:c0:14:ed:17:0d:7e:1f: + 72:17:17:6e:29:31:10:57:f9:37:e7:c8:57:0d:0c: + 25:c4:fe:98:90:e1:2d:e8:86:23:27:a0:0e:30:81: + 60:c1:2b:ba:74:29:00:58:71:c6:d6:2c:b3:8f:4b: + 67:c5:a8:7a:5a:8b:28:5b:4e:3b:1b:c9:4e:44:66: + 38:71:ed:37:83:6d:6e:01:0f:a8:a5:42:f8:ea:4f: + 7e:15:01:f5:16:70:d4:d4:95:b2:79:ee:4d:5b:02: + 18:38:ee:2b:17:6b:47:41:6b:08:50:d4:7d:b8:9f: + 5a:01:4f:4b:19:d5:18:70:24:a9:2a:8e:05:a4:af: + 53:a0:43:1d:f0:9e:2c:b2:e0:2c:de:48:66:f3:f8: + 84:3c:fc:a7:a6:b7:cd:6f:33:43:9e:05:64:34:47: + 4d:de:36:17:5b:17:6b:31:80:6f:d0:05:3e:a0:25: + c1:78:36:dc:cb:82:3e:c7:46:a2:31:ba:3c:0b:2a: + cf:bb:c7:54:8a:2c:97:2c:b9:2a:d0:e7:c5:25:38: + 8f:ab:06:67:99:8a:a4:b7:09:38:13:92:d5:b0:fe: + 65:51:7f:65:01:f9:7b:23:86:87:a5:2b:33:c3:b4: + a1:9a:77:e2:f2:cc:a6:5f:fc:2b:f0:d4:c1:0a:9e: + a6:ff + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 2B:C4:DA:B5:A0:44:1C:31:AA:B3:55:36:E2:8B:DE:4A:47:67:81:40 + X509v3 Authority Key Identifier: + keyid:55:BB:79:DB:0A:21:38:5B:B5:81:BD:78:5B:40:BE:D1:83:FD:41:69 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 0a:5e:0d:e7:9f:eb:e9:14:07:d7:94:6e:2e:25:ab:1b:5d:1d: + c8:81:3b:e5:1d:4b:8e:f1:31:05:99:e8:78:c2:d2:e2:24:69: + 3d:54:19:68:4f:9e:d6:eb:34:94:5d:f4:46:e4:40:f7:23:d9: + ca:43:d5:30:30:b9:1c:3a:4a:a8:4f:f5:e9:97:6b:13:ce:20: + 4b:cb:e6:2c:e5:ea:b5:0f:02:9f:32:55:ef:73:a4:ca:75:e5: + 10:04:10:36:b9:00:a1:22:bb:69:01:c3:96:8b:3c:55:f6:75: + 93:1b:d2:e6:9d:3c:ae:e2:56:66:08:eb:5f:bb:be:87:73:5f: + b4:e3:27:77:d9:83:e3:b5:5a:b2:20:c6:7e:23:b5:92:38:b9: + 3c:16:09:2d:dd:00:01:ec:bc:9b:2d:ba:81:a6:88:63:5e:81: + c2:22:bd:ae:43:38:49:89:53:23:a4:c6:02:ca:13:9a:0d:98: + f7:82:2f:23:2f:4d:4b:c0:a4:36:ed:e2:50:06:2d:98:30:78: + e3:35:60:3a:20:a0:be:9d:f4:5d:de:84:8d:6c:f9:4f:c5:e5: + e7:74:8d:8d:dd:2a:61:4f:91:a4:98:07:c2:b3:18:fd:27:3d: + 55:1e:04:89:d7:e6:81:0d:c6:0d:f0:45:c3:b3:b9:f3:69:4d: + 6b:3c:0b:05 +-----BEGIN CERTIFICATE----- +MIIDbTCCAlWgAwIBAgIBDDANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE4MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3qAjs73V +0cAU7RcNfh9yFxduKTEQV/k358hXDQwlxP6YkOEt6IYjJ6AOMIFgwSu6dCkAWHHG +1iyzj0tnxah6WosoW047G8lORGY4ce03g21uAQ+opUL46k9+FQH1FnDU1JWyee5N +WwIYOO4rF2tHQWsIUNR9uJ9aAU9LGdUYcCSpKo4FpK9ToEMd8J4ssuAs3khm8/iE +PPynprfNbzNDngVkNEdN3jYXWxdrMYBv0AU+oCXBeDbcy4I+x0aiMbo8CyrPu8dU +iiyXLLkq0OfFJTiPqwZnmYqktwk4E5LVsP5lUX9lAfl7I4aHpSszw7Shmnfi8sym +X/wr8NTBCp6m/wIDAQABo4HLMIHIMB0GA1UdDgQWBBQrxNq1oEQcMaqzVTbii95K +R2eBQDAfBgNVHSMEGDAWgBRVu3nbCiE4W7WBvXhbQL7Rg/1BaTA3BggrBgEFBQcB +AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs +BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD +VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB +AApeDeef6+kUB9eUbi4lqxtdHciBO+UdS47xMQWZ6HjC0uIkaT1UGWhPntbrNJRd +9EbkQPcj2cpD1TAwuRw6SqhP9emXaxPOIEvL5izl6rUPAp8yVe9zpMp15RAEEDa5 +AKEiu2kBw5aLPFX2dZMb0uadPK7iVmYI61+7vodzX7TjJ3fZg+O1WrIgxn4jtZI4 +uTwWCS3dAAHsvJstuoGmiGNegcIiva5DOEmJUyOkxgLKE5oNmPeCLyMvTUvApDbt +4lAGLZgweOM1YDogoL6d9F3ehI1s+U/F5ed0jY3dKmFPkaSYB8KzGP0nPVUeBInX +5oENxg3wRcOzufNpTWs8CwU= +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 11 (0xb) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:c7:a4:96:f2:24:b8:16:ab:04:c1:cb:e0:f0:94: + 36:75:84:9e:d3:64:35:28:f0:7b:76:09:65:78:1a: + 0f:cf:8c:9b:ac:fe:e2:e9:b8:67:4e:40:17:ec:4e: + 04:69:ce:73:dd:6d:87:06:24:ba:9f:30:1b:e1:57: + 5e:ab:13:a3:5b:b4:2b:05:9e:8b:40:f5:a9:db:41: + 0d:13:6e:f9:61:50:83:ea:f5:21:6d:54:0e:18:66: + 36:a3:5c:48:31:dc:50:b6:c0:78:91:6e:39:11:30: + 90:2e:40:46:33:9d:06:08:a4:4a:29:f7:1c:f4:60: + 80:f3:a7:42:aa:c6:f2:b2:44:f7:b2:29:65:06:bb: + 44:a1:58:86:7b:eb:15:04:b4:14:c7:e6:7d:c4:0a: + 1b:d3:25:c7:80:fc:9d:c5:b6:fd:92:c8:9d:ed:b6: + 94:5a:90:f5:1a:9d:d3:17:8c:09:bc:f0:d1:16:70: + 91:32:d0:b6:73:3e:f3:b2:48:03:65:fd:d4:6f:c4: + f8:6f:73:c5:21:6d:19:6b:c6:ce:b4:6d:3b:3e:a7: + 5f:a0:6b:e3:76:97:62:97:b9:ce:51:8e:c2:ab:4a: + 48:ea:a1:69:f9:e9:8e:1b:46:ee:44:fd:47:4b:c0: + 19:12:74:c7:44:25:97:39:6d:02:f4:41:ec:dc:33: + e4:25 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 55:BB:79:DB:0A:21:38:5B:B5:81:BD:78:5B:40:BE:D1:83:FD:41:69 + X509v3 Authority Key Identifier: + keyid:55:BB:79:DB:0A:21:38:5B:B5:81:BD:78:5B:40:BE:D1:83:FD:41:69 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 03:dd:b9:22:de:fd:99:74:25:a7:9d:8d:f4:36:2f:23:1b:8f: + 97:d9:c2:28:53:38:3a:78:43:b0:ed:eb:a8:14:f7:39:cc:52: + cd:f8:3d:04:4a:43:9f:c9:35:32:ae:9b:5b:66:9c:54:db:d8: + ed:51:b3:09:33:0f:23:31:4b:2c:0b:04:75:05:e8:a7:e7:cb: + f9:44:55:8f:ae:34:4a:d9:c2:9e:88:aa:29:c7:02:12:f8:69: + 71:ac:b9:6f:50:72:c6:11:cf:02:37:03:e3:ec:86:28:61:6d: + 91:83:f5:21:42:d3:33:48:a0:29:32:30:0a:4a:c8:15:2b:f7: + c8:f6:6e:e4:f2:d4:46:69:08:a0:3c:33:1f:65:3a:fc:74:0e: + 92:90:61:d1:dd:48:93:4b:ac:a5:3a:0b:91:04:c2:0f:84:b2: + 40:d5:aa:20:24:98:95:34:54:37:45:9b:69:a3:f4:77:58:ce: + d0:8a:33:e1:2f:17:17:0d:48:c1:44:cd:4b:f3:6e:6c:6e:0f: + 42:4a:d7:d2:84:e8:2f:b0:dc:7a:bd:a6:c3:50:27:e5:1a:95: + ec:a6:f6:50:46:29:80:5d:63:b6:8f:1d:f9:74:5e:e7:60:8f: + 1a:19:02:c4:ee:0f:eb:4a:1c:aa:75:d7:72:bf:be:ba:62:c9: + 06:02:1d:da +-----BEGIN CERTIFICATE----- +MIIDZTCCAk2gAwIBAgIBCzANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE4MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMeklvIkuBarBMHL4PCU +NnWEntNkNSjwe3YJZXgaD8+Mm6z+4um4Z05AF+xOBGnOc91thwYkup8wG+FXXqsT +o1u0KwWei0D1qdtBDRNu+WFQg+r1IW1UDhhmNqNcSDHcULbAeJFuOREwkC5ARjOd +BgikSin3HPRggPOnQqrG8rJE97IpZQa7RKFYhnvrFQS0FMfmfcQKG9Mlx4D8ncW2 +/ZLIne22lFqQ9Rqd0xeMCbzw0RZwkTLQtnM+87JIA2X91G/E+G9zxSFtGWvGzrRt +Oz6nX6Br43aXYpe5zlGOwqtKSOqhafnpjhtG7kT9R0vAGRJ0x0QllzltAvRB7Nwz +5CUCAwEAAaOByzCByDAdBgNVHQ4EFgQUVbt52wohOFu1gb14W0C+0YP9QWkwHwYD +VR0jBBgwFoAUVbt52wohOFu1gb14W0C+0YP9QWkwNwYIKwYBBQUHAQEEKzApMCcG +CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw +IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAD3bki3v2Z +dCWnnY30Ni8jG4+X2cIoUzg6eEOw7euoFPc5zFLN+D0ESkOfyTUyrptbZpxU29jt +UbMJMw8jMUssCwR1Bein58v5RFWPrjRK2cKeiKopxwIS+GlxrLlvUHLGEc8CNwPj +7IYoYW2Rg/UhQtMzSKApMjAKSsgVK/fI9m7k8tRGaQigPDMfZTr8dA6SkGHR3UiT +S6ylOguRBMIPhLJA1aogJJiVNFQ3RZtpo/R3WM7QijPhLxcXDUjBRM1L825sbg9C +StfShOgvsNx6vabDUCflGpXspvZQRimAXWO2jx35dF7nYI8aGQLE7g/rShyqdddy +v766YskGAh3a +-----END CERTIFICATE-----
diff --git a/components/test/data/cast_certificate/certificates/policies_ica_none_leaf_foo.pem b/components/test/data/cast_certificate/certificates/policies_ica_none_leaf_foo.pem new file mode 100644 index 0000000..34a3399 --- /dev/null +++ b/components/test/data/cast_certificate/certificates/policies_ica_none_leaf_foo.pem
@@ -0,0 +1,278 @@ +[Created by: generate_policies_tests.py] + +Cast certificate chain with the following policies: + + Root: policies={} + Intermediate: policies={} + Leaf: policies={foo} + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 8 (0x8) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Intermediate + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Leaf + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:b4:f3:98:76:d2:61:f4:bf:b4:45:b7:c7:90:6b: + 24:b7:9b:15:c8:1b:85:36:ca:86:72:81:bb:9a:07: + dd:07:9b:93:36:82:f5:53:04:b7:3e:af:2a:58:9d: + 66:5a:61:e5:2c:29:17:24:e0:9a:bf:f5:c7:11:85: + 51:87:2c:c0:58:57:0e:96:22:22:4d:9e:e3:4f:8b: + cb:22:7e:90:d4:e7:e2:8a:a1:16:bd:0d:77:ac:00: + c9:dc:6b:10:96:5c:80:48:e8:54:8c:61:11:b1:55: + b4:ce:64:f6:cd:3d:d1:6e:7e:2a:19:12:b8:56:df: + 6e:4c:73:cb:65:84:17:48:e0:5c:f0:20:8b:7d:75: + 7f:01:4f:1d:d0:39:98:ba:22:f3:5c:45:6c:da:6c: + d1:7d:67:dc:bc:2d:33:90:19:9d:18:5c:59:2a:e6: + 55:81:4b:73:32:5b:b6:90:8e:fb:73:f5:ef:c1:03: + 75:ef:ce:dc:e3:f7:89:c5:a3:65:a7:40:07:17:df: + b6:f3:24:e1:7f:c0:7f:2c:70:8e:0d:b3:99:8e:97: + 52:5c:c1:fb:1b:15:55:30:f0:a8:44:4e:d1:91:c0: + fa:0c:92:31:2f:c3:67:e2:19:9d:97:30:11:e4:30: + 3a:e9:6c:77:ee:80:1b:da:de:79:9a:22:0b:be:f1: + 7f:a3 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + A1:81:A2:E3:16:52:66:B3:FF:D3:03:00:D2:B2:C0:94:44:5F:A6:94 + X509v3 Authority Key Identifier: + keyid:DE:56:5F:DE:CA:60:54:D4:8A:CB:84:67:A4:7C:A6:F8:6E:59:CB:CD + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Intermediate.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Intermediate.crl + + X509v3 Key Usage: critical + Digital Signature, Key Encipherment + X509v3 Extended Key Usage: + TLS Web Client Authentication + X509v3 Certificate Policies: + Policy: 1.2.840.113554.4.1.72585.2 + + Signature Algorithm: sha256WithRSAEncryption + 2e:65:72:a3:1d:73:c2:9f:a3:b2:25:ca:b8:80:d4:6f:b2:d2: + 49:6d:60:2c:aa:91:0d:ae:46:2c:e5:a0:a4:7e:2b:7c:15:47: + 02:b1:2d:3e:f2:a6:7a:6c:93:77:bf:a1:39:5f:b2:10:ea:26: + 5a:ce:8d:19:bf:f1:b3:0c:33:b7:13:4d:19:d1:a8:a8:74:15: + 39:08:e4:f8:43:20:85:bc:97:c4:bf:c9:40:54:ef:bf:c2:94: + bb:58:29:45:3b:ab:fb:1e:e4:93:61:12:50:ef:5e:73:70:3e: + 58:00:9a:ab:7f:8e:45:8e:c9:cf:8a:95:87:d8:df:20:bf:57: + 18:4b:8b:5c:64:16:18:90:24:a3:06:08:6d:58:8a:49:1b:08: + 33:42:a7:11:18:af:0a:f4:ee:e0:d9:7d:46:02:49:e7:ea:40: + 17:5a:33:35:28:bc:d7:aa:fd:78:1d:c7:b1:7b:a6:58:35:f6: + 09:44:39:ff:ff:3a:08:a9:68:58:28:3e:d1:76:9c:88:54:a6: + 37:50:4a:ff:32:b6:62:78:df:10:cb:0b:05:04:1c:72:62:a0: + 6a:85:f8:25:ee:0d:0b:66:26:de:5a:98:34:10:40:53:41:80: + 26:f6:64:a7:5d:15:a1:c0:08:c2:e0:e5:90:95:7a:45:2d:3c: + c7:49:ab:d4 +-----BEGIN CERTIFICATE----- +MIIDnDCCAoSgAwIBAgIBCDANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTgwMTAxMTIwMDAwWjAPMQ0wCwYD +VQQDDARMZWFmMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtPOYdtJh +9L+0RbfHkGskt5sVyBuFNsqGcoG7mgfdB5uTNoL1UwS3Pq8qWJ1mWmHlLCkXJOCa +v/XHEYVRhyzAWFcOliIiTZ7jT4vLIn6Q1OfiiqEWvQ13rADJ3GsQllyASOhUjGER +sVW0zmT2zT3Rbn4qGRK4Vt9uTHPLZYQXSOBc8CCLfXV/AU8d0DmYuiLzXEVs2mzR +fWfcvC0zkBmdGFxZKuZVgUtzMlu2kI77c/XvwQN1787c4/eJxaNlp0AHF9+28yTh +f8B/LHCODbOZjpdSXMH7GxVVMPCoRE7RkcD6DJIxL8Nn4hmdlzAR5DA66Wx37oAb +2t55miILvvF/owIDAQABo4H6MIH3MB0GA1UdDgQWBBShgaLjFlJms//TAwDSssCU +RF+mlDAfBgNVHSMEGDAWgBTeVl/eymBU1IrLhGekfKb4blnLzTA/BggrBgEFBQcB +AQQzMDEwLwYIKwYBBQUHMAKGI2h0dHA6Ly91cmwtZm9yLWFpYS9JbnRlcm1lZGlh +dGUuY2VyMDQGA1UdHwQtMCswKaAnoCWGI2h0dHA6Ly91cmwtZm9yLWNybC9JbnRl +cm1lZGlhdGUuY3JsMA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcD +AjAZBgNVHSAEEjAQMA4GDCqGSIb3EgQBhLcJAjANBgkqhkiG9w0BAQsFAAOCAQEA +LmVyox1zwp+jsiXKuIDUb7LSSW1gLKqRDa5GLOWgpH4rfBVHArEtPvKmemyTd7+h +OV+yEOomWs6NGb/xswwztxNNGdGoqHQVOQjk+EMghbyXxL/JQFTvv8KUu1gpRTur ++x7kk2ESUO9ec3A+WACaq3+ORY7Jz4qVh9jfIL9XGEuLXGQWGJAkowYIbViKSRsI +M0KnERivCvTu4Nl9RgJJ5+pAF1ozNSi816r9eB3HsXumWDX2CUQ5//86CKloWCg+ +0XaciFSmN1BK/zK2YnjfEMsLBQQccmKgaoX4Je4NC2Ym3lqYNBBAU0GAJvZkp10V +ocAIwuDlkJV6RS08x0mr1A== +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 16 (0x10) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Intermediate + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:ab:dc:90:0c:97:d0:d8:00:b2:82:d1:55:82:1b: + 2d:8f:f3:df:c2:4d:3c:7b:58:b7:82:a7:21:a4:3b: + 94:a0:91:84:45:6f:f3:dd:b9:3a:0b:bc:4b:07:0a: + d1:45:9d:3c:1b:d4:4c:64:a4:7e:0c:01:d9:12:c5: + c4:f2:51:8c:86:02:87:32:9f:f4:86:b6:71:73:96: + 6f:07:ab:b4:98:cc:3b:3c:75:0c:ef:29:6d:66:e6: + ac:45:5a:c7:be:0d:52:f0:e6:7f:65:0a:91:fb:1b: + 8a:67:3a:e7:ae:bb:b3:78:f5:67:89:d2:6a:37:0d: + 1b:e4:c2:a1:20:ce:cf:71:d5:4e:5d:7c:a6:53:46: + 55:bb:92:37:33:ca:9d:10:90:c8:27:12:72:ac:7c: + 53:7e:4d:d7:d9:46:04:aa:18:35:2b:f2:d8:c2:64: + a0:d7:5e:2a:c6:ca:2e:4d:7a:49:cd:4e:d7:55:b8: + 32:3e:fd:58:d8:38:da:ad:a1:97:85:40:2d:22:13: + 5e:ff:e1:42:bf:36:8b:35:48:ca:ab:9a:ec:72:9b: + 0c:8e:cc:ce:de:e6:fe:3f:f9:50:3a:08:1a:3f:95: + 24:a2:2d:96:fb:7b:f6:07:ed:15:77:cb:b2:bb:8a: + 2d:07:ee:17:bd:0d:d0:b2:f5:84:e2:3d:b3:5a:19: + d0:6b + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + DE:56:5F:DE:CA:60:54:D4:8A:CB:84:67:A4:7C:A6:F8:6E:59:CB:CD + X509v3 Authority Key Identifier: + keyid:B0:D5:C8:C3:10:56:82:DD:32:BA:88:72:0A:12:17:7E:E8:81:7F:09 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + ac:4c:1c:ee:c1:15:52:c1:7d:f6:78:97:d8:80:84:cd:6b:00: + ef:6e:65:53:31:ee:c4:2f:aa:27:e5:c4:0f:ae:ef:8a:45:8d: + d0:0d:4e:c0:22:b3:72:c7:60:db:60:9d:cd:74:95:76:f1:bb: + 1e:9b:ae:f4:e5:09:d4:1b:33:70:a6:f1:ce:ab:6d:7e:d9:11: + bb:63:33:d9:49:39:16:9a:f5:e3:b6:37:cb:dc:0d:09:f6:a4: + 9f:e0:40:a1:8f:1e:79:eb:8b:4c:73:b4:23:ef:7c:c5:0c:e3: + 8e:c0:48:ed:dd:f6:c1:80:5e:5e:ba:69:a3:d7:ac:93:e1:be: + ce:23:93:20:b4:44:74:e3:92:1f:02:d9:4a:f9:f8:f5:86:13: + ab:b8:34:b0:4e:e0:2c:ec:2e:56:ab:49:85:47:8c:ce:4c:6d: + 1f:bc:50:8e:aa:b3:a4:9a:54:9b:80:93:61:70:b7:10:01:c3: + 05:80:6e:e4:ea:b8:10:26:4f:92:84:3d:65:54:3e:8d:1f:6b: + 74:68:b5:8c:b2:b0:8e:43:28:56:8d:58:a3:aa:af:70:6c:1e: + e9:13:85:d3:9c:8b:ab:65:11:cc:58:4c:c4:03:d9:99:70:c0: + 3a:cf:e7:3c:7b:1a:fc:aa:5f:f1:62:0b:d6:b0:d9:84:c1:f1: + f4:2f:f8:fa +-----BEGIN CERTIFICATE----- +MIIDbTCCAlWgAwIBAgIBEDANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE4MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAq9yQDJfQ +2ACygtFVghstj/Pfwk08e1i3gqchpDuUoJGERW/z3bk6C7xLBwrRRZ08G9RMZKR+ +DAHZEsXE8lGMhgKHMp/0hrZxc5ZvB6u0mMw7PHUM7yltZuasRVrHvg1S8OZ/ZQqR ++xuKZzrnrruzePVnidJqNw0b5MKhIM7PcdVOXXymU0ZVu5I3M8qdEJDIJxJyrHxT +fk3X2UYEqhg1K/LYwmSg114qxsouTXpJzU7XVbgyPv1Y2DjaraGXhUAtIhNe/+FC +vzaLNUjKq5rscpsMjszO3ub+P/lQOggaP5Ukoi2W+3v2B+0Vd8uyu4otB+4XvQ3Q +svWE4j2zWhnQawIDAQABo4HLMIHIMB0GA1UdDgQWBBTeVl/eymBU1IrLhGekfKb4 +blnLzTAfBgNVHSMEGDAWgBSw1cjDEFaC3TK6iHIKEhd+6IF/CTA3BggrBgEFBQcB +AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs +BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD +VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB +AKxMHO7BFVLBffZ4l9iAhM1rAO9uZVMx7sQvqiflxA+u74pFjdANTsAis3LHYNtg +nc10lXbxux6brvTlCdQbM3Cm8c6rbX7ZEbtjM9lJORaa9eO2N8vcDQn2pJ/gQKGP +Hnnri0xztCPvfMUM447ASO3d9sGAXl66aaPXrJPhvs4jkyC0RHTjkh8C2Ur5+PWG +E6u4NLBO4CzsLlarSYVHjM5MbR+8UI6qs6SaVJuAk2FwtxABwwWAbuTquBAmT5KE +PWVUPo0fa3RotYyysI5DKFaNWKOqr3BsHukThdOci6tlEcxYTMQD2ZlwwDrP5zx7 +GvyqX/FiC9aw2YTB8fQv+Po= +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 15 (0xf) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:ba:ae:2f:50:c5:cd:fd:5f:f6:01:bd:69:93:41: + 20:92:bd:f3:c9:b4:f0:64:d9:c6:c4:27:82:1e:5a: + 73:ad:7a:4a:8b:de:8d:81:2f:0e:00:7b:ea:9e:15: + 35:e1:6a:c7:52:89:78:91:b6:9c:ff:64:5d:ef:c4: + 51:d1:1d:e6:a1:fb:46:56:cf:49:88:1f:ad:9c:46: + 30:3c:92:8d:a6:f7:8e:f9:d1:39:48:d3:19:3f:93: + 8b:fe:fa:bf:58:56:72:aa:e7:8a:cc:1f:24:b7:18: + 5f:74:05:1b:f5:d3:ea:70:a6:19:99:0c:af:6f:1a: + eb:3a:c6:b4:6f:59:25:68:01:5a:e2:e1:45:03:cb: + 60:f3:d2:2e:e5:50:04:a0:29:c3:ab:c3:9c:17:fb: + e2:6e:83:12:64:cf:16:b9:14:a0:15:dc:58:67:7c: + 71:2f:c4:cc:d6:8a:e1:96:59:5b:bd:01:f2:23:cc: + c6:1d:da:b3:ad:04:93:59:26:b0:58:34:6f:6e:12: + 23:4f:04:9d:79:c0:59:8a:94:b7:f0:d3:12:18:a2: + c0:fa:38:2e:6a:07:40:1a:5c:28:9b:a1:b7:3b:cb: + ba:26:7c:b8:c2:a7:fd:77:f7:5a:76:34:8c:64:ae: + 93:2c:72:79:27:60:1b:33:03:8c:00:57:93:64:5d: + e7:c3 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + B0:D5:C8:C3:10:56:82:DD:32:BA:88:72:0A:12:17:7E:E8:81:7F:09 + X509v3 Authority Key Identifier: + keyid:B0:D5:C8:C3:10:56:82:DD:32:BA:88:72:0A:12:17:7E:E8:81:7F:09 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + b8:fd:07:a2:48:48:d7:9a:30:3a:40:d7:49:94:92:8a:11:98: + 73:8a:59:fd:02:c6:89:6c:59:ec:a1:4f:b8:f2:b2:74:fe:67: + 51:97:25:fc:76:70:2d:7f:b4:32:ef:e1:23:ad:69:a4:f7:ca: + 89:6e:aa:13:bb:30:fa:a5:26:cb:56:6f:f9:84:ab:fc:1f:89: + bb:b8:2e:4c:61:46:36:e4:d6:79:30:a4:3e:9a:36:4f:8f:20: + 43:c5:2c:1f:b7:dc:d6:e6:0f:1c:df:8c:a9:c3:7f:45:61:0d: + 0c:36:c0:b6:5c:2c:de:5e:0e:ee:21:ea:e1:50:28:3f:96:65: + 2c:cb:5a:69:e5:1f:0d:04:d4:25:c3:bc:98:74:88:8d:d8:61: + 86:ea:f9:32:3b:86:be:24:1b:ad:94:d9:4f:1f:47:77:05:8c: + e0:5d:dd:59:2f:83:b3:6a:b1:fe:6f:02:74:7f:c6:e3:5a:2f: + f3:3a:5f:13:01:e2:5e:71:99:fe:36:da:1e:98:e5:7e:38:6f: + 54:23:23:7c:c3:3b:27:e7:1e:6c:b3:78:0b:ae:a2:66:9e:0e: + b9:13:1b:09:a7:da:f5:ab:7e:64:f6:12:87:9f:40:40:e2:a5: + 09:dd:f4:3f:0e:9f:88:26:fc:2f:d5:48:fd:db:d5:70:e8:12: + c7:ae:ff:72 +-----BEGIN CERTIFICATE----- +MIIDZTCCAk2gAwIBAgIBDzANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE4MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALquL1DFzf1f9gG9aZNB +IJK988m08GTZxsQngh5ac616SovejYEvDgB76p4VNeFqx1KJeJG2nP9kXe/EUdEd +5qH7RlbPSYgfrZxGMDySjab3jvnROUjTGT+Ti/76v1hWcqrniswfJLcYX3QFG/XT +6nCmGZkMr28a6zrGtG9ZJWgBWuLhRQPLYPPSLuVQBKApw6vDnBf74m6DEmTPFrkU +oBXcWGd8cS/EzNaK4ZZZW70B8iPMxh3as60Ek1kmsFg0b24SI08EnXnAWYqUt/DT +EhiiwPo4LmoHQBpcKJuhtzvLuiZ8uMKn/Xf3WnY0jGSukyxyeSdgGzMDjABXk2Rd +58MCAwEAAaOByzCByDAdBgNVHQ4EFgQUsNXIwxBWgt0yuohyChIXfuiBfwkwHwYD +VR0jBBgwFoAUsNXIwxBWgt0yuohyChIXfuiBfwkwNwYIKwYBBQUHAQEEKzApMCcG +CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw +IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQC4/QeiSEjX +mjA6QNdJlJKKEZhziln9AsaJbFnsoU+48rJ0/mdRlyX8dnAtf7Qy7+EjrWmk98qJ +bqoTuzD6pSbLVm/5hKv8H4m7uC5MYUY25NZ5MKQ+mjZPjyBDxSwft9zW5g8c34yp +w39FYQ0MNsC2XCzeXg7uIerhUCg/lmUsy1pp5R8NBNQlw7yYdIiN2GGG6vkyO4a+ +JButlNlPH0d3BYzgXd1ZL4OzarH+bwJ0f8bjWi/zOl8TAeJecZn+NtoemOV+OG9U +IyN8wzsn5x5ss3gLrqJmng65ExsJp9r1q35k9hKHn0BA4qUJ3fQ/Dp+IJvwv1Uj9 +29Vw6BLHrv9y +-----END CERTIFICATE-----
diff --git a/components/test/data/cast_certificate/certificates/policies_ica_none_leaf_none.pem b/components/test/data/cast_certificate/certificates/policies_ica_none_leaf_none.pem new file mode 100644 index 0000000..460c625 --- /dev/null +++ b/components/test/data/cast_certificate/certificates/policies_ica_none_leaf_none.pem
@@ -0,0 +1,274 @@ +[Created by: generate_policies_tests.py] + +Cast certificate chain with the following policies: + + Root: policies={} + Intermediate: policies={} + Leaf: policies={} + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 5 (0x5) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Intermediate + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Leaf + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:c4:9e:5a:c3:98:a5:13:8c:c7:94:55:72:71:10: + c2:f3:eb:d9:7b:ce:34:57:74:d7:c1:53:2e:75:f0: + f4:15:04:80:f9:d9:60:ef:6e:be:89:9a:8f:7c:3b: + ee:a6:4c:b9:ff:87:8f:af:9b:61:ad:02:5e:f9:f7: + ad:fd:65:96:79:01:64:ff:c8:88:bd:c8:96:8a:46: + e0:62:bd:1a:20:1d:83:74:61:51:96:b0:29:f0:26: + b7:86:31:08:de:4e:16:9a:fd:f6:f3:08:10:c9:93: + bc:7d:4a:3f:76:9a:b1:5b:0f:8c:66:35:e2:5e:e0: + b9:51:ff:46:65:d2:bf:b3:45:97:eb:07:2f:74:de: + b8:f0:20:7e:2c:6e:ab:ea:09:92:28:11:70:4c:09: + 02:f4:c7:8b:fe:17:d5:b1:d6:3c:04:0e:85:8a:dc: + 3a:2a:4d:0d:62:8f:d4:d4:0c:96:e7:18:48:8c:46: + b0:a4:bb:8d:d7:7f:5b:45:d0:2a:c7:a9:83:c1:86: + 12:9b:97:75:65:91:04:bb:52:4e:56:7a:3c:2e:9c: + 72:ac:c4:eb:8a:c2:eb:28:58:94:da:df:45:bc:f6: + e1:91:ba:db:d9:3e:76:e8:87:84:eb:8c:c4:16:dd: + b7:e8:c3:b2:24:fa:e1:b1:8f:ec:74:20:70:e5:13: + e2:1d + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 28:F3:70:47:2A:49:D0:97:E3:41:14:C7:6F:42:98:8B:E3:7C:7C:0B + X509v3 Authority Key Identifier: + keyid:61:89:8E:9B:4C:E5:ED:3A:40:96:77:89:D3:BD:C0:66:CC:A5:39:9D + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Intermediate.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Intermediate.crl + + X509v3 Key Usage: critical + Digital Signature, Key Encipherment + X509v3 Extended Key Usage: + TLS Web Client Authentication + Signature Algorithm: sha256WithRSAEncryption + af:9a:86:7d:cd:27:1e:e2:31:c5:8a:3b:3a:d5:80:e0:8a:86: + e6:1b:3c:28:75:f0:8a:a9:ac:99:eb:3e:78:bb:00:d0:2f:e6: + 8f:ce:11:dc:c9:0e:f5:87:b4:2f:6e:fd:26:cd:45:30:3a:4d: + 8d:b9:88:28:ab:c8:a2:9e:c4:30:60:05:e4:b8:73:62:a2:2c: + b5:9f:35:c5:f4:20:ab:83:29:b5:a0:e5:75:8b:fb:b5:0e:83: + 5f:81:84:79:a6:32:b0:4d:9d:91:47:19:11:e3:ac:f7:95:3a: + 81:cf:27:f2:88:5c:28:92:ce:1c:64:34:f4:0d:44:db:c4:40: + dd:4b:e7:b5:f8:7e:01:ac:1e:69:60:7b:a8:d5:e6:8b:c1:7a: + 1d:6e:e5:ce:bf:9b:c7:64:68:97:df:09:5a:c4:e0:d4:60:01: + 76:ab:31:4f:f5:2d:b0:dd:c6:a2:44:75:d2:4d:22:4d:ae:bb: + 5e:a3:61:e3:10:6d:0f:be:74:60:90:07:21:a7:d6:24:f1:a5: + 77:35:6c:33:fb:b2:3d:ea:40:b3:9b:cd:82:a0:d8:89:bd:7d: + 58:30:04:50:de:03:08:b1:02:24:91:35:77:34:b7:18:03:91: + d4:e7:74:1b:fb:a1:77:4c:8f:56:78:fe:77:18:39:57:c2:45: + 25:a6:e3:76 +-----BEGIN CERTIFICATE----- +MIIDgTCCAmmgAwIBAgIBBTANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxJbnRl +cm1lZGlhdGUwHhcNMTUwMTAxMTIwMDAwWhcNMTgwMTAxMTIwMDAwWjAPMQ0wCwYD +VQQDDARMZWFmMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxJ5aw5il +E4zHlFVycRDC8+vZe840V3TXwVMudfD0FQSA+dlg726+iZqPfDvupky5/4ePr5th +rQJe+fet/WWWeQFk/8iIvciWikbgYr0aIB2DdGFRlrAp8Ca3hjEI3k4Wmv328wgQ +yZO8fUo/dpqxWw+MZjXiXuC5Uf9GZdK/s0WX6wcvdN648CB+LG6r6gmSKBFwTAkC +9MeL/hfVsdY8BA6Fitw6Kk0NYo/U1AyW5xhIjEawpLuN139bRdAqx6mDwYYSm5d1 +ZZEEu1JOVno8LpxyrMTrisLrKFiU2t9FvPbhkbrb2T526IeE64zEFt236MOyJPrh +sY/sdCBw5RPiHQIDAQABo4HfMIHcMB0GA1UdDgQWBBQo83BHKknQl+NBFMdvQpiL +43x8CzAfBgNVHSMEGDAWgBRhiY6bTOXtOkCWd4nTvcBmzKU5nTA/BggrBgEFBQcB +AQQzMDEwLwYIKwYBBQUHMAKGI2h0dHA6Ly91cmwtZm9yLWFpYS9JbnRlcm1lZGlh +dGUuY2VyMDQGA1UdHwQtMCswKaAnoCWGI2h0dHA6Ly91cmwtZm9yLWNybC9JbnRl +cm1lZGlhdGUuY3JsMA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcD +AjANBgkqhkiG9w0BAQsFAAOCAQEAr5qGfc0nHuIxxYo7OtWA4IqG5hs8KHXwiqms +mes+eLsA0C/mj84R3MkO9Ye0L279Js1FMDpNjbmIKKvIop7EMGAF5LhzYqIstZ81 +xfQgq4MptaDldYv7tQ6DX4GEeaYysE2dkUcZEeOs95U6gc8n8ohcKJLOHGQ09A1E +28RA3Uvntfh+AaweaWB7qNXmi8F6HW7lzr+bx2Rol98JWsTg1GABdqsxT/UtsN3G +okR10k0iTa67XqNh4xBtD750YJAHIafWJPGldzVsM/uyPepAs5vNgqDYib19WDAE +UN4DCLECJJE1dzS3GAOR1Od0G/uhd0yPVnj+dxg5V8JFJabjdg== +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 10 (0xa) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Intermediate + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:c4:2d:30:96:25:ad:86:fe:6f:7c:ed:b1:d8:67: + c1:3e:58:5d:95:22:9f:2f:a1:88:f4:e1:f1:63:7f: + 77:b4:60:95:23:57:33:ad:c4:8e:85:71:71:36:1b: + 02:78:bb:69:7a:5e:ae:af:e4:97:97:66:2d:3a:f7: + df:b9:d8:5a:34:a5:68:35:e3:5d:e4:e9:18:77:93: + c6:54:e8:6c:a0:34:20:a5:99:d0:4f:fb:44:b9:29: + 52:00:34:38:9b:17:e1:88:5c:41:d0:19:8b:4b:77: + 4a:cc:ab:a7:32:79:b4:77:25:6b:38:05:05:70:0e: + 9e:fd:94:17:de:d7:02:09:82:00:65:8f:b6:f9:d7: + a0:57:ac:e6:4c:a7:2e:f3:b8:c9:b4:d1:6d:d1:9f: + 81:d4:99:93:01:63:52:72:5d:30:75:3c:8c:1d:73: + 1c:75:7d:18:1b:a8:b3:f0:83:a4:0e:b9:15:39:03: + 81:18:b0:4e:bf:c2:fe:1d:17:f2:1c:4a:de:a5:87: + 63:30:f8:5b:93:ed:83:1b:3f:f7:72:54:49:33:31: + 33:66:2f:0e:3f:b7:e4:97:ae:63:69:9c:a0:1c:e5: + 90:42:5e:07:62:4b:a5:c4:12:fb:97:b4:a7:da:01: + 90:1e:8b:78:ee:66:40:af:dc:23:d4:7f:f5:99:f2: + 47:41 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 61:89:8E:9B:4C:E5:ED:3A:40:96:77:89:D3:BD:C0:66:CC:A5:39:9D + X509v3 Authority Key Identifier: + keyid:27:66:45:31:75:8A:E0:FB:D2:5F:C1:FB:72:52:0E:B1:1B:29:3A:A5 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + ce:dd:90:3d:0a:fe:c3:42:e6:3d:32:57:e5:84:04:6d:80:72: + 6c:92:75:cb:ae:2a:0d:a4:c8:41:2f:c7:c6:bc:02:8f:33:3d: + c5:e2:97:51:ef:8d:e5:84:aa:8a:97:fb:c3:10:a1:73:ae:68: + 76:a5:80:42:ab:df:4c:8a:8a:15:5b:bf:b9:ca:6b:3a:66:ec: + 22:9e:c8:0a:27:9d:c8:5b:07:71:ba:06:74:47:63:dc:08:06: + 9b:d6:eb:6a:11:a2:12:48:68:33:a4:0f:35:aa:a3:78:44:0e: + d6:af:96:5d:e6:26:66:df:09:be:ce:ee:38:2a:4d:b7:36:32: + d2:1c:73:b3:54:6a:a6:dd:0d:76:16:08:eb:a0:8d:30:ce:8d: + bc:b7:8b:be:c7:27:79:95:0b:80:88:57:97:b2:e8:53:46:86: + ad:62:bc:2c:04:59:e9:6b:3b:31:f8:78:93:3d:55:10:3f:da: + 47:bd:a3:89:58:f7:62:ad:8f:00:29:6c:03:ab:7b:c0:6f:bd: + 11:25:2c:35:b7:51:c4:13:ee:be:76:ae:e3:50:d6:1e:e5:a3: + 85:88:ea:fa:4f:49:68:61:c4:27:28:d0:f0:92:eb:ce:bd:59: + af:d5:a4:c8:06:4f:2c:16:8f:eb:cc:a2:91:26:72:f1:81:1f: + 82:92:0b:4c +-----BEGIN CERTIFICATE----- +MIIDbTCCAlWgAwIBAgIBCjANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE4MDEwMTEyMDAwMFowFzEVMBMGA1UEAwwMSW50 +ZXJtZWRpYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxC0wliWt +hv5vfO2x2GfBPlhdlSKfL6GI9OHxY393tGCVI1czrcSOhXFxNhsCeLtpel6ur+SX +l2YtOvffudhaNKVoNeNd5OkYd5PGVOhsoDQgpZnQT/tEuSlSADQ4mxfhiFxB0BmL +S3dKzKunMnm0dyVrOAUFcA6e/ZQX3tcCCYIAZY+2+degV6zmTKcu87jJtNFt0Z+B +1JmTAWNScl0wdTyMHXMcdX0YG6iz8IOkDrkVOQOBGLBOv8L+HRfyHErepYdjMPhb +k+2DGz/3clRJMzEzZi8OP7fkl65jaZygHOWQQl4HYkulxBL7l7Sn2gGQHot47mZA +r9wj1H/1mfJHQQIDAQABo4HLMIHIMB0GA1UdDgQWBBRhiY6bTOXtOkCWd4nTvcBm +zKU5nTAfBgNVHSMEGDAWgBQnZkUxdYrg+9JfwftyUg6xGyk6pTA3BggrBgEFBQcB +AQQrMCkwJwYIKwYBBQUHMAKGG2h0dHA6Ly91cmwtZm9yLWFpYS9Sb290LmNlcjAs +BgNVHR8EJTAjMCGgH6AdhhtodHRwOi8vdXJsLWZvci1jcmwvUm9vdC5jcmwwDgYD +VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB +AM7dkD0K/sNC5j0yV+WEBG2AcmySdcuuKg2kyEEvx8a8Ao8zPcXil1HvjeWEqoqX ++8MQoXOuaHalgEKr30yKihVbv7nKazpm7CKeyAonnchbB3G6BnRHY9wIBpvW62oR +ohJIaDOkDzWqo3hEDtavll3mJmbfCb7O7jgqTbc2MtIcc7NUaqbdDXYWCOugjTDO +jby3i77HJ3mVC4CIV5ey6FNGhq1ivCwEWelrOzH4eJM9VRA/2ke9o4lY92KtjwAp +bAOre8BvvRElLDW3UcQT7r52ruNQ1h7lo4WI6vpPSWhhxCco0PCS6869Wa/VpMgG +TywWj+vMopEmcvGBH4KSC0w= +-----END CERTIFICATE----- + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 9 (0x9) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Root + Validity + Not Before: Jan 1 12:00:00 2015 GMT + Not After : Jan 1 12:00:00 2018 GMT + Subject: CN=Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:f4:50:3d:b5:7c:ca:fd:0b:8f:4c:94:7e:6a:6e: + d7:fc:6e:b0:40:8b:e2:48:78:b6:99:7e:b6:ab:fd: + 2a:0f:c8:64:6d:2a:70:79:d8:b9:0e:33:61:21:c4: + 89:3f:79:28:db:7c:d7:8a:13:f3:2e:f1:85:be:ab: + 21:31:d2:c3:7e:0a:d6:bd:56:e2:2a:b2:29:6c:52: + 00:17:45:c8:47:15:1e:30:ff:be:4b:c9:87:5d:86: + a5:d0:f5:20:e6:79:a2:94:29:ec:5d:19:b0:e5:32: + 81:5a:34:8b:a7:06:20:33:f8:03:3e:0f:8e:e1:87: + 19:1c:0a:ab:94:f0:17:0b:67:62:9f:47:02:70:22: + 2c:d8:cb:55:51:19:b4:7f:62:f6:3a:18:e4:42:fd: + 5c:f7:f5:26:49:6e:6c:1f:90:f5:52:9a:85:fb:e0: + 05:22:24:6a:21:27:a7:03:c4:64:ba:5d:ae:20:ce: + 77:4d:25:50:4f:a4:d3:7a:11:e0:f7:51:1c:b1:8f: + d2:19:73:70:4d:d0:55:4f:ef:14:0f:1e:7a:ce:5d: + 87:45:85:6b:ab:bd:d4:fc:0b:2e:c8:2b:7d:02:19: + 89:39:37:b0:93:ab:b4:e4:db:6b:c2:d3:99:db:87: + db:ef:c5:c0:04:26:63:7a:dc:46:07:5d:09:ba:bd: + f0:a1 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 27:66:45:31:75:8A:E0:FB:D2:5F:C1:FB:72:52:0E:B1:1B:29:3A:A5 + X509v3 Authority Key Identifier: + keyid:27:66:45:31:75:8A:E0:FB:D2:5F:C1:FB:72:52:0E:B1:1B:29:3A:A5 + + Authority Information Access: + CA Issuers - URI:http://url-for-aia/Root.cer + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://url-for-crl/Root.crl + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha256WithRSAEncryption + 94:72:28:25:43:3a:f3:7e:0c:ad:21:54:ac:c2:08:3b:6d:0a: + 42:5c:4d:d5:73:3d:54:e3:c6:9d:52:3a:0e:f3:fc:e8:ea:bd: + 20:9b:8b:cb:35:9a:4c:42:b4:7e:cf:09:4a:18:00:e1:97:be: + e7:7b:a9:34:f2:23:fc:87:a5:06:ca:8c:2c:67:3a:19:fc:a2: + 69:ca:c9:3c:f5:aa:1b:7e:42:8a:dc:e4:3c:ce:37:f5:3b:f1: + 2c:92:f2:e8:91:6e:9c:13:f8:f2:14:a8:4f:a4:bd:76:f8:12: + 45:fb:30:45:d7:ce:4d:dd:5b:46:f1:89:9d:c5:29:d8:0f:77: + 6b:71:07:ff:ab:2d:95:7f:ba:21:a1:8a:db:d7:af:1c:29:d2: + 28:41:e1:e4:4e:4f:12:2c:ef:98:84:7c:f2:55:19:5b:46:34: + f8:1f:1d:3b:16:e4:27:8f:32:16:f8:4e:f4:14:22:bc:b6:c2: + 1b:83:c1:e2:6a:23:64:51:65:af:7f:9d:21:a1:89:2e:8e:23: + 8e:e6:20:3a:42:37:8e:f2:55:22:22:88:cd:04:da:a9:fd:5d: + fe:b3:36:6d:77:30:76:e4:a1:97:42:0e:7f:a5:b9:ac:26:88: + b9:3f:76:27:7b:fd:a7:95:f9:2b:17:58:89:fa:21:28:a0:17: + 37:9f:50:11 +-----BEGIN CERTIFICATE----- +MIIDZTCCAk2gAwIBAgIBCTANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDARSb290 +MB4XDTE1MDEwMTEyMDAwMFoXDTE4MDEwMTEyMDAwMFowDzENMAsGA1UEAwwEUm9v +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPRQPbV8yv0Lj0yUfmpu +1/xusECL4kh4tpl+tqv9Kg/IZG0qcHnYuQ4zYSHEiT95KNt814oT8y7xhb6rITHS +w34K1r1W4iqyKWxSABdFyEcVHjD/vkvJh12GpdD1IOZ5opQp7F0ZsOUygVo0i6cG +IDP4Az4PjuGHGRwKq5TwFwtnYp9HAnAiLNjLVVEZtH9i9joY5EL9XPf1JklubB+Q +9VKahfvgBSIkaiEnpwPEZLpdriDOd00lUE+k03oR4PdRHLGP0hlzcE3QVU/vFA8e +es5dh0WFa6u91PwLLsgrfQIZiTk3sJOrtOTba8LTmduH2+/FwAQmY3rcRgddCbq9 +8KECAwEAAaOByzCByDAdBgNVHQ4EFgQUJ2ZFMXWK4PvSX8H7clIOsRspOqUwHwYD +VR0jBBgwFoAUJ2ZFMXWK4PvSX8H7clIOsRspOqUwNwYIKwYBBQUHAQEEKzApMCcG +CCsGAQUFBzAChhtodHRwOi8vdXJsLWZvci1haWEvUm9vdC5jZXIwLAYDVR0fBCUw +IzAhoB+gHYYbaHR0cDovL3VybC1mb3ItY3JsL1Jvb3QuY3JsMA4GA1UdDwEB/wQE +AwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCUciglQzrz +fgytIVSswgg7bQpCXE3Vcz1U48adUjoO8/zo6r0gm4vLNZpMQrR+zwlKGADhl77n +e6k08iP8h6UGyowsZzoZ/KJpysk89aobfkKK3OQ8zjf1O/EskvLokW6cE/jyFKhP +pL12+BJF+zBF185N3VtG8YmdxSnYD3drcQf/qy2Vf7ohoYrb168cKdIoQeHkTk8S +LO+YhHzyVRlbRjT4Hx07FuQnjzIW+E70FCK8tsIbg8HiaiNkUWWvf50hoYkujiOO +5iA6QjeO8lUiIojNBNqp/V3+szZtdzB25KGXQg5/pbmsJoi5P3Yne/2nlfkrF1iJ ++iEooBc3n1AR +-----END CERTIFICATE-----
diff --git a/components/test/data/web_database/version_73_with_type_column.sql b/components/test/data/web_database/version_73_with_type_column.sql new file mode 100644 index 0000000..5da24ee --- /dev/null +++ b/components/test/data/web_database/version_73_with_type_column.sql
@@ -0,0 +1,25 @@ +PRAGMA foreign_keys=OFF; +BEGIN TRANSACTION; +CREATE TABLE meta(key LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY, value LONGVARCHAR); +INSERT INTO "meta" VALUES('mmap_status','-1'); +INSERT INTO "meta" VALUES('version','73'); +INSERT INTO "meta" VALUES('last_compatible_version','72'); +CREATE TABLE token_service (service VARCHAR PRIMARY KEY NOT NULL,encrypted_token BLOB); +CREATE TABLE keywords (id INTEGER PRIMARY KEY,short_name VARCHAR NOT NULL,keyword VARCHAR NOT NULL,favicon_url VARCHAR NOT NULL,url VARCHAR NOT NULL,safe_for_autoreplace INTEGER,originating_url VARCHAR,date_created INTEGER DEFAULT 0,usage_count INTEGER DEFAULT 0,input_encodings VARCHAR,suggest_url VARCHAR,prepopulate_id INTEGER DEFAULT 0,created_by_policy INTEGER DEFAULT 0,instant_url VARCHAR,last_modified INTEGER DEFAULT 0,sync_guid VARCHAR,alternate_urls VARCHAR,search_terms_replacement_key VARCHAR,image_url VARCHAR,search_url_post_params VARCHAR,suggest_url_post_params VARCHAR,instant_url_post_params VARCHAR,image_url_post_params VARCHAR,new_tab_url VARCHAR, last_visited INTEGER DEFAULT 0); +CREATE TABLE autofill (name VARCHAR, value VARCHAR, value_lower VARCHAR, date_created INTEGER DEFAULT 0, date_last_used INTEGER DEFAULT 0, count INTEGER DEFAULT 1, PRIMARY KEY (name, value)); +CREATE TABLE credit_cards ( guid VARCHAR PRIMARY KEY, name_on_card VARCHAR, expiration_month INTEGER, expiration_year INTEGER, card_number_encrypted BLOB, date_modified INTEGER NOT NULL DEFAULT 0, origin VARCHAR DEFAULT '', use_count INTEGER NOT NULL DEFAULT 0, use_date INTEGER NOT NULL DEFAULT 0, billing_address_id VARCHAR); +CREATE TABLE autofill_profiles ( guid VARCHAR PRIMARY KEY, company_name VARCHAR, street_address VARCHAR, dependent_locality VARCHAR, city VARCHAR, state VARCHAR, zipcode VARCHAR, sorting_code VARCHAR, country_code VARCHAR, date_modified INTEGER NOT NULL DEFAULT 0, origin VARCHAR DEFAULT '', language_code VARCHAR, use_count INTEGER NOT NULL DEFAULT 0, use_date INTEGER NOT NULL DEFAULT 0); +CREATE TABLE autofill_profile_names ( guid VARCHAR, first_name VARCHAR, middle_name VARCHAR, last_name VARCHAR, full_name VARCHAR); +CREATE TABLE autofill_profile_emails ( guid VARCHAR, email VARCHAR); +CREATE TABLE autofill_profile_phones ( guid VARCHAR, number VARCHAR); +CREATE TABLE autofill_profiles_trash ( guid VARCHAR); +CREATE TABLE masked_credit_cards (id VARCHAR,status VARCHAR,name_on_card VARCHAR,network VARCHAR,last_four VARCHAR,exp_month INTEGER DEFAULT 0,exp_year INTEGER DEFAULT 0, type INTEGER DEFAULT 0); +CREATE TABLE unmasked_credit_cards (id VARCHAR,card_number_encrypted VARCHAR, use_count INTEGER NOT NULL DEFAULT 0, use_date INTEGER NOT NULL DEFAULT 0, unmask_date INTEGER NOT NULL DEFAULT 0); +CREATE TABLE server_card_metadata (id VARCHAR NOT NULL,use_count INTEGER NOT NULL DEFAULT 0, use_date INTEGER NOT NULL DEFAULT 0, billing_address_id VARCHAR); +CREATE TABLE server_addresses (id VARCHAR,company_name VARCHAR,street_address VARCHAR,address_1 VARCHAR,address_2 VARCHAR,address_3 VARCHAR,address_4 VARCHAR,postal_code VARCHAR,sorting_code VARCHAR,country_code VARCHAR,language_code VARCHAR, recipient_name VARCHAR, phone_number VARCHAR); +CREATE TABLE server_address_metadata (id VARCHAR NOT NULL,use_count INTEGER NOT NULL DEFAULT 0, use_date INTEGER NOT NULL DEFAULT 0, has_converted BOOL NOT NULL DEFAULT FALSE); +CREATE TABLE autofill_sync_metadata (storage_key VARCHAR PRIMARY KEY NOT NULL,value BLOB); +CREATE TABLE autofill_model_type_state (id INTEGER PRIMARY KEY, value BLOB); +CREATE INDEX autofill_name ON autofill (name); +CREATE INDEX autofill_name_value_lower ON autofill (name, value_lower); +COMMIT;
diff --git a/components/translate/content/renderer/BUILD.gn b/components/translate/content/renderer/BUILD.gn index 17ab7fa..773039fa0 100644 --- a/components/translate/content/renderer/BUILD.gn +++ b/components/translate/content/renderer/BUILD.gn
@@ -24,3 +24,15 @@ "//v8", ] } + +source_set("unit_tests") { + testonly = true + sources = [ + "translate_helper_unittest.cc", + ] + deps = [ + ":renderer", + "//base", + "//testing/gtest", + ] +}
diff --git a/components/translate/content/renderer/translate_helper.cc b/components/translate/content/renderer/translate_helper.cc index f1b8ce4..14251b6b 100644 --- a/components/translate/content/renderer/translate_helper.cc +++ b/components/translate/content/renderer/translate_helper.cc
@@ -8,6 +8,7 @@ #include "base/bind.h" #include "base/compiler_specific.h" +#include "base/json/string_escape.h" #include "base/location.h" #include "base/logging.h" #include "base/metrics/histogram_macros.h" @@ -167,12 +168,8 @@ } bool TranslateHelper::StartTranslation() { - std::string script = "cr.googleTranslate.translate('" + - source_lang_ + - "','" + - target_lang_ + - "')"; - return ExecuteScriptAndGetBoolResult(script, false); + return ExecuteScriptAndGetBoolResult( + BuildTranslationScript(source_lang_, target_lang_), false); } std::string TranslateHelper::GetOriginalPageLanguage() { @@ -430,4 +427,13 @@ delete this; } +/* static */ +std::string TranslateHelper::BuildTranslationScript( + const std::string& source_lang, + const std::string& target_lang) { + return "cr.googleTranslate.translate(" + + base::GetQuotedJSONString(source_lang) + "," + + base::GetQuotedJSONString(target_lang) + ")"; +} + } // namespace translate
diff --git a/components/translate/content/renderer/translate_helper.h b/components/translate/content/renderer/translate_helper.h index 622e718..58f2c88 100644 --- a/components/translate/content/renderer/translate_helper.h +++ b/components/translate/content/renderer/translate_helper.h
@@ -8,6 +8,7 @@ #include <memory> #include <string> +#include "base/gtest_prod_util.h" #include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/strings/string16.h" @@ -99,9 +100,16 @@ virtual double ExecuteScriptAndGetDoubleResult(const std::string& script); private: + FRIEND_TEST_ALL_PREFIXES(TranslateHelperTest, TestBuildTranslationScript); + // Converts language code to the one used in server supporting list. static void ConvertLanguageCodeSynonym(std::string* code); + // Builds the translation JS used to translate from source_lang to + // target_lang. + static std::string BuildTranslationScript(const std::string& source_lang, + const std::string& target_lang); + const mojom::ContentTranslateDriverPtr& GetTranslateDriver(); // Cleanups all states and pending callbacks associated with the current
diff --git a/components/translate/content/renderer/translate_helper_unittest.cc b/components/translate/content/renderer/translate_helper_unittest.cc new file mode 100644 index 0000000..f62df230 --- /dev/null +++ b/components/translate/content/renderer/translate_helper_unittest.cc
@@ -0,0 +1,29 @@ +// 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 "components/translate/content/renderer/translate_helper.h" + +#include "testing/gtest/include/gtest/gtest.h" + +namespace translate { + +class TranslateHelperTest : public testing::Test {}; + +TEST_F(TranslateHelperTest, TestBuildTranslationScript) { + // Test expected cases. + EXPECT_EQ(TranslateHelper::BuildTranslationScript("en", "es"), + "cr.googleTranslate.translate(\"en\",\"es\")"); + EXPECT_EQ(TranslateHelper::BuildTranslationScript("en-US", "zh-TW"), + "cr.googleTranslate.translate(\"en-US\",\"zh-TW\")"); + + // Test that quote gets quoted. + EXPECT_EQ(TranslateHelper::BuildTranslationScript("en\"", "es"), + "cr.googleTranslate.translate(\"en\\\"\",\"es\")"); + + // Test that < gets quoted. + EXPECT_EQ(TranslateHelper::BuildTranslationScript("en<", "es"), + "cr.googleTranslate.translate(\"en\\u003C\",\"es\")"); +} + +} // namespace translate
diff --git a/components/translate/core/browser/translate_browser_metrics.h b/components/translate/core/browser/translate_browser_metrics.h index c83c6bb9..e15759a 100644 --- a/components/translate/core/browser/translate_browser_metrics.h +++ b/components/translate/core/browser/translate_browser_metrics.h
@@ -42,6 +42,8 @@ INITIATION_STATUS_DISABLED_BY_KEY, INITIATION_STATUS_LANGUAGE_IN_ULP, INITIATION_STATUS_ABORTED_BY_RANKER, + INITIATION_STATUS_ABORTED_BY_TOO_OFTEN_DENIED, + INITIATION_STATUS_ABORTED_BY_MATCHES_PREVIOUS_LANGUAGE, // Insert new items here. INITIATION_STATUS_MAX, };
diff --git a/components/translate/core/browser/translate_browser_metrics_unittest.cc b/components/translate/core/browser/translate_browser_metrics_unittest.cc index 283dfd5..b5bfc35 100644 --- a/components/translate/core/browser/translate_browser_metrics_unittest.cc +++ b/components/translate/core/browser/translate_browser_metrics_unittest.cc
@@ -29,17 +29,22 @@ base_samples_ = histogram->SnapshotSamples(); } - void CheckInitiationStatus(int expected_disabled_by_prefs, - int expected_disabled_by_config, - int expected_disabled_by_build, - int expected_language_is_not_supported, - int expected_mime_type_is_not_supported, - int expected_url_is_not_supported, - int expected_similar_languages, - int expected_accept_languages, - int expected_auto_by_config, - int expected_auto_by_link, - int expected_show_infobar) { + void CheckInitiationStatus( + int expected_disabled_by_prefs, + int expected_disabled_by_config, + int expected_disabled_by_build, + int expected_language_is_not_supported, + int expected_mime_type_is_not_supported, + int expected_url_is_not_supported, + int expected_similar_languages, + int expected_accept_languages, + int expected_auto_by_config, + int expected_auto_by_link, + int expected_show_infobar, + int expected_language_in_ulp, + int expected_aborted_by_ranker, + int expected_aborted_by_too_often_denied, + int expected_aborted_by_matches_previous_language) { Snapshot(); EXPECT_EQ(expected_disabled_by_prefs, @@ -80,6 +85,20 @@ EXPECT_EQ(expected_show_infobar, GetCountWithoutSnapshot(translate::TranslateBrowserMetrics:: INITIATION_STATUS_SHOW_INFOBAR)); + EXPECT_EQ(expected_language_in_ulp, + GetCountWithoutSnapshot(translate::TranslateBrowserMetrics:: + INITIATION_STATUS_LANGUAGE_IN_ULP)); + EXPECT_EQ(expected_aborted_by_ranker, + GetCountWithoutSnapshot(translate::TranslateBrowserMetrics:: + INITIATION_STATUS_ABORTED_BY_RANKER)); + EXPECT_EQ(expected_aborted_by_too_often_denied, + GetCountWithoutSnapshot( + translate::TranslateBrowserMetrics:: + INITIATION_STATUS_ABORTED_BY_TOO_OFTEN_DENIED)); + EXPECT_EQ(expected_aborted_by_matches_previous_language, + GetCountWithoutSnapshot( + translate::TranslateBrowserMetrics:: + INITIATION_STATUS_ABORTED_BY_MATCHES_PREVIOUS_LANGUAGE)); } HistogramBase::Count GetTotalCount() { @@ -127,43 +146,57 @@ MetricsRecorder recorder(translate::TranslateBrowserMetrics::GetMetricsName( translate::TranslateBrowserMetrics::UMA_INITIATION_STATUS)); - recorder.CheckInitiationStatus(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + recorder.CheckInitiationStatus(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); translate::TranslateBrowserMetrics::ReportInitiationStatus( translate::TranslateBrowserMetrics::INITIATION_STATUS_DISABLED_BY_PREFS); - recorder.CheckInitiationStatus(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + recorder.CheckInitiationStatus(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); translate::TranslateBrowserMetrics::ReportInitiationStatus( translate::TranslateBrowserMetrics::INITIATION_STATUS_DISABLED_BY_CONFIG); - recorder.CheckInitiationStatus(1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0); + recorder.CheckInitiationStatus(1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); translate::TranslateBrowserMetrics::ReportInitiationStatus( translate::TranslateBrowserMetrics::INITIATION_STATUS_DISABLED_BY_KEY); - recorder.CheckInitiationStatus(1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0); + recorder.CheckInitiationStatus(1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); translate::TranslateBrowserMetrics::ReportInitiationStatus( translate::TranslateBrowserMetrics:: INITIATION_STATUS_LANGUAGE_IS_NOT_SUPPORTED); - recorder.CheckInitiationStatus(1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0); + recorder.CheckInitiationStatus(1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); translate::TranslateBrowserMetrics::ReportInitiationStatus( translate::TranslateBrowserMetrics:: INITIATION_STATUS_MIME_TYPE_IS_NOT_SUPPORTED); - recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0); + recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); translate::TranslateBrowserMetrics::ReportInitiationStatus( translate::TranslateBrowserMetrics:: INITIATION_STATUS_URL_IS_NOT_SUPPORTED); - recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0); + recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0); translate::TranslateBrowserMetrics::ReportInitiationStatus( translate::TranslateBrowserMetrics::INITIATION_STATUS_SIMILAR_LANGUAGES); - recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0); + recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0); translate::TranslateBrowserMetrics::ReportInitiationStatus( translate::TranslateBrowserMetrics::INITIATION_STATUS_ACCEPT_LANGUAGES); - recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0); + recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0); translate::TranslateBrowserMetrics::ReportInitiationStatus( translate::TranslateBrowserMetrics::INITIATION_STATUS_AUTO_BY_CONFIG); - recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0); + recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0); translate::TranslateBrowserMetrics::ReportInitiationStatus( translate::TranslateBrowserMetrics::INITIATION_STATUS_AUTO_BY_LINK); - recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0); + recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0); translate::TranslateBrowserMetrics::ReportInitiationStatus( translate::TranslateBrowserMetrics::INITIATION_STATUS_SHOW_INFOBAR); - recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); + recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0); + translate::TranslateBrowserMetrics::ReportInitiationStatus( + translate::TranslateBrowserMetrics::INITIATION_STATUS_LANGUAGE_IN_ULP); + recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0); + translate::TranslateBrowserMetrics::ReportInitiationStatus( + translate::TranslateBrowserMetrics::INITIATION_STATUS_ABORTED_BY_RANKER); + recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0); + translate::TranslateBrowserMetrics::ReportInitiationStatus( + translate::TranslateBrowserMetrics:: + INITIATION_STATUS_ABORTED_BY_TOO_OFTEN_DENIED); + recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0); + translate::TranslateBrowserMetrics::ReportInitiationStatus( + translate::TranslateBrowserMetrics:: + INITIATION_STATUS_ABORTED_BY_MATCHES_PREVIOUS_LANGUAGE); + recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); } TEST(TranslateBrowserMetricsTest, ReportLanguageDetectionError) {
diff --git a/components/translate/core/browser/translate_manager.cc b/components/translate/core/browser/translate_manager.cc index 06812c57..538b3215 100644 --- a/components/translate/core/browser/translate_manager.cc +++ b/components/translate/core/browser/translate_manager.cc
@@ -595,6 +595,9 @@ !language_state_.HasLanguageChanged() && !ShouldOverrideDecision( metrics::TranslateEventProto::MATCHES_PREVIOUS_LANGUAGE)) { + TranslateBrowserMetrics::ReportInitiationStatus( + TranslateBrowserMetrics:: + INITIATION_STATUS_ABORTED_BY_MATCHES_PREVIOUS_LANGUAGE); return true; } @@ -605,6 +608,8 @@ source_language) && !ShouldOverrideDecision( metrics::TranslateEventProto::LANGUAGE_DISABLED_BY_AUTO_BLACKLIST)) { + TranslateBrowserMetrics::ReportInitiationStatus( + TranslateBrowserMetrics::INITIATION_STATUS_ABORTED_BY_TOO_OFTEN_DENIED); return true; }
diff --git a/components/translate/core/browser/translate_manager_unittest.cc b/components/translate/core/browser/translate_manager_unittest.cc index 5e6537f1..83970f1f 100644 --- a/components/translate/core/browser/translate_manager_unittest.cc +++ b/components/translate/core/browser/translate_manager_unittest.cc
@@ -39,6 +39,7 @@ namespace { const char kTrialName[] = "MyTrial"; +const char kInitiationStatusName[] = "Translate.InitiationStatus.v2"; // Overrides NetworkChangeNotifier, simulating connection type changes // for tests. @@ -299,7 +300,6 @@ // The test measures that the "Translate was disabled" exit can only be // reached after the early-out tests including IsOffline() passed. - const char kMetricName[] = "Translate.InitiationStatus.v2"; base::HistogramTester histogram_tester; prefs_.SetBoolean(prefs::kEnableTranslate, false); @@ -310,13 +310,13 @@ // key test. network_notifier_.SimulateOffline(); translate_manager_->InitiateTranslation("de"); - histogram_tester.ExpectTotalCount(kMetricName, 0); + histogram_tester.ExpectTotalCount(kInitiationStatusName, 0); // In the online case, InitiateTranslation will proceed past early out tests. network_notifier_.SimulateOnline(); translate_manager_->InitiateTranslation("de"); histogram_tester.ExpectUniqueSample( - kMetricName, + kInitiationStatusName, translate::TranslateBrowserMetrics::INITIATION_STATUS_DISABLED_BY_PREFS, 1); } @@ -505,8 +505,10 @@ TEST_F(TranslateManagerTest, ShouldSuppressBubbleUI_Default) { PrepareTranslateManager(); SetHasLanguageChanged(true); + base::HistogramTester histogram_tester; EXPECT_FALSE(translate_manager_->ShouldSuppressBubbleUI(false, "en")); EXPECT_FALSE(translate_manager_->ShouldSuppressBubbleUI(true, "en")); + histogram_tester.ExpectTotalCount(kInitiationStatusName, 0); } TEST_F(TranslateManagerTest, ShouldSuppressBubbleUI_HasLanguageChangedFalse) { @@ -517,20 +519,33 @@ ShouldOverrideDecision( metrics::TranslateEventProto::MATCHES_PREVIOUS_LANGUAGE, _, _)) .WillOnce(Return(false)); + base::HistogramTester histogram_tester; EXPECT_TRUE(translate_manager_->ShouldSuppressBubbleUI(false, "en")); + histogram_tester.ExpectUniqueSample( + kInitiationStatusName, + translate::TranslateBrowserMetrics:: + INITIATION_STATUS_ABORTED_BY_MATCHES_PREVIOUS_LANGUAGE, + 1); EXPECT_CALL(mock_translate_ranker_, ShouldOverrideDecision(_, _, _)) .WillOnce(Return(false)); EXPECT_TRUE(translate_manager_->ShouldSuppressBubbleUI(true, "en")); + histogram_tester.ExpectUniqueSample( + kInitiationStatusName, + translate::TranslateBrowserMetrics:: + INITIATION_STATUS_ABORTED_BY_MATCHES_PREVIOUS_LANGUAGE, + 2); } TEST_F(TranslateManagerTest, ShouldSuppressBubbleUI_NewUI) { PrepareTranslateManager(); base::test::ScopedFeatureList scoped_feature_list; + base::HistogramTester histogram_tester; scoped_feature_list.InitAndEnableFeature(translate::kTranslateUI2016Q2); SetHasLanguageChanged(false); EXPECT_FALSE(translate_manager_->ShouldSuppressBubbleUI(false, "en")); + histogram_tester.ExpectTotalCount(kInitiationStatusName, 0); } TEST_F(TranslateManagerTest, ShouldSuppressBubbleUI_IsTooOftenDenied) { @@ -543,13 +558,20 @@ metrics::TranslateEventProto::LANGUAGE_DISABLED_BY_AUTO_BLACKLIST, _, _)) .WillOnce(Return(false)); + base::HistogramTester histogram_tester; EXPECT_TRUE(translate_manager_->ShouldSuppressBubbleUI(false, "en")); EXPECT_FALSE(translate_manager_->ShouldSuppressBubbleUI(false, "de")); EXPECT_FALSE(translate_manager_->ShouldSuppressBubbleUI(true, "en")); + histogram_tester.ExpectUniqueSample( + kInitiationStatusName, + translate::TranslateBrowserMetrics:: + INITIATION_STATUS_ABORTED_BY_TOO_OFTEN_DENIED, + 1); } TEST_F(TranslateManagerTest, ShouldSuppressBubbleUI_Override) { PrepareTranslateManager(); + base::HistogramTester histogram_tester; EXPECT_CALL( mock_translate_ranker_, ShouldOverrideDecision( @@ -564,6 +586,7 @@ SetHasLanguageChanged(false); SetLanguageTooOftenDenied("en"); EXPECT_FALSE(translate_manager_->ShouldSuppressBubbleUI(false, "en")); + histogram_tester.ExpectTotalCount(kInitiationStatusName, 0); } } // namespace testing
diff --git a/components/ukm/public/ukm_recorder.cc b/components/ukm/public/ukm_recorder.cc index 25fdcb82..07a74fb 100644 --- a/components/ukm/public/ukm_recorder.cc +++ b/components/ukm/public/ukm_recorder.cc
@@ -16,13 +16,14 @@ const base::Feature kUkmFeature = {"Ukm", base::FEATURE_DISABLED_BY_DEFAULT}; -UkmRecorder::UkmRecorder() { - DCHECK(!g_ukm_recorder); - g_ukm_recorder = this; -} +UkmRecorder::UkmRecorder() = default; -UkmRecorder::~UkmRecorder() { - g_ukm_recorder = nullptr; +UkmRecorder::~UkmRecorder() = default; + +// static +void UkmRecorder::Set(UkmRecorder* recorder) { + DCHECK(!g_ukm_recorder || !recorder); + g_ukm_recorder = recorder; } // static
diff --git a/components/ukm/public/ukm_recorder.h b/components/ukm/public/ukm_recorder.h index 76d921c0..c56b448 100644 --- a/components/ukm/public/ukm_recorder.h +++ b/components/ukm/public/ukm_recorder.h
@@ -65,6 +65,11 @@ UkmRecorder(); virtual ~UkmRecorder(); + // Sets an instance of UkmRecorder to provided by Get(). + // TODO(holte): Migrate callers away from using Get, to using a context + // specific getter, or a MojoUkmRecorder. + static void Set(UkmRecorder* recorder); + // Provides access to a previously constructed UkmRecorder instance. Only one // instance exists per process and must have been constructed prior to any // calls to this method.
diff --git a/components/ukm/test_ukm_recorder.cc b/components/ukm/test_ukm_recorder.cc index 26a1307f..bd04810 100644 --- a/components/ukm/test_ukm_recorder.cc +++ b/components/ukm/test_ukm_recorder.cc
@@ -12,9 +12,12 @@ TestUkmRecorder::TestUkmRecorder() { EnableRecording(); + UkmRecorder::Set(this); } -TestUkmRecorder::~TestUkmRecorder() = default; +TestUkmRecorder::~TestUkmRecorder() { + UkmRecorder::Set(nullptr); +}; const UkmSource* TestUkmRecorder::GetSourceForUrl(const char* url) const { const UkmSource* source = nullptr;
diff --git a/components/ukm/ukm_service.cc b/components/ukm/ukm_service.cc index 312ba04..c38c2fc 100644 --- a/components/ukm/ukm_service.cc +++ b/components/ukm/ukm_service.cc
@@ -98,10 +98,13 @@ provider->Init(); StoreWhitelistedEntries(); + + UkmRecorder::Set(this); } UkmService::~UkmService() { DisableReporting(); + UkmRecorder::Set(nullptr); } void UkmService::Initialize() {
diff --git a/components/update_client/ping_manager_unittest.cc b/components/update_client/ping_manager_unittest.cc index f555bf2..503a4d59 100644 --- a/components/update_client/ping_manager_unittest.cc +++ b/components/update_client/ping_manager_unittest.cc
@@ -157,6 +157,27 @@ } { + // Test an invalid |next_version| is not serialized. + Component component(*update_context, "abc"); + component.state_ = + base::MakeUnique<Component::StateUpdateError>(&component); + component.previous_version_ = base::Version("1.0"); + + component.AppendEvent(BuildUpdateCompleteEventElement(component)); + + ping_manager_->SendPing(component); + base::RunLoop().RunUntilIdle(); + + EXPECT_EQ(1, interceptor->GetCount()) << interceptor->GetRequestsAsString(); + EXPECT_NE(string::npos, + interceptor->GetRequests()[0].find( + "<app appid=\"abc\" version=\"1.0\">" + "<event eventtype=\"3\" eventresult=\"0\"/></app>")) + << interceptor->GetRequestsAsString(); + interceptor->Reset(); + } + + { // Test the download metrics. Component component(*update_context, "abc"); component.state_ = base::MakeUnique<Component::StateUpdated>(&component);
diff --git a/components/update_client/protocol_builder.cc b/components/update_client/protocol_builder.cc index 932f705..f8430b1 100644 --- a/components/update_client/protocol_builder.cc +++ b/components/update_client/protocol_builder.cc
@@ -350,26 +350,31 @@ std::string BuildEventPingRequest(const Configurator& config, const Component& component) { DCHECK(component.state() == ComponentState::kUpdateError || + component.state() == ComponentState::kUpToDate || component.state() == ComponentState::kUpdated || component.state() == ComponentState::kUninstalled); - const char app_element_format[] = - "<app appid=\"%s\" version=\"%s\" nextversion=\"%s\">" - "%s" - "</app>"; - - const std::string app_element(base::StringPrintf( - app_element_format, - component.id().c_str(), // "appid" - component.previous_version().GetString().c_str(), // "version" - component.next_version().GetString().c_str(), // "nextversion" - base::JoinString(component.events(), "").c_str())); // events + // |next_version| is an optional argument for some ping types. This member + // is set by the value returned in the update check response. However, some + // of the pings are sent as a result of actions where the response did not + // include a manifest, neither a version. + std::string app = + base::StringPrintf("<app appid=\"%s\"", component.id().c_str()); + base::StringAppendF(&app, " version=\"%s\"", + component.previous_version().GetString().c_str()); + if (component.next_version().IsValid()) + base::StringAppendF(&app, " nextversion=\"%s\"", + component.next_version().GetString().c_str()); + base::StringAppendF(&app, ">"); + base::StringAppendF(&app, "%s", + base::JoinString(component.events(), "").c_str()); + base::StringAppendF(&app, "</app>"); // The ping request does not include any updater state. return BuildProtocolRequest( config.GetProdId(), config.GetBrowserVersion().GetString(), config.GetChannel(), config.GetLang(), config.GetOSLongName(), - config.GetDownloadPreference(), app_element, "", nullptr); + config.GetDownloadPreference(), app, "", nullptr); } } // namespace update_client
diff --git a/components/vector_icons/BUILD.gn b/components/vector_icons/BUILD.gn index ffc9a53..4b649e9 100644 --- a/components/vector_icons/BUILD.gn +++ b/components/vector_icons/BUILD.gn
@@ -8,6 +8,7 @@ icon_directory = "." icons = [ + "bluetooth_connected.icon", "screen_share.1x.icon", "screen_share.icon", ]
diff --git a/chrome/app/vector_icons/bluetooth_connected.icon b/components/vector_icons/bluetooth_connected.icon similarity index 100% rename from chrome/app/vector_icons/bluetooth_connected.icon rename to components/vector_icons/bluetooth_connected.icon
diff --git a/components/viz/common/BUILD.gn b/components/viz/common/BUILD.gn new file mode 100644 index 0000000..fdefcb8 --- /dev/null +++ b/components/viz/common/BUILD.gn
@@ -0,0 +1,82 @@ +# Copyright 2017 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//testing/test.gni") + +source_set("common") { + sources = [ + "gl_helper.cc", + "gl_helper.h", + "gl_helper_readback_support.cc", + "gl_helper_readback_support.h", + "gl_helper_scaling.cc", + "gl_helper_scaling.h", + ] + + deps = [ + "//gpu/command_buffer/client:gles2_interface", + "//skia", + "//ui/gfx/geometry", + ] + + public_deps = [ + "//gpu/command_buffer/client", + "//gpu/command_buffer/common", + ] +} + +source_set("unit_tests") { + testonly = true + sources = [ + "yuv_readback_unittest.cc", + ] + + if (!is_android) { + sources += [ + # Many of these fail on Android with the test GL implementation. + "gl_helper_unittest.cc", + ] + } + + deps = [ + ":common", + "//base/test:test_support", + "//gpu/command_buffer/client:gles2_implementation", + "//gpu/command_buffer/client:gles2_interface", + "//gpu/ipc:gl_in_process_context", + "//gpu/ipc/common:surface_handle_type", + "//media", + "//testing/gtest", + ] +} + +# Microbenchmark to measure performance of GLHelper code, for use in +# debugging, profiling, and optimizing. +test("viz_benchmark") { + sources = [ + "gl_helper_benchmark.cc", + ] + + configs += [ + "//build/config/compiler:no_size_t_to_int_warning", + "//third_party/khronos:khronos_headers", + ] + + deps = [ + ":common", + "//base", + "//base/test:test_support", + "//components/test:run_all_unittests", + "//gpu/command_buffer/client", + "//gpu/command_buffer/client:gles2_implementation", + "//gpu/ipc:gl_in_process_context", + "//testing/gmock", + "//testing/gtest", + "//ui/gfx", + ] + + data_deps = [ + "//third_party/mesa:osmesa", + ] +}
diff --git a/components/viz/common/DEPS b/components/viz/common/DEPS new file mode 100644 index 0000000..6df009f --- /dev/null +++ b/components/viz/common/DEPS
@@ -0,0 +1,16 @@ +include_rules = [ + "+ui/gfx/geometry", + "+services/ui/gpu/interfaces", + "+third_party/skia", +] + +specific_include_rules = { + ".*_unittest\.cc": [ + "+media/base", + "+ui/gfx", + "+ui/gl", + ], + ".*_benchmark\.cc": [ + "+ui/gfx", + ], +}
diff --git a/components/viz/service/display_compositor/gl_helper.cc b/components/viz/common/gl_helper.cc similarity index 97% rename from components/viz/service/display_compositor/gl_helper.cc rename to components/viz/common/gl_helper.cc index ad178fa..003db7b 100644 --- a/components/viz/service/display_compositor/gl_helper.cc +++ b/components/viz/common/gl_helper.cc
@@ -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 "components/viz/service/display_compositor/gl_helper.h" +#include "components/viz/common/gl_helper.h" #include <stddef.h> #include <stdint.h> @@ -16,11 +16,12 @@ #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/message_loop/message_loop.h" +#include "base/numerics/safe_conversions.h" #include "base/strings/string_util.h" #include "base/time/time.h" #include "base/trace_event/trace_event.h" -#include "components/viz/service/display_compositor/gl_helper_readback_support.h" -#include "components/viz/service/display_compositor/gl_helper_scaling.h" +#include "components/viz/common/gl_helper_readback_support.h" +#include "components/viz/common/gl_helper_scaling.h" #include "gpu/GLES2/gl2extchromium.h" #include "gpu/command_buffer/client/context_support.h" #include "gpu/command_buffer/common/mailbox.h" @@ -155,15 +156,14 @@ // Reads back bytes from the currently bound frame buffer. // Note that dst_size is specified in bytes, not pixels. - void ReadbackAsync( - const gfx::Size& dst_size, - int32_t bytes_per_row, // generally dst_size.width() * 4 - int32_t row_stride_bytes, // generally dst_size.width() * 4 - unsigned char* out, - GLenum format, - GLenum type, - size_t bytes_per_pixel, - const base::Callback<void(bool)>& callback); + void ReadbackAsync(const gfx::Size& dst_size, + size_t bytes_per_row, // generally dst_size.width() * 4 + size_t row_stride_bytes, // generally dst_size.width() * 4 + unsigned char* out, + GLenum format, + GLenum type, + size_t bytes_per_pixel, + const base::Callback<void(bool)>& callback); void ReadbackPlane(TextureFrameBufferPair* source, int row_stride_bytes, @@ -207,8 +207,8 @@ // must be deleted by the main thread gl. struct Request { Request(const gfx::Size& size_, - int32_t bytes_per_row_, - int32_t row_stride_bytes_, + size_t bytes_per_row_, + size_t row_stride_bytes_, unsigned char* pixels_, const base::Callback<void(bool)>& callback_) : done(false), @@ -223,8 +223,8 @@ bool done; bool result; gfx::Size size; - int bytes_per_row; - int row_stride_bytes; + size_t bytes_per_row; + size_t row_stride_bytes; unsigned char* pixels; base::Callback<void(bool)> callback; GLuint buffer; @@ -372,7 +372,7 @@ bool swizzle); static void nullcallback(bool success) {} - void ReadbackDone(Request* request, int bytes_per_pixel); + void ReadbackDone(Request* request, size_t bytes_per_pixel); void FinishRequest(Request* request, bool result, FinishRequestHelper* helper); @@ -469,8 +469,8 @@ void GLHelper::CopyTextureToImpl::ReadbackAsync( const gfx::Size& dst_size, - int32_t bytes_per_row, - int32_t row_stride_bytes, + size_t bytes_per_row, + size_t row_stride_bytes, unsigned char* out, GLenum format, GLenum type, @@ -577,9 +577,9 @@ gl_->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture, 0); - int32_t bytes_per_row = out_color_type == kAlpha_8_SkColorType - ? dst_size.width() - : dst_size.width() * bytes_per_pixel; + size_t bytes_per_row = out_color_type == kAlpha_8_SkColorType + ? dst_size.width() + : dst_size.width() * bytes_per_pixel; ReadbackAsync(readback_texture_size, bytes_per_row, bytes_per_row, out, format, type, bytes_per_pixel, callback); @@ -647,7 +647,7 @@ } void GLHelper::CopyTextureToImpl::ReadbackDone(Request* finished_request, - int bytes_per_pixel) { + size_t bytes_per_pixel) { TRACE_EVENT0("gpu.capture", "GLHelper::CopyTextureToImpl::CheckReadbackFramebufferComplete"); finished_request->done = true; @@ -803,7 +803,7 @@ GLuint GLHelper::CompileShaderFromSource(const GLchar* source, GLenum type) { GLuint shader = gl_->CreateShader(type); - GLint length = strlen(source); + GLint length = base::checked_cast<GLint>(strlen(source)); gl_->ShaderSource(shader, 1, &source, &length); gl_->CompileShader(shader); GLint compile_status = 0;
diff --git a/components/viz/service/display_compositor/gl_helper.h b/components/viz/common/gl_helper.h similarity index 96% rename from components/viz/service/display_compositor/gl_helper.h rename to components/viz/common/gl_helper.h index bdab5da..6e6bed7 100644 --- a/components/viz/service/display_compositor/gl_helper.h +++ b/components/viz/common/gl_helper.h
@@ -2,15 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef COMPONENTS_VIZ_SERVICE_DISPLAY_COMPOSITOR_GL_HELPER_H_ -#define COMPONENTS_VIZ_SERVICE_DISPLAY_COMPOSITOR_GL_HELPER_H_ +#ifndef COMPONENTS_VIZ_COMMON_GL_HELPER_H_ +#define COMPONENTS_VIZ_COMMON_GL_HELPER_H_ #include <memory> #include "base/atomicops.h" #include "base/callback.h" #include "base/macros.h" -#include "components/viz/service/viz_service_export.h" #include "gpu/command_buffer/client/gles2_interface.h" #include "gpu/command_buffer/common/mailbox_holder.h" #include "third_party/skia/include/core/SkBitmap.h" @@ -19,12 +18,12 @@ class Point; class Rect; class Size; -} +} // namespace gfx namespace gpu { class ContextSupport; struct Mailbox; -} +} // namespace gpu class SkRegion; @@ -32,7 +31,7 @@ class GLHelperScaling; -class VIZ_SERVICE_EXPORT ScopedGLuint { +class ScopedGLuint { public: typedef void (gpu::gles2::GLES2Interface::*GenFunc)(GLsizei n, GLuint* ids); typedef void (gpu::gles2::GLES2Interface::*DeleteFunc)(GLsizei n, @@ -134,7 +133,7 @@ // Provides higher level operations on top of the gpu::gles2::GLES2Interface // interfaces. -class VIZ_SERVICE_EXPORT GLHelper { +class GLHelper { public: GLHelper(gpu::gles2::GLES2Interface* gl, gpu::ContextSupport* context_support); @@ -280,7 +279,7 @@ // needed to scale from a specified size to a destination size. // If the source or destination sizes changes, you must create // a new scaler. - class VIZ_SERVICE_EXPORT ScalerInterface { + class ScalerInterface { public: ScalerInterface() {} virtual ~ScalerInterface() {} @@ -354,7 +353,7 @@ // can handle multiple outstanding readbacks at the same time, but // if the source or destination sizes change, you'll need to create // a new readback pipeline. -class VIZ_SERVICE_EXPORT ReadbackYUVInterface { +class ReadbackYUVInterface { public: ReadbackYUVInterface() {} virtual ~ReadbackYUVInterface() {} @@ -380,4 +379,4 @@ } // namespace viz -#endif // COMPONENTS_VIZ_SERVICE_DISPLAY_COMPOSITOR_GL_HELPER_H_ +#endif // COMPONENTS_VIZ_COMMON_GL_HELPER_H_
diff --git a/components/viz/service/display_compositor/gl_helper_benchmark.cc b/components/viz/common/gl_helper_benchmark.cc similarity index 97% rename from components/viz/service/display_compositor/gl_helper_benchmark.cc rename to components/viz/common/gl_helper_benchmark.cc index c9d83341..59c3a73 100644 --- a/components/viz/service/display_compositor/gl_helper_benchmark.cc +++ b/components/viz/common/gl_helper_benchmark.cc
@@ -23,10 +23,11 @@ #include "base/files/file_util.h" #include "base/macros.h" #include "base/strings/stringprintf.h" +#include "base/test/scoped_task_environment.h" #include "base/threading/thread_task_runner_handle.h" #include "base/time/time.h" -#include "components/viz/service/display_compositor/gl_helper.h" -#include "components/viz/service/display_compositor/gl_helper_scaling.h" +#include "components/viz/common/gl_helper.h" +#include "components/viz/common/gl_helper_scaling.h" #include "gpu/command_buffer/client/gles2_implementation.h" #include "gpu/command_buffer/client/shared_memory_limits.h" #include "gpu/ipc/gl_in_process_context.h" @@ -34,7 +35,6 @@ #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkTypes.h" #include "ui/gfx/codec/png_codec.h" -#include "ui/gl/gl_surface.h" namespace viz { @@ -115,6 +115,7 @@ base::CloseFile(f); } + base::test::ScopedTaskEnvironment scoped_task_environment_; std::unique_ptr<gpu::GLInProcessContext> context_; gpu::gles2::GLES2Interface* gl_; std::unique_ptr<GLHelper> helper_;
diff --git a/components/viz/service/display_compositor/gl_helper_readback_support.cc b/components/viz/common/gl_helper_readback_support.cc similarity index 98% rename from components/viz/service/display_compositor/gl_helper_readback_support.cc rename to components/viz/common/gl_helper_readback_support.cc index ae70d19..6c81619 100644 --- a/components/viz/service/display_compositor/gl_helper_readback_support.cc +++ b/components/viz/common/gl_helper_readback_support.cc
@@ -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 "components/viz/service/display_compositor/gl_helper_readback_support.h" +#include "components/viz/common/gl_helper_readback_support.h" #include "base/logging.h" #include "gpu/GLES2/gl2extchromium.h" #include "third_party/skia/include/core/SkImageInfo.h"
diff --git a/components/viz/service/display_compositor/gl_helper_readback_support.h b/components/viz/common/gl_helper_readback_support.h similarity index 85% rename from components/viz/service/display_compositor/gl_helper_readback_support.h rename to components/viz/common/gl_helper_readback_support.h index 2e1505e..0bb76d5 100644 --- a/components/viz/service/display_compositor/gl_helper_readback_support.h +++ b/components/viz/common/gl_helper_readback_support.h
@@ -2,19 +2,18 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef COMPONENTS_VIZ_SERVICE_DISPLAY_COMPOSITOR_GL_HELPER_READBACK_SUPPORT_H_ -#define COMPONENTS_VIZ_SERVICE_DISPLAY_COMPOSITOR_GL_HELPER_READBACK_SUPPORT_H_ +#ifndef COMPONENTS_VIZ_COMMON_GL_HELPER_READBACK_SUPPORT_H_ +#define COMPONENTS_VIZ_COMMON_GL_HELPER_READBACK_SUPPORT_H_ #include <stddef.h> #include <vector> -#include "components/viz/service/display_compositor/gl_helper.h" -#include "components/viz/service/viz_service_export.h" +#include "components/viz/common/gl_helper.h" namespace viz { -class VIZ_SERVICE_EXPORT GLHelperReadbackSupport { +class GLHelperReadbackSupport { public: enum FormatSupport { SUPPORTED, SWIZZLE, NOT_SUPPORTED }; @@ -73,4 +72,4 @@ } // namespace viz -#endif // COMPONENTS_VIZ_SERVICE_DISPLAY_COMPOSITOR_GL_HELPER_READBACK_SUPPORT_H_ +#endif // COMPONENTS_VIZ_COMMON_GL_HELPER_READBACK_SUPPORT_H_
diff --git a/components/viz/service/display_compositor/gl_helper_scaling.cc b/components/viz/common/gl_helper_scaling.cc similarity index 98% rename from components/viz/service/display_compositor/gl_helper_scaling.cc rename to components/viz/common/gl_helper_scaling.cc index 0a7ed56..e394202d 100644 --- a/components/viz/service/display_compositor/gl_helper_scaling.cc +++ b/components/viz/common/gl_helper_scaling.cc
@@ -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 "components/viz/service/display_compositor/gl_helper_scaling.h" +#include "components/viz/common/gl_helper_scaling.h" #include <stddef.h> @@ -14,6 +14,7 @@ #include "base/lazy_instance.h" #include "base/logging.h" #include "base/macros.h" +#include "base/memory/ptr_util.h" #include "base/memory/ref_counted.h" #include "base/message_loop/message_loop.h" #include "base/time/time.h" @@ -169,8 +170,9 @@ ScopedFramebufferBinder<GL_FRAMEBUFFER> framebuffer_binder( gl_, dst_framebuffer_); DCHECK_GT(dest_textures.size(), 0U); - std::unique_ptr<GLenum[]> buffers(new GLenum[dest_textures.size()]); - for (size_t t = 0; t < dest_textures.size(); t++) { + auto num_dest_textures = static_cast<GLsizei>(dest_textures.size()); + auto buffers = base::MakeUnique<GLenum[]>(num_dest_textures); + for (GLsizei t = 0; t < num_dest_textures; t++) { ScopedTextureBinder<GL_TEXTURE_2D> texture_binder(gl_, dest_textures[t]); gl_->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + t, GL_TEXTURE_2D, dest_textures[t], 0); @@ -190,10 +192,9 @@ spec_.vertically_flip_texture, color_weights_); gl_->Viewport(0, 0, spec_.dst_size.width(), spec_.dst_size.height()); - if (dest_textures.size() > 1) { - DCHECK_LE(static_cast<int>(dest_textures.size()), - scaler_helper_->helper_->MaxDrawBuffers()); - gl_->DrawBuffersEXT(dest_textures.size(), buffers.get()); + if (num_dest_textures > 1) { + DCHECK_LE(num_dest_textures, scaler_helper_->helper_->MaxDrawBuffers()); + gl_->DrawBuffersEXT(num_dest_textures, buffers.get()); } // Conduct texture mapping by drawing a quad composed of two triangles. gl_->DrawArrays(GL_TRIANGLE_STRIP, 0, 4);
diff --git a/components/viz/service/display_compositor/gl_helper_scaling.h b/components/viz/common/gl_helper_scaling.h similarity index 93% rename from components/viz/service/display_compositor/gl_helper_scaling.h rename to components/viz/common/gl_helper_scaling.h index bbc0b21b..6a5a03f 100644 --- a/components/viz/service/display_compositor/gl_helper_scaling.h +++ b/components/viz/common/gl_helper_scaling.h
@@ -2,16 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef COMPONENTS_VIZ_SERVICE_DISPLAY_COMPOSITOR_GL_HELPER_SCALING_H_ -#define COMPONENTS_VIZ_SERVICE_DISPLAY_COMPOSITOR_GL_HELPER_SCALING_H_ +#ifndef COMPONENTS_VIZ_COMMON_GL_HELPER_SCALING_H_ +#define COMPONENTS_VIZ_COMMON_GL_HELPER_SCALING_H_ #include <deque> #include <map> #include <vector> #include "base/macros.h" -#include "components/viz/service/display_compositor/gl_helper.h" -#include "components/viz/service/viz_service_export.h" +#include "components/viz/common/gl_helper.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/size.h" @@ -24,7 +23,7 @@ // Implements GPU texture scaling methods. // Note that you should probably not use this class directly. // See gl_helper.cc::CreateScaler instead. -class VIZ_SERVICE_EXPORT GLHelperScaling { +class GLHelperScaling { public: enum ShaderType { SHADER_BILINEAR, @@ -41,7 +40,7 @@ // Similar to ScalerInterface, but can generate multiple outputs. // Used for YUV conversion in gl_helper.c - class VIZ_SERVICE_EXPORT ShaderInterface { + class ShaderInterface { public: ShaderInterface() {} virtual ~ShaderInterface() {} @@ -51,7 +50,7 @@ const std::vector<GLuint>& dest_textures) = 0; }; - typedef std::pair<ShaderType, bool> ShaderProgramKeyType; + using ShaderProgramKeyType = std::pair<ShaderType, bool>; GLHelperScaling(gpu::gles2::GLES2Interface* gl, GLHelper* helper); ~GLHelperScaling(); @@ -205,4 +204,4 @@ } // namespace viz -#endif // COMPONENTS_VIZ_SERVICE_DISPLAY_COMPOSITOR_GL_HELPER_SCALING_H_ +#endif // COMPONENTS_VIZ_COMMON_GL_HELPER_SCALING_H_
diff --git a/components/viz/service/display_compositor/gl_helper_unittest.cc b/components/viz/common/gl_helper_unittest.cc similarity index 98% rename from components/viz/service/display_compositor/gl_helper_unittest.cc rename to components/viz/common/gl_helper_unittest.cc index 41831db..923787b 100644 --- a/components/viz/service/display_compositor/gl_helper_unittest.cc +++ b/components/viz/common/gl_helper_unittest.cc
@@ -14,32 +14,24 @@ #include <GLES2/gl2ext.h> #include <GLES2/gl2extchromium.h> -#include "base/at_exit.h" #include "base/bind.h" -#include "base/command_line.h" -#include "base/files/file_util.h" -#include "base/json/json_reader.h" #include "base/macros.h" #include "base/memory/ref_counted_memory.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "base/strings/stringprintf.h" #include "base/synchronization/waitable_event.h" -#include "base/test/launcher/unit_test_launcher.h" -#include "base/test/test_suite.h" #include "base/threading/thread_task_runner_handle.h" #include "base/time/time.h" -#include "base/trace_event/trace_event.h" -#include "components/viz/service/display_compositor/gl_helper.h" -#include "components/viz/service/display_compositor/gl_helper_readback_support.h" -#include "components/viz/service/display_compositor/gl_helper_scaling.h" +#include "components/viz/common/gl_helper.h" +#include "components/viz/common/gl_helper_readback_support.h" +#include "components/viz/common/gl_helper_scaling.h" #include "gpu/command_buffer/client/gles2_implementation.h" #include "gpu/command_buffer/client/shared_memory_limits.h" #include "gpu/ipc/gl_in_process_context.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkTypes.h" -#include "ui/gl/gl_implementation.h" namespace viz {
diff --git a/components/viz/service/display_compositor/yuv_readback_unittest.cc b/components/viz/common/yuv_readback_unittest.cc similarity index 98% rename from components/viz/service/display_compositor/yuv_readback_unittest.cc rename to components/viz/common/yuv_readback_unittest.cc index 4306c03..de4c608 100644 --- a/components/viz/service/display_compositor/yuv_readback_unittest.cc +++ b/components/viz/common/yuv_readback_unittest.cc
@@ -6,12 +6,10 @@ #include "base/memory/ref_counted_memory.h" #include "base/run_loop.h" #include "base/strings/stringprintf.h" -#include "base/test/launcher/unit_test_launcher.h" #include "base/test/scoped_task_environment.h" -#include "base/test/test_suite.h" #include "base/threading/thread_task_runner_handle.h" #include "base/trace_event/trace_event.h" -#include "components/viz/service/display_compositor/gl_helper.h" +#include "components/viz/common/gl_helper.h" #include "gpu/command_buffer/client/gles2_implementation.h" #include "gpu/command_buffer/client/shared_memory_limits.h" #include "gpu/ipc/common/surface_handle.h" @@ -20,7 +18,6 @@ #include "media/base/video_util.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/skia/include/core/SkBitmap.h" -#include "ui/gl/gl_implementation.h" namespace viz { @@ -473,11 +470,11 @@ gl_->DeleteTextures(1, &src_texture); } + base::test::ScopedTaskEnvironment scoped_task_environment_; std::unique_ptr<gpu::GLInProcessContext> context_; gpu::gles2::GLES2Interface* gl_; std::unique_ptr<GLHelper> helper_; gl::DisableNullDrawGLBindings enable_pixel_output_; - base::test::ScopedTaskEnvironment scoped_task_environment_; }; TEST_F(YUVReadbackTest, YUVReadbackOptTest) {
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn index b8dde84..b5f8307 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn
@@ -3,7 +3,6 @@ # found in the LICENSE file. import("//build/config/ui.gni") -import("//testing/test.gni") config("viz_service_implementation") { } @@ -16,12 +15,6 @@ "display_compositor/display_output_surface.cc", "display_compositor/display_output_surface.h", "display_compositor/display_provider.h", - "display_compositor/gl_helper.cc", - "display_compositor/gl_helper.h", - "display_compositor/gl_helper_readback_support.cc", - "display_compositor/gl_helper_readback_support.h", - "display_compositor/gl_helper_scaling.cc", - "display_compositor/gl_helper_scaling.h", "display_compositor/gpu_display_provider.cc", "display_compositor/gpu_display_provider.h", "display_compositor/host_shared_bitmap_manager.cc", @@ -47,10 +40,13 @@ configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] deps = [ + "//components/viz/common", + # Note that dependency on //gpu/ipc/client is for GpuMemoryBufferImpl. This # dependency should not be in public_deps. "//gpu/ipc/client", "//gpu/ipc/service", + "//ui/display/types", ] public_deps = [ @@ -58,14 +54,8 @@ "//cc", "//cc/ipc:interfaces", "//cc/surfaces", - "//gpu/command_buffer/client", "//gpu/command_buffer/client:gles2_interface", - "//gpu/command_buffer/common", "//gpu/ipc:command_buffer", - "//gpu/ipc/common:surface_handle_type", - "//skia", - "//ui/display/types", - "//ui/gfx", ] if (is_mac) { @@ -123,85 +113,9 @@ "//base", "//base/test:test_support", "//cc:test_support", - "//gpu/command_buffer/client", - "//gpu/command_buffer/client:gles2_implementation", - "//gpu/ipc:gl_in_process_context", - "//media", - "//skia", + "//components/viz/common", "//testing/gmock", "//testing/gtest", "//ui/display/types", - "//ui/gl:test_support", - ] - - data_deps = [ - "//third_party/mesa:osmesa", - ] -} - -test("display_compositor_gl_tests") { - sources = [ - "display_compositor/display_compositor_test_suite.cc", - "display_compositor/display_compositor_test_suite.h", - "display_compositor/gl_helper_unittest.cc", - "display_compositor/run_all_unittests.cc", - "display_compositor/yuv_readback_unittest.cc", - ] - - configs += [ - "//build/config/compiler:no_size_t_to_int_warning", - "//third_party/khronos:khronos_headers", - ] - - deps = [ - ":service", - "//base", - "//base/test:test_support", - "//cc:test_support", - "//gpu/command_buffer/client", - "//gpu/command_buffer/client:gles2_implementation", - "//gpu/ipc:gl_in_process_context", - "//media", - "//skia", - "//testing/gmock", - "//testing/gtest", - "//ui/gl:test_support", - ] - - data_deps = [ - "//third_party/mesa:osmesa", - ] -} - -test("display_compositor_benchmark") { - sources = [ - "display_compositor/display_compositor_test_suite.cc", - "display_compositor/display_compositor_test_suite.h", - "display_compositor/gl_helper_benchmark.cc", - "display_compositor/run_all_unittests.cc", - ] - - configs += [ - "//build/config/compiler:no_size_t_to_int_warning", - "//third_party/khronos:khronos_headers", - ] - - deps = [ - ":service", - "//base", - "//base/test:test_support", - "//cc:test_support", - "//gpu/command_buffer/client", - "//gpu/command_buffer/client:gles2_implementation", - "//gpu/ipc:gl_in_process_context", - "//media", - "//skia", - "//testing/gmock", - "//testing/gtest", - "//ui/gl:test_support", - ] - - data_deps = [ - "//third_party/mesa:osmesa", ] }
diff --git a/components/viz/service/display_compositor/DEPS b/components/viz/service/display_compositor/DEPS index c170d0d..dba221e 100644 --- a/components/viz/service/display_compositor/DEPS +++ b/components/viz/service/display_compositor/DEPS
@@ -5,25 +5,27 @@ "+cc/resources", "+cc/scheduler", "+cc/surfaces", - "+cc/test", "+gpu/GLES2", "+gpu/command_buffer/client", "+gpu/command_buffer/common", - "+gpu/ipc", + "+gpu/command_buffer/service", + "+gpu/ipc/client", "+gpu/ipc/common", + "+gpu/ipc/service", "+mojo/public/cpp/bindings", "+mojo/public/cpp/system", - "+third_party/khronos/GLES2", "+third_party/skia", "+ui/display", "+ui/gfx", + "+ui/gfx/geometry", "+ui/gl", "+ui/latency", "+ui/ozone/public", ] specific_include_rules = { - "yuv_readback_unittest\.cc": [ - "+media/base", + ".*_unittest\.cc": [ + "+cc/test", + "+third_party/khronos/GLES2", ], }
diff --git a/components/viz/service/display_compositor/buffer_queue.cc b/components/viz/service/display_compositor/buffer_queue.cc index f4542f9..10e4008 100644 --- a/components/viz/service/display_compositor/buffer_queue.cc +++ b/components/viz/service/display_compositor/buffer_queue.cc
@@ -7,7 +7,7 @@ #include "base/containers/adapters.h" #include "base/memory/ptr_util.h" #include "build/build_config.h" -#include "components/viz/service/display_compositor/gl_helper.h" +#include "components/viz/common/gl_helper.h" #include "gpu/GLES2/gl2extchromium.h" #include "gpu/command_buffer/client/gles2_interface.h" #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
diff --git a/components/viz/service/display_compositor/buffer_queue_unittest.cc b/components/viz/service/display_compositor/buffer_queue_unittest.cc index afa9da5..1c77f9e 100644 --- a/components/viz/service/display_compositor/buffer_queue_unittest.cc +++ b/components/viz/service/display_compositor/buffer_queue_unittest.cc
@@ -14,7 +14,7 @@ #include "cc/test/test_context_provider.h" #include "cc/test/test_gpu_memory_buffer_manager.h" #include "cc/test/test_web_graphics_context_3d.h" -#include "components/viz/service/display_compositor/gl_helper.h" +#include "components/viz/common/gl_helper.h" #include "gpu/GLES2/gl2extchromium.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h"
diff --git a/components/viz/service/display_compositor/display_compositor_test_suite.cc b/components/viz/service/display_compositor/display_compositor_test_suite.cc deleted file mode 100644 index b3ddb3df..0000000 --- a/components/viz/service/display_compositor/display_compositor_test_suite.cc +++ /dev/null
@@ -1,38 +0,0 @@ -// Copyright 2016 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "components/viz/service/display_compositor/display_compositor_test_suite.h" - -#include "base/message_loop/message_loop.h" -#include "base/threading/thread_id_name_manager.h" -#include "cc/test/paths.h" -#include "ui/gl/test/gl_surface_test_support.h" - -namespace viz { - -DisplayCompositorTestSuite::DisplayCompositorTestSuite(int argc, char** argv) - : base::TestSuite(argc, argv) {} - -DisplayCompositorTestSuite::~DisplayCompositorTestSuite() {} - -void DisplayCompositorTestSuite::Initialize() { - base::TestSuite::Initialize(); - gl::GLSurfaceTestSupport::InitializeOneOff(); - cc::CCPaths::RegisterPathProvider(); - - message_loop_.reset(new base::MessageLoop); - - base::ThreadIdNameManager::GetInstance()->SetName( - base::PlatformThread::CurrentId(), "Main"); - - base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_); -} - -void DisplayCompositorTestSuite::Shutdown() { - message_loop_ = nullptr; - - base::TestSuite::Shutdown(); -} - -} // namespace viz
diff --git a/components/viz/service/display_compositor/display_compositor_test_suite.h b/components/viz/service/display_compositor/display_compositor_test_suite.h deleted file mode 100644 index e3bdb08..0000000 --- a/components/viz/service/display_compositor/display_compositor_test_suite.h +++ /dev/null
@@ -1,39 +0,0 @@ -// Copyright 2016 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef COMPONENTS_VIZ_SERVICE_DISPLAY_COMPOSITOR_DISPLAY_COMPOSITOR_TEST_SUITE_H_ -#define COMPONENTS_VIZ_SERVICE_DISPLAY_COMPOSITOR_DISPLAY_COMPOSITOR_TEST_SUITE_H_ - -#include <memory> - -#include "base/macros.h" -#include "base/test/test_discardable_memory_allocator.h" -#include "base/test/test_suite.h" - -namespace base { -class MessageLoop; -} - -namespace viz { - -class DisplayCompositorTestSuite : public base::TestSuite { - public: - DisplayCompositorTestSuite(int argc, char** argv); - ~DisplayCompositorTestSuite() override; - - protected: - // Overridden from base::TestSuite: - void Initialize() override; - void Shutdown() override; - - private: - std::unique_ptr<base::MessageLoop> message_loop_; - - base::TestDiscardableMemoryAllocator discardable_memory_allocator_; - DISALLOW_COPY_AND_ASSIGN(DisplayCompositorTestSuite); -}; - -} // namespace viz - -#endif // COMPONENTS_VIZ_SERVICE_DISPLAY_COMPOSITOR_DISPLAY_COMPOSITOR_TEST_SUITE_H_
diff --git a/components/viz/service/display_compositor/display_output_surface_ozone.h b/components/viz/service/display_compositor/display_output_surface_ozone.h index 64cfa926..0e1b4db 100644 --- a/components/viz/service/display_compositor/display_output_surface_ozone.h +++ b/components/viz/service/display_compositor/display_output_surface_ozone.h
@@ -11,8 +11,8 @@ #include "cc/output/context_provider.h" #include "cc/output/in_process_context_provider.h" #include "cc/output/output_surface.h" +#include "components/viz/common/gl_helper.h" #include "components/viz/service/display_compositor/display_output_surface.h" -#include "components/viz/service/display_compositor/gl_helper.h" #include "ui/gfx/geometry/size.h" #include "ui/gfx/native_widget_types.h" #include "ui/gfx/swap_result.h"
diff --git a/components/viz/service/display_compositor/run_all_unittests.cc b/components/viz/service/display_compositor/run_all_unittests.cc deleted file mode 100644 index ef3886dc..0000000 --- a/components/viz/service/display_compositor/run_all_unittests.cc +++ /dev/null
@@ -1,15 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "base/bind.h" -#include "base/test/launcher/unit_test_launcher.h" -#include "components/viz/service/display_compositor/display_compositor_test_suite.h" - -int main(int argc, char** argv) { - viz::DisplayCompositorTestSuite test_suite(argc, argv); - - return base::LaunchUnitTests(argc, argv, - base::Bind(&viz::DisplayCompositorTestSuite::Run, - base::Unretained(&test_suite))); -}
diff --git a/components/webdata/common/BUILD.gn b/components/webdata/common/BUILD.gn index 7a11220..921d444 100644 --- a/components/webdata/common/BUILD.gn +++ b/components/webdata/common/BUILD.gn
@@ -60,6 +60,7 @@ "//components/test/data/web_database/version_71.sql", "//components/test/data/web_database/version_72.sql", "//components/test/data/web_database/version_73.sql", + "//components/test/data/web_database/version_73_with_type_column.sql", ] outputs = [ "{{bundle_resources_dir}}/" +
diff --git a/components/webdata/common/web_database_migration_unittest.cc b/components/webdata/common/web_database_migration_unittest.cc index 8c6a30f5..a119b444 100644 --- a/components/webdata/common/web_database_migration_unittest.cc +++ b/components/webdata/common/web_database_migration_unittest.cc
@@ -1359,3 +1359,52 @@ EXPECT_EQ(CreditCard::CARD_TYPE_UNKNOWN, cards.ColumnInt(2)); } } + +// Tests that version 73 with "type" column instead of "bank_name" column can be +// migrated to version 74 with both of these columns. This is necessary to +// verify that the version 73 collision resolves itself. +TEST_F(WebDatabaseMigrationTest, MigrateVersion73WithTypeColumnToCurrent) { + ASSERT_NO_FATAL_FAILURE( + LoadDatabase(FILE_PATH_LITERAL("version_73_with_type_column.sql"))); + + // Verify pre-conditions. + { + sql::Connection connection; + ASSERT_TRUE(connection.Open(GetDatabasePath())); + ASSERT_TRUE(sql::MetaTable::DoesTableExist(&connection)); + + sql::MetaTable meta_table; + ASSERT_TRUE(meta_table.Init(&connection, 73, 73)); + + EXPECT_FALSE( + connection.DoesColumnExist("masked_credit_cards", "bank_name")); + EXPECT_TRUE(connection.DoesColumnExist("masked_credit_cards", "type")); + + EXPECT_TRUE(connection.Execute( + "INSERT INTO masked_credit_cards (type) VALUES (2)")); + } + + DoMigration(); + + // Verify post-conditions. + { + sql::Connection connection; + ASSERT_TRUE(connection.Open(GetDatabasePath())); + ASSERT_TRUE(sql::MetaTable::DoesTableExist(&connection)); + + // Check version. + EXPECT_EQ(kCurrentTestedVersionNumber, VersionFromConnection(&connection)); + + // The bank_name column should exist. + EXPECT_TRUE(connection.DoesColumnExist("masked_credit_cards", "bank_name")); + + // The type column should exist. + EXPECT_TRUE(connection.DoesColumnExist("masked_credit_cards", "type")); + + // Make sure that the existing value of the type column is preserved. + sql::Statement s_masked_cards( + connection.GetUniqueStatement("SELECT type FROM masked_credit_cards")); + ASSERT_TRUE(s_masked_cards.Step()); + EXPECT_EQ(2, s_masked_cards.ColumnInt(0)); + } +}
diff --git a/content/app/strings/content_strings.grd b/content/app/strings/content_strings.grd index 8b521fc..bed0ca1 100644 --- a/content/app/strings/content_strings.grd +++ b/content/app/strings/content_strings.grd
@@ -171,24 +171,12 @@ <message name="IDS_DOWNLOAD_BUTTON_LABEL" desc="Clickable button label to download media file."> Save </message> - <message name="IDS_SEARCHABLE_INDEX_INTRO" desc="Text that appears at the start of nearly-obsolete webpages in the form of a 'searchable index'."> - This is a searchable index. Enter search keywords: ''' - </message> <message name="IDS_FORM_CALENDAR_CLEAR" desc="Label for a button which clears a date input field."> Clear </message> <message name="IDS_FORM_CALENDAR_TODAY" desc="Label for a button which sets today to a date input field."> Today </message> - <message name="IDS_FORM_DATE_FORMAT_DAY_IN_MONTH" desc="Short word to indicate which is the day-in-month part in a date format. e.g. 'Day' in 'Month/Day/Year'"> - Day - </message> - <message name="IDS_FORM_DATE_FORMAT_MONTH" desc="Short word to indicate which is the month part in a date format. e.g. 'Month' in 'Month/Day/Year'"> - Month - </message> - <message name="IDS_FORM_DATE_FORMAT_YEAR" desc="Short word to indicate which is the year part in a date format. e.g. 'Year' in 'Month/Day/Year'"> - Year - </message> <message name="IDS_FORM_SUBMIT_LABEL" desc="Default label for Submit buttons in forms on webpages."> Submit </message> @@ -219,9 +207,6 @@ <message name="IDS_FORM_OTHER_MONTH_LABEL" desc="Label for button that opens a full month picker so the user can choose dates other than the ones in the list." meaning="for month label"> Other... </message> - <message name="IDS_FORM_OTHER_TIME_LABEL" desc="Label for button that opens a full time picker so the user can choose dates other than the ones in the list." meaning="for time label"> - Other... - </message> <message name="IDS_FORM_OTHER_WEEK_LABEL" desc="Label for button that opens a full week picker so the user can choose dates other than the ones in the list." meaning="for week label"> Other... </message> @@ -247,16 +232,6 @@ Week </message> - <message name="IDS_RECENT_SEARCHES_NONE" desc="Label for only item in menu that appears when clicking on the search field image, when no searches have been performed"> - No recent searches - </message> - <message name="IDS_RECENT_SEARCHES" desc="label for first item in the menu that appears when clicking on the search field image, used as embedded menu title"> - Recent Searches - </message> - <message name="IDS_RECENT_SEARCHES_CLEAR" desc="menu item in Recent Searches menu that empties menu's contents"> - Clear Recent Searches - </message> - <message name="IDS_AX_CALENDAR_SHOW_MONTH_SELECTOR" desc="Accessible description of a button to show month selection panel in a calendar picker."> Show month selection panel </message> @@ -320,15 +295,9 @@ <message name="IDS_AX_ROLE_HEADING" desc="Accessibility role description for headings"> heading </message> - <message name="IDS_AX_ROLE_IMAGE_MAP" desc="Accessibility role description for image map"> - image map - </message> <message name="IDS_AX_ROLE_LINK" desc="Accessibility role description for link"> link </message> - <message name="IDS_AX_ROLE_LIST_MARKER" desc="Accessibility role description for list marker"> - list marker - </message> <message name="IDS_AX_ROLE_MAIN_CONTENT" desc="Accessibility role description for main content of the document."> main </message> @@ -558,14 +527,6 @@ pause </message> - <message name="IDS_AX_MEDIA_SLIDER" desc="Accessibility role description for timeline slider"> - movie time - </message> - - <message name="IDS_AX_MEDIA_SLIDER_THUMB" desc="Accessibility role description for timeline thumb"> - movie timeline thumb - </message> - <message name="IDS_AX_MEDIA_CURRENT_TIME_DISPLAY" desc="Accessibility role description for elapsed time display"> elapsed time </message> @@ -574,10 +535,6 @@ remaining time </message> - <message name="IDS_AX_MEDIA_STATUS_DISPLAY" desc="Accessibility role description for movie status"> - status - </message> - <message name="IDS_AX_MEDIA_ENTER_FULL_SCREEN_BUTTON" desc="Accessibility role description for enter fullscreen button"> enter full screen </message> @@ -642,10 +599,6 @@ movie time scrubber </message> - <message name="IDS_AX_MEDIA_SLIDER_THUMB_HELP" desc="Accessibility help description for timeline thumb"> - movie time scrubber thumb - </message> - <message name="IDS_AX_MEDIA_CURRENT_TIME_DISPLAY_HELP" desc="Accessibility help description for elapsed time display"> current time in seconds </message> @@ -654,10 +607,6 @@ number of seconds of movie remaining </message> - <message name="IDS_AX_MEDIA_STATUS_DISPLAY_HELP" desc="Accessibility help description for movie status"> - current movie status - </message> - <message name="IDS_AX_MEDIA_ENTER_FULL_SCREEN_BUTTON_HELP" desc="Accessibility help description for enter fullscreen button"> play movie in full screen mode </message>
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn index 2a13a13..3a21b3d 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn
@@ -53,6 +53,7 @@ "//components/ukm/public", "//components/url_formatter", "//components/variations", + "//components/viz/common", "//components/viz/host", "//components/viz/service", "//content:resources",
diff --git a/content/browser/accessibility/browser_accessibility.cc b/content/browser/accessibility/browser_accessibility.cc index 36cd4f8..06f8106 100644 --- a/content/browser/accessibility/browser_accessibility.cc +++ b/content/browser/accessibility/browser_accessibility.cc
@@ -743,13 +743,14 @@ BrowserAccessibility* BrowserAccessibility::GetTable() const { BrowserAccessibility* table = const_cast<BrowserAccessibility*>(this); - while (table && !table->IsTableLikeRole()) + while (table && !ui::IsTableLikeRole(table->GetRole())) table = table->PlatformGetParent(); return table; } BrowserAccessibility* BrowserAccessibility::GetTableCell(int index) const { - if (!IsTableLikeRole() && !IsCellOrTableHeaderRole()) + if (!ui::IsTableLikeRole(GetRole()) && + !ui::IsCellOrTableHeaderRole(GetRole())) return nullptr; BrowserAccessibility* table = GetTable(); @@ -764,7 +765,8 @@ BrowserAccessibility* BrowserAccessibility::GetTableCell(int row, int column) const { - if (!IsTableLikeRole() && !IsCellOrTableHeaderRole()) + if (!ui::IsTableLikeRole(GetRole()) && + !ui::IsCellOrTableHeaderRole(GetRole())) return nullptr; if (row < 0 || row >= GetTableRowCount() || column < 0 || column >= GetTableColumnCount()) { @@ -788,7 +790,7 @@ } int BrowserAccessibility::GetTableCellIndex() const { - if (!IsCellOrTableHeaderRole()) + if (!ui::IsCellOrTableHeaderRole(GetRole())) return -1; BrowserAccessibility* table = GetTable(); @@ -818,7 +820,7 @@ } int BrowserAccessibility::GetTableColumnSpan() const { - if (!IsCellOrTableHeaderRole()) + if (!ui::IsCellOrTableHeaderRole(GetRole())) return 0; int column_span; @@ -840,7 +842,7 @@ } int BrowserAccessibility::GetTableRowSpan() const { - if (!IsCellOrTableHeaderRole()) + if (!ui::IsCellOrTableHeaderRole(GetRole())) return 0; int row_span; @@ -861,18 +863,6 @@ return GetData().HasAction(action_enum); } -bool BrowserAccessibility::IsCellOrTableHeaderRole() const { - return (GetRole() == ui::AX_ROLE_CELL || - GetRole() == ui::AX_ROLE_COLUMN_HEADER || - GetRole() == ui::AX_ROLE_ROW_HEADER); -} - -bool BrowserAccessibility::IsTableLikeRole() const { - return (GetRole() == ui::AX_ROLE_TABLE || - GetRole() == ui::AX_ROLE_GRID || - GetRole() == ui::AX_ROLE_TREE_GRID); -} - bool BrowserAccessibility::HasCaret() const { if (IsSimpleTextControl() && HasIntAttribute(ui::AX_ATTR_TEXT_SEL_START) && HasIntAttribute(ui::AX_ATTR_TEXT_SEL_END)) {
diff --git a/content/browser/accessibility/browser_accessibility.h b/content/browser/accessibility/browser_accessibility.h index 74b5d89..b7a098d 100644 --- a/content/browser/accessibility/browser_accessibility.h +++ b/content/browser/accessibility/browser_accessibility.h
@@ -344,12 +344,6 @@ bool HasState(ui::AXState state_enum) const; bool HasAction(ui::AXAction action_enum) const; - // Returns true if this node is a cell or a table header. - bool IsCellOrTableHeaderRole() const; - - // Returns true if this node is a table, a grid or a treegrid. - bool IsTableLikeRole() const; - // Returns true if the caret is active on this object. bool HasCaret() const;
diff --git a/content/browser/accessibility/browser_accessibility_android.cc b/content/browser/accessibility/browser_accessibility_android.cc index 52b84c6..4e9d9362 100644 --- a/content/browser/accessibility/browser_accessibility_android.cc +++ b/content/browser/accessibility/browser_accessibility_android.cc
@@ -14,6 +14,7 @@ #include "content/common/accessibility_messages.h" #include "content/public/common/content_client.h" #include "third_party/skia/include/core/SkColor.h" +#include "ui/accessibility/ax_role_properties.h" #include "ui/accessibility/platform/ax_android_constants.h" #include "ui/accessibility/platform/ax_snapshot_node_android_platform.h" @@ -168,8 +169,9 @@ return HasState(ui::AX_STATE_COLLAPSED); } +// TODO(dougt) Move to ax_role_properties? bool BrowserAccessibilityAndroid::IsCollection() const { - return (IsTableLikeRole() || GetRole() == ui::AX_ROLE_LIST || + return (ui::IsTableLikeRole(GetRole()) || GetRole() == ui::AX_ROLE_LIST || GetRole() == ui::AX_ROLE_LIST_BOX || GetRole() == ui::AX_ROLE_DESCRIPTION_LIST || GetRole() == ui::AX_ROLE_TREE); @@ -1145,7 +1147,7 @@ } int BrowserAccessibilityAndroid::RowCount() const { - if (IsTableLikeRole()) { + if (ui::IsTableLikeRole(GetRole())) { return CountChildrenWithRole(ui::AX_ROLE_ROW); } @@ -1160,7 +1162,7 @@ } int BrowserAccessibilityAndroid::ColumnCount() const { - if (IsTableLikeRole()) { + if (ui::IsTableLikeRole(GetRole())) { return CountChildrenWithRole(ui::AX_ROLE_COLUMN); } return 0;
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm index 2698d30..c75b854 100644 --- a/content/browser/accessibility/browser_accessibility_cocoa.mm +++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
@@ -27,6 +27,8 @@ #include "content/public/common/content_client.h" #include "third_party/skia/include/core/SkColor.h" #include "ui/accessibility/ax_range.h" +#include "ui/accessibility/ax_role_properties.h" + #import "ui/accessibility/platform/ax_platform_node_mac.h" using AXPlatformPositionInstance = @@ -657,7 +659,7 @@ } - (NSNumber*)ariaColumnCount { - if (!browserAccessibility_->IsTableLikeRole()) + if (!ui::IsTableLikeRole(browserAccessibility_->GetRole())) return nil; int count = -1; if (!browserAccessibility_->GetIntAttribute(ui::AX_ATTR_ARIA_COLUMN_COUNT, @@ -668,7 +670,7 @@ } - (NSNumber*)ariaColumnIndex { - if (!browserAccessibility_->IsCellOrTableHeaderRole()) + if (!ui::IsCellOrTableHeaderRole(browserAccessibility_->GetRole())) return nil; int index = -1; if (!browserAccessibility_->GetIntAttribute( @@ -700,7 +702,7 @@ } - (NSNumber*)ariaRowCount { - if (!browserAccessibility_->IsTableLikeRole()) + if (!ui::IsTableLikeRole(browserAccessibility_->GetRole())) return nil; int count = -1; if (!browserAccessibility_->GetIntAttribute(ui::AX_ATTR_ARIA_ROW_COUNT, @@ -711,7 +713,7 @@ } - (NSNumber*)ariaRowIndex { - if (!browserAccessibility_->IsCellOrTableHeaderRole()) + if (!ui::IsCellOrTableHeaderRole(browserAccessibility_->GetRole())) return nil; int index = -1; if (!browserAccessibility_->GetIntAttribute(ui::AX_ATTR_ARIA_CELL_ROW_INDEX, @@ -781,7 +783,7 @@ - (NSArray*)columnHeaders { if (![self instanceActive]) return nil; - if (!browserAccessibility_->IsTableLikeRole()) { + if (!ui::IsTableLikeRole(browserAccessibility_->GetRole())) { return nil; } @@ -801,7 +803,7 @@ - (NSValue*)columnIndexRange { if (![self instanceActive]) return nil; - if (!browserAccessibility_->IsCellOrTableHeaderRole()) + if (!ui::IsCellOrTableHeaderRole(browserAccessibility_->GetRole())) return nil; int column = -1; @@ -1009,7 +1011,7 @@ if (![self instanceActive]) return nil; int headerElementId = -1; - if (browserAccessibility_->IsTableLikeRole()) { + if (ui::IsTableLikeRole(browserAccessibility_->GetRole())) { browserAccessibility_->GetIntAttribute( ui::AX_ATTR_TABLE_HEADER_ID, &headerElementId); } else if ([self internalRole] == ui::AX_ROLE_COLUMN) { @@ -1507,7 +1509,7 @@ - (NSArray*)rowHeaders { if (![self instanceActive]) return nil; - if (!browserAccessibility_->IsTableLikeRole()) { + if (!ui::IsTableLikeRole(browserAccessibility_->GetRole())) { return nil; } @@ -1527,7 +1529,7 @@ - (NSValue*)rowIndexRange { if (![self instanceActive]) return nil; - if (!browserAccessibility_->IsCellOrTableHeaderRole()) + if (!ui::IsCellOrTableHeaderRole(browserAccessibility_->GetRole())) return nil; int row = -1; @@ -2112,7 +2114,7 @@ j < child->PlatformChildCount(); ++j) { BrowserAccessibility* cell = child->PlatformGetChild(j); - if (!cell->IsCellOrTableHeaderRole()) + if (!ui::IsCellOrTableHeaderRole(cell->GetRole())) continue; int colIndex; if (!cell->GetIntAttribute(
diff --git a/content/browser/accessibility/browser_accessibility_com_win.cc b/content/browser/accessibility/browser_accessibility_com_win.cc index 19473d8..809a6ce4 100644 --- a/content/browser/accessibility/browser_accessibility_com_win.cc +++ b/content/browser/accessibility/browser_accessibility_com_win.cc
@@ -27,6 +27,7 @@ #include "content/common/accessibility_mode.h" #include "content/public/common/content_client.h" #include "third_party/skia/include/core/SkColor.h" +#include "ui/accessibility/ax_role_properties.h" #include "ui/accessibility/ax_text_utils.h" #include "ui/base/win/accessibility_ids_win.h" #include "ui/base/win/accessibility_misc_utils.h" @@ -3413,7 +3414,7 @@ return E_NOINTERFACE; } } else if (iid == IID_IAccessibleTableCell) { - if (!accessibility->owner()->IsCellOrTableHeaderRole()) { + if (!ui::IsCellOrTableHeaderRole(accessibility->owner()->GetRole())) { *object = NULL; return E_NOINTERFACE; } @@ -3628,9 +3629,9 @@ } // Expose table cell index. - if (owner()->IsCellOrTableHeaderRole()) { + if (ui::IsCellOrTableHeaderRole(owner()->GetRole())) { BrowserAccessibility* table = owner()->PlatformGetParent(); - while (table && !table->IsTableLikeRole()) + while (table && !ui::IsTableLikeRole(table->GetRole())) table = table->PlatformGetParent(); if (table) { const std::vector<int32_t>& unique_cell_ids = @@ -3645,13 +3646,13 @@ } // Expose aria-colcount and aria-rowcount in a table, grid or treegrid. - if (owner()->IsTableLikeRole()) { + if (ui::IsTableLikeRole(owner()->GetRole())) { IntAttributeToIA2(ui::AX_ATTR_ARIA_COLUMN_COUNT, "colcount"); IntAttributeToIA2(ui::AX_ATTR_ARIA_ROW_COUNT, "rowcount"); } // Expose aria-colindex and aria-rowindex in a cell or row. - if (owner()->IsCellOrTableHeaderRole() || + if (ui::IsCellOrTableHeaderRole(owner()->GetRole()) || owner()->GetRole() == ui::AX_ROLE_ROW) { if (owner()->GetRole() != ui::AX_ROLE_ROW) IntAttributeToIA2(ui::AX_ATTR_ARIA_CELL_COLUMN_INDEX, "colindex"); @@ -4845,7 +4846,7 @@ } void BrowserAccessibilityComWin::UpdateRequiredAttributes() { - if (owner()->IsCellOrTableHeaderRole()) { + if (ui::IsCellOrTableHeaderRole(owner()->GetRole())) { // Expose colspan attribute. base::string16 colspan; if (owner()->GetHtmlAttribute("aria-colspan", &colspan)) {
diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm index c71ffbe..a625b52 100644 --- a/content/browser/accessibility/browser_accessibility_manager_mac.mm +++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm
@@ -5,11 +5,11 @@ #include "content/browser/accessibility/browser_accessibility_manager_mac.h" #include "base/bind.h" +#include "base/location.h" +#include "base/logging.h" #import "base/mac/mac_util.h" #import "base/mac/scoped_nsobject.h" #import "base/mac/sdk_forward_declarations.h" -#include "base/location.h" -#include "base/logging.h" #include "base/strings/sys_string_conversions.h" #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" @@ -17,6 +17,7 @@ #import "content/browser/accessibility/browser_accessibility_mac.h" #include "content/common/accessibility_messages.h" #include "content/public/browser/browser_thread.h" +#include "ui/accessibility/ax_role_properties.h" namespace { @@ -210,7 +211,7 @@ mac_notification = NSAccessibilityInvalidStatusChangedNotification; break; case ui::AX_EVENT_SELECTED_CHILDREN_CHANGED: - if (node->IsTableLikeRole()) { + if (ui::IsTableLikeRole(node->GetRole())) { mac_notification = NSAccessibilitySelectedRowsChangedNotification; } else { mac_notification = NSAccessibilitySelectedChildrenChangedNotification; @@ -431,36 +432,6 @@ } } -bool IsContainerWithSelectableChildrenRole(ui::AXRole role) { - switch (role) { - case ui::AX_ROLE_COMBO_BOX: - case ui::AX_ROLE_GRID: - case ui::AX_ROLE_LIST_BOX: - case ui::AX_ROLE_MENU: - case ui::AX_ROLE_MENU_BAR: - case ui::AX_ROLE_RADIO_GROUP: - case ui::AX_ROLE_TAB_LIST: - case ui::AX_ROLE_TOOLBAR: - case ui::AX_ROLE_TREE: - case ui::AX_ROLE_TREE_GRID: - return true; - default: - return false; - } -} - -bool IsRowContainer(ui::AXRole role) { - switch (role) { - case ui::AX_ROLE_TREE: - case ui::AX_ROLE_TREE_GRID: - case ui::AX_ROLE_GRID: - case ui::AX_ROLE_TABLE: - return true; - default: - return false; - } -} - void BrowserAccessibilityManagerMac::OnStateChanged(ui::AXTree* tree, ui::AXNode* node, ui::AXState state, @@ -474,7 +445,7 @@ else tree_events_[node->id()].insert(ui::AX_EVENT_ROW_COLLAPSED); ui::AXNode* container = node; - while (container && !IsRowContainer(container->data().role)) + while (container && !ui::IsRowContainer(container->data().role)) container = container->parent(); if (container) tree_events_[container->id()].insert(ui::AX_EVENT_ROW_COUNT_CHANGED); @@ -485,7 +456,7 @@ if (state == ui::AX_STATE_SELECTED) { ui::AXNode* container = node; while (container && - !IsContainerWithSelectableChildrenRole(container->data().role)) + !ui::IsContainerWithSelectableChildrenRole(container->data().role)) container = container->parent(); if (container) tree_events_[container->id()].insert( @@ -577,6 +548,9 @@ tree_events_[live_root->id()].insert(ui::AX_EVENT_LIVE_REGION_CHANGED); } } + + if (root_changed && tree->data().loaded) + tree_events_[tree->root()->id()].insert(ui::AX_EVENT_LOAD_COMPLETE); } NSDictionary* BrowserAccessibilityManagerMac::
diff --git a/content/browser/accessibility/dump_accessibility_events_browsertest.cc b/content/browser/accessibility/dump_accessibility_events_browsertest.cc index dc0c5e9..b9d545a2 100644 --- a/content/browser/accessibility/dump_accessibility_events_browsertest.cc +++ b/content/browser/accessibility/dump_accessibility_events_browsertest.cc
@@ -346,8 +346,8 @@ } IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, - AccessibilityEventsRemoveSubtree) { - RunEventTest(FILE_PATH_LITERAL("remove-subtree.html")); + AccessibilityEventsTableColumnHidden) { + RunEventTest(FILE_PATH_LITERAL("table-column-hidden.html")); } IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest,
diff --git a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc index df73588..af077e5f 100644 --- a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc +++ b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
@@ -838,6 +838,11 @@ RunAriaTest(FILE_PATH_LITERAL("input-text-aria-placeholder.html")); } +IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, + AccessibilityTableColumnHidden) { + RunAriaTest(FILE_PATH_LITERAL("table-column-hidden.html")); +} + IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityArticle) { RunHtmlTest(FILE_PATH_LITERAL("article.html")); }
diff --git a/content/browser/accessibility/one_shot_accessibility_tree_search.cc b/content/browser/accessibility/one_shot_accessibility_tree_search.cc index 7cfbd16..45f1512 100644 --- a/content/browser/accessibility/one_shot_accessibility_tree_search.cc +++ b/content/browser/accessibility/one_shot_accessibility_tree_search.cc
@@ -12,6 +12,7 @@ #include "content/browser/accessibility/browser_accessibility.h" #include "content/browser/accessibility/browser_accessibility_manager.h" #include "ui/accessibility/ax_enums.h" +#include "ui/accessibility/ax_role_properties.h" namespace content { @@ -409,7 +410,7 @@ bool AccessibilityTablePredicate( BrowserAccessibility* start, BrowserAccessibility* node) { - return node->IsTableLikeRole(); + return ui::IsTableLikeRole(node->GetRole()); } bool AccessibilityTextfieldPredicate(
diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc index 13e2bf1..478a4781 100644 --- a/content/browser/compositor/gpu_process_transport_factory.cc +++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -30,9 +30,9 @@ #include "cc/surfaces/display.h" #include "cc/surfaces/display_scheduler.h" #include "cc/surfaces/surface_manager.h" +#include "components/viz/common/gl_helper.h" #include "components/viz/host/host_frame_sink_manager.h" #include "components/viz/service/display_compositor/compositor_overlay_candidate_validator.h" -#include "components/viz/service/display_compositor/gl_helper.h" #include "components/viz/service/display_compositor/host_shared_bitmap_manager.h" #include "content/browser/browser_main_loop.h" #include "content/browser/compositor/browser_compositor_output_surface.h"
diff --git a/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc b/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc index aebe6cb..70e488b 100644 --- a/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc +++ b/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc
@@ -8,9 +8,9 @@ #include "cc/output/output_surface_client.h" #include "cc/output/output_surface_frame.h" +#include "components/viz/common/gl_helper.h" #include "components/viz/service/display_compositor/buffer_queue.h" #include "components/viz/service/display_compositor/compositor_overlay_candidate_validator.h" -#include "components/viz/service/display_compositor/gl_helper.h" #include "content/browser/compositor/reflector_impl.h" #include "gpu/GLES2/gl2extchromium.h" #include "gpu/command_buffer/client/gles2_interface.h"
diff --git a/content/browser/compositor/owned_mailbox.cc b/content/browser/compositor/owned_mailbox.cc index 1f6f261b..ecf7f3b 100644 --- a/content/browser/compositor/owned_mailbox.cc +++ b/content/browser/compositor/owned_mailbox.cc
@@ -5,7 +5,7 @@ #include "content/browser/compositor/owned_mailbox.h" #include "base/logging.h" -#include "components/viz/service/display_compositor/gl_helper.h" +#include "components/viz/common/gl_helper.h" #include "content/browser/compositor/image_transport_factory.h" namespace content {
diff --git a/content/browser/compositor/reflector_texture.cc b/content/browser/compositor/reflector_texture.cc index f7f7a9bc..5301a3a 100644 --- a/content/browser/compositor/reflector_texture.cc +++ b/content/browser/compositor/reflector_texture.cc
@@ -4,7 +4,7 @@ #include "content/browser/compositor/reflector_texture.h" -#include "components/viz/service/display_compositor/gl_helper.h" +#include "components/viz/common/gl_helper.h" #include "content/browser/compositor/owned_mailbox.h" #include "gpu/command_buffer/client/context_support.h" #include "gpu/command_buffer/client/gles2_interface.h"
diff --git a/content/browser/compositor/surface_utils.cc b/content/browser/compositor/surface_utils.cc index 09196f85..67347b8 100644 --- a/content/browser/compositor/surface_utils.cc +++ b/content/browser/compositor/surface_utils.cc
@@ -10,8 +10,8 @@ #include "build/build_config.h" #include "cc/output/copy_output_result.h" #include "cc/resources/single_release_callback.h" +#include "components/viz/common/gl_helper.h" #include "components/viz/host/host_frame_sink_manager.h" -#include "components/viz/service/display_compositor/gl_helper.h" #include "components/viz/service/frame_sinks/frame_sink_manager_impl.h" #include "content/browser/browser_main_loop.h" #include "skia/ext/image_operations.h"
diff --git a/content/browser/compositor/test/no_transport_image_transport_factory.cc b/content/browser/compositor/test/no_transport_image_transport_factory.cc index 65e9f97..8581cbe0 100644 --- a/content/browser/compositor/test/no_transport_image_transport_factory.cc +++ b/content/browser/compositor/test/no_transport_image_transport_factory.cc
@@ -10,7 +10,7 @@ #include "build/build_config.h" #include "cc/output/context_provider.h" #include "cc/surfaces/surface_manager.h" -#include "components/viz/service/display_compositor/gl_helper.h" +#include "components/viz/common/gl_helper.h" #include "content/browser/compositor/surface_utils.h" #include "gpu/command_buffer/client/gles2_interface.h" #include "ui/compositor/compositor.h"
diff --git a/content/browser/media/capture/aura_window_capture_machine.cc b/content/browser/media/capture/aura_window_capture_machine.cc index 0334577c..83b9aff 100644 --- a/content/browser/media/capture/aura_window_capture_machine.cc +++ b/content/browser/media/capture/aura_window_capture_machine.cc
@@ -11,7 +11,7 @@ #include "base/metrics/histogram_macros.h" #include "cc/output/copy_output_request.h" #include "cc/output/copy_output_result.h" -#include "components/viz/service/display_compositor/gl_helper.h" +#include "components/viz/common/gl_helper.h" #include "content/browser/compositor/image_transport_factory.h" #include "content/browser/media/capture/desktop_capture_device_uma_types.h" #include "content/public/browser/browser_thread.h"
diff --git a/content/browser/power_monitor_browsertest.cc b/content/browser/power_monitor_browsertest.cc index e7e09fae..0dd0223 100644 --- a/content/browser/power_monitor_browsertest.cc +++ b/content/browser/power_monitor_browsertest.cc
@@ -7,6 +7,7 @@ #include "base/run_loop.h" #include "base/strings/utf_string_conversions.h" #include "content/public/browser/browser_thread.h" +#include "content/public/browser/gpu_service_registry.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/utility_process_host.h" @@ -49,6 +50,10 @@ BindInterface(host, std::move(request)); } +void BindInterfaceForGpuOnIOThread(mojom::PowerMonitorTestRequest request) { + BindInterfaceInGpuProcess(std::move(request)); +} + class MockPowerMonitorMessageBroadcaster : public device::mojom::PowerMonitor { public: MockPowerMonitorMessageBroadcaster() = default; @@ -108,6 +113,14 @@ DCHECK(utility_bound_closure_); std::move(utility_bound_closure_).Run(); + } else if (source_info.identity.name() == mojom::kGpuServiceName) { + ++request_count_from_gpu_; + + // TestRendererProcess and TestUtilityProcess also result in spinning up + // GPU processes as a side effect, but they do not set valid + // gpu_bound_closure_, so we ignore null gpu_bound_closure_ here for them. + if (gpu_bound_closure_) + std::move(gpu_bound_closure_).Run(); } power_monitor_message_broadcaster_.Bind( @@ -128,8 +141,13 @@ renderer_bound_closure_ = closure; } + void set_gpu_bound_closure(base::Closure closure) { + gpu_bound_closure_ = closure; + } + int request_count_from_renderer() { return request_count_from_renderer_; } int request_count_from_utility() { return request_count_from_utility_; } + int request_count_from_gpu() { return request_count_from_gpu_; } void SimulatePowerStateChange(bool on_battery_power) { power_monitor_message_broadcaster_.OnPowerStateChange(on_battery_power); @@ -138,7 +156,9 @@ private: int request_count_from_renderer_ = 0; int request_count_from_utility_ = 0; + int request_count_from_gpu_ = 0; base::OnceClosure renderer_bound_closure_; + base::OnceClosure gpu_bound_closure_; base::OnceClosure utility_bound_closure_; MockPowerMonitorMessageBroadcaster power_monitor_message_broadcaster_; @@ -186,6 +206,29 @@ VerifyPowerStateInChildProcess(power_monitor_utility.get(), false); } +IN_PROC_BROWSER_TEST_F(PowerMonitorTest, TestGpuProcess) { + ASSERT_EQ(0, request_count_from_gpu()); + base::RunLoop run_loop; + set_gpu_bound_closure(run_loop.QuitClosure()); + // Wait for the connection from gpu process. + run_loop.Run(); + EXPECT_EQ(1, request_count_from_gpu()); + + mojom::PowerMonitorTestPtr power_monitor_gpu; + BrowserThread::PostTask( + BrowserThread::IO, FROM_HERE, + base::BindOnce(&BindInterfaceForGpuOnIOThread, + mojo::MakeRequest(&power_monitor_gpu))); + + SimulatePowerStateChange(true); + // Verify gpu process on_battery_power changed to true. + VerifyPowerStateInChildProcess(power_monitor_gpu.get(), true); + + SimulatePowerStateChange(false); + // Verify gpu process on_battery_power changed to false. + VerifyPowerStateInChildProcess(power_monitor_gpu.get(), false); +} + } // namespace } // namespace content
diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc index f3c26ce..8b9cc1b 100644 --- a/content/browser/renderer_host/compositor_impl_android.cc +++ b/content/browser/renderer_host/compositor_impl_android.cc
@@ -48,7 +48,6 @@ #include "cc/trees/layer_tree_settings.h" #include "components/viz/host/host_frame_sink_manager.h" #include "components/viz/service/display_compositor/compositor_overlay_candidate_validator_android.h" -#include "components/viz/service/display_compositor/gl_helper.h" #include "components/viz/service/display_compositor/host_shared_bitmap_manager.h" #include "components/viz/service/frame_sinks/frame_sink_manager_impl.h" #include "content/browser/compositor/surface_utils.h"
diff --git a/content/browser/renderer_host/delegated_frame_host.cc b/content/browser/renderer_host/delegated_frame_host.cc index e6b8725..b20728e 100644 --- a/content/browser/renderer_host/delegated_frame_host.cc +++ b/content/browser/renderer_host/delegated_frame_host.cc
@@ -22,7 +22,7 @@ #include "cc/surfaces/surface.h" #include "cc/surfaces/surface_hittest.h" #include "cc/surfaces/surface_manager.h" -#include "components/viz/service/display_compositor/gl_helper.h" +#include "components/viz/common/gl_helper.h" #include "content/browser/compositor/surface_utils.h" #include "content/browser/gpu/compositor_util.h" #include "content/browser/renderer_host/compositor_resize_lock.h"
diff --git a/content/browser/renderer_host/media/video_capture_controller.cc b/content/browser/renderer_host/media/video_capture_controller.cc index a60a96c..0f00727b 100644 --- a/content/browser/renderer_host/media/video_capture_controller.cc +++ b/content/browser/renderer_host/media/video_capture_controller.cc
@@ -16,7 +16,7 @@ #include "base/metrics/histogram_macros.h" #include "base/metrics/sparse_histogram.h" #include "build/build_config.h" -#include "components/viz/service/display_compositor/gl_helper.h" +#include "components/viz/common/gl_helper.h" #include "content/browser/renderer_host/media/media_stream_manager.h" #include "content/browser/renderer_host/media/video_capture_manager.h" #include "content/common/video_capture.mojom.h"
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc index 81331a5..18910b8 100644 --- a/content/browser/renderer_host/render_widget_host_view_android.cc +++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -34,7 +34,7 @@ #include "cc/surfaces/surface_hittest.h" #include "cc/surfaces/surface_manager.h" #include "cc/trees/layer_tree_host.h" -#include "components/viz/service/display_compositor/gl_helper.h" +#include "components/viz/common/gl_helper.h" #include "content/browser/accessibility/browser_accessibility_manager_android.h" #include "content/browser/accessibility/web_contents_accessibility_android.h" #include "content/browser/android/composited_touch_handle_drawable.h"
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc index 6f9dbcf6..c9a55fe 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -23,7 +23,7 @@ #include "cc/output/copy_output_result.h" #include "cc/resources/texture_mailbox.h" #include "cc/trees/layer_tree_settings.h" -#include "components/viz/service/display_compositor/gl_helper.h" +#include "components/viz/common/gl_helper.h" #include "content/browser/accessibility/browser_accessibility_manager.h" #include "content/browser/accessibility/browser_accessibility_state_impl.h" #include "content/browser/bad_message.h"
diff --git a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc index ff342a07..17cd659 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
@@ -33,7 +33,7 @@ #include "cc/test/begin_frame_args_test.h" #include "cc/test/fake_external_begin_frame_source.h" #include "cc/test/fake_surface_observer.h" -#include "components/viz/service/display_compositor/gl_helper.h" +#include "components/viz/common/gl_helper.h" #include "components/viz/service/display_compositor/host_shared_bitmap_manager.h" #include "content/browser/browser_thread_impl.h" #include "content/browser/compositor/test/no_transport_image_transport_factory.h"
diff --git a/content/browser/service_manager/service_manager_context.cc b/content/browser/service_manager/service_manager_context.cc index 94bade54..809d3e5 100644 --- a/content/browser/service_manager/service_manager_context.cc +++ b/content/browser/service_manager/service_manager_context.cc
@@ -18,6 +18,7 @@ #include "base/process/process_handle.h" #include "base/single_thread_task_runner.h" #include "base/strings/utf_string_conversions.h" +#include "base/task_scheduler/post_task.h" #include "content/browser/child_process_launcher.h" #include "content/browser/gpu/gpu_process_host.h" #include "content/browser/service_manager/common_browser_interfaces.h" @@ -70,7 +71,9 @@ base::LazyInstance<std::unique_ptr<service_manager::Connector>>::Leaky g_io_thread_connector = LAZY_INSTANCE_INITIALIZER; -void DestroyConnectorOnIOThread() { g_io_thread_connector.Get().reset(); } +void DestroyConnectorOnIOThread() { + g_io_thread_connector.Get().reset(); +} void StartServiceInUtilityProcess( const std::string& service_name, @@ -199,9 +202,11 @@ } void ShutDown() { - BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)->PostTask( - FROM_HERE, - base::Bind(&InProcessServiceManagerContext::ShutDownOnIOThread, this)); + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO) + ->PostTask( + FROM_HERE, + base::Bind(&InProcessServiceManagerContext::ShutDownOnIOThread, + this)); } private: @@ -296,8 +301,11 @@ std::move(root_browser_service), mojo::MakeRequest(&pid_receiver)); pid_receiver->SetPID(base::GetCurrentProcId()); - ServiceInfo device_info; + scoped_refptr<base::SequencedTaskRunner> background_task_runner = + base::CreateSequencedTaskRunnerWithTraits( + {base::MayBlock(), base::TaskPriority::BACKGROUND}); + #if defined(OS_ANDROID) JNIEnv* env = base::android::AttachCurrentThread(); base::android::ScopedJavaGlobalRef<jobject> java_nfc_delegate; @@ -307,15 +315,13 @@ // See the comments on wake_lock_context_host.h and ContentNfcDelegate.java // respectively for comments on those parameters. device_info.factory = - base::Bind(&device::CreateDeviceService, - BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), + base::Bind(&device::CreateDeviceService, background_task_runner, BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), base::Bind(&WakeLockContextHost::GetNativeViewForContext), std::move(java_nfc_delegate)); #else device_info.factory = - base::Bind(&device::CreateDeviceService, - BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), + base::Bind(&device::CreateDeviceService, background_task_runner, BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); #endif device_info.task_runner = base::ThreadTaskRunnerHandle::Get(); @@ -343,9 +349,8 @@ g_io_thread_connector.Get() = browser_connection->GetConnector()->Clone(); ContentBrowserClient::OutOfProcessServiceMap sandboxed_services; - GetContentClient() - ->browser() - ->RegisterOutOfProcessServices(&sandboxed_services); + GetContentClient()->browser()->RegisterOutOfProcessServices( + &sandboxed_services); sandboxed_services.insert( std::make_pair(data_decoder::mojom::kServiceName, base::ASCIIToUTF16("Data Decoder Service"))); @@ -356,9 +361,8 @@ } ContentBrowserClient::OutOfProcessServiceMap unsandboxed_services; - GetContentClient() - ->browser() - ->RegisterUnsandboxedOutOfProcessServices(&unsandboxed_services); + GetContentClient()->browser()->RegisterUnsandboxedOutOfProcessServices( + &unsandboxed_services); bool network_service_enabled = base::CommandLine::ForCurrentProcess()->HasSwitch(
diff --git a/content/browser/service_worker/service_worker_context_request_handler.cc b/content/browser/service_worker/service_worker_context_request_handler.cc index 364e41f7..13b0f6b9 100644 --- a/content/browser/service_worker/service_worker_context_request_handler.cc +++ b/content/browser/service_worker/service_worker_context_request_handler.cc
@@ -125,6 +125,7 @@ // removed. See https://github.com/w3c/ServiceWorker/issues/1021 if (status == CreateJobStatus::ERROR_UNINSTALLED_SCRIPT_IMPORT) { // Fall back to network. + ServiceWorkerMetrics::RecordUninstalledScriptImport(version_->script_url()); return nullptr; }
diff --git a/content/browser/service_worker/service_worker_metrics.cc b/content/browser/service_worker/service_worker_metrics.cc index 2ab2cb2..e0ed0c76 100644 --- a/content/browser/service_worker/service_worker_metrics.cc +++ b/content/browser/service_worker/service_worker_metrics.cc
@@ -209,10 +209,9 @@ histogram_pointer->Add(status); } -void RecordURLMetricOnUI(const GURL& url) { +void RecordURLMetricOnUI(const std::string& metric_name, const GURL& url) { DCHECK_CURRENTLY_ON(BrowserThread::UI); - GetContentClient()->browser()->RecordURLMetric( - "ServiceWorker.ControlledPageUrl", url); + GetContentClient()->browser()->RecordURLMetric(metric_name, url); } enum EventHandledRatioType { @@ -434,8 +433,9 @@ "ServiceWorker.MainFramePageLoad.RedirectChainLength", redirect_chain_length, 21); } - BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, - base::Bind(&RecordURLMetricOnUI, url)); + BrowserThread::PostTask( + BrowserThread::UI, FROM_HERE, + base::Bind(&RecordURLMetricOnUI, "ServiceWorker.ControlledPageUrl", url)); } void ServiceWorkerMetrics::RecordStartWorkerStatus( @@ -955,4 +955,13 @@ kBucketCount); } +void ServiceWorkerMetrics::RecordUninstalledScriptImport(const GURL& url) { + BrowserThread::PostTask( + BrowserThread::UI, FROM_HERE, + base::Bind(&RecordURLMetricOnUI, + "ServiceWorker.ContextRequestHandlerStatus." + "UninstalledScriptImport", + url)); +} + } // namespace content
diff --git a/content/browser/service_worker/service_worker_metrics.h b/content/browser/service_worker/service_worker_metrics.h index 0305ca76..2fdd8794 100644 --- a/content/browser/service_worker/service_worker_metrics.h +++ b/content/browser/service_worker/service_worker_metrics.h
@@ -356,6 +356,11 @@ static void RecordRuntime(base::TimeDelta time); + // Records when an installed service worker imports a script that was not + // previously installed. + // TODO(falken): Remove after this is deprecated. https://crbug.com/737044 + static void RecordUninstalledScriptImport(const GURL& url); + private: DISALLOW_IMPLICIT_CONSTRUCTORS(ServiceWorkerMetrics); };
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc index 3af33049..7e6db81 100644 --- a/content/browser/storage_partition_impl.cc +++ b/content/browser/storage_partition_impl.cc
@@ -531,16 +531,20 @@ if (base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kEnableNetworkService)) { - mojom::NetworkServicePtr network_service; - ServiceManagerConnection::GetForProcess()->GetConnector()->BindInterface( - mojom::kNetworkServiceName, &network_service); + static mojom::NetworkServicePtr* g_network_service = + new mojom::NetworkServicePtr; + if (!g_network_service->is_bound()) { + ServiceManagerConnection::GetForProcess()->GetConnector()->BindInterface( + mojom::kNetworkServiceName, g_network_service); + } mojom::NetworkContextParamsPtr context_params = mojom::NetworkContextParams::New(); // TODO: fill this // context_params->cache_dir = // context_params->cookie_path = - network_service->CreateNetworkContext( - MakeRequest(&partition->network_context_), std::move(context_params)); + (*g_network_service) + ->CreateNetworkContext(MakeRequest(&partition->network_context_), + std::move(context_params)); scoped_refptr<ChromeBlobStorageContext> blob_context = ChromeBlobStorageContext::GetFor(context);
diff --git a/content/child/blink_platform_impl.cc b/content/child/blink_platform_impl.cc index 71bf19c..305d39bb 100644 --- a/content/child/blink_platform_impl.cc +++ b/content/child/blink_platform_impl.cc
@@ -88,16 +88,8 @@ return IDS_AX_CALENDAR_WEEK_DESCRIPTION; case WebLocalizedString::kAXDayOfMonthFieldText: return IDS_AX_DAY_OF_MONTH_FIELD_TEXT; - case WebLocalizedString::kAXHeadingText: - return IDS_AX_ROLE_HEADING; case WebLocalizedString::kAXHourFieldText: return IDS_AX_HOUR_FIELD_TEXT; - case WebLocalizedString::kAXImageMapText: - return IDS_AX_ROLE_IMAGE_MAP; - case WebLocalizedString::kAXLinkText: - return IDS_AX_ROLE_LINK; - case WebLocalizedString::kAXListMarkerText: - return IDS_AX_ROLE_LIST_MARKER; case WebLocalizedString::kAXMediaDefault: return IDS_AX_MEDIA_DEFAULT; case WebLocalizedString::kAXMediaAudioElement: @@ -112,16 +104,10 @@ return IDS_AX_MEDIA_PLAY_BUTTON; case WebLocalizedString::kAXMediaPauseButton: return IDS_AX_MEDIA_PAUSE_BUTTON; - case WebLocalizedString::kAXMediaSlider: - return IDS_AX_MEDIA_SLIDER; - case WebLocalizedString::kAXMediaSliderThumb: - return IDS_AX_MEDIA_SLIDER_THUMB; case WebLocalizedString::kAXMediaCurrentTimeDisplay: return IDS_AX_MEDIA_CURRENT_TIME_DISPLAY; case WebLocalizedString::kAXMediaTimeRemainingDisplay: return IDS_AX_MEDIA_TIME_REMAINING_DISPLAY; - case WebLocalizedString::kAXMediaStatusDisplay: - return IDS_AX_MEDIA_STATUS_DISPLAY; case WebLocalizedString::kAXMediaEnterFullscreenButton: return IDS_AX_MEDIA_ENTER_FULL_SCREEN_BUTTON; case WebLocalizedString::kAXMediaExitFullscreenButton: @@ -154,14 +140,10 @@ return IDS_AX_MEDIA_AUDIO_SLIDER_HELP; case WebLocalizedString::kAXMediaVideoSliderHelp: return IDS_AX_MEDIA_VIDEO_SLIDER_HELP; - case WebLocalizedString::kAXMediaSliderThumbHelp: - return IDS_AX_MEDIA_SLIDER_THUMB_HELP; case WebLocalizedString::kAXMediaCurrentTimeDisplayHelp: return IDS_AX_MEDIA_CURRENT_TIME_DISPLAY_HELP; case WebLocalizedString::kAXMediaTimeRemainingDisplayHelp: return IDS_AX_MEDIA_TIME_REMAINING_DISPLAY_HELP; - case WebLocalizedString::kAXMediaStatusDisplayHelp: - return IDS_AX_MEDIA_STATUS_DISPLAY_HELP; case WebLocalizedString::kAXMediaEnterFullscreenButtonHelp: return IDS_AX_MEDIA_ENTER_FULL_SCREEN_BUTTON_HELP; case WebLocalizedString::kAXMediaExitFullscreenButtonHelp: @@ -184,8 +166,6 @@ return IDS_AX_MONTH_FIELD_TEXT; case WebLocalizedString::kAXSecondFieldText: return IDS_AX_SECOND_FIELD_TEXT; - case WebLocalizedString::kAXWebAreaText: - return IDS_AX_ROLE_WEB_AREA; case WebLocalizedString::kAXWeekOfYearFieldText: return IDS_AX_WEEK_OF_YEAR_FIELD_TEXT; case WebLocalizedString::kAXYearFieldText: @@ -194,12 +174,6 @@ return IDS_FORM_CALENDAR_CLEAR; case WebLocalizedString::kCalendarToday: return IDS_FORM_CALENDAR_TODAY; - case WebLocalizedString::kDateFormatDayInMonthLabel: - return IDS_FORM_DATE_FORMAT_DAY_IN_MONTH; - case WebLocalizedString::kDateFormatMonthLabel: - return IDS_FORM_DATE_FORMAT_MONTH; - case WebLocalizedString::kDateFormatYearLabel: - return IDS_FORM_DATE_FORMAT_YEAR; case WebLocalizedString::kDetailsLabel: return IDS_DETAILS_WITHOUT_SUMMARY_LABEL; case WebLocalizedString::kDownloadButtonLabel: @@ -226,8 +200,6 @@ return IDS_FORM_OTHER_DATE_LABEL; case WebLocalizedString::kOtherMonthLabel: return IDS_FORM_OTHER_MONTH_LABEL; - case WebLocalizedString::kOtherTimeLabel: - return IDS_FORM_OTHER_TIME_LABEL; case WebLocalizedString::kOtherWeekLabel: return IDS_FORM_OTHER_WEEK_LABEL; case WebLocalizedString::kOverflowMenuCaptions: @@ -258,14 +230,6 @@ return IDS_FORM_PLACEHOLDER_FOR_YEAR_FIELD; case WebLocalizedString::kResetButtonDefaultLabel: return IDS_FORM_RESET_LABEL; - case WebLocalizedString::kSearchableIndexIntroduction: - return IDS_SEARCHABLE_INDEX_INTRO; - case WebLocalizedString::kSearchMenuClearRecentSearchesText: - return IDS_RECENT_SEARCHES_CLEAR; - case WebLocalizedString::kSearchMenuNoRecentSearchesText: - return IDS_RECENT_SEARCHES_NONE; - case WebLocalizedString::kSearchMenuRecentSearchesText: - return IDS_RECENT_SEARCHES; case WebLocalizedString::kSelectMenuListText: return IDS_FORM_SELECT_MENU_LIST_TEXT; case WebLocalizedString::kSubmitButtonDefaultLabel:
diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc index c5613269..bd7a586 100644 --- a/content/child/runtime_features.cc +++ b/content/child/runtime_features.cc
@@ -70,6 +70,11 @@ WebRuntimeFeatures::EnableWebBluetooth(true); #endif +// Web Share is shipped on Android, experimental otherwise. +#if defined(OS_ANDROID) + WebRuntimeFeatures::EnableWebShare(true); +#endif + #if defined(OS_CHROMEOS) WebRuntimeFeatures::EnableForceTallerSelectPopup(true); #endif
diff --git a/content/network/network_context.cc b/content/network/network_context.cc index ea81b5c..5862ea6 100644 --- a/content/network/network_context.cc +++ b/content/network/network_context.cc
@@ -9,7 +9,6 @@ #include "base/strings/string_number_conversions.h" #include "components/network_session_configurator/common/network_switches.h" #include "content/network/cache_url_loader.h" -#include "content/network/network_service.h" #include "content/network/network_service_url_loader_factory_impl.h" #include "content/network/url_loader_impl.h" #include "content/public/common/content_client.h" @@ -87,17 +86,11 @@ } // namespace -NetworkContext::NetworkContext(NetworkService* network_service, - mojom::NetworkContextRequest request, +NetworkContext::NetworkContext(mojom::NetworkContextRequest request, mojom::NetworkContextParamsPtr params) - : network_service_(network_service), - url_request_context_(MakeURLRequestContext()), + : url_request_context_(MakeURLRequestContext()), params_(std::move(params)), - binding_(this, std::move(request)) { - network_service_->RegisterNetworkContext(this); - binding_.set_connection_error_handler( - base::Bind(&NetworkContext::OnConnectionError, base::Unretained(this))); -} + binding_(this, std::move(request)) {} NetworkContext::~NetworkContext() { // Call each URLLoaderImpl and ask it to release its net::URLRequest, as the @@ -106,10 +99,6 @@ // so have to be careful. while (!url_loaders_.empty()) (*url_loaders_.begin())->Cleanup(); - - // May be nullptr in tests. - if (network_service_) - network_service_->DeregisterNetworkContext(this); } std::unique_ptr<NetworkContext> NetworkContext::CreateForTesting() { @@ -139,22 +128,8 @@ StartCacheURLLoader(url, url_request_context_.get(), std::move(client)); } -void NetworkContext::Cleanup() { - // The NetworkService is going away, so have to destroy the - // net::URLRequestContext held by this NetworkContext. - delete this; -} - NetworkContext::NetworkContext() - : network_service_(nullptr), - url_request_context_(MakeURLRequestContext()), + : url_request_context_(MakeURLRequestContext()), binding_(this) {} -void NetworkContext::OnConnectionError() { - // Don't delete |this| in response to connection errors when it was created by - // CreateForTesting. - if (network_service_) - delete this; -} - } // namespace content
diff --git a/content/network/network_context.h b/content/network/network_context.h index b6b5332f..a4dd42c 100644 --- a/content/network/network_context.h +++ b/content/network/network_context.h
@@ -22,13 +22,11 @@ } namespace content { -class NetworkService; class URLLoaderImpl; class NetworkContext : public mojom::NetworkContext { public: - NetworkContext(NetworkService* network_service, - mojom::NetworkContextRequest request, + NetworkContext(mojom::NetworkContextRequest request, mojom::NetworkContextParamsPtr params); ~NetworkContext() override; @@ -49,18 +47,9 @@ void HandleViewCacheRequest(const GURL& url, mojom::URLLoaderClientPtr client) override; - // Called when the associated NetworkService is going away. Guaranteed to - // destroy NetworkContext's URLRequestContext. - void Cleanup(); - private: NetworkContext(); - // On connection errors the NetworkContext destroys itself. - void OnConnectionError(); - - NetworkService* const network_service_; - std::unique_ptr<net::URLRequestContext> url_request_context_; // Put it below |url_request_context_| so that it outlives all the
diff --git a/content/network/network_service.cc b/content/network/network_service.cc index a133884..28d947b 100644 --- a/content/network/network_service.cc +++ b/content/network/network_service.cc
@@ -55,44 +55,11 @@ NetworkService::NetworkService( std::unique_ptr<service_manager::BinderRegistry> registry) : net_log_(new MojoNetLog), registry_(std::move(registry)), binding_(this) { - // |registry_| may be nullptr in tests. - if (registry_) { - registry_->AddInterface<mojom::NetworkService>( - base::Bind(&NetworkService::Create, base::Unretained(this))); - } + registry_->AddInterface<mojom::NetworkService>( + base::Bind(&NetworkService::Create, base::Unretained(this))); } -NetworkService::~NetworkService() { - // Call each Network and ask it to release its net::URLRequestContext, as they - // may have references to shared objects owned by the NetworkService. The - // NetworkContexts deregister themselves in Cleanup(), so have to be careful. - while (!network_contexts_.empty()) - (*network_contexts_.begin())->Cleanup(); -} - -std::unique_ptr<NetworkService> NetworkService::CreateForTesting() { - return base::WrapUnique(new NetworkService()); -} - -void NetworkService::RegisterNetworkContext(NetworkContext* network_context) { - DCHECK_EQ(0u, network_contexts_.count(network_context)); - network_contexts_.insert(network_context); -} - -void NetworkService::DeregisterNetworkContext(NetworkContext* network_context) { - DCHECK_EQ(1u, network_contexts_.count(network_context)); - network_contexts_.erase(network_context); -} - -void NetworkService::CreateNetworkContext( - mojom::NetworkContextRequest request, - mojom::NetworkContextParamsPtr params) { - // The NetworkContext will destroy itself on connection error, or when the - // service is destroyed. - new NetworkContext(this, std::move(request), std::move(params)); -} - -NetworkService::NetworkService() : NetworkService(nullptr) {} +NetworkService::~NetworkService() = default; void NetworkService::OnBindInterface( const service_manager::BindSourceInfo& source_info, @@ -108,4 +75,12 @@ binding_.Bind(std::move(request)); } +void NetworkService::CreateNetworkContext( + mojom::NetworkContextRequest request, + mojom::NetworkContextParamsPtr params) { + mojo::MakeStrongBinding( + base::MakeUnique<NetworkContext>(std::move(request), std::move(params)), + std::move(request)); +} + } // namespace content
diff --git a/content/network/network_service.h b/content/network/network_service.h index c945b9ad..e139546d 100644 --- a/content/network/network_service.h +++ b/content/network/network_service.h
@@ -8,7 +8,6 @@ #include <memory> #include "base/macros.h" -#include "content/common/content_export.h" #include "content/common/network_service.mojom.h" #include "mojo/public/cpp/bindings/binding.h" #include "services/service_manager/public/cpp/binder_registry.h" @@ -16,8 +15,6 @@ namespace content { -class NetworkContext; - class NetworkService : public service_manager::Service, public mojom::NetworkService { public: @@ -25,23 +22,9 @@ std::unique_ptr<service_manager::BinderRegistry> registry); ~NetworkService() override; - CONTENT_EXPORT static std::unique_ptr<NetworkService> CreateForTesting(); - - // These are called by NetworkContexts as they are being created and - // destroyed. - void RegisterNetworkContext(NetworkContext* network_context); - void DeregisterNetworkContext(NetworkContext* network_context); - - // mojom::NetworkService implementation: - void CreateNetworkContext(mojom::NetworkContextRequest request, - mojom::NetworkContextParamsPtr params) override; - private: class MojoNetLog; - // Used for tests. - NetworkService(); - // service_manager::Service implementation. void OnBindInterface(const service_manager::BindSourceInfo& source_info, const std::string& interface_name, @@ -50,18 +33,16 @@ void Create(const service_manager::BindSourceInfo& source_info, mojom::NetworkServiceRequest request); + // mojom::NetworkService implementation: + void CreateNetworkContext(mojom::NetworkContextRequest request, + mojom::NetworkContextParamsPtr params) override; + std::unique_ptr<MojoNetLog> net_log_; std::unique_ptr<service_manager::BinderRegistry> registry_; mojo::Binding<mojom::NetworkService> binding_; - // NetworkContexts register themselves with the NetworkService so that they - // can be cleaned up when the NetworkService goes away. This is needed as - // NetworkContexts share global state with the NetworkService, so must be - // destroyed first. - std::set<NetworkContext*> network_contexts_; - DISALLOW_COPY_AND_ASSIGN(NetworkService); };
diff --git a/content/network/network_service_unittest.cc b/content/network/network_service_unittest.cc deleted file mode 100644 index 4897e12..0000000 --- a/content/network/network_service_unittest.cc +++ /dev/null
@@ -1,68 +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. - -#include <memory> - -#include "base/message_loop/message_loop.h" -#include "base/run_loop.h" -#include "base/threading/thread_task_runner_handle.h" -#include "content/common/network_service.mojom.h" -#include "content/network/network_context.h" -#include "content/network/network_service.h" -#include "testing/gtest/include/gtest/gtest.h" - -namespace content { - -namespace { - -class NetworkServiceTest : public testing::Test { - public: - NetworkServiceTest() : service_(NetworkService::CreateForTesting()) {} - ~NetworkServiceTest() override {} - - NetworkService* service() const { return service_.get(); } - - void DestroyService() { service_.reset(); } - - private: - base::MessageLoopForIO message_loop_; - std::unique_ptr<NetworkService> service_; -}; - -// Test shutdown in the case a NetworkContext is destroyed before the -// NetworkService. -TEST_F(NetworkServiceTest, CreateAndDestroyContext) { - mojom::NetworkContextPtr network_context; - mojom::NetworkContextParamsPtr context_params = - mojom::NetworkContextParams::New(); - - service()->CreateNetworkContext(mojo::MakeRequest(&network_context), - std::move(context_params)); - network_context.reset(); - // Make sure the NetworkContext is destroyed. - base::RunLoop().RunUntilIdle(); -} - -// Test shutdown in the case there is still a live NetworkContext when the -// NetworkService is destroyed. The service should destroy the NetworkContext -// itself. -TEST_F(NetworkServiceTest, DestroyingServiceDestroysContext) { - mojom::NetworkContextPtr network_context; - mojom::NetworkContextParamsPtr context_params = - mojom::NetworkContextParams::New(); - - service()->CreateNetworkContext(mojo::MakeRequest(&network_context), - std::move(context_params)); - base::RunLoop run_loop; - network_context.set_connection_error_handler(run_loop.QuitClosure()); - DestroyService(); - - // Destroying the service should destroy the context, causing a connection - // error. - run_loop.Run(); -} - -} // namespace - -} // namespace content
diff --git a/content/public/android/BUILD.gn b/content/public/android/BUILD.gn index 071ae907..dd60b833 100644 --- a/content/public/android/BUILD.gn +++ b/content/public/android/BUILD.gn
@@ -469,6 +469,7 @@ "junit/src/org/chromium/content/browser/ChildConnectionAllocatorTest.java", "junit/src/org/chromium/content/browser/MenuDescriptorTest.java", "junit/src/org/chromium/content/browser/SpareChildConnectionTest.java", + "junit/src/org/chromium/content/browser/TestChildProcessConnection.java", "junit/src/org/chromium/content/browser/androidoverlay/DialogOverlayCoreTest.java", "junit/src/org/chromium/content/browser/input/RangeTest.java", "junit/src/org/chromium/content/browser/input/TextInputStateTest.java",
diff --git a/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncherHelper.java b/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncherHelper.java index b0767b8..ce2e033 100644 --- a/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncherHelper.java +++ b/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncherHelper.java
@@ -57,23 +57,6 @@ // Delay between the call to freeConnection and the connection actually beeing freed. private static final long FREE_CONNECTION_DELAY_MILLIS = 1; - // Factory used by the SpareConnection to create the actual ChildProcessConnection. - private static final SpareChildConnection.ConnectionFactory SANDBOXED_CONNECTION_FACTORY = - new SpareChildConnection.ConnectionFactory() { - @Override - public ChildProcessConnection allocateBoundConnection(Context context, - ChildProcessCreationParams creationParams, - ChildProcessConnection.ServiceCallback serviceCallback) { - boolean bindToCallerCheck = - creationParams == null ? false : creationParams.getBindToCallerCheck(); - ChildConnectionAllocator allocator = - getConnectionAllocator(context, creationParams, true /* sandboxed */); - Bundle serviceBundle = - ChildProcessLauncherHelper.createServiceBundle(bindToCallerCheck); - return allocator.allocate(context, serviceBundle, serviceCallback); - } - }; - // A warmed-up connection to a sandboxed service. private static SpareChildConnection sSpareSandboxedConnection; @@ -189,9 +172,16 @@ if (sSpareSandboxedConnection != null && !sSpareSandboxedConnection.isEmpty()) { return; } + + ChildProcessCreationParams creationParams = ChildProcessCreationParams.getDefault(); + boolean bindToCallerCheck = + creationParams == null ? false : creationParams.getBindToCallerCheck(); + Bundle serviceBundle = + ChildProcessLauncherHelper.createServiceBundle(bindToCallerCheck); + ChildConnectionAllocator allocator = + getConnectionAllocator(context, creationParams, true /* sandboxed */); sSpareSandboxedConnection = - new SpareChildConnection(context, SANDBOXED_CONNECTION_FACTORY, - ChildProcessCreationParams.getDefault(), true /* sandboxed */); + new SpareChildConnection(context, allocator, serviceBundle); } }); } @@ -417,7 +407,7 @@ // Try to use the spare connection if there's one. if (sSpareSandboxedConnection != null) { mConnection = sSpareSandboxedConnection.getConnection( - mCreationParams, mSandboxed, serviceCallback); + mConnectionAllocator, serviceCallback); if (mConnection != null) { Log.d(TAG, "Using warmed-up connection for service %s.", mConnection.getServiceName());
diff --git a/content/public/android/java/src/org/chromium/content/browser/SpareChildConnection.java b/content/public/android/java/src/org/chromium/content/browser/SpareChildConnection.java index 8372db4..79e20c3 100644 --- a/content/public/android/java/src/org/chromium/content/browser/SpareChildConnection.java +++ b/content/public/android/java/src/org/chromium/content/browser/SpareChildConnection.java
@@ -5,11 +5,11 @@ package org.chromium.content.browser; import android.content.Context; +import android.os.Bundle; import android.support.annotation.NonNull; import org.chromium.base.Log; import org.chromium.base.VisibleForTesting; -import org.chromium.base.process_launcher.ChildProcessCreationParams; /** * This class is used to create a single spare ChildProcessConnection (usually early on during @@ -18,19 +18,8 @@ public class SpareChildConnection { private static final String TAG = "SpareChildConn"; - // Factory interface used to create the actual connection. - interface ConnectionFactory { - ChildProcessConnection allocateBoundConnection(Context context, - ChildProcessCreationParams creationParams, - ChildProcessConnection.ServiceCallback serviceCallback); - } - - // The parameters passed to the Connectionfactory when creating the connection. - // Also used to identify the connection when the connection is retrieved. - private final ChildProcessCreationParams mCreationParams; - - // Whether the connection is sandboxed. - private final boolean mSandoxed; + // The allocator used to create the connection. + private final ChildConnectionAllocator mConnectionAllocator; // The actual spare connection. private ChildProcessConnection mConnection; @@ -43,12 +32,11 @@ private ChildProcessConnection.ServiceCallback mConnectionServiceCallback; /** Creates and binds a ChildProcessConnection using the specified parameters. */ - public SpareChildConnection(Context context, ConnectionFactory connectionFactory, - ChildProcessCreationParams creationParams, boolean sandboxed) { + public SpareChildConnection( + Context context, ChildConnectionAllocator connectionAllocator, Bundle serviceBundle) { assert LauncherThread.runningOnLauncherThread(); - mCreationParams = creationParams; - mSandoxed = sandboxed; + mConnectionAllocator = connectionAllocator; ChildProcessConnection.ServiceCallback serviceCallback = new ChildProcessConnection.ServiceCallback() { @@ -86,19 +74,17 @@ } }; - mConnection = connectionFactory.allocateBoundConnection( - context, mCreationParams, serviceCallback); + mConnection = mConnectionAllocator.allocate(context, serviceBundle, serviceCallback); } /** - * @return a connection that has been bound or is being bound matching the given paramters, null - * otherwise. + * @return a connection that has been bound or is being bound if one was created with the same + * allocator as the one provided, null otherwise. */ - public ChildProcessConnection getConnection(ChildProcessCreationParams creationParams, - boolean sandboxed, + public ChildProcessConnection getConnection(ChildConnectionAllocator allocator, @NonNull final ChildProcessConnection.ServiceCallback serviceCallback) { assert LauncherThread.runningOnLauncherThread(); - if (mConnection == null || creationParams != mCreationParams || sandboxed != mSandoxed + if (mConnection == null || allocator != mConnectionAllocator || mConnectionServiceCallback != null) { return null; }
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java b/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java index ab28c54..3a36065f 100644 --- a/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java +++ b/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java
@@ -461,31 +461,31 @@ @Test @MediumTest @Feature({"ProcessManagement"}) + @ChildProcessAllocatorSettings(sandboxedServiceCount = 4) public void testCustomCreationParamDoesNotReuseWarmupConnection() { // Since warmUp only uses default params. final Context context = InstrumentationRegistry.getInstrumentation().getTargetContext(); ChildProcessCreationParams defaultCreationParams = getDefaultChildProcessCreationParams(context.getPackageName()); - ChildProcessCreationParams otherCreationParams = - getDefaultChildProcessCreationParams(context.getPackageName()); ChildProcessCreationParams.registerDefault(defaultCreationParams); + ChildProcessCreationParams otherCreationParams = getDefaultChildProcessCreationParams( + InstrumentationRegistry.getInstrumentation().getContext().getPackageName()); warmUpOnUiThreadBlocking(context); Assert.assertEquals(1, getConnectedSandboxedServicesCount()); - // First create a connnection with different creation params then the default. It should not - // use the warm-up connection which uses the default creation params (check uses object - // identity, having the params match exactly is fine). + // First create a connnection with different creation params than the default, it should not + // use the warmup connection (note that it won't bind since we are using the wrong package, + // but we need to use a different package to differentiate them, and we can only have 1 + // valid package per app). startSandboxedChildProcessWithCreationParams( - otherCreationParams, BLOCK_UNTIL_SETUP, true /* doSetupConnection */); - Assert.assertEquals(2, getConnectedSandboxedServicesCount()); + otherCreationParams, DONT_BLOCK, false /* doSetupConnection */); Assert.assertNotNull(getWarmUpConnection()); // Then start a process with the default creation params, the warmup-connection should be // used. startSandboxedChildProcessWithCreationParams( defaultCreationParams, BLOCK_UNTIL_SETUP, true /* doSetupConnection */); - Assert.assertEquals(2, getConnectedSandboxedServicesCount()); Assert.assertNull(getWarmUpConnection()); }
diff --git a/content/public/android/junit/src/org/chromium/content/browser/BindingManagerImplTest.java b/content/public/android/junit/src/org/chromium/content/browser/BindingManagerImplTest.java index 84ca0c3..2711464 100644 --- a/content/public/android/junit/src/org/chromium/content/browser/BindingManagerImplTest.java +++ b/content/public/android/junit/src/org/chromium/content/browser/BindingManagerImplTest.java
@@ -37,77 +37,18 @@ @RunWith(LocalRobolectricTestRunner.class) @Config(manifest = Config.NONE) public class BindingManagerImplTest { - private static class MockChildServiceConnection - implements ChildProcessConnection.ChildServiceConnection { - private boolean mBound; - - @Override - public boolean bind() { - mBound = true; - return true; - } - - @Override - public void unbind() { - mBound = false; - } - - @Override - public boolean isBound() { - return mBound; - } - } - - private static class TestChildProcessConnection extends ChildProcessConnection { - private final int mPid; - private boolean mConnected; - - /** - * Creates a mock binding corresponding to real ManagedChildProcessConnection after the - * connection is established: with initial binding bound and no strong binding. - */ - private TestChildProcessConnection(int pid) { - super(null /* context */, new ComponentName("org.chromium.test", "TestService"), - false /* isExternalService */, null /* childProcessCommonParameters */, - new ChildProcessCreationParams("org.chromium.test", - false /* isExternalService */, 0 /* libraryProcessType */, - false /* bindToCallerCheck */)); - mPid = pid; - } - - @Override - public int getPid() { - return mPid; - } - - @Override - protected ChildServiceConnection createServiceConnection(int bindFlags) { - return new MockChildServiceConnection(); - } - - // We don't have a real service so we have to mock the connection status. - @Override - public void start(boolean useStrongBinding, ServiceCallback serviceCallback) { - super.start(useStrongBinding, serviceCallback); - mConnected = true; - } - - @Override - public void stop() { - super.stop(); - mConnected = false; - } - - @Override - public boolean isConnected() { - return mConnected; - } - } // Creates a mocked ChildProcessConnection that is optionally added to a BindingManager. private static ChildProcessConnection createTestChildProcessConnection( int pid, BindingManager manager) { - ChildProcessConnection connection = new TestChildProcessConnection(pid); + String packageName = "org.chromium.test"; + ChildProcessCreationParams creationParams = + new ChildProcessCreationParams(packageName, false /* isExternalService */, + 0 /* libraryProcessType */, false /* bindToCallerCheck */); + TestChildProcessConnection connection = new TestChildProcessConnection( + new ComponentName(packageName, "TestService"), false /* bindAsExternalService */, + null /* serviceBundle */, creationParams); + connection.setPid(pid); connection.start(false /* useStrongBinding */, null /* serviceCallback */); if (manager != null) { manager.addNewConnection(pid, connection);
diff --git a/content/public/android/junit/src/org/chromium/content/browser/SpareChildConnectionTest.java b/content/public/android/junit/src/org/chromium/content/browser/SpareChildConnectionTest.java index 7d92b395..1779db5 100644 --- a/content/public/android/junit/src/org/chromium/content/browser/SpareChildConnectionTest.java +++ b/content/public/android/junit/src/org/chromium/content/browser/SpareChildConnectionTest.java
@@ -4,12 +4,13 @@ package org.chromium.content.browser; +import android.content.ComponentName; import android.content.Context; +import android.os.Bundle; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.mockito.Mockito.any; -import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; @@ -33,33 +34,44 @@ @Mock private ChildProcessConnection.ServiceCallback mServiceCallback; - static class TestConnectionFactory implements SpareChildConnection.ConnectionFactory { - private ChildProcessConnection mConnection; - private ChildProcessConnection.ServiceCallback mServiceCallback; + // A connection allocator not used to create connections. + private final ChildConnectionAllocator mWrongConnectionAllocator = + ChildConnectionAllocator.createForTest(null /* creationParams */, "org.chromium.test", + "TestServiceName", 3 /* serviceCount */, false /* bindAsExternalService */, + false /* useStrongBinding */); + + // The allocator used to allocate the actual connection. + private ChildConnectionAllocator mConnectionAllocator; + + private static class TestConnectionFactory + implements ChildConnectionAllocator.ConnectionFactory { + private TestChildProcessConnection mConnection; @Override - public ChildProcessConnection allocateBoundConnection(Context context, - ChildProcessCreationParams creationParams, - ChildProcessConnection.ServiceCallback serviceCallback) { - mConnection = mock(ChildProcessConnection.class); - mServiceCallback = serviceCallback; + public ChildProcessConnection createConnection(Context context, ComponentName serviceName, + boolean bindAsExternalService, Bundle serviceBundle, + ChildProcessCreationParams creationParams) { + // We expect to create only one connection in these tests. + assert mConnection == null; + mConnection = new TestChildProcessConnection( + serviceName, bindAsExternalService, serviceBundle, creationParams); return mConnection; } public void simulateConnectionBindingSuccessfully() { - mServiceCallback.onChildStarted(); + mConnection.getServiceCallback().onChildStarted(); } public void simulateConnectionFailingToBind() { - mServiceCallback.onChildStartFailed(); + mConnection.getServiceCallback().onChildStartFailed(); } public void simulateConnectionDied() { - mServiceCallback.onChildProcessDied(mConnection); + mConnection.getServiceCallback().onChildProcessDied(mConnection); } - } + }; - private final TestConnectionFactory mTestConnectionfactory = new TestConnectionFactory(); + private final TestConnectionFactory mTestConnectionFactory = new TestConnectionFactory(); // For some reason creating ChildProcessCreationParams from a static context makes the launcher // unhappy. (some Dalvik native library is not found when initializing a SparseArray) @@ -77,8 +89,13 @@ // asserts are not triggered. LauncherThread.setCurrentThreadAsLauncherThread(); + mConnectionAllocator = ChildConnectionAllocator.createForTest(mCreationParams, + mCreationParams.getPackageNameForSandboxedService(), "TestServiceName", + 5 /* serviceCount */, false /* bindAsExternalService */, + false /* useStrongBinding */); + mConnectionAllocator.setConnectionFactoryForTesting(mTestConnectionFactory); mSpareConnection = new SpareChildConnection( - null /* context */, mTestConnectionfactory, mCreationParams, true /* sandboxed */); + null /* context */, mConnectionAllocator, null /* serviceBundle */); } @After @@ -90,33 +107,28 @@ @Test @Feature({"ProcessManagement"}) public void testCreateAndGet() { - // Tests retrieving the connection with the wrong parameters. - ChildProcessConnection connection = mSpareConnection.getConnection( - null /* creationParams */, true /* sandboxed */, mServiceCallback); - assertNull(connection); - connection = mSpareConnection.getConnection( - mCreationParams, false /* sandboxed */, mServiceCallback); + // Tests retrieving the connection with the wrong allocator. + ChildProcessConnection connection = + mSpareConnection.getConnection(mWrongConnectionAllocator, mServiceCallback); assertNull(connection); // And with the right one. - connection = mSpareConnection.getConnection( - mCreationParams, true /* sandboxed */, mServiceCallback); + connection = mSpareConnection.getConnection(mConnectionAllocator, mServiceCallback); assertNotNull(connection); // The connection has been used, subsequent calls should return null. - connection = mSpareConnection.getConnection( - mCreationParams, true /* sandboxed */, mServiceCallback); + connection = mSpareConnection.getConnection(mConnectionAllocator, mServiceCallback); assertNull(connection); } @Test @Feature({"ProcessManagement"}) public void testCallbackNotCalledWhenNoConnection() { - mTestConnectionfactory.simulateConnectionBindingSuccessfully(); + mTestConnectionFactory.simulateConnectionBindingSuccessfully(); // Retrieve the wrong connection, no callback should be fired. - ChildProcessConnection connection = mSpareConnection.getConnection( - null /* creationParams */, true /* sandboxed */, mServiceCallback); + ChildProcessConnection connection = + mSpareConnection.getConnection(mWrongConnectionAllocator, mServiceCallback); assertNull(connection); ShadowLooper.runUiThreadTasksIncludingDelayedTasks(); verify(mServiceCallback, times(0)).onChildStarted(); @@ -127,11 +139,11 @@ @Test @Feature({"ProcessManagement"}) public void testCallbackCalledConnectionReady() { - mTestConnectionfactory.simulateConnectionBindingSuccessfully(); + mTestConnectionFactory.simulateConnectionBindingSuccessfully(); // Now retrieve the connection, the callback should be invoked. - ChildProcessConnection connection = mSpareConnection.getConnection( - mCreationParams, true /* sandboxed */, mServiceCallback); + ChildProcessConnection connection = + mSpareConnection.getConnection(mConnectionAllocator, mServiceCallback); assertNotNull(connection); ShadowLooper.runUiThreadTasksIncludingDelayedTasks(); verify(mServiceCallback, times(1)).onChildStarted(); @@ -142,8 +154,8 @@ @Feature({"ProcessManagement"}) public void testCallbackCalledConnectionNotReady() { // Retrieve the connection before it's bound. - ChildProcessConnection connection = mSpareConnection.getConnection( - mCreationParams, true /* sandboxed */, mServiceCallback); + ChildProcessConnection connection = + mSpareConnection.getConnection(mConnectionAllocator, mServiceCallback); assertNotNull(connection); ShadowLooper.runUiThreadTasksIncludingDelayedTasks(); // No callbacks are called. @@ -151,7 +163,7 @@ verify(mServiceCallback, times(0)).onChildStartFailed(); // Simulate the connection getting bound, it should trigger the callback. - mTestConnectionfactory.simulateConnectionBindingSuccessfully(); + mTestConnectionFactory.simulateConnectionBindingSuccessfully(); verify(mServiceCallback, times(1)).onChildStarted(); verify(mServiceCallback, times(0)).onChildStartFailed(); } @@ -159,11 +171,11 @@ @Test @Feature({"ProcessManagement"}) public void testUnretrievedConnectionFailsToBind() { - mTestConnectionfactory.simulateConnectionFailingToBind(); + mTestConnectionFactory.simulateConnectionFailingToBind(); // We should not have a spare connection. - ChildProcessConnection connection = mSpareConnection.getConnection( - mCreationParams, true /* sandboxed */, mServiceCallback); + ChildProcessConnection connection = + mSpareConnection.getConnection(mConnectionAllocator, mServiceCallback); assertNull(connection); } @@ -171,11 +183,11 @@ @Feature({"ProcessManagement"}) public void testRetrievedConnectionFailsToBind() { // Retrieve the spare connection before it's bound. - ChildProcessConnection connection = mSpareConnection.getConnection( - mCreationParams, true /* sandboxed */, mServiceCallback); + ChildProcessConnection connection = + mSpareConnection.getConnection(mConnectionAllocator, mServiceCallback); assertNotNull(connection); - mTestConnectionfactory.simulateConnectionFailingToBind(); + mTestConnectionFactory.simulateConnectionFailingToBind(); // We should get a failure callback. verify(mServiceCallback, times(0)).onChildStarted(); @@ -186,11 +198,11 @@ @Feature({"ProcessManagement"}) public void testRetrievedConnectionStops() { // Retrieve the spare connection before it's bound. - ChildProcessConnection connection = mSpareConnection.getConnection( - mCreationParams, true /* sandboxed */, mServiceCallback); + ChildProcessConnection connection = + mSpareConnection.getConnection(mConnectionAllocator, mServiceCallback); assertNotNull(connection); - mTestConnectionfactory.simulateConnectionDied(); + mTestConnectionFactory.simulateConnectionDied(); // We should get a failure callback. verify(mServiceCallback, times(0)).onChildStarted(); @@ -202,11 +214,11 @@ @Feature({"ProcessManagement"}) public void testConnectionFreeing() { // Simulate the connection dying. - mTestConnectionfactory.simulateConnectionDied(); + mTestConnectionFactory.simulateConnectionDied(); // Connection should be gone. - ChildProcessConnection connection = mSpareConnection.getConnection( - mCreationParams, true /* sandboxed */, mServiceCallback); + ChildProcessConnection connection = + mSpareConnection.getConnection(mConnectionAllocator, mServiceCallback); assertNull(connection); } }
diff --git a/content/public/android/junit/src/org/chromium/content/browser/TestChildProcessConnection.java b/content/public/android/junit/src/org/chromium/content/browser/TestChildProcessConnection.java new file mode 100644 index 0000000..94f8dd8 --- /dev/null +++ b/content/public/android/junit/src/org/chromium/content/browser/TestChildProcessConnection.java
@@ -0,0 +1,85 @@ +// 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.content.browser; + +import android.content.ComponentName; +import android.os.Bundle; + +import org.chromium.base.process_launcher.ChildProcessCreationParams; + +/** An implementation of ChildProcessConnection that does not connect to a real service. */ +class TestChildProcessConnection extends ChildProcessConnection { + private static class MockChildServiceConnection + implements ChildProcessConnection.ChildServiceConnection { + private boolean mBound; + + @Override + public boolean bind() { + mBound = true; + return true; + } + + @Override + public void unbind() { + mBound = false; + } + + @Override + public boolean isBound() { + return mBound; + } + } + + private int mPid; + private boolean mConnected; + private ServiceCallback mServiceCallback; + + /** + * Creates a mock binding corresponding to real ManagedChildProcessConnection after the + * connection is established: with initial binding bound and no strong binding. + */ + TestChildProcessConnection(ComponentName serviceName, boolean bindAsExternalService, + Bundle serviceBundle, ChildProcessCreationParams creationParams) { + super(null /* context */, serviceName, bindAsExternalService, serviceBundle, + creationParams); + } + + public void setPid(int pid) { + mPid = pid; + } + + @Override + public int getPid() { + return mPid; + } + + @Override + protected ChildServiceConnection createServiceConnection(int bindFlags) { + return new MockChildServiceConnection(); + } + + // We don't have a real service so we have to mock the connection status. + @Override + public void start(boolean useStrongBinding, ServiceCallback serviceCallback) { + super.start(useStrongBinding, serviceCallback); + mConnected = true; + mServiceCallback = serviceCallback; + } + + @Override + public void stop() { + super.stop(); + mConnected = false; + } + + @Override + public boolean isConnected() { + return mConnected; + } + + public ServiceCallback getServiceCallback() { + return mServiceCallback; + } +}
diff --git a/content/renderer/accessibility/render_accessibility_impl.cc b/content/renderer/accessibility/render_accessibility_impl.cc index 7c8f196..059bd19 100644 --- a/content/renderer/accessibility/render_accessibility_impl.cc +++ b/content/renderer/accessibility/render_accessibility_impl.cc
@@ -261,6 +261,17 @@ serializer_.DeleteClientSubtree(obj); #endif + // If some cell IDs have been added or removed, we need to update the whole + // table. + if (obj.Role() == blink::kWebAXRoleRow && + event == ui::AX_EVENT_CHILDREN_CHANGED) { + WebAXObject table_like_object = obj.ParentObject(); + if (!table_like_object.IsDetached()) { + serializer_.DeleteClientSubtree(table_like_object); + HandleAXEvent(table_like_object, ui::AX_EVENT_CHILDREN_CHANGED); + } + } + // Add the accessibility object to our cache and ensure it's valid. AccessibilityHostMsg_EventParams acc_event; acc_event.id = obj.AxID();
diff --git a/content/shell/BUILD.gn b/content/shell/BUILD.gn index 21fb08f3..f621f3eb 100644 --- a/content/shell/BUILD.gn +++ b/content/shell/BUILD.gn
@@ -170,6 +170,8 @@ "common/shell_origin_trial_policy.h", "common/shell_switches.cc", "common/shell_switches.h", + "gpu/shell_content_gpu_client.cc", + "gpu/shell_content_gpu_client.h", "renderer/layout_test/blink_test_helpers.cc", "renderer/layout_test/blink_test_helpers.h", "renderer/layout_test/blink_test_runner.cc", @@ -210,6 +212,7 @@ "//content/public/browser", "//content/public/child", "//content/public/common", + "//content/public/gpu", "//content/public/renderer", "//content/public/utility", "//ipc",
diff --git a/content/shell/app/shell_main_delegate.cc b/content/shell/app/shell_main_delegate.cc index 6cfffb6..6b16244 100644 --- a/content/shell/app/shell_main_delegate.cc +++ b/content/shell/app/shell_main_delegate.cc
@@ -31,6 +31,7 @@ #include "content/shell/common/layout_test/layout_test_switches.h" #include "content/shell/common/shell_content_client.h" #include "content/shell/common/shell_switches.h" +#include "content/shell/gpu/shell_content_gpu_client.h" #include "content/shell/renderer/layout_test/layout_test_content_renderer_client.h" #include "content/shell/renderer/shell_content_renderer_client.h" #include "content/shell/utility/shell_content_utility_client.h" @@ -378,6 +379,11 @@ return browser_client_.get(); } +ContentGpuClient* ShellMainDelegate::CreateContentGpuClient() { + gpu_client_.reset(new ShellContentGpuClient); + return gpu_client_.get(); +} + ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { renderer_client_.reset(base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kRunLayoutTest)
diff --git a/content/shell/app/shell_main_delegate.h b/content/shell/app/shell_main_delegate.h index 1297ff8..689c1b7 100644 --- a/content/shell/app/shell_main_delegate.h +++ b/content/shell/app/shell_main_delegate.h
@@ -15,6 +15,7 @@ namespace content { class ContentClient; class ShellContentBrowserClient; +class ShellContentGpuClient; class ShellContentRendererClient; class ShellContentUtilityClient; @@ -36,6 +37,7 @@ void ZygoteForked() override; #endif ContentBrowserClient* CreateContentBrowserClient() override; + ContentGpuClient* CreateContentGpuClient() override; ContentRendererClient* CreateContentRendererClient() override; ContentUtilityClient* CreateContentUtilityClient() override; @@ -43,6 +45,7 @@ private: std::unique_ptr<ShellContentBrowserClient> browser_client_; + std::unique_ptr<ShellContentGpuClient> gpu_client_; std::unique_ptr<ShellContentRendererClient> renderer_client_; std::unique_ptr<ShellContentUtilityClient> utility_client_; std::unique_ptr<ContentClient> content_client_;
diff --git a/content/shell/browser/OWNERS b/content/shell/browser/OWNERS index 890d46a..c4dd179a 100644 --- a/content/shell/browser/OWNERS +++ b/content/shell/browser/OWNERS
@@ -3,5 +3,7 @@ per-file content_shell_browser_manifest_overlay.json=set noparent per-file content_shell_browser_manifest_overlay.json=file://ipc/SECURITY_OWNERS +per-file content_shell_gpu_manifest_overlay.json=set noparent +per-file content_shell_gpu_manifest_overlay.json=file://ipc/SECURITY_OWNERS per-file content_shell_utility_manifest_overlay.json=set noparent per-file content_shell_utility_manifest_overlay.json=file://ipc/SECURITY_OWNERS
diff --git a/content/shell/browser/content_shell_gpu_manifest_overlay.json b/content/shell/browser/content_shell_gpu_manifest_overlay.json new file mode 100644 index 0000000..f032a68 --- /dev/null +++ b/content/shell/browser/content_shell_gpu_manifest_overlay.json
@@ -0,0 +1,12 @@ +{ + "name": "content_gpu", + "interface_provider_specs": { + "service_manager:connector": { + "provides": { + "browser": [ + "content::mojom::PowerMonitorTest" + ] + } + } + } +}
diff --git a/content/shell/browser/layout_test/blink_test_controller.cc b/content/shell/browser/layout_test/blink_test_controller.cc index 5b61ab4..03ed2f2 100644 --- a/content/shell/browser/layout_test/blink_test_controller.cc +++ b/content/shell/browser/layout_test/blink_test_controller.cc
@@ -526,19 +526,6 @@ return handled; } -bool BlinkTestController::OnMessageReceived( - const IPC::Message& message, - RenderFrameHost* render_frame_host) { - bool handled = true; - IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(BlinkTestController, message, - render_frame_host) - IPC_MESSAGE_HANDLER(ShellViewHostMsg_LayoutDumpResponse, - OnLayoutDumpResponse) - IPC_MESSAGE_UNHANDLED(handled = false) - IPC_END_MESSAGE_MAP() - return handled; -} - void BlinkTestController::PluginCrashed(const base::FilePath& plugin_path, base::ProcessId plugin_pid) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); @@ -791,7 +778,9 @@ continue; ++number_of_messages; - GetLayoutTestControlPtr(rfh)->LayoutDumpRequest(); + GetLayoutTestControlPtr(rfh)->DumpFrameLayout( + base::Bind(&BlinkTestController::OnDumpFrameLayoutResponse, + base::Unretained(this), rfh->GetFrameTreeNodeId())); } pending_layout_dumps_ = number_of_messages; @@ -817,11 +806,11 @@ } } -void BlinkTestController::OnLayoutDumpResponse(RenderFrameHost* sender, - const std::string& dump) { +void BlinkTestController::OnDumpFrameLayoutResponse(int frame_tree_node_id, + const std::string& dump) { // Store the result. auto pair = frame_to_layout_dump_map_.insert( - std::make_pair(sender->GetFrameTreeNodeId(), dump)); + std::make_pair(frame_tree_node_id, dump)); bool insertion_took_place = pair.second; DCHECK(insertion_took_place);
diff --git a/content/shell/browser/layout_test/blink_test_controller.h b/content/shell/browser/layout_test/blink_test_controller.h index e854c88..5bdc5900 100644 --- a/content/shell/browser/layout_test/blink_test_controller.h +++ b/content/shell/browser/layout_test/blink_test_controller.h
@@ -159,8 +159,6 @@ // WebContentsObserver implementation. bool OnMessageReceived(const IPC::Message& message) override; - bool OnMessageReceived(const IPC::Message& message, - RenderFrameHost* render_frame_host) override; void PluginCrashed(const base::FilePath& plugin_path, base::ProcessId plugin_pid) override; void RenderFrameCreated(RenderFrameHost* render_frame_host) override; @@ -204,7 +202,8 @@ void OnImageDump(const std::string& actual_pixel_hash, const SkBitmap& image); void OnTextDump(const std::string& dump); void OnInitiateLayoutDump(); - void OnLayoutDumpResponse(RenderFrameHost* sender, const std::string& dump); + void OnDumpFrameLayoutResponse(int frame_tree_node_id, + const std::string& dump); void OnPrintMessageToStderr(const std::string& message); void OnPrintMessage(const std::string& message); void OnOverridePreferences(const WebPreferences& prefs); @@ -283,7 +282,7 @@ // Map from frame_tree_node_id into frame-specific dumps. std::map<int, std::string> frame_to_layout_dump_map_; - // Number of ShellViewHostMsg_LayoutDumpResponse messages we are waiting for. + // Number of LayoutTestControl.DumpFrameLayout responses we are waiting for. int pending_layout_dumps_; // Renderer processes are observed to detect crashes.
diff --git a/content/shell/browser/shell_content_browser_client.cc b/content/shell/browser/shell_content_browser_client.cc index 5f111b86..14df4d68 100644 --- a/content/shell/browser/shell_content_browser_client.cc +++ b/content/shell/browser/shell_content_browser_client.cc
@@ -254,6 +254,8 @@ int id = -1; if (name == content::mojom::kBrowserServiceName) id = IDR_CONTENT_SHELL_BROWSER_MANIFEST_OVERLAY; + else if (name == content::mojom::kGpuServiceName) + id = IDR_CONTENT_SHELL_GPU_MANIFEST_OVERLAY; else if (name == content::mojom::kRendererServiceName) id = IDR_CONTENT_SHELL_RENDERER_MANIFEST_OVERLAY; else if (name == content::mojom::kUtilityServiceName)
diff --git a/content/shell/common/layout_test.mojom b/content/shell/common/layout_test.mojom index dd61553..19146dd 100644 --- a/content/shell/common/layout_test.mojom +++ b/content/shell/common/layout_test.mojom
@@ -35,9 +35,8 @@ }; interface LayoutTestControl { - // Asks a frame to dump its contents into a string and send them back over - // IPC. - LayoutDumpRequest(); + // Dumps the frame's contents into a string. + DumpFrameLayout() => (string frame_layout_dump); // Replicates test config (for an already started test) to a new renderer // that hosts parts of the main test window.
diff --git a/content/shell/common/shell_content_client.cc b/content/shell/common/shell_content_client.cc index 7e06a28..3cc7fd0 100644 --- a/content/shell/common/shell_content_client.cc +++ b/content/shell/common/shell_content_client.cc
@@ -43,8 +43,6 @@ return base::ASCIIToUTF16("<<OtherDateLabel>>"); case IDS_FORM_OTHER_MONTH_LABEL: return base::ASCIIToUTF16("<<OtherMonthLabel>>"); - case IDS_FORM_OTHER_TIME_LABEL: - return base::ASCIIToUTF16("<<OtherTimeLabel>>"); case IDS_FORM_OTHER_WEEK_LABEL: return base::ASCIIToUTF16("<<OtherWeekLabel>>"); case IDS_FORM_CALENDAR_CLEAR:
diff --git a/content/shell/common/shell_messages.h b/content/shell/common/shell_messages.h index 275c96f..db671cd 100644 --- a/content/shell/common/shell_messages.h +++ b/content/shell/common/shell_messages.h
@@ -51,14 +51,11 @@ std::string /* dump */) // Asks the browser process to perform a layout dump spanning all the -// (potentially cross-process) frames. This triggers multiple -// ShellViewMsg_LayoutDumpRequest / ShellViewHostMsg_LayoutDumpResponse messages -// and ends with sending of ShellViewMsg_LayoutDumpCompleted. +// (potentially cross-process) frames. This goes through multiple +// LayoutTestControl.DumpFrameLayout calls and ends with sending of +// ShellViewMsg_LayoutDumpCompleted. IPC_MESSAGE_ROUTED0(ShellViewHostMsg_InitiateLayoutDump) -// Sends a layout dump of a frame (response to ShellViewMsg_LayoutDumpRequest). -IPC_MESSAGE_ROUTED1(ShellViewHostMsg_LayoutDumpResponse, std::string /* dump */) - // Send an image dump of the WebContents to the render host. IPC_MESSAGE_ROUTED2(ShellViewHostMsg_ImageDump, std::string /* actual pixel hash */,
diff --git a/content/shell/gpu/DEPS b/content/shell/gpu/DEPS new file mode 100644 index 0000000..c610d2e --- /dev/null +++ b/content/shell/gpu/DEPS
@@ -0,0 +1,3 @@ +include_rules = [ + "+services/service_manager", +]
diff --git a/content/shell/gpu/shell_content_gpu_client.cc b/content/shell/gpu/shell_content_gpu_client.cc new file mode 100644 index 0000000..21c1692 --- /dev/null +++ b/content/shell/gpu/shell_content_gpu_client.cc
@@ -0,0 +1,27 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "content/shell/gpu/shell_content_gpu_client.h" + +#include "base/memory/ptr_util.h" +#include "content/shell/common/power_monitor_test_impl.h" +#include "mojo/public/cpp/bindings/strong_binding.h" +#include "services/service_manager/public/cpp/binder_registry.h" + +namespace content { + +ShellContentGpuClient::ShellContentGpuClient() = default; + +ShellContentGpuClient::~ShellContentGpuClient() = default; + +void ShellContentGpuClient::Initialize( + base::FieldTrialList::Observer* observer, + service_manager::BinderRegistry* registry) { + registry->AddInterface<mojom::PowerMonitorTest>( + base::Bind(&PowerMonitorTestImpl::MakeStrongBinding, + base::Passed(base::MakeUnique<PowerMonitorTestImpl>())), + base::ThreadTaskRunnerHandle::Get()); +} + +} // namespace content
diff --git a/content/shell/gpu/shell_content_gpu_client.h b/content/shell/gpu/shell_content_gpu_client.h new file mode 100644 index 0000000..d9ebbc4 --- /dev/null +++ b/content/shell/gpu/shell_content_gpu_client.h
@@ -0,0 +1,30 @@ +// 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 CONTENT_SHELL_GPU_SHELL_CONTENT_GPU_CLIENT_H_ +#define CONTENT_SHELL_GPU_SHELL_CONTENT_GPU_CLIENT_H_ + +#include <memory> + +#include "base/macros.h" +#include "content/public/common/network_service_test.mojom.h" +#include "content/public/gpu/content_gpu_client.h" + +namespace content { + +class ShellContentGpuClient : public ContentGpuClient { + public: + ShellContentGpuClient(); + ~ShellContentGpuClient() override; + + // ContentGpuClient: + void Initialize(base::FieldTrialList::Observer* observer, + service_manager::BinderRegistry* registry) override; + + DISALLOW_COPY_AND_ASSIGN(ShellContentGpuClient); +}; + +} // namespace content + +#endif // CONTENT_SHELL_GPU_SHELL_CONTENT_GPU_CLIENT_H_
diff --git a/content/shell/renderer/layout_test/layout_test_render_frame_observer.cc b/content/shell/renderer/layout_test/layout_test_render_frame_observer.cc index e10cca7d..b4193023 100644 --- a/content/shell/renderer/layout_test/layout_test_render_frame_observer.cc +++ b/content/shell/renderer/layout_test/layout_test_render_frame_observer.cc
@@ -8,12 +8,10 @@ #include "content/public/common/associated_interface_registry.h" #include "content/public/renderer/render_frame.h" -#include "content/shell/common/shell_messages.h" #include "content/shell/renderer/layout_test/blink_test_runner.h" #include "content/shell/renderer/layout_test/layout_test_render_thread_observer.h" #include "content/shell/test_runner/web_test_interfaces.h" #include "content/shell/test_runner/web_test_runner.h" -#include "ipc/ipc_message_macros.h" #include "third_party/WebKit/public/web/WebLocalFrame.h" namespace content { @@ -44,13 +42,14 @@ delete this; } -void LayoutTestRenderFrameObserver::LayoutDumpRequest() { +void LayoutTestRenderFrameObserver::DumpFrameLayout( + DumpFrameLayoutCallback callback) { std::string dump = LayoutTestRenderThreadObserver::GetInstance() ->test_interfaces() ->TestRunner() ->DumpLayout(render_frame()->GetWebFrame()); - Send(new ShellViewHostMsg_LayoutDumpResponse(routing_id(), dump)); + std::move(callback).Run(dump); } void LayoutTestRenderFrameObserver::ReplicateTestConfiguration(
diff --git a/content/shell/renderer/layout_test/layout_test_render_frame_observer.h b/content/shell/renderer/layout_test/layout_test_render_frame_observer.h index bd620c08..cc86135e 100644 --- a/content/shell/renderer/layout_test/layout_test_render_frame_observer.h +++ b/content/shell/renderer/layout_test/layout_test_render_frame_observer.h
@@ -22,7 +22,7 @@ // RenderFrameObserver implementation. void OnDestruct() override; - void LayoutDumpRequest() override; + void DumpFrameLayout(DumpFrameLayoutCallback callback) override; void SetTestConfiguration(mojom::ShellTestConfigurationPtr config) override; void ReplicateTestConfiguration( mojom::ShellTestConfigurationPtr config) override;
diff --git a/content/shell/shell_resources.grd b/content/shell/shell_resources.grd index 19e5276..0fdafbe 100644 --- a/content/shell/shell_resources.grd +++ b/content/shell/shell_resources.grd
@@ -13,6 +13,7 @@ <include name="IDR_CONTENT_SHELL_MISSING_IMAGE_GIF" file="resources/missingImage.gif" type="BINDATA" /> <include name="IDR_CONTENT_SHELL_MISSING_IMAGE_PNG" file="resources/missingImage.png" type="BINDATA" /> <include name="IDR_CONTENT_SHELL_BROWSER_MANIFEST_OVERLAY" file="browser/content_shell_browser_manifest_overlay.json" type="BINDATA" /> + <include name="IDR_CONTENT_SHELL_GPU_MANIFEST_OVERLAY" file="browser/content_shell_gpu_manifest_overlay.json" type="BINDATA" /> <include name="IDR_CONTENT_SHELL_RENDERER_MANIFEST_OVERLAY" file="browser/content_shell_renderer_manifest_overlay.json" type="BINDATA" /> <include name="IDR_CONTENT_SHELL_UTILITY_MANIFEST_OVERLAY" file="browser/content_shell_utility_manifest_overlay.json" type="BINDATA" /> </includes>
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn index 6963f2b..0a8482f 100644 --- a/content/test/BUILD.gn +++ b/content/test/BUILD.gn
@@ -250,6 +250,7 @@ "//cc/ipc:interfaces", "//cc/surfaces", "//components/leveldb/public/interfaces", + "//components/viz/common", "//components/viz/host", "//components/viz/service", "//content/app:both_for_content_tests", @@ -1420,7 +1421,6 @@ "../common/service_worker/service_worker_utils_unittest.cc", "../common/throttling_url_loader_unittest.cc", "../common/webplugininfo_unittest.cc", - "../network/network_service_unittest.cc", "../network/url_loader_unittest.cc", "../public/test/referrer_unittest.cc", "../public/test/test_browser_thread_bundle_unittest.cc", @@ -1507,6 +1507,7 @@ "//components/rappor:test_support", "//components/ukm:test_support", "//components/ukm/public/interfaces", + "//components/viz/common", "//components/viz/host", "//components/viz/service", "//content:resources",
diff --git a/content/test/data/accessibility/aria/table-column-hidden-expected-blink.txt b/content/test/data/accessibility/aria/table-column-hidden-expected-blink.txt new file mode 100644 index 0000000..d9de919 --- /dev/null +++ b/content/test/data/accessibility/aria/table-column-hidden-expected-blink.txt
@@ -0,0 +1,39 @@ +rootWebArea +++grid ariaColumnCount=4 tableRowCount=3 tableColumnCount=3 cellIds=columnHeader,columnHeader,columnHeader,cell,cell,cell,cell,cell,cell +++++row +++++++columnHeader name='Month' ariaCellColumnIndex=1 ariaCellRowIndex=1 +++++++++staticText name='Month' +++++++++++inlineTextBox name='Month' +++++++columnHeader name='Day' ariaCellColumnIndex=2 ariaCellRowIndex=1 +++++++++staticText name='Day' +++++++++++inlineTextBox name='Day' +++++++columnHeader name='Weather' ariaCellColumnIndex=4 ariaCellRowIndex=1 +++++++++staticText name='Weather' +++++++++++inlineTextBox name='Weather' +++++row +++++++cell selectable name='January' ariaCellColumnIndex=1 ariaCellRowIndex=2 +++++++++staticText name='January' +++++++++++inlineTextBox name='January' +++++++cell selectable name='01' ariaCellColumnIndex=2 ariaCellRowIndex=2 +++++++++staticText name='01' +++++++++++inlineTextBox name='01' +++++++cell selectable name='Sunny' ariaCellColumnIndex=4 ariaCellRowIndex=2 +++++++++staticText name='Sunny' +++++++++++inlineTextBox name='Sunny' +++++row +++++++cell selectable name='January' ariaCellColumnIndex=1 ariaCellRowIndex=2 +++++++++staticText name='January' +++++++++++inlineTextBox name='January' +++++++cell selectable name='02' ariaCellColumnIndex=2 ariaCellRowIndex=2 +++++++++staticText name='02' +++++++++++inlineTextBox name='02' +++++++cell selectable name='Rainy' ariaCellColumnIndex=4 ariaCellRowIndex=2 +++++++++staticText name='Rainy' +++++++++++inlineTextBox name='Rainy' +++++column +++++column +++++column +++++tableHeaderContainer +++paragraph +++++staticText name='done' +++++++inlineTextBox name='done'
diff --git a/content/test/data/accessibility/aria/table-column-hidden-expected-mac.txt b/content/test/data/accessibility/aria/table-column-hidden-expected-mac.txt new file mode 100644 index 0000000..073f663 --- /dev/null +++ b/content/test/data/accessibility/aria/table-column-hidden-expected-mac.txt
@@ -0,0 +1,29 @@ +AXWebArea +++AXGrid AXARIAColumnCount='4' +++++AXRow +++++++AXCell AXTitle='Month' AXARIAColumnIndex='1' AXARIARowIndex='1' +++++++++AXStaticText AXValue='Month' +++++++AXCell AXTitle='Day' AXARIAColumnIndex='2' AXARIARowIndex='1' +++++++++AXStaticText AXValue='Day' +++++++AXCell AXTitle='Weather' AXARIAColumnIndex='4' AXARIARowIndex='1' +++++++++AXStaticText AXValue='Weather' +++++AXRow +++++++AXCell AXTitle='January' AXARIAColumnIndex='1' AXARIARowIndex='2' +++++++++AXStaticText AXValue='January' +++++++AXCell AXTitle='01' AXARIAColumnIndex='2' AXARIARowIndex='2' +++++++++AXStaticText AXValue='01' +++++++AXCell AXTitle='Sunny' AXARIAColumnIndex='4' AXARIARowIndex='2' +++++++++AXStaticText AXValue='Sunny' +++++AXRow +++++++AXCell AXTitle='January' AXARIAColumnIndex='1' AXARIARowIndex='2' +++++++++AXStaticText AXValue='January' +++++++AXCell AXTitle='02' AXARIAColumnIndex='2' AXARIARowIndex='2' +++++++++AXStaticText AXValue='02' +++++++AXCell AXTitle='Rainy' AXARIAColumnIndex='4' AXARIARowIndex='2' +++++++++AXStaticText AXValue='Rainy' +++++AXColumn +++++AXColumn +++++AXColumn +++++AXGroup +++AXGroup +++++AXStaticText AXValue='done'
diff --git a/content/test/data/accessibility/aria/table-column-hidden-expected-win.txt b/content/test/data/accessibility/aria/table-column-hidden-expected-win.txt new file mode 100644 index 0000000..6a5ec4bc --- /dev/null +++ b/content/test/data/accessibility/aria/table-column-hidden-expected-win.txt
@@ -0,0 +1,29 @@ +ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE +++ROLE_SYSTEM_TABLE colcount:4 +++++ROLE_SYSTEM_ROW +++++++ROLE_SYSTEM_COLUMNHEADER name='Month' colindex:1 rowindex:1 +++++++++ROLE_SYSTEM_STATICTEXT name='Month' +++++++ROLE_SYSTEM_COLUMNHEADER name='Day' colindex:2 rowindex:1 +++++++++ROLE_SYSTEM_STATICTEXT name='Day' +++++++ROLE_SYSTEM_COLUMNHEADER name='Weather' colindex:4 rowindex:1 +++++++++ROLE_SYSTEM_STATICTEXT name='Weather' +++++ROLE_SYSTEM_ROW +++++++ROLE_SYSTEM_CELL name='January' FOCUSABLE colindex:1 rowindex:2 +++++++++ROLE_SYSTEM_STATICTEXT name='January' +++++++ROLE_SYSTEM_CELL name='01' FOCUSABLE colindex:2 rowindex:2 +++++++++ROLE_SYSTEM_STATICTEXT name='01' +++++++ROLE_SYSTEM_CELL name='Sunny' FOCUSABLE colindex:4 rowindex:2 +++++++++ROLE_SYSTEM_STATICTEXT name='Sunny' +++++ROLE_SYSTEM_ROW +++++++ROLE_SYSTEM_CELL name='January' FOCUSABLE colindex:1 rowindex:2 +++++++++ROLE_SYSTEM_STATICTEXT name='January' +++++++ROLE_SYSTEM_CELL name='02' FOCUSABLE colindex:2 rowindex:2 +++++++++ROLE_SYSTEM_STATICTEXT name='02' +++++++ROLE_SYSTEM_CELL name='Rainy' FOCUSABLE colindex:4 rowindex:2 +++++++++ROLE_SYSTEM_STATICTEXT name='Rainy' +++++ROLE_SYSTEM_COLUMN +++++ROLE_SYSTEM_COLUMN +++++ROLE_SYSTEM_COLUMN +++++IA2_ROLE_SECTION +++IA2_ROLE_PARAGRAPH +++++ROLE_SYSTEM_STATICTEXT name='done'
diff --git a/content/test/data/accessibility/aria/table-column-hidden.html b/content/test/data/accessibility/aria/table-column-hidden.html new file mode 100644 index 0000000..85802a1 --- /dev/null +++ b/content/test/data/accessibility/aria/table-column-hidden.html
@@ -0,0 +1,46 @@ +<!DOCTYPE html> +<!-- +@WAIT-FOR:done +@WIN-ALLOW:colcount* +@WIN-ALLOW:colindex* +@WIN-ALLOW:rowcount* +@WIN-ALLOW:rowindex* +@MAC-ALLOW:AXARIAColumn* +@MAC-ALLOW:AXARIARow* +@BLINK-ALLOW:cellIds* +@BLINK-ALLOW:*ColumnCount* +@BLINK-ALLOW:ariaCellColumnIndex* +@BLINK-ALLOW:*RowCount* +@BLINK-ALLOW:ariaCellRowIndex* +--> +<table role="grid" aria-rowcount="3" aria-colcount="4"> + <tbody><tr> + <th aria-rowindex="1" aria-colindex="1">Month</th> + <th aria-rowindex="1" aria-colindex="2">Day</th> + <th aria-rowindex="1" aria-colindex="3">Year</th> + <th aria-rowindex="1" aria-colindex="4">Weather</th> + </tr> + <tr> + <td role="gridcell" tabindex="0" aria-rowindex="2" aria-colindex="1">January</td> + <td role="gridcell" tabindex="-1" aria-rowindex="2" aria-colindex="2">01</td> + <td role="gridcell" tabindex="-1" aria-rowindex="2" aria-colindex="3">2017</td> + <td role="gridcell" tabindex="-1" aria-rowindex="2" aria-colindex="4">Sunny</td> + </tr> + <tr> + <td role="gridcell" tabindex="0" aria-rowindex="2" aria-colindex="1">January</td> + <td role="gridcell" tabindex="-1" aria-rowindex="2" aria-colindex="2">02</td> + <td role="gridcell" tabindex="-1" aria-rowindex="2" aria-colindex="3">2017</td> + <td role="gridcell" tabindex="-1" aria-rowindex="2" aria-colindex="4">Rainy</td> + </tr> + </tbody> +</table> +<p></p> + +<script> + // Hide the year column. + let cells = document.querySelectorAll('[aria-colindex="3"]'); + for (let cell of cells) { + cell.style.display = 'none'; + } + document.querySelector('p').textContent = 'done'; +</script>
diff --git a/content/test/gpu/gpu_tests/webgl_conformance_expectations.py b/content/test/gpu/gpu_tests/webgl_conformance_expectations.py index 636209c1..a06bce8 100644 --- a/content/test/gpu/gpu_tests/webgl_conformance_expectations.py +++ b/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
@@ -259,12 +259,6 @@ self.Flaky('conformance/canvas/canvas-test.html', ['win7', 'nvidia', 'd3d9'], bug=690248) - # Win / AMD flakiness seen on new tryservers. - # It's unfortunate that this suppression needs to be so broad, but - # basically any test that uses readPixels is potentially flaky, and - # it's infeasible to suppress individual failures one by one. - self.Flaky('conformance/*', ['win', ('amd', 0x6779)], bug=491419) - # Win AMD failures # This test is probably flaky on all AMD, but only visible on the # new AMD (the whole test suite is flaky on the old config). @@ -314,12 +308,6 @@ # Win / OpenGL / AMD failures self.Skip('conformance/attribs/gl-bindAttribLocation-aliasing.html', ['win', 'amd', 'opengl'], bug=649824) - self.Flaky('conformance/attribs/gl-bindAttribLocation-matrix.html', - ['win', ('amd', 0x6779), 'opengl'], bug=649824) - self.Flaky('conformance/attribs/gl-bindAttribLocation-repeated.html', - ['win', ('amd', 0x6779), 'opengl'], bug=649824) - self.Fail('conformance/extensions/webgl-draw-buffers.html', - ['win', ('amd', 0x6779), 'opengl', 'no_passthrough'], bug=649824) self.Skip('conformance/glsl/misc/shader-struct-scope.html', ['win', 'amd', 'opengl'], bug=1007) # angle bug ID self.Skip('conformance/glsl/misc/shaders-with-invariance.html', @@ -446,30 +434,8 @@ # AMD Radeon 6450 and/or R7 240 self.Fail('conformance/extensions/angle-instanced-arrays.html', ['linux', 'amd', 'no_angle'], bug=479260) - self.Flaky('conformance/extensions/ext-texture-filter-anisotropic.html', - ['linux', ('amd', 0x6779)], bug=436212) - self.Flaky('conformance/glsl/misc/shader-struct-scope.html', - ['linux', ('amd', 0x6779), 'no_passthrough'], bug=436212) - self.Flaky('conformance/glsl/misc/struct-nesting-of-variable-names.html', - ['linux', ('amd', 0x6779), 'no_passthrough'], bug=436212) - self.Flaky('conformance/rendering/point-size.html', - ['linux', ('amd', 0x6779)], bug=436212) - self.Flaky('conformance/textures/misc/texture-sub-image-cube-maps.html', - ['linux', ('amd', 0x6779)], bug=436212) - self.Flaky('conformance/more/functions/uniformf.html', - ['linux', ('amd', 0x6779)], bug=436212) self.Fail('conformance/glsl/misc/shaders-with-invariance.html', ['linux', 'amd', 'no_passthrough'], bug=479952) - self.Flaky('conformance/textures/misc/texture-mips.html', - ['linux', ('amd', 0x6779), 'no_passthrough'], bug=479981) - self.Flaky('conformance/textures/misc/texture-size-cube-maps.html', - ['linux', ('amd', 0x6779)], bug=479983) - self.Flaky('conformance/uniforms/uniform-default-values.html', - ['linux', ('amd', 0x6779)], bug=482013) - self.Flaky('conformance/glsl/samplers/glsl-function-texture2dlod.html', - ['linux', ('amd', 0x6779)], bug=436212) - self.Flaky('conformance/glsl/samplers/glsl-function-texture2dprojlod.html', - ['linux', ('amd', 0x6779)], bug=436212) # Intel # See https://bugs.freedesktop.org/show_bug.cgi?id=94477 self.Skip('conformance/glsl/bugs/temp-expressions-should-not-crash.html',
diff --git a/content/test/test_blink_web_unit_test_support.cc b/content/test/test_blink_web_unit_test_support.cc index 7150daf1..c8e4a28 100644 --- a/content/test/test_blink_web_unit_test_support.cc +++ b/content/test/test_blink_web_unit_test_support.cc
@@ -214,8 +214,6 @@ return WebString::FromASCII("<<OtherDateLabel>>"); case blink::WebLocalizedString::kOtherMonthLabel: return WebString::FromASCII("<<OtherMonthLabel>>"); - case blink::WebLocalizedString::kOtherTimeLabel: - return WebString::FromASCII("<<OtherTimeLabel>>"); case blink::WebLocalizedString::kOtherWeekLabel: return WebString::FromASCII("<<OtherWeekLabel>>"); case blink::WebLocalizedString::kCalendarClear:
diff --git a/device/generic_sensor/platform_sensor_provider_base.h b/device/generic_sensor/platform_sensor_provider_base.h index c38443b..eb5d86c0 100644 --- a/device/generic_sensor/platform_sensor_provider_base.h +++ b/device/generic_sensor/platform_sensor_provider_base.h
@@ -38,7 +38,7 @@ // Implementations might want to override this in order to be able // to read from sensor files. For example, linux does so. virtual void SetFileTaskRunner( - scoped_refptr<base::SingleThreadTaskRunner> file_task_runner) {} + scoped_refptr<base::SequencedTaskRunner> file_task_runner) {} protected: PlatformSensorProviderBase();
diff --git a/device/generic_sensor/platform_sensor_provider_linux.cc b/device/generic_sensor/platform_sensor_provider_linux.cc index 4db2a4c..4e296e18 100644 --- a/device/generic_sensor/platform_sensor_provider_linux.cc +++ b/device/generic_sensor/platform_sensor_provider_linux.cc
@@ -78,7 +78,7 @@ } void PlatformSensorProviderLinux::SetFileTaskRunner( - scoped_refptr<base::SingleThreadTaskRunner> file_task_runner) { + scoped_refptr<base::SequencedTaskRunner> file_task_runner) { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); if (!file_task_runner_) file_task_runner_ = file_task_runner; @@ -109,7 +109,7 @@ void PlatformSensorProviderLinux::StopPollingThread() { DCHECK(file_task_runner_); - DCHECK(file_task_runner_->BelongsToCurrentThread()); + DCHECK(file_task_runner_->RunsTasksInCurrentSequence()); if (polling_thread_ && polling_thread_->IsRunning()) polling_thread_->Stop(); } @@ -147,7 +147,7 @@ } void PlatformSensorProviderLinux::SetFileTaskRunnerForTesting( - scoped_refptr<base::SingleThreadTaskRunner> task_runner) { + scoped_refptr<base::SequencedTaskRunner> task_runner) { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); file_task_runner_ = std::move(task_runner); }
diff --git a/device/generic_sensor/platform_sensor_provider_linux.h b/device/generic_sensor/platform_sensor_provider_linux.h index 5bde10f..e7e0a08f 100644 --- a/device/generic_sensor/platform_sensor_provider_linux.h +++ b/device/generic_sensor/platform_sensor_provider_linux.h
@@ -15,7 +15,7 @@ template <typename T> struct DefaultSingletonTraits; class Thread; -} +} // namespace base namespace device { @@ -33,7 +33,7 @@ // Sets task runner for tests. void SetFileTaskRunnerForTesting( - scoped_refptr<base::SingleThreadTaskRunner> task_runner); + scoped_refptr<base::SequencedTaskRunner> task_runner); protected: ~PlatformSensorProviderLinux() override; @@ -45,7 +45,7 @@ void AllSensorsRemoved() override; void SetFileTaskRunner( - scoped_refptr<base::SingleThreadTaskRunner> file_task_runner) override; + scoped_refptr<base::SequencedTaskRunner> file_task_runner) override; private: friend struct base::DefaultSingletonTraits<PlatformSensorProviderLinux>; @@ -112,7 +112,7 @@ // Browser's file thread task runner passed from renderer. Used by this // provider to stop a polling thread and passed to a manager that // runs a linux device monitor service on this task runner. - scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; + scoped_refptr<base::SequencedTaskRunner> file_task_runner_; DISALLOW_COPY_AND_ASSIGN(PlatformSensorProviderLinux); };
diff --git a/device/generic_sensor/sensor_provider_impl.cc b/device/generic_sensor/sensor_provider_impl.cc index 3e78e3a1..501c67a 100644 --- a/device/generic_sensor/sensor_provider_impl.cc +++ b/device/generic_sensor/sensor_provider_impl.cc
@@ -34,7 +34,7 @@ // static void SensorProviderImpl::Create( - scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, + scoped_refptr<base::SequencedTaskRunner> file_task_runner, mojom::SensorProviderRequest request) { PlatformSensorProvider* provider = PlatformSensorProvider::GetInstance(); if (provider) {
diff --git a/device/generic_sensor/sensor_provider_impl.h b/device/generic_sensor/sensor_provider_impl.h index 2dd3728b..380fa7bc 100644 --- a/device/generic_sensor/sensor_provider_impl.h +++ b/device/generic_sensor/sensor_provider_impl.h
@@ -6,7 +6,7 @@ #define DEVICE_GENERIC_SENSOR_SENSOR_PROVIDER_IMPL_H_ #include "base/macros.h" -#include "base/single_thread_task_runner.h" +#include "base/sequenced_task_runner.h" #include "device/generic_sensor/generic_sensor_export.h" #include "device/generic_sensor/public/interfaces/sensor_provider.mojom.h" @@ -21,9 +21,8 @@ class DEVICE_GENERIC_SENSOR_EXPORT SensorProviderImpl final : public mojom::SensorProvider { public: - static void Create( - scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, - mojom::SensorProviderRequest request); + static void Create(scoped_refptr<base::SequencedTaskRunner> file_task_runner, + mojom::SensorProviderRequest request); ~SensorProviderImpl() override;
diff --git a/device/power_save_blocker/power_save_blocker.h b/device/power_save_blocker/power_save_blocker.h index 621eaef..a9544b8 100644 --- a/device/power_save_blocker/power_save_blocker.h +++ b/device/power_save_blocker/power_save_blocker.h
@@ -58,7 +58,7 @@ Reason reason, const std::string& description, scoped_refptr<base::SequencedTaskRunner> ui_task_runner, - scoped_refptr<base::SingleThreadTaskRunner> blocking_task_runner); + scoped_refptr<base::SequencedTaskRunner> blocking_task_runner); virtual ~PowerSaveBlocker(); #if defined(OS_ANDROID)
diff --git a/device/power_save_blocker/power_save_blocker_android.cc b/device/power_save_blocker/power_save_blocker_android.cc index 3aa5346..5227065 100644 --- a/device/power_save_blocker/power_save_blocker_android.cc +++ b/device/power_save_blocker/power_save_blocker_android.cc
@@ -71,7 +71,7 @@ Reason reason, const std::string& description, scoped_refptr<base::SequencedTaskRunner> ui_task_runner, - scoped_refptr<base::SingleThreadTaskRunner> blocking_task_runner) + scoped_refptr<base::SequencedTaskRunner> blocking_task_runner) : ui_task_runner_(ui_task_runner), blocking_task_runner_(blocking_task_runner) { // Don't support kPowerSaveBlockPreventAppSuspension
diff --git a/device/power_save_blocker/power_save_blocker_chromeos.cc b/device/power_save_blocker/power_save_blocker_chromeos.cc index f3390147..0dd1bee 100644 --- a/device/power_save_blocker/power_save_blocker_chromeos.cc +++ b/device/power_save_blocker/power_save_blocker_chromeos.cc
@@ -97,7 +97,7 @@ Reason reason, const std::string& description, scoped_refptr<base::SequencedTaskRunner> ui_task_runner, - scoped_refptr<base::SingleThreadTaskRunner> blocking_task_runner) + scoped_refptr<base::SequencedTaskRunner> blocking_task_runner) : delegate_(new Delegate(type, reason, description, ui_task_runner)), ui_task_runner_(ui_task_runner), blocking_task_runner_(blocking_task_runner) {
diff --git a/device/power_save_blocker/power_save_blocker_mac.cc b/device/power_save_blocker/power_save_blocker_mac.cc index 4ce6c18..97f6734d 100644 --- a/device/power_save_blocker/power_save_blocker_mac.cc +++ b/device/power_save_blocker/power_save_blocker_mac.cc
@@ -84,8 +84,8 @@ base::SysUTF8ToCFStringRef(description_)); IOReturn result = IOPMAssertionCreateWithName(level, kIOPMAssertionLevelOn, cf_description, &assertion_); - LOG_IF(ERROR, result != kIOReturnSuccess) << "IOPMAssertionCreate: " - << result; + LOG_IF(ERROR, result != kIOReturnSuccess) + << "IOPMAssertionCreate: " << result; } } @@ -95,8 +95,8 @@ if (assertion_ != kIOPMNullAssertionID) { IOReturn result = IOPMAssertionRelease(assertion_); - LOG_IF(ERROR, result != kIOReturnSuccess) << "IOPMAssertionRelease: " - << result; + LOG_IF(ERROR, result != kIOReturnSuccess) + << "IOPMAssertionRelease: " << result; } } @@ -105,7 +105,7 @@ Reason reason, const std::string& description, scoped_refptr<base::SequencedTaskRunner> ui_task_runner, - scoped_refptr<base::SingleThreadTaskRunner> blocking_task_runner) + scoped_refptr<base::SequencedTaskRunner> blocking_task_runner) : delegate_(new Delegate(type, description)), ui_task_runner_(ui_task_runner), blocking_task_runner_(blocking_task_runner) {
diff --git a/device/power_save_blocker/power_save_blocker_ozone.cc b/device/power_save_blocker/power_save_blocker_ozone.cc index 981794eb..21f0f25 100644 --- a/device/power_save_blocker/power_save_blocker_ozone.cc +++ b/device/power_save_blocker/power_save_blocker_ozone.cc
@@ -30,7 +30,7 @@ Reason reason, const std::string& description, scoped_refptr<base::SequencedTaskRunner> ui_task_runner, - scoped_refptr<base::SingleThreadTaskRunner> blocking_task_runner) + scoped_refptr<base::SequencedTaskRunner> blocking_task_runner) : delegate_(new Delegate()), ui_task_runner_(ui_task_runner), blocking_task_runner_(blocking_task_runner) {}
diff --git a/device/power_save_blocker/power_save_blocker_win.cc b/device/power_save_blocker/power_save_blocker_win.cc index 83830a7..ee7b92a 100644 --- a/device/power_save_blocker/power_save_blocker_win.cc +++ b/device/power_save_blocker/power_save_blocker_win.cc
@@ -113,7 +113,7 @@ Reason reason, const std::string& description, scoped_refptr<base::SequencedTaskRunner> ui_task_runner, - scoped_refptr<base::SingleThreadTaskRunner> blocking_task_runner) + scoped_refptr<base::SequencedTaskRunner> blocking_task_runner) : delegate_(new Delegate(type, description, ui_task_runner)), ui_task_runner_(ui_task_runner), blocking_task_runner_(blocking_task_runner) {
diff --git a/device/power_save_blocker/power_save_blocker_x11.cc b/device/power_save_blocker/power_save_blocker_x11.cc index 56e6584b..e2a66147 100644 --- a/device/power_save_blocker/power_save_blocker_x11.cc +++ b/device/power_save_blocker/power_save_blocker_x11.cc
@@ -81,7 +81,7 @@ const std::string& description, bool freedesktop_only, scoped_refptr<base::SequencedTaskRunner> ui_task_runner, - scoped_refptr<base::SingleThreadTaskRunner> blocking_task_runner); + scoped_refptr<base::SequencedTaskRunner> blocking_task_runner); // Post a task to initialize the delegate on the UI thread, which will itself // then post a task to apply the power save block on the FILE thread. @@ -164,7 +164,7 @@ uint32_t inhibit_cookie_; scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; - scoped_refptr<base::SingleThreadTaskRunner> blocking_task_runner_; + scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; DISALLOW_COPY_AND_ASSIGN(Delegate); }; @@ -174,7 +174,7 @@ const std::string& description, bool freedesktop_only, scoped_refptr<base::SequencedTaskRunner> ui_task_runner, - scoped_refptr<base::SingleThreadTaskRunner> blocking_task_runner) + scoped_refptr<base::SequencedTaskRunner> blocking_task_runner) : type_(type), description_(description), freedesktop_only_(freedesktop_only), @@ -486,7 +486,7 @@ Reason reason, const std::string& description, scoped_refptr<base::SequencedTaskRunner> ui_task_runner, - scoped_refptr<base::SingleThreadTaskRunner> blocking_task_runner) + scoped_refptr<base::SequencedTaskRunner> blocking_task_runner) : delegate_(new Delegate(type, description, false /* freedesktop_only */,
diff --git a/device/wake_lock/wake_lock.cc b/device/wake_lock/wake_lock.cc index 2bef9ed..d767587 100644 --- a/device/wake_lock/wake_lock.cc +++ b/device/wake_lock/wake_lock.cc
@@ -51,7 +51,7 @@ const std::string& description, int context_id, WakeLockContextCallback native_view_getter, - scoped_refptr<base::SingleThreadTaskRunner> file_task_runner) + scoped_refptr<base::SequencedTaskRunner> file_task_runner) : num_lock_requests_(0), type_(type), reason_(reason),
diff --git a/device/wake_lock/wake_lock.h b/device/wake_lock/wake_lock.h index 4686570..5dfee6b 100644 --- a/device/wake_lock/wake_lock.h +++ b/device/wake_lock/wake_lock.h
@@ -9,7 +9,7 @@ #include "base/macros.h" #include "base/memory/ref_counted.h" -#include "base/single_thread_task_runner.h" +#include "base/sequenced_task_runner.h" #include "device/power_save_blocker/power_save_blocker.h" #include "device/wake_lock/public/interfaces/wake_lock.mojom.h" #include "device/wake_lock/public/interfaces/wake_lock_context.mojom.h" @@ -27,7 +27,7 @@ const std::string& description, int context_id, WakeLockContextCallback native_view_getter, - scoped_refptr<base::SingleThreadTaskRunner> file_task_runner); + scoped_refptr<base::SequencedTaskRunner> file_task_runner); ~WakeLock() override; // WakeLockSevice implementation. @@ -59,7 +59,7 @@ #endif scoped_refptr<base::SequencedTaskRunner> main_task_runner_; - scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; + scoped_refptr<base::SequencedTaskRunner> file_task_runner_; // The actual power save blocker for screen. std::unique_ptr<PowerSaveBlocker> wake_lock_;
diff --git a/device/wake_lock/wake_lock_context.cc b/device/wake_lock/wake_lock_context.cc index dd11d52..ef7131b 100644 --- a/device/wake_lock/wake_lock_context.cc +++ b/device/wake_lock/wake_lock_context.cc
@@ -14,7 +14,7 @@ WakeLockContext::WakeLockContext( int context_id, - scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, + scoped_refptr<base::SequencedTaskRunner> file_task_runner, const WakeLockContextCallback& native_view_getter) : file_task_runner_(std::move(file_task_runner)), context_id_(context_id),
diff --git a/device/wake_lock/wake_lock_context.h b/device/wake_lock/wake_lock_context.h index 2e02be8..a897b4d 100644 --- a/device/wake_lock/wake_lock_context.h +++ b/device/wake_lock/wake_lock_context.h
@@ -10,7 +10,7 @@ #include "base/callback.h" #include "base/memory/ref_counted.h" -#include "base/single_thread_task_runner.h" +#include "base/sequenced_task_runner.h" #include "device/wake_lock/public/interfaces/wake_lock_context.mojom.h" #include "ui/gfx/native_widget_types.h" @@ -25,7 +25,7 @@ class WakeLockContext : public mojom::WakeLockContext { public: WakeLockContext(int context_id, - scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, + scoped_refptr<base::SequencedTaskRunner> file_task_runner, const WakeLockContextCallback& native_view_getter); ~WakeLockContext() override; @@ -38,7 +38,7 @@ static const int WakeLockInvalidContextId; private: - scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; + scoped_refptr<base::SequencedTaskRunner> file_task_runner_; int context_id_; WakeLockContextCallback native_view_getter_;
diff --git a/device/wake_lock/wake_lock_for_testing.cc b/device/wake_lock/wake_lock_for_testing.cc index 776bd56..bc4bfac 100644 --- a/device/wake_lock/wake_lock_for_testing.cc +++ b/device/wake_lock/wake_lock_for_testing.cc
@@ -15,7 +15,7 @@ const std::string& description, int context_id, WakeLockContextCallback native_view_getter, - scoped_refptr<base::SingleThreadTaskRunner> file_task_runner) + scoped_refptr<base::SequencedTaskRunner> file_task_runner) : WakeLock(std::move(request), type, reason,
diff --git a/device/wake_lock/wake_lock_for_testing.h b/device/wake_lock/wake_lock_for_testing.h index 3de901ca..8ab62ff5 100644 --- a/device/wake_lock/wake_lock_for_testing.h +++ b/device/wake_lock/wake_lock_for_testing.h
@@ -9,7 +9,7 @@ #include "base/macros.h" #include "base/memory/ref_counted.h" -#include "base/single_thread_task_runner.h" +#include "base/sequenced_task_runner.h" #include "device/wake_lock/public/interfaces/wake_lock.mojom.h" #include "device/wake_lock/public/interfaces/wake_lock_context.mojom.h" #include "device/wake_lock/wake_lock.h" @@ -20,14 +20,13 @@ class WakeLockForTesting : public WakeLock { public: - WakeLockForTesting( - mojom::WakeLockRequest request, - mojom::WakeLockType type, - mojom::WakeLockReason reason, - const std::string& description, - int context_id, - WakeLockContextCallback native_view_getter, - scoped_refptr<base::SingleThreadTaskRunner> file_task_runner); + WakeLockForTesting(mojom::WakeLockRequest request, + mojom::WakeLockType type, + mojom::WakeLockReason reason, + const std::string& description, + int context_id, + WakeLockContextCallback native_view_getter, + scoped_refptr<base::SequencedTaskRunner> file_task_runner); ~WakeLockForTesting() override; void HasWakeLockForTests(HasWakeLockForTestsCallback callback) override;
diff --git a/device/wake_lock/wake_lock_provider.cc b/device/wake_lock/wake_lock_provider.cc index 26e4aa1..c1062e19 100644 --- a/device/wake_lock/wake_lock_provider.cc +++ b/device/wake_lock/wake_lock_provider.cc
@@ -17,7 +17,7 @@ // static void WakeLockProvider::Create( mojom::WakeLockProviderRequest request, - scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, + scoped_refptr<base::SequencedTaskRunner> file_task_runner, const WakeLockContextCallback& native_view_getter) { mojo::MakeStrongBinding(base::MakeUnique<WakeLockProvider>( std::move(file_task_runner), native_view_getter), @@ -25,7 +25,7 @@ } WakeLockProvider::WakeLockProvider( - scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, + scoped_refptr<base::SequencedTaskRunner> file_task_runner, const WakeLockContextCallback& native_view_getter) : file_task_runner_(std::move(file_task_runner)), native_view_getter_(native_view_getter) {}
diff --git a/device/wake_lock/wake_lock_provider.h b/device/wake_lock/wake_lock_provider.h index 297c0ee..72b4442f1 100644 --- a/device/wake_lock/wake_lock_provider.h +++ b/device/wake_lock/wake_lock_provider.h
@@ -6,7 +6,6 @@ #define DEVICE_WAKE_LOCK_WAKE_LOCK_PROVIDER_H_ #include "base/sequenced_task_runner.h" -#include "base/single_thread_task_runner.h" #include "device/wake_lock/public/interfaces/wake_lock_context.mojom.h" #include "device/wake_lock/public/interfaces/wake_lock_provider.mojom.h" #include "device/wake_lock/wake_lock_context.h" @@ -18,14 +17,13 @@ // Serves requests for WakeLockContext connections. class WakeLockProvider : public mojom::WakeLockProvider { public: - WakeLockProvider(scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, + WakeLockProvider(scoped_refptr<base::SequencedTaskRunner> file_task_runner, const WakeLockContextCallback& native_view_getter); ~WakeLockProvider() override; - static void Create( - mojom::WakeLockProviderRequest request, - scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, - const WakeLockContextCallback& native_view_getter); + static void Create(mojom::WakeLockProviderRequest request, + scoped_refptr<base::SequencedTaskRunner> file_task_runner, + const WakeLockContextCallback& native_view_getter); // mojom::WakeLockProvider: void GetWakeLockContextForID( @@ -40,7 +38,7 @@ static bool is_in_unittest_; private: - scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; + scoped_refptr<base::SequencedTaskRunner> file_task_runner_; WakeLockContextCallback native_view_getter_; DISALLOW_COPY_AND_ASSIGN(WakeLockProvider);
diff --git a/extensions/browser/api/api_resource_manager.h b/extensions/browser/api/api_resource_manager.h index 8626e21..d8ca7c33 100644 --- a/extensions/browser/api/api_resource_manager.h +++ b/extensions/browser/api/api_resource_manager.h
@@ -36,7 +36,7 @@ class TCPServerSocketEventDispatcher; class TCPSocketEventDispatcher; class UDPSocketEventDispatcher; -} +} // namespace api template <typename T> struct NamedThreadTraits { @@ -126,12 +126,12 @@ } // BrowserContextKeyedAPI implementation. - static BrowserContextKeyedAPIFactory<ApiResourceManager<T> >* - GetFactoryInstance(); + static BrowserContextKeyedAPIFactory<ApiResourceManager<T>>* + GetFactoryInstance(); // Convenience method to get the ApiResourceManager for a profile. static ApiResourceManager<T>* Get(content::BrowserContext* context) { - return BrowserContextKeyedAPIFactory<ApiResourceManager<T> >::Get(context); + return BrowserContextKeyedAPIFactory<ApiResourceManager<T>>::Get(context); } // BrowserContextKeyedAPI implementation. @@ -171,7 +171,7 @@ friend class api::TCPServerSocketEventDispatcher; friend class api::TCPSocketEventDispatcher; friend class api::UDPSocketEventDispatcher; - friend class BrowserContextKeyedAPIFactory<ApiResourceManager<T> >; + friend class BrowserContextKeyedAPIFactory<ApiResourceManager<T>>; static const bool kServiceHasOwnInstanceInIncognito = true; static const bool kServiceIsNULLWhileTesting = true; @@ -182,7 +182,7 @@ public: typedef std::map<int, std::unique_ptr<T>> ApiResourceMap; // Lookup map from extension id's to allocated resource id's. - typedef std::map<std::string, base::hash_set<int> > ExtensionToResourceMap; + typedef std::map<std::string, base::hash_set<int>> ExtensionToResourceMap; ApiResourceData() : next_id_(1) { sequence_checker_.DetachFromSequence(); } @@ -197,8 +197,9 @@ ExtensionToResourceMap::iterator it = extension_resource_map_.find(extension_id); if (it == extension_resource_map_.end()) { - it = extension_resource_map_.insert( - std::make_pair(extension_id, base::hash_set<int>())).first; + it = extension_resource_map_ + .insert(std::make_pair(extension_id, base::hash_set<int>())) + .first; } it->second.insert(id); return id; @@ -243,24 +244,22 @@ } void InitiateExtensionUnloadedCleanup(const std::string& extension_id) { - ThreadingTraits::GetSequencedTaskRunner()->PostTask( - FROM_HERE, - base::Bind(&ApiResourceData::CleanupResourcesFromUnloadedExtension, - this, - extension_id)); + ThreadingTraits::GetSequencedTaskRunner()->PostTask( + FROM_HERE, + base::Bind(&ApiResourceData::CleanupResourcesFromUnloadedExtension, + this, extension_id)); } void InitiateExtensionSuspendedCleanup(const std::string& extension_id) { - ThreadingTraits::GetSequencedTaskRunner()->PostTask( - FROM_HERE, - base::Bind(&ApiResourceData::CleanupResourcesFromSuspendedExtension, - this, - extension_id)); + ThreadingTraits::GetSequencedTaskRunner()->PostTask( + FROM_HERE, + base::Bind(&ApiResourceData::CleanupResourcesFromSuspendedExtension, + this, extension_id)); } void InititateCleanup() { - ThreadingTraits::GetSequencedTaskRunner()->PostTask( - FROM_HERE, base::Bind(&ApiResourceData::Cleanup, this)); + ThreadingTraits::GetSequencedTaskRunner()->PostTask( + FROM_HERE, base::Bind(&ApiResourceData::Cleanup, this)); } private: @@ -378,65 +377,6 @@ } }; -// With WorkerPoolThreadTraits, ApiResourceManager can be used to manage the -// lifetime of a set of resources that live on sequenced task runner threads -// which ApiFunctions use. Examples of such resources are temporary file -// resources produced by certain API calls. -// -// Instead of kThreadId. classes used for tracking such resources should define -// kSequenceToken and kShutdownBehavior to identify sequence task runner for -// ApiResourceManager to work on and how pending tasks should behave on -// shutdown. -// The user must also define a static const char* service_name() that returns -// the name of the service, and in order for ApiWorkerPoolResourceManager to use -// service_name() friend this class. -// -// In the cc file the user must define a GetFactoryInstance() and manage their -// own instances (typically using LazyInstance or Singleton). -// -// E.g.: -// -// class PoolResource { -// public: -// static const char kSequenceToken[] = "temp_files"; -// static const base::SequencedWorkerPool::WorkerShutdown kShutdownBehavior = -// base::SequencedWorkerPool::BLOCK_SHUTDOWN; -// private: -// friend class ApiResourceManager<WorkerPoolResource, -// WorkerPoolThreadTraits>; -// static const char* service_name() { -// return "TempFilesResourceManager"; -// } -// }; -// -// In the cc file: -// -// static base::LazyInstance<BrowserContextKeyedAPIFactory< -// ApiResourceManager<Resource, WorkerPoolThreadTraits> > > -// g_factory = LAZY_INSTANCE_INITIALIZER; -// -// -// template <> -// BrowserContextKeyedAPIFactory<ApiResourceManager<WorkerPoolResource> >* -// ApiResourceManager<WorkerPoolPoolResource, -// WorkerPoolThreadTraits>::GetFactoryInstance() { -// return g_factory.Pointer(); -// } -template <typename T> -struct WorkerPoolThreadTraits { - static bool IsMessageLoopValid() { - return content::BrowserThread::GetBlockingPool() != NULL; - } - - static scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner() { - return content::BrowserThread::GetBlockingPool() - ->GetSequencedTaskRunnerWithShutdownBehavior( - content::BrowserThread::GetBlockingPool()->GetNamedSequenceToken( - T::kSequenceToken), - T::kShutdownBehavior); - } -}; - } // namespace extensions #endif // EXTENSIONS_BROWSER_API_API_RESOURCE_MANAGER_H_
diff --git a/extensions/browser/api/async_api_function.cc b/extensions/browser/api/async_api_function.cc index a4e40f6f..b17063f 100644 --- a/extensions/browser/api/async_api_function.cc +++ b/extensions/browser/api/async_api_function.cc
@@ -5,6 +5,7 @@ #include "extensions/browser/api/async_api_function.h" #include "base/bind.h" +#include "content/public/browser/browser_thread.h" #include "extensions/browser/extension_system.h" using content::BrowserThread; @@ -12,7 +13,9 @@ namespace extensions { // AsyncApiFunction -AsyncApiFunction::AsyncApiFunction() : work_thread_id_(BrowserThread::IO) {} +AsyncApiFunction::AsyncApiFunction() + : work_task_runner_( + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)) {} AsyncApiFunction::~AsyncApiFunction() {} @@ -22,15 +25,15 @@ if (!PrePrepare() || !Prepare()) { return false; } - bool rv = BrowserThread::PostTask( - work_thread_id_, - FROM_HERE, - base::Bind(&AsyncApiFunction::WorkOnWorkThread, this)); + bool rv = work_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&AsyncApiFunction::WorkOnWorkThread, this)); DCHECK(rv); return true; } -bool AsyncApiFunction::PrePrepare() { return true; } +bool AsyncApiFunction::PrePrepare() { + return true; +} void AsyncApiFunction::Work() {} @@ -42,8 +45,7 @@ void AsyncApiFunction::AsyncWorkCompleted() { if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { bool rv = BrowserThread::PostTask( - BrowserThread::UI, - FROM_HERE, + BrowserThread::UI, FROM_HERE, base::Bind(&AsyncApiFunction::RespondOnUIThread, this)); DCHECK(rv); } else { @@ -52,11 +54,7 @@ } void AsyncApiFunction::WorkOnWorkThread() { - DCHECK_CURRENTLY_ON(work_thread_id_); - DLOG_IF(ERROR, (work_thread_id_ == BrowserThread::UI)) - << "You have specified that AsyncApiFunction::Work() should happen on " - "the UI thread. This nullifies the point of this class. Either " - "specify a different thread or derive from a different class."; + DCHECK(work_task_runner_->RunsTasksInCurrentSequence()); AsyncWorkStart(); }
diff --git a/extensions/browser/api/async_api_function.h b/extensions/browser/api/async_api_function.h index e260806..ab47953 100644 --- a/extensions/browser/api/async_api_function.h +++ b/extensions/browser/api/async_api_function.h
@@ -5,7 +5,8 @@ #ifndef EXTENSIONS_BROWSER_API_ASYNC_API_FUNCTION_H_ #define EXTENSIONS_BROWSER_API_ASYNC_API_FUNCTION_H_ -#include "content/public/browser/browser_thread.h" +#include "base/memory/ref_counted.h" +#include "base/sequenced_task_runner.h" #include "extensions/browser/extension_function.h" namespace extensions { @@ -25,11 +26,11 @@ // thread. virtual bool Prepare() = 0; - // Do actual work. Guaranteed to happen on the thread specified in - // work_thread_id_. + // Do actual work. Guaranteed to happen on the task runner specified in + // |work_task_runner_| if non-null; or on the IO thread otherwise. virtual void Work(); - // Start the asynchronous work. Guraranteed to happen on requested thread. + // Start the asynchronous work. Guraranteed to happen on work thread. virtual void AsyncWorkStart(); // Notify AsyncIOApiFunction that the work is completed @@ -42,9 +43,12 @@ bool RunAsync() override; protected: - content::BrowserThread::ID work_thread_id() const { return work_thread_id_; } - void set_work_thread_id(content::BrowserThread::ID work_thread_id) { - work_thread_id_ = work_thread_id; + scoped_refptr<base::SequencedTaskRunner> work_task_runner() const { + return work_task_runner_; + } + void set_work_task_runner( + scoped_refptr<base::SequencedTaskRunner> work_task_runner) { + work_task_runner_ = work_task_runner; } private: @@ -52,8 +56,8 @@ void RespondOnUIThread(); // If you don't want your Work() method to happen on the IO thread, then set - // this to the thread that you do want, preferably in Prepare(). - content::BrowserThread::ID work_thread_id_; + // this to the SequenceTaskRunner you do want to use, preferably in Prepare(). + scoped_refptr<base::SequencedTaskRunner> work_task_runner_; }; } // namespace extensions
diff --git a/extensions/browser/api/document_scan/document_scan_api.cc b/extensions/browser/api/document_scan/document_scan_api.cc index 317199f..54e9b95f 100644 --- a/extensions/browser/api/document_scan/document_scan_api.cc +++ b/extensions/browser/api/document_scan/document_scan_api.cc
@@ -5,6 +5,7 @@ #include "extensions/browser/api/document_scan/document_scan_api.h" #include "base/stl_util.h" +#include "base/task_scheduler/post_task.h" #include "content/public/browser/browser_thread.h" #include "extensions/browser/extension_system.h" @@ -23,14 +24,13 @@ namespace api { DocumentScanScanFunction::DocumentScanScanFunction() - : document_scan_interface_(DocumentScanInterface::CreateInstance()) { -} + : document_scan_interface_(DocumentScanInterface::CreateInstance()) {} -DocumentScanScanFunction::~DocumentScanScanFunction() { -} +DocumentScanScanFunction::~DocumentScanScanFunction() {} bool DocumentScanScanFunction::Prepare() { - set_work_thread_id(BrowserThread::FILE); + set_work_task_runner(base::CreateSequencedTaskRunnerWithTraits( + {base::MayBlock(), base::TaskPriority::BACKGROUND})); params_ = document_scan::Scan::Params::Create(*args_); EXTENSION_FUNCTION_VALIDATE(params_.get()); return true;
diff --git a/extensions/browser/api/serial/serial_api.cc b/extensions/browser/api/serial/serial_api.cc index d7326aa..734b6b3 100644 --- a/extensions/browser/api/serial/serial_api.cc +++ b/extensions/browser/api/serial/serial_api.cc
@@ -7,6 +7,7 @@ #include <algorithm> #include <vector> +#include "base/task_scheduler/post_task.h" #include "base/values.h" #include "build/build_config.h" #include "content/public/browser/browser_thread.h" @@ -50,11 +51,9 @@ } // namespace -SerialAsyncApiFunction::SerialAsyncApiFunction() : manager_(NULL) { -} +SerialAsyncApiFunction::SerialAsyncApiFunction() : manager_(NULL) {} -SerialAsyncApiFunction::~SerialAsyncApiFunction() { -} +SerialAsyncApiFunction::~SerialAsyncApiFunction() {} bool SerialAsyncApiFunction::PrePrepare() { manager_ = ApiResourceManager<SerialConnection>::Get(browser_context()); @@ -75,16 +74,16 @@ manager_->Remove(extension_->id(), api_resource_id); } -SerialGetDevicesFunction::SerialGetDevicesFunction() { -} +SerialGetDevicesFunction::SerialGetDevicesFunction() {} bool SerialGetDevicesFunction::Prepare() { - set_work_thread_id(BrowserThread::FILE); + set_work_task_runner(base::CreateSequencedTaskRunnerWithTraits( + {base::MayBlock(), base::TaskPriority::BACKGROUND})); return true; } void SerialGetDevicesFunction::Work() { - DCHECK_CURRENTLY_ON(BrowserThread::FILE); + DCHECK(work_task_runner()->RunsTasksInCurrentSequence()); std::unique_ptr<device::SerialDeviceEnumerator> enumerator = device::SerialDeviceEnumerator::Create(); @@ -93,11 +92,9 @@ mojo::ConvertTo<std::vector<serial::DeviceInfo>>(devices)); } -SerialConnectFunction::SerialConnectFunction() { -} +SerialConnectFunction::SerialConnectFunction() {} -SerialConnectFunction::~SerialConnectFunction() { -} +SerialConnectFunction::~SerialConnectFunction() {} bool SerialConnectFunction::Prepare() { params_ = serial::Connect::Params::Create(*args_); @@ -144,8 +141,7 @@ } BrowserThread::PostTask( - BrowserThread::IO, - FROM_HERE, + BrowserThread::IO, FROM_HERE, base::Bind(&SerialConnectFunction::FinishConnect, this)); } @@ -174,11 +170,9 @@ return new SerialConnection(port, extension_id); } -SerialUpdateFunction::SerialUpdateFunction() { -} +SerialUpdateFunction::SerialUpdateFunction() {} -SerialUpdateFunction::~SerialUpdateFunction() { -} +SerialUpdateFunction::~SerialUpdateFunction() {} bool SerialUpdateFunction::Prepare() { params_ = serial::Update::Params::Create(*args_); @@ -197,11 +191,9 @@ results_ = serial::Update::Results::Create(success); } -SerialDisconnectFunction::SerialDisconnectFunction() { -} +SerialDisconnectFunction::SerialDisconnectFunction() {} -SerialDisconnectFunction::~SerialDisconnectFunction() { -} +SerialDisconnectFunction::~SerialDisconnectFunction() {} bool SerialDisconnectFunction::Prepare() { params_ = serial::Disconnect::Params::Create(*args_); @@ -220,11 +212,9 @@ results_ = serial::Disconnect::Results::Create(true); } -SerialSendFunction::SerialSendFunction() { -} +SerialSendFunction::SerialSendFunction() {} -SerialSendFunction::~SerialSendFunction() { -} +SerialSendFunction::~SerialSendFunction() {} bool SerialSendFunction::Prepare() { params_ = serial::Send::Params::Create(*args_); @@ -257,11 +247,9 @@ AsyncWorkCompleted(); } -SerialFlushFunction::SerialFlushFunction() { -} +SerialFlushFunction::SerialFlushFunction() {} -SerialFlushFunction::~SerialFlushFunction() { -} +SerialFlushFunction::~SerialFlushFunction() {} bool SerialFlushFunction::Prepare() { params_ = serial::Flush::Params::Create(*args_); @@ -280,11 +268,9 @@ results_ = serial::Flush::Results::Create(success); } -SerialSetPausedFunction::SerialSetPausedFunction() { -} +SerialSetPausedFunction::SerialSetPausedFunction() {} -SerialSetPausedFunction::~SerialSetPausedFunction() { -} +SerialSetPausedFunction::~SerialSetPausedFunction() {} bool SerialSetPausedFunction::Prepare() { params_ = serial::SetPaused::Params::Create(*args_); @@ -313,11 +299,9 @@ results_ = serial::SetPaused::Results::Create(); } -SerialGetInfoFunction::SerialGetInfoFunction() { -} +SerialGetInfoFunction::SerialGetInfoFunction() {} -SerialGetInfoFunction::~SerialGetInfoFunction() { -} +SerialGetInfoFunction::~SerialGetInfoFunction() {} bool SerialGetInfoFunction::Prepare() { params_ = serial::GetInfo::Params::Create(*args_); @@ -339,11 +323,9 @@ results_ = serial::GetInfo::Results::Create(info); } -SerialGetConnectionsFunction::SerialGetConnectionsFunction() { -} +SerialGetConnectionsFunction::SerialGetConnectionsFunction() {} -SerialGetConnectionsFunction::~SerialGetConnectionsFunction() { -} +SerialGetConnectionsFunction::~SerialGetConnectionsFunction() {} bool SerialGetConnectionsFunction::Prepare() { return true; @@ -355,8 +337,7 @@ manager_->GetResourceIds(extension_->id()); if (connection_ids) { for (base::hash_set<int>::const_iterator it = connection_ids->begin(); - it != connection_ids->end(); - ++it) { + it != connection_ids->end(); ++it) { int connection_id = *it; SerialConnection* connection = GetSerialConnection(connection_id); if (connection) { @@ -370,11 +351,9 @@ results_ = serial::GetConnections::Results::Create(infos); } -SerialGetControlSignalsFunction::SerialGetControlSignalsFunction() { -} +SerialGetControlSignalsFunction::SerialGetControlSignalsFunction() {} -SerialGetControlSignalsFunction::~SerialGetControlSignalsFunction() { -} +SerialGetControlSignalsFunction::~SerialGetControlSignalsFunction() {} bool SerialGetControlSignalsFunction::Prepare() { params_ = serial::GetControlSignals::Params::Create(*args_); @@ -399,11 +378,9 @@ results_ = serial::GetControlSignals::Results::Create(signals); } -SerialSetControlSignalsFunction::SerialSetControlSignalsFunction() { -} +SerialSetControlSignalsFunction::SerialSetControlSignalsFunction() {} -SerialSetControlSignalsFunction::~SerialSetControlSignalsFunction() { -} +SerialSetControlSignalsFunction::~SerialSetControlSignalsFunction() {} bool SerialSetControlSignalsFunction::Prepare() { params_ = serial::SetControlSignals::Params::Create(*args_); @@ -423,11 +400,9 @@ results_ = serial::SetControlSignals::Results::Create(success); } -SerialSetBreakFunction::SerialSetBreakFunction() { -} +SerialSetBreakFunction::SerialSetBreakFunction() {} -SerialSetBreakFunction::~SerialSetBreakFunction() { -} +SerialSetBreakFunction::~SerialSetBreakFunction() {} bool SerialSetBreakFunction::Prepare() { params_ = serial::SetBreak::Params::Create(*args_); @@ -446,11 +421,9 @@ results_ = serial::SetBreak::Results::Create(success); } -SerialClearBreakFunction::SerialClearBreakFunction() { -} +SerialClearBreakFunction::SerialClearBreakFunction() {} -SerialClearBreakFunction::~SerialClearBreakFunction() { -} +SerialClearBreakFunction::~SerialClearBreakFunction() {} bool SerialClearBreakFunction::Prepare() { params_ = serial::ClearBreak::Params::Create(*args_);
diff --git a/extensions/browser/api/sockets_tcp/sockets_tcp_api_unittest.cc b/extensions/browser/api/sockets_tcp/sockets_tcp_api_unittest.cc index 73930c1e..100d76d 100644 --- a/extensions/browser/api/sockets_tcp/sockets_tcp_api_unittest.cc +++ b/extensions/browser/api/sockets_tcp/sockets_tcp_api_unittest.cc
@@ -36,13 +36,9 @@ }; TEST_F(SocketsTcpUnitTest, Create) { - // Get BrowserThread - content::BrowserThread::ID id; - CHECK(content::BrowserThread::GetCurrentThreadIdentifier(&id)); - // Create SocketCreateFunction and put it on BrowserThread SocketsTcpCreateFunction* function = new SocketsTcpCreateFunction(); - function->set_work_thread_id(id); + function->set_work_task_runner(base::SequencedTaskRunnerHandle::Get()); // Run tests std::unique_ptr<base::DictionaryValue> result(RunFunctionAndReturnDictionary(
diff --git a/extensions/browser/api/sockets_udp/sockets_udp_api_unittest.cc b/extensions/browser/api/sockets_udp/sockets_udp_api_unittest.cc index 4d3cf42..2b651825 100644 --- a/extensions/browser/api/sockets_udp/sockets_udp_api_unittest.cc +++ b/extensions/browser/api/sockets_udp/sockets_udp_api_unittest.cc
@@ -35,13 +35,9 @@ }; TEST_F(SocketsUdpUnitTest, Create) { - // Get BrowserThread - content::BrowserThread::ID id; - CHECK(content::BrowserThread::GetCurrentThreadIdentifier(&id)); - // Create SocketCreateFunction and put it on BrowserThread SocketsUdpCreateFunction* function = new SocketsUdpCreateFunction(); - function->set_work_thread_id(id); + function->set_work_task_runner(base::SequencedTaskRunnerHandle::Get()); // Run tests std::unique_ptr<base::DictionaryValue> result(RunFunctionAndReturnDictionary(
diff --git a/extensions/browser/content_hash_fetcher_unittest.cc b/extensions/browser/content_hash_fetcher_unittest.cc index 46be54e5..01d6bdc 100644 --- a/extensions/browser/content_hash_fetcher_unittest.cc +++ b/extensions/browser/content_hash_fetcher_unittest.cc
@@ -14,6 +14,7 @@ #include "base/path_service.h" #include "base/run_loop.h" #include "base/strings/stringprintf.h" +#include "base/task_scheduler/post_task.h" #include "base/threading/sequenced_worker_pool.h" #include "base/version.h" #include "content/public/browser/browser_thread.h" @@ -172,7 +173,8 @@ url.scheme(), url.host(), content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::IO), - content::BrowserThread::GetBlockingPool()); + base::CreateTaskRunnerWithTraits( + {base::MayBlock(), base::TaskPriority::BACKGROUND})); interceptor_->SetResponse(url, response_path); }
diff --git a/gpu/ipc/service/direct_composition_surface_win.cc b/gpu/ipc/service/direct_composition_surface_win.cc index 8f30ca6..706fa86e 100644 --- a/gpu/ipc/service/direct_composition_surface_win.cc +++ b/gpu/ipc/service/direct_composition_surface_win.cc
@@ -999,7 +999,7 @@ // static bool DirectCompositionSurfaceWin::IsHDRSupported() { - bool hdr_monitor_found = true; + bool hdr_monitor_found = false; #if defined(ENABLE_HDR_DETECTION) base::win::ScopedComPtr<ID3D11Device> d3d11_device = gl::QueryD3D11DeviceObjectFromANGLE(); @@ -1031,14 +1031,11 @@ if (desc.ColorSpace == DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020) { hdr_monitor_found = true; - return true; } } UMA_HISTOGRAM_BOOLEAN("GPU.Output.HDR", hdr_monitor_found); - return hdr_monitor_found; -#else - return false; #endif + return hdr_monitor_found; } bool DirectCompositionSurfaceWin::InitializeNativeWindow() {
diff --git a/gpu/ipc/service/gpu_channel.cc b/gpu/ipc/service/gpu_channel.cc index dc80bda..21ae063 100644 --- a/gpu/ipc/service/gpu_channel.cc +++ b/gpu/ipc/service/gpu_channel.cc
@@ -1182,14 +1182,14 @@ void GpuChannel::AddFilter(IPC::MessageFilter* filter) { io_task_runner_->PostTask( - FROM_HERE, - base::Bind(&GpuChannelMessageFilter::AddChannelFilter, filter_, filter)); + FROM_HERE, base::Bind(&GpuChannelMessageFilter::AddChannelFilter, filter_, + base::RetainedRef(filter))); } void GpuChannel::RemoveFilter(IPC::MessageFilter* filter) { io_task_runner_->PostTask( FROM_HERE, base::Bind(&GpuChannelMessageFilter::RemoveChannelFilter, - filter_, filter)); + filter_, base::RetainedRef(filter))); } uint64_t GpuChannel::GetMemoryUsage() {
diff --git a/ios/chrome/app/resources/XCTRunnerAddition+Info.plist b/ios/chrome/app/resources/XCTRunnerAddition+Info.plist new file mode 100644 index 0000000..a0ba439 --- /dev/null +++ b/ios/chrome/app/resources/XCTRunnerAddition+Info.plist
@@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleIdentifier</key> + <string>com.apple.test.${PRODUCT_NAME}-Runner</string> + <key>CFBundleName</key> + <string>${PRODUCT_NAME}</string> +</dict> +</plist>
diff --git a/ios/chrome/browser/history/top_sites_factory.cc b/ios/chrome/browser/history/top_sites_factory.cc index d2a80b7..e19ea43 100644 --- a/ios/chrome/browser/history/top_sites_factory.cc +++ b/ios/chrome/browser/history/top_sites_factory.cc
@@ -50,8 +50,7 @@ browser_state, ServiceAccessType::EXPLICIT_ACCESS), history::PrepopulatedPageList(), base::Bind(CanAddURLToHistory))); top_sites->Init( - browser_state->GetStatePath().Append(history::kTopSitesFilename), - web::WebThread::GetTaskRunnerForThread(web::WebThread::DB)); + browser_state->GetStatePath().Append(history::kTopSitesFilename)); return top_sites; }
diff --git a/ios/chrome/browser/translate/BUILD.gn b/ios/chrome/browser/translate/BUILD.gn index 4cee55ca..4ca6001 100644 --- a/ios/chrome/browser/translate/BUILD.gn +++ b/ios/chrome/browser/translate/BUILD.gn
@@ -36,6 +36,7 @@ "//components/metrics/proto", "//components/prefs", "//components/strings", + "//components/sync", "//components/translate/core/browser", "//components/translate/core/common", "//components/translate/ios/browser", @@ -45,6 +46,7 @@ "//ios/chrome/browser", "//ios/chrome/browser/browser_state", "//ios/chrome/browser/infobars", + "//ios/chrome/browser/sync", "//ios/chrome/browser/ui/infobars", "//ios/web", "//ui/base",
diff --git a/ios/chrome/browser/translate/chrome_ios_translate_client.mm b/ios/chrome/browser/translate/chrome_ios_translate_client.mm index d6b5641..4b984e2e 100644 --- a/ios/chrome/browser/translate/chrome_ios_translate_client.mm +++ b/ios/chrome/browser/translate/chrome_ios_translate_client.mm
@@ -7,11 +7,15 @@ #include <utility> #include <vector> +#include "base/feature_list.h" #include "base/logging.h" #include "base/memory/ptr_util.h" #include "components/infobars/core/infobar.h" #include "components/metrics/proto/translate_event.pb.h" #include "components/prefs/pref_service.h" +#include "components/sync/driver/sync_driver_switches.h" +#include "components/sync/protocol/user_event_specifics.pb.h" +#include "components/sync/user_events/user_event_service.h" #include "components/translate/core/browser/page_translated_details.h" #include "components/translate/core/browser/translate_accept_languages.h" #include "components/translate/core/browser/translate_infobar_delegate.h" @@ -19,11 +23,13 @@ #include "components/translate/core/browser/translate_prefs.h" #include "components/translate/core/browser/translate_step.h" #include "components/translate/core/common/language_detection_details.h" +#include "components/translate/core/common/translation_logging_helper.h" #include "ios/chrome/browser/browser_state/chrome_browser_state.h" #include "ios/chrome/browser/infobars/infobar.h" #include "ios/chrome/browser/infobars/infobar_controller.h" #include "ios/chrome/browser/infobars/infobar_manager_impl.h" #include "ios/chrome/browser/pref_names.h" +#import "ios/chrome/browser/sync/ios_user_event_service_factory.h" #import "ios/chrome/browser/translate/after_translate_infobar_controller.h" #import "ios/chrome/browser/translate/before_translate_infobar_controller.h" #include "ios/chrome/browser/translate/language_model_factory.h" @@ -34,6 +40,8 @@ #include "ios/chrome/browser/translate/translate_service_ios.h" #include "ios/chrome/grit/ios_theme_resources.h" #include "ios/web/public/browser_state.h" +#include "ios/web/public/navigation_item.h" +#include "ios/web/public/navigation_manager.h" #include "ios/web/public/web_state/web_state.h" #include "url/gurl.h" @@ -107,8 +115,30 @@ } void ChromeIOSTranslateClient::RecordTranslateEvent( - const metrics::TranslateEventProto&) { - // TODO(crbug.com/728491): Implementing gaia-keyed logging. + const metrics::TranslateEventProto& translate_event) { + if (!base::FeatureList::IsEnabled(switches::kSyncUserTranslationEvents)) + return; + + syncer::UserEventService* const user_event_service = + IOSUserEventServiceFactory::GetForBrowserState( + ios::ChromeBrowserState::FromBrowserState( + web_state()->GetBrowserState())); + const auto* const item = + web_state()->GetNavigationManager()->GetLastCommittedItem(); + + // If entry is null, we don't record the page. + // The navigation entry can be null in situations like download or initial + // blank page. + if (item == nullptr) + return; + + auto specifics = base::MakeUnique<sync_pb::UserEventSpecifics>(); + // We only log the event we care about. + const bool needs_logging = translate::ConstructTranslateEvent( + item->GetTimestamp().ToInternalValue(), translate_event, specifics.get()); + if (needs_logging) { + user_event_service->RecordUserEvent(std::move(specifics)); + } } void ChromeIOSTranslateClient::ShowTranslateUI(
diff --git a/ios/chrome/browser/ui/sad_tab/BUILD.gn b/ios/chrome/browser/ui/sad_tab/BUILD.gn index 4fd01c50..4b96b07 100644 --- a/ios/chrome/browser/ui/sad_tab/BUILD.gn +++ b/ios/chrome/browser/ui/sad_tab/BUILD.gn
@@ -27,3 +27,26 @@ ] libs = [ "UIKit.framework" ] } + +source_set("eg_tests") { + configs += [ "//build/config/compiler:enable_arc" ] + testonly = true + sources = [ + "sad_tab_view_egtest.mm", + ] + + deps = [ + ":sad_tab", + "//base", + "//components/strings", + "//ios/chrome/app/strings", + "//ios/chrome/browser/ui/tools_menu", + "//ios/chrome/test/app:test_support", + "//ios/chrome/test/earl_grey:test_support", + "//ios/testing/earl_grey:earl_grey_support", + "//ios/third_party/earl_grey", + "//ios/web/public/test/http_server", + "//ui/base", + ] + libs = [ "XCTest.framework" ] +}
diff --git a/ios/chrome/browser/ui/sad_tab/sad_tab_view_egtest.mm b/ios/chrome/browser/ui/sad_tab/sad_tab_view_egtest.mm new file mode 100644 index 0000000..2aa6092 --- /dev/null +++ b/ios/chrome/browser/ui/sad_tab/sad_tab_view_egtest.mm
@@ -0,0 +1,158 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import <EarlGrey/EarlGrey.h> +#import <XCTest/XCTest.h> + +#include "base/ios/ios_util.h" +#include "components/strings/grit/components_strings.h" +#include "ios/chrome/browser/ui/tools_menu/tools_menu_constants.h" +#import "ios/chrome/test/app/chrome_test_util.h" +#import "ios/chrome/test/app/navigation_test_util.h" +#import "ios/chrome/test/earl_grey/chrome_assertions.h" +#import "ios/chrome/test/earl_grey/chrome_earl_grey.h" +#import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h" +#import "ios/chrome/test/earl_grey/chrome_matchers.h" +#import "ios/chrome/test/earl_grey/chrome_test_case.h" +#import "ios/web/public/test/http_server/http_server.h" +#include "ios/web/public/test/http_server/http_server_util.h" +#include "ui/base/l10n/l10n_util_mac.h" + +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +namespace { +// Returns matcher that looks for text in UILabel, UITextView, and UITextField +// objects, checking if their displayed strings contain the provided |text|. +id<GREYMatcher> ContainsText(NSString* text) { + MatchesBlock matches = ^BOOL(id element) { + return [[element text] containsString:text]; + }; + DescribeToBlock describe = ^void(id<GREYDescription> description) { + [description appendText:[NSString stringWithFormat:@"hasText('%@')", text]]; + }; + id<GREYMatcher> matcher = + [[GREYElementMatcherBlock alloc] initWithMatchesBlock:matches + descriptionBlock:describe]; + return grey_allOf(grey_anyOf(grey_kindOfClass([UILabel class]), + grey_kindOfClass([UITextField class]), + grey_kindOfClass([UITextView class]), nil), + matcher, nil); +} + +// A matcher for the main title of the Sad Tab in 'reload' mode. +id<GREYMatcher> reloadSadTabTitleText() { + static id matcher = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + matcher = [GREYMatchers + matcherForText:l10n_util::GetNSString(IDS_SAD_TAB_MESSAGE)]; + }); + return matcher; +} + +// A matcher for the main title of the Sad Tab in 'feedback' mode. +id<GREYMatcher> feedbackSadTabTitleContainsText() { + static id matcher = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + matcher = ContainsText(l10n_util::GetNSString(IDS_SAD_TAB_RELOAD_TRY)); + }); + return matcher; +} + +// A matcher for a help string suggesting the user use Incognito Mode. +id<GREYMatcher> incognitoHelpContainsText() { + static id matcher = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + matcher = + ContainsText(l10n_util::GetNSString(IDS_SAD_TAB_RELOAD_INCOGNITO)); + }); + return matcher; +} +} + +// Sad Tab View integration tests for Chrome. +@interface SadTabViewTestCase : ChromeTestCase +@end + +@implementation SadTabViewTestCase + +// Verifies initial and repeated visits to the Sad Tab. +// N.B. There is a mechanism which changes the Sad Tab UI if a crash URL is +// visited within 60 seconds, for this reason this one test can not +// be easily split up across multiple tests +// as visiting Sad Tab may not be idempotent. +- (void)testSadTabView { + // Prepare a simple but known URL to avoid testing from the NTP. + web::test::SetUpFileBasedHttpServer(); + const GURL simple_URL = web::test::HttpServer::MakeUrl( + "http://ios/testing/data/http_server_files/destination.html"); + + // Prepare a helper block to test Sad Tab navigating from and to normal pages. + void (^loadAndCheckSimpleURL)() = ^void() { + [ChromeEarlGrey loadURL:simple_URL]; + [ChromeEarlGrey waitForWebViewContainingText:"You've arrived"]; + [[EarlGrey selectElementWithMatcher:reloadSadTabTitleText()] + assertWithMatcher:grey_nil()]; + [[EarlGrey selectElementWithMatcher:feedbackSadTabTitleContainsText()] + assertWithMatcher:grey_nil()]; + }; + + loadAndCheckSimpleURL(); + + // Navigate to the chrome://crash URL which should show the Sad Tab. + // Use chrome_test_util::LoadURL() directly to avoid ChomeEarlGrey helper + // methods which expect to wait for web content. + const GURL crash_URL = GURL("chrome://crash"); + chrome_test_util::LoadUrl(crash_URL); + [[EarlGrey selectElementWithMatcher:reloadSadTabTitleText()] + assertWithMatcher:grey_notNil()]; + + // Ensure user can navigate away from Sad Tab, and the Sad Tab content + // is no longer visible. + loadAndCheckSimpleURL(); + + // A second visit to the crashing URL should show a feedback message. + // It should also show help messages including an invitation to use + // Incognito Mode. + chrome_test_util::LoadUrl(crash_URL); + [[EarlGrey selectElementWithMatcher:feedbackSadTabTitleContainsText()] + assertWithMatcher:grey_notNil()]; + [[EarlGrey selectElementWithMatcher:incognitoHelpContainsText()] + assertWithMatcher:grey_notNil()]; + + // Again ensure a user can navigate away from Sad Tab, and the Sad Tab content + // is no longer visible. + loadAndCheckSimpleURL(); + + // Open an Incognito tab and browse somewhere, the repeated crash UI changes + // dependent on the Incognito mode. + [ChromeEarlGreyUI openToolsMenu]; + id<GREYMatcher> newIncognitoTabButtonMatcher = + grey_accessibilityID(kToolsMenuNewIncognitoTabId); + [[EarlGrey selectElementWithMatcher:newIncognitoTabButtonMatcher] + performAction:grey_tap()]; + chrome_test_util::AssertIncognitoTabCount(1); + loadAndCheckSimpleURL(); + + // Test an initial crash, and then a second crash in Incognito mode, as above. + // Incognito mode should not be suggested if already in Incognito mode. + chrome_test_util::LoadUrl(crash_URL); + [[EarlGrey selectElementWithMatcher:reloadSadTabTitleText()] + assertWithMatcher:grey_notNil()]; + chrome_test_util::LoadUrl(crash_URL); + [[EarlGrey selectElementWithMatcher:feedbackSadTabTitleContainsText()] + assertWithMatcher:grey_notNil()]; + [[EarlGrey selectElementWithMatcher:incognitoHelpContainsText()] + assertWithMatcher:grey_nil()]; + + // Finally, ensure that the user can browse away from the Sad Tab page + // in Incognito Mode. + loadAndCheckSimpleURL(); +} + +@end
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.h b/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.h index 82d6ab7..c290a783 100644 --- a/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.h +++ b/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.h
@@ -47,12 +47,6 @@ // The delegate needs to be set before calling this method. - (void)setAppearanceForTab:(Tab*)tab cellSize:(CGSize)cellSize; -// PLACEHOLDER: Sets the cell's appearance using information in |title| and -// |favicon|. -- (void)setAppearanceForTabTitle:(NSString*)title - favicon:(UIImage*)favicon - cellSize:(CGSize)cellSize; - // Sets the cell's appearance depending on |type|. - (void)setSessionType:(TabSwitcherSessionType)type;
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.mm b/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.mm index 396b374..b9ebf28 100644 --- a/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.mm +++ b/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.mm
@@ -102,16 +102,22 @@ @end +@interface TabSwitcherLocalSessionCell () +@property(nonatomic, strong) UILabel* titleLabel; +@property(nonatomic, strong) UIImageView* favicon; +@property(nonatomic, strong) TabSwitcherButton* snapshotButton; +@end + @implementation TabSwitcherLocalSessionCell { UIView* _topBar; - UILabel* _titleLabel; - UIImageView* _favicon; UIButton* _closeButton; UIImageView* _shadow; UIImageView* _snapshot; - TabSwitcherButton* _snapshotButton; PendingSnapshotRequest _currentPendingSnapshotRequest; } +@synthesize titleLabel = _titleLabel; +@synthesize favicon = _favicon; +@synthesize snapshotButton = _snapshotButton; - (instancetype)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; @@ -245,22 +251,6 @@ }]; } -- (void)setAppearanceForTabTitle:(NSString*)title - favicon:(UIImage*)favicon - cellSize:(CGSize)cellSize { - [_titleLabel setText:title]; - [_snapshotButton setAccessibilityIdentifier: - [NSString stringWithFormat:@"%@_button", title]]; - [self contentView].accessibilityLabel = title; - if (favicon) { - [_favicon setImage:favicon]; - } else { - [_favicon setImage:NativeImage(IDR_IOS_OMNIBOX_HTTP)]; - } - - // PLACEHOLDER: Set snapshot here. -} - - (void)setSessionType:(TabSwitcherSessionType)type { UIColor* topBarBackgroundColor; UIColor* closeButtonTintColor;
diff --git a/ios/chrome/test/earl_grey/BUILD.gn b/ios/chrome/test/earl_grey/BUILD.gn index 601576e..d497f3cd 100644 --- a/ios/chrome/test/earl_grey/BUILD.gn +++ b/ios/chrome/test/earl_grey/BUILD.gn
@@ -60,6 +60,7 @@ "//ios/chrome/browser/ui/ntp/recent_tabs:eg_tests", "//ios/chrome/browser/ui/print:eg_tests", "//ios/chrome/browser/ui/qr_scanner:eg_tests", + "//ios/chrome/browser/ui/sad_tab:eg_tests", "//ios/chrome/browser/ui/stack_view:eg_tests", "//ios/chrome/browser/ui/sync:eg_tests", "//ios/chrome/browser/ui/tab_switcher:eg_tests",
diff --git a/ios/clean/chrome/browser/ui/tab_collection/BUILD.gn b/ios/clean/chrome/browser/ui/tab_collection/BUILD.gn index 2301668..66b56153 100644 --- a/ios/clean/chrome/browser/ui/tab_collection/BUILD.gn +++ b/ios/clean/chrome/browser/ui/tab_collection/BUILD.gn
@@ -28,6 +28,8 @@ ] deps = [ "//base", + "//ios/chrome/app/theme:theme_grit", + "//ios/chrome/browser/ui", "//ios/chrome/browser/ui/tab_switcher", "//ios/clean/chrome/browser/ui/commands", ]
diff --git a/ios/clean/chrome/browser/ui/tab_collection/tab_collection_tab_cell.h b/ios/clean/chrome/browser/ui/tab_collection/tab_collection_tab_cell.h index ca0ec15..ed919d5 100644 --- a/ios/clean/chrome/browser/ui/tab_collection/tab_collection_tab_cell.h +++ b/ios/clean/chrome/browser/ui/tab_collection/tab_collection_tab_cell.h
@@ -9,12 +9,14 @@ #import "ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.h" +@class TabCollectionItem; + // Cell represents a tab for use in the tab collection. It has a title, favicon, // screenshot image, and close button. Cell selection is represented by a border // highlight in the tintColor. // PLACEHOLDER: Create custom implemementation rather than subclassing. @interface TabCollectionTabCell : TabSwitcherLocalSessionCell - +@property(nonatomic, strong) TabCollectionItem* item; @end #endif // IOS_CLEAN_CHROME_BROWSER_UI_TAB_COLLECTION_TAB_COLLECTION_TAB_CELL_H_
diff --git a/ios/clean/chrome/browser/ui/tab_collection/tab_collection_tab_cell.mm b/ios/clean/chrome/browser/ui/tab_collection/tab_collection_tab_cell.mm index ff06540a..f9c7914 100644 --- a/ios/clean/chrome/browser/ui/tab_collection/tab_collection_tab_cell.mm +++ b/ios/clean/chrome/browser/ui/tab_collection/tab_collection_tab_cell.mm
@@ -4,6 +4,11 @@ #import "ios/clean/chrome/browser/ui/tab_collection/tab_collection_tab_cell.h" +#import "ios/chrome/browser/ui/tab_switcher/tab_switcher_button.h" +#import "ios/chrome/browser/ui/uikit_ui_util.h" +#include "ios/chrome/grit/ios_theme_resources.h" +#import "ios/clean/chrome/browser/ui/tab_collection/tab_collection_item.h" + #if !defined(__has_feature) || !__has_feature(objc_arc) #error "This file requires ARC support." #endif @@ -14,7 +19,17 @@ const CGFloat kSelectedBorderWidth = 4.0f; } +@interface TabCollectionTabCell () +@property(nonatomic, strong) UILabel* titleLabel; +@property(nonatomic, strong) UIImageView* favicon; +@property(nonatomic, strong) TabSwitcherButton* snapshotButton; +@end + @implementation TabCollectionTabCell +@synthesize item = _item; +@dynamic titleLabel; +@dynamic favicon; +@dynamic snapshotButton; - (instancetype)initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame])) { @@ -23,6 +38,20 @@ return self; } +#pragma mark - Properties + +- (void)setItem:(TabCollectionItem*)item { + DCHECK(item); + _item = item; + self.titleLabel.text = item.title; + self.snapshotButton.accessibilityIdentifier = + [NSString stringWithFormat:@"%@_button", item.title]; + self.contentView.accessibilityLabel = item.title; + self.favicon.image = NativeImage(IDR_IOS_OMNIBOX_HTTP); +} + +#pragma mark - Private + - (void)setupSelectedBackgroundView { self.selectedBackgroundView = [[UIView alloc] init]; self.selectedBackgroundView.backgroundColor = [UIColor blackColor];
diff --git a/ios/clean/chrome/browser/ui/tab_collection/tab_collection_view_controller.mm b/ios/clean/chrome/browser/ui/tab_collection/tab_collection_view_controller.mm index 4fa101e..dba8b4c 100644 --- a/ios/clean/chrome/browser/ui/tab_collection/tab_collection_view_controller.mm +++ b/ios/clean/chrome/browser/ui/tab_collection/tab_collection_view_controller.mm
@@ -118,9 +118,7 @@ [cell setSessionType:TabSwitcherSessionType::REGULAR_SESSION]; DCHECK_LE(indexPath.item, INT_MAX); int index = static_cast<int>(indexPath.item); - [cell setAppearanceForTabTitle:self.items[index].title - favicon:nil - cellSize:CGSizeZero]; + cell.item = self.items[index]; return cell; } @@ -194,9 +192,7 @@ TabCollectionTabCell* cell = base::mac::ObjCCastStrict<TabCollectionTabCell>( [self.tabs cellForItemAtIndexPath:[NSIndexPath indexPathForItem:index inSection:0]]); - [cell setAppearanceForTabTitle:self.items[index].title - favicon:nil - cellSize:CGSizeZero]; + cell.item = self.items[index]; } - (void)populateItems:(NSArray<TabCollectionItem*>*)items
diff --git a/ios/web/webui/web_ui_ios_data_source_impl.mm b/ios/web/webui/web_ui_ios_data_source_impl.mm index 189722f..80da6f8 100644 --- a/ios/web/webui/web_ui_ios_data_source_impl.mm +++ b/ios/web/webui/web_ui_ios_data_source_impl.mm
@@ -66,7 +66,7 @@ source_name_(source_name), default_resource_(-1), deny_xframe_options_(true), - load_time_data_defaults_added_(true), + load_time_data_defaults_added_(false), replace_existing_source_(true) {} WebUIIOSDataSourceImpl::~WebUIIOSDataSourceImpl() {} @@ -142,10 +142,10 @@ } void WebUIIOSDataSourceImpl::EnsureLoadTimeDataDefaultsAdded() { - if (!load_time_data_defaults_added_) + if (load_time_data_defaults_added_) return; - load_time_data_defaults_added_ = false; + load_time_data_defaults_added_ = true; base::DictionaryValue defaults; webui::SetLoadTimeDataDefaults(web::GetWebClient()->GetApplicationLocale(), &defaults);
diff --git a/media/BUILD.gn b/media/BUILD.gn index aae61e06..6d6d9fe 100644 --- a/media/BUILD.gn +++ b/media/BUILD.gn
@@ -363,11 +363,9 @@ if (is_mac) { public_deps += [ "//media/base/mac" ] - libs += [ - "CoreFoundation.framework", - "CoreGraphics.framework", - "Foundation.framework", - ] + + # For device_monitor_mac.mm + libs += [ "Foundation.framework" ] } if (is_ios) {
diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn index 79756a1d4..d0b521a 100644 --- a/media/audio/BUILD.gn +++ b/media/audio/BUILD.gn
@@ -172,6 +172,7 @@ "AudioToolbox.framework", "AudioUnit.framework", "CoreAudio.framework", + "CoreFoundation.framework", ] }
diff --git a/media/base/BUILD.gn b/media/base/BUILD.gn index 3c5689f..9a8cd1f 100644 --- a/media/base/BUILD.gn +++ b/media/base/BUILD.gn
@@ -336,9 +336,11 @@ ] } else if (is_mac) { sources += [ "user_input_monitor_mac.cc" ] - - # Required by video_frame.cc. - libs = [ "CoreVideo.framework" ] + libs = [ + "CoreVideo.framework", + "CoreFoundation.framework", + "CoreGraphics.framework", + ] } else if (is_win) { sources += [ "user_input_monitor_win.cc" ] } else {
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc index cbd429c..2986a27c 100644 --- a/media/blink/webmediaplayer_impl.cc +++ b/media/blink/webmediaplayer_impl.cc
@@ -350,7 +350,8 @@ bool WebMediaPlayerImpl::SupportsOverlayFullscreenVideo() { #if defined(OS_ANDROID) - return !using_media_player_renderer_; + return !using_media_player_renderer_ && + overlay_mode_ == OverlayMode::kUseContentVideoView; #else return false; #endif
diff --git a/media/gpu/BUILD.gn b/media/gpu/BUILD.gn index 2c234226e..1e5b1d0 100644 --- a/media/gpu/BUILD.gn +++ b/media/gpu/BUILD.gn
@@ -182,6 +182,9 @@ sources += [ "android/device_info.cc", "android/device_info.h", + "android/promotion_hint_aggregator.h", + "android/promotion_hint_aggregator_impl.cc", + "android/promotion_hint_aggregator_impl.h", "android_video_decode_accelerator.cc", "android_video_decode_accelerator.h", "android_video_surface_chooser.h", @@ -464,6 +467,7 @@ "android/fake_codec_allocator.h", "android/mock_device_info.cc", "android/mock_device_info.h", + "android/promotion_hint_aggregator_impl_unittest.cc", "android_video_decode_accelerator_unittest.cc", "android_video_surface_chooser_impl_unittest.cc", "avda_codec_allocator_unittest.cc",
diff --git a/media/gpu/android/promotion_hint_aggregator.h b/media/gpu/android/promotion_hint_aggregator.h new file mode 100644 index 0000000..44e5561 --- /dev/null +++ b/media/gpu/android/promotion_hint_aggregator.h
@@ -0,0 +1,41 @@ +// 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 MEDIA_GPU_ANDROID_PROMOTION_HINT_AGGREGATOR_H_ +#define MEDIA_GPU_ANDROID_PROMOTION_HINT_AGGREGATOR_H_ + +#include "base/bind.h" +#include "base/callback.h" +#include "base/macros.h" +#include "media/gpu/media_gpu_export.h" + +namespace media { + +// Receive lots of promotion hints, and aggregate them into a single signal. A +// promotion hint is feedback from the compositor about whether a quad could be +// promoted to an overlay, or whether the compositor would refuse to do so. +// For example, the compositor won't promote a quad that's rotated, since an +// overlay can't do that. +class MEDIA_GPU_EXPORT PromotionHintAggregator { + public: + struct Hint { + int x = 0; + int y = 0; + bool is_promotable = false; + }; + + using NotifyPromotionHintCB = base::Callback<void(const Hint& hint)>; + + virtual ~PromotionHintAggregator() = default; + + // Notify us that an image has / would be drawn with the given hint. + virtual void NotifyPromotionHint(const Hint& hint) = 0; + + // Returns true if and only if it's probably okay to promote the video. + virtual bool IsSafeToPromote() = 0; +}; + +} // namespace media + +#endif // MEDIA_GPU_ANDROID_PROMOTION_HINT_AGGREGATOR_H_
diff --git a/media/gpu/android/promotion_hint_aggregator_impl.cc b/media/gpu/android/promotion_hint_aggregator_impl.cc new file mode 100644 index 0000000..ec5ab788 --- /dev/null +++ b/media/gpu/android/promotion_hint_aggregator_impl.cc
@@ -0,0 +1,73 @@ +// 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 "media/gpu/android/promotion_hint_aggregator_impl.h" + +#include "base/bind.h" +#include "base/memory/ptr_util.h" +#include "base/time/default_tick_clock.h" + +namespace media { + +// Minimum amount of time between promotable frames before we start over. The +// idea is to prevent promoting on paused / background rendering. Note that +// this time is only enforced when transitioning from unpromotable to promotable +// frames. We don't unpromote later because of this. +constexpr base::TimeDelta MaximumInterFrameTime = + base::TimeDelta::FromMilliseconds(100); + +// Minimum number of consecutive promotable frames before we actually start +// promoting frames. +constexpr int MinimumPromotableFrames = 10; + +// Minimum time since the last unpromotable frame that we require before we will +// promote new ones. +constexpr base::TimeDelta MinimumUnpromotableFrameTime = + base::TimeDelta::FromMilliseconds(2000); + +PromotionHintAggregatorImpl::PromotionHintAggregatorImpl( + base::TickClock* tick_clock) + : weak_ptr_factory_(this) { + if (!tick_clock) { + clock_we_own_ = base::MakeUnique<base::DefaultTickClock>(); + tick_clock = clock_we_own_.get(); + } + + tick_clock_ = tick_clock; +} + +PromotionHintAggregatorImpl::~PromotionHintAggregatorImpl() {} + +void PromotionHintAggregatorImpl::NotifyPromotionHint(const Hint& hint) { + base::TimeTicks now = tick_clock_->NowTicks(); + + if (!hint.is_promotable) { + most_recent_unpromotable_ = now; + consecutive_promotable_frames_ = 0; + } else if (!IsSafeToPromote() && + now - most_recent_update_ > MaximumInterFrameTime) { + // Promotable, but we aren't getting frames fast enough to count. We + // don't want to transition to promotable unless frames are actually + // playing. We check IsSafeToPromote() so that we don't transition back + // to unpromotable just because it's paused; that would cause the frame + // to become unrenderable. We just want to delay the transition into + // promotable until it works. + consecutive_promotable_frames_ = 1; + } else { + // Promotable frame, and we're getting frames fast enough. + consecutive_promotable_frames_++; + } + + most_recent_update_ = now; +} + +bool PromotionHintAggregatorImpl::IsSafeToPromote() { + base::TimeTicks now = tick_clock_->NowTicks(); + base::TimeDelta since_last_unpromotable = now - most_recent_unpromotable_; + + return consecutive_promotable_frames_ >= MinimumPromotableFrames && + since_last_unpromotable >= MinimumUnpromotableFrameTime; +} + +} // namespace media
diff --git a/media/gpu/android/promotion_hint_aggregator_impl.h b/media/gpu/android/promotion_hint_aggregator_impl.h new file mode 100644 index 0000000..94ba04f --- /dev/null +++ b/media/gpu/android/promotion_hint_aggregator_impl.h
@@ -0,0 +1,54 @@ +// 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 MEDIA_GPU_ANDROID_PROMOTION_HINT_AGGREGATOR_IMPL_H_ +#define MEDIA_GPU_ANDROID_PROMOTION_HINT_AGGREGATOR_IMPL_H_ + +#include <memory> + +#include "base/bind.h" +#include "base/macros.h" +#include "base/memory/weak_ptr.h" +#include "base/time/tick_clock.h" +#include "media/gpu/android/promotion_hint_aggregator.h" +#include "media/gpu/media_gpu_export.h" + +namespace media { + +// Receive lots of promotion hints, and aggregate them into a single signal. +class MEDIA_GPU_EXPORT PromotionHintAggregatorImpl + : public PromotionHintAggregator { + public: + // |tick_clock| may be null, in which case we will use wall clock. If it is + // not null, then it must outlive |this|. It is provided for tests. + PromotionHintAggregatorImpl(base::TickClock* tick_clock = nullptr); + ~PromotionHintAggregatorImpl() override; + + void NotifyPromotionHint(const Hint& hint) override; + bool IsSafeToPromote() override; + + private: + // Clock, which we might not own, that we'll use. + base::TickClock* tick_clock_; + + // Will be non-null if we allocate our own clock. Use |tick_clock| instead. + std::unique_ptr<base::TickClock> clock_we_own_; + + // When did we receive the most recent "not promotable" frame? + base::TimeTicks most_recent_unpromotable_; + + // When did we last receive an update? + base::TimeTicks most_recent_update_; + + // Number of frames which were promotable in a row. + int consecutive_promotable_frames_ = 0; + + base::WeakPtrFactory<PromotionHintAggregatorImpl> weak_ptr_factory_; + + DISALLOW_COPY_AND_ASSIGN(PromotionHintAggregatorImpl); +}; + +} // namespace media + +#endif // MEDIA_GPU_ANDROID_PROMOTION_HINT_AGGREGATOR_IMPL_H_
diff --git a/media/gpu/android/promotion_hint_aggregator_impl_unittest.cc b/media/gpu/android/promotion_hint_aggregator_impl_unittest.cc new file mode 100644 index 0000000..c8a16aeb --- /dev/null +++ b/media/gpu/android/promotion_hint_aggregator_impl_unittest.cc
@@ -0,0 +1,98 @@ +// 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 "media/gpu/android/promotion_hint_aggregator_impl.h" + +#include <stdint.h> + +#include <memory> + +#include "base/bind.h" +#include "base/logging.h" +#include "base/memory/ptr_util.h" +#include "base/test/simple_test_tick_clock.h" +#include "testing/gtest/include/gtest/gtest.h" + +using base::TimeDelta; + +namespace { +// Default elapsed time between frames. +constexpr TimeDelta FrameTime = TimeDelta::FromMilliseconds(10); +} // namespace + +namespace media { + +// Unit tests for PromotionHintAggregatorImplTest +class PromotionHintAggregatorImplTest : public testing::Test { + public: + ~PromotionHintAggregatorImplTest() override {} + + void SetUp() override { + // Advance the clock so that time 0 isn't recent. + tick_clock_.Advance(TimeDelta::FromSeconds(10000)); + impl_ = base::MakeUnique<PromotionHintAggregatorImpl>(&tick_clock_); + } + + void TearDown() override {} + + // Sends a new frame that's |is_promotable| or not, with |elapsed| since the + // previous frame. Returns whether the video is promotable. + bool SendFrame(bool is_promotable, TimeDelta elapsed = FrameTime) { + tick_clock_.Advance(elapsed); + PromotionHintAggregator::Hint hint; + hint.is_promotable = is_promotable; + impl_->NotifyPromotionHint(hint); + return impl_->IsSafeToPromote(); + } + + base::SimpleTestTickClock tick_clock_; + + std::unique_ptr<PromotionHintAggregatorImpl> impl_; +}; + +TEST_F(PromotionHintAggregatorImplTest, InitiallyNotPromotable) { + // A new aggregator shouldn't promote. + ASSERT_FALSE(impl_->IsSafeToPromote()); +} + +TEST_F(PromotionHintAggregatorImplTest, SomePromotableFramesArePromotable) { + // We should have to send 10 frames before promoting. + for (int i = 0; i < 9; i++) + ASSERT_FALSE(SendFrame(true)); + ASSERT_TRUE(SendFrame(true)); + + // Waiting a while should't cause un-promotion. + ASSERT_TRUE(SendFrame(true, TimeDelta::FromMilliseconds(10000))); + ASSERT_TRUE(SendFrame(true, TimeDelta::FromMilliseconds(10000))); +} + +TEST_F(PromotionHintAggregatorImplTest, UnpromotableFramesDelayPromotion) { + // Start with an unpromotable frame. + ASSERT_FALSE(SendFrame(false)); + base::TimeTicks start = tick_clock_.NowTicks(); + + // Send more until the minimum time has elapsed. Note that this will also be + // at least enough promotable frames in a row. + while (tick_clock_.NowTicks() - start + FrameTime < TimeDelta::FromSeconds(2)) + ASSERT_FALSE(SendFrame(true)); + + // The next frame should do it. + ASSERT_TRUE(SendFrame(true)); +} + +TEST_F(PromotionHintAggregatorImplTest, PromotableFramesMustBeFastEnough) { + // Send some promotable frames, but not enough to promote. + for (int i = 0; i < 8; i++) + ASSERT_FALSE(SendFrame(true)); + + // Time passes. + tick_clock_.Advance(TimeDelta::FromMilliseconds(500)); + + // We should now start over. + for (int i = 0; i < 9; i++) + ASSERT_FALSE(SendFrame(true)); + ASSERT_TRUE(SendFrame(true)); +} + +} // namespace media
diff --git a/media/gpu/android_video_decode_accelerator.cc b/media/gpu/android_video_decode_accelerator.cc index 2a56994..f22e5e7 100644 --- a/media/gpu/android_video_decode_accelerator.cc +++ b/media/gpu/android_video_decode_accelerator.cc
@@ -35,6 +35,7 @@ #include "media/base/timestamp_constants.h" #include "media/base/video_decoder_config.h" #include "media/gpu/android/device_info.h" +#include "media/gpu/android/promotion_hint_aggregator_impl.h" #include "media/gpu/android_video_surface_chooser_impl.h" #include "media/gpu/avda_picture_buffer_manager.h" #include "media/gpu/content_video_view_overlay.h" @@ -249,6 +250,8 @@ device_info_(device_info), force_defer_surface_creation_for_testing_(false), overlay_factory_cb_(overlay_factory_cb), + promotion_hint_aggregator_( + base::MakeUnique<PromotionHintAggregatorImpl>()), weak_this_factory_(this) {} AndroidVideoDecodeAccelerator::~AndroidVideoDecodeAccelerator() { @@ -889,13 +892,23 @@ if (size_changed) picture_buffer.set_size(size_); - // TODO(liberato): request a hint for promotability. crbug.com/671365 . + // Only ask for promotion hints if we can actually switch surfaces. + const bool want_promotion_hint = device_info_->IsSetOutputSurfaceSupported(); const bool allow_overlay = picture_buffer_manager_.ArePicturesOverlayable(); UMA_HISTOGRAM_BOOLEAN("Media.AVDA.FrameSentAsOverlay", allow_overlay); + // We unconditionally mark the picture as overlayable, even if + // |!allow_overlay|, if we want to get hints. It's required, else we won't + // get hints. // TODO(hubbe): Insert the correct color space. http://crbug.com/647725 Picture picture(picture_buffer_id, bitstream_id, gfx::Rect(size_), - gfx::ColorSpace(), allow_overlay); + gfx::ColorSpace(), + want_promotion_hint ? true : allow_overlay); picture.set_size_changed(size_changed); + if (want_promotion_hint) { + picture.set_wants_promotion_hint(true); + // This will prevent it from actually being promoted if it shouldn't be. + picture.set_surface_texture(!allow_overlay); + } // Notify picture ready before calling UseCodecBufferForPictureBuffer() since // that process may be slow and shouldn't delay delivery of the frame to the @@ -1539,6 +1552,23 @@ client_->NotifyError(error); } +PromotionHintAggregator::NotifyPromotionHintCB +AndroidVideoDecodeAccelerator::GetPromotionHintCB() { + return base::Bind(&AndroidVideoDecodeAccelerator::NotifyPromotionHint, + weak_this_factory_.GetWeakPtr()); +} + +void AndroidVideoDecodeAccelerator::NotifyPromotionHint( + const PromotionHintAggregator::Hint& hint) { + promotion_hint_aggregator_->NotifyPromotionHint(hint); + bool promotable = promotion_hint_aggregator_->IsSafeToPromote(); + if (promotable != chooser_state_.is_compositor_promotable) { + chooser_state_.is_compositor_promotable = promotable; + surface_chooser_->UpdateState(base::Optional<AndroidOverlayFactoryCB>(), + chooser_state_); + } +} + void AndroidVideoDecodeAccelerator::ManageTimer(bool did_work) { bool should_be_running = true;
diff --git a/media/gpu/android_video_decode_accelerator.h b/media/gpu/android_video_decode_accelerator.h index 4f74687..f01ea5ab 100644 --- a/media/gpu/android_video_decode_accelerator.h +++ b/media/gpu/android_video_decode_accelerator.h
@@ -35,6 +35,7 @@ namespace media { class SharedMemoryRegion; +class PromotionHintAggregator; // A VideoDecodeAccelerator implementation for Android. This class decodes the // encoded input stream using Android's MediaCodec. It handles the work of @@ -80,6 +81,7 @@ // failure. If deferred init is pending, then we'll fail deferred init. // Otherwise, we'll signal errors normally. void NotifyError(Error error) override; + PromotionHintAggregator::NotifyPromotionHintCB GetPromotionHintCB() override; // AVDACodecAllocatorClient implementation: void OnCodecConfigured( @@ -254,6 +256,9 @@ // another codec. Normally, one doesn't. void ReleaseCodecAndBundle(); + // Send a |hint| to |promotion_hint_aggregator_|. + void NotifyPromotionHint(const PromotionHintAggregator::Hint& hint); + // Used to DCHECK that we are called on the correct thread. base::ThreadChecker thread_checker_; @@ -392,6 +397,8 @@ // Optional factory to produce mojo AndroidOverlay instances. AndroidOverlayMojoFactoryCB overlay_factory_cb_; + std::unique_ptr<PromotionHintAggregator> promotion_hint_aggregator_; + // WeakPtrFactory for posting tasks back to |this|. base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_;
diff --git a/media/gpu/android_video_surface_chooser.h b/media/gpu/android_video_surface_chooser.h index 34a40ae1..67051a3 100644 --- a/media/gpu/android_video_surface_chooser.h +++ b/media/gpu/android_video_surface_chooser.h
@@ -24,10 +24,11 @@ // Does playback require a secure surface? bool is_secure = false; - // TODO(liberato): add compositor feedback. - // Is the player's frame hidden / closed? bool is_frame_hidden = false; + + // Is the compositor willing to promote this? + bool is_compositor_promotable = false; }; // Notify the client that |overlay| is ready for use. The client may get
diff --git a/media/gpu/android_video_surface_chooser_impl.cc b/media/gpu/android_video_surface_chooser_impl.cc index 89df36d5..8266e208 100644 --- a/media/gpu/android_video_surface_chooser_impl.cc +++ b/media/gpu/android_video_surface_chooser_impl.cc
@@ -106,10 +106,14 @@ if (current_state_.is_fullscreen) new_overlay_state = kUsingOverlay; - // TODO(liberato): add other checks for things like "safe for overlay". + // If the compositor won't promote, then don't. + if (!current_state_.is_compositor_promotable) + new_overlay_state = kUsingSurfaceTexture; // If we need a secure surface, then we must choose an overlay. The only way - // we won't is if we don't have a factory. + // we won't is if we don't have a factory. If the compositor won't promote, + // we still use the overlay, since hopefully it's a temporary restriction. + // If we drop the overlay, then playback will fail. if (current_state_.is_secure) new_overlay_state = kUsingOverlay;
diff --git a/media/gpu/android_video_surface_chooser_impl_unittest.cc b/media/gpu/android_video_surface_chooser_impl_unittest.cc index 010057a..acf4bd4f 100644 --- a/media/gpu/android_video_surface_chooser_impl_unittest.cc +++ b/media/gpu/android_video_surface_chooser_impl_unittest.cc
@@ -56,16 +56,23 @@ enum class IsFullscreen { No, Yes }; enum class IsSecure { No, Yes }; enum class IsFrameHidden { No, Yes }; +enum class IsCCPromotable { No, Yes }; using TestParams = std::tuple<ShouldUseOverlay, AllowDynamic, IsFullscreen, IsSecure, - IsFrameHidden>; + IsFrameHidden, + IsCCPromotable>; // Useful macro for instantiating tests. #define Either(x) Values(x::No, x::Yes) +// Check if a parameter of type |type| is Yes. |n| is the location of the +// parameter of that type. +// c++14 can remove |n|, and std::get() by type. +#define IsYes(type, n) (::testing::get<n>(GetParam()) == type::Yes); + } // namespace namespace media { @@ -82,6 +89,9 @@ // Advance the clock just so we're not at 0. tick_clock_.Advance(base::TimeDelta::FromSeconds(10)); + // Don't prevent promotions because of the compositor. + chooser_state_.is_compositor_promotable = true; + // We create a destruction observer. By default, the overlay must not be // destroyed until the test completes. Of course, the test may ask the // observer to expect something else. @@ -288,17 +298,16 @@ } TEST_P(AndroidVideoSurfaceChooserImplTest, OverlayIsUsedOrNotBasedOnState) { -// Provide a factory, and verify that it is used when the state says that it -// should be. If the overlay is used, then we also verify that it does not -// switch to SurfaceTexture first, since pre-M requires it. + // Provide a factory, and verify that it is used when the state says that it + // should be. If the overlay is used, then we also verify that it does not + // switch to SurfaceTexture first, since pre-M requires it. -// c++14 can remove |n|, and std::get() by type. -#define IsTrue(x, n) (::testing::get<n>(GetParam()) == x::Yes); - const bool should_use_overlay = IsTrue(ShouldUseOverlay, 0); - allow_dynamic_ = IsTrue(AllowDynamic, 1); - chooser_state_.is_fullscreen = IsTrue(IsFullscreen, 2); - chooser_state_.is_secure = IsTrue(IsSecure, 3); - chooser_state_.is_frame_hidden = IsTrue(IsFrameHidden, 4); + const bool should_use_overlay = IsYes(ShouldUseOverlay, 0); + allow_dynamic_ = IsYes(AllowDynamic, 1); + chooser_state_.is_fullscreen = IsYes(IsFullscreen, 2); + chooser_state_.is_secure = IsYes(IsSecure, 3); + chooser_state_.is_frame_hidden = IsYes(IsFrameHidden, 4); + chooser_state_.is_compositor_promotable = IsYes(IsCCPromotable, 5); if (should_use_overlay) { EXPECT_CALL(client_, UseSurfaceTexture()).Times(0); @@ -323,27 +332,45 @@ Either(AllowDynamic), Values(IsFullscreen::No), Values(IsSecure::No), - Values(IsFrameHidden::No))); + Values(IsFrameHidden::No), + Either(IsCCPromotable))); INSTANTIATE_TEST_CASE_P(FullscreenUsesOverlay, AndroidVideoSurfaceChooserImplTest, Combine(Values(ShouldUseOverlay::Yes), Either(AllowDynamic), Values(IsFullscreen::Yes), Values(IsSecure::No), - Values(IsFrameHidden::No))); + Values(IsFrameHidden::No), + Values(IsCCPromotable::Yes))); INSTANTIATE_TEST_CASE_P(SecureUsesOverlay, AndroidVideoSurfaceChooserImplTest, Combine(Values(ShouldUseOverlay::Yes), Either(AllowDynamic), Either(IsFullscreen), Values(IsSecure::Yes), - Values(IsFrameHidden::No))); + Values(IsFrameHidden::No), + Values(IsCCPromotable::Yes))); + INSTANTIATE_TEST_CASE_P(HiddenFramesUseSurfaceTexture, AndroidVideoSurfaceChooserImplTest, Combine(Values(ShouldUseOverlay::No), Values(AllowDynamic::Yes), Either(IsFullscreen), Either(IsSecure), - Values(IsFrameHidden::Yes))); + Values(IsFrameHidden::Yes), + Either(IsCCPromotable))); +// For all dynamic cases, we shouldn't use an overlay if the compositor won't +// promote it. For L1, it will fail either way until the CC supports "must +// promote" overlays, so we ignore those cases. Non-dynamic is excluded, since +// we don't get (or use) compositor feedback before the first frame. At that +// point, we've already chosen the output surface and can't switch it. +INSTANTIATE_TEST_CASE_P(NotCCPromotableNotSecureUsesSurfaceTexture, + AndroidVideoSurfaceChooserImplTest, + Combine(Values(ShouldUseOverlay::No), + Values(AllowDynamic::Yes), + Either(IsFullscreen), + Values(IsSecure::No), + Values(IsFrameHidden::No), + Values(IsCCPromotable::No))); } // namespace media
diff --git a/media/gpu/avda_codec_image.cc b/media/gpu/avda_codec_image.cc index d8688d2..00db66b 100644 --- a/media/gpu/avda_codec_image.cc +++ b/media/gpu/avda_codec_image.cc
@@ -232,6 +232,17 @@ YInvertMatrix(matrix); } +void AVDACodecImage::NotifyPromotionHint(bool promotion_hint, + int display_x, + int display_y) { + // TODO(liberato): this should just be given to us. + PromotionHintAggregator::Hint hint; + hint.x = display_x; + hint.y = display_y; + hint.is_promotable = promotion_hint; + shared_state_->GetPromotionHintCB().Run(hint); +} + bool AVDACodecImage::IsCodecBufferOutstanding() const { static_assert(kUpdateOnly < 0 && kUpdateOnly > kRendered && kRendered > kInvalidCodecBufferIndex,
diff --git a/media/gpu/avda_codec_image.h b/media/gpu/avda_codec_image.h index 4b0bd9c..c8c8c26 100644 --- a/media/gpu/avda_codec_image.h +++ b/media/gpu/avda_codec_image.h
@@ -48,6 +48,9 @@ const std::string& dump_name) override; // gpu::gles2::GLStreamTextureMatrix implementation void GetTextureMatrix(float xform[16]) override; + void NotifyPromotionHint(bool promotion_hint, + int display_x, + int display_y) override; enum class UpdateMode { // Discards the codec buffer, no UpdateTexImage().
diff --git a/media/gpu/avda_picture_buffer_manager.cc b/media/gpu/avda_picture_buffer_manager.cc index 330e309..1442d3e 100644 --- a/media/gpu/avda_picture_buffer_manager.cc +++ b/media/gpu/avda_picture_buffer_manager.cc
@@ -66,6 +66,7 @@ // Only do this once the surface texture is filled in, since the constructor // assumes that it will be. shared_state_ = new AVDASharedState(surface_bundle); + shared_state_->SetPromotionHintCB(state_provider_->GetPromotionHintCB()); return true; }
diff --git a/media/gpu/avda_shared_state.cc b/media/gpu/avda_shared_state.cc index 3dd8cec..57330b1 100644 --- a/media/gpu/avda_shared_state.cc +++ b/media/gpu/avda_shared_state.cc
@@ -66,4 +66,14 @@ surface_bundle_ = nullptr; } +void AVDASharedState::SetPromotionHintCB( + PromotionHintAggregator::NotifyPromotionHintCB cb) { + promotion_hint_cb_ = cb; +} + +const PromotionHintAggregator::NotifyPromotionHintCB& +AVDASharedState::GetPromotionHintCB() { + return promotion_hint_cb_; +} + } // namespace media
diff --git a/media/gpu/avda_shared_state.h b/media/gpu/avda_shared_state.h index aa4bfd3..e41d40a4 100644 --- a/media/gpu/avda_shared_state.h +++ b/media/gpu/avda_shared_state.h
@@ -10,6 +10,7 @@ #include "gpu/command_buffer/service/gles2_cmd_decoder.h" #include "media/base/android/android_overlay.h" #include "media/base/android/media_codec_bridge.h" +#include "media/gpu/android/promotion_hint_aggregator.h" #include "media/gpu/avda_shared_state.h" #include "media/gpu/avda_surface_bundle.h" #include "ui/gl/gl_bindings.h" @@ -86,6 +87,9 @@ void ClearOverlay(AndroidOverlay* overlay); + void SetPromotionHintCB(PromotionHintAggregator::NotifyPromotionHintCB cb); + const PromotionHintAggregator::NotifyPromotionHintCB& GetPromotionHintCB(); + protected: virtual ~AVDASharedState(); @@ -97,6 +101,8 @@ scoped_refptr<AVDASurfaceBundle> surface_bundle_; + PromotionHintAggregator::NotifyPromotionHintCB promotion_hint_cb_; + base::WeakPtrFactory<AVDASharedState> weak_this_factory_; DISALLOW_COPY_AND_ASSIGN(AVDASharedState);
diff --git a/media/gpu/avda_state_provider.h b/media/gpu/avda_state_provider.h index 819992d..c1c0161 100644 --- a/media/gpu/avda_state_provider.h +++ b/media/gpu/avda_state_provider.h
@@ -8,6 +8,7 @@ #include "base/compiler_specific.h" #include "base/threading/thread_checker.h" #include "gpu/command_buffer/service/texture_manager.h" +#include "media/gpu/android/promotion_hint_aggregator.h" #include "media/video/video_decode_accelerator.h" namespace gpu { @@ -30,6 +31,10 @@ // error state. virtual void NotifyError(VideoDecodeAccelerator::Error error) = 0; + // Return a callback that may be used to signal promotion hint info. + virtual PromotionHintAggregator::NotifyPromotionHintCB + GetPromotionHintCB() = 0; + protected: ~AVDAStateProvider() = default; };
diff --git a/mojo/public/cpp/bindings/lib/array_serialization.h b/mojo/public/cpp/bindings/lib/array_serialization.h index d2f8ecfd72..044b9d0 100644 --- a/mojo/public/cpp/bindings/lib/array_serialization.h +++ b/mojo/public/cpp/bindings/lib/array_serialization.h
@@ -278,8 +278,7 @@ BelongsTo<typename MojomType::Element, MojomTypeCategory::ASSOCIATED_INTERFACE | MojomTypeCategory::ASSOCIATED_INTERFACE_REQUEST | - MojomTypeCategory::HANDLE | - MojomTypeCategory::INTERFACE | + MojomTypeCategory::HANDLE | MojomTypeCategory::INTERFACE | MojomTypeCategory::INTERFACE_REQUEST>::value>::type> { using UserType = typename std::remove_const<MaybeConstUserType>::type; using Data = typename MojomTypeTraits<MojomType>::Data; @@ -289,14 +288,10 @@ static size_t GetSerializedSize(UserTypeIterator* input, SerializationContext* context) { size_t element_count = input->GetSize(); - if (BelongsTo<Element, - MojomTypeCategory::ASSOCIATED_INTERFACE | - MojomTypeCategory::ASSOCIATED_INTERFACE_REQUEST>::value) { - for (size_t i = 0; i < element_count; ++i) { - typename UserTypeIterator::GetNextResult next = input->GetNext(); - size_t size = PrepareToSerialize<Element>(next, context); - DCHECK_EQ(size, 0u); - } + for (size_t i = 0; i < element_count; ++i) { + typename UserTypeIterator::GetNextResult next = input->GetNext(); + size_t size = PrepareToSerialize<Element>(next, context); + DCHECK_EQ(size, 0u); } return sizeof(Data) + Align(element_count * sizeof(typename Data::Element)); } @@ -509,7 +504,9 @@ static size_t PrepareToSerialize(MaybeConstUserType& input, SerializationContext* context) { - if (CallIsNullIfExists<Traits>(input)) + const bool is_null = CallIsNullIfExists<Traits>(input); + context->null_states.container().push_back(is_null); + if (is_null) return 0; ArrayIterator<Traits, MaybeConstUserType> iterator(input); return Impl::GetSerializedSize(&iterator, context); @@ -520,7 +517,7 @@ Data** output, const ContainerValidateParams* validate_params, SerializationContext* context) { - if (!CallIsNullIfExists<Traits>(input)) { + if (!context->IsNextFieldNull()) { MOJO_INTERNAL_DLOG_SERIALIZATION_WARNING( validate_params->expected_num_elements != 0 && Traits::GetSize(input) != validate_params->expected_num_elements,
diff --git a/mojo/public/cpp/bindings/lib/handle_interface_serialization.h b/mojo/public/cpp/bindings/lib/handle_interface_serialization.h index 1641d55..cfc2fd9f 100644 --- a/mojo/public/cpp/bindings/lib/handle_interface_serialization.h +++ b/mojo/public/cpp/bindings/lib/handle_interface_serialization.h
@@ -108,18 +108,18 @@ struct Serializer<InterfacePtrDataView<Base>, InterfacePtr<T>> { static_assert(std::is_base_of<Base, T>::value, "Interface type mismatch."); - static size_t PrepareToSerialize(const InterfacePtr<T>& input, + static size_t PrepareToSerialize(InterfacePtr<T>& input, SerializationContext* context) { + InterfacePtrInfo<T> info = input.PassInterface(); + context->handles.AddInterfaceInfo(info.PassHandle(), info.version()); return 0; } - static void Serialize(InterfacePtr<T>& input, + static void Serialize(const InterfacePtr<T>& input, Interface_Data* output, SerializationContext* context) { - InterfacePtrInfo<T> info = input.PassInterface(); - output->handle = - context->handles.AddHandle(ScopedHandle::From(info.PassHandle())); - output->version = info.version(); + DCHECK(!input.is_bound()); + context->handles.ConsumeNextSerializedInterfaceInfo(output); } static bool Deserialize(Interface_Data* input, @@ -136,16 +136,17 @@ struct Serializer<InterfaceRequestDataView<Base>, InterfaceRequest<T>> { static_assert(std::is_base_of<Base, T>::value, "Interface type mismatch."); - static size_t PrepareToSerialize(const InterfaceRequest<T>& input, + static size_t PrepareToSerialize(InterfaceRequest<T>& input, SerializationContext* context) { + context->handles.AddHandle(ScopedHandle::From(input.PassMessagePipe())); return 0; } - static void Serialize(InterfaceRequest<T>& input, + static void Serialize(const InterfaceRequest<T>& input, Handle_Data* output, SerializationContext* context) { - *output = - context->handles.AddHandle(ScopedHandle::From(input.PassMessagePipe())); + DCHECK(!input.is_pending()); + context->handles.ConsumeNextSerializedHandle(output); } static bool Deserialize(Handle_Data* input, @@ -159,15 +160,17 @@ template <typename T> struct Serializer<ScopedHandleBase<T>, ScopedHandleBase<T>> { - static size_t PrepareToSerialize(const ScopedHandleBase<T>& input, + static size_t PrepareToSerialize(ScopedHandleBase<T>& input, SerializationContext* context) { + context->handles.AddHandle(ScopedHandle::From(std::move(input))); return 0; } - static void Serialize(ScopedHandleBase<T>& input, + static void Serialize(const ScopedHandleBase<T>& input, Handle_Data* output, SerializationContext* context) { - *output = context->handles.AddHandle(ScopedHandle::From(std::move(input))); + DCHECK(!input.is_valid()); + context->handles.ConsumeNextSerializedHandle(output); } static bool Deserialize(Handle_Data* input,
diff --git a/mojo/public/cpp/bindings/lib/map_serialization.h b/mojo/public/cpp/bindings/lib/map_serialization.h index 718a763..08287608 100644 --- a/mojo/public/cpp/bindings/lib/map_serialization.h +++ b/mojo/public/cpp/bindings/lib/map_serialization.h
@@ -97,7 +97,9 @@ static size_t PrepareToSerialize(MaybeConstUserType& input, SerializationContext* context) { - if (CallIsNullIfExists<Traits>(input)) + const bool is_null = CallIsNullIfExists<Traits>(input); + context->null_states.container().push_back(is_null); + if (is_null) return 0; size_t struct_overhead = sizeof(Data); @@ -118,7 +120,7 @@ SerializationContext* context) { DCHECK(validate_params->key_validate_params); DCHECK(validate_params->element_validate_params); - if (CallIsNullIfExists<Traits>(input)) { + if (context->IsNextFieldNull()) { *output = nullptr; return; }
diff --git a/mojo/public/cpp/bindings/lib/message.cc b/mojo/public/cpp/bindings/lib/message.cc index c543994..6658e60 100644 --- a/mojo/public/cpp/bindings/lib/message.cc +++ b/mojo/public/cpp/bindings/lib/message.cc
@@ -181,9 +181,10 @@ Message::Message(uint32_t name, uint32_t flags, size_t payload_size, - size_t payload_interface_id_count) { + size_t payload_interface_id_count, + std::vector<ScopedHandle>* handles) { CreateSerializedMessageObject(name, flags, payload_size, - payload_interface_id_count, nullptr, &handle_, + payload_interface_id_count, handles, &handle_, &payload_buffer_); data_ = payload_buffer_.data(); data_size_ = payload_buffer_.size(); @@ -274,45 +275,6 @@ return array_pointer ? array_pointer->storage() : nullptr; } -void Message::AttachHandles(std::vector<ScopedHandle>* handles) { - DCHECK(handles); - if (handles->empty()) - return; - - // Sanity-check the current serialized message state. We must have a valid - // message handle and it must have no serialized handles. - DCHECK(handle_.is_valid()); - DCHECK(payload_buffer_.is_valid()); - void* buffer; - uint32_t num_bytes; - uint32_t num_handles = 0; - MojoResult rv = MojoGetSerializedMessageContents( - handle_->value(), &buffer, &num_bytes, nullptr, &num_handles, - MOJO_GET_SERIALIZED_MESSAGE_CONTENTS_FLAG_NONE); - DCHECK_EQ(MOJO_RESULT_OK, rv); - - MessageInfo new_info(data_size_, handles); - ScopedMessageHandle new_handle; - rv = mojo::CreateMessage(reinterpret_cast<uintptr_t>(&new_info), - &kMessageInfoThunks, &new_handle); - DCHECK_EQ(MOJO_RESULT_OK, rv); - DCHECK(new_handle.is_valid()); - - rv = MojoSerializeMessage(new_handle->value()); - DCHECK_EQ(MOJO_RESULT_OK, rv); - DCHECK(new_info.payload_buffer.is_valid()); - - // Copy the existing payload into the new message. - void* storage = new_info.payload_buffer.Allocate(payload_buffer_.cursor()); - memcpy(storage, data_, data_size_); - - handle_ = std::move(new_handle); - payload_buffer_ = std::move(new_info.payload_buffer); - data_ = payload_buffer_.data(); - data_size_ = payload_buffer_.size(); - transferable_ = true; -} - ScopedMessageHandle Message::TakeMojoMessage() { // If there are associated endpoints transferred, // SerializeAssociatedEndpointHandles() must be called before this method.
diff --git a/mojo/public/cpp/bindings/lib/serialization_context.cc b/mojo/public/cpp/bindings/lib/serialization_context.cc index 8e4d86b..5748d10 100644 --- a/mojo/public/cpp/bindings/lib/serialization_context.cc +++ b/mojo/public/cpp/bindings/lib/serialization_context.cc
@@ -17,7 +17,7 @@ SerializedHandleVector::~SerializedHandleVector() = default; -Handle_Data SerializedHandleVector::AddHandle(mojo::ScopedHandle handle) { +void SerializedHandleVector::AddHandle(mojo::ScopedHandle handle) { Handle_Data data; if (!handle.is_valid()) { data.value = kEncodedInvalidHandleValue; @@ -26,7 +26,29 @@ data.value = static_cast<uint32_t>(handles_.size()); handles_.emplace_back(std::move(handle)); } - return data; + serialized_handles_.emplace_back(data); +} + +void SerializedHandleVector::AddInterfaceInfo( + mojo::ScopedMessagePipeHandle handle, + uint32_t version) { + AddHandle(ScopedHandle::From(std::move(handle))); + serialized_interface_versions_.emplace_back(version); +} + +void SerializedHandleVector::ConsumeNextSerializedHandle( + Handle_Data* out_data) { + DCHECK_LT(next_serialized_handle_index_, serialized_handles_.size()); + *out_data = serialized_handles_[next_serialized_handle_index_++]; +} + +void SerializedHandleVector::ConsumeNextSerializedInterfaceInfo( + Interface_Data* out_data) { + ConsumeNextSerializedHandle(&out_data->handle); + DCHECK_LT(next_serialized_version_index_, + serialized_interface_versions_.size()); + out_data->version = + serialized_interface_versions_[next_serialized_version_index_++]; } mojo::ScopedHandle SerializedHandleVector::TakeHandle( @@ -50,7 +72,6 @@ void SerializationContext::AttachHandlesToMessage(Message* message) { associated_endpoint_handles.swap( *message->mutable_associated_endpoint_handles()); - message->AttachHandles(handles.mutable_handles()); } } // namespace internal
diff --git a/mojo/public/cpp/bindings/lib/serialization_context.h b/mojo/public/cpp/bindings/lib/serialization_context.h index 6a6e5142..bc35504 100644 --- a/mojo/public/cpp/bindings/lib/serialization_context.h +++ b/mojo/public/cpp/bindings/lib/serialization_context.h
@@ -11,6 +11,7 @@ #include <queue> #include <vector> +#include "base/containers/stack_container.h" #include "base/macros.h" #include "mojo/public/cpp/bindings/bindings_export.h" #include "mojo/public/cpp/bindings/lib/bindings_internal.h" @@ -31,9 +32,22 @@ size_t size() const { return handles_.size(); } std::vector<mojo::ScopedHandle>* mutable_handles() { return &handles_; } + std::vector<Handle_Data>* serialized_handles() { + return &serialized_handles_; + } - // Adds a handle to the handle list and returns its index for encoding. - Handle_Data AddHandle(mojo::ScopedHandle handle); + // Adds a handle to the handle and serialized handle data lists. + void AddHandle(mojo::ScopedHandle handle); + + // Adds an interface info to the handle and serialized handle+version data + // lists. + void AddInterfaceInfo(mojo::ScopedMessagePipeHandle handle, uint32_t version); + + // Consumes the next available serialized handle data. + void ConsumeNextSerializedHandle(Handle_Data* out_data); + + // Consumes the next available serialized handle and version data. + void ConsumeNextSerializedInterfaceInfo(Interface_Data* out_data); // Takes a handle from the list of serialized handle data. mojo::ScopedHandle TakeHandle(const Handle_Data& encoded_handle); @@ -52,6 +66,14 @@ // Handles are owned by this object. std::vector<mojo::ScopedHandle> handles_; + // Serialized handle and (optional) version data. This is accumulated during + // pre-serialization by AddHandle and AddInterfaceInfo calls, and later + // consumed during serialization by ConsumeNextSerializedHandle/InterfaceInfo. + size_t next_serialized_handle_index_ = 0; + std::vector<Handle_Data> serialized_handles_; + size_t next_serialized_version_index_ = 0; + std::vector<uint32_t> serialized_interface_versions_; + DISALLOW_COPY_AND_ASSIGN(SerializedHandleVector); }; @@ -61,13 +83,23 @@ ~SerializationContext(); - // Transfers ownership of any accumulated handles and associated endpoint - // handles into |*message|. + bool IsNextFieldNull() { + DCHECK_LT(null_state_index, null_states.container().size()); + return null_states.container()[null_state_index++]; + } + + // Transfers ownership of any accumulated associated endpoint handles into + // |*message|. void AttachHandlesToMessage(Message* message); // Opaque context pointers returned by StringTraits::SetUpContext(). std::unique_ptr<std::queue<void*>> custom_contexts; + // A container for tracking the null-ness of every nullable field as a + // message's arguments are walked during serialization. + base::StackVector<bool, 32> null_states; + size_t null_state_index = 0; + // Stashes handles encoded in a message by index. SerializedHandleVector handles;
diff --git a/mojo/public/cpp/bindings/lib/string_serialization.h b/mojo/public/cpp/bindings/lib/string_serialization.h index 6e0c758..68165dd 100644 --- a/mojo/public/cpp/bindings/lib/string_serialization.h +++ b/mojo/public/cpp/bindings/lib/string_serialization.h
@@ -24,7 +24,9 @@ static size_t PrepareToSerialize(MaybeConstUserType& input, SerializationContext* context) { - if (CallIsNullIfExists<Traits>(input)) + const bool is_null = CallIsNullIfExists<Traits>(input); + context->null_states.container().push_back(is_null); + if (is_null) return 0; void* custom_context = CustomContextHelper<Traits>::SetUp(input, context); @@ -36,7 +38,7 @@ Buffer* buffer, String_Data** output, SerializationContext* context) { - if (CallIsNullIfExists<Traits>(input)) { + if (context->IsNextFieldNull()) { *output = nullptr; return; }
diff --git a/mojo/public/cpp/bindings/message.h b/mojo/public/cpp/bindings/message.h index 9fabda4..cfd4664 100644 --- a/mojo/public/cpp/bindings/message.h +++ b/mojo/public/cpp/bindings/message.h
@@ -45,13 +45,13 @@ // This message is fully functional and may be exchanged for a // ScopedMessageHandle for transit over a message pipe. See TakeMojoMessage(). // - // If |handles| are not known at Message construction time, they may be - // attached later by calling |AttachHandles()|. See the note on that method - // regarding performance considerations. + // If |handles| is non-null, any handles in |*handles| are attached to the + // newly constructed message. Message(uint32_t name, uint32_t flags, size_t payload_size, - size_t payload_interface_id_count); + size_t payload_interface_id_count, + std::vector<ScopedHandle>* handles = nullptr); // Constructs a new serialized Message object from an existing // ScopedMessageHandle; e.g., one read from a message pipe. @@ -148,11 +148,6 @@ return &associated_endpoint_handles_; } - // Attaches handles to this Message. Note that this requires the underlying - // message object to be reallocated and the payload to be copied into a new - // buffer. Takes ownership of the contents of |*handles|. - void AttachHandles(std::vector<ScopedHandle>* handles); - // Takes a scoped MessageHandle which may be passed to |WriteMessageNew()| for // transmission. Note that this invalidates this Message object, taking // ownership of its internal storage and any attached handles.
diff --git a/mojo/public/cpp/bindings/sync_call_restrictions.h b/mojo/public/cpp/bindings/sync_call_restrictions.h index a0c7b4f..99e13a4 100644 --- a/mojo/public/cpp/bindings/sync_call_restrictions.h +++ b/mojo/public/cpp/bindings/sync_call_restrictions.h
@@ -15,6 +15,8 @@ #define ENABLE_SYNC_CALL_RESTRICTIONS 0 #endif +class ChromeSelectFileDialogFactory; + namespace sync_preferences { class PrefServiceSyncable; } @@ -79,7 +81,8 @@ friend class prefs::PersistentPrefStoreClient; // Incognito pref service instances are created synchronously. friend class sync_preferences::PrefServiceSyncable; - + // For file open and save dialogs created synchronously. + friend class ::ChromeSelectFileDialogFactory; // END ALLOWED USAGE. // BEGIN USAGE THAT NEEDS TO BE FIXED.
diff --git a/mojo/public/cpp/bindings/tests/connector_unittest.cc b/mojo/public/cpp/bindings/tests/connector_unittest.cc index 3f5b8f44..a163458d 100644 --- a/mojo/public/cpp/bindings/tests/connector_unittest.cc +++ b/mojo/public/cpp/bindings/tests/connector_unittest.cc
@@ -91,9 +91,7 @@ public: ConnectorTest() {} - void SetUp() override { - CreateMessagePipe(nullptr, &handle0_, &handle1_); - } + void SetUp() override { CreateMessagePipe(nullptr, &handle0_, &handle1_); } void TearDown() override {} @@ -101,9 +99,8 @@ const char* text, std::vector<ScopedHandle> handles = std::vector<ScopedHandle>()) { const size_t size = strlen(text) + 1; // Plus null terminator. - Message message(1, 0, size, 0); + Message message(1, 0, size, 0, &handles); memcpy(message.payload_buffer()->Allocate(size), text, size); - message.AttachHandles(&handles); return message; } @@ -418,16 +415,14 @@ Connector connector0(std::move(handle0_), Connector::SINGLE_THREADED_SEND, base::ThreadTaskRunnerHandle::Get()); bool error_handler_called0 = false; - connector0.set_connection_error_handler( - base::Bind(&ForwardErrorHandler, &error_handler_called0, - run_loop.QuitClosure())); + connector0.set_connection_error_handler(base::Bind( + &ForwardErrorHandler, &error_handler_called0, run_loop.QuitClosure())); Connector connector1(std::move(handle1_), Connector::SINGLE_THREADED_SEND, base::ThreadTaskRunnerHandle::Get()); bool error_handler_called1 = false; - connector1.set_connection_error_handler( - base::Bind(&ForwardErrorHandler, &error_handler_called1, - run_loop2.QuitClosure())); + connector1.set_connection_error_handler(base::Bind( + &ForwardErrorHandler, &error_handler_called1, run_loop2.QuitClosure())); const char kText[] = "hello world"; Message message = CreateMessage(kText); @@ -489,9 +484,8 @@ base::RunLoop run_loop; // Configure the accumulator such that it pauses after the first message is // received. - MessageAccumulator accumulator( - base::Bind(&PauseConnectorAndRunClosure, &connector1, - run_loop.QuitClosure())); + MessageAccumulator accumulator(base::Bind( + &PauseConnectorAndRunClosure, &connector1, run_loop.QuitClosure())); connector1.set_incoming_receiver(&accumulator); run_loop.Run();
diff --git a/mojo/public/cpp/bindings/tests/struct_unittest.cc b/mojo/public/cpp/bindings/tests/struct_unittest.cc index a687052..fa9b370 100644 --- a/mojo/public/cpp/bindings/tests/struct_unittest.cc +++ b/mojo/public/cpp/bindings/tests/struct_unittest.cc
@@ -124,15 +124,17 @@ TEST_F(StructTest, Serialization_Basic) { RectPtr rect(MakeRect()); - size_t size = mojo::internal::PrepareToSerialize<RectDataView>(rect, nullptr); + mojo::internal::SerializationContext context; + size_t size = + mojo::internal::PrepareToSerialize<RectDataView>(rect, &context); EXPECT_EQ(8U + 16U, size); mojo::internal::FixedBufferForTesting buf(size); internal::Rect_Data* data; - mojo::internal::Serialize<RectDataView>(rect, &buf, &data, nullptr); + mojo::internal::Serialize<RectDataView>(rect, &buf, &data, &context); RectPtr rect2; - mojo::internal::Deserialize<RectDataView>(data, &rect2, nullptr); + mojo::internal::Deserialize<RectDataView>(data, &rect2, &context); CheckRect(*rect2); } @@ -155,16 +157,17 @@ TEST_F(StructTest, Serialization_StructPointers) { RectPairPtr pair(RectPair::New(MakeRect(), MakeRect())); + mojo::internal::SerializationContext context; size_t size = - mojo::internal::PrepareToSerialize<RectPairDataView>(pair, nullptr); + mojo::internal::PrepareToSerialize<RectPairDataView>(pair, &context); EXPECT_EQ(8U + 16U + 2 * (8U + 16U), size); mojo::internal::FixedBufferForTesting buf(size); internal::RectPair_Data* data; - mojo::internal::Serialize<RectPairDataView>(pair, &buf, &data, nullptr); + mojo::internal::Serialize<RectPairDataView>(pair, &buf, &data, &context); RectPairPtr pair2; - mojo::internal::Deserialize<RectPairDataView>(data, &pair2, nullptr); + mojo::internal::Deserialize<RectPairDataView>(data, &pair2, &context); CheckRect(*pair2->first); CheckRect(*pair2->second); @@ -179,8 +182,9 @@ NamedRegionPtr region( NamedRegion::New(std::string("region"), std::move(rects))); + mojo::internal::SerializationContext context; size_t size = - mojo::internal::PrepareToSerialize<NamedRegionDataView>(region, nullptr); + mojo::internal::PrepareToSerialize<NamedRegionDataView>(region, &context); EXPECT_EQ(8U + // header 8U + // name pointer 8U + // rects pointer @@ -194,10 +198,10 @@ mojo::internal::FixedBufferForTesting buf(size); internal::NamedRegion_Data* data; - mojo::internal::Serialize<NamedRegionDataView>(region, &buf, &data, nullptr); + mojo::internal::Serialize<NamedRegionDataView>(region, &buf, &data, &context); NamedRegionPtr region2; - mojo::internal::Deserialize<NamedRegionDataView>(data, ®ion2, nullptr); + mojo::internal::Deserialize<NamedRegionDataView>(data, ®ion2, &context); EXPECT_EQ("region", *region2->name); @@ -212,8 +216,9 @@ EXPECT_FALSE(region->name); EXPECT_FALSE(region->rects); + mojo::internal::SerializationContext context; size_t size = - mojo::internal::PrepareToSerialize<NamedRegionDataView>(region, nullptr); + mojo::internal::PrepareToSerialize<NamedRegionDataView>(region, &context); EXPECT_EQ(8U + // header 8U + // name pointer 8U, // rects pointer @@ -221,10 +226,10 @@ mojo::internal::FixedBufferForTesting buf(size); internal::NamedRegion_Data* data; - mojo::internal::Serialize<NamedRegionDataView>(region, &buf, &data, nullptr); + mojo::internal::Serialize<NamedRegionDataView>(region, &buf, &data, &context); NamedRegionPtr region2; - mojo::internal::Deserialize<NamedRegionDataView>(data, ®ion2, nullptr); + mojo::internal::Deserialize<NamedRegionDataView>(data, ®ion2, &context); EXPECT_FALSE(region2->name); EXPECT_FALSE(region2->rects); @@ -364,40 +369,42 @@ { // Serialization of a null native struct. NativeStructPtr native; + mojo::internal::SerializationContext context; size_t size = mojo::internal::PrepareToSerialize<NativeStructDataView>( - native, nullptr); + native, &context); EXPECT_EQ(0u, size); mojo::internal::FixedBufferForTesting buf(size); Data* data = nullptr; mojo::internal::Serialize<NativeStructDataView>(std::move(native), &buf, - &data, nullptr); + &data, &context); EXPECT_EQ(nullptr, data); NativeStructPtr output_native; mojo::internal::Deserialize<NativeStructDataView>(data, &output_native, - nullptr); + &context); EXPECT_TRUE(output_native.is_null()); } { // Serialization of a native struct with null data. NativeStructPtr native(NativeStruct::New()); + mojo::internal::SerializationContext context; size_t size = mojo::internal::PrepareToSerialize<NativeStructDataView>( - native, nullptr); + native, &context); EXPECT_EQ(0u, size); mojo::internal::FixedBufferForTesting buf(size); Data* data = nullptr; mojo::internal::Serialize<NativeStructDataView>(std::move(native), &buf, - &data, nullptr); + &data, &context); EXPECT_EQ(nullptr, data); NativeStructPtr output_native; mojo::internal::Deserialize<NativeStructDataView>(data, &output_native, - nullptr); + &context); EXPECT_TRUE(output_native.is_null()); } @@ -405,20 +412,21 @@ NativeStructPtr native(NativeStruct::New()); native->data = std::vector<uint8_t>{'X', 'Y'}; + mojo::internal::SerializationContext context; size_t size = mojo::internal::PrepareToSerialize<NativeStructDataView>( - native, nullptr); + native, &context); EXPECT_EQ(16u, size); mojo::internal::FixedBufferForTesting buf(size); Data* data = nullptr; mojo::internal::Serialize<NativeStructDataView>(std::move(native), &buf, - &data, nullptr); + &data, &context); EXPECT_NE(nullptr, data); NativeStructPtr output_native; mojo::internal::Deserialize<NativeStructDataView>(data, &output_native, - nullptr); + &context); ASSERT_TRUE(output_native); ASSERT_FALSE(output_native->data->empty()); EXPECT_EQ(2u, output_native->data->size());
diff --git a/mojo/public/cpp/bindings/tests/union_unittest.cc b/mojo/public/cpp/bindings/tests/union_unittest.cc index 159192f..92e25828 100644 --- a/mojo/public/cpp/bindings/tests/union_unittest.cc +++ b/mojo/public/cpp/bindings/tests/union_unittest.cc
@@ -205,14 +205,15 @@ TEST(UnionTest, EnumSerialization) { PodUnionPtr pod1(PodUnion::NewFEnum(AnEnum::SECOND)); + mojo::internal::SerializationContext context; size_t size = mojo::internal::PrepareToSerialize<PodUnionDataView>( - pod1, false, nullptr); + pod1, false, &context); EXPECT_EQ(16U, size); mojo::internal::FixedBufferForTesting buf(size); internal::PodUnion_Data* data = nullptr; mojo::internal::Serialize<PodUnionDataView>(pod1, &buf, &data, false, - nullptr); + &context); PodUnionPtr pod2; mojo::internal::Deserialize<PodUnionDataView>(data, &pod2, nullptr); @@ -226,13 +227,15 @@ PodUnionPtr pod(PodUnion::New()); pod->set_f_int8(10); - size_t size = - mojo::internal::PrepareToSerialize<PodUnionDataView>(pod, false, nullptr); + mojo::internal::SerializationContext context; + size_t size = mojo::internal::PrepareToSerialize<PodUnionDataView>(pod, false, + &context); EXPECT_EQ(16U, size); mojo::internal::FixedBufferForTesting buf(size); internal::PodUnion_Data* data = nullptr; - mojo::internal::Serialize<PodUnionDataView>(pod, &buf, &data, false, nullptr); + mojo::internal::Serialize<PodUnionDataView>(pod, &buf, &data, false, + &context); void* raw_buf = buf.Leak(); mojo::internal::ValidationContext validation_context( @@ -245,18 +248,21 @@ TEST(UnionTest, SerializeNotNull) { PodUnionPtr pod(PodUnion::New()); pod->set_f_int8(0); - size_t size = - mojo::internal::PrepareToSerialize<PodUnionDataView>(pod, false, nullptr); + mojo::internal::SerializationContext context; + size_t size = mojo::internal::PrepareToSerialize<PodUnionDataView>(pod, false, + &context); mojo::internal::FixedBufferForTesting buf(size); internal::PodUnion_Data* data = nullptr; - mojo::internal::Serialize<PodUnionDataView>(pod, &buf, &data, false, nullptr); + mojo::internal::Serialize<PodUnionDataView>(pod, &buf, &data, false, + &context); EXPECT_FALSE(data->is_null()); } TEST(UnionTest, SerializeIsNullInlined) { PodUnionPtr pod; - size_t size = - mojo::internal::PrepareToSerialize<PodUnionDataView>(pod, false, nullptr); + mojo::internal::SerializationContext context; + size_t size = mojo::internal::PrepareToSerialize<PodUnionDataView>(pod, false, + &context); EXPECT_EQ(16U, size); mojo::internal::FixedBufferForTesting buf(size); internal::PodUnion_Data* data = internal::PodUnion_Data::New(&buf); @@ -266,7 +272,7 @@ data->tag = PodUnion::Tag::F_UINT16; data->data.f_f_int16 = 20; - mojo::internal::Serialize<PodUnionDataView>(pod, &buf, &data, true, nullptr); + mojo::internal::Serialize<PodUnionDataView>(pod, &buf, &data, true, &context); EXPECT_TRUE(data->is_null()); PodUnionPtr pod2; @@ -276,12 +282,14 @@ TEST(UnionTest, SerializeIsNullNotInlined) { PodUnionPtr pod; - size_t size = - mojo::internal::PrepareToSerialize<PodUnionDataView>(pod, false, nullptr); + mojo::internal::SerializationContext context; + size_t size = mojo::internal::PrepareToSerialize<PodUnionDataView>(pod, false, + &context); EXPECT_EQ(16U, size); mojo::internal::FixedBufferForTesting buf(size); internal::PodUnion_Data* data = nullptr; - mojo::internal::Serialize<PodUnionDataView>(pod, &buf, &data, false, nullptr); + mojo::internal::Serialize<PodUnionDataView>(pod, &buf, &data, false, + &context); EXPECT_EQ(nullptr, data); } @@ -336,13 +344,15 @@ TEST(UnionTest, UnknownEnumValueValidation) { PodUnionPtr pod(PodUnion::NewFEnum(static_cast<AnEnum>(0xFFFF))); - size_t size = - mojo::internal::PrepareToSerialize<PodUnionDataView>(pod, false, nullptr); + mojo::internal::SerializationContext context; + size_t size = mojo::internal::PrepareToSerialize<PodUnionDataView>(pod, false, + &context); EXPECT_EQ(16U, size); mojo::internal::FixedBufferForTesting buf(size); internal::PodUnion_Data* data = nullptr; - mojo::internal::Serialize<PodUnionDataView>(pod, &buf, &data, false, nullptr); + mojo::internal::Serialize<PodUnionDataView>(pod, &buf, &data, false, + &context); void* raw_buf = buf.Leak(); mojo::internal::ValidationContext validation_context( @@ -356,13 +366,15 @@ PodUnionPtr pod( PodUnion::NewFExtensibleEnum(static_cast<AnExtensibleEnum>(0xFFFF))); - size_t size = - mojo::internal::PrepareToSerialize<PodUnionDataView>(pod, false, nullptr); + mojo::internal::SerializationContext context; + size_t size = mojo::internal::PrepareToSerialize<PodUnionDataView>(pod, false, + &context); EXPECT_EQ(16U, size); mojo::internal::FixedBufferForTesting buf(size); internal::PodUnion_Data* data = nullptr; - mojo::internal::Serialize<PodUnionDataView>(pod, &buf, &data, false, nullptr); + mojo::internal::Serialize<PodUnionDataView>(pod, &buf, &data, false, + &context); void* raw_buf = buf.Leak(); mojo::internal::ValidationContext validation_context( @@ -415,12 +427,13 @@ std::string hello("hello world"); ObjectUnionPtr pod1(ObjectUnion::NewFString(hello)); + mojo::internal::SerializationContext context; size_t size = mojo::internal::PrepareToSerialize<ObjectUnionDataView>( - pod1, false, nullptr); + pod1, false, &context); mojo::internal::FixedBufferForTesting buf(size); internal::ObjectUnion_Data* data = nullptr; mojo::internal::Serialize<ObjectUnionDataView>(pod1, &buf, &data, false, - nullptr); + &context); ObjectUnionPtr pod2; mojo::internal::Deserialize<ObjectUnionDataView>(data, &pod2, nullptr); @@ -500,16 +513,17 @@ array[1]->set_f_int16(12); EXPECT_EQ(2U, array.size()); + mojo::internal::SerializationContext context; size_t size = mojo::internal::PrepareToSerialize<ArrayDataView<PodUnionDataView>>( - array, nullptr); + array, &context); EXPECT_EQ(40U, size); mojo::internal::FixedBufferForTesting buf(size); mojo::internal::Array_Data<internal::PodUnion_Data>* data; mojo::internal::ContainerValidateParams validate_params(0, false, nullptr); mojo::internal::Serialize<ArrayDataView<PodUnionDataView>>( - array, &buf, &data, &validate_params, nullptr); + array, &buf, &data, &validate_params, &context); std::vector<PodUnionPtr> array2; mojo::internal::Deserialize<ArrayDataView<PodUnionDataView>>(data, &array2, @@ -528,16 +542,17 @@ array[0]->set_f_int8(10); EXPECT_EQ(2U, array.size()); + mojo::internal::SerializationContext context; size_t size = mojo::internal::PrepareToSerialize<ArrayDataView<PodUnionDataView>>( - array, nullptr); + array, &context); EXPECT_EQ(40U, size); mojo::internal::FixedBufferForTesting buf(size); mojo::internal::Array_Data<internal::PodUnion_Data>* data; mojo::internal::ContainerValidateParams validate_params(0, true, nullptr); mojo::internal::Serialize<ArrayDataView<PodUnionDataView>>( - array, &buf, &data, &validate_params, nullptr); + array, &buf, &data, &validate_params, &context); std::vector<PodUnionPtr> array2; mojo::internal::Deserialize<ArrayDataView<PodUnionDataView>>(data, &array2, @@ -558,9 +573,10 @@ array[1]->set_f_string("world"); EXPECT_EQ(2U, array.size()); + mojo::internal::SerializationContext context; size_t size = mojo::internal::PrepareToSerialize<ArrayDataView<ObjectUnionDataView>>( - array, nullptr); + array, &context); EXPECT_EQ(72U, size); mojo::internal::FixedBufferForTesting buf(size); @@ -568,7 +584,7 @@ mojo::internal::Array_Data<internal::ObjectUnion_Data>* data; mojo::internal::ContainerValidateParams validate_params(0, false, nullptr); mojo::internal::Serialize<ArrayDataView<ObjectUnionDataView>>( - array, &buf, &data, &validate_params, nullptr); + array, &buf, &data, &validate_params, &context); std::vector<char> new_buf; new_buf.resize(size); @@ -635,13 +651,14 @@ std::string hello("hello world"); obj_struct->obj_union->set_f_string(hello); + mojo::internal::SerializationContext context; size_t size = mojo::internal::PrepareToSerialize<SmallObjStructDataView>( - obj_struct, nullptr); + obj_struct, &context); mojo::internal::FixedBufferForTesting buf(size); internal::SmallObjStruct_Data* data = nullptr; mojo::internal::Serialize<SmallObjStructDataView>(obj_struct, &buf, &data, - nullptr); + &context); SmallObjStructPtr deserialized; mojo::internal::Deserialize<SmallObjStructDataView>(data, &deserialized, @@ -702,9 +719,10 @@ SmallStructNonNullableUnionPtr small_struct( SmallStructNonNullableUnion::New()); + mojo::internal::SerializationContext context; size_t size = mojo::internal::PrepareToSerialize<SmallStructNonNullableUnionDataView>( - small_struct, nullptr); + small_struct, &context); mojo::internal::FixedBufferForTesting buf(size); internal::SmallStructNonNullableUnion_Data* data = @@ -829,14 +847,15 @@ ObjectUnionPtr obj(ObjectUnion::New()); obj->set_f_dummy(std::move(dummy)); + mojo::internal::SerializationContext context; size_t size = mojo::internal::PrepareToSerialize<ObjectUnionDataView>( - obj, false, nullptr); + obj, false, &context); EXPECT_EQ(32U, size); mojo::internal::FixedBufferForTesting buf(size); internal::ObjectUnion_Data* data = nullptr; mojo::internal::Serialize<ObjectUnionDataView>(obj, &buf, &data, false, - nullptr); + &context); ObjectUnionPtr obj2; mojo::internal::Deserialize<ObjectUnionDataView>(data, &obj2, nullptr); @@ -850,13 +869,14 @@ ObjectUnionPtr obj(ObjectUnion::New()); obj->set_f_dummy(std::move(dummy)); + mojo::internal::SerializationContext context; size_t size = mojo::internal::PrepareToSerialize<ObjectUnionDataView>( - obj, false, nullptr); + obj, false, &context); mojo::internal::FixedBufferForTesting buf(size); internal::ObjectUnion_Data* data = nullptr; mojo::internal::Serialize<ObjectUnionDataView>(obj, &buf, &data, false, - nullptr); + &context); void* raw_buf = buf.Leak(); mojo::internal::ValidationContext validation_context( @@ -874,13 +894,14 @@ ObjectUnionPtr obj(ObjectUnion::New()); obj->set_f_dummy(std::move(dummy)); + mojo::internal::SerializationContext context; size_t size = mojo::internal::PrepareToSerialize<ObjectUnionDataView>( - obj, false, nullptr); + obj, false, &context); mojo::internal::FixedBufferForTesting buf(size); internal::ObjectUnion_Data* data = nullptr; mojo::internal::Serialize<ObjectUnionDataView>(obj, &buf, &data, false, - nullptr); + &context); void* raw_buf = buf.Leak(); mojo::internal::ValidationContext validation_context( @@ -896,13 +917,14 @@ ObjectUnionPtr obj(ObjectUnion::New()); obj->set_f_nullable(std::move(dummy)); + mojo::internal::SerializationContext context; size_t size = mojo::internal::PrepareToSerialize<ObjectUnionDataView>( - obj, false, nullptr); + obj, false, &context); mojo::internal::FixedBufferForTesting buf(size); internal::ObjectUnion_Data* data = nullptr; mojo::internal::Serialize<ObjectUnionDataView>(obj, &buf, &data, false, - nullptr); + &context); void* raw_buf = buf.Leak(); mojo::internal::ValidationContext validation_context( @@ -932,14 +954,15 @@ ObjectUnionPtr obj(ObjectUnion::New()); obj->set_f_array_int8(std::move(array)); + mojo::internal::SerializationContext context; size_t size = mojo::internal::PrepareToSerialize<ObjectUnionDataView>( - obj, false, nullptr); + obj, false, &context); EXPECT_EQ(32U, size); mojo::internal::FixedBufferForTesting buf(size); internal::ObjectUnion_Data* data = nullptr; mojo::internal::Serialize<ObjectUnionDataView>(obj, &buf, &data, false, - nullptr); + &context); ObjectUnionPtr obj2; mojo::internal::Deserialize<ObjectUnionDataView>(data, &obj2, nullptr); @@ -956,12 +979,13 @@ ObjectUnionPtr obj(ObjectUnion::New()); obj->set_f_array_int8(std::move(array)); + mojo::internal::SerializationContext context; size_t size = mojo::internal::PrepareToSerialize<ObjectUnionDataView>( - obj, false, nullptr); + obj, false, &context); mojo::internal::FixedBufferForTesting buf(size); internal::ObjectUnion_Data* data = nullptr; mojo::internal::Serialize<ObjectUnionDataView>(obj, &buf, &data, false, - nullptr); + &context); void* raw_buf = buf.Leak(); mojo::internal::ValidationContext validation_context( @@ -1062,14 +1086,15 @@ ObjectUnionPtr obj(ObjectUnion::New()); obj->set_f_pod_union(std::move(pod)); + mojo::internal::SerializationContext context; size_t size = mojo::internal::PrepareToSerialize<ObjectUnionDataView>( - obj, false, nullptr); + obj, false, &context); EXPECT_EQ(32U, size); mojo::internal::FixedBufferForTesting buf(size); internal::ObjectUnion_Data* data = nullptr; mojo::internal::Serialize<ObjectUnionDataView>(obj, &buf, &data, false, - nullptr); + &context); ObjectUnionPtr obj2; mojo::internal::Deserialize<ObjectUnionDataView>(data, &obj2, nullptr); @@ -1083,14 +1108,15 @@ ObjectUnionPtr obj(ObjectUnion::New()); obj->set_f_pod_union(std::move(pod)); + mojo::internal::SerializationContext context; size_t size = mojo::internal::PrepareToSerialize<ObjectUnionDataView>( - obj, false, nullptr); + obj, false, &context); EXPECT_EQ(32U, size); mojo::internal::FixedBufferForTesting buf(size); internal::ObjectUnion_Data* data = nullptr; mojo::internal::Serialize<ObjectUnionDataView>(obj, &buf, &data, false, - nullptr); + &context); void* raw_buf = buf.Leak(); mojo::internal::ValidationContext validation_context( @@ -1108,13 +1134,14 @@ ObjectUnionPtr obj(ObjectUnion::New()); obj->set_f_pod_union(std::move(pod)); + mojo::internal::SerializationContext context; size_t size = mojo::internal::PrepareToSerialize<ObjectUnionDataView>( - obj, false, nullptr); + obj, false, &context); mojo::internal::FixedBufferForTesting buf(size); internal::ObjectUnion_Data* data = nullptr; mojo::internal::Serialize<ObjectUnionDataView>(obj, &buf, &data, false, - nullptr); + &context); void* raw_buf = buf.Leak(); mojo::internal::ValidationContext validation_context(
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl index fcf1596..bbc1777 100644 --- a/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl +++ b/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl
@@ -161,7 +161,8 @@ mojo::Message message( {{message_name}}, mojo::Message::kFlagIsSync | mojo::Message::kFlagExpectsResponse, - size, serialization_context.associated_endpoint_count); + size, serialization_context.associated_endpoint_count, + serialization_context.handles.mutable_handles()); {{build_message(params_struct, "param_%s", params_description, "&serialization_context", "&message")}} @@ -188,7 +189,8 @@ constexpr uint32_t kFlags = 0; {%- endif %} mojo::Message message({{message_name}}, kFlags, size, - serialization_context.associated_endpoint_count); + serialization_context.associated_endpoint_count, + serialization_context.handles.mutable_handles()); {{build_message(params_struct, "in_%s", params_description, "&serialization_context", "&message")}} @@ -270,7 +272,8 @@ uint32_t flags = (is_sync_ ? mojo::Message::kFlagIsSync : 0) | mojo::Message::kFlagIsResponse; mojo::Message message({{message_name}}, flags, size, - serialization_context.associated_endpoint_count); + serialization_context.associated_endpoint_count, + serialization_context.handles.mutable_handles()); {{build_message(response_params_struct, "in_%s", params_description, "&serialization_context", "&message")}} message.set_request_id(request_id_);
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl index bb5fb9c..3e43c88a 100644 --- a/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl +++ b/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl
@@ -20,7 +20,8 @@ input_may_be_temp=False) -%} size_t size = sizeof({{struct|get_qualified_name_for_kind(internal=True)}}); {%- for pf in struct.packed.packed_fields_in_ordinal_order - if pf.field.kind|is_object_kind or pf.field.kind|is_associated_kind %} + if pf.field.kind|is_object_kind or + pf.field.kind|is_any_handle_or_interface_kind %} {%- set name = pf.field.name -%} {%- set kind = pf.field.kind -%} {%- set original_input_field = input_field_pattern|format(name) %} @@ -73,7 +74,14 @@ {%- set input_field = "in_%s"|format(name) if input_may_be_temp else original_input_field %} {%- if input_may_be_temp %} +{%- if kind|is_associated_kind or kind|is_object_kind %} decltype({{original_input_field}}) in_{{name}} = {{original_input_field}}; +{%- else %} + // Dummy input value. The serialized value is already stored in the + // SerializationContext. + typename std::remove_reference<decltype({{original_input_field}})>::type + in_{{name}}; +{%- endif %} {%- endif %} {%- endif %}
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl index 835178bed..02af440 100644 --- a/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl +++ b/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl
@@ -11,7 +11,9 @@ static size_t PrepareToSerialize(MaybeConstUserType& input, SerializationContext* context) { - if (CallIsNullIfExists<Traits>(input)) + const bool is_null = CallIsNullIfExists<Traits>(input); + context->null_states.container().push_back(is_null); + if (is_null) return 0; void* custom_context = CustomContextHelper<Traits>::SetUp(input, context); @@ -27,7 +29,7 @@ Buffer* buffer, {{data_type}}** output, SerializationContext* context) { - if (CallIsNullIfExists<Traits>(input)) { + if (context->IsNextFieldNull()) { *output = nullptr; return; }
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_declaration.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_declaration.tmpl index b589ae91..cc513c3 100644 --- a/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_declaration.tmpl +++ b/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_declaration.tmpl
@@ -12,8 +12,9 @@ bool inlined, SerializationContext* context) { size_t size = inlined ? 0 : sizeof({{data_type}}); - - if (CallIsNullIfExists<Traits>(input)) + const bool is_null = CallIsNullIfExists<Traits>(input); + context->null_states.container().push_back(is_null); + if (is_null) return size; void* custom_context = CustomContextHelper<Traits>::SetUp(input, context); @@ -23,7 +24,8 @@ {%- for field in union.fields %} {%- set name = field.name %} case {{data_view}}::Tag::{{name|upper}}: { -{%- if field.kind|is_object_kind or field.kind|is_associated_kind %} +{%- if field.kind|is_object_kind or + field.kind|is_any_handle_or_interface_kind %} {%- set kind = field.kind %} {%- set serializer_type = kind|unmapped_type_for_serializer %} decltype(CallWithContext(Traits::{{name}}, input, custom_context)) @@ -49,7 +51,7 @@ {{data_type}}** output, bool inlined, SerializationContext* context) { - if (CallIsNullIfExists<Traits>(input)) { + if (context->IsNextFieldNull()) { if (inlined) (*output)->set_null(); else
diff --git a/remoting/host/it2me/it2me_native_messaging_host_unittest.cc b/remoting/host/it2me/it2me_native_messaging_host_unittest.cc index 962456c..30d6dbc8 100644 --- a/remoting/host/it2me/it2me_native_messaging_host_unittest.cc +++ b/remoting/host/it2me/it2me_native_messaging_host_unittest.cc
@@ -287,7 +287,7 @@ void It2MeNativeMessagingHostTest::SetPolicies( const base::DictionaryValue& dict) { - DCHECK(test_message_loop_->task_runner()->RunsTasksOnCurrentThread()); + DCHECK(test_message_loop_->task_runner()->RunsTasksInCurrentSequence()); // Copy |dict| into |policy_bundle|. policy::PolicyNamespace policy_namespace = policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME, std::string()); @@ -494,7 +494,7 @@ } void It2MeNativeMessagingHostTest::StartHost() { - DCHECK(host_task_runner_->RunsTasksOnCurrentThread()); + DCHECK(host_task_runner_->RunsTasksInCurrentSequence()); base::File input_read_file; base::File output_write_file; @@ -536,7 +536,7 @@ } void It2MeNativeMessagingHostTest::ExitTest() { - if (!test_message_loop_->task_runner()->RunsTasksOnCurrentThread()) { + if (!test_message_loop_->task_runner()->RunsTasksInCurrentSequence()) { test_message_loop_->task_runner()->PostTask( FROM_HERE, base::Bind(&It2MeNativeMessagingHostTest::ExitTest, @@ -547,7 +547,7 @@ } void It2MeNativeMessagingHostTest::ExitPolicyRunLoop() { - DCHECK(test_message_loop_->task_runner()->RunsTasksOnCurrentThread()); + DCHECK(test_message_loop_->task_runner()->RunsTasksInCurrentSequence()); if (policy_run_loop_) { policy_run_loop_->Quit(); }
diff --git a/remoting/host/native_messaging/native_messaging_reader.cc b/remoting/host/native_messaging/native_messaging_reader.cc index 112a5db..26940eb 100644 --- a/remoting/host/native_messaging/native_messaging_reader.cc +++ b/remoting/host/native_messaging/native_messaging_reader.cc
@@ -88,7 +88,7 @@ NativeMessagingReader::Core::~Core() {} void NativeMessagingReader::Core::ReadMessage() { - DCHECK(read_task_runner_->RunsTasksOnCurrentThread()); + DCHECK(read_task_runner_->RunsTasksInCurrentSequence()); // Keep reading messages until the stream is closed or an error occurs. while (true) { @@ -136,7 +136,7 @@ } void NativeMessagingReader::Core::NotifyEof() { - DCHECK(read_task_runner_->RunsTasksOnCurrentThread()); + DCHECK(read_task_runner_->RunsTasksInCurrentSequence()); caller_task_runner_->PostTask( FROM_HERE, base::Bind(&NativeMessagingReader::InvokeEofCallback, reader_));
diff --git a/remoting/host/security_key/security_key_message_reader.cc b/remoting/host/security_key/security_key_message_reader.cc index bb222110..c6ba1b1c6 100644 --- a/remoting/host/security_key/security_key_message_reader.cc +++ b/remoting/host/security_key/security_key_message_reader.cc
@@ -32,7 +32,7 @@ } SecurityKeyMessageReader::~SecurityKeyMessageReader() { - DCHECK(main_task_runner_->RunsTasksOnCurrentThread()); + DCHECK(main_task_runner_->RunsTasksInCurrentSequence()); // In order to ensure the reader thread is stopped cleanly, we close the // stream it is blocking on and then wait for the thread to exit. @@ -43,7 +43,7 @@ void SecurityKeyMessageReader::Start( SecurityKeyMessageCallback message_callback, base::Closure error_callback) { - DCHECK(main_task_runner_->RunsTasksOnCurrentThread()); + DCHECK(main_task_runner_->RunsTasksInCurrentSequence()); message_callback_ = message_callback; error_callback_ = error_callback; @@ -56,7 +56,7 @@ } void SecurityKeyMessageReader::ReadMessage() { - DCHECK(read_task_runner_->RunsTasksOnCurrentThread()); + DCHECK(read_task_runner_->RunsTasksInCurrentSequence()); while (true) { if (!read_stream_.IsValid()) { @@ -112,7 +112,7 @@ } void SecurityKeyMessageReader::NotifyError() { - DCHECK(read_task_runner_->RunsTasksOnCurrentThread()); + DCHECK(read_task_runner_->RunsTasksInCurrentSequence()); main_task_runner_->PostTask( FROM_HERE, base::Bind(&SecurityKeyMessageReader::InvokeErrorCallback, @@ -121,12 +121,12 @@ void SecurityKeyMessageReader::InvokeMessageCallback( std::unique_ptr<SecurityKeyMessage> message) { - DCHECK(main_task_runner_->RunsTasksOnCurrentThread()); + DCHECK(main_task_runner_->RunsTasksInCurrentSequence()); message_callback_.Run(std::move(message)); } void SecurityKeyMessageReader::InvokeErrorCallback() { - DCHECK(main_task_runner_->RunsTasksOnCurrentThread()); + DCHECK(main_task_runner_->RunsTasksInCurrentSequence()); error_callback_.Run(); }
diff --git a/remoting/host/security_key/security_key_message_reader_impl.cc b/remoting/host/security_key/security_key_message_reader_impl.cc index 14b8f03..ae3b07e8 100644 --- a/remoting/host/security_key/security_key_message_reader_impl.cc +++ b/remoting/host/security_key/security_key_message_reader_impl.cc
@@ -33,7 +33,7 @@ } SecurityKeyMessageReaderImpl::~SecurityKeyMessageReaderImpl() { - DCHECK(main_task_runner_->RunsTasksOnCurrentThread()); + DCHECK(main_task_runner_->RunsTasksInCurrentSequence()); // In order to ensure the reader thread is stopped cleanly, we want to stop // the thread before the task runners and weak pointers are invalidated. @@ -43,7 +43,7 @@ void SecurityKeyMessageReaderImpl::Start( const SecurityKeyMessageCallback& message_callback, const base::Closure& error_callback) { - DCHECK(main_task_runner_->RunsTasksOnCurrentThread()); + DCHECK(main_task_runner_->RunsTasksInCurrentSequence()); message_callback_ = message_callback; error_callback_ = error_callback; @@ -56,7 +56,7 @@ } void SecurityKeyMessageReaderImpl::ReadMessage() { - DCHECK(read_task_runner_->RunsTasksOnCurrentThread()); + DCHECK(read_task_runner_->RunsTasksInCurrentSequence()); while (true) { if (!read_stream_.IsValid()) { @@ -124,7 +124,7 @@ } void SecurityKeyMessageReaderImpl::NotifyError() { - DCHECK(read_task_runner_->RunsTasksOnCurrentThread()); + DCHECK(read_task_runner_->RunsTasksInCurrentSequence()); main_task_runner_->PostTask( FROM_HERE, base::Bind(&SecurityKeyMessageReaderImpl::InvokeErrorCallback, @@ -133,12 +133,12 @@ void SecurityKeyMessageReaderImpl::InvokeMessageCallback( std::unique_ptr<SecurityKeyMessage> message) { - DCHECK(main_task_runner_->RunsTasksOnCurrentThread()); + DCHECK(main_task_runner_->RunsTasksInCurrentSequence()); message_callback_.Run(std::move(message)); } void SecurityKeyMessageReaderImpl::InvokeErrorCallback() { - DCHECK(main_task_runner_->RunsTasksOnCurrentThread()); + DCHECK(main_task_runner_->RunsTasksInCurrentSequence()); error_callback_.Run(); }
diff --git a/remoting/host/setup/me2me_native_messaging_host_unittest.cc b/remoting/host/setup/me2me_native_messaging_host_unittest.cc index c03f2a75..2f837578 100644 --- a/remoting/host/setup/me2me_native_messaging_host_unittest.cc +++ b/remoting/host/setup/me2me_native_messaging_host_unittest.cc
@@ -322,7 +322,7 @@ } void Me2MeNativeMessagingHostTest::StartHost() { - DCHECK(host_task_runner_->RunsTasksOnCurrentThread()); + DCHECK(host_task_runner_->RunsTasksInCurrentSequence()); base::File input_read_file; base::File output_write_file; @@ -366,7 +366,7 @@ } void Me2MeNativeMessagingHostTest::StopHost() { - DCHECK(host_task_runner_->RunsTasksOnCurrentThread()); + DCHECK(host_task_runner_->RunsTasksInCurrentSequence()); native_messaging_pipe_.reset(); @@ -378,7 +378,7 @@ } void Me2MeNativeMessagingHostTest::ExitTest() { - if (!test_message_loop_->task_runner()->RunsTasksOnCurrentThread()) { + if (!test_message_loop_->task_runner()->RunsTasksInCurrentSequence()) { test_message_loop_->task_runner()->PostTask( FROM_HERE, base::Bind(&Me2MeNativeMessagingHostTest::ExitTest,
diff --git a/remoting/ios/app/BUILD.gn b/remoting/ios/app/BUILD.gn index d2f67150..9df6c6f 100644 --- a/remoting/ios/app/BUILD.gn +++ b/remoting/ios/app/BUILD.gn
@@ -26,6 +26,14 @@ "host_collection_view_cell.mm", "host_collection_view_controller.h", "host_collection_view_controller.mm", + "host_setup_footer_view.h", + "host_setup_footer_view.mm", + "host_setup_header_view.h", + "host_setup_header_view.mm", + "host_setup_view_cell.h", + "host_setup_view_cell.mm", + "host_setup_view_controller.h", + "host_setup_view_controller.mm", "host_view_controller.h", "host_view_controller.mm", "pin_entry_view.h",
diff --git a/remoting/ios/app/app_delegate.h b/remoting/ios/app/app_delegate.h index 68320f30..3f4589a 100644 --- a/remoting/ios/app/app_delegate.h +++ b/remoting/ios/app/app_delegate.h
@@ -28,6 +28,9 @@ // controller. - (void)navigateToSendFeedback:(UINavigationController*)navigationController; +// Pop up an Email compose view filled with the instructions to setup the host. +- (void)emailSetupInstructions; + @end #endif // REMOTING_IOS_APP_APP_DELEGATE_H_
diff --git a/remoting/ios/app/app_delegate.mm b/remoting/ios/app/app_delegate.mm index 4b137f1..3222e5b3 100644 --- a/remoting/ios/app/app_delegate.mm +++ b/remoting/ios/app/app_delegate.mm
@@ -147,4 +147,8 @@ [webView loadRequest:request]; } +- (void)emailSetupInstructions { + NSLog(@"TODO: emailSetupInstructions"); +} + @end
diff --git a/remoting/ios/app/host_collection_view_cell.mm b/remoting/ios/app/host_collection_view_cell.mm index 0ac1dea..7fbc387 100644 --- a/remoting/ios/app/host_collection_view_cell.mm +++ b/remoting/ios/app/host_collection_view_cell.mm
@@ -49,7 +49,6 @@ _imageView = [[UIImageView alloc] init]; _imageView.translatesAutoresizingMaskIntoConstraints = NO; _imageView.contentMode = UIViewContentModeCenter; - _imageView.alpha = 0.87f; _imageView.backgroundColor = RemotingTheme.offlineHostColor; _imageView.layer.cornerRadius = kHostCardIconSize / 2.f; _imageView.layer.masksToBounds = YES;
diff --git a/remoting/ios/app/host_collection_view_controller.h b/remoting/ios/app/host_collection_view_controller.h index cba94f0..4fee44f 100644 --- a/remoting/ios/app/host_collection_view_controller.h +++ b/remoting/ios/app/host_collection_view_controller.h
@@ -8,7 +8,6 @@ #import <UIKit/UIKit.h> #import "ios/third_party/material_components_ios/src/components/Collections/src/MaterialCollections.h" -#import "ios/third_party/material_components_ios/src/components/FlexibleHeader/src/MaterialFlexibleHeader.h" #import "remoting/ios/app/host_collection_view_cell.h" #import "remoting/ios/domain/host_info.h" @@ -35,8 +34,7 @@ @interface HostCollectionViewController : MDCCollectionViewController @property(weak, nonatomic) id<HostCollectionViewControllerDelegate> delegate; -@property(nonatomic) - MDCFlexibleHeaderContainerViewController* flexHeaderContainerViewController; +@property(weak, nonatomic) id<UIScrollViewDelegate> scrollViewDelegate; @end
diff --git a/remoting/ios/app/host_collection_view_controller.mm b/remoting/ios/app/host_collection_view_controller.mm index 72945970..ed3a02a 100644 --- a/remoting/ios/app/host_collection_view_controller.mm +++ b/remoting/ios/app/host_collection_view_controller.mm
@@ -23,8 +23,7 @@ @implementation HostCollectionViewController @synthesize delegate = _delegate; -@synthesize flexHeaderContainerViewController = - _flexHeaderContainerViewController; +@synthesize scrollViewDelegate = _scrollViewDelegate; - (instancetype)initWithCollectionViewLayout:(UICollectionViewLayout*)layout { self = [super initWithCollectionViewLayout:layout]; @@ -115,8 +114,7 @@ #pragma mark - UIScrollViewDelegate - (void)scrollViewDidScroll:(UIScrollView*)scrollView { - [self.flexHeaderContainerViewController.headerViewController - scrollViewDidScroll:scrollView]; + [_scrollViewDelegate scrollViewDidScroll:scrollView]; } #pragma mark - UICollectionViewDelegateFlowLayout @@ -129,24 +127,4 @@ kHostCollectionHeaderViewHeight); } -#pragma mark - Private - -- (void)setFlexHeaderContainerViewController: - (MDCFlexibleHeaderContainerViewController*) - flexHeaderContainerViewController { - _flexHeaderContainerViewController = flexHeaderContainerViewController; - MDCFlexibleHeaderView* headerView = - _flexHeaderContainerViewController.headerViewController.headerView; - headerView.trackingScrollView = self.collectionView; - headerView.backgroundColor = [UIColor clearColor]; - - // Use a custom shadow under the flexible header. - MDCShadowLayer* shadowLayer = [MDCShadowLayer layer]; - [headerView setShadowLayer:shadowLayer - intensityDidChangeBlock:^(CALayer* layer, CGFloat intensity) { - CGFloat elevation = MDCShadowElevationAppBar * intensity; - [(MDCShadowLayer*)layer setElevation:elevation]; - }]; -} - @end
diff --git a/remoting/ios/app/host_setup_footer_view.h b/remoting/ios/app/host_setup_footer_view.h new file mode 100644 index 0000000..73e9ad6 --- /dev/null +++ b/remoting/ios/app/host_setup_footer_view.h
@@ -0,0 +1,14 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef REMOTING_IOS_APP_HOST_SETUP_FOOTER_VIEW_H_ +#define REMOTING_IOS_APP_HOST_SETUP_FOOTER_VIEW_H_ + +#import <UIKit/UIKit.h> + +// The view with the "Email link and instructions" button. +@interface HostSetupFooterView : UICollectionReusableView +@end + +#endif // REMOTING_IOS_APP_HOST_SETUP_FOOTER_VIEW_H_
diff --git a/remoting/ios/app/host_setup_footer_view.mm b/remoting/ios/app/host_setup_footer_view.mm new file mode 100644 index 0000000..f271133 --- /dev/null +++ b/remoting/ios/app/host_setup_footer_view.mm
@@ -0,0 +1,53 @@ +// 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. + +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "remoting/ios/app/host_setup_footer_view.h" + +#import "ios/third_party/material_components_ios/src/components/Buttons/src/MaterialButtons.h" +#import "ios/third_party/material_components_ios/src/components/Typography/src/MaterialTypography.h" +#import "remoting/ios/app/app_delegate.h" +#import "remoting/ios/app/remoting_theme.h" + +static const CGFloat kTopPadding = 6.f; + +@implementation HostSetupFooterView + +- (instancetype)initWithFrame:(CGRect)frame { + if (self = [super initWithFrame:frame]) { + [self commonInit]; + } + return self; +} + +- (void)commonInit { + self.backgroundColor = RemotingTheme.setupListBackgroundColor; + + MDCRaisedButton* raisedButton = [[MDCRaisedButton alloc] init]; + + [raisedButton setTitle:@"Email link and instructions" + forState:UIControlStateNormal]; + [raisedButton setTitleColor:RemotingTheme.buttonTextColor + forState:UIControlStateNormal]; + [raisedButton sizeToFit]; + [raisedButton addTarget:self + action:@selector(didTapEmailInstructions:) + forControlEvents:UIControlEventTouchUpInside]; + [self addSubview:raisedButton]; + raisedButton.translatesAutoresizingMaskIntoConstraints = NO; + [NSLayoutConstraint activateConstraints:@[ + [raisedButton.centerXAnchor constraintEqualToAnchor:self.centerXAnchor], + [raisedButton.topAnchor constraintEqualToAnchor:self.topAnchor + constant:kTopPadding], + ]]; +} + +- (void)didTapEmailInstructions:(id)button { + [AppDelegate.instance emailSetupInstructions]; +} + +@end
diff --git a/remoting/ios/app/host_setup_header_view.h b/remoting/ios/app/host_setup_header_view.h new file mode 100644 index 0000000..6dcd729 --- /dev/null +++ b/remoting/ios/app/host_setup_header_view.h
@@ -0,0 +1,14 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef REMOTING_IOS_APP_HOST_SETUP_HEADER_VIEW_H_ +#define REMOTING_IOS_APP_HOST_SETUP_HEADER_VIEW_H_ + +#import <UIKit/UIKit.h> + +// The view that shows the title for setting up the host. +@interface HostSetupHeaderView : UICollectionReusableView +@end + +#endif // REMOTING_IOS_APP_HOST_SETUP_HEADER_VIEW_H_
diff --git a/remoting/ios/app/host_setup_header_view.mm b/remoting/ios/app/host_setup_header_view.mm new file mode 100644 index 0000000..870f5d5 --- /dev/null +++ b/remoting/ios/app/host_setup_header_view.mm
@@ -0,0 +1,52 @@ +// 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. + +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "remoting/ios/app/host_setup_header_view.h" + +#import "ios/third_party/material_components_ios/src/components/Typography/src/MaterialTypography.h" +#import "remoting/ios/app/remoting_theme.h" + +static const CGFloat kSetupTitleInset = 22.f; +static const CGFloat kBottomPadding = 6.f; + +// TODO(yuweih): i18n +static NSString* const kSetupTitle = + @"Welcome to Chrome Remote Desktop.\n" + @"Let's get you setup."; + +@implementation HostSetupHeaderView + +- (instancetype)initWithFrame:(CGRect)frame { + if (self = [super initWithFrame:frame]) { + [self commonInit]; + } + return self; +} + +- (void)commonInit { + self.backgroundColor = RemotingTheme.setupListBackgroundColor; + + UILabel* titleLabel = [[UILabel alloc] init]; + titleLabel.text = kSetupTitle; + titleLabel.font = MDCTypography.titleFont; + titleLabel.numberOfLines = 2; + titleLabel.adjustsFontSizeToFitWidth = YES; + titleLabel.textColor = RemotingTheme.setupListTextColor; + [self addSubview:titleLabel]; + titleLabel.translatesAutoresizingMaskIntoConstraints = NO; + [NSLayoutConstraint activateConstraints:@[ + [titleLabel.leadingAnchor constraintEqualToAnchor:self.leadingAnchor + constant:kSetupTitleInset], + [titleLabel.trailingAnchor constraintEqualToAnchor:self.trailingAnchor + constant:-kSetupTitleInset], + [titleLabel.bottomAnchor constraintEqualToAnchor:self.bottomAnchor + constant:-kBottomPadding], + ]]; +} + +@end
diff --git a/remoting/ios/app/host_setup_view_cell.h b/remoting/ios/app/host_setup_view_cell.h new file mode 100644 index 0000000..a6bc7e3 --- /dev/null +++ b/remoting/ios/app/host_setup_view_cell.h
@@ -0,0 +1,17 @@ +// 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 REMOTING_IOS_APP_HOST_SETUP_VIEW_CELL_H_ +#define REMOTING_IOS_APP_HOST_SETUP_VIEW_CELL_H_ + +#import <UIKit/UIKit.h> + +// The collection cell for each step when setting up the host. +@interface HostSetupViewCell : UICollectionViewCell + +- (void)setContentText:(NSString*)text number:(NSInteger)number; + +@end + +#endif // REMOTING_IOS_APP_HOST_SETUP_VIEW_CELL_H_
diff --git a/remoting/ios/app/host_setup_view_cell.mm b/remoting/ios/app/host_setup_view_cell.mm new file mode 100644 index 0000000..b37c878 --- /dev/null +++ b/remoting/ios/app/host_setup_view_cell.mm
@@ -0,0 +1,92 @@ +// 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. + +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "remoting/ios/app/host_setup_view_cell.h" + +#import "ios/third_party/material_components_ios/src/components/Typography/src/MaterialTypography.h" +#import "remoting/ios/app/remoting_theme.h" + +static const CGFloat kNumberIconPadding = 16.f; +static const CGFloat kNumberIconSize = 45.f; +static const CGFloat kCellPadding = 22.f; + +@interface HostSetupViewCell () { + UIView* _numberContainerView; + UILabel* _numberLabel; + UILabel* _contentLabel; +} +@end + +@implementation HostSetupViewCell + +- (instancetype)initWithFrame:(CGRect)frame { + if (self = [super initWithFrame:frame]) { + [self commonInit]; + } + return self; +} + +- (void)commonInit { + self.backgroundColor = RemotingTheme.setupListBackgroundColor; + + _numberContainerView = [[UIView alloc] init]; + _numberLabel = [[UILabel alloc] init]; + _contentLabel = [[UILabel alloc] init]; + + _numberContainerView.translatesAutoresizingMaskIntoConstraints = NO; + _numberLabel.translatesAutoresizingMaskIntoConstraints = NO; + _contentLabel.translatesAutoresizingMaskIntoConstraints = NO; + + _contentLabel.lineBreakMode = NSLineBreakByWordWrapping; + _contentLabel.numberOfLines = 0; + + _numberContainerView.backgroundColor = RemotingTheme.onlineHostColor; + _numberLabel.textColor = RemotingTheme.setupListNumberColor; + _contentLabel.textColor = RemotingTheme.setupListTextColor; + _numberLabel.font = MDCTypography.titleFont; + _contentLabel.font = MDCTypography.subheadFont; + _numberContainerView.layer.cornerRadius = kNumberIconSize / 2.f; + + [self.contentView addSubview:_numberContainerView]; + [self.contentView addSubview:_contentLabel]; + [_numberContainerView addSubview:_numberLabel]; + + NSArray* constraints = @[ + [_numberContainerView.leadingAnchor + constraintEqualToAnchor:self.contentView.leadingAnchor + constant:kCellPadding], + [_numberContainerView.centerYAnchor + constraintEqualToAnchor:self.contentView.centerYAnchor], + [_numberContainerView.widthAnchor + constraintEqualToConstant:kNumberIconSize], + [_numberContainerView.heightAnchor + constraintEqualToConstant:kNumberIconSize], + + [_numberLabel.centerXAnchor + constraintEqualToAnchor:_numberContainerView.centerXAnchor], + [_numberLabel.centerYAnchor + constraintEqualToAnchor:_numberContainerView.centerYAnchor], + + [_contentLabel.leadingAnchor + constraintEqualToAnchor:_numberContainerView.trailingAnchor + constant:kNumberIconPadding], + [_contentLabel.trailingAnchor + constraintEqualToAnchor:self.contentView.trailingAnchor + constant:-kCellPadding], + [_contentLabel.centerYAnchor + constraintEqualToAnchor:self.contentView.centerYAnchor], + ]; + [NSLayoutConstraint activateConstraints:constraints]; +} + +- (void)setContentText:(NSString*)text number:(NSInteger)number { + _contentLabel.text = text; + _numberLabel.text = [@(number) stringValue]; +} + +@end
diff --git a/remoting/ios/app/host_setup_view_controller.h b/remoting/ios/app/host_setup_view_controller.h new file mode 100644 index 0000000..7255d74 --- /dev/null +++ b/remoting/ios/app/host_setup_view_controller.h
@@ -0,0 +1,20 @@ +// 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 REMOTING_IOS_APP_HOST_SETUP_VIEW_CONTOLLER_H_ +#define REMOTING_IOS_APP_HOST_SETUP_VIEW_CONTOLLER_H_ + +#import <UIKit/UIKit.h> + +#import "ios/third_party/material_components_ios/src/components/Collections/src/MaterialCollections.h" + +// This controller shows instruction for setting up the host a host when the +// user has no host in the host list. +@interface HostSetupViewController : MDCCollectionViewController + +@property(weak, nonatomic) id<UIScrollViewDelegate> scrollViewDelegate; + +@end + +#endif // REMOTING_IOS_APP_HOST_SETUP_VIEW_CONTOLLER_H_
diff --git a/remoting/ios/app/host_setup_view_controller.mm b/remoting/ios/app/host_setup_view_controller.mm new file mode 100644 index 0000000..046eff4 --- /dev/null +++ b/remoting/ios/app/host_setup_view_controller.mm
@@ -0,0 +1,123 @@ +// 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. + +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "remoting/ios/app/host_setup_view_controller.h" + +#import "ios/third_party/material_components_ios/src/components/ShadowElevations/src/MaterialShadowElevations.h" +#import "ios/third_party/material_components_ios/src/components/ShadowLayer/src/MaterialShadowLayer.h" +#import "remoting/ios/app/host_setup_footer_view.h" +#import "remoting/ios/app/host_setup_header_view.h" +#import "remoting/ios/app/host_setup_view_cell.h" +#import "remoting/ios/app/remoting_theme.h" + +static NSString* const kReusableIdentifierItem = @"remotingSetupStepVCItem"; + +// TODO(yuweih): i18n +// Clang doesn't allow string literal concatenation in string array but +// `git cl format` will break down long lines into multiple string literals. +// This is to disable the warning until we move these to a better place. +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wobjc-string-concatenation" +static NSArray<NSString*>* const kSetupSteps = @[ + @"Go to the computer that you want to remotely access", + @"Visit google.com/remotedesktop from your Chrome browser", + @"Install the Chrome Remote Desktop software and follow the instructions to " + "complete the setup", + @"After your remote device is setup, you can access it directly from this " + "page", +]; +#pragma clang diagnostic pop + +static const CGFloat kHeaderHeight = 80.f; +static const CGFloat kFooterHeight = 80.f; + +@implementation HostSetupViewController + +@synthesize scrollViewDelegate = _scrollViewDelegate; + +- (instancetype)initWithCollectionViewLayout:(UICollectionViewLayout*)layout { + self = [super initWithCollectionViewLayout:layout]; + if (self) { + self.collectionView.backgroundColor = UIColor.clearColor; + [self.collectionView registerClass:[HostSetupViewCell class] + forCellWithReuseIdentifier:kReusableIdentifierItem]; + + [self.collectionView registerClass:[HostSetupHeaderView class] + forSupplementaryViewOfKind:UICollectionElementKindSectionHeader + withReuseIdentifier:UICollectionElementKindSectionHeader]; + + [self.collectionView registerClass:[HostSetupFooterView class] + forSupplementaryViewOfKind:UICollectionElementKindSectionFooter + withReuseIdentifier:UICollectionElementKindSectionFooter]; + } + return self; +} + +#pragma mark - UIViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + self.styler.cellStyle = MDCCollectionViewCellStyleGrouped; + self.styler.cellLayoutType = MDCCollectionViewCellLayoutTypeList; + self.styler.shouldHideSeparators = YES; +} + +#pragma mark - UICollectionViewDataSource + +- (NSInteger)collectionView:(UICollectionView*)collectionView + numberOfItemsInSection:(NSInteger)section { + return kSetupSteps.count; +} + +- (UICollectionViewCell*)collectionView:(UICollectionView*)collectionView + cellForItemAtIndexPath:(NSIndexPath*)indexPath { + HostSetupViewCell* cell = [collectionView + dequeueReusableCellWithReuseIdentifier:kReusableIdentifierItem + forIndexPath:indexPath]; + [cell setContentText:kSetupSteps[indexPath.item] number:indexPath.item + 1]; + return cell; +} + +- (UICollectionReusableView*)collectionView:(UICollectionView*)collectionView + viewForSupplementaryElementOfKind:(NSString*)kind + atIndexPath:(NSIndexPath*)indexPath { + return [collectionView dequeueReusableSupplementaryViewOfKind:kind + withReuseIdentifier:kind + forIndexPath:indexPath]; +} + +#pragma mark - MDCCollectionViewStylingDelegate + +- (CGFloat)collectionView:(UICollectionView*)collectionView + cellHeightAtIndexPath:(NSIndexPath*)indexPath { + return MDCCellDefaultThreeLineHeight; +} + +#pragma mark - UICollectionViewDelegateFlowLayout + +- (CGSize)collectionView:(UICollectionView*)collectionView + layout: + (UICollectionViewLayout*)collectionViewLayout + referenceSizeForHeaderInSection:(NSInteger)section { + return CGSizeMake(collectionView.bounds.size.width, kHeaderHeight); +} + +- (CGSize)collectionView:(UICollectionView*)collectionView + layout: + (UICollectionViewLayout*)collectionViewLayout + referenceSizeForFooterInSection:(NSInteger)section { + return CGSizeMake(collectionView.bounds.size.width, kFooterHeight); +} + +#pragma mark - UIScrollViewDelegate + +- (void)scrollViewDidScroll:(UIScrollView*)scrollView { + [_scrollViewDelegate scrollViewDidScroll:scrollView]; +} + +@end
diff --git a/remoting/ios/app/remoting_theme.h b/remoting/ios/app/remoting_theme.h index 2e62102..6ff50112 100644 --- a/remoting/ios/app/remoting_theme.h +++ b/remoting/ios/app/remoting_theme.h
@@ -17,6 +17,10 @@ @property(class, nonatomic, readonly) UIColor* menuBlueColor; @property(class, nonatomic, readonly) UIColor* offlineHostColor; @property(class, nonatomic, readonly) UIColor* onlineHostColor; +@property(class, nonatomic, readonly) UIColor* buttonTextColor; +@property(class, nonatomic, readonly) UIColor* setupListBackgroundColor; +@property(class, nonatomic, readonly) UIColor* setupListTextColor; +@property(class, nonatomic, readonly) UIColor* setupListNumberColor; // Icons
diff --git a/remoting/ios/app/remoting_theme.mm b/remoting/ios/app/remoting_theme.mm index fde5c9a..7fbf87cc 100644 --- a/remoting/ios/app/remoting_theme.mm +++ b/remoting/ios/app/remoting_theme.mm
@@ -46,7 +46,7 @@ static UIColor* color; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ - color = [UIColor colorWithRed:0.75f green:0.75f blue:0.75f alpha:1.f]; + color = [UIColor colorWithWhite:0.87f alpha:1.f]; }); return color; } @@ -55,11 +55,32 @@ static UIColor* color; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ - color = [UIColor colorWithRed:0.20f green:0.70f blue:0.20f alpha:1.f]; + color = [UIColor colorWithRed:0.40f green:0.75f blue:0.40f alpha:1.f]; }); return color; } ++ (UIColor*)buttonTextColor { + return UIColor.whiteColor; +} + ++ (UIColor*)setupListBackgroundColor { + static UIColor* color; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + color = [UIColor colorWithWhite:1.f alpha:0.9f]; + }); + return color; +} + ++ (UIColor*)setupListTextColor { + return UIColor.grayColor; +} + ++ (UIColor*)setupListNumberColor { + return UIColor.whiteColor; +} + #pragma mark - Icons + (UIImage*)arrowIcon {
diff --git a/remoting/ios/app/remoting_view_controller.mm b/remoting/ios/app/remoting_view_controller.mm index 5d560a1..db5ec798 100644 --- a/remoting/ios/app/remoting_view_controller.mm +++ b/remoting/ios/app/remoting_view_controller.mm
@@ -12,10 +12,13 @@ #import "ios/third_party/material_components_ios/src/components/AnimationTiming/src/MaterialAnimationTiming.h" #import "ios/third_party/material_components_ios/src/components/AppBar/src/MaterialAppBar.h" #import "ios/third_party/material_components_ios/src/components/Dialogs/src/MaterialDialogs.h" +#import "ios/third_party/material_components_ios/src/components/ShadowElevations/src/MaterialShadowElevations.h" +#import "ios/third_party/material_components_ios/src/components/ShadowLayer/src/MaterialShadowLayer.h" #import "ios/third_party/material_components_ios/src/components/Snackbar/src/MaterialSnackbar.h" #import "remoting/ios/app/app_delegate.h" #import "remoting/ios/app/client_connection_view_controller.h" #import "remoting/ios/app/host_collection_view_controller.h" +#import "remoting/ios/app/host_setup_view_controller.h" #import "remoting/ios/app/host_view_controller.h" #import "remoting/ios/app/remoting_menu_view_controller.h" #import "remoting/ios/app/remoting_theme.h" @@ -36,6 +39,7 @@ MDCDialogTransitionController* _dialogTransitionController; MDCAppBar* _appBar; HostCollectionViewController* _collectionViewController; + HostSetupViewController* _setupViewController; RemotingService* _remotingService; } @end @@ -54,20 +58,22 @@ CGFloat sectionInset = kHostInset * 2.f; [layout setSectionInset:UIEdgeInsetsMake(sectionInset, sectionInset, sectionInset, sectionInset)]; - HostCollectionViewController* collectionVC = [ - [HostCollectionViewController alloc] initWithCollectionViewLayout:layout]; - self = [super initWithContentViewController:collectionVC]; + self = [super init]; if (self) { _remotingService = RemotingService.instance; - _collectionViewController = collectionVC; - _collectionViewController.flexHeaderContainerViewController = self; + _collectionViewController = [[HostCollectionViewController alloc] + initWithCollectionViewLayout:layout]; _collectionViewController.delegate = self; + _collectionViewController.scrollViewDelegate = self.headerViewController; + + _setupViewController = [[HostSetupViewController alloc] init]; + _setupViewController.scrollViewDelegate = self.headerViewController; _appBar = [[MDCAppBar alloc] init]; [self addChildViewController:_appBar.headerViewController]; - self.navigationItem.title = @"Chrome Remote Desktop"; + self.navigationItem.title = @"chrome remote desktop"; UIBarButtonItem* menuButton = [[UIBarButtonItem alloc] initWithImage:RemotingTheme.menuIcon @@ -90,6 +96,17 @@ MDCNavigationBarTextColorAccessibilityMutator* mutator = [[MDCNavigationBarTextColorAccessibilityMutator alloc] init]; [mutator mutate:_appBar.navigationBar]; + + MDCFlexibleHeaderView* headerView = self.headerViewController.headerView; + headerView.backgroundColor = [UIColor clearColor]; + + // Use a custom shadow under the flexible header. + MDCShadowLayer* shadowLayer = [MDCShadowLayer layer]; + [headerView setShadowLayer:shadowLayer + intensityDidChangeBlock:^(CALayer* layer, CGFloat intensity) { + CGFloat elevation = MDCShadowElevationAppBar * intensity; + [(MDCShadowLayer*)layer setElevation:elevation]; + }]; } return self; } @@ -116,8 +133,8 @@ [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(hostsDidUpdateNotification:) - name:kHostsDidUpdate + selector:@selector(hostListStateDidChangeNotification:) + name:kHostListStateDidChange object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self @@ -151,8 +168,8 @@ #pragma mark - Remoting Service Notifications -- (void)hostsDidUpdateNotification:(NSNotification*)notification { - [_collectionViewController.collectionView reloadData]; +- (void)hostListStateDidChangeNotification:(NSNotification*)notification { + [self refreshContent]; } - (void)userDidUpdateNotification:(NSNotification*)notification { @@ -172,15 +189,7 @@ [MDCSnackbarManager showMessage:message]; } _isAuthenticated = authenticated; - [_collectionViewController.collectionView reloadData]; -} - -#pragma mark - RemotingHostListDelegate - -// TODO(nicholss): these need to be a stats change like "none, loading, -// updated"... -- (void)hostListUpdated { - [_collectionViewController.collectionView reloadData]; + [self refreshContent]; } #pragma mark - HostCollectionViewControllerDelegate @@ -262,4 +271,30 @@ } } +- (void)refreshContent { + if (_remotingService.hostListState == HostListStateNotFetched) { + self.contentViewController = nil; + return; + } + + if (_remotingService.hostListState == HostListStateFetching) { + NSLog(@"Fetching host list... TODO: Show fetching UI here."); + return; + } + + DCHECK(_remotingService.hostListState == HostListStateFetched); + + if (_remotingService.hosts.count > 0) { + [_collectionViewController.collectionView reloadData]; + self.headerViewController.headerView.trackingScrollView = + _collectionViewController.collectionView; + self.contentViewController = _collectionViewController; + } else { + self.contentViewController = _setupViewController; + self.headerViewController.headerView.trackingScrollView = + _setupViewController.collectionView; + } + self.contentViewController.view.frame = self.view.bounds; +} + @end
diff --git a/remoting/ios/facade/host_list_fetcher.cc b/remoting/ios/facade/host_list_fetcher.cc index 469cbf3..ea3340ef 100644 --- a/remoting/ios/facade/host_list_fetcher.cc +++ b/remoting/ios/facade/host_list_fetcher.cc
@@ -104,8 +104,8 @@ const base::ListValue* hosts = nullptr; if (!data->GetList("items", &hosts)) { - LOG(ERROR) << "Failed to find hosts in Hostlist response data"; - return false; + // This will happen if the user has no host. + return true; } // Any host_info with malformed data will not be added to the hostlist.
diff --git a/remoting/ios/facade/remoting_service.h b/remoting/ios/facade/remoting_service.h index 120e8ce..af15a60 100644 --- a/remoting/ios/facade/remoting_service.h +++ b/remoting/ios/facade/remoting_service.h
@@ -12,10 +12,21 @@ @protocol RemotingAuthentication; +typedef NS_ENUM(NSInteger, HostListState) { + // Nobody has requested a host list fetch. + HostListStateNotFetched, + + // The host list is currently being fetched. + HostListStateFetching, + + // The host list has been fetched. + HostListStateFetched, +}; + // Eventing related keys: // Hosts did update event. -extern NSString* const kHostsDidUpdate; +extern NSString* const kHostListStateDidChange; // User did update event name. extern NSString* const kUserDidUpdate; // Map key for UserInfo object. @@ -37,6 +48,8 @@ // Returns the current host list. @property(nonatomic, readonly) NSArray<HostInfo*>* hosts; +@property(nonatomic, readonly) HostListState hostListState; + // The Chromoting Client Runtime, this holds the threads and other shared // resources used by the Chromoting clients @property(nonatomic, readonly) remoting::ChromotingClientRuntime* runtime;
diff --git a/remoting/ios/facade/remoting_service.mm b/remoting/ios/facade/remoting_service.mm index 5c5a8f6a4..79753a8 100644 --- a/remoting/ios/facade/remoting_service.mm +++ b/remoting/ios/facade/remoting_service.mm
@@ -30,7 +30,7 @@ static NSString* const kCRDAuthenticatedUserEmailKey = @"kCRDAuthenticatedUserEmailKey"; -NSString* const kHostsDidUpdate = @"kHostsDidUpdate"; +NSString* const kHostListStateDidChange = @"kHostListStateDidChange"; NSString* const kUserDidUpdate = @"kUserDidUpdate"; NSString* const kUserInfo = @"kUserInfo"; @@ -39,13 +39,13 @@ id<RemotingAuthentication> _authentication; remoting::HostListFetcher* _hostListFetcher; remoting::IosClientRuntimeDelegate* _clientRuntimeDelegate; - BOOL _isHostListFetching; } @end @implementation RemotingService @synthesize hosts = _hosts; +@synthesize hostListState = _hostListState; // RemotingService is a singleton. + (RemotingService*)instance { @@ -63,7 +63,7 @@ _hosts = nil; _hostListFetcher = nil; // TODO(yuweih): Maybe better to just cancel the previous request. - _isHostListFetching = NO; + _hostListState = HostListStateNotFetched; // TODO(nicholss): This might need a pointer back to the service. _clientRuntimeDelegate = new remoting::IosClientRuntimeDelegate(); @@ -75,10 +75,10 @@ #pragma mark - RemotingService Implementation - (void)startHostListFetchWith:(NSString*)accessToken { - if (_isHostListFetching) { + if (_hostListState == HostListStateFetching) { return; } - _isHostListFetching = YES; + [self setHostListState:HostListStateFetching]; if (!_hostListFetcher) { _hostListFetcher = new remoting::HostListFetcher( remoting::ChromotingClientRuntime::GetInstance()->url_requester()); @@ -118,29 +118,31 @@ [hosts addObject:host]; } _hosts = hosts; - [self hostListUpdated]; - _isHostListFetching = NO; + [self setHostListState:HostListStateFetched]; })); } -#pragma mark - Notifications - -- (void)hostListUpdated { - [[NSNotificationCenter defaultCenter] postNotificationName:kHostsDidUpdate - object:self - userInfo:nil]; +- (void)setHostListState:(HostListState)state { + if (state == _hostListState) { + return; + } + _hostListState = state; + [[NSNotificationCenter defaultCenter] + postNotificationName:kHostListStateDidChange + object:self + userInfo:nil]; } #pragma mark - RemotingAuthenticationDelegate - (void)userDidUpdate:(UserInfo*)user { NSDictionary* userInfo = nil; + [self setHostListState:HostListStateNotFetched]; if (user) { userInfo = [NSDictionary dictionaryWithObject:user forKey:kUserInfo]; [self requestHostListFetch]; } else { _hosts = nil; - [self hostListUpdated]; } [[NSNotificationCenter defaultCenter] postNotificationName:kUserDidUpdate object:self
diff --git a/remoting/resources/remoting_strings.grd b/remoting/resources/remoting_strings.grd index fbbc6e2a..e578cb0 100644 --- a/remoting/resources/remoting_strings.grd +++ b/remoting/resources/remoting_strings.grd
@@ -87,7 +87,7 @@ <output filename="remoting/webapp/_locales/da/messages.json" lang="da" type="chrome_messages_json"/> <output filename="remoting/webapp/_locales/de/messages.json" lang="de" type="chrome_messages_json"/> <output filename="remoting/webapp/_locales/fa/messages.json" lang="fa" type="chrome_messages_json"/> - <output filename="remoting/webapp/_locales/fake_bidi/messages.json" lang="fake_bidi" type="chrome_messages_json"/> + <output filename="remoting/webapp/_locales/fake_bidi/messages.json" lang="fake-bidi" type="chrome_messages_json"/> <output filename="remoting/webapp/_locales/el/messages.json" lang="el" type="chrome_messages_json"/> <output filename="remoting/webapp/_locales/en/messages.json" lang="en" type="chrome_messages_json"/> <if expr="chromeos or is_ios">
diff --git a/services/device/device_service.cc b/services/device/device_service.cc index ca19aa5..271878b1 100644 --- a/services/device/device_service.cc +++ b/services/device/device_service.cc
@@ -39,7 +39,7 @@ #if defined(OS_ANDROID) std::unique_ptr<service_manager::Service> CreateDeviceService( - scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, + scoped_refptr<base::SequencedTaskRunner> blocking_task_runner, scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, const WakeLockContextCallback& wake_lock_context_callback, const base::android::JavaRef<jobject>& java_nfc_delegate) { @@ -49,25 +49,25 @@ } return base::MakeUnique<DeviceService>( - std::move(file_task_runner), std::move(io_task_runner), + std::move(blocking_task_runner), std::move(io_task_runner), wake_lock_context_callback, java_nfc_delegate); } #else std::unique_ptr<service_manager::Service> CreateDeviceService( - scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, + scoped_refptr<base::SequencedTaskRunner> blocking_task_runner, scoped_refptr<base::SingleThreadTaskRunner> io_task_runner) { - return base::MakeUnique<DeviceService>(std::move(file_task_runner), + return base::MakeUnique<DeviceService>(std::move(blocking_task_runner), std::move(io_task_runner)); } #endif #if defined(OS_ANDROID) DeviceService::DeviceService( - scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, + scoped_refptr<base::SequencedTaskRunner> blocking_task_runner, scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, const WakeLockContextCallback& wake_lock_context_callback, const base::android::JavaRef<jobject>& java_nfc_delegate) - : file_task_runner_(std::move(file_task_runner)), + : blocking_task_runner_(std::move(blocking_task_runner)), io_task_runner_(std::move(io_task_runner)), wake_lock_context_callback_(wake_lock_context_callback), java_interface_provider_initialized_(false) { @@ -75,9 +75,9 @@ } #else DeviceService::DeviceService( - scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, + scoped_refptr<base::SequencedTaskRunner> blocking_task_runner, scoped_refptr<base::SingleThreadTaskRunner> io_task_runner) - : file_task_runner_(std::move(file_task_runner)), + : blocking_task_runner_(std::move(blocking_task_runner)), io_task_runner_(std::move(io_task_runner)) {} #endif @@ -245,7 +245,7 @@ if (io_task_runner_) { io_task_runner_->PostTask( FROM_HERE, base::Bind(&device::SensorProviderImpl::Create, - file_task_runner_, base::Passed(&request))); + blocking_task_runner_, base::Passed(&request))); } } @@ -253,14 +253,14 @@ const service_manager::BindSourceInfo& source_info, mojom::TimeZoneMonitorRequest request) { if (!time_zone_monitor_) - time_zone_monitor_ = TimeZoneMonitor::Create(file_task_runner_); + time_zone_monitor_ = TimeZoneMonitor::Create(blocking_task_runner_); time_zone_monitor_->Bind(std::move(request)); } void DeviceService::BindWakeLockProviderRequest( const service_manager::BindSourceInfo& source_info, mojom::WakeLockProviderRequest request) { - WakeLockProvider::Create(std::move(request), file_task_runner_, + WakeLockProvider::Create(std::move(request), blocking_task_runner_, wake_lock_context_callback_); }
diff --git a/services/device/device_service.h b/services/device/device_service.h index 69ddb654..35e8814 100644 --- a/services/device/device_service.h +++ b/services/device/device_service.h
@@ -6,6 +6,7 @@ #define SERVICES_DEVICE_DEVICE_SERVICE_H_ #include "base/memory/ref_counted.h" +#include "base/sequenced_task_runner.h" #include "device/generic_sensor/public/interfaces/sensor_provider.mojom.h" #include "device/screen_orientation/public/interfaces/screen_orientation.mojom.h" #include "device/sensors/public/interfaces/motion.mojom.h" @@ -41,25 +42,25 @@ // and NFCDelegate.java to understand the semantics and usage of these // parameters. std::unique_ptr<service_manager::Service> CreateDeviceService( - scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, + scoped_refptr<base::SequencedTaskRunner> blocking_task_runner, scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, const WakeLockContextCallback& wake_lock_context_callback, const base::android::JavaRef<jobject>& java_nfc_delegate); #else std::unique_ptr<service_manager::Service> CreateDeviceService( - scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, + scoped_refptr<base::SequencedTaskRunner> blocking_task_runner, scoped_refptr<base::SingleThreadTaskRunner> io_task_runner); #endif class DeviceService : public service_manager::Service { public: #if defined(OS_ANDROID) - DeviceService(scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, + DeviceService(scoped_refptr<base::SequencedTaskRunner> blocking_task_runner, scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, const WakeLockContextCallback& wake_lock_context_callback, const base::android::JavaRef<jobject>& java_nfc_delegate); #else - DeviceService(scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, + DeviceService(scoped_refptr<base::SequencedTaskRunner> blocking_task_runner, scoped_refptr<base::SingleThreadTaskRunner> io_task_runner); #endif ~DeviceService() override; @@ -122,7 +123,7 @@ std::unique_ptr<PowerMonitorMessageBroadcaster> power_monitor_message_broadcaster_; std::unique_ptr<TimeZoneMonitor> time_zone_monitor_; - scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; + scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; WakeLockContextCallback wake_lock_context_callback_;
diff --git a/skia/config/SkUserConfig.h b/skia/config/SkUserConfig.h index 311348e..dcc693ff 100644 --- a/skia/config/SkUserConfig.h +++ b/skia/config/SkUserConfig.h
@@ -208,6 +208,10 @@ # define SK_USE_LEGACY_DISTANCE_FIELDS #endif +#ifndef SK_SUPPORT_LEGACY_COLORFILTER_FILTERSPAN +#define SK_SUPPORT_LEGACY_COLORFILTER_FILTERSPAN +#endif + #ifndef SK_DISABLE_DEFERRED_PROXIES #define SK_DISABLE_DEFERRED_PROXIES #endif
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json index d83ea1a..2004c14 100644 --- a/testing/buildbot/chromium.fyi.json +++ b/testing/buildbot/chromium.fyi.json
@@ -12382,10 +12382,5 @@ "test": "views_unittests" } ] - }, - "Win Builder (ANGLE)": { - "additional_compile_targets": [ - "all" - ] } }
diff --git a/testing/buildbot/chromium.mac.json b/testing/buildbot/chromium.mac.json index 3d693acc..2773bb8 100644 --- a/testing/buildbot/chromium.mac.json +++ b/testing/buildbot/chromium.mac.json
@@ -1,14 +1,4 @@ { - "Mac Builder": { - "additional_compile_targets": [ - "all" - ] - }, - "Mac Builder (dbg)": { - "additional_compile_targets": [ - "all" - ] - }, "Mac GYP": { "additional_compile_targets": [ "base_unittests",
diff --git a/testing/buildbot/chromium.win.json b/testing/buildbot/chromium.win.json index e5fcfa8..2cf5a44 100644 --- a/testing/buildbot/chromium.win.json +++ b/testing/buildbot/chromium.win.json
@@ -491,21 +491,6 @@ } ] }, - "Win Builder": { - "additional_compile_targets": [ - "all" - ] - }, - "Win Builder (dbg)": { - "additional_compile_targets": [ - "all" - ] - }, - "Win x64 Builder (dbg)": { - "additional_compile_targets": [ - "all" - ] - }, "Win x64 GN": { "additional_compile_targets": [ "base_unittests"
diff --git a/testing/buildbot/trybot_analyze_config.json b/testing/buildbot/trybot_analyze_config.json index e5131bf5..dac3431a 100644 --- a/testing/buildbot/trybot_analyze_config.json +++ b/testing/buildbot/trybot_analyze_config.json
@@ -64,6 +64,7 @@ "third_party/web-animations-js/.*(css|html|js)", "third_party/zlib/google/test/data/.*", "tools/clang/scripts/update.py", + "tools/grit/.*", "tools/mb/.*", "tools/metrics/histograms/histograms.xml", "tools/perf/.*",
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index b8d5041..b8c9ede2 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -1909,22 +1909,13 @@ "name": "SearchOrTypeUrl" }, { - "name": "SearchOrTypeWebsiteName" + "name": "SearchOrTypeWebAddress" }, { - "name": "SearchTheWeb" + "name": "TypeWhatYouAreLookingFor" }, { - "name": "EnterASearchOrWebsite" - }, - { - "name": "SearchNews" - }, - { - "name": "SearchRecipes" - }, - { - "name": "SearchWeather" + "name": "FindNewsRecipesWeather" }, { "name": "Blank" @@ -3345,6 +3336,24 @@ ] } ], + "VideoCaptureService": [ + { + "platforms": [ + "linux", + "mac", + "win", + "ios" + ], + "experiments": [ + { + "name": "Enabled", + "enable_features": [ + "MojoVideoCapture" + ] + } + ] + } + ], "ViewsSimplifiedFullscreenUI": [ { "platforms": [
diff --git a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG index 0af43073..fa714d04 100644 --- a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG +++ b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
@@ -16404,7 +16404,7 @@ crbug.com/591099 inspector-protocol/css/media-query-listener-exception.html [ Failure ] crbug.com/591099 inspector-protocol/debugger/debugger-step-into-dedicated-worker.html [ Failure ] crbug.com/591099 inspector-protocol/debugger/suspend-setTimeout-on-pause-in-dedicated-worker.html [ Failure ] -crbug.com/591099 inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot.html [ Crash Failure Timeout ] +crbug.com/591099 inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot.js [ Crash Failure Timeout ] crbug.com/591099 inspector-protocol/dom/dom-getBoxModel.js [ Failure Pass ] crbug.com/591099 inspector-protocol/dom/dom-ns-attr-modified.js [ Failure ] crbug.com/591099 inspector-protocol/emulation/device-emulation-320-2x.html [ Failure ] @@ -16438,7 +16438,7 @@ crbug.com/591099 inspector-protocol/layout-fonts/languages-emoji-rare-glyphs.html [ Failure ] crbug.com/591099 inspector-protocol/network/resource-type.js [ Crash Failure ] crbug.com/591099 inspector-protocol/network/websocket-initiator.js [ Failure ] -crbug.com/591099 inspector-protocol/page/get-layout-metrics.html [ Failure ] +crbug.com/591099 inspector-protocol/page/get-layout-metrics.js [ Failure ] crbug.com/591099 inspector/agents-enable-disable.html [ Failure ] crbug.com/591099 inspector/animation/animation-KeyframeEffectReadOnly-crash.html [ Crash ] crbug.com/591099 inspector/animation/animation-empty-web-animations.html [ Crash Failure ]
diff --git a/third_party/WebKit/LayoutTests/FlagExpectations/root-layer-scrolls b/third_party/WebKit/LayoutTests/FlagExpectations/root-layer-scrolls index 36d5167..e8d2d8c 100644 --- a/third_party/WebKit/LayoutTests/FlagExpectations/root-layer-scrolls +++ b/third_party/WebKit/LayoutTests/FlagExpectations/root-layer-scrolls
@@ -460,11 +460,11 @@ Bug(none) inspector/layers/layers-panel-mouse-events.html [ Crash ] Bug(none) inspector/layers/layer-tree-model.html [ Crash ] Bug(none) inspector/layers/no-overlay-layers.html [ Crash ] -Bug(none) inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot.html [ Failure ] +Bug(none) inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot.js [ Failure ] Bug(none) inspector-protocol/emulation/forced-viewport-far.html [ Failure ] Bug(none) inspector-protocol/layers/get-layers.html [ Crash ] Bug(none) inspector-protocol/layers/paint-profiler.html [ Crash ] -Bug(none) inspector-protocol/page/get-layout-metrics.html [ Failure ] +Bug(none) inspector-protocol/page/get-layout-metrics.js [ Failure ] Bug(none) inspector/tracing/scroll-invalidations.html [ Failure ] Bug(none) inspector/tracing/timeline-paint/layer-tree.html [ Failure ] Bug(none) inspector/tracing/timeline-paint/timeline-paint-with-layout-invalidations.html [ Failure ]
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations index cb6fa4ab..72dae8a 100644 --- a/third_party/WebKit/LayoutTests/TestExpectations +++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -953,6 +953,8 @@ crbug.com/652964 [ Linux Win ] fast/text/hyphens/hyphens-orphaned-word.html [ Skip ] crbug.com/652964 [ Linux Win ] fast/text/hyphens/midword-break-priority.html [ Skip ] +crbug.com/729514 paint/invalidation/compositing/subpixel-offset-scaled-transform-composited.html [ Pass Failure ] + crbug.com/405389 external/wpt/css/css-shapes-1/shape-outside/supported-shapes/polygon/shape-outside-polygon-017.html [ Failure ] crbug.com/424365 external/wpt/css/css-shapes-1/shape-outside/shape-image/shape-image-010.html [ Failure ] crbug.com/424365 external/wpt/css/css-shapes-1/shape-outside/shape-image/shape-image-024.html [ Failure ] @@ -1713,6 +1715,9 @@ crbug.com/646644 [ Mac10.9 ] http/tests/media/video-buffered-range-contains-currentTime.html [ Failure Timeout ] crbug.com/646644 [ Mac10.9 ] virtual/mojo-loading/http/tests/media/video-buffered-range-contains-currentTime.html [ Failure Timeout ] +# This test is irrelevant because we're about to delete the virtual test suite anyway. +Bug(none) virtual/disable-spinvalidation/paint/invalidation/percentage-transform-paint-offset.html [ Crash ] + crbug.com/637930 http/tests/media/video-buffered.html [ Pass Failure ] crbug.com/637930 virtual/mojo-loading/http/tests/media/video-buffered.html [ Pass Failure ] @@ -1998,8 +2003,6 @@ # rebaseline-cl does not handle ref-tests yet... crbug.com/736811 fast/css/text-overflow-ellipsis-multiple-shadows.html [ Pass Failure ] crbug.com/736811 external/wpt/css/selectors4/focus-within-004.html [ Pass Failure ] -crbug.com/736811 fast/canvas/canvas-fillPath-gradient-shadow.html [ Pass Failure ] -crbug.com/736811 virtual/display_list_2d_canvas/fast/canvas/canvas-fillPath-gradient-shadow.html [ Pass Failure ] # Failures in non-wpt tests from: # https://chromium-review.googlesource.com/c/543695/
diff --git a/third_party/WebKit/LayoutTests/W3CImportExpectations b/third_party/WebKit/LayoutTests/W3CImportExpectations index ae1ecbd..5ce9785 100644 --- a/third_party/WebKit/LayoutTests/W3CImportExpectations +++ b/third_party/WebKit/LayoutTests/W3CImportExpectations
@@ -174,7 +174,8 @@ external/wpt/css/css-speech-1 [ Skip ] external/wpt/css/css-syntax-3 [ Skip ] external/wpt/css/css-style-attr [ Skip ] -external/wpt/css/css-tables-3 [ Skip ] +## Owners: dgrogan@chromium.org,joysyu@google.com +# external/wpt/css/css-tables-3 [ Pass ] external/wpt/css/css-text-3/hanging-punctuation [ Skip ] ## Owners: kojii@chromium.org # external/wpt/css/css-text-3/i18n [ Pass ]
diff --git a/third_party/WebKit/LayoutTests/compositing/culling/scrolled-within-boxshadow-expected.png b/third_party/WebKit/LayoutTests/compositing/culling/scrolled-within-boxshadow-expected.png new file mode 100644 index 0000000..35d9b26 --- /dev/null +++ b/third_party/WebKit/LayoutTests/compositing/culling/scrolled-within-boxshadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/culling/translated-boxshadow-expected.png b/third_party/WebKit/LayoutTests/compositing/culling/translated-boxshadow-expected.png new file mode 100644 index 0000000..0b7ed078 --- /dev/null +++ b/third_party/WebKit/LayoutTests/compositing/culling/translated-boxshadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/culling/unscrolled-within-boxshadow-expected.png b/third_party/WebKit/LayoutTests/compositing/culling/unscrolled-within-boxshadow-expected.png new file mode 100644 index 0000000..35d9b26 --- /dev/null +++ b/third_party/WebKit/LayoutTests/compositing/culling/unscrolled-within-boxshadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/scrollbar-layer-placement-expected.png b/third_party/WebKit/LayoutTests/compositing/overflow/scrollbar-layer-placement-expected.png new file mode 100644 index 0000000..27dc9907 --- /dev/null +++ b/third_party/WebKit/LayoutTests/compositing/overflow/scrollbar-layer-placement-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/printing/print-box-shadow-expected.png b/third_party/WebKit/LayoutTests/css3/filters/effect-reference-subregion-nested-expected.png similarity index 67% rename from third_party/WebKit/LayoutTests/platform/win/paint/printing/print-box-shadow-expected.png rename to third_party/WebKit/LayoutTests/css3/filters/effect-reference-subregion-nested-expected.png index 2e24bc09..a4ccdd9f 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/printing/print-box-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/css3/filters/effect-reference-subregion-nested-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/css3/filters/multiple-filters-invalidation-expected.png b/third_party/WebKit/LayoutTests/css3/filters/multiple-filters-invalidation-expected.png index 651893e..20d54c1 100644 --- a/third_party/WebKit/LayoutTests/css3/filters/multiple-filters-invalidation-expected.png +++ b/third_party/WebKit/LayoutTests/css3/filters/multiple-filters-invalidation-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/css3/filters/nested-filter-expected.png b/third_party/WebKit/LayoutTests/css3/filters/nested-filter-expected.png index 93f9eef..5d4e3702 100644 --- a/third_party/WebKit/LayoutTests/css3/filters/nested-filter-expected.png +++ b/third_party/WebKit/LayoutTests/css3/filters/nested-filter-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/css3/masking/mask-luminance-png-expected.png b/third_party/WebKit/LayoutTests/css3/masking/mask-luminance-png-expected.png index a26bb6d..7076328d 100644 --- a/third_party/WebKit/LayoutTests/css3/masking/mask-luminance-png-expected.png +++ b/third_party/WebKit/LayoutTests/css3/masking/mask-luminance-png-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/editing/surrounding-text/surrounding-text-expected.txt b/third_party/WebKit/LayoutTests/editing/surrounding-text/surrounding-text-expected.txt index bebc15f..48da62ca 100644 --- a/third_party/WebKit/LayoutTests/editing/surrounding-text/surrounding-text-expected.txt +++ b/third_party/WebKit/LayoutTests/editing/surrounding-text/surrounding-text-expected.txt
@@ -12,8 +12,8 @@ PASS surroundingText('<fieldset>.</fieldset>12345<button>abc</button><p>6789<br id="here"/>12345</p>6789<textarea>abc</textarea>0123<fieldset>.</fieldset>', 0, 100) is "6789 12345 6789" PASS surroundingText('<button>.</button><div id="here">This is <!-- comment --!>a test <' + 'script language="javascript"><' + '/script>example<button>.</button>', 0, 100) is "This is a test example" PASS surroundingText('<button>.</button><div id="here">012345678901234567890123456789</div><button>.</button>', 15, 12) is "901234567890" -PASS surroundingText('<option>.</option>12345<button id="here">test</button><option>.</option>', 1, 100) is "t" -PASS surroundingText('<option>.</option>12345<button>te<span id="here">st</span></button><option>.</option>', 0, 100) is "te" +PASS surroundingText('<option>.</option>12345<button id="here">test</button><option>.</option>', 0, 100) is "" +PASS surroundingText('<option>.</option>12345<button>te<span id="here">st</span></button><option>.</option>', 0, 100) is "" PASS surroundingText('<p id="here">.</p>', 0, 2) is "." PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/editing/surrounding-text/surrounding-text.html b/third_party/WebKit/LayoutTests/editing/surrounding-text/surrounding-text.html index 55ac8b2c..31ac783 100644 --- a/third_party/WebKit/LayoutTests/editing/surrounding-text/surrounding-text.html +++ b/third_party/WebKit/LayoutTests/editing/surrounding-text/surrounding-text.html
@@ -54,8 +54,8 @@ shouldBeEqualToString('surroundingText(\'<fieldset>.</fieldset>12345<button>abc</button><p>6789<br id="here"/>12345</p>6789<textarea>abc</textarea>0123<fieldset>.</fieldset>\', 0, 100)', '6789 12345 6789'); shouldBeEqualToString('surroundingText(\'<button>.</button><div id="here">This is <!-- comment --!>a test <\' + \'script language="javascript"><\' + \'/script>example<button>.</button>\', 0, 100)', 'This is a test example'); shouldBeEqualToString('surroundingText(\'<button>.</button><div id="here">012345678901234567890123456789</div><button>.</button>\', 15, 12)', '901234567890'); - shouldBeEqualToString('surroundingText(\'<option>.</option>12345<button id="here">test</button><option>.</option>\', 1, 100)', 't'); - shouldBeEqualToString('surroundingText(\'<option>.</option>12345<button>te<span id="here">st</span></button><option>.</option>\', 0, 100)', 'te'); + shouldBeEqualToString('surroundingText(\'<option>.</option>12345<button id="here">test</button><option>.</option>\', 0, 100)', ''); + shouldBeEqualToString('surroundingText(\'<option>.</option>12345<button>te<span id="here">st</span></button><option>.</option>\', 0, 100)', ''); shouldBeEqualToString('surroundingText(\'<p id="here">.</p>\', 0, 2)', '.'); document.body.removeChild(document.getElementById('test'));
diff --git a/third_party/WebKit/LayoutTests/fast/borders/border-radius-with-box-shadow-01-expected.png b/third_party/WebKit/LayoutTests/fast/borders/border-radius-with-box-shadow-01-expected.png new file mode 100644 index 0000000..381ba60 --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/borders/border-radius-with-box-shadow-01-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/box-shadow/box-shadow-clipped-slices-expected.png b/third_party/WebKit/LayoutTests/fast/box-shadow/box-shadow-clipped-slices-expected.png new file mode 100644 index 0000000..129bea0 --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/box-shadow/box-shadow-clipped-slices-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/box-shadow/box-shadow-radius-expected.png b/third_party/WebKit/LayoutTests/fast/box-shadow/box-shadow-radius-expected.png new file mode 100644 index 0000000..457e4adf5 --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/box-shadow/box-shadow-radius-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/box-shadow/inset-box-shadow-radius-expected.png b/third_party/WebKit/LayoutTests/fast/box-shadow/inset-box-shadow-radius-expected.png new file mode 100644 index 0000000..4548ba2 --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/box-shadow/inset-box-shadow-radius-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/box-shadow/spread-multiple-normal-expected.png b/third_party/WebKit/LayoutTests/fast/box-shadow/spread-multiple-normal-expected.png new file mode 100644 index 0000000..47d7ca32 --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/box-shadow/spread-multiple-normal-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/forms/select/listbox-no-force-layout.html b/third_party/WebKit/LayoutTests/fast/forms/select/listbox-no-force-layout.html new file mode 100644 index 0000000..1133966 --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/forms/select/listbox-no-force-layout.html
@@ -0,0 +1,28 @@ +<!DOCTYPE html> +<body> +<script src="../../../resources/testharness.js"></script> +<script src="../../../resources/testharnessreport.js"></script> + +<select size="4" multiple> +<option>option 1</option> +<option>option 2</option> +<option>option 3</option> +<option>option 4</option> +<option id="o5">option 5</option> +</select> +<script> +var preCount; +var t = async_test('OPTION selection should not force layout.'); +requestAnimationFrame(t.step_func(() => { + assert_exists(window, 'internals'); + preCount = internals.forceLayoutCount; + // Make sure layout-dirty + document.body.append('text'); + document.querySelector('#o5').selected = true; + + requestAnimationFrame(t.step_func_done(() => { + assert_equals(internals.forceLayoutCount - preCount, 0); + })); +})); +</script> +</body>
diff --git a/third_party/WebKit/LayoutTests/fast/forms/select/select-initial-position.html b/third_party/WebKit/LayoutTests/fast/forms/select/select-initial-position.html index 7e24851..966565a 100644 --- a/third_party/WebKit/LayoutTests/fast/forms/select/select-initial-position.html +++ b/third_party/WebKit/LayoutTests/fast/forms/select/select-initial-position.html
@@ -143,6 +143,26 @@ sel.appendChild(opt); </script> -</body> +<p>Display 'none' to 'inline-block'</p> +<select style="display:none;" id="select-none" size="4"> +<option>option1</option> +<option>option2</option> +<option>option3</option> +<option>option4</option> +<option>option5</option> +<option>option6</option> +<option selected>This should be selected and visible.</option> +</select> +<script> +// Force layout with display:none. +document.body.offsetHeight; +if (window.testRunner) + testRunner.waitUntilDone(); +requestAnimationFrame(() => { + document.querySelector('#select-none').style.display = 'inline-block'; + testRunner.notifyDone(); +}); +</script> +</body> </html>
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/clip-unclip-and-change-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/clip-unclip-and-change-expected.txt new file mode 100644 index 0000000..40f8c71 --- /dev/null +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/clip-unclip-and-change-expected.txt
@@ -0,0 +1,24 @@ +{ + "layers": [ + { + "name": "LayoutView #document", + "bounds": [800, 600], + "contentsOpaque": true, + "drawsContent": true, + "paintInvalidations": [ + { + "object": "LayoutBlockFlow DIV", + "rect": [8, 120, 100, 100], + "reason": "appeared" + } + ] + } + ], + "objectPaintInvalidations": [ + { + "object": "LayoutBlockFlow DIV id='content'", + "reason": "style change" + } + ] +} +
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/css-clip-change-stacking-child-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/css-clip-change-stacking-child-expected.txt new file mode 100644 index 0000000..6a1a805 --- /dev/null +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/css-clip-change-stacking-child-expected.txt
@@ -0,0 +1,32 @@ +{ + "layers": [ + { + "name": "LayoutView #document", + "bounds": [800, 600], + "contentsOpaque": true, + "drawsContent": true, + "paintInvalidations": [ + { + "object": "LayoutBlockFlow DIV", + "rect": [8, 8, 300, 200], + "reason": "subtree" + } + ] + } + ], + "objectPaintInvalidations": [ + { + "object": "LayoutBlockFlow (positioned) DIV id='target'", + "reason": "subtree" + }, + { + "object": "LayoutBlockFlow DIV", + "reason": "subtree" + }, + { + "object": "LayoutBlockFlow DIV", + "reason": "subtree" + } + ] +} +
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/mask-clip-change-stacking-child-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/mask-clip-change-stacking-child-expected.txt new file mode 100644 index 0000000..f11b48b --- /dev/null +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/mask-clip-change-stacking-child-expected.txt
@@ -0,0 +1,38 @@ +{ + "layers": [ + { + "name": "LayoutView #document", + "bounds": [800, 600], + "contentsOpaque": true, + "drawsContent": true + }, + { + "name": "LayoutBlockFlow DIV", + "position": [8, 8], + "bounds": [500, 500], + "contentsOpaque": false, + "drawsContent": true + }, + { + "name": "LayoutBlockFlow (positioned) DIV id='target'", + "position": [8, 8], + "bounds": [300, 200], + "contentsOpaque": false, + "drawsContent": true, + "paintInvalidations": [ + { + "object": "LayoutBlockFlow (positioned) DIV id='target'", + "rect": [0, 0, 300, 300], + "reason": "geometry" + } + ] + } + ], + "objectPaintInvalidations": [ + { + "object": "LayoutBlockFlow (positioned) DIV id='target'", + "reason": "geometry" + } + ] +} +
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-input-expected.txt b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-input-expected.txt index 964fb32..aac4641 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-input-expected.txt +++ b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-input-expected.txt
@@ -948,7 +948,7 @@ "type": "relatedElement", "value": { "type": "computedString", - "value": "label-wrapping-text10 " + "value": "label-wrapping-text10" }, "nativeSource": "labelwrapped", "nativeSourceValue": { @@ -956,7 +956,7 @@ "relatedNodes": [ { "backendDOMNodeId": "<number>", - "text": "label-wrapping-text10 " + "text": "label-wrapping-text10" } ] } @@ -1037,7 +1037,7 @@ "type": "nodeList", "relatedNodes": [ { - "text": "label-wrapping-text10 ", + "text": "label-wrapping-text10", "nodeResult": "label" } ]
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-input.js b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-input.js index 2e46958..c6d5d94f 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-input.js +++ b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-input.js
@@ -35,8 +35,7 @@ <label for='text9'>label-for-text9</label> <label>label-wrapping-text9<input data-dump id='text9' type='text' title='text9-title' aria-placeholder='text9-aria-placeholder' placeholder='text9-placeholder'></label> - <label>label-wrapping-text10<input data-dump id='text10' type='text' title='text10-title' aria-placeholder='text10-aria-placeholder' placeholder='text10-placeholder'> - </label> + <label>label-wrapping-text10<input data-dump id='text10' type='text' title='text10-title' aria-placeholder='text10-aria-placeholder' placeholder='text10-placeholder'></label> <input data-dump id='text11' type='text'> <label for='text11'>first-label-for-text11</label>
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot-expected.txt b/third_party/WebKit/LayoutTests/inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot-expected.txt index d1f160e..8b17141 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot-expected.txt +++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot-expected.txt
@@ -1,17 +1,11 @@ -Some Text -And More Text -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque sit amet est sem. Aenean ut neque volutpat, posuere odio at, mollis nibh. Aenean sodales nulla et ligula efficitur sollicitudin blandit sed lectus. Duis orci enim, sodales ac lectus sed, hendrerit efficitur est. Quisque gravida facilisis viverra. - -Lets have a span -Rotated text! - +Tests DOMSnapshot.getSnapshot method. { "domNodes": [ { "nodeType": 9, "nodeName": "#document", "nodeValue": "", - "backendNodeId": 2, + "backendNodeId": "<number>", "childNodeIndexes": [ 1 ], @@ -23,11 +17,11 @@ "nodeType": 1, "nodeName": "HTML", "nodeValue": "", - "backendNodeId": 3, + "backendNodeId": "<number>", "childNodeIndexes": [ 2, - 13, - 14 + 8, + 9 ], "layoutNodeIndex": 1, "frameId": "<string>" @@ -36,29 +30,25 @@ "nodeType": 1, "nodeName": "HEAD", "nodeValue": "", - "backendNodeId": 4, + "backendNodeId": "<number>", "childNodeIndexes": [ 3, 4, 6, - 7, - 8, - 9, - 11, - 12 + 7 ] }, { "nodeType": 3, "nodeName": "#text", - "nodeValue": "\n", - "backendNodeId": 5 + "nodeValue": "\n ", + "backendNodeId": "<number>" }, { "nodeType": 1, "nodeName": "STYLE", "nodeValue": "", - "backendNodeId": 6, + "backendNodeId": "<number>", "childNodeIndexes": [ 5 ] @@ -66,79 +56,36 @@ { "nodeType": 3, "nodeName": "#text", - "nodeValue": "\n@font-face {\n font-family: 'ahem';\n src: url(../../resources/Ahem.ttf);\n}\n", - "backendNodeId": 7 + "nodeValue": "\n @font-face {\n font-family: 'ahem';\n src: url(../../resources/Ahem.ttf);\n }\n ", + "backendNodeId": "<number>" + }, + { + "nodeType": 3, + "nodeName": "#text", + "nodeValue": "\n ", + "backendNodeId": "<number>" }, { "nodeType": 3, "nodeName": "#text", "nodeValue": "\n", - "backendNodeId": 8 - }, - { - "nodeType": 1, - "nodeName": "SCRIPT", - "nodeValue": "", - "backendNodeId": 9, - "attributes": [ - { - "name": "type", - "value": "text/javascript" - }, - { - "name": "src", - "value": "../../http/tests/inspector-protocol/resources/inspector-protocol-test.js" - } - ] + "backendNodeId": "<number>" }, { "nodeType": 3, "nodeName": "#text", "nodeValue": "\n", - "backendNodeId": 10 - }, - { - "nodeType": 1, - "nodeName": "SCRIPT", - "nodeValue": "", - "backendNodeId": 11, - "childNodeIndexes": [ - 10 - ] - }, - { - "nodeType": 3, - "nodeName": "#text", - "nodeValue": "\n\nasync function test() {\n function stabilize(key, value) {\n var unstableKeys = [\"documentURL\", \"baseURL\", \"frameId\"];\n if (unstableKeys.indexOf(key) !== -1)\n return \"<\" + typeof(value) + \">\";\n return value;\n }\n \n var whitelist = [\"transform\", \"transform-origin\", \"height\", \"width\", \"display\", \"outline-color\", \"color\"];\n var response = await InspectorTest.sendCommandOrDie(\"DOMSnapshot.getSnapshot\", {\"computedStyleWhitelist\": whitelist});\n InspectorTest.log(JSON.stringify(response, stabilize, 2));\n InspectorTest.completeTest();\n}\n\n", - "backendNodeId": 12 - }, - { - "nodeType": 3, - "nodeName": "#text", - "nodeValue": "\n", - "backendNodeId": 13 - }, - { - "nodeType": 3, - "nodeName": "#text", - "nodeValue": "\n", - "backendNodeId": 14 - }, - { - "nodeType": 3, - "nodeName": "#text", - "nodeValue": "\n", - "backendNodeId": 15 + "backendNodeId": "<number>" }, { "nodeType": 1, "nodeName": "BODY", "nodeValue": "", - "backendNodeId": 16, + "backendNodeId": "<number>", "childNodeIndexes": [ - 15, - 16, - 66 + 10, + 11, + 58 ], "attributes": [ { @@ -152,27 +99,25 @@ "nodeType": 3, "nodeName": "#text", "nodeValue": "\n", - "backendNodeId": 17 + "backendNodeId": "<number>" }, { "nodeType": 1, "nodeName": "DIV", "nodeValue": "", - "backendNodeId": 18, + "backendNodeId": "<number>", "childNodeIndexes": [ - 17, - 18, - 20, - 21, - 34, - 35, - 37, - 38, - 52, - 53, - 62, - 63, - 65 + 12, + 13, + 15, + 16, + 29, + 30, + 32, + 33, + 47, + 48, + 57 ], "attributes": [ { @@ -185,16 +130,16 @@ { "nodeType": 3, "nodeName": "#text", - "nodeValue": "\n ", - "backendNodeId": 19 + "nodeValue": "\n ", + "backendNodeId": "<number>" }, { "nodeType": 1, "nodeName": "DIV", "nodeValue": "", - "backendNodeId": 20, + "backendNodeId": "<number>", "childNodeIndexes": [ - 19 + 14 ], "attributes": [ { @@ -208,27 +153,27 @@ "nodeType": 3, "nodeName": "#text", "nodeValue": "Some Text", - "backendNodeId": 21, + "backendNodeId": "<number>", "layoutNodeIndex": 5 }, { "nodeType": 3, "nodeName": "#text", - "nodeValue": " And More Text\n ", - "backendNodeId": 22, + "nodeValue": " And More Text\n ", + "backendNodeId": "<number>", "layoutNodeIndex": 6 }, { "nodeType": 1, "nodeName": "DIV", "nodeValue": "", - "backendNodeId": 23, + "backendNodeId": "<number>", "childNodeIndexes": [ - 22, - 23, - 25, - 26, - 33 + 17, + 18, + 20, + 21, + 28 ], "attributes": [ { @@ -241,43 +186,43 @@ { "nodeType": 3, "nodeName": "#text", - "nodeValue": "\n ", - "backendNodeId": 24 + "nodeValue": "\n ", + "backendNodeId": "<number>" }, { "nodeType": 1, "nodeName": "P", "nodeValue": "", - "backendNodeId": 25, + "backendNodeId": "<number>", "childNodeIndexes": [ - 24 + 19 ], "layoutNodeIndex": 8 }, { "nodeType": 3, "nodeName": "#text", - "nodeValue": "\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque sit amet est sem.\n Aenean ut neque volutpat, posuere odio at, mollis nibh. Aenean sodales nulla et\n ligula efficitur sollicitudin blandit sed lectus. Duis orci enim, sodales ac lectus sed,\n hendrerit efficitur est. Quisque gravida facilisis viverra.\n ", - "backendNodeId": 26, + "nodeValue": "\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque sit amet est sem.\n Aenean ut neque volutpat, posuere odio at, mollis nibh. Aenean sodales nulla et\n ligula efficitur sollicitudin blandit sed lectus. Duis orci enim, sodales ac lectus sed,\n hendrerit efficitur est. Quisque gravida facilisis viverra.\n ", + "backendNodeId": "<number>", "layoutNodeIndex": 9 }, { "nodeType": 3, "nodeName": "#text", - "nodeValue": "\n ", - "backendNodeId": 27 + "nodeValue": "\n ", + "backendNodeId": "<number>" }, { "nodeType": 1, "nodeName": "UL", "nodeValue": "", - "backendNodeId": 28, + "backendNodeId": "<number>", "childNodeIndexes": [ - 27, - 28, - 29, - 30, - 32 + 22, + 23, + 24, + 25, + 27 ], "attributes": [ { @@ -290,14 +235,14 @@ { "nodeType": 3, "nodeName": "#text", - "nodeValue": "\n ", - "backendNodeId": 29 + "nodeValue": "\n ", + "backendNodeId": "<number>" }, { "nodeType": 1, "nodeName": "LI", "nodeValue": "", - "backendNodeId": 30, + "backendNodeId": "<number>", "attributes": [ { "name": "class", @@ -309,16 +254,16 @@ { "nodeType": 3, "nodeName": "#text", - "nodeValue": "\n ", - "backendNodeId": 31 + "nodeValue": "\n ", + "backendNodeId": "<number>" }, { "nodeType": 1, "nodeName": "SPAN", "nodeValue": "", - "backendNodeId": 32, + "backendNodeId": "<number>", "childNodeIndexes": [ - 31 + 26 ], "layoutNodeIndex": 12 }, @@ -326,36 +271,36 @@ "nodeType": 3, "nodeName": "#text", "nodeValue": "Lets have a span", - "backendNodeId": 33, + "backendNodeId": "<number>", "layoutNodeIndex": 13 }, { "nodeType": 3, "nodeName": "#text", - "nodeValue": "\n ", - "backendNodeId": 34, + "nodeValue": "\n ", + "backendNodeId": "<number>", "layoutNodeIndex": 14 }, { "nodeType": 3, "nodeName": "#text", - "nodeValue": "\n ", - "backendNodeId": 35 + "nodeValue": "\n ", + "backendNodeId": "<number>" }, { "nodeType": 3, "nodeName": "#text", - "nodeValue": "\n ", - "backendNodeId": 36, + "nodeValue": "\n ", + "backendNodeId": "<number>", "layoutNodeIndex": 15 }, { "nodeType": 1, "nodeName": "DIV", "nodeValue": "", - "backendNodeId": 37, + "backendNodeId": "<number>", "childNodeIndexes": [ - 36 + 31 ], "attributes": [ { @@ -369,24 +314,24 @@ "nodeType": 3, "nodeName": "#text", "nodeValue": "Rotated text!", - "backendNodeId": 38, + "backendNodeId": "<number>", "layoutNodeIndex": 17 }, { "nodeType": 3, "nodeName": "#text", - "nodeValue": "\n ", - "backendNodeId": 39 + "nodeValue": "\n ", + "backendNodeId": "<number>" }, { "nodeType": 1, "nodeName": "IFRAME", "nodeValue": "", - "backendNodeId": 40, + "backendNodeId": "<number>", "attributes": [ { "name": "src", - "value": "../dom/resources/simple-iframe.html" + "value": "./simple-iframe.html" }, { "name": "width", @@ -399,15 +344,15 @@ ], "layoutNodeIndex": 18, "frameId": "<string>", - "contentDocumentIndex": 39 + "contentDocumentIndex": 34 }, { "nodeType": 9, "nodeName": "#document", "nodeValue": "", - "backendNodeId": 41, + "backendNodeId": "<number>", "childNodeIndexes": [ - 40 + 35 ], "layoutNodeIndex": 19, "documentURL": "<string>", @@ -417,11 +362,11 @@ "nodeType": 1, "nodeName": "HTML", "nodeValue": "", - "backendNodeId": 42, + "backendNodeId": "<number>", "childNodeIndexes": [ + 36, 41, - 46, - 47 + 42 ], "layoutNodeIndex": 20, "frameId": "<string>" @@ -430,55 +375,55 @@ "nodeType": 1, "nodeName": "HEAD", "nodeValue": "", - "backendNodeId": 43, + "backendNodeId": "<number>", "childNodeIndexes": [ - 42, - 43, - 45 + 37, + 38, + 40 ] }, { "nodeType": 3, "nodeName": "#text", "nodeValue": "\n", - "backendNodeId": 44 + "backendNodeId": "<number>" }, { "nodeType": 1, "nodeName": "STYLE", "nodeValue": "", - "backendNodeId": 45, + "backendNodeId": "<number>", "childNodeIndexes": [ - 44 + 39 ] }, { "nodeType": 3, "nodeName": "#text", - "nodeValue": "\n@font-face {\n font-family: 'ahem';\n src: url(../../../resources/Ahem.ttf);\n}\n", - "backendNodeId": 46 + "nodeValue": "\n@font-face {\n font-family: 'ahem';\n src: url(../../resources/Ahem.ttf);\n}\n", + "backendNodeId": "<number>" }, { "nodeType": 3, "nodeName": "#text", "nodeValue": "\n", - "backendNodeId": 47 + "backendNodeId": "<number>" }, { "nodeType": 3, "nodeName": "#text", "nodeValue": "\n", - "backendNodeId": 48 + "backendNodeId": "<number>" }, { "nodeType": 1, "nodeName": "BODY", "nodeValue": "", - "backendNodeId": 49, + "backendNodeId": "<number>", "childNodeIndexes": [ - 48, - 49, - 51 + 43, + 44, + 46 ], "layoutNodeIndex": 21 }, @@ -486,15 +431,15 @@ "nodeType": 3, "nodeName": "#text", "nodeValue": "\n", - "backendNodeId": 50 + "backendNodeId": "<number>" }, { "nodeType": 1, "nodeName": "DIV", "nodeValue": "", - "backendNodeId": 51, + "backendNodeId": "<number>", "childNodeIndexes": [ - 50 + 45 ], "attributes": [ { @@ -508,33 +453,33 @@ "nodeType": 3, "nodeName": "#text", "nodeValue": "\nHello from the iframe.\n", - "backendNodeId": 52, + "backendNodeId": "<number>", "layoutNodeIndex": 23 }, { "nodeType": 3, "nodeName": "#text", "nodeValue": "\n\n\n", - "backendNodeId": 53 + "backendNodeId": "<number>" }, { "nodeType": 3, "nodeName": "#text", - "nodeValue": "\n ", - "backendNodeId": 54, + "nodeValue": "\n ", + "backendNodeId": "<number>", "layoutNodeIndex": 24 }, { "nodeType": 1, "nodeName": "DIV", "nodeValue": "", - "backendNodeId": 55, + "backendNodeId": "<number>", "childNodeIndexes": [ - 54, - 55, - 57, - 58, - 61 + 49, + 50, + 52, + 53, + 56 ], "attributes": [ { @@ -547,37 +492,37 @@ { "nodeType": 3, "nodeName": "#text", - "nodeValue": "\n", - "backendNodeId": 56 + "nodeValue": "\n ", + "backendNodeId": "<number>" }, { "nodeType": 1, "nodeName": "STYLE", "nodeValue": "", - "backendNodeId": 57, + "backendNodeId": "<number>", "childNodeIndexes": [ - 56 + 51 ] }, { "nodeType": 3, "nodeName": "#text", - "nodeValue": "\n:host {\n color: red;\n}\n", - "backendNodeId": 58 + "nodeValue": "\n :host {\n color: red;\n }\n ", + "backendNodeId": "<number>" }, { "nodeType": 3, "nodeName": "#text", - "nodeValue": "\n", - "backendNodeId": 59 + "nodeValue": "\n ", + "backendNodeId": "<number>" }, { "nodeType": 1, "nodeName": "DIV", "nodeValue": "", - "backendNodeId": 60, + "backendNodeId": "<number>", "childNodeIndexes": [ - 59 + 54 ], "attributes": [ { @@ -591,9 +536,9 @@ "nodeType": 1, "nodeName": "H1", "nodeValue": "", - "backendNodeId": 61, + "backendNodeId": "<number>", "childNodeIndexes": [ - 60 + 55 ], "layoutNodeIndex": 27 }, @@ -601,53 +546,26 @@ "nodeType": 3, "nodeName": "#text", "nodeValue": "Hi!", - "backendNodeId": 62, + "backendNodeId": "<number>", "layoutNodeIndex": 28 }, { "nodeType": 3, "nodeName": "#text", - "nodeValue": "\n", - "backendNodeId": 63 - }, - { - "nodeType": 3, - "nodeName": "#text", - "nodeValue": "\n ", - "backendNodeId": 64 - }, - { - "nodeType": 1, - "nodeName": "SCRIPT", - "nodeValue": "", - "backendNodeId": 65, - "childNodeIndexes": [ - 64 - ], - "attributes": [ - { - "name": "type", - "value": "text/javascript" - } - ] - }, - { - "nodeType": 3, - "nodeName": "#text", - "nodeValue": "\n var host = document.querySelector(\"#shadow-host\").createShadowRoot();\n var template = document.querySelector(\"#shadow-template\");\n host.appendChild(template.content);\n template.remove();\n window.onload = runTest;\n ", - "backendNodeId": 66 + "nodeValue": "\n ", + "backendNodeId": "<number>" }, { "nodeType": 3, "nodeName": "#text", "nodeValue": "\n", - "backendNodeId": 67 + "backendNodeId": "<number>" }, { "nodeType": 3, "nodeName": "#text", "nodeValue": "\n\n\n", - "backendNodeId": 68 + "backendNodeId": "<number>" } ], "layoutTreeNodes": [ @@ -671,7 +589,7 @@ "styleIndex": 0 }, { - "domNodeIndex": 14, + "domNodeIndex": 9, "boundingBox": { "x": 8, "y": 8, @@ -681,7 +599,7 @@ "styleIndex": 1 }, { - "domNodeIndex": 16, + "domNodeIndex": 11, "boundingBox": { "x": 8, "y": 8, @@ -691,7 +609,7 @@ "styleIndex": 1 }, { - "domNodeIndex": 18, + "domNodeIndex": 13, "boundingBox": { "x": 8, "y": 8, @@ -701,7 +619,7 @@ "styleIndex": 2 }, { - "domNodeIndex": 19, + "domNodeIndex": 14, "boundingBox": { "x": 8, "y": 8, @@ -724,14 +642,14 @@ "styleIndex": 3 }, { - "domNodeIndex": 20, + "domNodeIndex": 15, "boundingBox": { "x": 8, "y": 568, "width": 224, "height": 16 }, - "layoutText": " And More Text\n ", + "layoutText": " And More Text\n ", "inlineTextNodes": [ { "boundingBox": { @@ -747,7 +665,7 @@ "styleIndex": 3 }, { - "domNodeIndex": 21, + "domNodeIndex": 16, "boundingBox": { "x": 232, "y": 24, @@ -757,7 +675,7 @@ "styleIndex": 4 }, { - "domNodeIndex": 23, + "domNodeIndex": 18, "boundingBox": { "x": 232, "y": 40, @@ -767,14 +685,14 @@ "styleIndex": 5 }, { - "domNodeIndex": 24, + "domNodeIndex": 19, "boundingBox": { "x": 232, "y": 40, "width": 192, "height": 480 }, - "layoutText": "\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque sit amet est sem.\n Aenean ut neque volutpat, posuere odio at, mollis nibh. Aenean sodales nulla et\n ligula efficitur sollicitudin blandit sed lectus. Duis orci enim, sodales ac lectus sed,\n hendrerit efficitur est. Quisque gravida facilisis viverra.\n ", + "layoutText": "\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque sit amet est sem.\n Aenean ut neque volutpat, posuere odio at, mollis nibh. Aenean sodales nulla et\n ligula efficitur sollicitudin blandit sed lectus. Duis orci enim, sodales ac lectus sed,\n hendrerit efficitur est. Quisque gravida facilisis viverra.\n ", "inlineTextNodes": [ { "boundingBox": { @@ -783,7 +701,7 @@ "width": 176, "height": 16 }, - "startCharacterIndex": 9, + "startCharacterIndex": 7, "numCharacters": 11 }, { @@ -793,7 +711,7 @@ "width": 144, "height": 16 }, - "startCharacterIndex": 21, + "startCharacterIndex": 19, "numCharacters": 9 }, { @@ -803,7 +721,7 @@ "width": 80, "height": 16 }, - "startCharacterIndex": 31, + "startCharacterIndex": 29, "numCharacters": 5 }, { @@ -813,7 +731,7 @@ "width": 176, "height": 16 }, - "startCharacterIndex": 37, + "startCharacterIndex": 35, "numCharacters": 11 }, { @@ -823,7 +741,7 @@ "width": 160, "height": 16 }, - "startCharacterIndex": 49, + "startCharacterIndex": 47, "numCharacters": 10 }, { @@ -833,7 +751,7 @@ "width": 80, "height": 16 }, - "startCharacterIndex": 60, + "startCharacterIndex": 58, "numCharacters": 5 }, { @@ -843,7 +761,7 @@ "width": 192, "height": 16 }, - "startCharacterIndex": 66, + "startCharacterIndex": 64, "numCharacters": 12 }, { @@ -853,7 +771,7 @@ "width": 192, "height": 16 }, - "startCharacterIndex": 79, + "startCharacterIndex": 77, "numCharacters": 12 }, { @@ -863,7 +781,7 @@ "width": 80, "height": 16 }, - "startCharacterIndex": 92, + "startCharacterIndex": 90, "numCharacters": 5 }, { @@ -873,7 +791,7 @@ "width": 96, "height": 16 }, - "startCharacterIndex": 105, + "startCharacterIndex": 101, "numCharacters": 6 }, { @@ -883,7 +801,7 @@ "width": 128, "height": 16 }, - "startCharacterIndex": 112, + "startCharacterIndex": 108, "numCharacters": 8 }, { @@ -893,7 +811,7 @@ "width": 144, "height": 16 }, - "startCharacterIndex": 121, + "startCharacterIndex": 117, "numCharacters": 9 }, { @@ -903,7 +821,7 @@ "width": 192, "height": 16 }, - "startCharacterIndex": 131, + "startCharacterIndex": 127, "numCharacters": 12 }, { @@ -913,7 +831,7 @@ "width": 160, "height": 16 }, - "startCharacterIndex": 144, + "startCharacterIndex": 140, "numCharacters": 10 }, { @@ -923,7 +841,7 @@ "width": 192, "height": 16 }, - "startCharacterIndex": 155, + "startCharacterIndex": 151, "numCharacters": 12 }, { @@ -933,7 +851,7 @@ "width": 112, "height": 16 }, - "startCharacterIndex": 168, + "startCharacterIndex": 164, "numCharacters": 7 }, { @@ -943,7 +861,7 @@ "width": 128, "height": 16 }, - "startCharacterIndex": 176, + "startCharacterIndex": 172, "numCharacters": 8 }, { @@ -953,7 +871,7 @@ "width": 96, "height": 16 }, - "startCharacterIndex": 193, + "startCharacterIndex": 187, "numCharacters": 6 }, { @@ -963,7 +881,7 @@ "width": 144, "height": 16 }, - "startCharacterIndex": 200, + "startCharacterIndex": 194, "numCharacters": 9 }, { @@ -973,7 +891,7 @@ "width": 192, "height": 16 }, - "startCharacterIndex": 210, + "startCharacterIndex": 204, "numCharacters": 12 }, { @@ -983,7 +901,7 @@ "width": 176, "height": 16 }, - "startCharacterIndex": 223, + "startCharacterIndex": 217, "numCharacters": 11 }, { @@ -993,7 +911,7 @@ "width": 192, "height": 16 }, - "startCharacterIndex": 235, + "startCharacterIndex": 229, "numCharacters": 12 }, { @@ -1003,7 +921,7 @@ "width": 160, "height": 16 }, - "startCharacterIndex": 248, + "startCharacterIndex": 242, "numCharacters": 10 }, { @@ -1013,7 +931,7 @@ "width": 160, "height": 16 }, - "startCharacterIndex": 259, + "startCharacterIndex": 253, "numCharacters": 10 }, { @@ -1023,7 +941,7 @@ "width": 176, "height": 16 }, - "startCharacterIndex": 270, + "startCharacterIndex": 264, "numCharacters": 11 }, { @@ -1033,7 +951,7 @@ "width": 144, "height": 16 }, - "startCharacterIndex": 290, + "startCharacterIndex": 282, "numCharacters": 9 }, { @@ -1043,7 +961,7 @@ "width": 144, "height": 16 }, - "startCharacterIndex": 300, + "startCharacterIndex": 292, "numCharacters": 9 }, { @@ -1053,7 +971,7 @@ "width": 192, "height": 16 }, - "startCharacterIndex": 310, + "startCharacterIndex": 302, "numCharacters": 12 }, { @@ -1063,7 +981,7 @@ "width": 112, "height": 16 }, - "startCharacterIndex": 323, + "startCharacterIndex": 315, "numCharacters": 7 }, { @@ -1073,7 +991,7 @@ "width": 144, "height": 16 }, - "startCharacterIndex": 331, + "startCharacterIndex": 323, "numCharacters": 9 }, { @@ -1083,14 +1001,14 @@ "width": 128, "height": 16 }, - "startCharacterIndex": 341, + "startCharacterIndex": 333, "numCharacters": 8 } ], "styleIndex": 3 }, { - "domNodeIndex": 26, + "domNodeIndex": 21, "boundingBox": { "x": 232, "y": 536, @@ -1100,7 +1018,7 @@ "styleIndex": 6 }, { - "domNodeIndex": 28, + "domNodeIndex": 23, "boundingBox": { "x": 272, "y": 536, @@ -1110,7 +1028,7 @@ "styleIndex": 7 }, { - "domNodeIndex": 30, + "domNodeIndex": 25, "boundingBox": { "x": 272, "y": 552, @@ -1120,7 +1038,7 @@ "styleIndex": 8 }, { - "domNodeIndex": 31, + "domNodeIndex": 26, "boundingBox": { "x": 272, "y": 552, @@ -1153,18 +1071,7 @@ "styleIndex": 8 }, { - "domNodeIndex": 32, - "boundingBox": { - "x": 0, - "y": 0, - "width": 0, - "height": 0 - }, - "layoutText": "\n ", - "styleIndex": 3 - }, - { - "domNodeIndex": 34, + "domNodeIndex": 27, "boundingBox": { "x": 0, "y": 0, @@ -1175,7 +1082,18 @@ "styleIndex": 3 }, { - "domNodeIndex": 35, + "domNodeIndex": 29, + "boundingBox": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "layoutText": "\n ", + "styleIndex": 3 + }, + { + "domNodeIndex": 30, "boundingBox": { "x": 92, "y": 516, @@ -1185,7 +1103,7 @@ "styleIndex": 9 }, { - "domNodeIndex": 36, + "domNodeIndex": 31, "boundingBox": { "x": 92, "y": 516, @@ -1218,7 +1136,7 @@ "styleIndex": 10 }, { - "domNodeIndex": 38, + "domNodeIndex": 33, "boundingBox": { "x": 8, "y": 632, @@ -1228,7 +1146,7 @@ "styleIndex": 11 }, { - "domNodeIndex": 39, + "domNodeIndex": 34, "boundingBox": { "x": 0, "y": 0, @@ -1237,7 +1155,7 @@ } }, { - "domNodeIndex": 40, + "domNodeIndex": 35, "boundingBox": { "x": 10, "y": 634, @@ -1247,7 +1165,7 @@ "styleIndex": 12 }, { - "domNodeIndex": 47, + "domNodeIndex": 42, "boundingBox": { "x": 18, "y": 642, @@ -1257,7 +1175,7 @@ "styleIndex": 13 }, { - "domNodeIndex": 49, + "domNodeIndex": 44, "boundingBox": { "x": 18, "y": 642, @@ -1267,7 +1185,7 @@ "styleIndex": 14 }, { - "domNodeIndex": 50, + "domNodeIndex": 45, "boundingBox": { "x": 8, "y": 8, @@ -1290,17 +1208,27 @@ "styleIndex": 3 }, { - "domNodeIndex": 52, + "domNodeIndex": 47, "boundingBox": { "x": 0, "y": 0, "width": 0, "height": 0 }, - "layoutText": "\n ", + "layoutText": "\n ", "styleIndex": 3 }, { + "domNodeIndex": 48, + "boundingBox": { + "x": 8, + "y": 857, + "width": 769, + "height": 33 + }, + "styleIndex": 15 + }, + { "domNodeIndex": 53, "boundingBox": { "x": 8, @@ -1311,7 +1239,7 @@ "styleIndex": 15 }, { - "domNodeIndex": 58, + "domNodeIndex": 54, "boundingBox": { "x": 8, "y": 857, @@ -1321,17 +1249,7 @@ "styleIndex": 15 }, { - "domNodeIndex": 59, - "boundingBox": { - "x": 8, - "y": 857, - "width": 769, - "height": 33 - }, - "styleIndex": 15 - }, - { - "domNodeIndex": 60, + "domNodeIndex": 55, "boundingBox": { "x": 8, "y": 857,
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot.html b/third_party/WebKit/LayoutTests/inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot.html deleted file mode 100644 index 56897dcc..0000000 --- a/third_party/WebKit/LayoutTests/inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot.html +++ /dev/null
@@ -1,63 +0,0 @@ -<html> -<head> -<style> -@font-face { - font-family: 'ahem'; - src: url(../../resources/Ahem.ttf); -} -</style> -<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> -<script> - -async function test() { - function stabilize(key, value) { - var unstableKeys = ["documentURL", "baseURL", "frameId"]; - if (unstableKeys.indexOf(key) !== -1) - return "<" + typeof(value) + ">"; - return value; - } - - var whitelist = ["transform", "transform-origin", "height", "width", "display", "outline-color", "color"]; - var response = await InspectorTest.sendCommandOrDie("DOMSnapshot.getSnapshot", {"computedStyleWhitelist": whitelist}); - InspectorTest.log(JSON.stringify(response, stabilize, 2)); - InspectorTest.completeTest(); -} - -</script> -<template id="shadow-template"> -<style> -:host { - color: red; -} -</style> -<div style="font-family: ahem;"><h1>Hi!</h1></div> -</template> -</head> -<body class="body-class"> -<div style="font-family: ahem;"> - <div class="class1">Some Text</div> And More Text - <div style="display:inline-block; width: 200px"> - <p> - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque sit amet est sem. - Aenean ut neque volutpat, posuere odio at, mollis nibh. Aenean sodales nulla et - ligula efficitur sollicitudin blandit sed lectus. Duis orci enim, sodales ac lectus sed, - hendrerit efficitur est. Quisque gravida facilisis viverra. - </p> - <ul class="class3"> - <li class="class4"></li> - <span>Lets have a span</span> - </ul> - </div> - <div style="transform: rotateZ(90deg); width: 200px">Rotated text!</div> - <iframe src="../dom/resources/simple-iframe.html" width="400" height="200"></iframe> - <div id="shadow-host"></div> - <script type="text/javascript"> - var host = document.querySelector("#shadow-host").createShadowRoot(); - var template = document.querySelector("#shadow-template"); - host.appendChild(template.content); - template.remove(); - window.onload = runTest; - </script> -</div> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot.js b/third_party/WebKit/LayoutTests/inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot.js new file mode 100644 index 0000000..5983612fa --- /dev/null +++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot.js
@@ -0,0 +1,28 @@ +(async function(testRunner) { + let {page, session, dp} = await testRunner.startURL('../resources/dom-snapshot.html', 'Tests DOMSnapshot.getSnapshot method.'); + + await session.evaluate(` + var host = document.querySelector('#shadow-host').createShadowRoot(); + var template = document.querySelector('#shadow-template'); + host.appendChild(template.content); + template.remove(); + document.body.offsetWidth; + `); + + function stabilize(key, value) { + var unstableKeys = ['documentURL', 'baseURL', 'frameId', 'backendNodeId']; + if (unstableKeys.indexOf(key) !== -1) + return '<' + typeof(value) + '>'; + if (typeof value === 'string' && value.indexOf('/dom-snapshot/') !== -1) + value = '<value>'; + return value; + } + + var whitelist = ['transform', 'transform-origin', 'height', 'width', 'display', 'outline-color', 'color']; + var response = await dp.DOMSnapshot.getSnapshot({'computedStyleWhitelist': whitelist}); + if (response.error) + testRunner.log(response); + else + testRunner.log(JSON.stringify(response.result, stabilize, 2)); + testRunner.completeTest(); +})
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-request-document-with-child-nodes-expected.txt b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-request-document-with-child-nodes-expected.txt index ff1d5575..3339db2 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-request-document-with-child-nodes-expected.txt +++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-request-document-with-child-nodes-expected.txt
@@ -60,7 +60,7 @@ [0] : { attributes : [ [0] : src - [1] : ../dom/resources/shadow-dom-iframe.html + [1] : ./shadow-dom-iframe.html ] backendNodeId : <backendNodeId> childNodeCount : 0
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-request-document-with-child-nodes.js b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-request-document-with-child-nodes.js index 6c807ff..f9d57a7 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-request-document-with-child-nodes.js +++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-request-document-with-child-nodes.js
@@ -1,14 +1,5 @@ (async function(testRunner) { - var {page, session, dp} = await testRunner.startHTML(` - <div id='depth-1'> - <div id='depth-2'> - <div id='depth-3'> - <iframe src='../dom/resources/shadow-dom-iframe.html'></iframe> - </div> - </div> - <div id='targetDiv'></div> - </div> - `, ''); + var {page, session, dp} = await testRunner.startURL('./resources/dom-request-document-with-child-nodes.html', ''); var response = await dp.DOM.getDocument({depth: -1}); var iframeOwner = response.result.root.children[0].children[1].children[0].children[0].children[0].children[0]; if (iframeOwner.contentDocument.children) {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/resources/dom-request-document-with-child-nodes.html b/third_party/WebKit/LayoutTests/inspector-protocol/dom/resources/dom-request-document-with-child-nodes.html new file mode 100644 index 0000000..08ec4a0 --- /dev/null +++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom/resources/dom-request-document-with-child-nodes.html
@@ -0,0 +1,8 @@ +<div id='depth-1'> + <div id='depth-2'> + <div id='depth-3'> + <iframe src='./shadow-dom-iframe.html'></iframe> + </div> + </div> + <div id='targetDiv'></div> +</div>
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/createIsolatedWorld-expected.txt b/third_party/WebKit/LayoutTests/inspector-protocol/page/createIsolatedWorld-expected.txt index f0a699ea..25412b51 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/page/createIsolatedWorld-expected.txt +++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/createIsolatedWorld-expected.txt
@@ -1,3 +1,4 @@ + Runtime enabled Page enabled Main Frame obtained
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/createIsolatedWorld.html b/third_party/WebKit/LayoutTests/inspector-protocol/page/createIsolatedWorld.html deleted file mode 100644 index 77dfaad0..0000000 --- a/third_party/WebKit/LayoutTests/inspector-protocol/page/createIsolatedWorld.html +++ /dev/null
@@ -1,73 +0,0 @@ -<html> -<head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> -<script> - -function test() -{ - var mainFrameId = ""; - var executionContextId; - var createIsolatedWorldReturnValue; - InspectorTest.eventHandler["Runtime.executionContextCreated"] = - function(message) { - if (message.params.context.auxData.frameId !== mainFrameId) - return; - if (message.params.context.auxData.isDefault === false && - message.params.context.name === "Test world") { - executionContextId = message.params.context.id; - maybeFinish(); - } else { - InspectorTest.log("fail - main world created."); - InspectorTest.log(JSON.stringify(message.params)); - InspectorTest.completeTest(); - } - }; - - function maybeFinish() { - if (!executionContextId || !createIsolatedWorldReturnValue) - return; - if (executionContextId === createIsolatedWorldReturnValue) { - InspectorTest.log("PASS - execution context id match."); - } else { - InspectorTest.log("fail - execution context id differ."); - } - InspectorTest.completeTest(); - } - - InspectorTest.sendCommandOrDie("Runtime.enable", {}, runtimeAgentEnabled); - - function runtimeAgentEnabled() { - InspectorTest.log("Runtime enabled"); - - InspectorTest.sendCommandOrDie("Page.enable", {}, pageAgentEnabled); - } - - function pageAgentEnabled() { - InspectorTest.log("Page enabled"); - InspectorTest.sendCommandOrDie( - "Page.getResourceTree", {}, resourceTreeLoaded); - } - - function resourceTreeLoaded(payload) { - mainFrameId = payload.frameTree.frame.id; - onMainFrameId(mainFrameId); - } - - function onMainFrameId(mainFrameId) { - InspectorTest.log("Main Frame obtained"); - InspectorTest.sendCommandOrDie("Page.createIsolatedWorld", { - frameId: mainFrameId, worldName: "Test world"}, - isolatedWorldCreated); - } - - function isolatedWorldCreated(payload) { - createIsolatedWorldReturnValue = payload.executionContextId; - maybeFinish(); - } -} - -</script> -</head> -<body onload="runTest()"> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/createIsolatedWorld.js b/third_party/WebKit/LayoutTests/inspector-protocol/page/createIsolatedWorld.js new file mode 100644 index 0000000..08fff78e --- /dev/null +++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/createIsolatedWorld.js
@@ -0,0 +1,34 @@ +(async function(testRunner) { + let {page, session, dp} = await testRunner.startBlank(''); + + var reportedExecutionContextId; + dp.Runtime.onExecutionContextCreated(message => { + if (message.params.context.auxData.frameId !== mainFrameId) + return; + if (message.params.context.auxData.isDefault === false && + message.params.context.name === 'Test world') { + reportedExecutionContextId = message.params.context.id; + } else { + testRunner.log('fail - main world created.'); + testRunner.log(JSON.stringify(message.params)); + testRunner.completeTest(); + } + }); + + await dp.Runtime.enable(); + testRunner.log('Runtime enabled'); + + await dp.Page.enable(); + testRunner.log('Page enabled'); + + var response = await dp.Page.getResourceTree(); + var mainFrameId = response.result.frameTree.frame.id; + testRunner.log('Main Frame obtained'); + + response = await dp.Page.createIsolatedWorld({frameId: mainFrameId, worldName: 'Test world'}); + if (reportedExecutionContextId === response.result.executionContextId) + testRunner.log('PASS - execution context id match.'); + else + testRunner.log('fail - execution context id differ.'); + testRunner.completeTest(); +})
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/enable-disable-expected.txt b/third_party/WebKit/LayoutTests/inspector-protocol/page/enable-disable-expected.txt index 5bb76c3..cfb1129 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/page/enable-disable-expected.txt +++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/enable-disable-expected.txt
@@ -1,3 +1,4 @@ + Timeline started Page enabled Page disabled
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/enable-disable.html b/third_party/WebKit/LayoutTests/inspector-protocol/page/enable-disable.html deleted file mode 100644 index 77d025cc..0000000 --- a/third_party/WebKit/LayoutTests/inspector-protocol/page/enable-disable.html +++ /dev/null
@@ -1,66 +0,0 @@ -<html> -<head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> -<script> - -function test() -{ - var log = []; - InspectorTest.eventHandler["Timeline.eventRecorded"] = eventRecorded; - - InspectorTest.sendCommand("Timeline.start", {}, timelineStarted); - - function timelineStarted() - { - log.push("Timeline started"); - InspectorTest.sendCommand("Page.enable", {}, pageAgentEnabled); - } - - function pageAgentEnabled() - { - log.push("Page enabled"); - InspectorTest.sendCommand("Page.disable", {}, pageAgentDisabled); - } - - function pageAgentDisabled() - { - log.push("Page disabled"); - InspectorTest.sendCommand("NotExistingCommand", {}, didRoundTripOverProtocol); - } - - function didRoundTripOverProtocol() - { - InspectorTest.sendCommand("Timeline.stop", {}, timelineStopped); - } - - function timelineStopped(next) - { - log.push("Timeline stopped"); - for (var i = 0; i < log.length; ++i) - InspectorTest.log(log[i]); - InspectorTest.completeTest(); - } - - function eventRecorded(msg) - { - if (msg.params.record.type === "Program") { - var children = msg.params.record.children; - for (var i = 0; i < children.length; ++i) { - var record = children[i]; - if (record.type === "GCEvent") - continue; - log.push("Timeline.eventRecorded: " + record.type); - } - return; - } - InspectorTest.log("FAIL: Unexpected records arrived"); - InspectorTest.logObject(msg); - } -} - -</script> -<link href="resources/style.css" rel="stylesheet"> -</head> -<body onload="runTest()"> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/enable-disable.js b/third_party/WebKit/LayoutTests/inspector-protocol/page/enable-disable.js new file mode 100644 index 0000000..cf8a7c2 --- /dev/null +++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/enable-disable.js
@@ -0,0 +1,33 @@ +(async function(testRunner) { + let {page, session, dp} = await testRunner.startBlank(''); + + var log = []; + dp.Timeline.onEventRecorded(msg => { + if (msg.params.record.type === 'Program') { + var children = msg.params.record.children; + for (var i = 0; i < children.length; ++i) { + var record = children[i]; + if (record.type === 'GCEvent') + continue; + log.push('Timeline.eventRecorded: ' + record.type); + } + return; + } + testRunner.log('FAIL: Unexpected records arrived'); + testRunner.logObject(msg); + }); + + await dp.Timeline.start(); + log.push('Timeline started'); + await dp.Page.enable(); + log.push('Page enabled'); + await dp.Page.disable(); + log.push('Page disabled'); + + await dp.Domain.NotExistingCommand(); + await dp.Timeline.stop(); + log.push('Timeline stopped'); + for (var i = 0; i < log.length; ++i) + testRunner.log(log[i]); + testRunner.completeTest(); +})
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedDetached-expected.txt b/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedDetached-expected.txt index fd147d4..0a98a03 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedDetached-expected.txt +++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedDetached-expected.txt
@@ -1,3 +1,4 @@ + Attached Started loading Navigated
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedDetached.html b/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedDetached.html deleted file mode 100644 index 5e921d77..0000000 --- a/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedDetached.html +++ /dev/null
@@ -1,61 +0,0 @@ -<html> -<head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> -<script> - -var frame; - -function append() -{ - frame = document.createElement("iframe"); - frame.src = "../resources/blank.html"; - document.body.appendChild(frame); -} - -function navigate() { - frame.src = "about:blank"; -} - -function remove() { - document.body.removeChild(frame); -} - -function test() -{ - InspectorTest.eventHandler["Page.frameAttached"] = onAttached; - InspectorTest.eventHandler["Page.frameStartedLoading"] = onStartedLoading; - InspectorTest.eventHandler["Page.frameNavigated"] = onNavigated; - InspectorTest.eventHandler["Page.frameDetached"] = onDetached; - InspectorTest.sendCommand("Page.enable", {}); - - function onAttached() - { - InspectorTest.log("Attached"); - } - function onStartedLoading() - { - InspectorTest.log("Started loading"); - } - function onNavigated(response) - { - InspectorTest.log("Navigated"); - var frame = response.params.frame; - if (frame.url == "about:blank") - InspectorTest.sendCommand("Runtime.evaluate", { "expression": "remove()" }); - else - InspectorTest.sendCommand("Runtime.evaluate", { "expression": "navigate()" }); - } - function onDetached() - { - InspectorTest.log("Detached"); - InspectorTest.completeTest(); - } - - InspectorTest.sendCommand("Runtime.evaluate", { "expression": "append()" }); -} - -</script> -</head> -<body onload="runTest()"> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedDetached.js b/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedDetached.js new file mode 100644 index 0000000..2289713 --- /dev/null +++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedDetached.js
@@ -0,0 +1,25 @@ +(async function(testRunner) { + let {page, session, dp} = await testRunner.startBlank(''); + + dp.Page.enable(); + session.evaluate(` + window.frame = document.createElement('iframe'); + frame.src = '${testRunner.url('../resources/blank.html')}'; + document.body.appendChild(frame); + `); + await dp.Page.onceFrameAttached(); + testRunner.log('Attached'); + await dp.Page.onceFrameStartedLoading(); + testRunner.log('Started loading'); + await dp.Page.onceFrameNavigated(); + testRunner.log('Navigated'); + session.evaluate('frame.src = "about:blank"'); + await dp.Page.onceFrameStartedLoading(); + testRunner.log('Started loading'); + await dp.Page.onceFrameNavigated(); + testRunner.log('Navigated'); + session.evaluate('document.body.removeChild(frame);'); + await dp.Page.onceFrameDetached(); + testRunner.log('Detached'); + testRunner.completeTest(); +})
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedStacktrace-expected.txt b/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedStacktrace-expected.txt index e3707bb0..67103ef 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedStacktrace-expected.txt +++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedStacktrace-expected.txt
@@ -1,5 +1,4 @@ -Page reloaded. Frame Attached Stack is empty @@ -12,7 +11,7 @@ lineNumber : 13 scriptId : <scriptId> lineNumber : 13 - url : <only showing file name>/frameAttachedStacktrace.html + url : <only showing file name>/frame-attached-stacktrace-page.html } [1] : { columnNumber : 0
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedStacktrace.html b/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedStacktrace.html deleted file mode 100644 index 364bf1ad..0000000 --- a/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedStacktrace.html +++ /dev/null
@@ -1,92 +0,0 @@ -<html> -<head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> -<script> - -function createFrame() -{ - var frame = document.createElement("iframe"); - frame.src = "data:text/html,<html><body><script>%0A" + - "var innerFrame = document.createElement('iframe');%0A" + - "innerFrame.src = 'about:blank';%0A" + - "document.body.appendChild(innerFrame);%0A" + - "<" + "/script></body></html>"; - document.body.appendChild(frame); -} - -function test() -{ - const expectedNumberOfFrames = 3; - var currentFrameCount = 0; - InspectorTest.sendCommand("Page.enable", {}); - InspectorTest.evaluateInInspectedPage("prepareForReload()", reloadPage) - - function reloadPage() - { - InspectorTest.eventHandler["Page.loadEventFired"] = contentLoaded; - InspectorTest.eventHandler["Page.frameAttached"] = onAttached; - // It's worth noting that because the way the testrunner works nothing will be logged - // until after this command executes and not log anything in the callback of this function. - InspectorTest.sendCommand("Page.reload", { "ignoreCache": false }); - } - - function contentLoaded() { - delete InspectorTest.eventHandler["Page.loadEventFired"]; - InspectorTest.evaluateInInspectedPage("createFrame()"); - } - - function onAttached(data) - { - currentFrameCount++; - InspectorTest.log("Frame Attached"); - var stack = data.params.stack; - if (stack) { - logCallframes(stack.callFrames); - } else { - InspectorTest.log("Stack is empty"); - InspectorTest.log(""); - } - if (currentFrameCount >= expectedNumberOfFrames) { - InspectorTest.completeTest(); - } - } - - // showUrl left in for debugging reasons. - function logCallframes(frames) { - InspectorTest.log("Call Frames :"); - if (!frames) { - InspectorTest.log("No callframes"); - InspectorTest.log(""); - return; - } - InspectorTest.log("["); - for (var i = 0; i < frames.length; i++) { - var frame = frames[i]; - InspectorTest.log(" [" + i + "] : {"); - if (!frame) { - InspectorTest.log(" No Frame"); - continue; - } - var url = frame.url || ''; - if (url.indexOf('data:') !== 0 && url.indexOf('/') !== -1) { - var urlParts = url.split('/'); - url = "<only showing file name>/" + urlParts[urlParts.length - 1]; - } - InspectorTest.log(" columnNumber : " + frame.columnNumber); - InspectorTest.log(" functionName : " + frame.functionName); - InspectorTest.log(" lineNumber : " + frame.lineNumber); - InspectorTest.log(" scriptId : " + (frame.scriptId ? "<scriptId>" : null)); - InspectorTest.log(" lineNumber : " + frame.lineNumber); - InspectorTest.log(" url : " + url); - InspectorTest.log(" }"); - } - InspectorTest.log("]"); - InspectorTest.log(""); - } -} -</script> -</head> -<body onload="runTest()"> - <iframe src="about:blank" /> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedStacktrace.js b/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedStacktrace.js new file mode 100644 index 0000000..c33f020 --- /dev/null +++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedStacktrace.js
@@ -0,0 +1,59 @@ +(async function(testRunner) { + let {page, session, dp} = await testRunner.startURL('../resources/frame-attached-stacktrace-page.html', ''); + + const expectedNumberOfFrames = 3; + var currentFrameCount = 0; + + dp.Page.onFrameAttached(data => { + currentFrameCount++; + testRunner.log("Frame Attached"); + var stack = data.params.stack; + if (stack) { + logCallframes(stack.callFrames); + } else { + testRunner.log("Stack is empty"); + testRunner.log(""); + } + if (currentFrameCount >= expectedNumberOfFrames) { + testRunner.completeTest(); + } + }); + + dp.Page.enable(); + dp.Page.reload({ "ignoreCache": false }); + await dp.Page.onceLoadEventFired(); + session.evaluate('createFrame()'); + + // showUrl left in for debugging reasons. + function logCallframes(frames) { + testRunner.log("Call Frames :"); + if (!frames) { + testRunner.log("No callframes"); + testRunner.log(""); + return; + } + testRunner.log("["); + for (var i = 0; i < frames.length; i++) { + var frame = frames[i]; + testRunner.log(" [" + i + "] : {"); + if (!frame) { + testRunner.log(" No Frame"); + continue; + } + var url = frame.url || ''; + if (url.indexOf('data:') !== 0 && url.indexOf('/') !== -1) { + var urlParts = url.split('/'); + url = "<only showing file name>/" + urlParts[urlParts.length - 1]; + } + testRunner.log(" columnNumber : " + frame.columnNumber); + testRunner.log(" functionName : " + frame.functionName); + testRunner.log(" lineNumber : " + frame.lineNumber); + testRunner.log(" scriptId : " + (frame.scriptId ? "<scriptId>" : null)); + testRunner.log(" lineNumber : " + frame.lineNumber); + testRunner.log(" url : " + url); + testRunner.log(" }"); + } + testRunner.log("]"); + testRunner.log(""); + } +})
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/frameScheduledNavigation.html b/third_party/WebKit/LayoutTests/inspector-protocol/page/frameScheduledNavigation.html deleted file mode 100644 index fcf0f26..0000000 --- a/third_party/WebKit/LayoutTests/inspector-protocol/page/frameScheduledNavigation.html +++ /dev/null
@@ -1,43 +0,0 @@ -<html> -<head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> -<script> - -function load() -{ - document.querySelector("iframe").src = "../resources/blank.html"; -} - -function test() -{ - InspectorTest.eventHandler["Page.frameScheduledNavigation"] = onScheduled; - InspectorTest.eventHandler["Page.frameStartedLoading"] = onStarted; - InspectorTest.eventHandler["Page.frameClearedScheduledNavigation"] = onCleared; - InspectorTest.sendCommand("Page.enable", {}); - - function onScheduled(msg) - { - InspectorTest.log("Scheduled navigation with delay " + msg.params.delay); - } - - function onStarted(msg) - { - // This event should be received before the scheduled navigation is cleared. - InspectorTest.log("Started loading"); - } - - function onCleared(msg) - { - InspectorTest.log("Cleared scheduled navigation"); - InspectorTest.completeTest(); - } - - InspectorTest.sendCommand("Runtime.evaluate", { "expression": "load()" }); -} - -</script> -</head> -<body onload="runTest()"> -<iframe> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/frameScheduledNavigation.js b/third_party/WebKit/LayoutTests/inspector-protocol/page/frameScheduledNavigation.js new file mode 100644 index 0000000..ce7b7b2 --- /dev/null +++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/frameScheduledNavigation.js
@@ -0,0 +1,21 @@ +(async function(testRunner) { + let {page, session, dp} = await testRunner.startBlank(''); + + dp.Page.enable(); + session.evaluate(` + var frame = document.createElement('iframe'); + document.body.appendChild(frame); + frame.src = '${testRunner.url('../resources/blank.html')}'; + `); + + var msg = await dp.Page.onceFrameScheduledNavigation(); + testRunner.log('Scheduled navigation with delay ' + msg.params.delay); + + await dp.Page.onceFrameStartedLoading(); + // This event should be received before the scheduled navigation is cleared. + testRunner.log('Started loading'); + + await dp.Page.onceFrameClearedScheduledNavigation(); + testRunner.log('Cleared scheduled navigation'); + testRunner.completeTest(); +})
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/frameStartedLoading.html b/third_party/WebKit/LayoutTests/inspector-protocol/page/frameStartedLoading.html deleted file mode 100644 index 44f796c..0000000 --- a/third_party/WebKit/LayoutTests/inspector-protocol/page/frameStartedLoading.html +++ /dev/null
@@ -1,36 +0,0 @@ -<html> -<head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> -<script> - -function load() -{ - var frame = document.createElement("iframe"); - frame.src = "../resources/blank.html"; - document.body.appendChild(frame); -} - -function test() -{ - InspectorTest.eventHandler["Page.frameStartedLoading"] = onStart; - InspectorTest.eventHandler["Page.frameStoppedLoading"] = onStop; - InspectorTest.sendCommand("Page.enable", {}); - - function onStart() - { - InspectorTest.log("Started loading"); - } - function onStop() - { - InspectorTest.log("Stopped loading"); - InspectorTest.completeTest(); - } - - InspectorTest.sendCommand("Runtime.evaluate", { "expression": "load()" }); -} - -</script> -</head> -<body onload="runTest()"> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/frameStartedLoading.js b/third_party/WebKit/LayoutTests/inspector-protocol/page/frameStartedLoading.js new file mode 100644 index 0000000..369d91a --- /dev/null +++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/frameStartedLoading.js
@@ -0,0 +1,15 @@ +(async function(testRunner) { + let {page, session, dp} = await testRunner.startBlank(''); + + dp.Page.enable(); + session.evaluate(` + var frame = document.createElement('iframe'); + frame.src = '${testRunner.url('../resources/blank.html')}'; + document.body.appendChild(frame); + `); + await dp.Page.onceFrameStartedLoading(); + testRunner.log('Started loading'); + await dp.Page.onceFrameStoppedLoading(); + testRunner.log('Stopped loading'); + testRunner.completeTest(); +})
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/get-layout-metrics-expected.txt b/third_party/WebKit/LayoutTests/inspector-protocol/page/get-layout-metrics-expected.txt index c8e2053f..65a1240 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/page/get-layout-metrics-expected.txt +++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/get-layout-metrics-expected.txt
@@ -1,5 +1,4 @@ Tests that Page.getLayoutMetrics returns reasonable values. - LayoutViewport: { clientHeight : 600 clientWidth : 785
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/get-layout-metrics.html b/third_party/WebKit/LayoutTests/inspector-protocol/page/get-layout-metrics.html deleted file mode 100644 index 43d94fc..0000000 --- a/third_party/WebKit/LayoutTests/inspector-protocol/page/get-layout-metrics.html +++ /dev/null
@@ -1,40 +0,0 @@ -<html> -<head> - -<script src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> - -<style> -body { - min-height: 2000px; -} -</style> - -<script> -function test() -{ - InspectorTest.sendCommand("Runtime.evaluate", { "expression": "window.scrollTo(0, 200);"} ); - - InspectorTest.sendCommand("Page.getLayoutMetrics", {}, onGetLayoutMetrics); - - function onGetLayoutMetrics(message) - { - if (message.error) { - InspectorTest.log(message.error.message); - InspectorTest.completeTest(); - return; - } - - InspectorTest.logObject(message.result.layoutViewport, "LayoutViewport: "); - InspectorTest.logObject(message.result.visualViewport, "VisualViewport: "); - InspectorTest.completeTest(); - } -} -</script> - -</head> -<body onload="runTest()"> -<p> -Tests that Page.getLayoutMetrics returns reasonable values. -</p> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/get-layout-metrics.js b/third_party/WebKit/LayoutTests/inspector-protocol/page/get-layout-metrics.js new file mode 100644 index 0000000..be11743 --- /dev/null +++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/get-layout-metrics.js
@@ -0,0 +1,21 @@ +(async function(testRunner) { + let {page, session, dp} = await testRunner.startHTML(` + <style> + body { + min-height: 2000px; + } + </style> + `, 'Tests that Page.getLayoutMetrics returns reasonable values.'); + + session.evaluate('window.scrollTo(0, 200);'); + var message = await dp.Page.getLayoutMetrics(); + if (message.error) { + testRunner.log(message.error.message); + testRunner.completeTest(); + return; + } + + testRunner.logObject(message.result.layoutViewport, 'LayoutViewport: '); + testRunner.logObject(message.result.visualViewport, 'VisualViewport: '); + testRunner.completeTest(); +})
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/javascriptDialogEvents-expected.txt b/third_party/WebKit/LayoutTests/inspector-protocol/page/javascriptDialogEvents-expected.txt index 864c21cd..c7caed0 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/page/javascriptDialogEvents-expected.txt +++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/javascriptDialogEvents-expected.txt
@@ -1,7 +1,4 @@ -CONFIRM NAVIGATION -ALERT: alert -CONFIRM: confirm -PROMPT: prompt, default text: + Opening dialog: type=beforeunload; message=beforeunload in javascriptDialogEvents Closed dialog: result=false Opening dialog: type=alert; message=alert
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/javascriptDialogEvents.html b/third_party/WebKit/LayoutTests/inspector-protocol/page/javascriptDialogEvents.html deleted file mode 100644 index 7c40457..0000000 --- a/third_party/WebKit/LayoutTests/inspector-protocol/page/javascriptDialogEvents.html +++ /dev/null
@@ -1,62 +0,0 @@ -<html> -<head> -<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script> -<script> - -testRunner.setShouldStayOnPageAfterHandlingBeforeUnload(true); - -// JavaScript onbeforeunload dialogs require a user gesture. -if (window.eventSender) { - eventSender.mouseMoveTo(5, 5); - eventSender.mouseDown(); - eventSender.mouseUp(); -} - -window.onbeforeunload = onBeforeUnload; - -function onBeforeUnload() -{ - window.removeEventListener("beforeunload", onBeforeUnload); - return "beforeunload in javascriptDialogEvents"; -} - -function test() -{ - InspectorTest.eventHandler["Page.javascriptDialogOpening"] = onOpening; - InspectorTest.eventHandler["Page.javascriptDialogClosed"] = onClosed; - InspectorTest.sendCommand("Page.enable", {}); - - function onOpening(event) - { - InspectorTest.log("Opening dialog: type=" + event.params.type + "; message=" + event.params.message); - } - - function onClosed(event) - { - InspectorTest.log("Closed dialog: result=" + event.params.result); - } - - InspectorTest.sendCommand("Page.navigate", { "url": "http://nosuchurl" }); - InspectorTest.sendCommand("Runtime.evaluate", { "expression": "alert('alert')" }, onDoneAlert); - - function onDoneAlert() - { - InspectorTest.sendCommand("Runtime.evaluate", { "expression": "confirm('confirm')" }, onDoneConfirm); - } - - function onDoneConfirm() - { - InspectorTest.sendCommand("Runtime.evaluate", { "expression": "prompt('prompt')" }, onDone); - } - - function onDone() - { - InspectorTest.completeTest(); - } -} - -</script> -</head> -<body onload="runTest()"> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/javascriptDialogEvents.js b/third_party/WebKit/LayoutTests/inspector-protocol/page/javascriptDialogEvents.js new file mode 100644 index 0000000..67902583 --- /dev/null +++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/javascriptDialogEvents.js
@@ -0,0 +1,35 @@ +(async function(testRunner) { + let {page, session, dp} = await testRunner.startBlank(''); + + await session.evaluate(` + testRunner.setShouldStayOnPageAfterHandlingBeforeUnload(true); + + // JavaScript onbeforeunload dialogs require a user gesture. + if (window.eventSender) { + eventSender.mouseMoveTo(5, 5); + eventSender.mouseDown(); + eventSender.mouseUp(); + } + + function onBeforeUnload() + { + window.removeEventListener('beforeunload', onBeforeUnload); + return 'beforeunload in javascriptDialogEvents'; + } + window.onbeforeunload = onBeforeUnload; + `); + + dp.Page.onJavascriptDialogOpening(event => { + testRunner.log('Opening dialog: type=' + event.params.type + '; message=' + event.params.message); + }); + dp.Page.onJavascriptDialogClosed(event => { + testRunner.log('Closed dialog: result=' + event.params.result); + }); + + dp.Page.enable(); + dp.Page.navigate({url: 'http://nosuchurl' }); + await session.evaluate('alert("alert")'); + await session.evaluate('confirm("confirm")'); + await session.evaluate('prompt("prompt")'); + testRunner.completeTest(); +})
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/resources/dom-snapshot.html b/third_party/WebKit/LayoutTests/inspector-protocol/resources/dom-snapshot.html new file mode 100644 index 0000000..cf98332 --- /dev/null +++ b/third_party/WebKit/LayoutTests/inspector-protocol/resources/dom-snapshot.html
@@ -0,0 +1,38 @@ +<html> +<head> + <style> + @font-face { + font-family: 'ahem'; + src: url(../../resources/Ahem.ttf); + } + </style> + <template id="shadow-template"> + <style> + :host { + color: red; + } + </style> + <div style="font-family: ahem;"><h1>Hi!</h1></div> + </template> +</head> +<body class="body-class"> +<div style="font-family: ahem;"> + <div class="class1">Some Text</div> And More Text + <div style="display:inline-block; width: 200px"> + <p> + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque sit amet est sem. + Aenean ut neque volutpat, posuere odio at, mollis nibh. Aenean sodales nulla et + ligula efficitur sollicitudin blandit sed lectus. Duis orci enim, sodales ac lectus sed, + hendrerit efficitur est. Quisque gravida facilisis viverra. + </p> + <ul class="class3"> + <li class="class4"></li> + <span>Lets have a span</span> + </ul> + </div> + <div style="transform: rotateZ(90deg); width: 200px">Rotated text!</div> + <iframe src='./simple-iframe.html' width="400" height="200"></iframe> + <div id="shadow-host"></div> +</div> +</body> +</html>
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/resources/frame-attached-stacktrace-page.html b/third_party/WebKit/LayoutTests/inspector-protocol/resources/frame-attached-stacktrace-page.html new file mode 100644 index 0000000..6c520b57 --- /dev/null +++ b/third_party/WebKit/LayoutTests/inspector-protocol/resources/frame-attached-stacktrace-page.html
@@ -0,0 +1,17 @@ +<script> + + + + +function createFrame() +{ + var frame = document.createElement("iframe"); + frame.src = "data:text/html,<html><body><script>%0A" + + "var innerFrame = document.createElement('iframe');%0A" + + "innerFrame.src = 'about:blank';%0A" + + "document.body.appendChild(innerFrame);%0A" + + "<" + "/script></body></html>"; + document.body.appendChild(frame); +} +</script> +<iframe src="about:blank" />
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/resources/simple-iframe.html b/third_party/WebKit/LayoutTests/inspector-protocol/resources/simple-iframe.html new file mode 100644 index 0000000..62206b4 --- /dev/null +++ b/third_party/WebKit/LayoutTests/inspector-protocol/resources/simple-iframe.html
@@ -0,0 +1,15 @@ +<html> +<head> +<style> +@font-face { + font-family: 'ahem'; + src: url(../../resources/Ahem.ttf); +} +</style> +</head> +<body> +<div style="font-family: ahem;"> +Hello from the iframe. +</div> +</body> +</html>
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-without-enabling.js b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-without-enabling.js index dd9354ef..ce2e839 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-without-enabling.js +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-evaluate-without-enabling.js
@@ -2,7 +2,9 @@ let {page, session, dp} = await testRunner.startBlank(`Tests that default execution context accessed without enabling Runtime domain gets properly cleaned up on reload.`); await session.evaluate('window.dummyObject = { a : 1 };'); var result = await dp.Runtime.evaluate({expression: 'window.dummyObject' }); - await dp.Page.reload(); + dp.Page.enable(); + dp.Page.reload(); + await dp.Page.onceLoadEventFired(); testRunner.logMessage(await dp.Runtime.getProperties({ objectId: result.result.result.objectId, ownProperties: true })); testRunner.completeTest(); })
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/stylesheet-tracking-restart.js b/third_party/WebKit/LayoutTests/inspector-protocol/stylesheet-tracking-restart.js index 5ca5a040..d2ed8c2 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/stylesheet-tracking-restart.js +++ b/third_party/WebKit/LayoutTests/inspector-protocol/stylesheet-tracking-restart.js
@@ -18,10 +18,11 @@ await runTest(session); testRunner.log('Closing inspector.'); testRunner.log('\nRemoving style sheet.\n'); - session.evaluate('setTimeout(() => { document.head.removeChild(styleElement1); document.body.offsetWidth; }, 0)'); + session.evaluate('Promise.resolve().then(() => { document.head.removeChild(styleElement1); document.body.offsetWidth; })'); await session.disconnect(); testRunner.log('Reopening inspector.'); session = await page.createSession(); + await session.evaluateAsync('new Promise(f => setTimeout(f, 0))'); testRunner.log('Running test'); testRunner.log('Opening front-end second time'); await runTest(session);
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/css-clip-change-stacking-child-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/css-clip-change-stacking-child-expected.txt new file mode 100644 index 0000000..e35ad89f --- /dev/null +++ b/third_party/WebKit/LayoutTests/paint/invalidation/css-clip-change-stacking-child-expected.txt
@@ -0,0 +1,37 @@ +{ + "layers": [ + { + "name": "LayoutView #document", + "bounds": [800, 600], + "contentsOpaque": true, + "drawsContent": true, + "paintInvalidations": [ + { + "object": "LayoutBlockFlow (positioned) DIV id='target'", + "rect": [8, 8, 300, 300], + "reason": "subtree" + }, + { + "object": "LayoutBlockFlow DIV", + "rect": [8, 8, 300, 300], + "reason": "subtree" + } + ] + } + ], + "objectPaintInvalidations": [ + { + "object": "LayoutBlockFlow (positioned) DIV id='target'", + "reason": "subtree" + }, + { + "object": "LayoutBlockFlow DIV", + "reason": "subtree" + }, + { + "object": "LayoutBlockFlow DIV", + "reason": "subtree" + } + ] +} +
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/css-clip-change-stacking-child.html b/third_party/WebKit/LayoutTests/paint/invalidation/css-clip-change-stacking-child.html new file mode 100644 index 0000000..25c3829 --- /dev/null +++ b/third_party/WebKit/LayoutTests/paint/invalidation/css-clip-change-stacking-child.html
@@ -0,0 +1,13 @@ +<!doctype HTML> +<script src="resources/text-based-repaint.js"></script> +<div id="target" style="position: absolute; width: 300px; height: 300px; clip: rect(0px, 300px, 300px, 0px)"> + <div style="isolation: isolate; width: 500px; height: 500px; background: lightblue"> + <div style="positiion: relative"></div> + </div> +</div> +<script> +function repaintTest() { + target.style.clip = "rect(0px, 300px, 200px, 0px)" +} +onload = runRepaintTest; +</script>
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/mask-clip-change-stacking-child-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/mask-clip-change-stacking-child-expected.txt new file mode 100644 index 0000000..c0e3c22 --- /dev/null +++ b/third_party/WebKit/LayoutTests/paint/invalidation/mask-clip-change-stacking-child-expected.txt
@@ -0,0 +1,24 @@ +{ + "layers": [ + { + "name": "LayoutView #document", + "bounds": [800, 600], + "contentsOpaque": true, + "drawsContent": true, + "paintInvalidations": [ + { + "object": "LayoutBlockFlow (positioned) DIV id='target'", + "rect": [8, 8, 500, 500], + "reason": "geometry" + } + ] + } + ], + "objectPaintInvalidations": [ + { + "object": "LayoutBlockFlow (positioned) DIV id='target'", + "reason": "geometry" + } + ] +} +
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/mask-clip-change-stacking-child.html b/third_party/WebKit/LayoutTests/paint/invalidation/mask-clip-change-stacking-child.html new file mode 100644 index 0000000..9e40e58 --- /dev/null +++ b/third_party/WebKit/LayoutTests/paint/invalidation/mask-clip-change-stacking-child.html
@@ -0,0 +1,13 @@ +<!doctype HTML> +<script src="resources/text-based-repaint.js"></script> +<div id="target" style="position: absolute; width: 300px; height: 300px; -webkit-mask: linear-gradient(red, red)"> + <div style="isolation: isolate; width: 500px; height: 500px; background: lightblue"> + <div style="positiion: relative"></div> + </div> +</div> +<script> +function repaintTest() { + target.style.height = "200px"; +} +onload = runRepaintTest; +</script>
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/paintorder-filtered-expected.png b/third_party/WebKit/LayoutTests/paint/invalidation/svg/paintorder-filtered-expected.png new file mode 100644 index 0000000..443cedc --- /dev/null +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/paintorder-filtered-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/printing/print-box-shadow-expected.png b/third_party/WebKit/LayoutTests/paint/printing/print-box-shadow-expected.png similarity index 82% rename from third_party/WebKit/LayoutTests/platform/mac/paint/printing/print-box-shadow-expected.png rename to third_party/WebKit/LayoutTests/paint/printing/print-box-shadow-expected.png index 78f222d8..cae9229 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/printing/print-box-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/paint/printing/print-box-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/linux/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png index 608720c6..4d8558f 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/shadows/shadow-drawing-expected.png b/third_party/WebKit/LayoutTests/platform/linux/compositing/shadows/shadow-drawing-expected.png index 4a5c54ff..24fc786 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/compositing/shadows/shadow-drawing-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/shadows/shadow-drawing-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/css3/filters/effect-brightness-clamping-expected.png b/third_party/WebKit/LayoutTests/platform/linux/css3/filters/effect-brightness-clamping-expected.png deleted file mode 100644 index ae7ad9fa..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/css3/filters/effect-brightness-clamping-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/css3/filters/effect-brightness-expected.png b/third_party/WebKit/LayoutTests/platform/linux/css3/filters/effect-brightness-expected.png deleted file mode 100644 index bc170793..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/css3/filters/effect-brightness-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/css3/filters/effect-combined-expected.png b/third_party/WebKit/LayoutTests/platform/linux/css3/filters/effect-combined-expected.png deleted file mode 100644 index 7770c75..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/css3/filters/effect-combined-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/css3/filters/effect-reference-subregion-nested-expected.png b/third_party/WebKit/LayoutTests/platform/linux/css3/filters/effect-reference-subregion-nested-expected.png index 1add4b0..2e1ee85 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/css3/filters/effect-reference-subregion-nested-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/css3/filters/effect-reference-subregion-nested-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/css3/filters/filter-repaint-turbulence-expected.png b/third_party/WebKit/LayoutTests/platform/linux/css3/filters/filter-repaint-turbulence-expected.png index 38c363cb..40c850c 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/css3/filters/filter-repaint-turbulence-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/css3/filters/filter-repaint-turbulence-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/css3/filters/regions-expanding-expected.png b/third_party/WebKit/LayoutTests/platform/linux/css3/filters/regions-expanding-expected.png deleted file mode 100644 index 83d26a9..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/css3/filters/regions-expanding-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-antialiasing-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-antialiasing-expected.png index 023729c..2ce1d85 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-antialiasing-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-antialiasing-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-with-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-with-shadow-expected.png index 5c84fc1..72e65c8 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-with-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-with-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/basic-shadows-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/basic-shadows-expected.png index 6d820de6..a105d16d 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/basic-shadows-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/basic-shadows-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/box-shadow-expected.png index d5919b9..3996e2c 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/box-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/box-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-box-shadow-radius-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-box-shadow-radius-expected.png new file mode 100644 index 0000000..ac13dc8 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-box-shadow-radius-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-expected.png index 3d7c2a8..f7772ed 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-subpixel-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-subpixel-expected.png index 8472d2c..81fc7905 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-subpixel-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-subpixel-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/spread-multiple-inset-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/spread-multiple-inset-expected.png index ba989858..0925ed04 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/spread-multiple-inset-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/spread-multiple-inset-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/canvas/canvas-composite-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/canvas/canvas-composite-shadow-expected.png index 1d092718..974e5ad4 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/canvas/canvas-composite-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/canvas/canvas-composite-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/css/color-correction-on-box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/css/color-correction-on-box-shadow-expected.png index fe4f291..2c661f7 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/css/color-correction-on-box-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/css/color-correction-on-box-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/css/color-correction-on-text-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/css/color-correction-on-text-shadow-expected.png index 08a73092..473eaa5 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/css/color-correction-on-text-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/css/color-correction-on-text-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/css/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/css/shadow-multiple-expected.png index 7534402c..d3b706d 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/css/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/css/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/dom/HTMLMeterElement/meter-styles-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/dom/HTMLMeterElement/meter-styles-expected.png index e6209f0..ddfd1fe 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/dom/HTMLMeterElement/meter-styles-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/dom/HTMLMeterElement/meter-styles-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png index 28e21e4..ebb86b1 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png index e5c16e1..07fba64 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-expected.png index daef4a126..9255a34b 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png index 9d757eb..57ab245 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png index 01402175..7a8f1ae 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png index 9ff203c..c039773 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png index 9c01393d..32bdce91 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png index 44a2bcb..c44eda86 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png index 4d26086..f3e83b9 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png index d46fddd..53621be 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/month-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/month-picker-appearance-expected.png index c02f212..4202db51 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/month-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/month-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/month-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/month-picker-appearance-step-expected.png index 4f03116..cffba13 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/month-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/month-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/week-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/week-picker-appearance-expected.png index c51bf50..1a4e867 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/week-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/week-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/week-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/week-picker-appearance-step-expected.png index 9f1eebb..1bc5a72 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/week-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/week-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/checkbox/checkbox-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/checkbox/checkbox-appearance-basic-expected.png new file mode 100644 index 0000000..2a0fa75 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/checkbox/checkbox-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-appearance-expected.png index 2749e7d..f30a511c 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png index 7cb617b..32b09d0 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png index 082fcc9..e41e5ad 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png index 75dced97..01a6172e 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/radio/radio-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/radio/radio-appearance-basic-expected.png new file mode 100644 index 0000000..7943a2f --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/radio/radio-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/range/range-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/range/range-appearance-basic-expected.png new file mode 100644 index 0000000..d175bfc --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/range/range-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/menulist-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/menulist-appearance-basic-expected.png index 50cf102..913480e 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/menulist-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/menulist-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/select-initial-position-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/select-initial-position-expected.png index 1357295f..d7419ab 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/select-initial-position-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/select-initial-position-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/select-initial-position-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/select-initial-position-expected.txt index 457600a..70291bd 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/select-initial-position-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/select-initial-position-expected.txt
@@ -3,54 +3,61 @@ layer at (0,0) size 800x600 LayoutBlockFlow {HTML} at (0,0) size 800x600 LayoutBlockFlow {BODY} at (8,8) size 784x584 - LayoutText {#text} at (0,0) size 93x19 - text run at (0,0) width 93: "initial selected:" - LayoutBR {BR} at (93,15) size 0x0 - LayoutText {#text} at (155,71) size 4x19 - text run at (155,71) width 4: " " - LayoutBR {BR} at (159,86) size 0x0 - LayoutText {#text} at (0,91) size 161x19 - text run at (0,91) width 161: "dynamic selected change:" - LayoutBR {BR} at (161,106) size 0x0 - LayoutText {#text} at (155,162) size 4x19 - text run at (155,162) width 4: " " - LayoutText {#text} at (0,0) size 0x0 - LayoutBR {BR} at (0,0) size 0x0 - LayoutText {#text} at (0,182) size 211x19 - text run at (0,182) width 211: "dynamic insert of selected option:" - LayoutBR {BR} at (211,197) size 0x0 - LayoutText {#text} at (155,253) size 4x19 - text run at (155,253) width 4: " " - LayoutBR {BR} at (159,268) size 0x0 - LayoutText {#text} at (0,273) size 93x19 - text run at (0,273) width 93: "initial selected:" - LayoutBR {BR} at (93,288) size 0x0 - LayoutMenuList {SELECT} at (0,293) size 156x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)] - LayoutBlockFlow (anonymous) at (1,1) size 154x18 - LayoutText (anonymous) at (4,1) size 134x16 - text run at (4,1) width 134: "this should be selected" - LayoutText {#text} at (156,293) size 4x19 - text run at (156,293) width 4: " " - LayoutBR {BR} at (160,308) size 0x0 - LayoutText {#text} at (0,313) size 161x19 - text run at (0,313) width 161: "dynamic selected change:" - LayoutBR {BR} at (161,328) size 0x0 - LayoutMenuList {SELECT} at (0,333) size 156x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)] - LayoutBlockFlow (anonymous) at (1,1) size 154x18 - LayoutText (anonymous) at (4,1) size 134x16 - text run at (4,1) width 134: "this should be selected" - LayoutText {#text} at (156,333) size 4x19 - text run at (156,333) width 4: " " - LayoutText {#text} at (0,0) size 0x0 - LayoutBR {BR} at (0,0) size 0x0 - LayoutText {#text} at (0,353) size 211x19 - text run at (0,353) width 211: "dynamic insert of selected option:" - LayoutBR {BR} at (211,368) size 0x0 - LayoutMenuList {SELECT} at (0,373) size 156x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)] - LayoutBlockFlow (anonymous) at (1,1) size 154x18 - LayoutText (anonymous) at (4,1) size 134x16 - text run at (4,1) width 134: "this should be selected" - LayoutText {#text} at (0,0) size 0x0 + LayoutBlockFlow (anonymous) at (0,0) size 784x393 + LayoutText {#text} at (0,0) size 93x19 + text run at (0,0) width 93: "initial selected:" + LayoutBR {BR} at (93,15) size 0x0 + LayoutText {#text} at (155,71) size 4x19 + text run at (155,71) width 4: " " + LayoutBR {BR} at (159,86) size 0x0 + LayoutText {#text} at (0,91) size 161x19 + text run at (0,91) width 161: "dynamic selected change:" + LayoutBR {BR} at (161,106) size 0x0 + LayoutText {#text} at (155,162) size 4x19 + text run at (155,162) width 4: " " + LayoutText {#text} at (0,0) size 0x0 + LayoutBR {BR} at (0,0) size 0x0 + LayoutText {#text} at (0,182) size 211x19 + text run at (0,182) width 211: "dynamic insert of selected option:" + LayoutBR {BR} at (211,197) size 0x0 + LayoutText {#text} at (155,253) size 4x19 + text run at (155,253) width 4: " " + LayoutBR {BR} at (159,268) size 0x0 + LayoutText {#text} at (0,273) size 93x19 + text run at (0,273) width 93: "initial selected:" + LayoutBR {BR} at (93,288) size 0x0 + LayoutMenuList {SELECT} at (0,293) size 156x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)] + LayoutBlockFlow (anonymous) at (1,1) size 154x18 + LayoutText (anonymous) at (4,1) size 134x16 + text run at (4,1) width 134: "this should be selected" + LayoutText {#text} at (156,293) size 4x19 + text run at (156,293) width 4: " " + LayoutBR {BR} at (160,308) size 0x0 + LayoutText {#text} at (0,313) size 161x19 + text run at (0,313) width 161: "dynamic selected change:" + LayoutBR {BR} at (161,328) size 0x0 + LayoutMenuList {SELECT} at (0,333) size 156x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)] + LayoutBlockFlow (anonymous) at (1,1) size 154x18 + LayoutText (anonymous) at (4,1) size 134x16 + text run at (4,1) width 134: "this should be selected" + LayoutText {#text} at (156,333) size 4x19 + text run at (156,333) width 4: " " + LayoutText {#text} at (0,0) size 0x0 + LayoutBR {BR} at (0,0) size 0x0 + LayoutText {#text} at (0,353) size 211x19 + text run at (0,353) width 211: "dynamic insert of selected option:" + LayoutBR {BR} at (211,368) size 0x0 + LayoutMenuList {SELECT} at (0,373) size 156x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)] + LayoutBlockFlow (anonymous) at (1,1) size 154x18 + LayoutText (anonymous) at (4,1) size 134x16 + text run at (4,1) width 134: "this should be selected" + LayoutText {#text} at (0,0) size 0x0 + LayoutBlockFlow {P} at (0,409) size 784x20 + LayoutText {#text} at (0,0) size 191x19 + text run at (0,0) width 191: "Display 'none' to 'inline-block'" + LayoutBlockFlow (anonymous) at (0,445) size 784x70 + LayoutText {#text} at (0,0) size 0x0 + LayoutText {#text} at (0,0) size 0x0 layer at (8,28) size 155x70 clip at (9,29) size 138x68 scrollY 119.00 scrollHeight 238 LayoutListBox {SELECT} at (0,20) size 155x70 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)] LayoutBlockFlow {OPTION} at (1,1) size 138x17 @@ -165,3 +172,26 @@ LayoutBlockFlow {OPTION} at (1,120) size 138x17 LayoutText {#text} at (2,0) size 18x16 text run at (2,0) width 18: "opt" +layer at (8,453) size 229x70 clip at (9,454) size 212x68 scrollY 51.00 scrollHeight 119 + LayoutListBox {SELECT} at (0,0) size 229x70 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)] + LayoutBlockFlow {OPTION} at (1,1) size 212x17 + LayoutText {#text} at (2,0) size 42x16 + text run at (2,0) width 42: "option1" + LayoutBlockFlow {OPTION} at (1,18) size 212x17 + LayoutText {#text} at (2,0) size 42x16 + text run at (2,0) width 42: "option2" + LayoutBlockFlow {OPTION} at (1,35) size 212x17 + LayoutText {#text} at (2,0) size 42x16 + text run at (2,0) width 42: "option3" + LayoutBlockFlow {OPTION} at (1,52) size 212x17 + LayoutText {#text} at (2,0) size 42x16 + text run at (2,0) width 42: "option4" + LayoutBlockFlow {OPTION} at (1,69) size 212x17 + LayoutText {#text} at (2,0) size 42x16 + text run at (2,0) width 42: "option5" + LayoutBlockFlow {OPTION} at (1,86) size 212x17 + LayoutText {#text} at (2,0) size 42x16 + text run at (2,0) width 42: "option6" + LayoutBlockFlow {OPTION} at (1,103) size 212x17 [color=#FFFFFF] [bgcolor=#999999] + LayoutText {#text} at (2,0) size 208x16 + text run at (2,0) width 208: "This should be selected and visible."
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/submit/submit-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/submit/submit-appearance-basic-expected.png index 57a19e0..21ef47c 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/submit/submit-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/submit/submit-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/text/stroking-decorations-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/text/stroking-decorations-expected.png index 19b4b3ef..9fba72b 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/text/stroking-decorations-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/text/stroking-decorations-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/text/stroking-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/text/stroking-expected.png index 598c2c9..21a4af4 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/text/stroking-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/text/stroking-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/writing-mode/english-lr-text-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/writing-mode/english-lr-text-expected.png index fb75528..178e01e 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/writing-mode/english-lr-text-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/writing-mode/english-lr-text-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/http/tests/inspector/extensions/extensions-panel-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/http/tests/inspector/extensions/extensions-panel-expected.txt deleted file mode 100644 index f1e00c8..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/http/tests/inspector/extensions/extensions-panel-expected.txt +++ /dev/null
@@ -1,74 +0,0 @@ -CONSOLE MESSAGE: line 12: hello -Tests WebInspector extension API - - -Started extension. -Running tests... -RUNNING TEST: extension_testCreatePanel -Panel created -{ - createStatusBarButton : <function> - onHidden : { - addListener : <function> - removeListener : <function> - } - onSearch : { - addListener : <function> - removeListener : <function> - } - onShown : { - addListener : <function> - removeListener : <function> - } - show : <function> -} -Panel shown -Extension panel size correct -Panel hidden -RUNNING TEST: extension_testGlobalShortcuts -Panel shown, now toggling console... -Panel resized, test passed. -RUNNING TEST: extension_testOpenResource -Showing .../extensions-panel.html -Showing resource .../inspector/extensions/extensions-panel.html in panel sources), line: 1001 -Showing .../abe.png -Showing resource .../extensions/resources/abe.png in panel sources), line: 1002 -Showing .../missing.txt -Showing resource .../extensions/resources/missing.txt in panel network), line: undefined -Showing not-found.html -error: Extension server error: Object not found: not-found.html -Showing javascript:console.error('oh no!') -error: Extension server error: Object not found: javascript:console.error('oh no!') -RUNNING TEST: extension_testSearch -Panel searched: -{ - 0 : "performSearch" - 1 : "hello" -} -Panel searched: -{ - 0 : "cancelSearch" - 1 : undefined -} -RUNNING TEST: extension_testStatusBarButtons -Created a status bar button, dump follows: -{ - onClicked : { - addListener : <function> - removeListener : <function> - } - update : <function> -} -button1 clicked -Status bar buttons state: -status bar item 0, icon: ".../inspector/resources/button1.png", tooltip: 'Button One tooltip', disabled: false -status bar item 1, icon: ".../inspector/resources/button2.png", tooltip: 'Button Two tooltip', disabled: true -Updated status bar buttons -Status bar buttons state: -status bar item 0, icon: ".../inspector/resources/button1-updated.png", tooltip: 'Button One tooltip', disabled: false -status bar item 1, icon: ".../inspector/resources/button2.png", tooltip: 'Button Two updated tooltip', disabled: false -button2 clicked -RUNNING TEST: extension_testThemeName -Theme name: themeNameForTest -All tests done. -
diff --git a/third_party/WebKit/LayoutTests/platform/linux/http/tests/misc/acid3-expected.png b/third_party/WebKit/LayoutTests/platform/linux/http/tests/misc/acid3-expected.png index 631ea7c..cc0912cd 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/http/tests/misc/acid3-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/http/tests/misc/acid3-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/http/tests/security/xssAuditor/object-src-inject-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/http/tests/security/xssAuditor/object-src-inject-expected.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/linux/http/tests/security/xssAuditor/object-src-inject-expected.txt
@@ -0,0 +1 @@ +
diff --git a/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-001-expected.png b/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-001-expected.png index c48f911..347f44a 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-001-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-001-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-002-expected.png b/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-002-expected.png index 9b0d784..34a72483 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-002-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-002-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-003-expected.png b/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-003-expected.png index eb3eb4d..b50935e 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-003-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-003-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-006-expected.png b/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-006-expected.png index ceda703..5263117 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-006-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-006-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-010-expected.png b/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-010-expected.png index 890fe37..483dc8c 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-010-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-010-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/images/color-profile-image-filter-all-expected.png b/third_party/WebKit/LayoutTests/platform/linux/images/color-profile-image-filter-all-expected.png index d167ca5..b6206d8e 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/images/color-profile-image-filter-all-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/images/color-profile-image-filter-all-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/inspector-protocol/timeline/page-frames-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/inspector-protocol/timeline/page-frames-expected.txt deleted file mode 100644 index 3d96af4..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/inspector-protocol/timeline/page-frames-expected.txt +++ /dev/null
@@ -1,11 +0,0 @@ - -Recording started -Tracing complete -Frames in TracingStartedInPage -url: inspector-protocol/resources/inspector-protocol-page.html name: parent: undefined nodeId: undefined -url: data:text/html,<script>window.foo = 42</script> name: frame0 parent: string nodeId: number -Frames in CommitLoad events -url: data:text/html,<script>window.foo = 42</script> name: frame0 parent: string nodeId: number -url: about:blank name: Frame No. 1 parent: string nodeId: number -url: inspector-protocol/resources/blank.html name: parent: string nodeId: number -
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/shadow-multiple-expected.png index 8ebff79..164658d3 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png index 20fd136..1d47d3ae 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/animated-path-inside-transformed-html-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/animated-path-inside-transformed-html-expected.txt index d5a9c7b..1452c85 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/animated-path-inside-transformed-html-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/animated-path-inside-transformed-html-expected.txt
@@ -74,6 +74,10 @@ { "object": "LayoutSVGImage image id='image'", "reason": "full" + }, + { + "object": "LayoutText #text", + "reason": "appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/paintorder-filtered-expected.png b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/paintorder-filtered-expected.png deleted file mode 100644 index 711e7f7..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/paintorder-filtered-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/repaint-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/repaint-shadow-expected.png new file mode 100644 index 0000000..23c5cffe --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/repaint-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/window-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/window-expected.txt index 46b49ea..aa001ac 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/window-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/window-expected.txt
@@ -1982,6 +1982,22 @@ { "object": "LayoutSVGPath line", "reason": "geometry" + }, + { + "object": "LayoutSVGContainer g", + "reason": "appeared" + }, + { + "object": "LayoutSVGContainer g", + "reason": "appeared" + }, + { + "object": "LayoutSVGContainer g", + "reason": "appeared" + }, + { + "object": "LayoutSVGContainer g id='windowTitlebarGroupminimalWindow'", + "reason": "appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/text-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/text-shadow-expected.png index bb582ed..b1c100c 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/text-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/text-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/text-shadow-horizontal-expected.png b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/text-shadow-horizontal-expected.png index bb582ed..b1c100c 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/text-shadow-horizontal-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/text-shadow-horizontal-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-color-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-color-01-b-expected.png index 7e4f407..5076a9f 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-color-01-b-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-color-01-b-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-conv-01-f-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-conv-01-f-expected.png index af9856f..ef8c8fa9 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-conv-01-f-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-conv-01-f-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-example-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-example-01-b-expected.png index 355812145..dd45a6b 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-example-01-b-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-example-01-b-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-gauss-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-gauss-01-b-expected.png index 00b0891..5941c01 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-gauss-01-b-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-gauss-01-b-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png index 009b4ee..da73dad8 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png index 348f76a..b6bfea0 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-turb-01-f-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-turb-01-f-expected.png index e5be983..4fb1606 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-turb-01-f-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-turb-01-f-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-turb-02-f-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-turb-02-f-expected.png index eaa4f87..326183c 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-turb-02-f-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/filters-turb-02-f-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png index 0bbf363..1c8f386 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png index 8243eb14..60c7faa 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/as-background-image/svg-as-background-6-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/as-background-image/svg-as-background-6-expected.png index 38d9494a..c60f45d5 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/as-background-image/svg-as-background-6-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/as-background-image/svg-as-background-6-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/batik/filters/feTile-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/batik/filters/feTile-expected.png index 8914ae2e..af2cff5 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/batik/filters/feTile-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/batik/filters/feTile-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/batik/masking/maskRegions-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/batik/masking/maskRegions-expected.png index 252954e..d3c88fe 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/batik/masking/maskRegions-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/batik/masking/maskRegions-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/css/text-gradient-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/css/text-gradient-shadow-expected.png index b1a4c1e..0ffb433 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/css/text-gradient-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/css/text-gradient-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/css/text-shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/css/text-shadow-multiple-expected.png index 9b7b3648..05b6c07 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/css/text-shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/css/text-shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/clip-mask-negative-scale-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/clip-mask-negative-scale-expected.png index e1dca62..7fcc6a9 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/clip-mask-negative-scale-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/clip-mask-negative-scale-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/feComponentTransfer-Discrete-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/feComponentTransfer-Discrete-expected.png index 76a7195..9bcdf765 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/feComponentTransfer-Discrete-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/feComponentTransfer-Discrete-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/feComponentTransfer-Gamma-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/feComponentTransfer-Gamma-expected.png index 2d12e50..55cfc51 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/feComponentTransfer-Gamma-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/feComponentTransfer-Gamma-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/feComponentTransfer-Linear-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/feComponentTransfer-Linear-expected.png index 431934a..2a9c996 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/feComponentTransfer-Linear-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/feComponentTransfer-Linear-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/feComponentTransfer-Table-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/feComponentTransfer-Table-expected.png index e575a76..e13c863 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/feComponentTransfer-Table-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/feComponentTransfer-Table-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/image-with-transform-clip-filter-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/image-with-transform-clip-filter-expected.png index 42f0fee..c45bac0 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/image-with-transform-clip-filter-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/image-with-transform-clip-filter-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/text-filter-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/text-filter-expected.png index e7c87fe..7a690e94 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/text-filter-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/text-filter-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png deleted file mode 100644 index 2dc5313..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png deleted file mode 100644 index 2dc5313..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png deleted file mode 100644 index 2dc5313..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png deleted file mode 100644 index 2dc5313..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png deleted file mode 100644 index 2dc5313..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png deleted file mode 100644 index 2dc5313..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png deleted file mode 100644 index fc0573d5..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png deleted file mode 100644 index fc0573d5..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png deleted file mode 100644 index fc0573d5..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png deleted file mode 100644 index 68d08bc1..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png deleted file mode 100644 index fc0573d5..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png deleted file mode 100644 index fc0573d5..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png deleted file mode 100644 index fc0573d5..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png deleted file mode 100644 index fc0573d5..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png deleted file mode 100644 index fc0573d5..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png deleted file mode 100644 index 68d08bc1..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png deleted file mode 100644 index fc0573d5..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png deleted file mode 100644 index fc0573d5..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-bias-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-bias-attr-expected.png deleted file mode 100644 index 801c1f1d8..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-bias-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-divisor-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-divisor-attr-expected.png deleted file mode 100644 index 801c1f1d8..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-divisor-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-edgeMode-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-edgeMode-attr-expected.png deleted file mode 100644 index 18837c9..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-edgeMode-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-in-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-in-attr-expected.png deleted file mode 100644 index 801c1f1d8..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-in-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-kernelMatrix-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-kernelMatrix-attr-expected.png deleted file mode 100644 index 801c1f1d8..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-kernelMatrix-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-order-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-order-attr-expected.png deleted file mode 100644 index 801c1f1d8..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-order-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-targetX-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-targetX-attr-expected.png deleted file mode 100644 index 18837c9..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-targetX-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-targetY-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-targetY-attr-expected.png deleted file mode 100644 index 5f1ea11..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-targetY-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-bias-prop-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-bias-prop-expected.png deleted file mode 100644 index 801c1f1d8..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-bias-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-divisor-prop-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-divisor-prop-expected.png deleted file mode 100644 index 801c1f1d8..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-divisor-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-edgeMode-prop-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-edgeMode-prop-expected.png deleted file mode 100644 index 801c1f1d8..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-edgeMode-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-in-prop-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-in-prop-expected.png deleted file mode 100644 index 801c1f1d8..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-in-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-kernelMatrix-prop-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-kernelMatrix-prop-expected.png deleted file mode 100644 index 6a5711a..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-kernelMatrix-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-order-prop-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-order-prop-expected.png deleted file mode 100644 index 801c1f1d8..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-order-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-targetX-prop-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-targetX-prop-expected.png deleted file mode 100644 index 18837c9..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-targetX-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-targetY-prop-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-targetY-prop-expected.png deleted file mode 100644 index 5f1ea11..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-targetY-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.png deleted file mode 100644 index 58ce457..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.png deleted file mode 100644 index 58ce457..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.png deleted file mode 100644 index 58ce457..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.png deleted file mode 100644 index 58ce457..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.png deleted file mode 100644 index 58ce457..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.png deleted file mode 100644 index 58ce457..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.png deleted file mode 100644 index 0a42fb0..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.png deleted file mode 100644 index 0a42fb0..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.png deleted file mode 100644 index 0a42fb0..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.png deleted file mode 100644 index 0a42fb0..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-dom-baseFrequency-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-dom-baseFrequency-attr-expected.png deleted file mode 100644 index 2e60925..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-dom-baseFrequency-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-dom-numOctaves-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-dom-numOctaves-attr-expected.png deleted file mode 100644 index 2e60925..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-dom-numOctaves-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-dom-seed-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-dom-seed-attr-expected.png deleted file mode 100644 index 2e60925..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-dom-seed-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-dom-stitchTiles-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-dom-stitchTiles-attr-expected.png deleted file mode 100644 index f93fa40..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-dom-stitchTiles-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-dom-type-attr-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-dom-type-attr-expected.png deleted file mode 100644 index 2e60925..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-dom-type-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-baseFrequency-prop-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-baseFrequency-prop-expected.png deleted file mode 100644 index 2e60925..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-baseFrequency-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-numOctaves-prop-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-numOctaves-prop-expected.png deleted file mode 100644 index 2e60925..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-numOctaves-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-seed-prop-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-seed-prop-expected.png deleted file mode 100644 index 85fb788..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-seed-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-stitchTiles-prop-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-stitchTiles-prop-expected.png deleted file mode 100644 index 2e60925..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-stitchTiles-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-type-prop-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-type-prop-expected.png deleted file mode 100644 index 2e60925..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-type-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/filters/color-interpolation-filters-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/filters/color-interpolation-filters-expected.png deleted file mode 100644 index 331d057..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/filters/color-interpolation-filters-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/filters/feColorMatrix-offset-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/filters/feColorMatrix-offset-expected.png deleted file mode 100644 index ea21e78..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/filters/feColorMatrix-offset-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/filters/feDropShadow-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/filters/feDropShadow-expected.png deleted file mode 100644 index ba0a4b6..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/filters/feDropShadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/filters/feGaussianBlur-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/filters/feGaussianBlur-expected.png deleted file mode 100644 index e3bf080..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/filters/feGaussianBlur-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/filters/feTurbulence-scale-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/filters/feTurbulence-scale-expected.png deleted file mode 100644 index 98ad363..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/filters/feTurbulence-scale-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/filters/feTurbulence-tiled-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/filters/feTurbulence-tiled-expected.png index b233f51f..00c93e9f 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/filters/feTurbulence-tiled-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/filters/feTurbulence-tiled-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/filters/filteredImage-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/filters/filteredImage-expected.png index 00d2f04..2d57e38a 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/filters/filteredImage-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/filters/filteredImage-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/transforms/text-with-mask-with-svg-transform-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/transforms/text-with-mask-with-svg-transform-expected.png index 1f6901bf4..bc66f1e 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/transforms/text-with-mask-with-svg-transform-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/transforms/text-with-mask-with-svg-transform-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/zoom/page/zoom-mask-with-percentages-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/zoom/page/zoom-mask-with-percentages-expected.png index ec3f068..4fa6197 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/zoom/page/zoom-mask-with-percentages-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/zoom/page/zoom-mask-with-percentages-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/transforms/shadows-expected.png b/third_party/WebKit/LayoutTests/platform/linux/transforms/shadows-expected.png index 55d9f75..5926086 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/transforms/shadows-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/transforms/shadows-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png deleted file mode 100644 index 608720c6..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/compositing/shadows/shadow-drawing-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/compositing/shadows/shadow-drawing-expected.png index 4a5c54ff..24fc786 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/compositing/shadows/shadow-drawing-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/compositing/shadows/shadow-drawing-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/shadow-multiple-expected.png index 8ebff79..164658d3 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png index 20fd136..1d47d3ae 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/svg/paintorder-filtered-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/svg/paintorder-filtered-expected.png deleted file mode 100644 index 711e7f7..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/svg/paintorder-filtered-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/text-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/text-shadow-expected.png index bb582ed..b1c100c 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/text-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/text-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/text-shadow-horizontal-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/text-shadow-horizontal-expected.png index bb582ed..b1c100c 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/text-shadow-horizontal-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/text-shadow-horizontal-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png index 1d092718..974e5ad4 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/color-profile-image-filter-all-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/color-profile-image-filter-all-expected.png index 930406a..74c80a2 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/color-profile-image-filter-all-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/color-profile-image-filter-all-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/mojo-loading/http/tests/inspector/extensions/extensions-panel-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/mojo-loading/http/tests/inspector/extensions/extensions-panel-expected.txt deleted file mode 100644 index f1e00c8..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/mojo-loading/http/tests/inspector/extensions/extensions-panel-expected.txt +++ /dev/null
@@ -1,74 +0,0 @@ -CONSOLE MESSAGE: line 12: hello -Tests WebInspector extension API - - -Started extension. -Running tests... -RUNNING TEST: extension_testCreatePanel -Panel created -{ - createStatusBarButton : <function> - onHidden : { - addListener : <function> - removeListener : <function> - } - onSearch : { - addListener : <function> - removeListener : <function> - } - onShown : { - addListener : <function> - removeListener : <function> - } - show : <function> -} -Panel shown -Extension panel size correct -Panel hidden -RUNNING TEST: extension_testGlobalShortcuts -Panel shown, now toggling console... -Panel resized, test passed. -RUNNING TEST: extension_testOpenResource -Showing .../extensions-panel.html -Showing resource .../inspector/extensions/extensions-panel.html in panel sources), line: 1001 -Showing .../abe.png -Showing resource .../extensions/resources/abe.png in panel sources), line: 1002 -Showing .../missing.txt -Showing resource .../extensions/resources/missing.txt in panel network), line: undefined -Showing not-found.html -error: Extension server error: Object not found: not-found.html -Showing javascript:console.error('oh no!') -error: Extension server error: Object not found: javascript:console.error('oh no!') -RUNNING TEST: extension_testSearch -Panel searched: -{ - 0 : "performSearch" - 1 : "hello" -} -Panel searched: -{ - 0 : "cancelSearch" - 1 : undefined -} -RUNNING TEST: extension_testStatusBarButtons -Created a status bar button, dump follows: -{ - onClicked : { - addListener : <function> - removeListener : <function> - } - update : <function> -} -button1 clicked -Status bar buttons state: -status bar item 0, icon: ".../inspector/resources/button1.png", tooltip: 'Button One tooltip', disabled: false -status bar item 1, icon: ".../inspector/resources/button2.png", tooltip: 'Button Two tooltip', disabled: true -Updated status bar buttons -Status bar buttons state: -status bar item 0, icon: ".../inspector/resources/button1-updated.png", tooltip: 'Button One tooltip', disabled: false -status bar item 1, icon: ".../inspector/resources/button2.png", tooltip: 'Button Two updated tooltip', disabled: false -button2 clicked -RUNNING TEST: extension_testThemeName -Theme name: themeNameForTest -All tests done. -
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/mojo-loading/http/tests/misc/acid3-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/mojo-loading/http/tests/misc/acid3-expected.png index 631ea7c..cc0912cd 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/mojo-loading/http/tests/misc/acid3-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/mojo-loading/http/tests/misc/acid3-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/off-main-thread-fetch/http/tests/misc/acid3-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/off-main-thread-fetch/http/tests/misc/acid3-expected.png deleted file mode 100644 index 631ea7c..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/off-main-thread-fetch/http/tests/misc/acid3-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/scalefactor150/fast/hidpi/static/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/scalefactor150/fast/hidpi/static/calendar-picker-appearance-expected.png index f1dc8360..8cbe9df 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/scalefactor150/fast/hidpi/static/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/scalefactor150/fast/hidpi/static/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png index 5a2ea42..6abe5a34 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/scalefactor200withzoom/fast/hidpi/static/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/scalefactor200withzoom/fast/hidpi/static/calendar-picker-appearance-expected.png index 5a2ea42..6abe5a34 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/scalefactor200withzoom/fast/hidpi/static/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/scalefactor200withzoom/fast/hidpi/static/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/compositing/shadows/shadow-drawing-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/compositing/shadows/shadow-drawing-expected.png index f43b481..ff05251 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/compositing/shadows/shadow-drawing-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/compositing/shadows/shadow-drawing-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/css/color-correction-on-text-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/css/color-correction-on-text-shadow-expected.png index 5561d71..f63968e9 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/css/color-correction-on-text-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/css/color-correction-on-text-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/css/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/css/shadow-multiple-expected.png index 3719b0a..fb12721 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/css/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/css/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png index 450f17e..7a0b115 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png index 0a4e408..98b0851 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-expected.png index 7d7f441c..4be6553 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png index 17f2365b..e999419 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png index 0eefdc6..dc0285f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png index 44593843..cacf8e7 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png index 3f877a9..6314e088 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png index 1b34889..541fda0 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png index 0e827bf..0da7cc2 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png index 7809024..f1c440c 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/month-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/month-picker-appearance-expected.png index ea4fa42..f82e355 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/month-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/month-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/month-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/month-picker-appearance-step-expected.png index 88df61c..46596463 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/month-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/month-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/week-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/week-picker-appearance-expected.png index f8bcef9..15c0046 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/week-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/week-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/week-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/week-picker-appearance-step-expected.png index 18bba09..7066842 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/week-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/week-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/color/color-suggestion-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/color/color-suggestion-picker-appearance-expected.png index fd25295..db09fb7 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/color/color-suggestion-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/color/color-suggestion-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png index f3607e0..e651908 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png index 626572a..66fb913 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png index b1f7dd0..591e901 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png index 6567cb04..bfe4f14 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/input-appearance-height-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/input-appearance-height-expected.png index 7420552..70321cf 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/input-appearance-height-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/input-appearance-height-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/search/search-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/search/search-appearance-basic-expected.png index f136436d..671899d1 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/search/search-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/search/search-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/select/listbox-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/select/listbox-appearance-basic-expected.png index 0a4bc1b..a36a0f2 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/select/listbox-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/select/listbox-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/select/select-initial-position-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/select/select-initial-position-expected.png index a3d3813..a7c497d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/select/select-initial-position-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/select/select-initial-position-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/select/select-initial-position-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/select/select-initial-position-expected.txt index 4b74084..73d65c36 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/select/select-initial-position-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/select/select-initial-position-expected.txt
@@ -3,54 +3,61 @@ layer at (0,0) size 800x600 LayoutBlockFlow {HTML} at (0,0) size 800x600 LayoutBlockFlow {BODY} at (8,8) size 784x584 - LayoutText {#text} at (0,0) size 98x18 - text run at (0,0) width 98: "initial selected:" - LayoutBR {BR} at (97,14) size 1x0 - LayoutText {#text} at (132,59) size 5x18 - text run at (132,59) width 5: " " - LayoutBR {BR} at (136,73) size 1x0 - LayoutText {#text} at (0,77) size 165x18 - text run at (0,77) width 165: "dynamic selected change:" - LayoutBR {BR} at (164,91) size 1x0 - LayoutText {#text} at (132,136) size 5x18 - text run at (132,136) width 5: " " - LayoutText {#text} at (0,0) size 0x0 - LayoutBR {BR} at (0,0) size 0x0 - LayoutText {#text} at (0,154) size 217x18 - text run at (0,154) width 217: "dynamic insert of selected option:" - LayoutBR {BR} at (216,168) size 1x0 - LayoutText {#text} at (132,213) size 5x18 - text run at (132,213) width 5: " " - LayoutBR {BR} at (136,227) size 1x0 - LayoutText {#text} at (0,231) size 98x18 - text run at (0,231) width 98: "initial selected:" - LayoutBR {BR} at (97,245) size 1x0 - LayoutMenuList {SELECT} at (0,250) size 147x18 [bgcolor=#F8F8F8] - LayoutBlockFlow (anonymous) at (0,0) size 147x18 - LayoutText (anonymous) at (8,2) size 116x13 - text run at (8,2) width 116: "this should be selected" - LayoutText {#text} at (147,249) size 4x18 - text run at (147,249) width 4: " " - LayoutBR {BR} at (151,263) size 0x0 - LayoutText {#text} at (0,268) size 165x18 - text run at (0,268) width 165: "dynamic selected change:" - LayoutBR {BR} at (164,282) size 1x0 - LayoutMenuList {SELECT} at (0,287) size 147x18 [bgcolor=#F8F8F8] - LayoutBlockFlow (anonymous) at (0,0) size 147x18 - LayoutText (anonymous) at (8,2) size 116x13 - text run at (8,2) width 116: "this should be selected" - LayoutText {#text} at (147,286) size 4x18 - text run at (147,286) width 4: " " - LayoutText {#text} at (0,0) size 0x0 - LayoutBR {BR} at (0,0) size 0x0 - LayoutText {#text} at (0,305) size 217x18 - text run at (0,305) width 217: "dynamic insert of selected option:" - LayoutBR {BR} at (216,319) size 1x0 - LayoutMenuList {SELECT} at (0,323) size 147x18 [bgcolor=#F8F8F8] - LayoutBlockFlow (anonymous) at (0,0) size 147x18 - LayoutText (anonymous) at (8,2) size 116x13 - text run at (8,2) width 116: "this should be selected" - LayoutText {#text} at (0,0) size 0x0 + LayoutBlockFlow (anonymous) at (0,0) size 784x341 + LayoutText {#text} at (0,0) size 98x18 + text run at (0,0) width 98: "initial selected:" + LayoutBR {BR} at (97,14) size 1x0 + LayoutText {#text} at (132,59) size 5x18 + text run at (132,59) width 5: " " + LayoutBR {BR} at (136,73) size 1x0 + LayoutText {#text} at (0,77) size 165x18 + text run at (0,77) width 165: "dynamic selected change:" + LayoutBR {BR} at (164,91) size 1x0 + LayoutText {#text} at (132,136) size 5x18 + text run at (132,136) width 5: " " + LayoutText {#text} at (0,0) size 0x0 + LayoutBR {BR} at (0,0) size 0x0 + LayoutText {#text} at (0,154) size 217x18 + text run at (0,154) width 217: "dynamic insert of selected option:" + LayoutBR {BR} at (216,168) size 1x0 + LayoutText {#text} at (132,213) size 5x18 + text run at (132,213) width 5: " " + LayoutBR {BR} at (136,227) size 1x0 + LayoutText {#text} at (0,231) size 98x18 + text run at (0,231) width 98: "initial selected:" + LayoutBR {BR} at (97,245) size 1x0 + LayoutMenuList {SELECT} at (0,250) size 147x18 [bgcolor=#F8F8F8] + LayoutBlockFlow (anonymous) at (0,0) size 147x18 + LayoutText (anonymous) at (8,2) size 116x13 + text run at (8,2) width 116: "this should be selected" + LayoutText {#text} at (147,249) size 4x18 + text run at (147,249) width 4: " " + LayoutBR {BR} at (151,263) size 0x0 + LayoutText {#text} at (0,268) size 165x18 + text run at (0,268) width 165: "dynamic selected change:" + LayoutBR {BR} at (164,282) size 1x0 + LayoutMenuList {SELECT} at (0,287) size 147x18 [bgcolor=#F8F8F8] + LayoutBlockFlow (anonymous) at (0,0) size 147x18 + LayoutText (anonymous) at (8,2) size 116x13 + text run at (8,2) width 116: "this should be selected" + LayoutText {#text} at (147,286) size 4x18 + text run at (147,286) width 4: " " + LayoutText {#text} at (0,0) size 0x0 + LayoutBR {BR} at (0,0) size 0x0 + LayoutText {#text} at (0,305) size 217x18 + text run at (0,305) width 217: "dynamic insert of selected option:" + LayoutBR {BR} at (216,319) size 1x0 + LayoutMenuList {SELECT} at (0,323) size 147x18 [bgcolor=#F8F8F8] + LayoutBlockFlow (anonymous) at (0,0) size 147x18 + LayoutText (anonymous) at (8,2) size 116x13 + text run at (8,2) width 116: "this should be selected" + LayoutText {#text} at (0,0) size 0x0 + LayoutBlockFlow {P} at (0,357) size 784x18 + LayoutText {#text} at (0,0) size 195x18 + text run at (0,0) width 195: "Display 'none' to 'inline-block'" + LayoutBlockFlow (anonymous) at (0,391) size 784x59 + LayoutText {#text} at (0,0) size 0x0 + LayoutText {#text} at (0,0) size 0x0 layer at (8,26) size 133x59 clip at (9,27) size 120x57 scrollY 99.00 scrollHeight 199 LayoutListBox {SELECT} at (0,18.25) size 132.55x58.75 [bgcolor=#FFFFFF] [border: (1px solid #999999)] LayoutBlockFlow {OPTION} at (1,1) size 119.55x14.19 @@ -165,3 +172,26 @@ LayoutBlockFlow {OPTION} at (1,100.31) size 119.55x14.19 LayoutText {#text} at (2,0) size 17x13 text run at (2,0) width 17: "opt" +layer at (8,399) size 195x59 clip at (9,400) size 182x57 scrollY 42.00 scrollHeight 100 + LayoutListBox {SELECT} at (0,0.25) size 194.88x58.75 [bgcolor=#FFFFFF] [border: (1px solid #999999)] + LayoutBlockFlow {OPTION} at (1,1) size 181.88x14.19 + LayoutText {#text} at (2,0) size 38x13 + text run at (2,0) width 38: "option1" + LayoutBlockFlow {OPTION} at (1,15.19) size 181.88x14.19 + LayoutText {#text} at (2,0) size 38x13 + text run at (2,0) width 38: "option2" + LayoutBlockFlow {OPTION} at (1,29.38) size 181.88x14.19 + LayoutText {#text} at (2,0) size 38x13 + text run at (2,0) width 38: "option3" + LayoutBlockFlow {OPTION} at (1,43.56) size 181.88x14.19 + LayoutText {#text} at (2,0) size 38x13 + text run at (2,0) width 38: "option4" + LayoutBlockFlow {OPTION} at (1,57.75) size 181.88x14.19 + LayoutText {#text} at (2,0) size 38x13 + text run at (2,0) width 38: "option5" + LayoutBlockFlow {OPTION} at (1,71.94) size 181.88x14.19 + LayoutText {#text} at (2,0) size 38x13 + text run at (2,0) width 38: "option6" + LayoutBlockFlow {OPTION} at (1,86.13) size 181.88x14.19 [bgcolor=#D4D4D4] + LayoutText {#text} at (2,0) size 178x13 + text run at (2,0) width 178: "This should be selected and visible."
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/submit/submit-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/submit/submit-appearance-basic-expected.png index 127fc2d..13e59b2 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/submit/submit-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/submit/submit-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/text/text-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/text/text-appearance-basic-expected.png index 9a5e333..86d74c47 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/text/text-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/text/text-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/textarea/textarea-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/textarea/textarea-appearance-basic-expected.png index 1000e67d..b60aca4 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/textarea/textarea-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/textarea/textarea-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/shadow-no-blur-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/shadow-no-blur-expected.png index 85056fa..7f06cb7 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/shadow-no-blur-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/shadow-no-blur-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/shadow-translucent-fill-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/shadow-translucent-fill-expected.png index 3a506848..da404f3 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/shadow-translucent-fill-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/shadow-translucent-fill-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/stroking-decorations-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/stroking-decorations-expected.png index bd7da1c..bcfac4a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/stroking-decorations-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/stroking-decorations-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/stroking-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/stroking-expected.png index ef327ea5..13bc5ce 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/stroking-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/stroking-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/text-shadow-no-default-color-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/text-shadow-no-default-color-expected.png index 6e5e15a..b157d4a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/text-shadow-no-default-color-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/text-shadow-no-default-color-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/writing-mode/english-lr-text-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/writing-mode/english-lr-text-expected.png index a25b838..f19abb3 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/writing-mode/english-lr-text-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/writing-mode/english-lr-text-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/ietestcenter/css3/text/textshadow-002-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/ietestcenter/css3/text/textshadow-002-expected.png index 56a793b..981afa3 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/ietestcenter/css3/text/textshadow-002-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/ietestcenter/css3/text/textshadow-002-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/ietestcenter/css3/text/textshadow-003-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/ietestcenter/css3/text/textshadow-003-expected.png index f72a550..02eb88e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/ietestcenter/css3/text/textshadow-003-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/ietestcenter/css3/text/textshadow-003-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/ietestcenter/css3/text/textshadow-004-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/ietestcenter/css3/text/textshadow-004-expected.png index dd629ba..4ff544d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/ietestcenter/css3/text/textshadow-004-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/ietestcenter/css3/text/textshadow-004-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/ietestcenter/css3/text/textshadow-010-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/ietestcenter/css3/text/textshadow-010-expected.png index 1855735b..d5d6313 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/ietestcenter/css3/text/textshadow-010-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/ietestcenter/css3/text/textshadow-010-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/paint/invalidation/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/paint/invalidation/shadow-multiple-expected.png index fa266bcb..4bf1b85d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/paint/invalidation/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/paint/invalidation/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/svg/css/text-gradient-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/svg/css/text-gradient-shadow-expected.png index e3632687a6..dd49baa4 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/svg/css/text-gradient-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/svg/css/text-gradient-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/svg/css/text-shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/svg/css/text-shadow-multiple-expected.png index 0525d5a..409a188 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/svg/css/text-shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/svg/css/text-shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/disable-spinvalidation/compositing/shadows/shadow-drawing-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/disable-spinvalidation/compositing/shadows/shadow-drawing-expected.png deleted file mode 100644 index f43b481..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/disable-spinvalidation/compositing/shadows/shadow-drawing-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/disable-spinvalidation/paint/invalidation/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/disable-spinvalidation/paint/invalidation/shadow-multiple-expected.png index fa266bcb..4bf1b85d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/disable-spinvalidation/paint/invalidation/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/disable-spinvalidation/paint/invalidation/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png index 626129fd..c0caf05 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png index 12f7fa0..c9ae99e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png index cb1ee6d..3159c71 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-expected.png index f85684e..8b168a77 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png index 3579f562..d55e1368 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png index e865c33..c744d3d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png index 5256272..518d6d65 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png index 327f34b3..09e8685 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png index 20d474a2..6a0f712 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png index 72f124d..096ba33 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png index 2119aa5..47f87d6a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/month-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/month-picker-appearance-expected.png index eb8b3e09..9b3ec36 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/month-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/month-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/month-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/month-picker-appearance-step-expected.png index b13d066..18dc41a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/month-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/month-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/week-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/week-picker-appearance-expected.png index e67e941..e7697d13 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/week-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/week-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/week-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/week-picker-appearance-step-expected.png index 9105f02f..d0ccc04b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/week-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/calendar-picker/week-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/color/color-suggestion-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/color/color-suggestion-picker-appearance-expected.png index 0d2885f..142c301f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/color/color-suggestion-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/color/color-suggestion-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png index b74ae739..9f77038 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png index d0d1832..c8ca5ab 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png index 34c1948..3388a6f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png index ff353083..caacd275 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/input-appearance-height-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/input-appearance-height-expected.png index e8bc8b7e..11b0ef2f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/input-appearance-height-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/input-appearance-height-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/search/search-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/search/search-appearance-basic-expected.png index 136d6126..48de82dd 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/search/search-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/search/search-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/select/listbox-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/select/listbox-appearance-basic-expected.png index dac3446..b25fc45 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/select/listbox-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/select/listbox-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/select/select-initial-position-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/select/select-initial-position-expected.png index 0a800ca..35b041f6 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/select/select-initial-position-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/select/select-initial-position-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/select/select-initial-position-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/select/select-initial-position-expected.txt index 8909f11..569a8e6 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/select/select-initial-position-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/select/select-initial-position-expected.txt
@@ -3,54 +3,61 @@ layer at (0,0) size 800x600 LayoutBlockFlow {HTML} at (0,0) size 800x600 LayoutBlockFlow {BODY} at (8,8) size 784x584 - LayoutText {#text} at (0,0) size 98x18 - text run at (0,0) width 98: "initial selected:" - LayoutBR {BR} at (97,14) size 1x0 - LayoutText {#text} at (137,59) size 5x18 - text run at (137,59) width 5: " " - LayoutBR {BR} at (141,73) size 1x0 - LayoutText {#text} at (0,77) size 165x18 - text run at (0,77) width 165: "dynamic selected change:" - LayoutBR {BR} at (164,91) size 1x0 - LayoutText {#text} at (137,136) size 5x18 - text run at (137,136) width 5: " " - LayoutText {#text} at (0,0) size 0x0 - LayoutBR {BR} at (0,0) size 0x0 - LayoutText {#text} at (0,154) size 217x18 - text run at (0,154) width 217: "dynamic insert of selected option:" - LayoutBR {BR} at (216,168) size 1x0 - LayoutText {#text} at (137,213) size 5x18 - text run at (137,213) width 5: " " - LayoutBR {BR} at (141,227) size 1x0 - LayoutText {#text} at (0,231) size 98x18 - text run at (0,231) width 98: "initial selected:" - LayoutBR {BR} at (97,245) size 1x0 - LayoutMenuList {SELECT} at (0,250) size 152x18 [bgcolor=#F8F8F8] - LayoutBlockFlow (anonymous) at (0,0) size 152x18 - LayoutText (anonymous) at (8,2) size 121x13 - text run at (8,2) width 121: "this should be selected" - LayoutText {#text} at (152,249) size 4x18 - text run at (152,249) width 4: " " - LayoutBR {BR} at (156,263) size 0x0 - LayoutText {#text} at (0,268) size 165x18 - text run at (0,268) width 165: "dynamic selected change:" - LayoutBR {BR} at (164,282) size 1x0 - LayoutMenuList {SELECT} at (0,287) size 152x18 [bgcolor=#F8F8F8] - LayoutBlockFlow (anonymous) at (0,0) size 152x18 - LayoutText (anonymous) at (8,2) size 121x13 - text run at (8,2) width 121: "this should be selected" - LayoutText {#text} at (152,286) size 4x18 - text run at (152,286) width 4: " " - LayoutText {#text} at (0,0) size 0x0 - LayoutBR {BR} at (0,0) size 0x0 - LayoutText {#text} at (0,305) size 217x18 - text run at (0,305) width 217: "dynamic insert of selected option:" - LayoutBR {BR} at (216,319) size 1x0 - LayoutMenuList {SELECT} at (0,323) size 152x18 [bgcolor=#F8F8F8] - LayoutBlockFlow (anonymous) at (0,0) size 152x18 - LayoutText (anonymous) at (8,2) size 121x13 - text run at (8,2) width 121: "this should be selected" - LayoutText {#text} at (0,0) size 0x0 + LayoutBlockFlow (anonymous) at (0,0) size 784x341 + LayoutText {#text} at (0,0) size 98x18 + text run at (0,0) width 98: "initial selected:" + LayoutBR {BR} at (97,14) size 1x0 + LayoutText {#text} at (137,59) size 5x18 + text run at (137,59) width 5: " " + LayoutBR {BR} at (141,73) size 1x0 + LayoutText {#text} at (0,77) size 165x18 + text run at (0,77) width 165: "dynamic selected change:" + LayoutBR {BR} at (164,91) size 1x0 + LayoutText {#text} at (137,136) size 5x18 + text run at (137,136) width 5: " " + LayoutText {#text} at (0,0) size 0x0 + LayoutBR {BR} at (0,0) size 0x0 + LayoutText {#text} at (0,154) size 217x18 + text run at (0,154) width 217: "dynamic insert of selected option:" + LayoutBR {BR} at (216,168) size 1x0 + LayoutText {#text} at (137,213) size 5x18 + text run at (137,213) width 5: " " + LayoutBR {BR} at (141,227) size 1x0 + LayoutText {#text} at (0,231) size 98x18 + text run at (0,231) width 98: "initial selected:" + LayoutBR {BR} at (97,245) size 1x0 + LayoutMenuList {SELECT} at (0,250) size 152x18 [bgcolor=#F8F8F8] + LayoutBlockFlow (anonymous) at (0,0) size 152x18 + LayoutText (anonymous) at (8,2) size 121x13 + text run at (8,2) width 121: "this should be selected" + LayoutText {#text} at (152,249) size 4x18 + text run at (152,249) width 4: " " + LayoutBR {BR} at (156,263) size 0x0 + LayoutText {#text} at (0,268) size 165x18 + text run at (0,268) width 165: "dynamic selected change:" + LayoutBR {BR} at (164,282) size 1x0 + LayoutMenuList {SELECT} at (0,287) size 152x18 [bgcolor=#F8F8F8] + LayoutBlockFlow (anonymous) at (0,0) size 152x18 + LayoutText (anonymous) at (8,2) size 121x13 + text run at (8,2) width 121: "this should be selected" + LayoutText {#text} at (152,286) size 4x18 + text run at (152,286) width 4: " " + LayoutText {#text} at (0,0) size 0x0 + LayoutBR {BR} at (0,0) size 0x0 + LayoutText {#text} at (0,305) size 217x18 + text run at (0,305) width 217: "dynamic insert of selected option:" + LayoutBR {BR} at (216,319) size 1x0 + LayoutMenuList {SELECT} at (0,323) size 152x18 [bgcolor=#F8F8F8] + LayoutBlockFlow (anonymous) at (0,0) size 152x18 + LayoutText (anonymous) at (8,2) size 121x13 + text run at (8,2) width 121: "this should be selected" + LayoutText {#text} at (0,0) size 0x0 + LayoutBlockFlow {P} at (0,357) size 784x18 + LayoutText {#text} at (0,0) size 195x18 + text run at (0,0) width 195: "Display 'none' to 'inline-block'" + LayoutBlockFlow (anonymous) at (0,391) size 784x59 + LayoutText {#text} at (0,0) size 0x0 + LayoutText {#text} at (0,0) size 0x0 layer at (8,26) size 137x59 clip at (9,27) size 124x57 scrollY 99.00 scrollHeight 199 LayoutListBox {SELECT} at (0,18.25) size 137.41x58.75 [bgcolor=#FFFFFF] [border: (1px solid #999999)] LayoutBlockFlow {OPTION} at (1,1) size 124.41x14.19 @@ -165,3 +172,26 @@ LayoutBlockFlow {OPTION} at (1,100.31) size 124.41x14.19 LayoutText {#text} at (2,0) size 18x13 text run at (2,0) width 18: "opt" +layer at (8,399) size 202x59 clip at (9,400) size 189x57 scrollY 42.00 scrollHeight 100 + LayoutListBox {SELECT} at (0,0.25) size 202.05x58.75 [bgcolor=#FFFFFF] [border: (1px solid #999999)] + LayoutBlockFlow {OPTION} at (1,1) size 189.05x14.19 + LayoutText {#text} at (2,0) size 38x13 + text run at (2,0) width 38: "option1" + LayoutBlockFlow {OPTION} at (1,15.19) size 189.05x14.19 + LayoutText {#text} at (2,0) size 40x13 + text run at (2,0) width 40: "option2" + LayoutBlockFlow {OPTION} at (1,29.38) size 189.05x14.19 + LayoutText {#text} at (2,0) size 40x13 + text run at (2,0) width 40: "option3" + LayoutBlockFlow {OPTION} at (1,43.56) size 189.05x14.19 + LayoutText {#text} at (2,0) size 40x13 + text run at (2,0) width 40: "option4" + LayoutBlockFlow {OPTION} at (1,57.75) size 189.05x14.19 + LayoutText {#text} at (2,0) size 40x13 + text run at (2,0) width 40: "option5" + LayoutBlockFlow {OPTION} at (1,71.94) size 189.05x14.19 + LayoutText {#text} at (2,0) size 40x13 + text run at (2,0) width 40: "option6" + LayoutBlockFlow {OPTION} at (1,86.13) size 189.05x14.19 [bgcolor=#D4D4D4] + LayoutText {#text} at (2,0) size 186x13 + text run at (2,0) width 186: "This should be selected and visible."
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/submit/submit-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/submit/submit-appearance-basic-expected.png index cb0412d..6576511 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/submit/submit-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/submit/submit-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/text/text-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/text/text-appearance-basic-expected.png index 48beaa39..51f1c5a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/text/text-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/text/text-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/textarea/textarea-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/textarea/textarea-appearance-basic-expected.png index fbfb854..6ce6b59 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/textarea/textarea-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/textarea/textarea-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png index d5ae38c..d8114cf 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/box-shadow/basic-shadows-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/box-shadow/basic-shadows-expected.png index aa1eb3ac..0dea6e07 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/box-shadow/basic-shadows-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/box-shadow/basic-shadows-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/css/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/css/shadow-multiple-expected.png index c2d2494..f1eddd4 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/css/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/css/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png index e2ed831..7bdbfcc 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png index ddebd363..d08bba6a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-expected.png index 7dbc333..250ab0c 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png index f77b2995..ee6afdca 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png index 6d92ae4..6eb39ed 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png index ce929e7..c7a6beec 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png index 7de9b28..eec22369 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png index cbb8b8e..5b652f5 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png index 358f92d..d0a436b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/month-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/month-picker-appearance-expected.png index 1a0c4f2..d91abeb 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/month-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/month-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/month-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/month-picker-appearance-step-expected.png index 9b7fe89..5dea7f4 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/month-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/month-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/week-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/week-picker-appearance-expected.png index e2adb623..059c35e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/week-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/week-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/week-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/week-picker-appearance-step-expected.png index 9527bae..7446453 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/week-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/week-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/checkbox/checkbox-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/checkbox/checkbox-appearance-basic-expected.png index 089b0d9e..1212d4e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/checkbox/checkbox-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/checkbox/checkbox-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/color/color-suggestion-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/color/color-suggestion-picker-appearance-expected.png index 59da771..e1d7355 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/color/color-suggestion-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/color/color-suggestion-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png index 31a7d97..df7c4725 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png index 2b02632..8540751 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png index 321a9b1..94415c0 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png index 10cb103a..d76ca8d5 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/input-appearance-height-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/input-appearance-height-expected.png index 9cc641f..2059bd9 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/input-appearance-height-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/input-appearance-height-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/radio/radio-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/radio/radio-appearance-basic-expected.png index ffc61d48..538834f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/radio/radio-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/radio/radio-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/search/search-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/search/search-appearance-basic-expected.png index 7380d95e..17beb88 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/search/search-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/search/search-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/select/listbox-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/select/listbox-appearance-basic-expected.png index 61242ece..9bbbf360 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/select/listbox-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/select/listbox-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/select/select-initial-position-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/select/select-initial-position-expected.png index d7ba591..1278f1c6 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/select/select-initial-position-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/select/select-initial-position-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/select/select-initial-position-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/select/select-initial-position-expected.txt index 2c82af23..8774e74 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/select/select-initial-position-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/select/select-initial-position-expected.txt
@@ -3,54 +3,61 @@ layer at (0,0) size 800x600 LayoutBlockFlow {HTML} at (0,0) size 800x600 LayoutBlockFlow {BODY} at (8,8) size 784x584 - LayoutText {#text} at (0,0) size 98x18 - text run at (0,0) width 98: "initial selected:" - LayoutBR {BR} at (97,14) size 1x0 - LayoutText {#text} at (140,59) size 5x18 - text run at (140,59) width 5: " " - LayoutBR {BR} at (144,73) size 1x0 - LayoutText {#text} at (0,77) size 165x18 - text run at (0,77) width 165: "dynamic selected change:" - LayoutBR {BR} at (164,91) size 1x0 - LayoutText {#text} at (140,136) size 5x18 - text run at (140,136) width 5: " " - LayoutText {#text} at (0,0) size 0x0 - LayoutBR {BR} at (0,0) size 0x0 - LayoutText {#text} at (0,154) size 217x18 - text run at (0,154) width 217: "dynamic insert of selected option:" - LayoutBR {BR} at (216,168) size 1x0 - LayoutText {#text} at (140,213) size 5x18 - text run at (140,213) width 5: " " - LayoutBR {BR} at (144,227) size 1x0 - LayoutText {#text} at (0,231) size 98x18 - text run at (0,231) width 98: "initial selected:" - LayoutBR {BR} at (97,245) size 1x0 - LayoutMenuList {SELECT} at (0,250) size 155x18 [bgcolor=#F8F8F8] - LayoutBlockFlow (anonymous) at (0,0) size 155x18 - LayoutText (anonymous) at (8,2) size 124x13 - text run at (8,2) width 124: "this should be selected" - LayoutText {#text} at (155,249) size 4x18 - text run at (155,249) width 4: " " - LayoutBR {BR} at (159,263) size 0x0 - LayoutText {#text} at (0,268) size 165x18 - text run at (0,268) width 165: "dynamic selected change:" - LayoutBR {BR} at (164,282) size 1x0 - LayoutMenuList {SELECT} at (0,287) size 155x18 [bgcolor=#F8F8F8] - LayoutBlockFlow (anonymous) at (0,0) size 155x18 - LayoutText (anonymous) at (8,2) size 124x13 - text run at (8,2) width 124: "this should be selected" - LayoutText {#text} at (155,286) size 4x18 - text run at (155,286) width 4: " " - LayoutText {#text} at (0,0) size 0x0 - LayoutBR {BR} at (0,0) size 0x0 - LayoutText {#text} at (0,305) size 217x18 - text run at (0,305) width 217: "dynamic insert of selected option:" - LayoutBR {BR} at (216,319) size 1x0 - LayoutMenuList {SELECT} at (0,323) size 155x18 [bgcolor=#F8F8F8] - LayoutBlockFlow (anonymous) at (0,0) size 155x18 - LayoutText (anonymous) at (8,2) size 124x13 - text run at (8,2) width 124: "this should be selected" - LayoutText {#text} at (0,0) size 0x0 + LayoutBlockFlow (anonymous) at (0,0) size 784x341 + LayoutText {#text} at (0,0) size 98x18 + text run at (0,0) width 98: "initial selected:" + LayoutBR {BR} at (97,14) size 1x0 + LayoutText {#text} at (140,59) size 5x18 + text run at (140,59) width 5: " " + LayoutBR {BR} at (144,73) size 1x0 + LayoutText {#text} at (0,77) size 165x18 + text run at (0,77) width 165: "dynamic selected change:" + LayoutBR {BR} at (164,91) size 1x0 + LayoutText {#text} at (140,136) size 5x18 + text run at (140,136) width 5: " " + LayoutText {#text} at (0,0) size 0x0 + LayoutBR {BR} at (0,0) size 0x0 + LayoutText {#text} at (0,154) size 217x18 + text run at (0,154) width 217: "dynamic insert of selected option:" + LayoutBR {BR} at (216,168) size 1x0 + LayoutText {#text} at (140,213) size 5x18 + text run at (140,213) width 5: " " + LayoutBR {BR} at (144,227) size 1x0 + LayoutText {#text} at (0,231) size 98x18 + text run at (0,231) width 98: "initial selected:" + LayoutBR {BR} at (97,245) size 1x0 + LayoutMenuList {SELECT} at (0,250) size 155x18 [bgcolor=#F8F8F8] + LayoutBlockFlow (anonymous) at (0,0) size 155x18 + LayoutText (anonymous) at (8,2) size 124x13 + text run at (8,2) width 124: "this should be selected" + LayoutText {#text} at (155,249) size 4x18 + text run at (155,249) width 4: " " + LayoutBR {BR} at (159,263) size 0x0 + LayoutText {#text} at (0,268) size 165x18 + text run at (0,268) width 165: "dynamic selected change:" + LayoutBR {BR} at (164,282) size 1x0 + LayoutMenuList {SELECT} at (0,287) size 155x18 [bgcolor=#F8F8F8] + LayoutBlockFlow (anonymous) at (0,0) size 155x18 + LayoutText (anonymous) at (8,2) size 124x13 + text run at (8,2) width 124: "this should be selected" + LayoutText {#text} at (155,286) size 4x18 + text run at (155,286) width 4: " " + LayoutText {#text} at (0,0) size 0x0 + LayoutBR {BR} at (0,0) size 0x0 + LayoutText {#text} at (0,305) size 217x18 + text run at (0,305) width 217: "dynamic insert of selected option:" + LayoutBR {BR} at (216,319) size 1x0 + LayoutMenuList {SELECT} at (0,323) size 155x18 [bgcolor=#F8F8F8] + LayoutBlockFlow (anonymous) at (0,0) size 155x18 + LayoutText (anonymous) at (8,2) size 124x13 + text run at (8,2) width 124: "this should be selected" + LayoutText {#text} at (0,0) size 0x0 + LayoutBlockFlow {P} at (0,357) size 784x18 + LayoutText {#text} at (0,0) size 195x18 + text run at (0,0) width 195: "Display 'none' to 'inline-block'" + LayoutBlockFlow (anonymous) at (0,391) size 784x59 + LayoutText {#text} at (0,0) size 0x0 + LayoutText {#text} at (0,0) size 0x0 layer at (8,26) size 140x59 clip at (9,27) size 127x57 scrollY 99.00 scrollHeight 199 LayoutListBox {SELECT} at (0,18.25) size 140.19x58.75 [bgcolor=#FFFFFF] [border: (1px solid #999999)] LayoutBlockFlow {OPTION} at (1,1) size 127.19x14.19 @@ -165,3 +172,26 @@ LayoutBlockFlow {OPTION} at (1,100.31) size 127.19x14.19 LayoutText {#text} at (2,0) size 18x13 text run at (2,0) width 18: "opt" +layer at (8,399) size 207x59 clip at (9,400) size 194x57 scrollY 42.00 scrollHeight 100 + LayoutListBox {SELECT} at (0,0.25) size 207.19x58.75 [bgcolor=#FFFFFF] [border: (1px solid #999999)] + LayoutBlockFlow {OPTION} at (1,1) size 194.19x14.19 + LayoutText {#text} at (2,0) size 42x13 + text run at (2,0) width 42: "option1" + LayoutBlockFlow {OPTION} at (1,15.19) size 194.19x14.19 + LayoutText {#text} at (2,0) size 42x13 + text run at (2,0) width 42: "option2" + LayoutBlockFlow {OPTION} at (1,29.38) size 194.19x14.19 + LayoutText {#text} at (2,0) size 42x13 + text run at (2,0) width 42: "option3" + LayoutBlockFlow {OPTION} at (1,43.56) size 194.19x14.19 + LayoutText {#text} at (2,0) size 42x13 + text run at (2,0) width 42: "option4" + LayoutBlockFlow {OPTION} at (1,57.75) size 194.19x14.19 + LayoutText {#text} at (2,0) size 42x13 + text run at (2,0) width 42: "option5" + LayoutBlockFlow {OPTION} at (1,71.94) size 194.19x14.19 + LayoutText {#text} at (2,0) size 42x13 + text run at (2,0) width 42: "option6" + LayoutBlockFlow {OPTION} at (1,86.13) size 194.19x14.19 [bgcolor=#D4D4D4] + LayoutText {#text} at (2,0) size 191x13 + text run at (2,0) width 191: "This should be selected and visible."
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/submit/submit-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/submit/submit-appearance-basic-expected.png index cfea5b2..cf85816 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/submit/submit-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/submit/submit-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/text/text-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/text/text-appearance-basic-expected.png index c2c72c5..4044d5a5 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/text/text-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/text/text-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/textarea/textarea-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/textarea/textarea-appearance-basic-expected.png index 34e01dd..15acea7d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/textarea/textarea-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/textarea/textarea-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/text/shadow-translucent-fill-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/text/shadow-translucent-fill-expected.png index 505d08d..72d1b248b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/text/shadow-translucent-fill-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/text/shadow-translucent-fill-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/text/text-shadow-no-default-color-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/text/text-shadow-no-default-color-expected.png index a8c8874..070c593 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/text/text-shadow-no-default-color-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/text/text-shadow-no-default-color-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/ietestcenter/css3/text/textshadow-003-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/ietestcenter/css3/text/textshadow-003-expected.png index de47954..f8013713 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/ietestcenter/css3/text/textshadow-003-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/ietestcenter/css3/text/textshadow-003-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/ietestcenter/css3/text/textshadow-004-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/ietestcenter/css3/text/textshadow-004-expected.png index 7319458..efbb96e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/ietestcenter/css3/text/textshadow-004-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/ietestcenter/css3/text/textshadow-004-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/svg/zoom/page/zoom-mask-with-percentages-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/svg/zoom/page/zoom-mask-with-percentages-expected.png index 0ef3b49..ecbec69 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/svg/zoom/page/zoom-mask-with-percentages-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/svg/zoom/page/zoom-mask-with-percentages-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png index 6198398..b36a5fb4 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png index 12f7fa0..c9ae99e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png index cb1ee6d..3159c71 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-expected.png index f85684e..8b168a77 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png index 3579f562..d55e1368 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png index e865c33..c744d3d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png index 5256272..518d6d65 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png index 327f34b3..09e8685 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png index 20d474a2..6a0f712 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png index 72f124d..096ba33 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png index 2119aa5..47f87d6a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/month-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/month-picker-appearance-expected.png index eb8b3e09..9b3ec36 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/month-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/month-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/month-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/month-picker-appearance-step-expected.png index b13d066..18dc41a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/month-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/month-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/week-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/week-picker-appearance-expected.png index e67e941..e7697d13 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/week-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/week-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/week-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/week-picker-appearance-step-expected.png index 9105f02f..d0ccc04b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/week-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/calendar-picker/week-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/checkbox/checkbox-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/checkbox/checkbox-appearance-basic-expected.png index 7a5ab99..4a6fd29 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/checkbox/checkbox-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/checkbox/checkbox-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/color/color-suggestion-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/color/color-suggestion-picker-appearance-expected.png index 0d2885f..142c301f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/color/color-suggestion-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/color/color-suggestion-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png index b74ae739..9f77038 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png index d0d1832..c8ca5ab 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png index 34c1948..3388a6f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png index ff353083..caacd275 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/input-appearance-height-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/input-appearance-height-expected.png index f86c498..452037d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/input-appearance-height-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/input-appearance-height-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/radio/radio-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/radio/radio-appearance-basic-expected.png index 25c4802..0f78073 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/radio/radio-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/radio/radio-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/search/search-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/search/search-appearance-basic-expected.png index 136d6126..48de82dd 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/search/search-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/search/search-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/select/listbox-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/select/listbox-appearance-basic-expected.png index dac3446..b25fc45 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/select/listbox-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/select/listbox-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/select/select-initial-position-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/select/select-initial-position-expected.png index 0a800ca..35b041f6 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/select/select-initial-position-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/select/select-initial-position-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/select/select-initial-position-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/select/select-initial-position-expected.txt index 8909f11..569a8e6 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/select/select-initial-position-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/select/select-initial-position-expected.txt
@@ -3,54 +3,61 @@ layer at (0,0) size 800x600 LayoutBlockFlow {HTML} at (0,0) size 800x600 LayoutBlockFlow {BODY} at (8,8) size 784x584 - LayoutText {#text} at (0,0) size 98x18 - text run at (0,0) width 98: "initial selected:" - LayoutBR {BR} at (97,14) size 1x0 - LayoutText {#text} at (137,59) size 5x18 - text run at (137,59) width 5: " " - LayoutBR {BR} at (141,73) size 1x0 - LayoutText {#text} at (0,77) size 165x18 - text run at (0,77) width 165: "dynamic selected change:" - LayoutBR {BR} at (164,91) size 1x0 - LayoutText {#text} at (137,136) size 5x18 - text run at (137,136) width 5: " " - LayoutText {#text} at (0,0) size 0x0 - LayoutBR {BR} at (0,0) size 0x0 - LayoutText {#text} at (0,154) size 217x18 - text run at (0,154) width 217: "dynamic insert of selected option:" - LayoutBR {BR} at (216,168) size 1x0 - LayoutText {#text} at (137,213) size 5x18 - text run at (137,213) width 5: " " - LayoutBR {BR} at (141,227) size 1x0 - LayoutText {#text} at (0,231) size 98x18 - text run at (0,231) width 98: "initial selected:" - LayoutBR {BR} at (97,245) size 1x0 - LayoutMenuList {SELECT} at (0,250) size 152x18 [bgcolor=#F8F8F8] - LayoutBlockFlow (anonymous) at (0,0) size 152x18 - LayoutText (anonymous) at (8,2) size 121x13 - text run at (8,2) width 121: "this should be selected" - LayoutText {#text} at (152,249) size 4x18 - text run at (152,249) width 4: " " - LayoutBR {BR} at (156,263) size 0x0 - LayoutText {#text} at (0,268) size 165x18 - text run at (0,268) width 165: "dynamic selected change:" - LayoutBR {BR} at (164,282) size 1x0 - LayoutMenuList {SELECT} at (0,287) size 152x18 [bgcolor=#F8F8F8] - LayoutBlockFlow (anonymous) at (0,0) size 152x18 - LayoutText (anonymous) at (8,2) size 121x13 - text run at (8,2) width 121: "this should be selected" - LayoutText {#text} at (152,286) size 4x18 - text run at (152,286) width 4: " " - LayoutText {#text} at (0,0) size 0x0 - LayoutBR {BR} at (0,0) size 0x0 - LayoutText {#text} at (0,305) size 217x18 - text run at (0,305) width 217: "dynamic insert of selected option:" - LayoutBR {BR} at (216,319) size 1x0 - LayoutMenuList {SELECT} at (0,323) size 152x18 [bgcolor=#F8F8F8] - LayoutBlockFlow (anonymous) at (0,0) size 152x18 - LayoutText (anonymous) at (8,2) size 121x13 - text run at (8,2) width 121: "this should be selected" - LayoutText {#text} at (0,0) size 0x0 + LayoutBlockFlow (anonymous) at (0,0) size 784x341 + LayoutText {#text} at (0,0) size 98x18 + text run at (0,0) width 98: "initial selected:" + LayoutBR {BR} at (97,14) size 1x0 + LayoutText {#text} at (137,59) size 5x18 + text run at (137,59) width 5: " " + LayoutBR {BR} at (141,73) size 1x0 + LayoutText {#text} at (0,77) size 165x18 + text run at (0,77) width 165: "dynamic selected change:" + LayoutBR {BR} at (164,91) size 1x0 + LayoutText {#text} at (137,136) size 5x18 + text run at (137,136) width 5: " " + LayoutText {#text} at (0,0) size 0x0 + LayoutBR {BR} at (0,0) size 0x0 + LayoutText {#text} at (0,154) size 217x18 + text run at (0,154) width 217: "dynamic insert of selected option:" + LayoutBR {BR} at (216,168) size 1x0 + LayoutText {#text} at (137,213) size 5x18 + text run at (137,213) width 5: " " + LayoutBR {BR} at (141,227) size 1x0 + LayoutText {#text} at (0,231) size 98x18 + text run at (0,231) width 98: "initial selected:" + LayoutBR {BR} at (97,245) size 1x0 + LayoutMenuList {SELECT} at (0,250) size 152x18 [bgcolor=#F8F8F8] + LayoutBlockFlow (anonymous) at (0,0) size 152x18 + LayoutText (anonymous) at (8,2) size 121x13 + text run at (8,2) width 121: "this should be selected" + LayoutText {#text} at (152,249) size 4x18 + text run at (152,249) width 4: " " + LayoutBR {BR} at (156,263) size 0x0 + LayoutText {#text} at (0,268) size 165x18 + text run at (0,268) width 165: "dynamic selected change:" + LayoutBR {BR} at (164,282) size 1x0 + LayoutMenuList {SELECT} at (0,287) size 152x18 [bgcolor=#F8F8F8] + LayoutBlockFlow (anonymous) at (0,0) size 152x18 + LayoutText (anonymous) at (8,2) size 121x13 + text run at (8,2) width 121: "this should be selected" + LayoutText {#text} at (152,286) size 4x18 + text run at (152,286) width 4: " " + LayoutText {#text} at (0,0) size 0x0 + LayoutBR {BR} at (0,0) size 0x0 + LayoutText {#text} at (0,305) size 217x18 + text run at (0,305) width 217: "dynamic insert of selected option:" + LayoutBR {BR} at (216,319) size 1x0 + LayoutMenuList {SELECT} at (0,323) size 152x18 [bgcolor=#F8F8F8] + LayoutBlockFlow (anonymous) at (0,0) size 152x18 + LayoutText (anonymous) at (8,2) size 121x13 + text run at (8,2) width 121: "this should be selected" + LayoutText {#text} at (0,0) size 0x0 + LayoutBlockFlow {P} at (0,357) size 784x18 + LayoutText {#text} at (0,0) size 195x18 + text run at (0,0) width 195: "Display 'none' to 'inline-block'" + LayoutBlockFlow (anonymous) at (0,391) size 784x59 + LayoutText {#text} at (0,0) size 0x0 + LayoutText {#text} at (0,0) size 0x0 layer at (8,26) size 137x59 clip at (9,27) size 124x57 scrollY 99.00 scrollHeight 199 LayoutListBox {SELECT} at (0,18.25) size 137.41x58.75 [bgcolor=#FFFFFF] [border: (1px solid #999999)] LayoutBlockFlow {OPTION} at (1,1) size 124.41x14.19 @@ -165,3 +172,26 @@ LayoutBlockFlow {OPTION} at (1,100.31) size 124.41x14.19 LayoutText {#text} at (2,0) size 18x13 text run at (2,0) width 18: "opt" +layer at (8,399) size 202x59 clip at (9,400) size 189x57 scrollY 42.00 scrollHeight 100 + LayoutListBox {SELECT} at (0,0.25) size 202.05x58.75 [bgcolor=#FFFFFF] [border: (1px solid #999999)] + LayoutBlockFlow {OPTION} at (1,1) size 189.05x14.19 + LayoutText {#text} at (2,0) size 38x13 + text run at (2,0) width 38: "option1" + LayoutBlockFlow {OPTION} at (1,15.19) size 189.05x14.19 + LayoutText {#text} at (2,0) size 40x13 + text run at (2,0) width 40: "option2" + LayoutBlockFlow {OPTION} at (1,29.38) size 189.05x14.19 + LayoutText {#text} at (2,0) size 40x13 + text run at (2,0) width 40: "option3" + LayoutBlockFlow {OPTION} at (1,43.56) size 189.05x14.19 + LayoutText {#text} at (2,0) size 40x13 + text run at (2,0) width 40: "option4" + LayoutBlockFlow {OPTION} at (1,57.75) size 189.05x14.19 + LayoutText {#text} at (2,0) size 40x13 + text run at (2,0) width 40: "option5" + LayoutBlockFlow {OPTION} at (1,71.94) size 189.05x14.19 + LayoutText {#text} at (2,0) size 40x13 + text run at (2,0) width 40: "option6" + LayoutBlockFlow {OPTION} at (1,86.13) size 189.05x14.19 [bgcolor=#D4D4D4] + LayoutText {#text} at (2,0) size 186x13 + text run at (2,0) width 186: "This should be selected and visible."
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/submit/submit-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/submit/submit-appearance-basic-expected.png index cb0412d..6576511 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/submit/submit-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/submit/submit-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/text/text-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/text/text-appearance-basic-expected.png index 48beaa39..51f1c5a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/text/text-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/text/text-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/textarea/textarea-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/textarea/textarea-appearance-basic-expected.png index fbfb854..6ce6b59 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/textarea/textarea-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/textarea/textarea-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/svg/filters/feTurbulence-tiled-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/svg/filters/feTurbulence-tiled-expected.png new file mode 100644 index 0000000..eb2c614 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/svg/filters/feTurbulence-tiled-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png index d5ae38c..d8114cf 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/culling/scrolled-within-boxshadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/culling/scrolled-within-boxshadow-expected.png deleted file mode 100644 index 1772f0c..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/compositing/culling/scrolled-within-boxshadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/culling/translated-boxshadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/culling/translated-boxshadow-expected.png deleted file mode 100644 index 5ce3c41..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/compositing/culling/translated-boxshadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/culling/unscrolled-within-boxshadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/culling/unscrolled-within-boxshadow-expected.png deleted file mode 100644 index 1772f0c..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/compositing/culling/unscrolled-within-boxshadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/scrollbar-layer-placement-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/scrollbar-layer-placement-expected.png deleted file mode 100644 index 2625ea2..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/scrollbar-layer-placement-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/shadows/shadow-drawing-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/shadows/shadow-drawing-expected.png index 74b946f..000b85f0 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/compositing/shadows/shadow-drawing-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/shadows/shadow-drawing-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css3/filters/effect-brightness-clamping-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css3/filters/effect-brightness-clamping-expected.png index 9e5b05f..a30ec45 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/css3/filters/effect-brightness-clamping-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/css3/filters/effect-brightness-clamping-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css3/filters/effect-brightness-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css3/filters/effect-brightness-expected.png index 4e87f450..ef0bb8d3 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/css3/filters/effect-brightness-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/css3/filters/effect-brightness-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css3/filters/effect-combined-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css3/filters/effect-combined-expected.png index bb5cedf7..8c62ff73 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/css3/filters/effect-combined-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/css3/filters/effect-combined-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css3/filters/effect-reference-subregion-nested-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css3/filters/effect-reference-subregion-nested-expected.png deleted file mode 100644 index 5d2cf1fc..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/css3/filters/effect-reference-subregion-nested-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css3/filters/filter-repaint-turbulence-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css3/filters/filter-repaint-turbulence-expected.png index c91ec41..b641a00 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/css3/filters/filter-repaint-turbulence-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/css3/filters/filter-repaint-turbulence-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css3/filters/regions-expanding-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css3/filters/regions-expanding-expected.png deleted file mode 100644 index 83d26a9..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/css3/filters/regions-expanding-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-with-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-with-shadow-expected.png index b20284c..be3a8c4 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-with-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-with-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-split-inline-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-split-inline-expected.png index e6906b2..81535f1 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-split-inline-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-split-inline-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-with-box-shadow-01-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-with-box-shadow-01-expected.png deleted file mode 100644 index ad95c29e..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-with-box-shadow-01-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-with-box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-with-box-shadow-expected.png index aebe3d1..1787430 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-with-box-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-with-box-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/basic-shadows-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/basic-shadows-expected.png index d5af415..b2544041 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/basic-shadows-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/basic-shadows-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/box-shadow-clipped-slices-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/box-shadow-clipped-slices-expected.png deleted file mode 100644 index 5ed07d2..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/box-shadow-clipped-slices-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/box-shadow-expected.png index 637df6d2..41bcec9b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/box-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/box-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/box-shadow-radius-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/box-shadow-radius-expected.png deleted file mode 100644 index 948dbaf..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/box-shadow-radius-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/box-shadow-transformed-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/box-shadow-transformed-expected.png index 0e0b95b..9005e03 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/box-shadow-transformed-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/box-shadow-transformed-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/box-shadow-with-zero-radius-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/box-shadow-with-zero-radius-expected.png deleted file mode 100644 index 1e3e2d6a..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/box-shadow-with-zero-radius-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-box-shadow-radius-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-box-shadow-radius-expected.png deleted file mode 100644 index 41655a9..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-box-shadow-radius-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-box-shadows-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-box-shadows-expected.png index 2cd92a157..d8dacf7 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-box-shadows-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-box-shadows-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-expected.png index ab142515..f8ff6cb 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-subpixel-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-subpixel-expected.png index 17f4aa2..e127032 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-subpixel-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-subpixel-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.png deleted file mode 100644 index 49963f1e..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/scaled-box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/scaled-box-shadow-expected.png deleted file mode 100644 index 411c53c..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/scaled-box-shadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/shadow-buffer-partial-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/shadow-buffer-partial-expected.png deleted file mode 100644 index 92819c5..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/shadow-buffer-partial-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/shadow-tiling-artifact-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/shadow-tiling-artifact-expected.png deleted file mode 100644 index 8e80ef6c..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/shadow-tiling-artifact-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/single-pixel-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/single-pixel-shadow-expected.png deleted file mode 100644 index 2d3aa7c2..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/single-pixel-shadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/spread-multiple-inset-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/spread-multiple-inset-expected.png index 5f07365..41a924f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/spread-multiple-inset-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/spread-multiple-inset-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/spread-multiple-normal-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/spread-multiple-normal-expected.png deleted file mode 100644 index 98978a4f..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/spread-multiple-normal-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/canvas/canvas-composite-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/canvas/canvas-composite-shadow-expected.png index 0e13c64..aa210c69 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/canvas/canvas-composite-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/canvas/canvas-composite-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/css/box-shadow-and-border-radius-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/css/box-shadow-and-border-radius-expected.png index f168dc8..bada6a6cb 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/css/box-shadow-and-border-radius-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/css/box-shadow-and-border-radius-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/css/color-correction-on-box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/css/color-correction-on-box-shadow-expected.png index 55a9525..42059125 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/css/color-correction-on-box-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/css/color-correction-on-box-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/css/color-correction-on-text-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/css/color-correction-on-text-shadow-expected.png index ae5240a7..be44ab5c 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/css/color-correction-on-text-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/css/color-correction-on-text-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/css/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/css/shadow-multiple-expected.png index 795fd2c..5b5a0499 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/css/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/css/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/dom/HTMLInputElement/input-slider-update-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/dom/HTMLInputElement/input-slider-update-expected.png index d6e2d0d..2d594f03 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/dom/HTMLInputElement/input-slider-update-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/dom/HTMLInputElement/input-slider-update-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-styles-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-styles-expected.png index 825b92fa..5ae51cf9 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-styles-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-styles-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png index a94e135e..0fd826d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png index d32f491d..d4031864 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-expected.png index b14ed6f..eb384d3 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png index defbd208..461bc53 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png index 28cba5a..1c9b5770 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png index f867a6c..03334c97 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png index d2215b4..f46c0fb 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png index 663208e..8b48048 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png index cb90ec47..94e08ab4 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png index 6568af3..de99a61 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/month-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/month-picker-appearance-expected.png index eb6100d..2a81b6f0 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/month-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/month-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/month-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/month-picker-appearance-step-expected.png index ab8df069..c137517 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/month-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/month-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/week-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/week-picker-appearance-expected.png index 31500b88..90273013 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/week-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/week-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/week-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/week-picker-appearance-step-expected.png index e4e1574..e0fff6e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/week-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/week-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/checkbox/checkbox-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/checkbox/checkbox-appearance-basic-expected.png index add860d5..4a20c552 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/checkbox/checkbox-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/checkbox/checkbox-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-expected.png index bb30e961..11a070d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png index 9ade6cbf..7ba588e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png index 1842d8ef..0094386 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png index 9252e1f..1eb727b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png index 316095e..084e724 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-datalist-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-datalist-expected.png index 75a38004..5aa4fdd8 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-datalist-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-datalist-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png index cb2fe642..c3a66fc 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-padding-with-datalist-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-padding-with-datalist-expected.png index c5f6cd0..f95e38f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-padding-with-datalist-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-padding-with-datalist-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/input-appearance-height-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/input-appearance-height-expected.png index 5ba0990a..852b5ff 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/input-appearance-height-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/input-appearance-height-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/radio/radio-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/radio/radio-appearance-basic-expected.png index 83388c1..b9752a9 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/radio/radio-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/radio/radio-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/input-appearance-range-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/input-appearance-range-expected.png index ba8012c..c7241ae 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/input-appearance-range-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/input-appearance-range-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/range-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/range-appearance-basic-expected.png index d8252bd..fee58a8 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/range-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/range-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/slider-padding-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/slider-padding-expected.png index f92df2a..6c27107 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/slider-padding-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/slider-padding-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/slider-thumb-shared-style-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/slider-thumb-shared-style-expected.png index a3e3ee7..9f9a45f9 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/slider-thumb-shared-style-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/slider-thumb-shared-style-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/thumbslider-no-parent-slider-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/thumbslider-no-parent-slider-expected.png index 2b86354..6d7adc0 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/thumbslider-no-parent-slider-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/thumbslider-no-parent-slider-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/search/search-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/search/search-appearance-basic-expected.png index fda9258..4bba105 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/search/search-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/search/search-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/listbox-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/listbox-appearance-basic-expected.png index 1ad0152..a3fc35a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/listbox-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/listbox-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/select-initial-position-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/select-initial-position-expected.png index 3aec5c5..d712ea60 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/select-initial-position-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/select-initial-position-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/select-initial-position-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/select-initial-position-expected.txt index 37e2e6c..834660a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/select-initial-position-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/select-initial-position-expected.txt
@@ -3,54 +3,61 @@ layer at (0,0) size 800x600 LayoutBlockFlow {HTML} at (0,0) size 800x600 LayoutBlockFlow {BODY} at (8,8) size 784x584 - LayoutText {#text} at (0,0) size 98x18 - text run at (0,0) width 98: "initial selected:" - LayoutBR {BR} at (97,14) size 1x0 - LayoutText {#text} at (137,59) size 5x18 - text run at (137,59) width 5: " " - LayoutBR {BR} at (141,73) size 1x0 - LayoutText {#text} at (0,77) size 165x18 - text run at (0,77) width 165: "dynamic selected change:" - LayoutBR {BR} at (164,91) size 1x0 - LayoutText {#text} at (137,136) size 5x18 - text run at (137,136) width 5: " " - LayoutText {#text} at (0,0) size 0x0 - LayoutBR {BR} at (0,0) size 0x0 - LayoutText {#text} at (0,154) size 217x18 - text run at (0,154) width 217: "dynamic insert of selected option:" - LayoutBR {BR} at (216,168) size 1x0 - LayoutText {#text} at (137,213) size 5x18 - text run at (137,213) width 5: " " - LayoutBR {BR} at (141,227) size 1x0 - LayoutText {#text} at (0,231) size 98x18 - text run at (0,231) width 98: "initial selected:" - LayoutBR {BR} at (97,245) size 1x0 - LayoutMenuList {SELECT} at (0,250) size 152x18 [bgcolor=#F8F8F8] - LayoutBlockFlow (anonymous) at (0,0) size 152x18 - LayoutText (anonymous) at (8,2) size 121x13 - text run at (8,2) width 121: "this should be selected" - LayoutText {#text} at (152,249) size 4x18 - text run at (152,249) width 4: " " - LayoutBR {BR} at (156,263) size 0x0 - LayoutText {#text} at (0,268) size 165x18 - text run at (0,268) width 165: "dynamic selected change:" - LayoutBR {BR} at (164,282) size 1x0 - LayoutMenuList {SELECT} at (0,287) size 152x18 [bgcolor=#F8F8F8] - LayoutBlockFlow (anonymous) at (0,0) size 152x18 - LayoutText (anonymous) at (8,2) size 121x13 - text run at (8,2) width 121: "this should be selected" - LayoutText {#text} at (152,286) size 4x18 - text run at (152,286) width 4: " " - LayoutText {#text} at (0,0) size 0x0 - LayoutBR {BR} at (0,0) size 0x0 - LayoutText {#text} at (0,305) size 217x18 - text run at (0,305) width 217: "dynamic insert of selected option:" - LayoutBR {BR} at (216,319) size 1x0 - LayoutMenuList {SELECT} at (0,323) size 152x18 [bgcolor=#F8F8F8] - LayoutBlockFlow (anonymous) at (0,0) size 152x18 - LayoutText (anonymous) at (8,2) size 121x13 - text run at (8,2) width 121: "this should be selected" - LayoutText {#text} at (0,0) size 0x0 + LayoutBlockFlow (anonymous) at (0,0) size 784x341 + LayoutText {#text} at (0,0) size 98x18 + text run at (0,0) width 98: "initial selected:" + LayoutBR {BR} at (97,14) size 1x0 + LayoutText {#text} at (137,59) size 5x18 + text run at (137,59) width 5: " " + LayoutBR {BR} at (141,73) size 1x0 + LayoutText {#text} at (0,77) size 165x18 + text run at (0,77) width 165: "dynamic selected change:" + LayoutBR {BR} at (164,91) size 1x0 + LayoutText {#text} at (137,136) size 5x18 + text run at (137,136) width 5: " " + LayoutText {#text} at (0,0) size 0x0 + LayoutBR {BR} at (0,0) size 0x0 + LayoutText {#text} at (0,154) size 217x18 + text run at (0,154) width 217: "dynamic insert of selected option:" + LayoutBR {BR} at (216,168) size 1x0 + LayoutText {#text} at (137,213) size 5x18 + text run at (137,213) width 5: " " + LayoutBR {BR} at (141,227) size 1x0 + LayoutText {#text} at (0,231) size 98x18 + text run at (0,231) width 98: "initial selected:" + LayoutBR {BR} at (97,245) size 1x0 + LayoutMenuList {SELECT} at (0,250) size 152x18 [bgcolor=#F8F8F8] + LayoutBlockFlow (anonymous) at (0,0) size 152x18 + LayoutText (anonymous) at (8,2) size 121x13 + text run at (8,2) width 121: "this should be selected" + LayoutText {#text} at (152,249) size 4x18 + text run at (152,249) width 4: " " + LayoutBR {BR} at (156,263) size 0x0 + LayoutText {#text} at (0,268) size 165x18 + text run at (0,268) width 165: "dynamic selected change:" + LayoutBR {BR} at (164,282) size 1x0 + LayoutMenuList {SELECT} at (0,287) size 152x18 [bgcolor=#F8F8F8] + LayoutBlockFlow (anonymous) at (0,0) size 152x18 + LayoutText (anonymous) at (8,2) size 121x13 + text run at (8,2) width 121: "this should be selected" + LayoutText {#text} at (152,286) size 4x18 + text run at (152,286) width 4: " " + LayoutText {#text} at (0,0) size 0x0 + LayoutBR {BR} at (0,0) size 0x0 + LayoutText {#text} at (0,305) size 217x18 + text run at (0,305) width 217: "dynamic insert of selected option:" + LayoutBR {BR} at (216,319) size 1x0 + LayoutMenuList {SELECT} at (0,323) size 152x18 [bgcolor=#F8F8F8] + LayoutBlockFlow (anonymous) at (0,0) size 152x18 + LayoutText (anonymous) at (8,2) size 121x13 + text run at (8,2) width 121: "this should be selected" + LayoutText {#text} at (0,0) size 0x0 + LayoutBlockFlow {P} at (0,357) size 784x18 + LayoutText {#text} at (0,0) size 195x18 + text run at (0,0) width 195: "Display 'none' to 'inline-block'" + LayoutBlockFlow (anonymous) at (0,391) size 784x59 + LayoutText {#text} at (0,0) size 0x0 + LayoutText {#text} at (0,0) size 0x0 layer at (8,26) size 137x59 clip at (9,27) size 124x57 scrollY 99.00 scrollHeight 199 LayoutListBox {SELECT} at (0,18.25) size 137.39x58.75 [bgcolor=#FFFFFF] [border: (1px solid #999999)] LayoutBlockFlow {OPTION} at (1,1) size 124.39x14.19 @@ -165,3 +172,26 @@ LayoutBlockFlow {OPTION} at (1,100.31) size 124.39x14.19 LayoutText {#text} at (2,0) size 18x13 text run at (2,0) width 18: "opt" +layer at (8,399) size 202x59 clip at (9,400) size 189x57 scrollY 42.00 scrollHeight 100 + LayoutListBox {SELECT} at (0,0.25) size 202.03x58.75 [bgcolor=#FFFFFF] [border: (1px solid #999999)] + LayoutBlockFlow {OPTION} at (1,1) size 189.03x14.19 + LayoutText {#text} at (2,0) size 38x13 + text run at (2,0) width 38: "option1" + LayoutBlockFlow {OPTION} at (1,15.19) size 189.03x14.19 + LayoutText {#text} at (2,0) size 40x13 + text run at (2,0) width 40: "option2" + LayoutBlockFlow {OPTION} at (1,29.38) size 189.03x14.19 + LayoutText {#text} at (2,0) size 40x13 + text run at (2,0) width 40: "option3" + LayoutBlockFlow {OPTION} at (1,43.56) size 189.03x14.19 + LayoutText {#text} at (2,0) size 40x13 + text run at (2,0) width 40: "option4" + LayoutBlockFlow {OPTION} at (1,57.75) size 189.03x14.19 + LayoutText {#text} at (2,0) size 40x13 + text run at (2,0) width 40: "option5" + LayoutBlockFlow {OPTION} at (1,71.94) size 189.03x14.19 + LayoutText {#text} at (2,0) size 40x13 + text run at (2,0) width 40: "option6" + LayoutBlockFlow {OPTION} at (1,86.13) size 189.03x14.19 [bgcolor=#D4D4D4] + LayoutText {#text} at (2,0) size 186x13 + text run at (2,0) width 186: "This should be selected and visible."
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/submit/submit-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/submit/submit-appearance-basic-expected.png index 6690b54..257c81eb 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/submit/submit-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/submit/submit-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/text-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/text-appearance-basic-expected.png index 0418a53..72c5ee20 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/text-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/text-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/textarea-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/textarea-appearance-basic-expected.png index 4ef8172..b0c6373 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/textarea-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/textarea-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/text/shadow-no-blur-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/text/shadow-no-blur-expected.png index 3b95d21..a620ffae9 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/text/shadow-no-blur-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/text/shadow-no-blur-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/text/shadow-translucent-fill-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/text/shadow-translucent-fill-expected.png index cf27eba..4a2af41 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/text/shadow-translucent-fill-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/text/shadow-translucent-fill-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/text/stroking-decorations-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/text/stroking-decorations-expected.png index ccb78a9d..2474402 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/text/stroking-decorations-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/text/stroking-decorations-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/text/stroking-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/text/stroking-expected.png index 85a616a..9337fec 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/text/stroking-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/text/stroking-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/text/text-shadow-no-default-color-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/text/text-shadow-no-default-color-expected.png index 04c4a4f6..d20bc4a2 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/text/text-shadow-no-default-color-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/text/text-shadow-no-default-color-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/writing-mode/english-lr-text-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/writing-mode/english-lr-text-expected.png index 391cd87f..08fa365 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/writing-mode/english-lr-text-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/writing-mode/english-lr-text-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-001-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-001-expected.png index 510cf9c..3bfa089 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-001-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-001-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-002-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-002-expected.png index 00c7294..31684c4 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-002-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-002-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-003-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-003-expected.png index 58e4ac5..562d42e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-003-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-003-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-004-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-004-expected.png index 2735eda..7aef083 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-004-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-004-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-010-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-010-expected.png index d321428..a4595f8 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-010-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-010-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/images/color-profile-image-filter-all-expected.png b/third_party/WebKit/LayoutTests/platform/mac/images/color-profile-image-filter-all-expected.png index 8b20244..b8333e5 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/images/color-profile-image-filter-all-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/images/color-profile-image-filter-all-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/forms/range-focus-by-mouse-then-keydown-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/forms/range-focus-by-mouse-then-keydown-expected.png index 5301228..958434c 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/forms/range-focus-by-mouse-then-keydown-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/forms/range-focus-by-mouse-then-keydown-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/shadow-multiple-expected.png index 12bb45c..2bcbbf7 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/slider-thumb-drag-release-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/slider-thumb-drag-release-expected.png index d6e2d0d..2d594f03 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/slider-thumb-drag-release-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/slider-thumb-drag-release-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png index 1d26551..d74a48a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/animated-path-inside-transformed-html-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/animated-path-inside-transformed-html-expected.txt index 4cb2ad4..15a7efd 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/animated-path-inside-transformed-html-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/animated-path-inside-transformed-html-expected.txt
@@ -74,6 +74,10 @@ { "object": "LayoutSVGImage image id='image'", "reason": "full" + }, + { + "object": "LayoutText #text", + "reason": "appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/js-late-mask-and-object-creation-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/js-late-mask-and-object-creation-expected.png new file mode 100644 index 0000000..de1f5f5 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/js-late-mask-and-object-creation-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/js-late-mask-creation-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/js-late-mask-creation-expected.png new file mode 100644 index 0000000..de1f5f5 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/js-late-mask-creation-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/mask-child-changes-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/mask-child-changes-expected.png new file mode 100644 index 0000000..de1f5f5 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/mask-child-changes-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/paintorder-filtered-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/paintorder-filtered-expected.png deleted file mode 100644 index 711e7f7..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/paintorder-filtered-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/repaint-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/repaint-shadow-expected.png index a168dd3..02927f3a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/repaint-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/repaint-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/window-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/window-expected.txt index 5b832721..3258026 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/window-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/window-expected.txt
@@ -1982,6 +1982,22 @@ { "object": "LayoutSVGPath line", "reason": "geometry" + }, + { + "object": "LayoutSVGContainer g", + "reason": "appeared" + }, + { + "object": "LayoutSVGContainer g", + "reason": "appeared" + }, + { + "object": "LayoutSVGContainer g", + "reason": "appeared" + }, + { + "object": "LayoutSVGContainer g id='windowTitlebarGroupminimalWindow'", + "reason": "appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/roundedrects/circle-with-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/roundedrects/circle-with-shadow-expected.png index 60aaf578..6a54df99 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/roundedrects/circle-with-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/roundedrects/circle-with-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png index 2674eef6..22c1fb3c 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/scrollbars/custom-scrollbar-display-expected.png b/third_party/WebKit/LayoutTests/platform/mac/scrollbars/custom-scrollbar-display-expected.png deleted file mode 100644 index ca392f44..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/scrollbars/custom-scrollbar-display-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-color-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-color-01-b-expected.png index 2b8bbf2b1..b60634a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-color-01-b-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-color-01-b-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-conv-01-f-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-conv-01-f-expected.png index 9ca93ae..5f46b988 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-conv-01-f-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-conv-01-f-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-example-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-example-01-b-expected.png index 92be1620..9aa52a1 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-example-01-b-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-example-01-b-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-gauss-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-gauss-01-b-expected.png index 10c4604..cdc89ed 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-gauss-01-b-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-gauss-01-b-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png index 434d18f..16e76d3a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png index 05fa92c..d433914d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-turb-01-f-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-turb-01-f-expected.png index 34307a51..a01e9a9 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-turb-01-f-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-turb-01-f-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-turb-02-f-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-turb-02-f-expected.png index 5d251c6b..3383a0f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-turb-02-f-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-turb-02-f-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png index 3d09082..24a6b3a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/as-background-image/svg-as-background-6-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/as-background-image/svg-as-background-6-expected.png index d2a5097..01b8dab3 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/as-background-image/svg-as-background-6-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/as-background-image/svg-as-background-6-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/filters/feTile-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/filters/feTile-expected.png index 7950b9d..a50f71f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/filters/feTile-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/filters/feTile-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/masking/maskRegions-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/masking/maskRegions-expected.png index 3c60b1c..8151ea9 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/batik/masking/maskRegions-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/batik/masking/maskRegions-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/css/text-gradient-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/css/text-gradient-shadow-expected.png index add9ef8..aea562b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/css/text-gradient-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/css/text-gradient-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/css/text-shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/css/text-shadow-multiple-expected.png index c63e523..4e4ed3e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/css/text-shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/css/text-shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/clip-mask-negative-scale-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/clip-mask-negative-scale-expected.png index 43299975..4a1afff 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/clip-mask-negative-scale-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/clip-mask-negative-scale-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/feComponentTransfer-Discrete-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/feComponentTransfer-Discrete-expected.png index 413e1b2..c8247d2 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/feComponentTransfer-Discrete-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/feComponentTransfer-Discrete-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/feComponentTransfer-Gamma-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/feComponentTransfer-Gamma-expected.png index a1a72ac..03b6f5bc 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/feComponentTransfer-Gamma-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/feComponentTransfer-Gamma-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/feComponentTransfer-Linear-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/feComponentTransfer-Linear-expected.png index da29bc7..5d1ad82 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/feComponentTransfer-Linear-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/feComponentTransfer-Linear-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/feComponentTransfer-Table-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/feComponentTransfer-Table-expected.png index 9113dd3..a4a85ac6 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/feComponentTransfer-Table-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/feComponentTransfer-Table-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/image-with-transform-clip-filter-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/image-with-transform-clip-filter-expected.png index a305ce7..7078756 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/image-with-transform-clip-filter-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/image-with-transform-clip-filter-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/mask-changes-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/mask-changes-expected.png new file mode 100644 index 0000000..de1f5f5 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/mask-changes-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/text-filter-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/text-filter-expected.png index 9b34a847..1425c65e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/text-filter-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/text-filter-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png deleted file mode 100644 index 2dc5313..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png deleted file mode 100644 index 2dc5313..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png deleted file mode 100644 index 2dc5313..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png deleted file mode 100644 index 2dc5313..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png deleted file mode 100644 index 2dc5313..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png deleted file mode 100644 index 2dc5313..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png deleted file mode 100644 index fc0573d5..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png deleted file mode 100644 index fc0573d5..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png deleted file mode 100644 index fc0573d5..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png deleted file mode 100644 index 68d08bc1..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png deleted file mode 100644 index fc0573d5..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png deleted file mode 100644 index fc0573d5..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png deleted file mode 100644 index fc0573d5..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png deleted file mode 100644 index fc0573d5..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png deleted file mode 100644 index fc0573d5..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png deleted file mode 100644 index 68d08bc1..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png deleted file mode 100644 index fc0573d5..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png deleted file mode 100644 index fc0573d5..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-kernelMatrix-prop-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-kernelMatrix-prop-expected.png deleted file mode 100644 index 6a5711a..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-kernelMatrix-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.png deleted file mode 100644 index 58ce457..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.png deleted file mode 100644 index 58ce457..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.png deleted file mode 100644 index 58ce457..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.png deleted file mode 100644 index 58ce457..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.png deleted file mode 100644 index 58ce457..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.png deleted file mode 100644 index 58ce457..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.png deleted file mode 100644 index 0a42fb0..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.png deleted file mode 100644 index 0a42fb0..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.png deleted file mode 100644 index 0a42fb0..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.png deleted file mode 100644 index 0a42fb0..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-dom-baseFrequency-attr-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-dom-baseFrequency-attr-expected.png deleted file mode 100644 index 2e60925..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-dom-baseFrequency-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-dom-numOctaves-attr-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-dom-numOctaves-attr-expected.png deleted file mode 100644 index 2e60925..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-dom-numOctaves-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-dom-seed-attr-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-dom-seed-attr-expected.png deleted file mode 100644 index 2e60925..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-dom-seed-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-dom-stitchTiles-attr-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-dom-stitchTiles-attr-expected.png deleted file mode 100644 index f93fa40..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-dom-stitchTiles-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-dom-type-attr-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-dom-type-attr-expected.png deleted file mode 100644 index 2e60925..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-dom-type-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-baseFrequency-prop-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-baseFrequency-prop-expected.png deleted file mode 100644 index 2e60925..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-baseFrequency-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-numOctaves-prop-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-numOctaves-prop-expected.png deleted file mode 100644 index 2e60925..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-numOctaves-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-seed-prop-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-seed-prop-expected.png index 85fb788..bcb2641 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-seed-prop-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-seed-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-stitchTiles-prop-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-stitchTiles-prop-expected.png deleted file mode 100644 index 2e60925..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-stitchTiles-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-type-prop-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-type-prop-expected.png deleted file mode 100644 index 2e60925..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-type-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/filters/color-interpolation-filters-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/filters/color-interpolation-filters-expected.png index 331d057..0987f1d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/filters/color-interpolation-filters-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/filters/color-interpolation-filters-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/filters/feColorMatrix-offset-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/filters/feColorMatrix-offset-expected.png deleted file mode 100644 index ea21e78..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/filters/feColorMatrix-offset-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/filters/feDropShadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/filters/feDropShadow-expected.png deleted file mode 100644 index ba0a4b6..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/filters/feDropShadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/filters/feGaussianBlur-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/filters/feGaussianBlur-expected.png index e3bf080..22e2f08f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/filters/feGaussianBlur-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/filters/feGaussianBlur-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/filters/feTurbulence-scale-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/filters/feTurbulence-scale-expected.png index 98ad363..ebe50c1 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/filters/feTurbulence-scale-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/filters/feTurbulence-scale-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/filters/feTurbulence-tiled-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/filters/feTurbulence-tiled-expected.png index b233f51f..eb2c614 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/filters/feTurbulence-tiled-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/filters/feTurbulence-tiled-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/filters/filteredImage-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/filters/filteredImage-expected.png index 00d2f04..2d57e38a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/filters/filteredImage-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/filters/filteredImage-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/transforms/text-with-mask-with-svg-transform-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/transforms/text-with-mask-with-svg-transform-expected.png index af030f6..8d7acda4 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/transforms/text-with-mask-with-svg-transform-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/transforms/text-with-mask-with-svg-transform-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.png index d42a0252..1665e63 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/transforms/shadows-expected.png b/third_party/WebKit/LayoutTests/platform/mac/transforms/shadows-expected.png index 10642b7a..124a402 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/transforms/shadows-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/transforms/shadows-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/culling/scrolled-within-boxshadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/culling/scrolled-within-boxshadow-expected.png deleted file mode 100644 index 1772f0c..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/culling/scrolled-within-boxshadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/culling/translated-boxshadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/culling/translated-boxshadow-expected.png deleted file mode 100644 index 5ce3c41..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/culling/translated-boxshadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/culling/unscrolled-within-boxshadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/culling/unscrolled-within-boxshadow-expected.png deleted file mode 100644 index 1772f0c..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/culling/unscrolled-within-boxshadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png index 12e044e..e2a4f44 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/overflow/scrollbar-layer-placement-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/overflow/scrollbar-layer-placement-expected.png deleted file mode 100644 index 2625ea2..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/overflow/scrollbar-layer-placement-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/shadows/shadow-drawing-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/shadows/shadow-drawing-expected.png deleted file mode 100644 index 74b946f..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/shadows/shadow-drawing-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/forms/range-focus-by-mouse-then-keydown-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/forms/range-focus-by-mouse-then-keydown-expected.png index 5301228..958434c 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/forms/range-focus-by-mouse-then-keydown-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/forms/range-focus-by-mouse-then-keydown-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/shadow-multiple-expected.png index 12bb45c..2bcbbf7 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/slider-thumb-drag-release-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/slider-thumb-drag-release-expected.png index d6e2d0d..2d594f03 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/slider-thumb-drag-release-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/slider-thumb-drag-release-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png index 1d26551..d74a48a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/svg/paintorder-filtered-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/svg/paintorder-filtered-expected.png deleted file mode 100644 index 711e7f7..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/svg/paintorder-filtered-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/svg/repaint-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/svg/repaint-shadow-expected.png deleted file mode 100644 index a168dd3..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/svg/repaint-shadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/printing/print-box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/printing/print-box-shadow-expected.png deleted file mode 100644 index 78f222d8..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/printing/print-box-shadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/roundedrects/circle-with-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/roundedrects/circle-with-shadow-expected.png index 60aaf578..6a54df99 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/roundedrects/circle-with-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/roundedrects/circle-with-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png deleted file mode 100644 index 2674eef6..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png index 0e13c64..aa210c69 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-filter-all-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-filter-all-expected.png index 5fef371..e3c66f5 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-filter-all-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-filter-all-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/compositing/overflow/scrollbar-layer-placement-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/compositing/overflow/scrollbar-layer-placement-expected.png deleted file mode 100644 index 2625ea2..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/compositing/overflow/scrollbar-layer-placement-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/scrollbars/custom-scrollbar-display-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/scrollbars/custom-scrollbar-display-expected.png deleted file mode 100644 index ca392f44..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/scrollbars/custom-scrollbar-display-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/rootlayerscrolls/scrollbars/custom-scrollbar-display-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/rootlayerscrolls/scrollbars/custom-scrollbar-display-expected.png deleted file mode 100644 index ca392f44..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/rootlayerscrolls/scrollbars/custom-scrollbar-display-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png index dc4c481..61693dbd 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/culling/scrolled-within-boxshadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/culling/scrolled-within-boxshadow-expected.png deleted file mode 100644 index 317fef7d7..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/compositing/culling/scrolled-within-boxshadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/culling/translated-boxshadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/culling/translated-boxshadow-expected.png deleted file mode 100644 index 6e3f377..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/compositing/culling/translated-boxshadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/culling/unscrolled-within-boxshadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/culling/unscrolled-within-boxshadow-expected.png deleted file mode 100644 index 317fef7d7..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/compositing/culling/unscrolled-within-boxshadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png index acfc168..ae51178 100644 --- a/third_party/WebKit/LayoutTests/platform/win/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/scrollbar-layer-placement-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/scrollbar-layer-placement-expected.png deleted file mode 100644 index 125c5fc..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/scrollbar-layer-placement-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/shadows/shadow-drawing-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/shadows/shadow-drawing-expected.png index 1a1d0fc..62d6834f 100644 --- a/third_party/WebKit/LayoutTests/platform/win/compositing/shadows/shadow-drawing-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/compositing/shadows/shadow-drawing-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/css3/filters/effect-combined-expected.png b/third_party/WebKit/LayoutTests/platform/win/css3/filters/effect-combined-expected.png index 49f5cdfc3..f17597ba6 100644 --- a/third_party/WebKit/LayoutTests/platform/win/css3/filters/effect-combined-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/css3/filters/effect-combined-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/css3/filters/filter-repaint-turbulence-expected.png b/third_party/WebKit/LayoutTests/platform/win/css3/filters/filter-repaint-turbulence-expected.png index 792627a..b2b246f9 100644 --- a/third_party/WebKit/LayoutTests/platform/win/css3/filters/filter-repaint-turbulence-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/css3/filters/filter-repaint-turbulence-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-with-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-with-shadow-expected.png index d672aafe..4d426ae 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-with-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-with-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-with-box-shadow-01-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-with-box-shadow-01-expected.png deleted file mode 100644 index 1919ee3..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-with-box-shadow-01-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/basic-shadows-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/basic-shadows-expected.png index 498b52e..668130c7 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/basic-shadows-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/basic-shadows-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/box-shadow-clipped-slices-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/box-shadow-clipped-slices-expected.png deleted file mode 100644 index ecdc891..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/box-shadow-clipped-slices-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/box-shadow-radius-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/box-shadow-radius-expected.png deleted file mode 100644 index 84a0df11..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/box-shadow-radius-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-box-shadow-radius-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-box-shadow-radius-expected.png index 24d26b5dd..ac13dc8 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-box-shadow-radius-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-box-shadow-radius-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-box-shadows-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-box-shadows-expected.png index 196f6f1..2be59a9 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-box-shadows-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-box-shadows-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-expected.png index 23e6940b..ff9b9c15 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-subpixel-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-subpixel-expected.png index 76f8de9..8ee5220f4 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-subpixel-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-subpixel-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/spread-multiple-inset-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/spread-multiple-inset-expected.png index 5350025..0fb1b2ab 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/spread-multiple-inset-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/spread-multiple-inset-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/spread-multiple-normal-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/spread-multiple-normal-expected.png deleted file mode 100644 index 90c36a7..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/spread-multiple-normal-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-composite-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-composite-shadow-expected.png index 712a5cf..e30901b 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-composite-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-composite-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/css/color-correction-on-box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/css/color-correction-on-box-shadow-expected.png index 23ae772..4186c7ec 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/css/color-correction-on-box-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/css/color-correction-on-box-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/css/color-correction-on-text-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/css/color-correction-on-text-shadow-expected.png index 9509389..48731362 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/css/color-correction-on-text-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/css/color-correction-on-text-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/css/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/css/shadow-multiple-expected.png index dd3d01a6..1512f442 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/css/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/css/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/dom/HTMLMeterElement/meter-styles-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/dom/HTMLMeterElement/meter-styles-expected.png index a48e9a6..25f4d50 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/dom/HTMLMeterElement/meter-styles-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/dom/HTMLMeterElement/meter-styles-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png index 95c08eaf..ae529b5 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png index 00553f9..4d3c843 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-expected.png index c374e2a..f01234b 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png index 150bda7..ddcca2c 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png index 863d01b..46e0deb2 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png index 4960f77..c4cd2ff 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png index 6dbb5dd..5b0a22a6 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png index 1aebea6..222b3e09 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png index 20dd8b2..8ca013f 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png index 8778c6f..b3abcc3 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/month-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/month-picker-appearance-expected.png index f1cca80..3fc731c 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/month-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/month-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/month-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/month-picker-appearance-step-expected.png index 8a01c44..1e9f57d2 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/month-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/month-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/week-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/week-picker-appearance-expected.png index 775bef81..cdc6756 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/week-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/week-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/week-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/week-picker-appearance-step-expected.png index eb13873..65ae9b1b 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/week-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/week-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/checkbox/checkbox-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/checkbox/checkbox-appearance-basic-expected.png index 0560e65b..2a0fa75 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/checkbox/checkbox-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/checkbox/checkbox-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-appearance-expected.png index 76239bd..05ea5ff5 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png index bd087f01..a3be30d 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png index e6d8e119..fbbc503 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png index 387489e..0257a94 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/radio/radio-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/radio/radio-appearance-basic-expected.png index 8a1efcc..7943a2f 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/radio/radio-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/radio/radio-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/range/range-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/range/range-appearance-basic-expected.png index 6351eb985..d175bfc 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/range/range-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/range/range-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/select-initial-position-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/select-initial-position-expected.png index c00e1ec8..d83413b 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/select-initial-position-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/select-initial-position-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/select-initial-position-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/select-initial-position-expected.txt index 15e784c..fec1120 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/select-initial-position-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/select-initial-position-expected.txt
@@ -3,54 +3,61 @@ layer at (0,0) size 800x600 LayoutBlockFlow {HTML} at (0,0) size 800x600 LayoutBlockFlow {BODY} at (8,8) size 784x584 - LayoutText {#text} at (0,0) size 86x19 - text run at (0,0) width 86: "initial selected:" - LayoutBR {BR} at (86,15) size 0x0 - LayoutText {#text} at (155,71) size 4x19 - text run at (155,71) width 4: " " - LayoutBR {BR} at (159,86) size 0x0 - LayoutText {#text} at (0,91) size 152x19 - text run at (0,91) width 152: "dynamic selected change:" - LayoutBR {BR} at (152,106) size 0x0 - LayoutText {#text} at (155,162) size 4x19 - text run at (155,162) width 4: " " - LayoutText {#text} at (0,0) size 0x0 - LayoutBR {BR} at (0,0) size 0x0 - LayoutText {#text} at (0,182) size 200x19 - text run at (0,182) width 200: "dynamic insert of selected option:" - LayoutBR {BR} at (200,197) size 0x0 - LayoutText {#text} at (155,253) size 4x19 - text run at (155,253) width 4: " " - LayoutBR {BR} at (159,268) size 0x0 - LayoutText {#text} at (0,273) size 86x19 - text run at (0,273) width 86: "initial selected:" - LayoutBR {BR} at (86,288) size 0x0 - LayoutMenuList {SELECT} at (0,293) size 156x20 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)] - LayoutBlockFlow (anonymous) at (1,1) size 154x18 - LayoutText (anonymous) at (4,1) size 134x16 - text run at (4,1) width 134: "this should be selected" - LayoutText {#text} at (156,293) size 4x19 - text run at (156,293) width 4: " " - LayoutBR {BR} at (160,308) size 0x0 - LayoutText {#text} at (0,313) size 152x19 - text run at (0,313) width 152: "dynamic selected change:" - LayoutBR {BR} at (152,328) size 0x0 - LayoutMenuList {SELECT} at (0,333) size 156x20 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)] - LayoutBlockFlow (anonymous) at (1,1) size 154x18 - LayoutText (anonymous) at (4,1) size 134x16 - text run at (4,1) width 134: "this should be selected" - LayoutText {#text} at (156,333) size 4x19 - text run at (156,333) width 4: " " - LayoutText {#text} at (0,0) size 0x0 - LayoutBR {BR} at (0,0) size 0x0 - LayoutText {#text} at (0,353) size 200x19 - text run at (0,353) width 200: "dynamic insert of selected option:" - LayoutBR {BR} at (200,368) size 0x0 - LayoutMenuList {SELECT} at (0,373) size 156x20 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)] - LayoutBlockFlow (anonymous) at (1,1) size 154x18 - LayoutText (anonymous) at (4,1) size 134x16 - text run at (4,1) width 134: "this should be selected" - LayoutText {#text} at (0,0) size 0x0 + LayoutBlockFlow (anonymous) at (0,0) size 784x393 + LayoutText {#text} at (0,0) size 86x19 + text run at (0,0) width 86: "initial selected:" + LayoutBR {BR} at (86,15) size 0x0 + LayoutText {#text} at (155,71) size 4x19 + text run at (155,71) width 4: " " + LayoutBR {BR} at (159,86) size 0x0 + LayoutText {#text} at (0,91) size 152x19 + text run at (0,91) width 152: "dynamic selected change:" + LayoutBR {BR} at (152,106) size 0x0 + LayoutText {#text} at (155,162) size 4x19 + text run at (155,162) width 4: " " + LayoutText {#text} at (0,0) size 0x0 + LayoutBR {BR} at (0,0) size 0x0 + LayoutText {#text} at (0,182) size 200x19 + text run at (0,182) width 200: "dynamic insert of selected option:" + LayoutBR {BR} at (200,197) size 0x0 + LayoutText {#text} at (155,253) size 4x19 + text run at (155,253) width 4: " " + LayoutBR {BR} at (159,268) size 0x0 + LayoutText {#text} at (0,273) size 86x19 + text run at (0,273) width 86: "initial selected:" + LayoutBR {BR} at (86,288) size 0x0 + LayoutMenuList {SELECT} at (0,293) size 156x20 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)] + LayoutBlockFlow (anonymous) at (1,1) size 154x18 + LayoutText (anonymous) at (4,1) size 134x16 + text run at (4,1) width 134: "this should be selected" + LayoutText {#text} at (156,293) size 4x19 + text run at (156,293) width 4: " " + LayoutBR {BR} at (160,308) size 0x0 + LayoutText {#text} at (0,313) size 152x19 + text run at (0,313) width 152: "dynamic selected change:" + LayoutBR {BR} at (152,328) size 0x0 + LayoutMenuList {SELECT} at (0,333) size 156x20 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)] + LayoutBlockFlow (anonymous) at (1,1) size 154x18 + LayoutText (anonymous) at (4,1) size 134x16 + text run at (4,1) width 134: "this should be selected" + LayoutText {#text} at (156,333) size 4x19 + text run at (156,333) width 4: " " + LayoutText {#text} at (0,0) size 0x0 + LayoutBR {BR} at (0,0) size 0x0 + LayoutText {#text} at (0,353) size 200x19 + text run at (0,353) width 200: "dynamic insert of selected option:" + LayoutBR {BR} at (200,368) size 0x0 + LayoutMenuList {SELECT} at (0,373) size 156x20 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)] + LayoutBlockFlow (anonymous) at (1,1) size 154x18 + LayoutText (anonymous) at (4,1) size 134x16 + text run at (4,1) width 134: "this should be selected" + LayoutText {#text} at (0,0) size 0x0 + LayoutBlockFlow {P} at (0,409) size 784x20 + LayoutText {#text} at (0,0) size 180x19 + text run at (0,0) width 180: "Display 'none' to 'inline-block'" + LayoutBlockFlow (anonymous) at (0,445) size 784x70 + LayoutText {#text} at (0,0) size 0x0 + LayoutText {#text} at (0,0) size 0x0 layer at (8,28) size 155x70 clip at (9,29) size 138x68 scrollY 119.00 scrollHeight 238 LayoutListBox {SELECT} at (0,20) size 155x70 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)] LayoutBlockFlow {OPTION} at (1,1) size 138x17 @@ -165,3 +172,26 @@ LayoutBlockFlow {OPTION} at (1,120) size 138x17 LayoutText {#text} at (2,0) size 18x16 text run at (2,0) width 18: "opt" +layer at (8,453) size 226x70 clip at (9,454) size 209x68 scrollY 51.00 scrollHeight 119 + LayoutListBox {SELECT} at (0,0) size 226x70 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)] + LayoutBlockFlow {OPTION} at (1,1) size 209x17 + LayoutText {#text} at (2,0) size 42x16 + text run at (2,0) width 42: "option1" + LayoutBlockFlow {OPTION} at (1,18) size 209x17 + LayoutText {#text} at (2,0) size 42x16 + text run at (2,0) width 42: "option2" + LayoutBlockFlow {OPTION} at (1,35) size 209x17 + LayoutText {#text} at (2,0) size 42x16 + text run at (2,0) width 42: "option3" + LayoutBlockFlow {OPTION} at (1,52) size 209x17 + LayoutText {#text} at (2,0) size 42x16 + text run at (2,0) width 42: "option4" + LayoutBlockFlow {OPTION} at (1,69) size 209x17 + LayoutText {#text} at (2,0) size 42x16 + text run at (2,0) width 42: "option5" + LayoutBlockFlow {OPTION} at (1,86) size 209x17 + LayoutText {#text} at (2,0) size 42x16 + text run at (2,0) width 42: "option6" + LayoutBlockFlow {OPTION} at (1,103) size 209x17 [color=#FFFFFF] [bgcolor=#999999] + LayoutText {#text} at (2,0) size 205x16 + text run at (2,0) width 205: "This should be selected and visible."
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/submit/submit-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/submit/submit-appearance-basic-expected.png index 5138c81..4204b75 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/submit/submit-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/submit/submit-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/text/stroking-decorations-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/text/stroking-decorations-expected.png index 52ef257..885db5b 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/text/stroking-decorations-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/text/stroking-decorations-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/text/stroking-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/text/stroking-expected.png index 3fd941c..cfd811b 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/text/stroking-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/text/stroking-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/writing-mode/english-lr-text-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/writing-mode/english-lr-text-expected.png index ca6bdc7..4a707302 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/writing-mode/english-lr-text-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/writing-mode/english-lr-text-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/http/tests/inspector/extensions/extensions-panel-expected.txt b/third_party/WebKit/LayoutTests/platform/win/http/tests/inspector/extensions/extensions-panel-expected.txt deleted file mode 100644 index 374b1bf..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/http/tests/inspector/extensions/extensions-panel-expected.txt +++ /dev/null
@@ -1,74 +0,0 @@ -CONSOLE MESSAGE: line 12: hello -Tests WebInspector extension API - - -Started extension. -Running tests... -RUNNING TEST: extension_testCreatePanel -Panel created -{ - createStatusBarButton : <function> - onHidden : { - addListener : <function> - removeListener : <function> - } - onSearch : { - addListener : <function> - removeListener : <function> - } - onShown : { - addListener : <function> - removeListener : <function> - } - show : <function> -} -Panel shown -Extension panel size correct -Panel hidden -RUNNING TEST: extension_testGlobalShortcuts -Panel shown, now toggling console... -Panel resized, test passed. -RUNNING TEST: extension_testOpenResource -Showing .../extensions-panel.html -Showing resource .../inspector/extensions/extensions-panel.html in panel sources), line: 1001 -Showing .../abe.png -Showing resource .../extensions/resources/abe.png in panel network), line: undefined -Showing .../missing.txt -Showing resource .../extensions/resources/missing.txt in panel network), line: undefined -Showing not-found.html -error: Extension server error: Object not found: not-found.html -Showing javascript:console.error('oh no!') -error: Extension server error: Object not found: javascript:console.error('oh no!') -RUNNING TEST: extension_testSearch -Panel searched: -{ - 0 : "performSearch" - 1 : "hello" -} -Panel searched: -{ - 0 : "cancelSearch" - 1 : undefined -} -RUNNING TEST: extension_testStatusBarButtons -Created a status bar button, dump follows: -{ - onClicked : { - addListener : <function> - removeListener : <function> - } - update : <function> -} -button1 clicked -Status bar buttons state: -status bar item 0, icon: ".../inspector/resources/button1.png", tooltip: 'Button One tooltip', disabled: false -status bar item 1, icon: ".../inspector/resources/button2.png", tooltip: 'Button Two tooltip', disabled: true -Updated status bar buttons -Status bar buttons state: -status bar item 0, icon: ".../inspector/resources/button1-updated.png", tooltip: 'Button One tooltip', disabled: false -status bar item 1, icon: ".../inspector/resources/button2.png", tooltip: 'Button Two updated tooltip', disabled: false -button2 clicked -RUNNING TEST: extension_testThemeName -Theme name: themeNameForTest -All tests done. -
diff --git a/third_party/WebKit/LayoutTests/platform/win/http/tests/security/xssAuditor/object-src-inject-expected.txt b/third_party/WebKit/LayoutTests/platform/win/http/tests/security/xssAuditor/object-src-inject-expected.txt new file mode 100644 index 0000000..9a3813e8 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/win/http/tests/security/xssAuditor/object-src-inject-expected.txt
@@ -0,0 +1,2 @@ +CONSOLE MESSAGE: Blink Test Plugin: initializing +
diff --git a/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-001-expected.png b/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-001-expected.png index a981a39..3cce977 100644 --- a/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-001-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-001-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-002-expected.png b/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-002-expected.png index 6ca8a97..abd922e 100644 --- a/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-002-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-002-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-003-expected.png b/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-003-expected.png index 84e1c8e..d61008e 100644 --- a/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-003-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-003-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-010-expected.png b/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-010-expected.png index 92b619d..afaaf6c 100644 --- a/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-010-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-010-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/shadow-multiple-expected.png index b7aab3d..be85479b 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png index a5883e8..c275ed3 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/animated-path-inside-transformed-html-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/animated-path-inside-transformed-html-expected.txt index e19b849..ab9af5d 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/animated-path-inside-transformed-html-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/animated-path-inside-transformed-html-expected.txt
@@ -74,6 +74,10 @@ { "object": "LayoutSVGImage image id='image'", "reason": "full" + }, + { + "object": "LayoutText #text", + "reason": "appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-late-mask-and-object-creation-expected.png b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-late-mask-and-object-creation-expected.png similarity index 94% rename from third_party/WebKit/LayoutTests/paint/invalidation/svg/js-late-mask-and-object-creation-expected.png rename to third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-late-mask-and-object-creation-expected.png index 19bf27e..802519d 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-late-mask-and-object-creation-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-late-mask-and-object-creation-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-late-mask-and-object-creation-expected.png b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-late-mask-creation-expected.png similarity index 94% copy from third_party/WebKit/LayoutTests/paint/invalidation/svg/js-late-mask-and-object-creation-expected.png copy to third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-late-mask-creation-expected.png index 19bf27e..802519d 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-late-mask-and-object-creation-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-late-mask-creation-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-late-mask-creation-expected.png b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/mask-child-changes-expected.png similarity index 94% rename from third_party/WebKit/LayoutTests/paint/invalidation/svg/js-late-mask-creation-expected.png rename to third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/mask-child-changes-expected.png index 19bf27e..802519d 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-late-mask-creation-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/mask-child-changes-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/paintorder-filtered-expected.png b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/paintorder-filtered-expected.png deleted file mode 100644 index 297f9f97..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/paintorder-filtered-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/window-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/window-expected.txt index 32ea4e9f..4075137 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/window-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/window-expected.txt
@@ -1982,6 +1982,22 @@ { "object": "LayoutSVGPath line", "reason": "geometry" + }, + { + "object": "LayoutSVGContainer g", + "reason": "appeared" + }, + { + "object": "LayoutSVGContainer g", + "reason": "appeared" + }, + { + "object": "LayoutSVGContainer g", + "reason": "appeared" + }, + { + "object": "LayoutSVGContainer g id='windowTitlebarGroupminimalWindow'", + "reason": "appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png index eaf6305b..dfec83a 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/scrollbars/custom-scrollbar-display-expected.png b/third_party/WebKit/LayoutTests/platform/win/scrollbars/custom-scrollbar-display-expected.png deleted file mode 100644 index 9c5e780..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/scrollbars/custom-scrollbar-display-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-color-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-color-01-b-expected.png index e03bbc5..2b5c855 100644 --- a/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-color-01-b-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-color-01-b-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-example-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-example-01-b-expected.png index 6630885..852f65ab 100644 --- a/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-example-01-b-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-example-01-b-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-gauss-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-gauss-01-b-expected.png index a1de7cd..949f90e3 100644 --- a/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-gauss-01-b-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-gauss-01-b-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png index 85b575c0..5b251ea 100644 --- a/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png index b10587be..fba27521 100644 --- a/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-turb-01-f-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-turb-01-f-expected.png index 231c11c5..4e040a3 100644 --- a/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-turb-01-f-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-turb-01-f-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-turb-02-f-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-turb-02-f-expected.png index ade454a..77b6b80 100644 --- a/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-turb-02-f-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/filters-turb-02-f-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png index 0601629..970029c 100644 --- a/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/as-background-image/svg-as-background-6-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/as-background-image/svg-as-background-6-expected.png index 2a916681..c5935d2 100644 --- a/third_party/WebKit/LayoutTests/platform/win/svg/as-background-image/svg-as-background-6-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/as-background-image/svg-as-background-6-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/batik/masking/maskRegions-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/batik/masking/maskRegions-expected.png index 70aa14f..23b8fb8 100644 --- a/third_party/WebKit/LayoutTests/platform/win/svg/batik/masking/maskRegions-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/batik/masking/maskRegions-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/css/text-gradient-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/css/text-gradient-shadow-expected.png index 87f7d893..27a33f9 100644 --- a/third_party/WebKit/LayoutTests/platform/win/svg/css/text-gradient-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/css/text-gradient-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/css/text-shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/css/text-shadow-multiple-expected.png index 20455501..38998e0 100644 --- a/third_party/WebKit/LayoutTests/platform/win/svg/css/text-shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/css/text-shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/clip-mask-negative-scale-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/custom/clip-mask-negative-scale-expected.png index e51113d..13cd6b0 100644 --- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/clip-mask-negative-scale-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/clip-mask-negative-scale-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/feComponentTransfer-Discrete-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/custom/feComponentTransfer-Discrete-expected.png index 926cfd3..650aadd 100644 --- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/feComponentTransfer-Discrete-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/feComponentTransfer-Discrete-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/feComponentTransfer-Gamma-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/custom/feComponentTransfer-Gamma-expected.png index 19e7bb8..1aa7729d 100644 --- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/feComponentTransfer-Gamma-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/feComponentTransfer-Gamma-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/feComponentTransfer-Linear-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/custom/feComponentTransfer-Linear-expected.png index 795cc4eb..9766c22b 100644 --- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/feComponentTransfer-Linear-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/feComponentTransfer-Linear-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/feComponentTransfer-Table-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/custom/feComponentTransfer-Table-expected.png index b06c6250..7d7af9ebe 100644 --- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/feComponentTransfer-Table-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/feComponentTransfer-Table-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/filter-css-transform-resolution-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/custom/filter-css-transform-resolution-expected.png new file mode 100644 index 0000000..90f12b71 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/filter-css-transform-resolution-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/image-with-transform-clip-filter-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/custom/image-with-transform-clip-filter-expected.png index 83073bcb..5d7150d1 100644 --- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/image-with-transform-clip-filter-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/image-with-transform-clip-filter-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/mask-child-changes-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/custom/mask-changes-expected.png similarity index 94% rename from third_party/WebKit/LayoutTests/paint/invalidation/svg/mask-child-changes-expected.png rename to third_party/WebKit/LayoutTests/platform/win/svg/custom/mask-changes-expected.png index 19bf27e..802519d 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/mask-child-changes-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/mask-changes-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png deleted file mode 100644 index 359a992f..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png deleted file mode 100644 index 359a992f..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png deleted file mode 100644 index 359a992f..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png deleted file mode 100644 index 359a992f..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png deleted file mode 100644 index 359a992f..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png deleted file mode 100644 index 359a992f..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png deleted file mode 100644 index 80ea6adb..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png deleted file mode 100644 index 80ea6adb..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png deleted file mode 100644 index 80ea6adb..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png deleted file mode 100644 index 7bc67e6b..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png deleted file mode 100644 index 80ea6adb..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png deleted file mode 100644 index 80ea6adb..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png deleted file mode 100644 index 80ea6adb..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png deleted file mode 100644 index 80ea6adb..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png deleted file mode 100644 index 80ea6adb..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png deleted file mode 100644 index 7bc67e6b..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png deleted file mode 100644 index 80ea6adb..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png deleted file mode 100644 index 80ea6adb..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-bias-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-bias-attr-expected.png deleted file mode 100644 index f95394e2..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-bias-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-divisor-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-divisor-attr-expected.png deleted file mode 100644 index f95394e2..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-divisor-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-edgeMode-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-edgeMode-attr-expected.png deleted file mode 100644 index 242aaaac..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-edgeMode-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-in-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-in-attr-expected.png deleted file mode 100644 index f95394e2..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-in-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-kernelMatrix-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-kernelMatrix-attr-expected.png deleted file mode 100644 index f95394e2..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-kernelMatrix-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-order-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-order-attr-expected.png deleted file mode 100644 index f95394e2..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-order-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-targetX-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-targetX-attr-expected.png deleted file mode 100644 index 242aaaac..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-targetX-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-targetY-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-targetY-attr-expected.png deleted file mode 100644 index 348d42e..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-targetY-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-bias-prop-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-bias-prop-expected.png deleted file mode 100644 index f95394e2..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-bias-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-divisor-prop-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-divisor-prop-expected.png deleted file mode 100644 index f95394e2..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-divisor-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-edgeMode-prop-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-edgeMode-prop-expected.png deleted file mode 100644 index f95394e2..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-edgeMode-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-in-prop-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-in-prop-expected.png deleted file mode 100644 index f95394e2..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-in-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-kernelMatrix-prop-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-kernelMatrix-prop-expected.png deleted file mode 100644 index c83d377..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-kernelMatrix-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-order-prop-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-order-prop-expected.png deleted file mode 100644 index f95394e2..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-order-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-targetX-prop-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-targetX-prop-expected.png deleted file mode 100644 index 242aaaac..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-targetX-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-targetY-prop-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-targetY-prop-expected.png deleted file mode 100644 index 348d42e..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-targetY-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.png deleted file mode 100644 index 58f5094..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.png deleted file mode 100644 index 58f5094..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.png deleted file mode 100644 index 58f5094..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.png deleted file mode 100644 index 58f5094..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.png deleted file mode 100644 index 58f5094..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.png deleted file mode 100644 index 58f5094..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.png deleted file mode 100644 index 278e6bf7..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.png deleted file mode 100644 index 278e6bf7..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.png deleted file mode 100644 index 278e6bf7..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.png deleted file mode 100644 index 278e6bf7..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-dom-baseFrequency-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-dom-baseFrequency-attr-expected.png deleted file mode 100644 index ffc57134..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-dom-baseFrequency-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-dom-numOctaves-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-dom-numOctaves-attr-expected.png deleted file mode 100644 index ffc57134..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-dom-numOctaves-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-dom-seed-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-dom-seed-attr-expected.png deleted file mode 100644 index ffc57134..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-dom-seed-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-dom-stitchTiles-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-dom-stitchTiles-attr-expected.png deleted file mode 100644 index d328b87d..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-dom-stitchTiles-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-dom-type-attr-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-dom-type-attr-expected.png deleted file mode 100644 index ffc57134..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-dom-type-attr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-baseFrequency-prop-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-baseFrequency-prop-expected.png deleted file mode 100644 index ffc57134..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-baseFrequency-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-numOctaves-prop-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-numOctaves-prop-expected.png deleted file mode 100644 index ffc57134..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-numOctaves-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-seed-prop-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-seed-prop-expected.png index eb8d075..cc687dc 100644 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-seed-prop-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-seed-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-stitchTiles-prop-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-stitchTiles-prop-expected.png deleted file mode 100644 index ffc57134..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-stitchTiles-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-type-prop-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-type-prop-expected.png deleted file mode 100644 index ffc57134..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-type-prop-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/filters/feDropShadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/filters/feDropShadow-expected.png deleted file mode 100644 index 99d4a2d..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/svg/filters/feDropShadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/filters/feGaussianBlur-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/filters/feGaussianBlur-expected.png index 79895a1..0d0c825 100644 --- a/third_party/WebKit/LayoutTests/platform/win/svg/filters/feGaussianBlur-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/filters/feGaussianBlur-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/filters/feTurbulence-scale-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/filters/feTurbulence-scale-expected.png index 5202f15..9fdd5f52 100644 --- a/third_party/WebKit/LayoutTests/platform/win/svg/filters/feTurbulence-scale-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/filters/feTurbulence-scale-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/filters/feTurbulence-tiled-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/filters/feTurbulence-tiled-expected.png index 5abf39d..00c93e9f 100644 --- a/third_party/WebKit/LayoutTests/platform/win/svg/filters/feTurbulence-tiled-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/filters/feTurbulence-tiled-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/filters/filteredImage-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/filters/filteredImage-expected.png index fc696c3a..7f0a9e1 100644 --- a/third_party/WebKit/LayoutTests/platform/win/svg/filters/filteredImage-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/filters/filteredImage-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/transforms/text-with-mask-with-svg-transform-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/transforms/text-with-mask-with-svg-transform-expected.png index f05a2c1..7b58d57 100644 --- a/third_party/WebKit/LayoutTests/platform/win/svg/transforms/text-with-mask-with-svg-transform-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/transforms/text-with-mask-with-svg-transform-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/zoom/page/zoom-mask-with-percentages-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/zoom/page/zoom-mask-with-percentages-expected.png index 40e292a..1e4b997 100644 --- a/third_party/WebKit/LayoutTests/platform/win/svg/zoom/page/zoom-mask-with-percentages-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/zoom/page/zoom-mask-with-percentages-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/transforms/shadows-expected.png b/third_party/WebKit/LayoutTests/platform/win/transforms/shadows-expected.png index d1071d1..aeb5e6d 100644 --- a/third_party/WebKit/LayoutTests/platform/win/transforms/shadows-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/transforms/shadows-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/transforms/shadows-expected.txt b/third_party/WebKit/LayoutTests/platform/win/transforms/shadows-expected.txt new file mode 100644 index 0000000..80544c5 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/win/transforms/shadows-expected.txt
@@ -0,0 +1,104 @@ +layer at (0,0) size 800x600 + LayoutView at (0,0) size 800x600 +layer at (0,0) size 800x600 + LayoutBlockFlow {HTML} at (0,0) size 800x600 + LayoutBlockFlow {BODY} at (0,0) size 800x600 [color=#90EE90] + LayoutBlockFlow (floating) {DIV} at (20,20) size 40x40 [bgcolor=#FFFFE0] + LayoutBlockFlow {DIV} at (0,80) size 800x0 + LayoutBlockFlow (floating) {DIV} at (20,100) size 40x40 [bgcolor=#FFFFE0] + LayoutBlockFlow {DIV} at (0,160) size 800x0 + LayoutBlockFlow (floating) {DIV} at (20,180) size 40x40 [bgcolor=#FFFFE0] + LayoutBlockFlow {DIV} at (0,240) size 800x0 + LayoutBlockFlow (floating) {DIV} at (20,260) size 40x40 [bgcolor=#FFFFE0] + LayoutBlockFlow {DIV} at (0,320) size 800x0 + LayoutBlockFlow (floating) {DIV} at (20,340) size 40x40 [bgcolor=#FFFFE0] + LayoutText {#text} at (5,5) size 20x20 + text run at (5,5) width 20: "X" + LayoutBlockFlow {DIV} at (0,400) size 800x0 + LayoutBlockFlow (floating) {DIV} at (20,420) size 40x40 [bgcolor=#FFFFE0] + LayoutText {#text} at (5,5) size 20x20 + text run at (5,5) width 20: "X" + LayoutBlockFlow {DIV} at (0,480) size 800x0 + LayoutBlockFlow (floating) {DIV} at (20,500) size 40x40 [bgcolor=#FFFFE0] + LayoutText {#text} at (5,5) size 20x20 + text run at (5,5) width 20: "X" +layer at (100,20) size 40x40 + LayoutBlockFlow (floating) {DIV} at (100,20) size 40x40 [bgcolor=#FFFFE0] +layer at (180,20) size 40x40 + LayoutBlockFlow (floating) {DIV} at (180,20) size 40x40 [bgcolor=#FFFFE0] +layer at (260,20) size 40x40 + LayoutBlockFlow (floating) {DIV} at (260,20) size 40x40 [bgcolor=#FFFFE0] +layer at (340,20) size 40x40 + LayoutBlockFlow (floating) {DIV} at (340,20) size 40x40 [bgcolor=#FFFFE0] +layer at (100,100) size 40x40 + LayoutBlockFlow (floating) {DIV} at (100,100) size 40x40 [bgcolor=#FFFFE0] +layer at (180,100) size 40x40 + LayoutBlockFlow (floating) {DIV} at (180,100) size 40x40 [bgcolor=#FFFFE0] +layer at (260,100) size 40x40 + LayoutBlockFlow (floating) {DIV} at (260,100) size 40x40 [bgcolor=#FFFFE0] +layer at (340,100) size 40x40 + LayoutBlockFlow (floating) {DIV} at (340,100) size 40x40 [bgcolor=#FFFFE0] +layer at (100,180) size 40x40 + LayoutBlockFlow (floating) {DIV} at (100,180) size 40x40 [bgcolor=#FFFFE0] +layer at (180,180) size 40x40 + LayoutBlockFlow (floating) {DIV} at (180,180) size 40x40 [bgcolor=#FFFFE0] +layer at (260,180) size 40x40 + LayoutBlockFlow (floating) {DIV} at (260,180) size 40x40 [bgcolor=#FFFFE0] +layer at (340,180) size 40x40 + LayoutBlockFlow (floating) {DIV} at (340,180) size 40x40 [bgcolor=#FFFFE0] +layer at (100,260) size 40x40 + LayoutBlockFlow (floating) {DIV} at (100,260) size 40x40 [bgcolor=#FFFFE0] +layer at (180,260) size 40x40 + LayoutBlockFlow (floating) {DIV} at (180,260) size 40x40 [bgcolor=#FFFFE0] +layer at (260,260) size 40x40 + LayoutBlockFlow (floating) {DIV} at (260,260) size 40x40 [bgcolor=#FFFFE0] +layer at (340,260) size 40x40 + LayoutBlockFlow (floating) {DIV} at (340,260) size 40x40 [bgcolor=#FFFFE0] +layer at (100,340) size 40x40 + LayoutBlockFlow (floating) {DIV} at (100,340) size 40x40 [bgcolor=#FFFFE0] + LayoutText {#text} at (5,5) size 20x20 + text run at (5,5) width 20: "X" +layer at (180,340) size 40x40 + LayoutBlockFlow (floating) {DIV} at (180,340) size 40x40 [bgcolor=#FFFFE0] + LayoutText {#text} at (5,5) size 20x20 + text run at (5,5) width 20: "X" +layer at (260,340) size 40x40 + LayoutBlockFlow (floating) {DIV} at (260,340) size 40x40 [bgcolor=#FFFFE0] + LayoutText {#text} at (5,5) size 20x20 + text run at (5,5) width 20: "X" +layer at (340,340) size 40x40 + LayoutBlockFlow (floating) {DIV} at (340,340) size 40x40 [bgcolor=#FFFFE0] + LayoutText {#text} at (5,5) size 20x20 + text run at (5,5) width 20: "X" +layer at (100,420) size 40x40 + LayoutBlockFlow (floating) {DIV} at (100,420) size 40x40 [bgcolor=#FFFFE0] + LayoutText {#text} at (5,5) size 20x20 + text run at (5,5) width 20: "X" +layer at (180,420) size 40x40 + LayoutBlockFlow (floating) {DIV} at (180,420) size 40x40 [bgcolor=#FFFFE0] + LayoutText {#text} at (5,5) size 20x20 + text run at (5,5) width 20: "X" +layer at (260,420) size 40x40 + LayoutBlockFlow (floating) {DIV} at (260,420) size 40x40 [bgcolor=#FFFFE0] + LayoutText {#text} at (5,5) size 20x20 + text run at (5,5) width 20: "X" +layer at (340,420) size 40x40 + LayoutBlockFlow (floating) {DIV} at (340,420) size 40x40 [bgcolor=#FFFFE0] + LayoutText {#text} at (5,5) size 20x20 + text run at (5,5) width 20: "X" +layer at (100,500) size 40x40 + LayoutBlockFlow (floating) {DIV} at (100,500) size 40x40 [bgcolor=#FFFFE0] + LayoutText {#text} at (5,5) size 20x20 + text run at (5,5) width 20: "X" +layer at (180,500) size 40x40 + LayoutBlockFlow (floating) {DIV} at (180,500) size 40x40 [bgcolor=#FFFFE0] + LayoutText {#text} at (5,5) size 20x20 + text run at (5,5) width 20: "X" +layer at (260,500) size 40x40 + LayoutBlockFlow (floating) {DIV} at (260,500) size 40x40 [bgcolor=#FFFFE0] + LayoutText {#text} at (5,5) size 20x20 + text run at (5,5) width 20: "X" +layer at (340,500) size 40x40 + LayoutBlockFlow (floating) {DIV} at (340,500) size 40x40 [bgcolor=#FFFFE0] + LayoutText {#text} at (5,5) size 20x20 + text run at (5,5) width 20: "X"
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/compositing/culling/scrolled-within-boxshadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/compositing/culling/scrolled-within-boxshadow-expected.png deleted file mode 100644 index 317fef7d7..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/compositing/culling/scrolled-within-boxshadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/compositing/culling/translated-boxshadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/compositing/culling/translated-boxshadow-expected.png deleted file mode 100644 index 6e3f377..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/compositing/culling/translated-boxshadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/compositing/culling/unscrolled-within-boxshadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/compositing/culling/unscrolled-within-boxshadow-expected.png deleted file mode 100644 index 317fef7d7..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/compositing/culling/unscrolled-within-boxshadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png deleted file mode 100644 index acfc168..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/compositing/overflow/scrollbar-layer-placement-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/compositing/overflow/scrollbar-layer-placement-expected.png deleted file mode 100644 index 125c5fc..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/compositing/overflow/scrollbar-layer-placement-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/compositing/shadows/shadow-drawing-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/compositing/shadows/shadow-drawing-expected.png deleted file mode 100644 index 1a1d0fc..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/compositing/shadows/shadow-drawing-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/shadow-multiple-expected.png index b7aab3d..be85479b 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png index a5883e8..c275ed3 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/svg/paintorder-filtered-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/svg/paintorder-filtered-expected.png deleted file mode 100644 index 297f9f97..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/svg/paintorder-filtered-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/printing/print-box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/printing/print-box-shadow-expected.png deleted file mode 100644 index 2e24bc09..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/printing/print-box-shadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png deleted file mode 100644 index eaf6305b..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png index 712a5cf..e30901b 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-filter-all-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-filter-all-expected.png index 15814593..bea341d 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-filter-all-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-filter-all-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/mojo-loading/http/tests/inspector/extensions/extensions-panel-expected.txt b/third_party/WebKit/LayoutTests/platform/win/virtual/mojo-loading/http/tests/inspector/extensions/extensions-panel-expected.txt deleted file mode 100644 index 374b1bf..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/mojo-loading/http/tests/inspector/extensions/extensions-panel-expected.txt +++ /dev/null
@@ -1,74 +0,0 @@ -CONSOLE MESSAGE: line 12: hello -Tests WebInspector extension API - - -Started extension. -Running tests... -RUNNING TEST: extension_testCreatePanel -Panel created -{ - createStatusBarButton : <function> - onHidden : { - addListener : <function> - removeListener : <function> - } - onSearch : { - addListener : <function> - removeListener : <function> - } - onShown : { - addListener : <function> - removeListener : <function> - } - show : <function> -} -Panel shown -Extension panel size correct -Panel hidden -RUNNING TEST: extension_testGlobalShortcuts -Panel shown, now toggling console... -Panel resized, test passed. -RUNNING TEST: extension_testOpenResource -Showing .../extensions-panel.html -Showing resource .../inspector/extensions/extensions-panel.html in panel sources), line: 1001 -Showing .../abe.png -Showing resource .../extensions/resources/abe.png in panel network), line: undefined -Showing .../missing.txt -Showing resource .../extensions/resources/missing.txt in panel network), line: undefined -Showing not-found.html -error: Extension server error: Object not found: not-found.html -Showing javascript:console.error('oh no!') -error: Extension server error: Object not found: javascript:console.error('oh no!') -RUNNING TEST: extension_testSearch -Panel searched: -{ - 0 : "performSearch" - 1 : "hello" -} -Panel searched: -{ - 0 : "cancelSearch" - 1 : undefined -} -RUNNING TEST: extension_testStatusBarButtons -Created a status bar button, dump follows: -{ - onClicked : { - addListener : <function> - removeListener : <function> - } - update : <function> -} -button1 clicked -Status bar buttons state: -status bar item 0, icon: ".../inspector/resources/button1.png", tooltip: 'Button One tooltip', disabled: false -status bar item 1, icon: ".../inspector/resources/button2.png", tooltip: 'Button Two tooltip', disabled: true -Updated status bar buttons -Status bar buttons state: -status bar item 0, icon: ".../inspector/resources/button1-updated.png", tooltip: 'Button One tooltip', disabled: false -status bar item 1, icon: ".../inspector/resources/button2.png", tooltip: 'Button Two updated tooltip', disabled: false -button2 clicked -RUNNING TEST: extension_testThemeName -Theme name: themeNameForTest -All tests done. -
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/scrollbar-layer-placement-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/scrollbar-layer-placement-expected.png deleted file mode 100644 index 125c5fc..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/prefer_compositing_to_lcd_text/compositing/overflow/scrollbar-layer-placement-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/prefer_compositing_to_lcd_text/scrollbars/custom-scrollbar-display-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/prefer_compositing_to_lcd_text/scrollbars/custom-scrollbar-display-expected.png deleted file mode 100644 index 9c5e780..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/prefer_compositing_to_lcd_text/scrollbars/custom-scrollbar-display-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/rootlayerscrolls/scrollbars/custom-scrollbar-display-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/rootlayerscrolls/scrollbars/custom-scrollbar-display-expected.png deleted file mode 100644 index 9c5e780..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/rootlayerscrolls/scrollbars/custom-scrollbar-display-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor150/fast/hidpi/static/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor150/fast/hidpi/static/calendar-picker-appearance-expected.png index 2c8dadc..dfa7317 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor150/fast/hidpi/static/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor150/fast/hidpi/static/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png index 2ee851d..6ff342a7 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor200withzoom/fast/hidpi/static/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor200withzoom/fast/hidpi/static/calendar-picker-appearance-expected.png index 2ee851d..6ff342a7 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor200withzoom/fast/hidpi/static/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor200withzoom/fast/hidpi/static/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/compositing/shadows/shadow-drawing-expected.png b/third_party/WebKit/LayoutTests/platform/win7/compositing/shadows/shadow-drawing-expected.png index 53dcac8..f86ddbc 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/compositing/shadows/shadow-drawing-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/compositing/shadows/shadow-drawing-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/css/color-correction-on-text-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/css/color-correction-on-text-shadow-expected.png index ed858ed..fc926e86 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/css/color-correction-on-text-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/css/color-correction-on-text-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/css/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/css/shadow-multiple-expected.png index 941c030..b94d6b1 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/css/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/css/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png index c1a464d..884ef68 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png index 04f5d07..8dceba7 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-coarse-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-expected.png index b602735..005eb7d 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png index cb31b24..30cd961 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png index ed34934..5fdb5e2 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png index f512a24..c015de9 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png index 252def7..680e12b5 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png index 8d20f25..415c407 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png index 1a680a5b..7438cee1 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/month-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/month-picker-appearance-expected.png index 5c1a1bc..c70c34d 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/month-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/month-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/month-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/month-picker-appearance-step-expected.png index d05d4e4..dbb04f8 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/month-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/month-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/week-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/week-picker-appearance-expected.png index 0fa3f9c6..c58dc4de 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/week-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/week-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/week-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/week-picker-appearance-step-expected.png index ab73edf3..622f0f32 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/week-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/week-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/text/stroking-decorations-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/text/stroking-decorations-expected.png index fd5915e..87ec516 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/text/stroking-decorations-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/text/stroking-decorations-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/text/stroking-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/text/stroking-expected.png index 3df7b2b..6979c0a 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/text/stroking-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/text/stroking-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/text/text-shadow-no-default-color-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/text/text-shadow-no-default-color-expected.png index a8421aae..703ea0d1 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/text/text-shadow-no-default-color-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/text/text-shadow-no-default-color-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/http/tests/inspector/extensions/extensions-panel-expected.txt b/third_party/WebKit/LayoutTests/platform/win7/http/tests/inspector/extensions/extensions-panel-expected.txt deleted file mode 100644 index f1e00c8..0000000 --- a/third_party/WebKit/LayoutTests/platform/win7/http/tests/inspector/extensions/extensions-panel-expected.txt +++ /dev/null
@@ -1,74 +0,0 @@ -CONSOLE MESSAGE: line 12: hello -Tests WebInspector extension API - - -Started extension. -Running tests... -RUNNING TEST: extension_testCreatePanel -Panel created -{ - createStatusBarButton : <function> - onHidden : { - addListener : <function> - removeListener : <function> - } - onSearch : { - addListener : <function> - removeListener : <function> - } - onShown : { - addListener : <function> - removeListener : <function> - } - show : <function> -} -Panel shown -Extension panel size correct -Panel hidden -RUNNING TEST: extension_testGlobalShortcuts -Panel shown, now toggling console... -Panel resized, test passed. -RUNNING TEST: extension_testOpenResource -Showing .../extensions-panel.html -Showing resource .../inspector/extensions/extensions-panel.html in panel sources), line: 1001 -Showing .../abe.png -Showing resource .../extensions/resources/abe.png in panel sources), line: 1002 -Showing .../missing.txt -Showing resource .../extensions/resources/missing.txt in panel network), line: undefined -Showing not-found.html -error: Extension server error: Object not found: not-found.html -Showing javascript:console.error('oh no!') -error: Extension server error: Object not found: javascript:console.error('oh no!') -RUNNING TEST: extension_testSearch -Panel searched: -{ - 0 : "performSearch" - 1 : "hello" -} -Panel searched: -{ - 0 : "cancelSearch" - 1 : undefined -} -RUNNING TEST: extension_testStatusBarButtons -Created a status bar button, dump follows: -{ - onClicked : { - addListener : <function> - removeListener : <function> - } - update : <function> -} -button1 clicked -Status bar buttons state: -status bar item 0, icon: ".../inspector/resources/button1.png", tooltip: 'Button One tooltip', disabled: false -status bar item 1, icon: ".../inspector/resources/button2.png", tooltip: 'Button Two tooltip', disabled: true -Updated status bar buttons -Status bar buttons state: -status bar item 0, icon: ".../inspector/resources/button1-updated.png", tooltip: 'Button One tooltip', disabled: false -status bar item 1, icon: ".../inspector/resources/button2.png", tooltip: 'Button Two updated tooltip', disabled: false -button2 clicked -RUNNING TEST: extension_testThemeName -Theme name: themeNameForTest -All tests done. -
diff --git a/third_party/WebKit/LayoutTests/platform/win7/http/tests/security/xssAuditor/object-src-inject-expected.txt b/third_party/WebKit/LayoutTests/platform/win7/http/tests/security/xssAuditor/object-src-inject-expected.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/win7/http/tests/security/xssAuditor/object-src-inject-expected.txt
@@ -0,0 +1 @@ +
diff --git a/third_party/WebKit/LayoutTests/platform/win7/ietestcenter/css3/text/textshadow-001-expected.png b/third_party/WebKit/LayoutTests/platform/win7/ietestcenter/css3/text/textshadow-001-expected.png index 9256e434..cf9b0b2 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/ietestcenter/css3/text/textshadow-001-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/ietestcenter/css3/text/textshadow-001-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/ietestcenter/css3/text/textshadow-002-expected.png b/third_party/WebKit/LayoutTests/platform/win7/ietestcenter/css3/text/textshadow-002-expected.png index 0113cde8..dd07330b 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/ietestcenter/css3/text/textshadow-002-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/ietestcenter/css3/text/textshadow-002-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/ietestcenter/css3/text/textshadow-003-expected.png b/third_party/WebKit/LayoutTests/platform/win7/ietestcenter/css3/text/textshadow-003-expected.png index 3e251210..d6e7f537 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/ietestcenter/css3/text/textshadow-003-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/ietestcenter/css3/text/textshadow-003-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/ietestcenter/css3/text/textshadow-010-expected.png b/third_party/WebKit/LayoutTests/platform/win7/ietestcenter/css3/text/textshadow-010-expected.png index 3fd4b39..b1b9f5f 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/ietestcenter/css3/text/textshadow-010-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/ietestcenter/css3/text/textshadow-010-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/paint/invalidation/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/win7/paint/invalidation/shadow-multiple-expected.png index bf997ed..45a4699 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/paint/invalidation/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/paint/invalidation/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/svg/W3C-SVG-1.1/filters-color-01-b-expected.png b/third_party/WebKit/LayoutTests/platform/win7/svg/W3C-SVG-1.1/filters-color-01-b-expected.png index 9de3317..0a8fb39 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/svg/W3C-SVG-1.1/filters-color-01-b-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/svg/W3C-SVG-1.1/filters-color-01-b-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/svg/css/text-gradient-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win7/svg/css/text-gradient-shadow-expected.png index a4d01b9b..be368ab1 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/svg/css/text-gradient-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/svg/css/text-gradient-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/svg/css/text-shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/win7/svg/css/text-shadow-multiple-expected.png index cc76fb20b..e39b3dc7 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/svg/css/text-shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/svg/css/text-shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/svg/custom/feComponentTransfer-Discrete-expected.png b/third_party/WebKit/LayoutTests/platform/win7/svg/custom/feComponentTransfer-Discrete-expected.png index a759c783..272e4467 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/svg/custom/feComponentTransfer-Discrete-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/svg/custom/feComponentTransfer-Discrete-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/svg/custom/feComponentTransfer-Gamma-expected.png b/third_party/WebKit/LayoutTests/platform/win7/svg/custom/feComponentTransfer-Gamma-expected.png index aaaa07c..84470686 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/svg/custom/feComponentTransfer-Gamma-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/svg/custom/feComponentTransfer-Gamma-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/svg/custom/feComponentTransfer-Linear-expected.png b/third_party/WebKit/LayoutTests/platform/win7/svg/custom/feComponentTransfer-Linear-expected.png index 041498d0..33ab4bd 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/svg/custom/feComponentTransfer-Linear-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/svg/custom/feComponentTransfer-Linear-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/svg/custom/feComponentTransfer-Table-expected.png b/third_party/WebKit/LayoutTests/platform/win7/svg/custom/feComponentTransfer-Table-expected.png index ba747a1..3c43f03a 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/svg/custom/feComponentTransfer-Table-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/svg/custom/feComponentTransfer-Table-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/transforms/shadows-expected.png b/third_party/WebKit/LayoutTests/platform/win7/transforms/shadows-expected.png index 790c8e54..2b79a668 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/transforms/shadows-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/transforms/shadows-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/virtual/disable-spinvalidation/compositing/shadows/shadow-drawing-expected.png b/third_party/WebKit/LayoutTests/platform/win7/virtual/disable-spinvalidation/compositing/shadows/shadow-drawing-expected.png index 53dcac8..f86ddbc 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/virtual/disable-spinvalidation/compositing/shadows/shadow-drawing-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/virtual/disable-spinvalidation/compositing/shadows/shadow-drawing-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/virtual/disable-spinvalidation/paint/invalidation/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/win7/virtual/disable-spinvalidation/paint/invalidation/shadow-multiple-expected.png index bf997ed..45a4699 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/virtual/disable-spinvalidation/paint/invalidation/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/virtual/disable-spinvalidation/paint/invalidation/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/virtual/mojo-loading/http/tests/inspector/extensions/extensions-panel-expected.txt b/third_party/WebKit/LayoutTests/platform/win7/virtual/mojo-loading/http/tests/inspector/extensions/extensions-panel-expected.txt deleted file mode 100644 index f1e00c8..0000000 --- a/third_party/WebKit/LayoutTests/platform/win7/virtual/mojo-loading/http/tests/inspector/extensions/extensions-panel-expected.txt +++ /dev/null
@@ -1,74 +0,0 @@ -CONSOLE MESSAGE: line 12: hello -Tests WebInspector extension API - - -Started extension. -Running tests... -RUNNING TEST: extension_testCreatePanel -Panel created -{ - createStatusBarButton : <function> - onHidden : { - addListener : <function> - removeListener : <function> - } - onSearch : { - addListener : <function> - removeListener : <function> - } - onShown : { - addListener : <function> - removeListener : <function> - } - show : <function> -} -Panel shown -Extension panel size correct -Panel hidden -RUNNING TEST: extension_testGlobalShortcuts -Panel shown, now toggling console... -Panel resized, test passed. -RUNNING TEST: extension_testOpenResource -Showing .../extensions-panel.html -Showing resource .../inspector/extensions/extensions-panel.html in panel sources), line: 1001 -Showing .../abe.png -Showing resource .../extensions/resources/abe.png in panel sources), line: 1002 -Showing .../missing.txt -Showing resource .../extensions/resources/missing.txt in panel network), line: undefined -Showing not-found.html -error: Extension server error: Object not found: not-found.html -Showing javascript:console.error('oh no!') -error: Extension server error: Object not found: javascript:console.error('oh no!') -RUNNING TEST: extension_testSearch -Panel searched: -{ - 0 : "performSearch" - 1 : "hello" -} -Panel searched: -{ - 0 : "cancelSearch" - 1 : undefined -} -RUNNING TEST: extension_testStatusBarButtons -Created a status bar button, dump follows: -{ - onClicked : { - addListener : <function> - removeListener : <function> - } - update : <function> -} -button1 clicked -Status bar buttons state: -status bar item 0, icon: ".../inspector/resources/button1.png", tooltip: 'Button One tooltip', disabled: false -status bar item 1, icon: ".../inspector/resources/button2.png", tooltip: 'Button Two tooltip', disabled: true -Updated status bar buttons -Status bar buttons state: -status bar item 0, icon: ".../inspector/resources/button1-updated.png", tooltip: 'Button One tooltip', disabled: false -status bar item 1, icon: ".../inspector/resources/button2.png", tooltip: 'Button Two updated tooltip', disabled: false -button2 clicked -RUNNING TEST: extension_testThemeName -Theme name: themeNameForTest -All tests done. -
diff --git a/third_party/WebKit/LayoutTests/platform/win7/virtual/scalefactor150/fast/hidpi/static/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win7/virtual/scalefactor150/fast/hidpi/static/calendar-picker-appearance-expected.png index cf63c36..553d64de 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/virtual/scalefactor150/fast/hidpi/static/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/virtual/scalefactor150/fast/hidpi/static/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win7/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png index d3f33e5..22d2d1f0 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/virtual/scalefactor200/fast/hidpi/static/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/virtual/scalefactor200withzoom/fast/hidpi/static/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win7/virtual/scalefactor200withzoom/fast/hidpi/static/calendar-picker-appearance-expected.png index d3f33e5..22d2d1f0 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/virtual/scalefactor200withzoom/fast/hidpi/static/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/virtual/scalefactor200withzoom/fast/hidpi/static/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/scrollbars/custom-scrollbar-display-expected.png b/third_party/WebKit/LayoutTests/scrollbars/custom-scrollbar-display-expected.png new file mode 100644 index 0000000..380ee85 --- /dev/null +++ b/third_party/WebKit/LayoutTests/scrollbars/custom-scrollbar-display-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/custom/filter-css-transform-resolution-expected.png b/third_party/WebKit/LayoutTests/svg/custom/filter-css-transform-resolution-expected.png index 288e0ff5..90f12b71 100644 --- a/third_party/WebKit/LayoutTests/svg/custom/filter-css-transform-resolution-expected.png +++ b/third_party/WebKit/LayoutTests/svg/custom/filter-css-transform-resolution-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/custom/grayscale-gradient-mask-2-expected.png b/third_party/WebKit/LayoutTests/svg/custom/grayscale-gradient-mask-2-expected.png index df57de60..cd9d58b 100644 --- a/third_party/WebKit/LayoutTests/svg/custom/grayscale-gradient-mask-2-expected.png +++ b/third_party/WebKit/LayoutTests/svg/custom/grayscale-gradient-mask-2-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/custom/grayscale-gradient-mask-expected.png b/third_party/WebKit/LayoutTests/svg/custom/grayscale-gradient-mask-expected.png index 490ee83..a5ce808 100644 --- a/third_party/WebKit/LayoutTests/svg/custom/grayscale-gradient-mask-expected.png +++ b/third_party/WebKit/LayoutTests/svg/custom/grayscale-gradient-mask-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/custom/mask-changes-expected.png b/third_party/WebKit/LayoutTests/svg/custom/mask-changes-expected.png deleted file mode 100644 index 19bf27e..0000000 --- a/third_party/WebKit/LayoutTests/svg/custom/mask-changes-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/custom/mask-colorspace-expected.png b/third_party/WebKit/LayoutTests/svg/custom/mask-colorspace-expected.png index de56749..b848911 100644 --- a/third_party/WebKit/LayoutTests/svg/custom/mask-colorspace-expected.png +++ b/third_party/WebKit/LayoutTests/svg/custom/mask-colorspace-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png new file mode 100644 index 0000000..24caa3e --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png new file mode 100644 index 0000000..24caa3e --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png new file mode 100644 index 0000000..24caa3e --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png new file mode 100644 index 0000000..24caa3e --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png new file mode 100644 index 0000000..24caa3e --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png new file mode 100644 index 0000000..24caa3e --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-dom-in-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-dom-in-attr-expected.png index 7a1b7fd..6ecc6dc 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-dom-in-attr-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-dom-in-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png new file mode 100644 index 0000000..6a5059a --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png new file mode 100644 index 0000000..6a5059a --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png new file mode 100644 index 0000000..6a5059a --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png new file mode 100644 index 0000000..85b74fb0 --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png new file mode 100644 index 0000000..6a5059a --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png new file mode 100644 index 0000000..6a5059a --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop-expected.png index 7a1b7fd..6ecc6dc 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png new file mode 100644 index 0000000..6a5059a --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png new file mode 100644 index 0000000..6a5059a --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png new file mode 100644 index 0000000..6a5059a --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png new file mode 100644 index 0000000..85b74fb0 --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png new file mode 100644 index 0000000..6a5059a --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png new file mode 100644 index 0000000..6a5059a --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-kernelMatrix-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-kernelMatrix-prop-expected.png new file mode 100644 index 0000000..d2718ca --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-kernelMatrix-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.png new file mode 100644 index 0000000..d9b531b2 --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.png new file mode 100644 index 0000000..d9b531b2 --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.png new file mode 100644 index 0000000..d9b531b2 --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr-expected.png index 777a12c..bdd59c0 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr-expected.png index 3dc437f..6b118a70 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr-expected.png index 9db3054f..741a9850 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.png new file mode 100644 index 0000000..d9b531b2 --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.png new file mode 100644 index 0000000..d9b531b2 --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.png new file mode 100644 index 0000000..d9b531b2 --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop-expected.png index 777a12c..bdd59c0 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop-expected.png index 3dc437f..6b118a70 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop-expected.png index 9db3054f..741a9850 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.png new file mode 100644 index 0000000..669e9891 --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.png new file mode 100644 index 0000000..669e9891 --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.png new file mode 100644 index 0000000..669e9891 --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.png new file mode 100644 index 0000000..669e9891 --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEMergeNodeElement-dom-in-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEMergeNodeElement-dom-in-attr-expected.png index 69940a9..b71c364 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEMergeNodeElement-dom-in-attr-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEMergeNodeElement-dom-in-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEMergeNodeElement-svgdom-in-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEMergeNodeElement-svgdom-in-prop-expected.png index 69940a9..b71c364 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEMergeNodeElement-svgdom-in-prop-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEMergeNodeElement-svgdom-in-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEOffsetElement-dom-dx-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEOffsetElement-dom-dx-attr-expected.png index 332820e..e9b237a 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEOffsetElement-dom-dx-attr-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEOffsetElement-dom-dx-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEOffsetElement-dom-dy-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEOffsetElement-dom-dy-attr-expected.png index 332820e..e9b237a 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEOffsetElement-dom-dy-attr-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEOffsetElement-dom-dy-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEOffsetElement-dom-in-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEOffsetElement-dom-in-attr-expected.png index 332820e..e9b237a 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEOffsetElement-dom-in-attr-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEOffsetElement-dom-in-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEOffsetElement-svgdom-dx-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEOffsetElement-svgdom-dx-prop-expected.png index 332820e..e9b237a 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEOffsetElement-svgdom-dx-prop-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEOffsetElement-svgdom-dx-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEOffsetElement-svgdom-dy-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEOffsetElement-svgdom-dy-prop-expected.png index 332820e..e9b237a 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEOffsetElement-svgdom-dy-prop-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEOffsetElement-svgdom-dy-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEOffsetElement-svgdom-in-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEOffsetElement-svgdom-in-prop-expected.png index 332820e..e9b237a 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEOffsetElement-svgdom-in-prop-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFEOffsetElement-svgdom-in-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-dom-in-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-dom-in-attr-expected.png index eab1ad8..a8f24d5d 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-dom-in-attr-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-dom-in-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-dom-kernelUnitLength-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-dom-kernelUnitLength-attr-expected.png index 76e701b..2ce660d 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-dom-kernelUnitLength-attr-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-dom-kernelUnitLength-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-dom-specularConstant-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-dom-specularConstant-attr-expected.png index eab1ad8..a8f24d5d 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-dom-specularConstant-attr-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-dom-specularConstant-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-dom-specularExponent-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-dom-specularExponent-attr-expected.png index eab1ad8..a8f24d5d 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-dom-specularExponent-attr-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-dom-specularExponent-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-dom-suraceScale-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-dom-suraceScale-attr-expected.png index eab1ad8..a8f24d5d 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-dom-suraceScale-attr-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-dom-suraceScale-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-inherit-lighting-color-css-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-inherit-lighting-color-css-prop-expected.png index e828b3f..a02026e5 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-inherit-lighting-color-css-prop-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-inherit-lighting-color-css-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-lighting-color-css-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-lighting-color-css-prop-expected.png index e828b3f..a02026e5 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-lighting-color-css-prop-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-lighting-color-css-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-in-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-in-prop-expected.png index eab1ad8..a8f24d5d 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-in-prop-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-in-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-specularConstant-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-specularConstant-prop-expected.png index eab1ad8..a8f24d5d 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-specularConstant-prop-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-specularConstant-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-specularExponent-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-specularExponent-prop-expected.png index eab1ad8..a8f24d5d 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-specularExponent-prop-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-specularExponent-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-suraceScale-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-suraceScale-prop-expected.png index eab1ad8..a8f24d5d 100644 --- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-suraceScale-prop-expected.png +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-suraceScale-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-dom-baseFrequency-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-dom-baseFrequency-attr-expected.png new file mode 100644 index 0000000..78feb7c --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-dom-baseFrequency-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-dom-numOctaves-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-dom-numOctaves-attr-expected.png new file mode 100644 index 0000000..78feb7c --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-dom-numOctaves-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-dom-seed-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-dom-seed-attr-expected.png new file mode 100644 index 0000000..78feb7c --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-dom-seed-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-dom-stitchTiles-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-dom-stitchTiles-attr-expected.png new file mode 100644 index 0000000..aa4129f --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-dom-stitchTiles-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-dom-type-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-dom-type-attr-expected.png new file mode 100644 index 0000000..78feb7c --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-dom-type-attr-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-baseFrequency-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-baseFrequency-prop-expected.png new file mode 100644 index 0000000..78feb7c --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-baseFrequency-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-numOctaves-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-numOctaves-prop-expected.png new file mode 100644 index 0000000..78feb7c --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-numOctaves-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-stitchTiles-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-stitchTiles-prop-expected.png new file mode 100644 index 0000000..78feb7c --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-stitchTiles-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-type-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-type-prop-expected.png new file mode 100644 index 0000000..78feb7c --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-type-prop-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/filters/feDropShadow-expected.png b/third_party/WebKit/LayoutTests/svg/filters/feDropShadow-expected.png new file mode 100644 index 0000000..a7c893d --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/filters/feDropShadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/filters/filter-clip-expected.png b/third_party/WebKit/LayoutTests/svg/filters/filter-clip-expected.png index 060e848..f995f65 100644 --- a/third_party/WebKit/LayoutTests/svg/filters/filter-clip-expected.png +++ b/third_party/WebKit/LayoutTests/svg/filters/filter-clip-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-all/image-invert-expected.png b/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-all/image-invert-expected.png index bc6b96e..0b738657 100644 --- a/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-all/image-invert-expected.png +++ b/third_party/WebKit/LayoutTests/virtual/high-contrast-mode/paint/high-contrast-mode/image-filter-all/image-invert-expected.png Binary files differ
diff --git a/third_party/WebKit/Source/bindings/modules/v8/ConditionalFeaturesForModules.cpp b/third_party/WebKit/Source/bindings/modules/v8/ConditionalFeaturesForModules.cpp index d107c76..88325d25 100644 --- a/third_party/WebKit/Source/bindings/modules/v8/ConditionalFeaturesForModules.cpp +++ b/third_party/WebKit/Source/bindings/modules/v8/ConditionalFeaturesForModules.cpp
@@ -56,11 +56,6 @@ isolate, world, v8::Local<v8::Object>(), prototype_object, interface_object); } - if (OriginTrials::webShareEnabled(execution_context)) { - V8NavigatorPartial::installWebShare(isolate, world, - v8::Local<v8::Object>(), - prototype_object, interface_object); - } if (OriginTrials::webVREnabled(execution_context)) { V8NavigatorPartial::installWebVR(isolate, world, v8::Local<v8::Object>(), prototype_object, interface_object); @@ -168,16 +163,6 @@ } return; } - if (feature == "WebShare") { - if (context_data->GetExistingConstructorAndPrototypeForType( - &V8Navigator::wrapperTypeInfo, &prototype_object, - &interface_object)) { - V8NavigatorPartial::installWebShare(isolate, world, - v8::Local<v8::Object>(), - prototype_object, interface_object); - } - return; - } if (feature == "WebVR1.1") { global_instance_object = script_state->GetContext()->Global(); V8WindowPartial::installGamepadExtensions(
diff --git a/third_party/WebKit/Source/core/BUILD.gn b/third_party/WebKit/Source/core/BUILD.gn index 6d459f87..081495f 100644 --- a/third_party/WebKit/Source/core/BUILD.gn +++ b/third_party/WebKit/Source/core/BUILD.gn
@@ -1274,6 +1274,7 @@ "exported/FakeWebPlugin.cpp", "exported/FakeWebPlugin.h", "exported/WebAssociatedURLLoaderImplTest.cpp", + "exported/WebDocumentSubresourceFilterTest.cpp", "exported/WebDocumentTest.cpp", "exported/WebDragDataTest.cpp", "exported/WebElementTest.cpp",
diff --git a/third_party/WebKit/Source/core/animation/Animation.cpp b/third_party/WebKit/Source/core/animation/Animation.cpp index c404e327..483107e 100644 --- a/third_party/WebKit/Source/core/animation/Animation.cpp +++ b/third_party/WebKit/Source/core/animation/Animation.cpp
@@ -30,10 +30,10 @@ #include "core/animation/Animation.h" +#include "core/animation/AnimationTimeline.h" #include "core/animation/CompositorPendingAnimations.h" #include "core/animation/DocumentTimeline.h" #include "core/animation/KeyframeEffectReadOnly.h" -#include "core/animation/SuperAnimationTimeline.h" #include "core/animation/css/CSSAnimations.h" #include "core/dom/DOMNodeIds.h" #include "core/dom/Document.h" @@ -68,7 +68,7 @@ } Animation* Animation::Create(AnimationEffectReadOnly* effect, - SuperAnimationTimeline* timeline) { + AnimationTimeline* timeline) { if (!timeline || !timeline->IsDocumentTimeline()) { // FIXME: Support creating animations without a timeline. NOTREACHED(); @@ -99,7 +99,7 @@ Animation* Animation::Create(ExecutionContext* execution_context, AnimationEffectReadOnly* effect, - SuperAnimationTimeline* timeline, + AnimationTimeline* timeline, ExceptionState& exception_state) { DCHECK(RuntimeEnabledFeatures::WebAnimationsAPIEnabled());
diff --git a/third_party/WebKit/Source/core/animation/Animation.h b/third_party/WebKit/Source/core/animation/Animation.h index 9190f5e..e072eca 100644 --- a/third_party/WebKit/Source/core/animation/Animation.h +++ b/third_party/WebKit/Source/core/animation/Animation.h
@@ -75,7 +75,7 @@ kFinished }; - static Animation* Create(AnimationEffectReadOnly*, SuperAnimationTimeline*); + static Animation* Create(AnimationEffectReadOnly*, AnimationTimeline*); // Web Animations API IDL constructors. static Animation* Create(ExecutionContext*, @@ -83,7 +83,7 @@ ExceptionState&); static Animation* Create(ExecutionContext*, AnimationEffectReadOnly*, - SuperAnimationTimeline*, + AnimationTimeline*, ExceptionState&); ~Animation(); @@ -139,8 +139,8 @@ double playbackRate() const; void setPlaybackRate(double); - SuperAnimationTimeline* timeline() { - return static_cast<SuperAnimationTimeline*>(timeline_); + AnimationTimeline* timeline() { + return static_cast<AnimationTimeline*>(timeline_); } const DocumentTimeline* TimelineInternal() const { return timeline_; } DocumentTimeline* TimelineInternal() { return timeline_; }
diff --git a/third_party/WebKit/Source/core/animation/AnimationTimeline.h b/third_party/WebKit/Source/core/animation/AnimationTimeline.h new file mode 100644 index 0000000..dce4b860 --- /dev/null +++ b/third_party/WebKit/Source/core/animation/AnimationTimeline.h
@@ -0,0 +1,30 @@ +// 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 AnimationTimeline_h +#define AnimationTimeline_h + +#include "core/CoreExport.h" +#include "platform/bindings/ScriptWrappable.h" + +namespace blink { + +class CORE_EXPORT AnimationTimeline + : public GarbageCollectedFinalized<AnimationTimeline>, + public ScriptWrappable { + DEFINE_WRAPPERTYPEINFO(); + + public: + virtual ~AnimationTimeline() {} + + virtual double currentTime(bool&) = 0; + + virtual bool IsDocumentTimeline() const { return false; } + + DEFINE_INLINE_VIRTUAL_TRACE() {} +}; + +} // namespace blink + +#endif
diff --git a/third_party/WebKit/Source/core/animation/AnimationTimeline.idl b/third_party/WebKit/Source/core/animation/AnimationTimeline.idl index f10a5573..dd32f96f 100644 --- a/third_party/WebKit/Source/core/animation/AnimationTimeline.idl +++ b/third_party/WebKit/Source/core/animation/AnimationTimeline.idl
@@ -5,8 +5,7 @@ // https://w3c.github.io/web-animations/#the-animationtimeline-interface [ - RuntimeEnabled=WebAnimationsAPI, - ImplementedAs=SuperAnimationTimeline + RuntimeEnabled=WebAnimationsAPI ] interface AnimationTimeline { readonly attribute double? currentTime; };
diff --git a/third_party/WebKit/Source/core/animation/BUILD.gn b/third_party/WebKit/Source/core/animation/BUILD.gn index ff1442e8..ae2783d 100644 --- a/third_party/WebKit/Source/core/animation/BUILD.gn +++ b/third_party/WebKit/Source/core/animation/BUILD.gn
@@ -20,6 +20,7 @@ "AnimationEffectTimingReadOnly.h", "AnimationInputHelpers.cpp", "AnimationInputHelpers.h", + "AnimationTimeline.h", "BasicShapeInterpolationFunctions.cpp", "BasicShapeInterpolationFunctions.h", "BasicShapePropertyFunctions.h", @@ -214,7 +215,6 @@ "SizeListPropertyFunctions.h", "StringKeyframe.cpp", "StringKeyframe.h", - "SuperAnimationTimeline.h", "Timing.cpp", "Timing.h", "TimingCalculations.h",
diff --git a/third_party/WebKit/Source/core/animation/DocumentTimeline.cpp b/third_party/WebKit/Source/core/animation/DocumentTimeline.cpp index d9af1ad..85856e1 100644 --- a/third_party/WebKit/Source/core/animation/DocumentTimeline.cpp +++ b/third_party/WebKit/Source/core/animation/DocumentTimeline.cpp
@@ -299,7 +299,7 @@ visitor->Trace(timing_); visitor->Trace(animations_needing_update_); visitor->Trace(animations_); - SuperAnimationTimeline::Trace(visitor); + AnimationTimeline::Trace(visitor); } } // namespace blink
diff --git a/third_party/WebKit/Source/core/animation/DocumentTimeline.h b/third_party/WebKit/Source/core/animation/DocumentTimeline.h index 089ce86f..59f41e3 100644 --- a/third_party/WebKit/Source/core/animation/DocumentTimeline.h +++ b/third_party/WebKit/Source/core/animation/DocumentTimeline.h
@@ -34,8 +34,8 @@ #include <memory> #include "core/CoreExport.h" #include "core/animation/AnimationEffectReadOnly.h" +#include "core/animation/AnimationTimeline.h" #include "core/animation/EffectModel.h" -#include "core/animation/SuperAnimationTimeline.h" #include "core/dom/Element.h" #include "core/dom/TaskRunnerHelper.h" #include "platform/Timer.h" @@ -53,7 +53,7 @@ // DocumentTimeline is constructed and owned by Document, and tied to its // lifecycle. -class CORE_EXPORT DocumentTimeline : public SuperAnimationTimeline { +class CORE_EXPORT DocumentTimeline : public AnimationTimeline { DEFINE_WRAPPERTYPEINFO(); public: @@ -162,7 +162,7 @@ }; DEFINE_TYPE_CASTS(DocumentTimeline, - SuperAnimationTimeline, + AnimationTimeline, timeline, timeline->IsDocumentTimeline(), timeline.IsDocumentTimeline());
diff --git a/third_party/WebKit/Source/core/animation/SuperAnimationTimeline.h b/third_party/WebKit/Source/core/animation/SuperAnimationTimeline.h deleted file mode 100644 index 9295883..0000000 --- a/third_party/WebKit/Source/core/animation/SuperAnimationTimeline.h +++ /dev/null
@@ -1,26 +0,0 @@ -#ifndef SuperAnimationTimeline_h -#define SuperAnimationTimeline_h - -#include "core/CoreExport.h" -#include "platform/bindings/ScriptWrappable.h" - -namespace blink { - -class CORE_EXPORT SuperAnimationTimeline - : public GarbageCollectedFinalized<SuperAnimationTimeline>, - public ScriptWrappable { - DEFINE_WRAPPERTYPEINFO(); - - public: - virtual ~SuperAnimationTimeline() {} - - virtual double currentTime(bool&) = 0; - - virtual bool IsDocumentTimeline() const { return false; } - - DEFINE_INLINE_VIRTUAL_TRACE() {} -}; - -} // namespace blink - -#endif
diff --git a/third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp b/third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp index 876e697..1adcd09 100644 --- a/third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp +++ b/third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp
@@ -80,7 +80,7 @@ Vector<String> removed_selectors; CopyToVector(added_selectors_, added_selectors); CopyToVector(removed_selectors_, removed_selectors); - GetSupplementable()->GetFrame()->Loader().Client()->SelectorMatchChanged( + GetSupplementable()->GetFrame()->Client()->SelectorMatchChanged( added_selectors, removed_selectors); } added_selectors_.clear();
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp index 49fc092..5b8dff27 100644 --- a/third_party/WebKit/Source/core/dom/Document.cpp +++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -2381,6 +2381,7 @@ if (run_post_layout_tasks == kRunPostLayoutTasksSynchronously && View()) View()->FlushAnyPendingPostLayoutTasks(); + ++force_layout_count_; } PassRefPtr<ComputedStyle> Document::StyleForElementIgnoringPendingStylesheets( @@ -2575,6 +2576,8 @@ lifecycle_.AdvanceTo(DocumentLifecycle::kStopping); View()->Dispose(); + // TODO(crbug.com/729196): Trace why LocalFrameView::DetachFromLayout crashes. + CHECK(!View()->IsAttached()); // If the EmbeddedContentView of the document's frame owner doesn't match // view() then LocalFrameView::Dispose() didn't clear the owner's @@ -2635,6 +2638,8 @@ layout_view_ = nullptr; ContainerNode::DetachLayoutTree(); + // TODO(crbug.com/729196): Trace why LocalFrameView::DetachFromLayout crashes. + CHECK(!View()->IsAttached()); if (this != &AxObjectCacheOwner()) { if (AXObjectCache* cache = ExistingAXObjectCache()) { @@ -2678,6 +2683,8 @@ media_query_matcher_->DocumentDetached(); lifecycle_.AdvanceTo(DocumentLifecycle::kStopped); + // TODO(crbug.com/729196): Trace why LocalFrameView::DetachFromLayout crashes. + CHECK(!View()->IsAttached()); // TODO(haraken): Call contextDestroyed() before we start any disruptive // operations. @@ -2688,6 +2695,8 @@ // a contextDestroyed() notification. This can happen for a document // created by DOMImplementation::createDocument(). ExecutionContext::NotifyContextDestroyed(); + // TODO(crbug.com/729196): Trace why LocalFrameView::DetachFromLayout crashes. + CHECK(!View()->IsAttached()); // This is required, as our LocalFrame might delete itself as soon as it // detaches us. However, this violates Node::detachLayoutTree() semantics, as
diff --git a/third_party/WebKit/Source/core/dom/Document.h b/third_party/WebKit/Source/core/dom/Document.h index 731c536..31b2524a 100644 --- a/third_party/WebKit/Source/core/dom/Document.h +++ b/third_party/WebKit/Source/core/dom/Document.h
@@ -967,6 +967,7 @@ uint64_t DomTreeVersion() const { return dom_tree_version_; } uint64_t StyleVersion() const { return style_version_; } + unsigned ForceLayoutCountForTesting() const { return force_layout_count_; } enum PendingSheetLayout { kNoLayoutWithPendingSheets, @@ -1511,6 +1512,7 @@ static uint64_t global_tree_version_; uint64_t style_version_; + unsigned force_layout_count_ = 0; HeapHashSet<WeakMember<NodeIterator>> node_iterators_; using AttachedRangeSet = HeapHashSet<WeakMember<Range>>;
diff --git a/third_party/WebKit/Source/core/dom/UserGestureIndicator.cpp b/third_party/WebKit/Source/core/dom/UserGestureIndicator.cpp index ecc68680..f21e98df 100644 --- a/third_party/WebKit/Source/core/dom/UserGestureIndicator.cpp +++ b/third_party/WebKit/Source/core/dom/UserGestureIndicator.cpp
@@ -18,8 +18,7 @@ bool had_gesture = document->GetFrame()->HasReceivedUserGesture(); if (!had_gesture) document->GetFrame()->SetDocumentHasReceivedUserGesture(); - document->GetFrame()->Loader().Client()->SetHasReceivedUserGesture( - had_gesture); + document->GetFrame()->Client()->SetHasReceivedUserGesture(had_gesture); } }
diff --git a/third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp b/third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp index 114e2f1..4db7fd6 100644 --- a/third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp +++ b/third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp
@@ -135,8 +135,8 @@ EXPECT_EQ(table, TableElementJustBefore( VisiblePositionInFlatTree::AfterNode(*table))); - EXPECT_EQ(table, - TableElementJustBefore(VisiblePosition::LastPositionInNode(table))); + EXPECT_EQ(table, TableElementJustBefore( + VisiblePosition::LastPositionInNode(*table))); EXPECT_EQ(table, TableElementJustBefore(CreateVisiblePosition( PositionInFlatTree::LastPositionInNode(*table)))); @@ -150,7 +150,7 @@ VisiblePositionInFlatTree::AfterNode(*host))); EXPECT_EQ(nullptr, - TableElementJustBefore(VisiblePosition::LastPositionInNode(host))); + TableElementJustBefore(VisiblePosition::LastPositionInNode(*host))); EXPECT_EQ(table, TableElementJustBefore(CreateVisiblePosition( PositionInFlatTree::LastPositionInNode(*host)))); }
diff --git a/third_party/WebKit/Source/core/editing/SelectionController.cpp b/third_party/WebKit/Source/core/editing/SelectionController.cpp index 3a87870..d8383c49 100644 --- a/third_party/WebKit/Source/core/editing/SelectionController.cpp +++ b/third_party/WebKit/Source/core/editing/SelectionController.cpp
@@ -521,7 +521,7 @@ if (new_selection.RootEditableElement() && pos.DeepEquivalent() == VisiblePositionInFlatTree::LastPositionInNode( - new_selection.RootEditableElement()) + *new_selection.RootEditableElement()) .DeepEquivalent()) return false;
diff --git a/third_party/WebKit/Source/core/editing/SurroundingText.cpp b/third_party/WebKit/Source/core/editing/SurroundingText.cpp index 2a5311a8..a4db50ce 100644 --- a/third_party/WebKit/Source/core/editing/SurroundingText.cpp +++ b/third_party/WebKit/Source/core/editing/SurroundingText.cpp
@@ -76,9 +76,18 @@ end_position, Position::LastPositionInNode(*root_element).ParentAnchoredEquivalent(), TextIteratorBehavior::Builder().SetStopsOnFormControls(true).Build()); + // FIXME: why do we stop going trough the text if we were not able to select + // something on the right? if (!forward_iterator.AtEnd()) forward_iterator.Advance(max_length - half_max_length); + EphemeralRange forward_range = forward_iterator.Range(); + if (forward_range.IsNull() || + !Range::Create(*document, end_position, forward_range.StartPosition()) + ->GetText() + .length()) + return; + // Same as with the forward range but with the backward range. The range // starts at the document's or input element's start and ends at the selection // start and will be updated. @@ -96,7 +105,7 @@ end_offset_in_content_ = TextIterator::RangeLength( backwards_iterator.EndPosition(), end_position, behavior); content_range_ = Range::Create(*document, backwards_iterator.EndPosition(), - forward_iterator.StartPosition()); + forward_range.StartPosition()); DCHECK(content_range_); }
diff --git a/third_party/WebKit/Source/core/editing/SurroundingTextTest.cpp b/third_party/WebKit/Source/core/editing/SurroundingTextTest.cpp index f6d724f..2fe38bf 100644 --- a/third_party/WebKit/Source/core/editing/SurroundingTextTest.cpp +++ b/third_party/WebKit/Source/core/editing/SurroundingTextTest.cpp
@@ -80,12 +80,14 @@ } { + // FIXME: if the selection is at the end of the text, SurroundingText + // will return nothing. VisibleSelection selection = Select(7); SurroundingText surrounding_text(selection.Start(), 42); - EXPECT_EQ("foo bar", surrounding_text.Content().SimplifyWhiteSpace()); - EXPECT_EQ(8u, surrounding_text.StartOffsetInContent()); - EXPECT_EQ(8u, surrounding_text.EndOffsetInContent()); + EXPECT_EQ(0u, surrounding_text.Content().length()); + EXPECT_EQ(0u, surrounding_text.StartOffsetInContent()); + EXPECT_EQ(0u, surrounding_text.EndOffsetInContent()); } { @@ -161,17 +163,6 @@ EXPECT_EQ(7u, surrounding_text.StartOffsetInContent()); EXPECT_EQ(12u, surrounding_text.EndOffsetInContent()); } - - { - // Last word. - VisibleSelection selection = Select(22, 26); - SurroundingText surrounding_text( - *CreateRange(FirstEphemeralRangeOf(selection)), 8); - - EXPECT_EQ("sit amet", surrounding_text.Content()); - EXPECT_EQ(4u, surrounding_text.StartOffsetInContent()); - EXPECT_EQ(8u, surrounding_text.EndOffsetInContent()); - } } TEST_F(SurroundingTextTest, TreeCaretSelection) {
diff --git a/third_party/WebKit/Source/core/editing/VisiblePosition.cpp b/third_party/WebKit/Source/core/editing/VisiblePosition.cpp index 69a691b..6344913 100644 --- a/third_party/WebKit/Source/core/editing/VisiblePosition.cpp +++ b/third_party/WebKit/Source/core/editing/VisiblePosition.cpp
@@ -137,9 +137,9 @@ template <typename Strategy> VisiblePositionTemplate<Strategy> -VisiblePositionTemplate<Strategy>::LastPositionInNode(Node* node) { +VisiblePositionTemplate<Strategy>::LastPositionInNode(const Node& node) { return Create(PositionWithAffinityTemplate<Strategy>( - PositionTemplate<Strategy>::LastPositionInNode(*node))); + PositionTemplate<Strategy>::LastPositionInNode(node))); } VisiblePosition CreateVisiblePosition(const Position& position,
diff --git a/third_party/WebKit/Source/core/editing/VisiblePosition.h b/third_party/WebKit/Source/core/editing/VisiblePosition.h index 0e0f39b2..20c95aa2 100644 --- a/third_party/WebKit/Source/core/editing/VisiblePosition.h +++ b/third_party/WebKit/Source/core/editing/VisiblePosition.h
@@ -109,7 +109,7 @@ static VisiblePositionTemplate<Strategy> FirstPositionInNode(const Node&); static VisiblePositionTemplate<Strategy> InParentAfterNode(const Node&); static VisiblePositionTemplate<Strategy> InParentBeforeNode(const Node&); - static VisiblePositionTemplate<Strategy> LastPositionInNode(Node*); + static VisiblePositionTemplate<Strategy> LastPositionInNode(const Node&); DECLARE_TRACE();
diff --git a/third_party/WebKit/Source/core/editing/VisibleUnits.cpp b/third_party/WebKit/Source/core/editing/VisibleUnits.cpp index 83086eedf..d273e19e 100644 --- a/third_party/WebKit/Source/core/editing/VisibleUnits.cpp +++ b/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
@@ -561,7 +561,7 @@ position.ComputeContainerNode() ? EnclosingBlock(position.ComputeContainerNode(), rule) : 0; - return end_block ? VisiblePosition::LastPositionInNode(end_block) + return end_block ? VisiblePosition::LastPositionInNode(*end_block) : VisiblePosition(); } @@ -653,7 +653,7 @@ if (!highest_root) return VisiblePosition(); - return VisiblePosition::LastPositionInNode(highest_root); + return VisiblePosition::LastPositionInNode(*highest_root); } bool IsEndOfEditableOrNonEditableContent(const VisiblePosition& position) {
diff --git a/third_party/WebKit/Source/core/editing/VisibleUnitsLine.cpp b/third_party/WebKit/Source/core/editing/VisibleUnitsLine.cpp index 8c4ce9c8..9ed1faa 100644 --- a/third_party/WebKit/Source/core/editing/VisibleUnitsLine.cpp +++ b/third_party/WebKit/Source/core/editing/VisibleUnitsLine.cpp
@@ -750,7 +750,7 @@ : node->GetDocument().documentElement(); if (!root_element) return VisiblePosition(); - return VisiblePosition::LastPositionInNode(root_element); + return VisiblePosition::LastPositionInNode(*root_element); } } // namespace blink
diff --git a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp index ebc743c..87df2d6 100644 --- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp +++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
@@ -1801,7 +1801,7 @@ VisiblePosition first_in_anchor = VisiblePosition::FirstPositionInNode(*enclosing_anchor); VisiblePosition last_in_anchor = - VisiblePosition::LastPositionInNode(enclosing_anchor); + VisiblePosition::LastPositionInNode(*enclosing_anchor); // If visually just after the anchor, insert *inside* the anchor unless it's // the last VisiblePosition in the document, to match NSTextView. if (visible_pos.DeepEquivalent() == last_in_anchor.DeepEquivalent()) {
diff --git a/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp b/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp index 55616970..48a1ae2 100644 --- a/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp +++ b/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
@@ -50,7 +50,7 @@ DCHECK(cell); DCHECK(IsTableCell(cell)) << cell; return VisiblePosition::FirstPositionInNode(*cell).DeepEquivalent() == - VisiblePosition::LastPositionInNode(cell).DeepEquivalent(); + VisiblePosition::LastPositionInNode(*cell).DeepEquivalent(); } static bool IsTableRowEmpty(Node* row) { @@ -520,7 +520,7 @@ } if (node == end_block_) { VisiblePosition next = - NextPositionOf(VisiblePosition::LastPositionInNode(end_block_.Get())); + NextPositionOf(VisiblePosition::LastPositionInNode(*end_block_.Get())); if (next.IsNotNull() && !IsStartOfBlock(next)) need_placeholder_ = true; }
diff --git a/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp b/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp index dda0386..5f3d1d5 100644 --- a/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp +++ b/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp
@@ -236,7 +236,7 @@ ? position_in_enclosing_block : StartOfBlock(position_in_enclosing_block); VisiblePosition last_position_in_enclosing_block = - VisiblePosition::LastPositionInNode(enclosing_element); + VisiblePosition::LastPositionInNode(*enclosing_element); VisiblePosition end_of_enclosing_block = EndOfBlock(last_position_in_enclosing_block); if (visible_start_of_paragraph.DeepEquivalent() ==
diff --git a/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp b/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp index 5d6f8c8..a21f8c6 100644 --- a/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp +++ b/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
@@ -395,7 +395,7 @@ MoveParagraphWithClones( VisiblePosition::FirstPositionInNode(*list_element), - VisiblePosition::LastPositionInNode(list_element), new_list, + VisiblePosition::LastPositionInNode(*list_element), new_list, outer_block, editing_state); if (editing_state->IsAborted()) return false; @@ -461,7 +461,7 @@ DCHECK(list_child_node); if (isHTMLLIElement(*list_child_node)) { start = VisiblePosition::FirstPositionInNode(*list_child_node); - end = VisiblePosition::LastPositionInNode(list_child_node); + end = VisiblePosition::LastPositionInNode(*list_child_node); next_list_child = list_child_node->nextSibling(); previous_list_child = list_child_node->previousSibling(); } else {
diff --git a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp index a28357e8..aa32140 100644 --- a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp +++ b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
@@ -633,9 +633,9 @@ VisiblePosition::FirstPositionInNode(*element->parentNode()) .DeepEquivalent() == VisiblePosition::FirstPositionInNode(*element).DeepEquivalent() && - VisiblePosition::LastPositionInNode(element->parentNode()) + VisiblePosition::LastPositionInNode(*element->parentNode()) .DeepEquivalent() == - VisiblePosition::LastPositionInNode(element).DeepEquivalent()) { + VisiblePosition::LastPositionInNode(*element).DeepEquivalent()) { inserted_nodes.WillRemoveNodePreservingChildren(*element); RemoveNodePreservingChildren(element, editing_state); if (editing_state->IsAborted()) @@ -735,7 +735,7 @@ VisiblePosition position_at_end_of_node = CreateVisiblePosition(LastPositionInOrAfterNode(element)); VisiblePosition last_position_in_paragraph = - VisiblePosition::LastPositionInNode(ancestor); + VisiblePosition::LastPositionInNode(*ancestor); if (position_at_end_of_node.DeepEquivalent() == last_position_in_paragraph.DeepEquivalent()) { RemoveNode(element, editing_state);
diff --git a/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp index 46e23a95..b1eb43c4 100644 --- a/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp +++ b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
@@ -901,7 +901,7 @@ EnclosingNodeOfType(visible_end.DeepEquivalent(), &IsTableCell); if (enclosing_table_cell && visible_end.DeepEquivalent() == - VisiblePosition::LastPositionInNode(enclosing_table_cell) + VisiblePosition::LastPositionInNode(*enclosing_table_cell) .DeepEquivalent()) return; if (visible_end.DeepEquivalent() ==
diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp index a9309fa..7b35780 100644 --- a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp +++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
@@ -367,16 +367,35 @@ DocumentMarker::MarkerTypes marker_types) { if (!PossiblyHasMarkers(marker_types)) return nullptr; + Node* const node = position.ComputeContainerNode(); + MarkerLists* const markers = markers_.at(node); + if (!markers) + return nullptr; + const unsigned offset = static_cast<unsigned>(position.ComputeOffsetInContainerNode()); - const auto& markers = MarkersFor(node, marker_types); - const auto& it = - std::find_if(markers.begin(), markers.end(), [=](DocumentMarker* marker) { - return marker->StartOffset() < offset && offset < marker->EndOffset(); - }); - return it == markers.end() ? nullptr : *it; + // This position can't be in the interior of a marker if it occurs at an + // endpoint of the node + if (offset == 0 || + offset == static_cast<unsigned>(node->MaxCharacterOffset())) + return nullptr; + + // Query each of the DocumentMarkerLists until we find a marker at the + // specified position (or have gone through all the MarkerTypes) + for (DocumentMarker::MarkerType type : marker_types) { + const DocumentMarkerList* const list = ListForType(markers, type); + if (!list) + continue; + + const HeapVector<Member<DocumentMarker>>& results = + list->MarkersIntersectingRange(offset, offset); + if (!results.IsEmpty()) + return results.front(); + } + + return nullptr; } DocumentMarkerVector DocumentMarkerController::MarkersFor(
diff --git a/third_party/WebKit/Source/web/tests/WebDocumentSubresourceFilterTest.cpp b/third_party/WebKit/Source/core/exported/WebDocumentSubresourceFilterTest.cpp similarity index 100% rename from third_party/WebKit/Source/web/tests/WebDocumentSubresourceFilterTest.cpp rename to third_party/WebKit/Source/core/exported/WebDocumentSubresourceFilterTest.cpp
diff --git a/third_party/WebKit/Source/core/frame/History.cpp b/third_party/WebKit/Source/core/frame/History.cpp index 414ee50..30ebcc03 100644 --- a/third_party/WebKit/Source/core/frame/History.cpp +++ b/third_party/WebKit/Source/core/frame/History.cpp
@@ -64,9 +64,9 @@ } unsigned History::length() const { - if (!GetFrame() || !GetFrame()->Loader().Client()) + if (!GetFrame() || !GetFrame()->Client()) return 0; - return GetFrame()->Loader().Client()->BackForwardLength(); + return GetFrame()->Client()->BackForwardLength(); } SerializedScriptValue* History::state() { @@ -88,7 +88,7 @@ void History::setScrollRestoration(const String& value) { DCHECK(value == "manual" || value == "auto"); - if (!GetFrame() || !GetFrame()->Loader().Client()) + if (!GetFrame() || !GetFrame()->Client()) return; HistoryScrollRestorationType scroll_restoration = @@ -99,7 +99,7 @@ if (HistoryItem* history_item = GetFrame()->Loader().GetDocumentLoader()->GetHistoryItem()) { history_item->SetScrollRestorationType(scroll_restoration); - GetFrame()->Loader().Client()->DidUpdateCurrentHistoryItem(); + GetFrame()->Client()->DidUpdateCurrentHistoryItem(); } } @@ -133,7 +133,7 @@ } void History::go(ScriptState* script_state, int delta) { - if (!GetFrame() || !GetFrame()->Loader().Client()) + if (!GetFrame() || !GetFrame()->Client()) return; DCHECK(IsMainThread()); @@ -149,7 +149,7 @@ } if (delta) { - GetFrame()->Loader().Client()->NavigateBackForward(delta); + GetFrame()->Client()->NavigateBackForward(delta); } else { // We intentionally call reload() for the current frame if delta is zero. // Otherwise, navigation happens on the root frame.
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp index 25b68e2..c39f3a0 100644 --- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp +++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
@@ -171,8 +171,8 @@ bool added_listener, LocalFrameClient::SuddenTerminationDisablerType disabler_type) { Platform::Current()->SuddenTerminationChanged(!added_listener); - if (dom_window->GetFrame() && dom_window->GetFrame()->Loader().Client()) - dom_window->GetFrame()->Loader().Client()->SuddenTerminationDisablerChanged( + if (dom_window->GetFrame() && dom_window->GetFrame()->Client()) + dom_window->GetFrame()->Client()->SuddenTerminationDisablerChanged( added_listener, disabler_type); } @@ -1118,8 +1118,8 @@ return; GetFrame()->Tree().SetName(name); - DCHECK(GetFrame()->Loader().Client()); - GetFrame()->Loader().Client()->DidChangeName(name); + DCHECK(GetFrame()->Client()); + GetFrame()->Client()->DidChangeName(name); } void LocalDOMWindow::setStatus(const String& string) {
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp index 46f5a7d..c2975ee 100644 --- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp +++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -299,6 +299,16 @@ loader_.StopAllLoaders(); loader_.Detach(); GetDocument()->Shutdown(); + // TODO(crbug.com/729196): Trace why LocalFrameView::DetachFromLayout crashes. + // It seems to crash because Frame is detached before LocalFrameView. + // Verify here that any LocalFrameView has been detached by now. + if (view_ && view_->IsAttached()) { + CHECK(DeprecatedLocalOwner()); + CHECK(DeprecatedLocalOwner()->OwnedEmbeddedContentView()); + CHECK_EQ(view_, DeprecatedLocalOwner()->OwnedEmbeddedContentView()); + } + CHECK(!view_ || !view_->IsAttached()); + // This is the earliest that scripting can be disabled: // - FrameLoader::Detach() can fire XHR abort events // - Document::Shutdown() can dispose plugins which can run script. @@ -306,21 +316,15 @@ if (!Client()) return; + // TODO(crbug.com/729196): Trace why LocalFrameView::DetachFromLayout crashes. + CHECK(!view_->IsAttached()); Client()->WillBeDetached(); // Notify ScriptController that the frame is closing, since its cleanup ends // up calling back to LocalFrameClient via WindowProxy. GetScriptController().ClearForClose(); // TODO(crbug.com/729196): Trace why LocalFrameView::DetachFromLayout crashes. - // It seems to crash because Frame is detached before LocalFrameView. - // Verify here that any LocalFrameView has been detached by now. - if (view_->IsAttached()) { - CHECK(DeprecatedLocalOwner()); - CHECK(DeprecatedLocalOwner()->OwnedEmbeddedContentView()); - CHECK_EQ(view_, DeprecatedLocalOwner()->OwnedEmbeddedContentView()); - } CHECK(!view_->IsAttached()); - SetView(nullptr); page_->GetEventHandlerRegistry().DidRemoveAllEventHandlers(*DomWindow());
diff --git a/third_party/WebKit/Source/core/frame/LocalFrameView.cpp b/third_party/WebKit/Source/core/frame/LocalFrameView.cpp index a816e48d..4ace0cb 100644 --- a/third_party/WebKit/Source/core/frame/LocalFrameView.cpp +++ b/third_party/WebKit/Source/core/frame/LocalFrameView.cpp
@@ -3907,7 +3907,10 @@ } void LocalFrameView::AttachToLayout() { + // TODO(crbug.com/729196): Trace why LocalFrameView::DetachFromLayout crashes. CHECK(!is_attached_); + if (frame_->GetDocument()) + CHECK_NE(Lifecycle().GetState(), DocumentLifecycle::kStopping); is_attached_ = true; parent_ = ParentFrameView(); if (!parent_) { @@ -4201,7 +4204,7 @@ } void LocalFrameView::DidChangeScrollOffset() { - GetFrame().Loader().Client()->DidChangeScrollOffset(); + GetFrame().Client()->DidChangeScrollOffset(); if (GetFrame().IsMainFrame()) GetFrame().GetPage()->GetChromeClient().MainFrameScrollOffsetChanged(); }
diff --git a/third_party/WebKit/Source/core/frame/VisualViewport.cpp b/third_party/WebKit/Source/core/frame/VisualViewport.cpp index ae72a44..6548714f 100644 --- a/third_party/WebKit/Source/core/frame/VisualViewport.cpp +++ b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
@@ -114,6 +114,7 @@ if (inner_viewport_container_layer_) { inner_viewport_container_layer_->SetSize(FloatSize(size_)); + inner_viewport_scroll_layer_->PlatformLayer()->SetScrollable(size_); // Need to re-compute sizes for the overlay scrollbars. InitializeScrollbars(); @@ -369,8 +370,7 @@ GetPage().GetSettings().GetMainFrameClipsContent()); inner_viewport_container_layer_->SetSize(FloatSize(size_)); - inner_viewport_scroll_layer_->PlatformLayer()->SetScrollClipLayer( - inner_viewport_container_layer_->PlatformLayer()); + inner_viewport_scroll_layer_->PlatformLayer()->SetScrollable(size_); if (MainFrame()) { if (Document* document = MainFrame()->GetDocument()) { inner_viewport_scroll_layer_->SetElementId(
diff --git a/third_party/WebKit/Source/core/html/HTMLEmbedElement.cpp b/third_party/WebKit/Source/core/html/HTMLEmbedElement.cpp index 1a88683..d21478fb 100644 --- a/third_party/WebKit/Source/core/html/HTMLEmbedElement.cpp +++ b/third_party/WebKit/Source/core/html/HTMLEmbedElement.cpp
@@ -168,7 +168,7 @@ // Overwrites the URL and MIME type of a Flash embed to use an HTML5 embed. KURL overriden_url = - GetDocument().GetFrame()->Loader().Client()->OverrideFlashEmbedWithHTML( + GetDocument().GetFrame()->Client()->OverrideFlashEmbedWithHTML( GetDocument().CompleteURL(url_)); if (!overriden_url.IsEmpty()) { url_ = overriden_url.GetString();
diff --git a/third_party/WebKit/Source/core/html/HTMLFormControlElementWithState.cpp b/third_party/WebKit/Source/core/html/HTMLFormControlElementWithState.cpp index 5aa25f7d..cb1389d 100644 --- a/third_party/WebKit/Source/core/html/HTMLFormControlElementWithState.cpp +++ b/third_party/WebKit/Source/core/html/HTMLFormControlElementWithState.cpp
@@ -65,7 +65,7 @@ // selection before the document is active (or even in a frame). if (!GetDocument().IsActive()) return; - GetDocument().GetFrame()->Loader().Client()->DidUpdateCurrentHistoryItem(); + GetDocument().GetFrame()->Client()->DidUpdateCurrentHistoryItem(); } bool HTMLFormControlElementWithState::ShouldSaveAndRestoreFormControlState()
diff --git a/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp b/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp index d31992b..c5bcbe9 100644 --- a/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp +++ b/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp
@@ -149,7 +149,7 @@ // Don't notify about updates if ContentFrame() is null, for example when // the subframe hasn't been created yet. if (ContentFrame()) { - GetDocument().GetFrame()->Loader().Client()->DidChangeFramePolicy( + GetDocument().GetFrame()->Client()->DidChangeFramePolicy( ContentFrame(), sandbox_flags_, container_policy_); } } @@ -170,7 +170,7 @@ // Don't notify about updates if ContentFrame() is null, for example when // the subframe hasn't been created yet. if (ContentFrame()) { - GetDocument().GetFrame()->Loader().Client()->DidChangeFramePolicy( + GetDocument().GetFrame()->Client()->DidChangeFramePolicy( ContentFrame(), sandbox_flags_, container_policy_); } } @@ -179,8 +179,7 @@ // Don't notify about updates if ContentFrame() is null, for example when // the subframe hasn't been created yet. if (ContentFrame()) { - GetDocument().GetFrame()->Loader().Client()->DidChangeFrameOwnerProperties( - this); + GetDocument().GetFrame()->Client()->DidChangeFrameOwnerProperties(this); } }
diff --git a/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp b/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp index 0b1bc9b1..31bc4f73 100644 --- a/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp +++ b/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
@@ -44,7 +44,6 @@ #include "core/dom/NodeComputedStyle.h" #include "core/dom/NodeListsNodeData.h" #include "core/dom/NodeTraversal.h" -#include "core/dom/TaskRunnerHelper.h" #include "core/events/GestureEvent.h" #include "core/events/KeyboardEvent.h" #include "core/events/MouseEvent.h" @@ -70,6 +69,7 @@ #include "core/page/ChromeClient.h" #include "core/page/Page.h" #include "core/page/SpatialNavigation.h" +#include "core/paint/PaintLayerScrollableArea.h" #include "platform/instrumentation/tracing/TraceEvent.h" #include "platform/text/PlatformLocale.h" @@ -891,30 +891,43 @@ return; if (UsesMenuList()) return; - bool has_pending_task = option_to_scroll_to_; - // We'd like to keep an HTMLOptionElement reference rather than the index of - // the option because the task should work even if unselected option is - // inserted before executing scrollToOptionTask(). + if (GetLayoutObject()) { + if (GetDocument().Lifecycle().GetState() >= + DocumentLifecycle::kLayoutClean) { + ToLayoutListBox(GetLayoutObject())->ScrollToRect(option->BoundingBox()); + return; + } + // Make sure the LayoutObject will be laid out. + GetLayoutObject()->SetNeedsLayout( + LayoutInvalidationReason::kMenuOptionsChanged); + } option_to_scroll_to_ = option; - if (!has_pending_task) - TaskRunnerHelper::Get(TaskType::kUserInteraction, &GetDocument()) - ->PostTask(BLINK_FROM_HERE, - WTF::Bind(&HTMLSelectElement::ScrollToOptionTask, - WrapPersistent(this))); + // ScrollToOptionAfterLayout() should be called if this element is rendered. } -void HTMLSelectElement::ScrollToOptionTask() { +void HTMLSelectElement::ScrollToOptionAfterLayout( + PaintLayerScrollableArea& scrollable_area) { HTMLOptionElement* option = option_to_scroll_to_.Release(); - if (!option || !isConnected()) + if (!option || UsesMenuList()) return; - // optionRemoved() makes sure m_optionToScrollTo doesn't have an option with - // another owner. - DCHECK_EQ(option->OwnerSelectElement(), this); - GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets(); - if (!GetLayoutObject() || !GetLayoutObject()->IsListBox()) + LayoutBox* option_box = option->GetLayoutBox(); + if (!option_box) return; - LayoutRect bounds = option->BoundingBox(); - ToLayoutListBox(GetLayoutObject())->ScrollToRect(bounds); + + // We can't use PaintLayerScrollableArea::ScrollIntoView(), which needs + // absolute coordinate. We are unable to compute absolute positions because + // ancestors' layout aren't fixed yet. + LayoutObject* container = option_box->Container(); + LayoutSize option_offset = option_box->OffsetFromContainer(container); + for (; container && container != GetLayoutObject(); + container = container->Container()) + option_offset += container->OffsetFromContainer(container->Container()); + if (!container) + return; + scrollable_area.ScrollLocalRectIntoView( + LayoutRect(LayoutPoint() + option_offset, option_box->Size()), + ScrollAlignment::kAlignToEdgeIfNeeded, + ScrollAlignment::kAlignToEdgeIfNeeded, false); } void HTMLSelectElement::OptionSelectionStateChanged(HTMLOptionElement* option,
diff --git a/third_party/WebKit/Source/core/html/HTMLSelectElement.h b/third_party/WebKit/Source/core/html/HTMLSelectElement.h index 8814387..59f94d0e 100644 --- a/third_party/WebKit/Source/core/html/HTMLSelectElement.h +++ b/third_party/WebKit/Source/core/html/HTMLSelectElement.h
@@ -45,6 +45,7 @@ class HTMLOptionElement; class HTMLOptionElementOrHTMLOptGroupElement; class HTMLElementOrLong; +class PaintLayerScrollableArea; class PopupMenu; class CORE_EXPORT HTMLSelectElement final @@ -118,6 +119,7 @@ void ScrollToSelection(); void ScrollToOption(HTMLOptionElement*); + void ScrollToOptionAfterLayout(PaintLayerScrollableArea&); bool CanSelectAll() const; void SelectAll(); @@ -267,7 +269,6 @@ SkipDirection) const; HTMLOptionElement* EventTargetOption(const Event&); AutoscrollController* GetAutoscrollController() const; - void ScrollToOptionTask(); bool AreAuthorShadowsAllowed() const override { return false; } void FinishParsingChildren() override;
diff --git a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp index 977dbc96..de26df74 100644 --- a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp +++ b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -487,7 +487,7 @@ WebLayer* web_layer = toWebLayer(scrollable_area->LayerForScrolling()); WebLayer* container_layer = toWebLayer(scrollable_area->LayerForContainer()); if (web_layer) { - web_layer->SetScrollClipLayer(container_layer); + web_layer->SetScrollable(container_layer->Bounds()); FloatPoint scroll_position(scrollable_area->ScrollOrigin() + scrollable_area->GetScrollOffset()); web_layer->SetScrollPosition(scroll_position);
diff --git a/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp index 5497e341..00e93e8 100644 --- a/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp +++ b/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
@@ -544,7 +544,9 @@ if (object_.ShouldDoFullPaintInvalidation()) return object_.FullPaintInvalidationReason(); - if (context_.old_visual_rect.IsEmpty() && object_.VisualRect().IsEmpty()) + if (!(context_.subtree_flags & + PaintInvalidatorContext::kInvalidateEmptyVisualRect) && + context_.old_visual_rect.IsEmpty() && object_.VisualRect().IsEmpty()) return PaintInvalidationReason::kNone; if (background_obscuration_changed)
diff --git a/third_party/WebKit/Source/core/paint/PaintInvalidationTest.cpp b/third_party/WebKit/Source/core/paint/PaintInvalidationTest.cpp index ec535e0..a3792189 100644 --- a/third_party/WebKit/Source/core/paint/PaintInvalidationTest.cpp +++ b/third_party/WebKit/Source/core/paint/PaintInvalidationTest.cpp
@@ -143,9 +143,10 @@ EXPECT_TRUE(fixed_object.MayNeedPaintInvalidation()); EXPECT_EQ(LayoutRect(0, 0, 120, 130), fixed_object.LayoutOverflowRect()); - // We should not repaint anything because all contents are invisible. GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint(); - EXPECT_FALSE(fixed_layer.NeedsRepaint()); + // Invalidation is still needed for invisible transformed content, because it + // may end up composited (in SPv2 mode) and move on screen. + EXPECT_TRUE(fixed_layer.NeedsRepaint()); GetDocument().View()->UpdateAllLifecyclePhases(); // The following ensures normal paint invalidation still works.
diff --git a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp index e30d569..fcb2592 100644 --- a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp +++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
@@ -444,6 +444,28 @@ } } +void PaintInvalidator::UpdateEmptyVisualRectFlag( + const LayoutObject& object, + PaintInvalidatorContext& context) { + bool is_paint_invalidation_container = + object == context.paint_invalidation_container; + + // Content under transforms needs to invalidate, even if visual + // rects before and after update were the same. This is because + // we don't know whether this transform will end up composited in + // SPv2, so such transforms are painted even if not visible + // due to ancestor clips. This does not apply in SPv1 mode when + // crossing paint invalidation container boundaries. + if (is_paint_invalidation_container) { + // Remove the flag when crossing paint invalidation container boundaries. + context.subtree_flags &= + ~PaintInvalidatorContext::kInvalidateEmptyVisualRect; + } else if (object.StyleRef().HasTransform()) { + context.subtree_flags |= + PaintInvalidatorContext::kInvalidateEmptyVisualRect; + } +} + void PaintInvalidator::InvalidatePaint( const LayoutObject& object, const PaintPropertyTreeBuilderContext* tree_builder_context, @@ -474,6 +496,7 @@ } UpdatePaintInvalidationContainer(object, context); + UpdateEmptyVisualRectFlag(object, context); UpdateVisualRectIfNeeded(object, tree_builder_context, context); if (!object.ShouldCheckForPaintInvalidation() &&
diff --git a/third_party/WebKit/Source/core/paint/PaintInvalidator.h b/third_party/WebKit/Source/core/paint/PaintInvalidator.h index 9464a59..9176c35 100644 --- a/third_party/WebKit/Source/core/paint/PaintInvalidator.h +++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.h
@@ -65,6 +65,10 @@ // don't need any invalidation. They are used as "painting subroutines" // for one or more other locations in SVG. kSubtreeNoInvalidation = 1 << 6, + + // Don't skip invalidating because the previous and current visual + // rects were empty. + kInvalidateEmptyVisualRect = 1 << 7, }; unsigned subtree_flags = 0; @@ -142,6 +146,8 @@ PaintInvalidatorContext&); ALWAYS_INLINE void UpdatePaintInvalidationContainer(const LayoutObject&, PaintInvalidatorContext&); + ALWAYS_INLINE void UpdateEmptyVisualRectFlag(const LayoutObject&, + PaintInvalidatorContext&); ALWAYS_INLINE void UpdateVisualRectIfNeeded( const LayoutObject&, const PaintPropertyTreeBuilderContext*,
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp index caee0d1..287fb345 100644 --- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp +++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
@@ -805,8 +805,6 @@ if (!is_fixed_position_object_in_paged_media) clip_rect_for_fragment.MoveBy(fragment.pagination_offset); clip_rect_for_fragment.Intersect(fragment.background_rect); - if (clip_rect_for_fragment.IsEmpty()) - continue; if (NeedsToClip(painting_info, clip_rect_for_fragment)) { clip_recorder.emplace(context, parent_layer->GetLayoutObject(), DisplayItem::kClipLayerParent, @@ -855,9 +853,7 @@ // Now do a paint with the root layer shifted to be us. PaintLayerPaintingInfo transformed_painting_info( - &paint_layer_, - LayoutRect(EnclosingIntRect( - transform.Inverse().MapRect(painting_info.paint_dirty_rect))), + &paint_layer_, LayoutRect(LayoutRect::InfiniteIntRect()), painting_info.GetGlobalPaintFlags(), new_sub_pixel_accumulation); transformed_painting_info.ancestor_has_clip_path_clipping = painting_info.ancestor_has_clip_path_clipping;
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp index 6f8b3ff9..6f3abea9 100644 --- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp +++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -60,6 +60,7 @@ #include "core/frame/Settings.h" #include "core/frame/VisualViewport.h" #include "core/html/HTMLFrameOwnerElement.h" +#include "core/html/HTMLSelectElement.h" #include "core/input/EventHandler.h" #include "core/layout/LayoutEmbeddedContent.h" #include "core/layout/LayoutFlexibleBox.h" @@ -916,6 +917,10 @@ DisableCompositingQueryAsserts disabler; PositionOverflowControls(); + + Node* node = Box().GetNode(); + if (isHTMLSelectElement(node)) + toHTMLSelectElement(node)->ScrollToOptionAfterLayout(*this); } void PaintLayerScrollableArea::ClampScrollOffsetAfterOverflowChange() { @@ -1775,16 +1780,13 @@ // keep the point under the cursor in view. } -LayoutRect PaintLayerScrollableArea::ScrollIntoView( +LayoutRect PaintLayerScrollableArea::ScrollLocalRectIntoView( const LayoutRect& rect, const ScrollAlignment& align_x, const ScrollAlignment& align_y, bool is_smooth, ScrollType scroll_type) { - LayoutRect local_expose_rect( - Box() - .AbsoluteToLocalQuad(FloatQuad(FloatRect(rect)), kUseTransforms) - .BoundingBox()); + LayoutRect local_expose_rect(rect); local_expose_rect.Move(-Box().BorderLeft(), -Box().BorderTop()); LayoutRect visible_rect(LayoutPoint(), ClientSize()); LayoutRect r = ScrollAlignment::GetRectToExpose( @@ -1802,7 +1804,22 @@ ScrollOffset scroll_offset_difference = ClampScrollOffset(new_scroll_offset) - old_scroll_offset; local_expose_rect.Move(-LayoutSize(scroll_offset_difference)); + return local_expose_rect; +} +LayoutRect PaintLayerScrollableArea::ScrollIntoView( + const LayoutRect& rect, + const ScrollAlignment& align_x, + const ScrollAlignment& align_y, + bool is_smooth, + ScrollType scroll_type) { + LayoutRect local_expose_rect( + Box() + .AbsoluteToLocalQuad(FloatQuad(FloatRect(rect)), kUseTransforms) + .BoundingBox()); + local_expose_rect = ScrollLocalRectIntoView(local_expose_rect, align_x, + align_y, is_smooth, scroll_type); + LayoutRect visible_rect(LayoutPoint(), ClientSize()); LayoutRect intersect = LocalToAbsolute(Box(), Intersection(visible_rect, local_expose_rect)); if (intersect.IsEmpty() && !visible_rect.IsEmpty() &&
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h index 10c6f8b7..74f24dc 100644 --- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h +++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h
@@ -386,6 +386,13 @@ bool HitTestResizerInFragments(const PaintLayerFragments&, const HitTestLocation&) const; + // Returns the new offset, after scrolling, of the given rect in parents + // coordinates. + LayoutRect ScrollLocalRectIntoView(const LayoutRect&, + const ScrollAlignment& align_x, + const ScrollAlignment& align_y, + bool is_smooth, + ScrollType = kProgrammaticScroll); // Returns the new offset, after scrolling, of the given rect in absolute // coordinates, clipped by the parent's client rect. LayoutRect ScrollIntoView(const LayoutRect&,
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp index 1ce1d4f..e5b641f 100644 --- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp +++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
@@ -60,15 +60,19 @@ LocalFrameView& frame_view, PassRefPtr<const ClipPaintPropertyNode> parent, PassRefPtr<const TransformPaintPropertyNode> local_transform_space, - const FloatRoundedRect& clip_rect) { + const FloatRoundedRect& clip_rect, + bool& clip_changed) { DCHECK(!RuntimeEnabledFeatures::RootLayerScrollingEnabled()); if (auto* existing_content_clip = frame_view.ContentClip()) { + if (existing_content_clip->ClipRect() != clip_rect) + clip_changed = true; existing_content_clip->Update(std::move(parent), std::move(local_transform_space), clip_rect); return false; } frame_view.SetContentClip(ClipPaintPropertyNode::Create( std::move(parent), std::move(local_transform_space), clip_rect)); + clip_changed = true; return true; } @@ -159,9 +163,9 @@ FloatRoundedRect content_clip( IntRect(IntPoint(), frame_view.VisibleContentSize())); - full_context.force_subtree_update |= - UpdateContentClip(frame_view, context.current.clip, - frame_view.PreTranslation(), content_clip); + full_context.force_subtree_update |= UpdateContentClip( + frame_view, context.current.clip, frame_view.PreTranslation(), + content_clip, full_context.clip_changed); ScrollOffset scroll_offset = frame_view.GetScrollOffset(); if (frame_view.IsScrollable() || !scroll_offset.IsZero()) { @@ -543,14 +547,16 @@ const LayoutObject& object, ObjectPaintProperties& properties, PaintPropertyTreeBuilderFragmentContext& context, - bool& force_subtree_update) { + bool& force_subtree_update, + bool& clip_changed) { const ComputedStyle& style = object.StyleRef(); // TODO(trchen): Can't omit effect node if we have 3D children. if (object.NeedsPaintPropertyUpdate() || force_subtree_update) { const ClipPaintPropertyNode* output_clip = context.input_clip_of_current_effect; - + bool local_clip_added_or_removed = false; + bool local_clip_changed = false; if (NeedsEffect(object)) { // We may begin to composite our subtree prior to an animation starts, @@ -567,10 +573,14 @@ bool has_mask = ComputeMaskParameters( mask_clip, mask_color_filter, object, context.current.paint_offset); if (has_mask) { + FloatRoundedRect rounded_mask_clip(mask_clip); + if (properties.MaskClip() && + rounded_mask_clip != properties.MaskClip()->ClipRect()) + local_clip_changed = true; auto result = properties.UpdateMaskClip(context.current.clip, context.current.transform, FloatRoundedRect(mask_clip)); - force_subtree_update |= result.NewNodeCreated(); + local_clip_added_or_removed |= result.NewNodeCreated(); output_clip = properties.MaskClip(); // TODO(crbug.com/683425): PaintArtifactCompositor does not handle @@ -616,8 +626,10 @@ auto* properties = object.GetMutableForPainting().PaintProperties(); force_subtree_update |= properties->ClearEffect(); force_subtree_update |= properties->ClearMask(); - force_subtree_update |= properties->ClearMaskClip(); + local_clip_added_or_removed |= properties->ClearMaskClip(); } + force_subtree_update |= local_clip_added_or_removed; + clip_changed |= local_clip_changed || local_clip_added_or_removed; } if (properties.Effect()) { @@ -714,8 +726,11 @@ const LayoutObject& object, ObjectPaintProperties& properties, PaintPropertyTreeBuilderFragmentContext& context, - bool& force_subtree_update) { + bool& force_subtree_update, + bool& clip_changed) { if (object.NeedsPaintPropertyUpdate() || force_subtree_update) { + bool local_clip_added_or_removed = false; + bool local_clip_changed = false; if (NeedsCssClip(object)) { // Create clip node for descendants that are not fixed position. // We don't have to setup context.absolutePosition.clip here because this @@ -724,13 +739,21 @@ DCHECK(object.CanContainAbsolutePositionObjects()); LayoutRect clip_rect = ToLayoutBox(object).ClipRect(context.current.paint_offset); + + FloatRoundedRect rounded_clip_rect((FloatRect(clip_rect))); + if (properties.CssClip() && + properties.CssClip()->ClipRect() != rounded_clip_rect) + local_clip_changed = true; + auto result = properties.UpdateCssClip( context.current.clip, context.current.transform, FloatRoundedRect(FloatRect(clip_rect))); - force_subtree_update |= result.NewNodeCreated(); + local_clip_added_or_removed |= result.NewNodeCreated(); } else { - force_subtree_update |= properties.ClearCssClip(); + local_clip_added_or_removed |= properties.ClearCssClip(); } + force_subtree_update |= local_clip_added_or_removed; + clip_changed |= local_clip_changed || local_clip_added_or_removed; } if (properties.CssClip()) @@ -796,8 +819,11 @@ const LayoutObject& object, ObjectPaintProperties& properties, PaintPropertyTreeBuilderFragmentContext& context, - bool& force_subtree_update) { + bool& force_subtree_update, + bool& clip_changed) { if (object.NeedsPaintPropertyUpdate() || force_subtree_update) { + bool local_clip_added_or_removed = false; + bool local_clip_changed = false; if (NeedsOverflowClip(object)) { const LayoutBox& box = ToLayoutBox(object); LayoutRect clip_rect; @@ -810,21 +836,28 @@ LayoutRect(context.current.paint_offset, box.Size())); auto result = properties.UpdateInnerBorderRadiusClip( context.current.clip, context.current.transform, inner_border); - force_subtree_update |= result.NewNodeCreated(); + local_clip_added_or_removed |= result.NewNodeCreated(); current_clip = properties.InnerBorderRadiusClip(); } else { - force_subtree_update |= properties.ClearInnerBorderRadiusClip(); + local_clip_added_or_removed |= properties.ClearInnerBorderRadiusClip(); + } + + FloatRoundedRect clipping_rect((FloatRect(clip_rect))); + if (properties.OverflowClip() && + clipping_rect != properties.OverflowClip()->ClipRect()) { + local_clip_changed = true; } auto result = properties.UpdateOverflowClip(current_clip, context.current.transform, FloatRoundedRect(FloatRect(clip_rect))); - force_subtree_update |= result.NewNodeCreated(); + local_clip_added_or_removed |= result.NewNodeCreated(); } else { - force_subtree_update |= properties.ClearInnerBorderRadiusClip(); - force_subtree_update |= properties.ClearOverflowClip(); - return; + local_clip_added_or_removed |= properties.ClearInnerBorderRadiusClip(); + local_clip_added_or_removed |= properties.ClearOverflowClip(); } + force_subtree_update |= local_clip_added_or_removed; + clip_changed |= local_clip_changed || local_clip_added_or_removed; } if (properties.OverflowClip()) @@ -1233,10 +1266,11 @@ UpdateTransform(object, *properties, context, full_context.force_subtree_update); UpdateCssClip(object, *properties, context, - full_context.force_subtree_update); + full_context.force_subtree_update, full_context.clip_changed); if (RuntimeEnabledFeatures::SlimmingPaintV2Enabled()) { UpdateEffect(object, *properties, context, - full_context.force_subtree_update); + full_context.force_subtree_update, + full_context.clip_changed); UpdateFilter(object, *properties, context, full_context.force_subtree_update); } @@ -1269,7 +1303,7 @@ ObjectPaintProperties* properties = object.GetMutableForPainting().PaintProperties(); UpdateOverflowClip(object, *properties, fragment_context, - context.force_subtree_update); + context.force_subtree_update, context.clip_changed); UpdatePerspective(object, *properties, fragment_context, context.force_subtree_update); UpdateSvgLocalToBorderBoxTransform(object, *properties, fragment_context,
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h index 84399a0..6e805a70 100644 --- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h +++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h
@@ -93,19 +93,22 @@ USING_FAST_MALLOC(PaintPropertyTreeBuilderContext); public: - PaintPropertyTreeBuilderContext() - : container_for_absolute_position(nullptr), - force_subtree_update(false) - { - } + PaintPropertyTreeBuilderContext() {} Vector<PaintPropertyTreeBuilderFragmentContext, 1> fragments; - const LayoutObject* container_for_absolute_position; + const LayoutObject* container_for_absolute_position = nullptr; // True if a change has forced all properties in a subtree to be updated. This // can be set due to paint offset changes or when the structure of the // property tree changes (i.e., a node is added or removed). - bool force_subtree_update; + bool force_subtree_update = false; + + // Whether a clip paint property node appeared, disappeared, or changed + // its clip since this variable was last set to false. This is used + // to find out whether a clip changed since the last transform update. + // Code ouside of this class resets clip_changed to false when transforms + // change. + bool clip_changed = false; #if DCHECK_IS_ON() // When DCHECK_IS_ON() we create PaintPropertyTreeBuilderContext even if not @@ -164,7 +167,8 @@ const LayoutObject&, ObjectPaintProperties&, PaintPropertyTreeBuilderFragmentContext&, - bool& force_subtree_update); + bool& force_subtree_update, + bool& clip_changed); ALWAYS_INLINE static void UpdateFilter( const LayoutObject&, ObjectPaintProperties&, @@ -174,7 +178,8 @@ const LayoutObject&, ObjectPaintProperties&, PaintPropertyTreeBuilderFragmentContext&, - bool& force_subtree_update); + bool& force_subtree_update, + bool& clip_changed); ALWAYS_INLINE static void UpdateLocalBorderBoxContext( const LayoutObject&, PaintPropertyTreeBuilderFragmentContext&, @@ -188,7 +193,8 @@ const LayoutObject&, ObjectPaintProperties&, PaintPropertyTreeBuilderFragmentContext&, - bool& force_subtree_update); + bool& force_subtree_update, + bool& clip_changed); ALWAYS_INLINE static void UpdatePerspective( const LayoutObject&, ObjectPaintProperties&,
diff --git a/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp b/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp index b477830..451e08fd 100644 --- a/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp +++ b/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp
@@ -20,8 +20,7 @@ : tree_builder_context( WTF::WrapUnique(new PaintPropertyTreeBuilderContext)), paint_invalidator_context(WTF::WrapUnique(new PaintInvalidatorContext)), - ancestor_overflow_paint_layer(nullptr), - ancestor_transformed_or_root_paint_layer(nullptr) {} + ancestor_overflow_paint_layer(nullptr) {} PrePaintTreeWalkContext(const PrePaintTreeWalkContext& parent_context, bool needs_tree_builder_context) @@ -33,9 +32,7 @@ paint_invalidator_context(WTF::WrapUnique(new PaintInvalidatorContext( *parent_context.paint_invalidator_context))), ancestor_overflow_paint_layer( - parent_context.ancestor_overflow_paint_layer), - ancestor_transformed_or_root_paint_layer( - parent_context.ancestor_transformed_or_root_paint_layer) { + parent_context.ancestor_overflow_paint_layer) { #if DCHECK_IS_ON() if (needs_tree_builder_context) DCHECK(parent_context.tree_builder_context->is_actually_needed); @@ -54,10 +51,6 @@ // is the root layer. Note that it is tree ancestor, not containing // block or stacking ancestor. PaintLayer* ancestor_overflow_paint_layer; - - // The ancestor in the PaintLayer tree which has a transform or is a root - // layer for painting (i.e. a paint invalidation container). - PaintLayer* ancestor_transformed_or_root_paint_layer; }; void PrePaintTreeWalk::Walk(LocalFrameView& root_frame) { @@ -65,8 +58,6 @@ DocumentLifecycle::kInPrePaint); PrePaintTreeWalkContext initial_context; - initial_context.ancestor_transformed_or_root_paint_layer = - root_frame.GetLayoutView()->Layer(); // GeometryMapper depends on paint properties. if (NeedsTreeBuilderContextUpdate(root_frame, initial_context)) @@ -131,23 +122,6 @@ context.ancestor_overflow_paint_layer = paint_layer; } -LayoutRect PrePaintTreeWalk::ComputeClipRectForContext( - const PaintPropertyTreeBuilderFragmentContext::ContainingBlockContext& - context, - const EffectPaintPropertyNode* effect, - const PropertyTreeState& ancestor_state, - const LayoutPoint& ancestor_paint_offset) { - PropertyTreeState local_state(context.transform, context.clip, effect); - - const auto& clip_rect = - GeometryMapper::LocalToAncestorClipRect(local_state, ancestor_state); - // HasRadius() is ignored because it doesn't affect descendants' visual rects. - LayoutRect result(clip_rect.Rect()); - if (!clip_rect.IsInfinite()) - result.MoveBy(-ancestor_paint_offset); - return result; -} - void PrePaintTreeWalk::InvalidatePaintLayerOptimizationsIfNeeded( const LayoutObject& object, PrePaintTreeWalkContext& context) { @@ -155,115 +129,24 @@ return; PaintLayer& paint_layer = *ToLayoutBoxModelObject(object).Layer(); - if (object.StyleRef().HasTransform() || - &object == - context.paint_invalidator_context->paint_invalidation_container) { - context.ancestor_transformed_or_root_paint_layer = &paint_layer; - } - // This code below checks whether any clips have changed that might: - // (a) invalidate optimizations made for a PaintLayer that supports - // subsequence caching, or - // (b) impact clipping of descendant visual rects. - if (!paint_layer.SupportsSubsequenceCaching() && - !paint_layer.GetLayoutObject().HasClipRelatedProperty()) + // Ignore clips across paint invalidation container or transform + // boundaries. + if (object == + context.paint_invalidator_context->paint_invalidation_container || + object.StyleRef().HasTransform()) + context.tree_builder_context->clip_changed = false; + + if (!paint_layer.SupportsSubsequenceCaching() || + !context.tree_builder_context->clip_changed) return; - FragmentData* fragment_data = - &object.GetMutableForPainting().EnsureFirstFragment(); - for (auto& fragment : context.tree_builder_context->fragments) { - DCHECK(fragment_data); - if (InvalidatePaintLayerOptimizationsForFragment( - object, context.ancestor_transformed_or_root_paint_layer, fragment, - *fragment_data)) { - context.paint_invalidator_context->subtree_flags |= - PaintInvalidatorContext::kSubtreeVisualRectUpdate; - } - fragment_data = fragment_data->NextFragment(); - } -} - -bool PrePaintTreeWalk::InvalidatePaintLayerOptimizationsForFragment( - const LayoutObject& object, - const PaintLayer* ancestor_transformed_or_root_paint_layer, - const PaintPropertyTreeBuilderFragmentContext& context, - FragmentData& fragment_data) { - PaintLayer& paint_layer = *ToLayoutBoxModelObject(object).Layer(); - - const auto& ancestor = - ancestor_transformed_or_root_paint_layer->GetLayoutObject(); - PropertyTreeState ancestor_state = *ancestor.LocalBorderBoxProperties(); - -#ifdef CHECK_CLIP_RECTS - auto respect_overflow_clip = kRespectOverflowClip; -#endif - if (ancestor_transformed_or_root_paint_layer->GetCompositingState() == - kPaintsIntoOwnBacking) { - const auto* ancestor_properties = ancestor.PaintProperties(); - if (ancestor_properties && ancestor_properties->OverflowClip()) { - ancestor_state.SetClip(ancestor_properties->OverflowClip()); -#ifdef CHECK_CLIP_RECTS - respect_overflow_clip = kIgnoreOverflowClip; -#endif - } - } - -#ifdef CHECK_CLIP_RECTS - const auto& old_clip_rects = - paint_layer.Clipper(PaintLayer::kDoNotUseGeometryMapper) - .PaintingClipRects(ancestor_transformed_or_root_paint_layer, - respect_overflow_clip, LayoutSize()); -#endif - - const LayoutPoint& ancestor_paint_offset = - ancestor_transformed_or_root_paint_layer->GetLayoutObject().PaintOffset(); - - // TODO(chrishtr): generalize this for multicol. - const auto* effect = context.current_effect; - auto overflow_clip_rect = ComputeClipRectForContext( - context.current, effect, ancestor_state, ancestor_paint_offset); -#ifdef CHECK_CLIP_RECTS - CHECK(overflow_clip_rect == old_clip_rects.OverflowClipRect().Rect()) - << " new=" << overflow_clip_rect.ToString() - << " old=" << old_clip_rects.OverflowClipRect().Rect().ToString(); -#endif - - auto fixed_clip_rect = ComputeClipRectForContext( - context.fixed_position, effect, ancestor_state, ancestor_paint_offset); -#ifdef CHECK_CLIP_RECTS - CHECK(fixed_clip_rect == old_clip_rects.FixedClipRect().Rect()) - << " new=" << fixed_clip_rect.ToString() - << " old=" << old_clip_rects.FixedClipRect().Rect().ToString(); -#endif - - auto pos_clip_rect = ComputeClipRectForContext( - context.absolute_position, effect, ancestor_state, ancestor_paint_offset); -#ifdef CHECK_CLIP_RECTS - CHECK(pos_clip_rect == old_clip_rects.PosClipRect().Rect()) - << " new=" << pos_clip_rect.ToString() - << " old=" << old_clip_rects.PosClipRect().Rect().ToString(); -#endif - - const auto* previous_clip_rects = fragment_data.PreviousClipRects(); - if (!previous_clip_rects || - overflow_clip_rect != previous_clip_rects->OverflowClipRect().Rect() || - fixed_clip_rect != previous_clip_rects->FixedClipRect().Rect() || - pos_clip_rect != previous_clip_rects->PosClipRect().Rect()) { - RefPtr<ClipRects> clip_rects = ClipRects::Create(); - clip_rects->SetOverflowClipRect(overflow_clip_rect); - clip_rects->SetFixedClipRect(fixed_clip_rect); - clip_rects->SetPosClipRect(pos_clip_rect); - fragment_data.SetPreviousClipRects(*clip_rects); - - paint_layer.SetNeedsRepaint(); - paint_layer.SetPreviousPaintPhaseDescendantOutlinesEmpty(false); - paint_layer.SetPreviousPaintPhaseFloatEmpty(false); - paint_layer.SetPreviousPaintPhaseDescendantBlockBackgroundsEmpty(false); - // All subsequences which are contained below this paintLayer must also - // be checked. - return true; - } - return false; + paint_layer.SetNeedsRepaint(); + paint_layer.SetPreviousPaintPhaseDescendantOutlinesEmpty(false); + paint_layer.SetPreviousPaintPhaseFloatEmpty(false); + paint_layer.SetPreviousPaintPhaseDescendantBlockBackgroundsEmpty(false); + context.paint_invalidator_context->subtree_flags |= + PaintInvalidatorContext::kSubtreeVisualRectUpdate; } bool PrePaintTreeWalk::NeedsTreeBuilderContextUpdate( @@ -311,6 +194,11 @@ if (context.tree_builder_context) { property_tree_builder_.UpdatePropertiesForSelf( object, *context.tree_builder_context); + + if (context.tree_builder_context->clip_changed) { + context.paint_invalidator_context->subtree_flags |= + PaintInvalidatorContext::kSubtreeVisualRectUpdate; + } } paint_invalidator_.InvalidatePaint(object, context.tree_builder_context.get(), @@ -319,6 +207,7 @@ if (context.tree_builder_context) { property_tree_builder_.UpdatePropertiesForChildren( object, *context.tree_builder_context); + InvalidatePaintLayerOptimizationsIfNeeded(object, context); }
diff --git a/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.h b/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.h index 4a7dfb30..adb77c1e 100644 --- a/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.h +++ b/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.h
@@ -13,7 +13,6 @@ class LayoutObject; class LocalFrameView; -class PropertyTreeState; struct PrePaintTreeWalkContext; // This class walks the whole layout tree, beginning from the root @@ -35,21 +34,6 @@ const LayoutObject&, PrePaintTreeWalkContext&); - // Returns true if we should force checking subtree invalidation flags. - ALWAYS_INLINE bool InvalidatePaintLayerOptimizationsForFragment( - const LayoutObject&, - const PaintLayer* ancestor_transformed_or_root_paint_layer, - const PaintPropertyTreeBuilderFragmentContext&, - FragmentData&); - - // Returns the clip applied to children for the given containing block context - // + effect, in the space of ancestorState adjusted by ancestorPaintOffset. - ALWAYS_INLINE LayoutRect ComputeClipRectForContext( - const PaintPropertyTreeBuilderFragmentContext::ContainingBlockContext&, - const EffectPaintPropertyNode*, - const PropertyTreeState& ancestor_state, - const LayoutPoint& ancestor_paint_offset); - bool ALWAYS_INLINE NeedsTreeBuilderContextUpdate(const LocalFrameView&, const PrePaintTreeWalkContext&);
diff --git a/third_party/WebKit/Source/core/paint/PrePaintTreeWalkTest.cpp b/third_party/WebKit/Source/core/paint/PrePaintTreeWalkTest.cpp index 3c0dc69..2a2b00a 100644 --- a/third_party/WebKit/Source/core/paint/PrePaintTreeWalkTest.cpp +++ b/third_party/WebKit/Source/core/paint/PrePaintTreeWalkTest.cpp
@@ -280,38 +280,6 @@ EXPECT_TRUE(child_paint_layer->NeedsRepaint()); } -TEST_P(PrePaintTreeWalkTest, ClipRects) { - SetBodyInnerHTML( - "<div id='parent' style='isolation: isolate'>" - " <div id='child' style='position: relative'>" - " <div id='grandchild' style='isolation: isolate'>" - " <div style='position: relative'></div>" - " </div>" - " </div>" - "</div>"); - - auto* parent = GetLayoutObjectByElementId("parent"); - auto* child = GetLayoutObjectByElementId("child"); - auto* grandchild = GetLayoutObjectByElementId("grandchild"); - - EXPECT_TRUE( - parent->GetMutableForPainting().FirstFragment()->PreviousClipRects()); - EXPECT_FALSE(child->PaintProperties()); - EXPECT_TRUE( - grandchild->GetMutableForPainting().FirstFragment()->PreviousClipRects()); - - PrePaintTreeWalk::ClearPreviousClipRectsForTesting(*grandchild); - GetDocument().View()->UpdateAllLifecyclePhases(); - // Still no rects, because the walk early-outed at the LayoutView. - EXPECT_FALSE( - grandchild->GetMutableForPainting().FirstFragment()->PreviousClipRects()); - - grandchild->SetNeedsPaintPropertyUpdate(); - GetDocument().View()->UpdateAllLifecyclePhases(); - EXPECT_TRUE( - grandchild->GetMutableForPainting().FirstFragment()->PreviousClipRects()); -} - TEST_P(PrePaintTreeWalkTest, VisualRectClipForceSubtree) { SetBodyInnerHTML( "<style>"
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp index a05e0b2..4ad93814 100644 --- a/third_party/WebKit/Source/core/testing/Internals.cpp +++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -335,6 +335,14 @@ return needs_layout_objects; } +unsigned Internals::forceLayoutCount(ExceptionState& exception_state) const { + if (document_) + return document_->ForceLayoutCountForTesting(); + exception_state.ThrowDOMException(kInvalidAccessError, + "No context document is available."); + return 0; +} + unsigned Internals::hitTestCount(Document* doc, ExceptionState& exception_state) const { if (!doc) {
diff --git a/third_party/WebKit/Source/core/testing/Internals.h b/third_party/WebKit/Source/core/testing/Internals.h index d31c67a..fddaaf23c 100644 --- a/third_party/WebKit/Source/core/testing/Internals.h +++ b/third_party/WebKit/Source/core/testing/Internals.h
@@ -151,6 +151,7 @@ unsigned updateStyleAndReturnAffectedElementCount(ExceptionState&) const; unsigned needsLayoutCount(ExceptionState&) const; + unsigned forceLayoutCount(ExceptionState&) const; unsigned hitTestCount(Document*, ExceptionState&) const; unsigned hitTestCacheHits(Document*, ExceptionState&) const; Element* elementFromPoint(Document*,
diff --git a/third_party/WebKit/Source/core/testing/Internals.idl b/third_party/WebKit/Source/core/testing/Internals.idl index bacd7d84..597afb4 100644 --- a/third_party/WebKit/Source/core/testing/Internals.idl +++ b/third_party/WebKit/Source/core/testing/Internals.idl
@@ -65,7 +65,10 @@ Node parentTreeScope(Node node); [RaisesException] unsigned short compareTreeScopePosition(Node treeScope1, Node treeScope2); [RaisesException] unsigned long updateStyleAndReturnAffectedElementCount(); + // Returns the number of LayoutObjects with needs-layout flag. [RaisesException] unsigned long needsLayoutCount(); + // The number of force layout since Document creation. + [RaisesException] readonly attribute unsigned long forceLayoutCount; [RaisesException] unsigned long hitTestCount(Document document); [RaisesException] unsigned long hitTestCacheHits(Document document); [RaisesException] Element? elementFromPoint(Document document, double x, double y, boolean ignoreClipping, boolean allowChildFrameContent);
diff --git a/third_party/WebKit/Source/devtools/front_end/network/HARWriter.js b/third_party/WebKit/Source/devtools/front_end/network/HARWriter.js index 0af67914..6afca1c 100644 --- a/third_party/WebKit/Source/devtools/front_end/network/HARWriter.js +++ b/third_party/WebKit/Source/devtools/front_end/network/HARWriter.js
@@ -92,10 +92,8 @@ var progress = compositeProgress.createSubProgress(); progress.setTitle(Common.UIString('Writing file\u2026')); progress.setTotalWork(fileContent.length); - var chunks = fileContent.split('', Network.HARWriter._chunkSize); - for (var chunk of chunks) { - if (progress.isCanceled()) - break; + for (var i = 0; i < fileContent.length && !progress.isCanceled(); i += Network.HARWriter._chunkSize) { + var chunk = fileContent.substr(i, Network.HARWriter._chunkSize); await stream.write(chunk); progress.worked(chunk.length); }
diff --git a/third_party/WebKit/Source/modules/webshare/NavigatorShare.idl b/third_party/WebKit/Source/modules/webshare/NavigatorShare.idl index a5c4b308..7cf20fe9 100644 --- a/third_party/WebKit/Source/modules/webshare/NavigatorShare.idl +++ b/third_party/WebKit/Source/modules/webshare/NavigatorShare.idl
@@ -5,7 +5,7 @@ // https://wicg.github.io/web-share/ [ - OriginTrialEnabled=WebShare + RuntimeEnabled=WebShare ] partial interface Navigator { [SecureContext, CallWith=ScriptState, MeasureAs=WebShareShare] Promise<void> share(ShareData data);
diff --git a/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5 b/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5 index 4c7dbb6..34cb29c 100644 --- a/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5 +++ b/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5
@@ -1103,10 +1103,9 @@ name: "WebNFC", status: "experimental", }, + // WebShare is enabled by default on Android. { name: "WebShare", - origin_trial_feature_name: "WebShare", - origin_trial_os: ["android"], status: "experimental", }, {
diff --git a/third_party/WebKit/Source/platform/exported/WebRuntimeFeatures.cpp b/third_party/WebKit/Source/platform/exported/WebRuntimeFeatures.cpp index f618395..2eedb74 100644 --- a/third_party/WebKit/Source/platform/exported/WebRuntimeFeatures.cpp +++ b/third_party/WebKit/Source/platform/exported/WebRuntimeFeatures.cpp
@@ -308,6 +308,10 @@ RuntimeEnabledFeatures::SetPushMessagingEnabled(enable); } +void WebRuntimeFeatures::EnableWebShare(bool enable) { + RuntimeEnabledFeatures::SetWebShareEnabled(enable); +} + void WebRuntimeFeatures::EnableWebVR(bool enable) { RuntimeEnabledFeatures::SetWebVREnabled(enable); }
diff --git a/third_party/WebKit/Source/platform/geometry/FloatRoundedRect.h b/third_party/WebKit/Source/platform/geometry/FloatRoundedRect.h index ed5e365..617c89eb 100644 --- a/third_party/WebKit/Source/platform/geometry/FloatRoundedRect.h +++ b/third_party/WebKit/Source/platform/geometry/FloatRoundedRect.h
@@ -227,6 +227,10 @@ return a.Rect() == b.Rect() && a.GetRadii() == b.GetRadii(); } +inline bool operator!=(const FloatRoundedRect& a, const FloatRoundedRect& b) { + return !(a == b); +} + // Redeclared here to avoid ODR issues. // See platform/testing/GeometryPrinters.h. void PrintTo(const FloatRoundedRect&, std::ostream*);
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp index 846be66..2e354e6 100644 --- a/third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp +++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp
@@ -63,8 +63,8 @@ clip_layer_->AddChild(scroll_elasticity_layer_.get()); scroll_elasticity_layer_->AddChild(page_scale_layer_.get()); page_scale_layer_->AddChild(graphics_layer_.get()); - graphics_layer_->PlatformLayer()->SetScrollClipLayer( - clip_layer_->PlatformLayer()); + graphics_layer_->PlatformLayer()->SetScrollable( + clip_layer_->PlatformLayer()->Bounds()); platform_layer_ = graphics_layer_->PlatformLayer(); layer_tree_view_ = WTF::WrapUnique(new WebLayerTreeViewImplForTesting); DCHECK(layer_tree_view_);
diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp index b3e8164..153cb71a 100644 --- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp +++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
@@ -780,9 +780,9 @@ EXPECT_EQ(transform_node_index, transform_node.id); EXPECT_EQ(0u, scroll_client.did_scroll_count); - // TODO(pdr): The PaintArtifactCompositor should set the scroll clip layer id - // so the Layer is scrollable. This call should be removed. - layer->SetScrollClipLayerId(layer->id()); + // TODO(pdr): The PaintArtifactCompositor should set the scrolling content + // bounds so the Layer is scrollable. This call should be removed. + layer->SetScrollable(gfx::Size(1, 1)); layer->SetScrollOffsetFromImplSide(gfx::ScrollOffset(1, 2)); EXPECT_EQ(1u, scroll_client.did_scroll_count); EXPECT_EQ(gfx::ScrollOffset(1, 2), scroll_client.last_scroll_offset);
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp index bf5ba98..028684a 100644 --- a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp +++ b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
@@ -1008,7 +1008,7 @@ ? ¤t_paint_artifact_.GetDisplayItemList()[old_item_index] : nullptr; - bool old_and_new_equal = old_item && new_item.Equals(*old_item); + bool old_and_new_equal = (old_item && new_item.Equals(*old_item)); if (!old_and_new_equal) { if (new_item.IsBegin()) { // Temporarily skip mismatching begin display item which may be removed
diff --git a/third_party/WebKit/Source/web/BUILD.gn b/third_party/WebKit/Source/web/BUILD.gn index 4b88700a..a7b65b0 100644 --- a/third_party/WebKit/Source/web/BUILD.gn +++ b/third_party/WebKit/Source/web/BUILD.gn
@@ -99,7 +99,6 @@ "tests/SmoothScrollTest.cpp", "tests/SpinLockTest.cpp", "tests/VirtualTimeTest.cpp", - "tests/WebDocumentSubresourceFilterTest.cpp", "tests/WebFrameSerializerSanitizationTest.cpp", "tests/WebFrameTest.cpp", "tests/WebMeaningfulLayoutsTest.cpp",
diff --git a/third_party/WebKit/public/platform/WebLayer.h b/third_party/WebKit/public/platform/WebLayer.h index 12a7329..07ef4a6b 100644 --- a/third_party/WebKit/public/platform/WebLayer.h +++ b/third_party/WebKit/public/platform/WebLayer.h
@@ -169,9 +169,9 @@ virtual void SetScrollPosition(WebFloatPoint) = 0; virtual WebFloatPoint ScrollPosition() const = 0; - // To set a WebLayer as scrollable we must specify the corresponding clip - // layer. - virtual void SetScrollClipLayer(WebLayer*) = 0; + // To set a WebLayer as scrollable we must specify the scrolling container + // bounds. + virtual void SetScrollable(const WebSize& scroll_container_bounds) = 0; virtual bool Scrollable() const = 0; virtual void SetUserScrollable(bool horizontal, bool vertical) = 0; virtual bool UserScrollableHorizontal() const = 0;
diff --git a/third_party/WebKit/public/platform/WebLocalizedString.h b/third_party/WebKit/public/platform/WebLocalizedString.h index 9ae231a..ac53b8a 100644 --- a/third_party/WebKit/public/platform/WebLocalizedString.h +++ b/third_party/WebKit/public/platform/WebLocalizedString.h
@@ -41,11 +41,7 @@ kAXCalendarShowPreviousMonth, kAXCalendarWeekDescription, kAXDayOfMonthFieldText, - kAXHeadingText, // Deprecated. kAXHourFieldText, - kAXImageMapText, // Deprecated. - kAXLinkText, // Deprecated. - kAXListMarkerText, // Deprecated. kAXMediaAudioElement, kAXMediaAudioElementHelp, kAXMediaAudioSliderHelp, @@ -73,11 +69,6 @@ kAXMediaPlayButtonHelp, kAXMediaShowClosedCaptionsButton, kAXMediaShowClosedCaptionsButtonHelp, - kAXMediaSlider, // Deprecated. - kAXMediaSliderThumb, // Deprecated. - kAXMediaSliderThumbHelp, // Deprecated. - kAXMediaStatusDisplay, - kAXMediaStatusDisplayHelp, kAXMediaTimeRemainingDisplay, kAXMediaTimeRemainingDisplayHelp, kAXMediaUnMuteButton, @@ -89,15 +80,11 @@ kAXMinuteFieldText, kAXMonthFieldText, kAXSecondFieldText, - kAXWebAreaText, // Deprecated. kAXWeekOfYearFieldText, kAXYearFieldText, kBlockedPluginText, kCalendarClear, kCalendarToday, - kDateFormatDayInMonthLabel, - kDateFormatMonthLabel, - kDateFormatYearLabel, kDetailsLabel, kDownloadButtonLabel, kFileButtonChooseFileLabel, @@ -111,7 +98,6 @@ kOtherColorLabel, kOtherDateLabel, kOtherMonthLabel, - kOtherTimeLabel, kOtherWeekLabel, kOverflowMenuCaptions, kOverflowMenuCast, @@ -136,10 +122,6 @@ // "datetime-local" input UI instead of "----". kPlaceholderForYearField, kResetButtonDefaultLabel, - kSearchableIndexIntroduction, - kSearchMenuClearRecentSearchesText, // Deprecated. - kSearchMenuNoRecentSearchesText, // Deprecated. - kSearchMenuRecentSearchesText, // Deprecated. kSelectMenuListText, kSubmitButtonDefaultLabel, kTextTracksNoLabel,
diff --git a/third_party/WebKit/public/platform/WebRuntimeFeatures.h b/third_party/WebKit/public/platform/WebRuntimeFeatures.h index c78c7a1a..e67bf35 100644 --- a/third_party/WebKit/public/platform/WebRuntimeFeatures.h +++ b/third_party/WebKit/public/platform/WebRuntimeFeatures.h
@@ -135,6 +135,7 @@ BLINK_PLATFORM_EXPORT static void EnableWebGLDraftExtensions(bool); BLINK_PLATFORM_EXPORT static void EnableWebGLImageChromium(bool); BLINK_PLATFORM_EXPORT static void EnableWebNfc(bool); + BLINK_PLATFORM_EXPORT static void EnableWebShare(bool); BLINK_PLATFORM_EXPORT static void EnableWebUsb(bool); BLINK_PLATFORM_EXPORT static void EnableWebVR(bool); BLINK_PLATFORM_EXPORT static void EnableWebVRExperimentalRendering(bool);
diff --git a/third_party/sqlite/BUILD.gn b/third_party/sqlite/BUILD.gn index a5e030f..a518797c 100644 --- a/third_party/sqlite/BUILD.gn +++ b/third_party/sqlite/BUILD.gn
@@ -63,9 +63,10 @@ "SQLITE_SEPARATE_CACHE_POOLS", # TODO(shess): SQLite adds mutexes to protect structures which cross - # threads. In theory Chromium should be able to turn this off for a - # slight speed boost. - "THREADSAFE", + # threads. In theory Chromium should be able to turn this to "2" which + # should give a slight speed boost. "2" is safe as long as a single + # connection is not used by more than one thread at a time. + "SQLITE_THREADSAFE=1", # SQLite can spawn threads to sort in parallel if configured # appropriately. Chromium doesn't configure SQLite for that, and would
diff --git a/tools/determinism/deterministic_build_whitelist.pyl b/tools/determinism/deterministic_build_whitelist.pyl index 5721b9d..ef4a9c9 100644 --- a/tools/determinism/deterministic_build_whitelist.pyl +++ b/tools/determinism/deterministic_build_whitelist.pyl
@@ -69,7 +69,6 @@ 'crypto_unittests', 'device_unittests', 'display_compositor_benchmark', - 'display_compositor_gl_tests', 'display_unittests', 'events_unittests', 'extensions_browsertests', @@ -158,6 +157,7 @@ 'views_examples_exe', 'views_examples_with_content_exe', 'views_unittests', + 'viz_benchmark', 'webkit_unit_tests', 'wtf_unittests', ], @@ -225,8 +225,6 @@ 'crypto_unittests.exe', 'd8.exe', 'device_unittests.exe', - 'display_compositor_benchmark.exe', - 'display_compositor_gl_tests.exe', 'display_unittests.exe', 'events_unittests.exe', 'extensions_browsertests.exe', @@ -356,6 +354,7 @@ 'views_mus_interactive_ui_tests.exe', 'views_mus_unittests.exe', 'views_unittests.exe', + 'viz_benchmark.exe', 'webkit_unit_tests.exe', 'webtest_library.dll', 'window_type_launcher_library.dll',
diff --git a/tools/gn/docs/reference.md b/tools/gn/docs/reference.md index af2224a..5c50db5 100644 --- a/tools/gn/docs/reference.md +++ b/tools/gn/docs/reference.md
@@ -2591,6 +2591,22 @@ would have a dependency on the action to make it run. ``` +#### **Overriding builtin targets** + +``` + You can use template to redefine a built-in target in which case your template + takes a precedence over the built-in one. All uses of the target from within + the template definition will refer to the built-in target which makes it + possible to extend the behavior of the built-in target: + + template("shared_library") { + shared_library(shlib) { + forward_variables_from(invoker, [ "*" ]) + ... + } + } +``` + #### **Example of defining a template** ```
diff --git a/tools/gn/function_template.cc b/tools/gn/function_template.cc index 66c6801..36af071d 100644 --- a/tools/gn/function_template.cc +++ b/tools/gn/function_template.cc
@@ -81,6 +81,20 @@ something like "${target_name}_action" to make it unique. The source set would have a dependency on the action to make it run. +Overriding builtin targets + + You can use template to redefine a built-in target in which case your template + takes a precedence over the built-in one. All uses of the target from within + the template definition will refer to the built-in target which makes it + possible to extend the behavior of the built-in target: + + template("shared_library") { + shared_library(shlib) { + forward_variables_from(invoker, [ "*" ]) + ... + } + } + Example of defining a template template("my_idl") {
diff --git a/tools/gn/functions.cc b/tools/gn/functions.cc index 272cd943..1d17d4298 100644 --- a/tools/gn/functions.cc +++ b/tools/gn/functions.cc
@@ -1070,21 +1070,21 @@ Err* err) { const Token& name = function->function(); + std::string template_name = function->function().value().as_string(); + const Template* templ = scope->GetTemplate(template_name); + if (templ) { + Value args = args_list->Execute(scope, err); + if (err->has_error()) + return Value(); + return templ->Invoke(scope, function, template_name, args.list_value(), + block, err); + } + + // No template matching this, check for a built-in function. const FunctionInfoMap& function_map = GetFunctions(); FunctionInfoMap::const_iterator found_function = function_map.find(name.value()); if (found_function == function_map.end()) { - // No built-in function matching this, check for a template. - std::string template_name = function->function().value().as_string(); - const Template* templ = scope->GetTemplate(template_name); - if (templ) { - Value args = args_list->Execute(scope, err); - if (err->has_error()) - return Value(); - return templ->Invoke(scope, function, template_name, args.list_value(), - block, err); - } - *err = Err(name, "Unknown function."); return Value(); }
diff --git a/tools/grit/grit/exception.py b/tools/grit/grit/exception.py index 905046a..d30d782 100755 --- a/tools/grit/grit/exception.py +++ b/tools/grit/grit/exception.py
@@ -68,13 +68,6 @@ pass -class GotPathExpectedFilenameOnly(Parsing): - '''The 'filename' attribute of <output> and the 'file' attribute of <part> - must be bare filenames, not paths. - ''' - pass - - class FileNotFound(Parsing): '''The resource file was not found. '''
diff --git a/tools/grit/grit/grd_reader.py b/tools/grit/grit/grd_reader.py index ba8ad49..c337b6f 100755 --- a/tools/grit/grit/grd_reader.py +++ b/tools/grit/grit/grd_reader.py
@@ -84,13 +84,10 @@ partnode = self.stack[-1] partnode.started_inclusion = True # Add the contents of the sub-grd file as children of the <part> node. - partname = partnode.GetInputPath() - if os.path.dirname(partname): - # TODO(benrg): Remove this limitation. (The problem is that GRIT - # assumes that files referenced from the GRD file are relative to - # a path stored in the root <grit> node.) - raise exception.GotPathExpectedFilenameOnly() - partname = os.path.join(self.dir, partname) + partname = os.path.join(self.dir, partnode.GetInputPath()) + # Check the GRDP file exists. + if not os.path.exists(partname): + raise exception.FileNotFound() # Exceptions propagate to the handler in grd_reader.Parse(). xml.sax.parse(partname, GrdPartContentHandler(self))
diff --git a/tools/grit/grit/grd_reader_unittest.py b/tools/grit/grit/grd_reader_unittest.py index fd4d08b..c782d02 100755 --- a/tools/grit/grit/grd_reader_unittest.py +++ b/tools/grit/grit/grd_reader_unittest.py
@@ -211,6 +211,13 @@ self.failUnless(hello.GetCliques()[0].GetId() == 'IDS_HELLO') def testPartInclusion(self): + arbitrary_path_grd = u'''\ + <grit-part> + <message name="IDS_TEST5" desc="test5">test5</message> + </grit-part>''' + arbitrary_path_grd_file = os.path.join( + util.TempDir({'arbitrary_path.grp': arbitrary_path_grd}).GetPath(), + 'arbitrary_path.grp') top_grd = u'''\ <grit latest_public_release="2" current_release="3"> <release seq="3"> @@ -219,9 +226,10 @@ test </message> <part file="sub.grp" /> + <part file="%s" /> </messages> </release> - </grit>''' + </grit>''' % arbitrary_path_grd_file sub_grd = u'''\ <grit-part> <message name="IDS_TEST2" desc="test2">test2</message> @@ -252,9 +260,14 @@ test3 </message> </part> + <part file="%s"> + <message desc="test5" name="IDS_TEST5"> + test5 + </message> + </part> </messages> </release> - </grit>''' + </grit>''' % arbitrary_path_grd_file with util.TempDir({'sub.grp': sub_grd, 'subsub.grp': subsub_grd}) as temp_dir: output = grd_reader.Parse(StringIO.StringIO(top_grd), temp_dir.GetPath()) @@ -272,6 +285,7 @@ (exception.UnexpectedContent, u'<part file="x">fnord</part>'), (exception.UnexpectedChild, u'<part file="x"><output filename="x" type="y" /></part>'), + (exception.FileNotFound, u'<part file="yet_created_x" />'), ] for raises, data in part_failures: data = StringIO.StringIO(template % data)
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index c6d8e48..df91639 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -24540,6 +24540,7 @@ <int value="1" label="App"/> <int value="2" label="Tab"/> <int value="4" label="Desktop"/> + <int value="8" label="Local Media"/> </enum> <enum name="MediaRouterUserAction"> @@ -24871,6 +24872,7 @@ <int value="0" label="Ready"/> <int value="1" label="Resume"/> <int value="2" label="LowStorage"/> + <int value="3" label="ArcKiosk"/> </enum> <enum name="MigrationUIMigrationResult"> @@ -24882,6 +24884,10 @@ <int value="5" label="Request failure in resumed migration"/> <int value="6" label="Mount failure in new migration"/> <int value="7" label="Mount failure in resumed migration"/> + <int value="8" label="Success in arc kiosk migration"/> + <int value="9" label="General failure in arc kiosk migration"/> + <int value="10" label="Request failure in arc kiosk migration"/> + <int value="11" label="Mount failure in arc kiosk migration"/> </enum> <enum name="MigrationUIRemoveCryptohomeResult"> @@ -24889,6 +24895,8 @@ <int value="1" label="Success in resumed migration"/> <int value="2" label="Failure in new migration"/> <int value="3" label="Failure in resumed migration"/> + <int value="4" label="Success in arc kiosk migration"/> + <int value="5" label="Failure in arc kiosk migration"/> </enum> <enum name="MigrationUIScreen"> @@ -36497,6 +36505,8 @@ <int value="11" label="Disabled by Key"/> <int value="12" label="Language in ULP"/> <int value="13" label="Aborted by translate ranker"/> + <int value="14" label="Aborted by too often denied rule"/> + <int value="15" label="Aborted by matches previous language"/> </enum> <enum name="TranslateLanguage">
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index 3de1c34..66ec8e9 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml
@@ -31050,6 +31050,15 @@ </summary> </histogram> +<histogram name="MediaRouter.Source.CastingSource" + enum="MediaRouterSourceTypes"> + <owner>paezagon@chromium.org</owner> + <summary> + The source of a Media Router session. This is recorded to keep track of what + kind of media is being streamed. + </summary> +</histogram> + <histogram name="MediaRouter.Ui.Action.CloseLatency" units="ms"> <owner>apacible@chromium.org</owner> <summary>
diff --git a/tools/metrics/rappor/rappor.xml b/tools/metrics/rappor/rappor.xml index ebbf02f..903b3b3b 100644 --- a/tools/metrics/rappor/rappor.xml +++ b/tools/metrics/rappor/rappor.xml
@@ -2172,6 +2172,17 @@ </summary> </rappor-metric> +<rappor-metric + name="ServiceWorker.ContextRequestHandlerStatus.UninstalledScriptImport" + type="ETLD_PLUS_ONE"> + <owner>falken@chromium.org</owner> + <summary> + The domain and registry of the URL of service worker script which used + importScripts() to import a script that was not previously installed. + Recorded when importScripts() is called. + </summary> +</rappor-metric> + <rappor-metric name="ServiceWorker.ControlledPageUrl" type="ETLD_PLUS_ONE"> <owner>horo@chromium.org</owner> <summary>
diff --git a/tools/ubsan/vptr_blacklist.txt b/tools/ubsan/vptr_blacklist.txt index 6bd9610a..53d9e51 100644 --- a/tools/ubsan/vptr_blacklist.txt +++ b/tools/ubsan/vptr_blacklist.txt
@@ -101,13 +101,14 @@ src:*third_party/swiftshader/third_party/LLVM* ############################################################################# -# UBSan yields false positives in libEGL when objects created in libGLESv2 -# from classes derived from libEGL base classes are used within libEGL. -# UBSan wrongly detects that the libGLESv2 classes are not derived from libEGL -# classes because libEGL doesn't know about libGLESv2 classes. -# See crbug.com/722349. +# UBSan yields false positives in SwiftShader's libEGL when objects created in +# libGLESv2 from classes derived from libEGL base classes are used within +# libEGL. UBSan wrongly detects that the libGLESv2 classes are not derived from +# libEGL classes because libEGL doesn't know about libGLESv2 classes. +# See crbug.com/722349, crbug.com/736624. type:*egl*Context* type:*egl*Surface* +type:*gl*Surface* type:*gl*Object* type:*sw*FrameBuffer*
diff --git a/ui/accessibility/ax_role_properties.cc b/ui/accessibility/ax_role_properties.cc index aa712fa..0d7d03c 100644 --- a/ui/accessibility/ax_role_properties.cc +++ b/ui/accessibility/ax_role_properties.cc
@@ -32,4 +32,56 @@ } } +bool IsCellOrTableHeaderRole(ui::AXRole role) { + switch (role) { + case ui::AX_ROLE_CELL: + case ui::AX_ROLE_COLUMN_HEADER: + case ui::AX_ROLE_ROW_HEADER: + return true; + default: + return false; + } +} + +bool IsTableLikeRole(ui::AXRole role) { + switch (role) { + case ui::AX_ROLE_TABLE: + case ui::AX_ROLE_GRID: + case ui::AX_ROLE_TREE_GRID: + return true; + default: + return false; + } +} + +bool IsContainerWithSelectableChildrenRole(ui::AXRole role) { + switch (role) { + case ui::AX_ROLE_COMBO_BOX: + case ui::AX_ROLE_GRID: + case ui::AX_ROLE_LIST_BOX: + case ui::AX_ROLE_MENU: + case ui::AX_ROLE_MENU_BAR: + case ui::AX_ROLE_RADIO_GROUP: + case ui::AX_ROLE_TAB_LIST: + case ui::AX_ROLE_TOOLBAR: + case ui::AX_ROLE_TREE: + case ui::AX_ROLE_TREE_GRID: + return true; + default: + return false; + } +} + +bool IsRowContainer(ui::AXRole role) { + switch (role) { + case ui::AX_ROLE_TREE: + case ui::AX_ROLE_TREE_GRID: + case ui::AX_ROLE_GRID: + case ui::AX_ROLE_TABLE: + return true; + default: + return false; + } +} + } // namespace ui
diff --git a/ui/accessibility/ax_role_properties.h b/ui/accessibility/ax_role_properties.h index 7d9ab796..6ee8234 100644 --- a/ui/accessibility/ax_role_properties.h +++ b/ui/accessibility/ax_role_properties.h
@@ -14,6 +14,18 @@ // clicks. AX_EXPORT bool IsRoleClickable(AXRole role); +// Returns true if this node is a cell or a table header. +AX_EXPORT bool IsCellOrTableHeaderRole(AXRole role); + +// Returns true if this node is a table, a grid or a treegrid. +AX_EXPORT bool IsTableLikeRole(AXRole role); + +// Returns true if this node is a container with selectable children. +AX_EXPORT bool IsContainerWithSelectableChildrenRole(ui::AXRole role); + +// Returns true if this node is a row container. +AX_EXPORT bool IsRowContainer(ui::AXRole role); + } // namespace ui #endif // UI_ACCESSIBILITY_AX_ROLE_PROPERTIES_H_
diff --git a/ui/android/java/src/org/chromium/ui/UiUtils.java b/ui/android/java/src/org/chromium/ui/UiUtils.java index 861320d..3a55ab9 100644 --- a/ui/android/java/src/org/chromium/ui/UiUtils.java +++ b/ui/android/java/src/org/chromium/ui/UiUtils.java
@@ -8,6 +8,7 @@ import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Rect; +import android.graphics.Typeface; import android.os.Build; import android.os.Environment; import android.os.Handler; @@ -395,4 +396,19 @@ if (parent == null) return; parent.removeView(view); } + + /** + * Creates a {@link Typeface} that represents medium-weighted text. This function returns + * Roboto Medium when it is available (Lollipop and up) and Roboto Bold where it isn't. + * + * @return Typeface that can be applied to a View. + */ + public static Typeface createRobotoMediumTypeface() { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + // Roboto Medium, regular. + return Typeface.create("sans-serif-medium", Typeface.NORMAL); + } else { + return Typeface.create("sans-serif", Typeface.BOLD); + } + } }
diff --git a/ui/app_list/BUILD.gn b/ui/app_list/BUILD.gn index 330928c..979cde4 100644 --- a/ui/app_list/BUILD.gn +++ b/ui/app_list/BUILD.gn
@@ -124,6 +124,8 @@ "views/contents_view.h", "views/custom_launcher_page_view.cc", "views/custom_launcher_page_view.h", + "views/expand_arrow_view.cc", + "views/expand_arrow_view.h", "views/folder_background_view.cc", "views/folder_background_view.h", "views/folder_header_view.cc",
diff --git a/ui/app_list/vector_icons/BUILD.gn b/ui/app_list/vector_icons/BUILD.gn index 3c49259..87a6c2c 100644 --- a/ui/app_list/vector_icons/BUILD.gn +++ b/ui/app_list/vector_icons/BUILD.gn
@@ -8,10 +8,14 @@ icon_directory = "." icons = [ + "ic_arrow_up.1x.icon", + "ic_arrow_up.icon", "ic_badge_instant.1x.icon", "ic_badge_instant.icon", "ic_badge_play.1x.icon", "ic_badge_play.icon", + "ic_badge_rating.1x.icon", + "ic_badge_rating.icon", "ic_google_black.1x.icon", "ic_google_black.icon", "ic_mic_black.1x.icon",
diff --git a/ui/app_list/vector_icons/ic_arrow_up.1x.icon b/ui/app_list/vector_icons/ic_arrow_up.1x.icon new file mode 100644 index 0000000..d28822f --- /dev/null +++ b/ui/app_list/vector_icons/ic_arrow_up.1x.icon
@@ -0,0 +1,13 @@ +// 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. + +CANVAS_DIMENSIONS, 12, +MOVE_TO, 10.59f, 9, +LINE_TO, 6, 4.67f, +LINE_TO, 1.42f, 9, +LINE_TO, 0, 7.66f, +LINE_TO, 6, 2, +R_LINE_TO, 6, 5.66f, +CLOSE, +END
diff --git a/ui/app_list/vector_icons/ic_arrow_up.icon b/ui/app_list/vector_icons/ic_arrow_up.icon new file mode 100644 index 0000000..5f8b186 --- /dev/null +++ b/ui/app_list/vector_icons/ic_arrow_up.icon
@@ -0,0 +1,13 @@ +// 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. + +CANVAS_DIMENSIONS, 24, +MOVE_TO, 21.17f, 19, +LINE_TO, 12, 10.34f, +LINE_TO, 2.83f, 19, +LINE_TO, 0, 16.33f, +LINE_TO, 12, 5, +R_LINE_TO, 12, 11.33f, +CLOSE, +END
diff --git a/ui/app_list/vector_icons/ic_badge_rating.1x.icon b/ui/app_list/vector_icons/ic_badge_rating.1x.icon new file mode 100644 index 0000000..06b859c3 --- /dev/null +++ b/ui/app_list/vector_icons/ic_badge_rating.1x.icon
@@ -0,0 +1,17 @@ +// 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. + +CANVAS_DIMENSIONS, 12, +MOVE_TO, 6, 9.04f, +LINE_TO, 9.09f, 11, +R_LINE_TO, -0.82f, -3.7f, +LINE_TO, 11, 4.81f, +R_LINE_TO, -3.59f, -0.32f, +LINE_TO, 6, 1, +LINE_TO, 4.6f, 4.49f, +LINE_TO, 1, 4.81f, +LINE_TO, 3.73f, 7.3f, +LINE_TO, 2.91f, 11, +CLOSE, +END
diff --git a/ui/app_list/vector_icons/ic_badge_rating.icon b/ui/app_list/vector_icons/ic_badge_rating.icon new file mode 100644 index 0000000..90938ee --- /dev/null +++ b/ui/app_list/vector_icons/ic_badge_rating.icon
@@ -0,0 +1,17 @@ +// 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. + +CANVAS_DIMENSIONS, 24, +MOVE_TO, 12, 18.07f, +LINE_TO, 18.18f, 22, +R_LINE_TO, -1.64f, -7.4f, +LINE_TO, 22, 9.62f, +R_LINE_TO, -7.19f, -0.64f, +LINE_TO, 12, 2, +LINE_TO, 9.19f, 8.98f, +LINE_TO, 2, 9.62f, +R_LINE_TO, 5.46f, 4.98f, +LINE_TO, 5.82f, 22, +CLOSE, +END
diff --git a/ui/app_list/views/expand_arrow_view.cc b/ui/app_list/views/expand_arrow_view.cc new file mode 100644 index 0000000..632d3e18 --- /dev/null +++ b/ui/app_list/views/expand_arrow_view.cc
@@ -0,0 +1,108 @@ +// 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 "ui/app_list/views/expand_arrow_view.h" + +#include "base/metrics/histogram_macros.h" +#include "ui/app_list/app_list_constants.h" +#include "ui/app_list/vector_icons/vector_icons.h" +#include "ui/app_list/views/app_list_view.h" +#include "ui/app_list/views/contents_view.h" +#include "ui/gfx/paint_vector_icon.h" +#include "ui/views/animation/flood_fill_ink_drop_ripple.h" +#include "ui/views/animation/ink_drop_highlight.h" +#include "ui/views/animation/ink_drop_impl.h" +#include "ui/views/animation/ink_drop_mask.h" +#include "ui/views/animation/ink_drop_painted_layer_delegates.h" +#include "ui/views/controls/image_view.h" + +namespace app_list { + +namespace { + +constexpr int kExpandArrowTileSize = 36; +constexpr int kExpandArrowIconSize = 12; +constexpr int kInkDropRadius = 18; + +constexpr SkColor kExpandArrowColor = SK_ColorWHITE; +constexpr SkColor kInkDropRippleColor = + SkColorSetARGBMacro(0x14, 0xFF, 0xFF, 0xFF); +constexpr SkColor kInkDropHighlightColor = + SkColorSetARGBMacro(0xF, 0xFF, 0xFF, 0xFF); + +} // namespace + +ExpandArrowView::ExpandArrowView(ContentsView* contents_view, + AppListView* app_list_view) + : views::CustomButton(this), + contents_view_(contents_view), + app_list_view_(app_list_view) { + icon_ = new views::ImageView; + icon_->SetVerticalAlignment(views::ImageView::CENTER); + icon_->SetImage(gfx::CreateVectorIcon(kIcArrowUpIcon, kExpandArrowIconSize, + kExpandArrowColor)); + AddChildView(icon_); + + SetInkDropMode(InkDropHostView::InkDropMode::ON); +} + +ExpandArrowView::~ExpandArrowView() {} + +void ExpandArrowView::ButtonPressed(views::Button* sender, + const ui::Event& event) { + UMA_HISTOGRAM_ENUMERATION(kPageOpenedHistogram, AppListModel::STATE_APPS, + AppListModel::STATE_LAST); + + contents_view_->SetActiveState(AppListModel::STATE_APPS); + app_list_view_->SetState(AppListView::FULLSCREEN_ALL_APPS); + GetInkDrop()->AnimateToState(views::InkDropState::ACTION_TRIGGERED); +} + +gfx::Size ExpandArrowView::CalculatePreferredSize() const { + return gfx::Size(kExpandArrowTileSize, kExpandArrowTileSize); +} + +void ExpandArrowView::Layout() { + gfx::Rect rect(GetContentsBounds()); + gfx::Point center = rect.CenterPoint(); + rect.SetRect(center.x() - kExpandArrowIconSize / 2, + center.y() - kExpandArrowIconSize / 2, kExpandArrowIconSize, + kExpandArrowIconSize); + icon_->SetBoundsRect(rect); +} + +std::unique_ptr<views::InkDrop> ExpandArrowView::CreateInkDrop() { + std::unique_ptr<views::InkDropImpl> ink_drop = + CustomButton::CreateDefaultInkDropImpl(); + ink_drop->SetShowHighlightOnHover(false); + ink_drop->SetShowHighlightOnFocus(true); + ink_drop->SetAutoHighlightMode( + views::InkDropImpl::AutoHighlightMode::SHOW_ON_RIPPLE); + return std::move(ink_drop); +} + +std::unique_ptr<views::InkDropMask> ExpandArrowView::CreateInkDropMask() const { + return base::MakeUnique<views::CircleInkDropMask>( + size(), GetLocalBounds().CenterPoint(), kInkDropRadius); +} + +std::unique_ptr<views::InkDropRipple> ExpandArrowView::CreateInkDropRipple() + const { + gfx::Point center = GetLocalBounds().CenterPoint(); + gfx::Rect bounds(center.x() - kInkDropRadius, center.y() - kInkDropRadius, + 2 * kInkDropRadius, 2 * kInkDropRadius); + return base::MakeUnique<views::FloodFillInkDropRipple>( + size(), GetLocalBounds().InsetsFrom(bounds), + GetInkDropCenterBasedOnLastEvent(), kInkDropRippleColor, 1.0f); +} + +std::unique_ptr<views::InkDropHighlight> +ExpandArrowView::CreateInkDropHighlight() const { + return base::MakeUnique<views::InkDropHighlight>( + gfx::PointF(GetLocalBounds().CenterPoint()), + base::MakeUnique<views::CircleLayerDelegate>(kInkDropHighlightColor, + kInkDropRadius)); +} + +} // namespace app_list
diff --git a/ui/app_list/views/expand_arrow_view.h b/ui/app_list/views/expand_arrow_view.h new file mode 100644 index 0000000..b1064ad4 --- /dev/null +++ b/ui/app_list/views/expand_arrow_view.h
@@ -0,0 +1,56 @@ +// 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 UI_APP_LIST_VIEWS_EXPAND_ARROW_VIEW_H_ +#define UI_APP_LIST_VIEWS_EXPAND_ARROW_VIEW_H_ + +#include "ui/views/controls/button/button.h" +#include "ui/views/controls/button/custom_button.h" + +namespace views { +class ImageView; +class InkDrop; +class InkDropMask; +class InkDropRipple; +class InkDropHighlight; +} // namespace views + +namespace app_list { + +class AppListView; +class ContentsView; + +// A tile item for the expand arrow on the start page. +class ExpandArrowView : public views::CustomButton, + public views::ButtonListener { + public: + ExpandArrowView(ContentsView* contents_view, AppListView* app_list_view); + ~ExpandArrowView() override; + + // Overridden from views::ButtonListener: + void ButtonPressed(views::Button* sender, const ui::Event& event) override; + + // Overridden from views::View: + gfx::Size CalculatePreferredSize() const override; + void Layout() override; + + // Overridden from views::InkDropHost: + std::unique_ptr<views::InkDrop> CreateInkDrop() override; + std::unique_ptr<views::InkDropMask> CreateInkDropMask() const override; + std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override; + std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight() + const override; + + private: + ContentsView* const contents_view_; + AppListView* const app_list_view_; // Owned by the views hierarchy. + + views::ImageView* icon_; + + DISALLOW_COPY_AND_ASSIGN(ExpandArrowView); +}; + +} // namespace app_list + +#endif // UI_APP_LIST_VIEWS_EXPAND_ARROW_VIEW_H_
diff --git a/ui/app_list/views/search_result_tile_item_view.cc b/ui/app_list/views/search_result_tile_item_view.cc index e23cd4f..fcb8eff4 100644 --- a/ui/app_list/views/search_result_tile_item_view.cc +++ b/ui/app_list/views/search_result_tile_item_view.cc
@@ -9,7 +9,9 @@ #include "ui/app_list/app_list_features.h" #include "ui/app_list/app_list_view_delegate.h" #include "ui/app_list/search_result.h" +#include "ui/app_list/vector_icons/vector_icons.h" #include "ui/app_list/views/search_result_container_view.h" +#include "ui/gfx/paint_vector_icon.h" #include "ui/views/controls/image_view.h" #include "ui/views/controls/label.h" #include "ui/views/controls/menu/menu_runner.h" @@ -21,6 +23,9 @@ constexpr int kSearchTileWidth = 80; constexpr int kSearchTileTopPadding = 4; constexpr int kSearchTitleSpacing = 6; +constexpr int kSearchRatingStarSize = 12; +constexpr int kSearchRatingStarHorizontalSpacing = 1; +constexpr int kSearchRatingStarVerticalSpacing = 2; constexpr SkColor kSearchTitleColor = SkColorSetARGBMacro(0xDF, 0x00, 0x00, 0x00); @@ -28,6 +33,8 @@ SkColorSetARGBMacro(0x8F, 0x00, 0x00, 0x00); constexpr SkColor kSearchAppPriceColor = SkColorSetARGBMacro(0xFF, 0x0F, 0x9D, 0x58); +constexpr SkColor kSearchRatingStarColor = + SkColorSetARGBMacro(0x8F, 0x00, 0x00, 0x00); } // namespace @@ -53,6 +60,14 @@ rating_->SetVisible(false); AddChildView(rating_); + rating_star_ = new views::ImageView; + rating_star_->set_can_process_events_within_subtree(false); + rating_star_->SetVerticalAlignment(views::ImageView::LEADING); + rating_star_->SetImage(gfx::CreateVectorIcon( + kIcBadgeRatingIcon, kSearchRatingStarSize, kSearchRatingStarColor)); + rating_star_->SetVisible(false); + AddChildView(rating_star_); + price_ = new views::Label; price_->SetEnabledColor(kSearchAppPriceColor); price_->SetFontList(base_font); @@ -124,11 +139,13 @@ if (rating < 0) { rating_->SetVisible(false); + rating_star_->SetVisible(false); return; } rating_->SetText(base::FormatDouble(rating, 1)); rating_->SetVisible(true); + rating_star_->SetVisible(true); } void SearchResultTileItemView::SetPrice(const base::string16& price) { @@ -251,6 +268,18 @@ rating_->SetBoundsRect(rating_rect); } + if (rating_star_) { + gfx::Rect rating_star_rect(rect); + rating_star_rect.Inset(rating_->GetPreferredSize().width() + + kSearchRatingStarHorizontalSpacing, + title()->GetPreferredSize().height() + + kSearchRatingStarVerticalSpacing, + 0, 0); + rating_star_rect.set_height(rating_star_->GetPreferredSize().height()); + rating_star_rect.set_width(rating_star_->GetPreferredSize().width()); + rating_star_->SetBoundsRect(rating_star_rect); + } + if (price_) { gfx::Rect price_rect(rect); price_rect.Inset(0, title()->GetPreferredSize().height(), 0, 0);
diff --git a/ui/app_list/views/search_result_tile_item_view.h b/ui/app_list/views/search_result_tile_item_view.h index 17e40f4..03404fe 100644 --- a/ui/app_list/views/search_result_tile_item_view.h +++ b/ui/app_list/views/search_result_tile_item_view.h
@@ -69,6 +69,7 @@ views::Label* rating_ = nullptr; // Owned by views hierarchy. views::Label* price_ = nullptr; // Owned by views hierarchy. + views::ImageView* rating_star_ = nullptr; // Owned by views hierarchy. AppListViewDelegate* view_delegate_;
diff --git a/ui/app_list/views/start_page_view.cc b/ui/app_list/views/start_page_view.cc index ad3b9b8..fb4e24f 100644 --- a/ui/app_list/views/start_page_view.cc +++ b/ui/app_list/views/start_page_view.cc
@@ -23,6 +23,7 @@ #include "ui/app_list/views/app_list_main_view.h" #include "ui/app_list/views/contents_view.h" #include "ui/app_list/views/custom_launcher_page_view.h" +#include "ui/app_list/views/expand_arrow_view.h" #include "ui/app_list/views/indicator_chip_view.h" #include "ui/app_list/views/search_box_view.h" #include "ui/app_list/views/search_result_container_view.h" @@ -56,6 +57,7 @@ constexpr int kWebViewWidth = 700; constexpr int kWebViewHeight = 224; +constexpr int kExpandArrowTopPadding = 28; constexpr int kLauncherPageBackgroundWidth = 400; } // namespace @@ -125,6 +127,11 @@ // The view containing the start page tiles. AddChildView(suggestions_container_); + if (is_fullscreen_app_list_enabled_) { + expand_arrow_view_ = new ExpandArrowView( + app_list_main_view_->contents_view(), app_list_view); + AddChildView(expand_arrow_view_); + } AddChildView(custom_launcher_page_background_); suggestions_container_->SetResults(view_delegate_->GetModel()->results()); @@ -245,6 +252,18 @@ } suggestions_container_->SetBoundsRect(bounds); + if (expand_arrow_view_) { + gfx::Rect expand_arrow_rect(GetContentsBounds()); + int left_right_padding = + (bounds.width() - expand_arrow_view_->GetPreferredSize().width()) / 2; + + expand_arrow_rect.Inset(left_right_padding, 0, left_right_padding, 0); + expand_arrow_rect.set_y(bounds.bottom() + kExpandArrowTopPadding); + expand_arrow_rect.set_height( + expand_arrow_view_->GetPreferredSize().height()); + expand_arrow_view_->SetBoundsRect(expand_arrow_rect); + } + CustomLauncherPageView* custom_launcher_page_view = app_list_main_view_->contents_view()->custom_page_view(); if (!custom_launcher_page_view)
diff --git a/ui/app_list/views/start_page_view.h b/ui/app_list/views/start_page_view.h index 0c4aef3c..e1df339 100644 --- a/ui/app_list/views/start_page_view.h +++ b/ui/app_list/views/start_page_view.h
@@ -19,6 +19,7 @@ class AppListView; class AppListViewDelegate; class CustomLauncherPageBackgroundView; +class ExpandArrowView; class IndicatorChipView; class SearchResultTileItemView; class SuggestionsContainerView; @@ -79,6 +80,7 @@ IndicatorChipView* indicator_ = nullptr; // Owned by views hierarchy. SuggestionsContainerView* suggestions_container_; // Owned by views hierarchy. + ExpandArrowView* expand_arrow_view_ = nullptr; // Owned by views hierarchy. const bool is_fullscreen_app_list_enabled_;
diff --git a/ui/app_list/views/suggestions_container_view.cc b/ui/app_list/views/suggestions_container_view.cc index b3d2ca6..fef2d86 100644 --- a/ui/app_list/views/suggestions_container_view.cc +++ b/ui/app_list/views/suggestions_container_view.cc
@@ -20,7 +20,6 @@ constexpr int kTileSpacing = 7; constexpr int kNumTilesCols = 5; constexpr int kTilesHorizontalMarginLeft = 145; -constexpr int kCenterColumnOfStartPageAppGrid = 3; } // namespace @@ -148,21 +147,14 @@ search_result_tile_views_.emplace_back(tile_item); } - if (all_apps_button_) + if (all_apps_button_ && !is_fullscreen_app_list_enabled_) { all_apps_button_->UpdateIcon(); - if (is_fullscreen_app_list_enabled_) { - // Also add a special "all apps" button to the middle of the next row of the - // container. - tiles_layout_manager->StartRow(0, 0); - tiles_layout_manager->SkipColumns(kCenterColumnOfStartPageAppGrid); - } else { + // Also add a special "all apps" button to the end of the next row of the // container. if (i % kNumTilesCols == 0) tiles_layout_manager->StartRow(0, 0); - } - if (all_apps_button_) { tiles_layout_manager->AddView(all_apps_button_); AddChildView(all_apps_button_); }
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc index 3a2aa4fc..b48c8a3 100644 --- a/ui/compositor/layer.cc +++ b/ui/compositor/layer.cc
@@ -872,11 +872,13 @@ delegate_->OnDelegatedFrameDamage(damage_rect_in_dip); } -void Layer::SetScrollable( - Layer* parent_clip_layer, - const base::Callback<void(const gfx::ScrollOffset&)>& on_scroll) { - cc_layer_->SetScrollClipLayerId(parent_clip_layer->cc_layer_->id()); - cc_layer_->set_did_scroll_callback(on_scroll); +void Layer::SetDidScrollCallback( + base::Callback<void(const gfx::ScrollOffset&)> callback) { + cc_layer_->set_did_scroll_callback(std::move(callback)); +} + +void Layer::SetScrollable(const gfx::Size& container_bounds) { + cc_layer_->SetScrollable(container_bounds); cc_layer_->SetUserScrollable(true, true); }
diff --git a/ui/compositor/layer.h b/ui/compositor/layer.h index a439bbdf1..0c2a0e8 100644 --- a/ui/compositor/layer.h +++ b/ui/compositor/layer.h
@@ -366,11 +366,15 @@ // Requets a copy of the layer's output as a texture or bitmap. void RequestCopyOfOutput(std::unique_ptr<cc::CopyOutputRequest> request); - // Makes this Layer scrollable, clipping to |parent_clip_layer|. |on_scroll| - // is invoked when scrolling performed by the cc::InputHandler is committed. - void SetScrollable( - Layer* parent_clip_layer, - const base::Callback<void(const gfx::ScrollOffset&)>& on_scroll); + // Invoked when scrolling performed by the cc::InputHandler is committed. This + // will only occur if the Layer has set scroll container bounds. + void SetDidScrollCallback( + base::Callback<void(const gfx::ScrollOffset&)> callback); + + // Marks this layer as scrollable inside the provided bounds. This size only + // affects scrolling so if clipping is desired, a separate clipping layer + // needs to be created. + void SetScrollable(const gfx::Size& container_bounds); // Gets and sets the current scroll offset of the layer. gfx::ScrollOffset CurrentScrollOffset() const;
diff --git a/ui/ozone/platform/drm/host/drm_overlay_manager.h b/ui/ozone/platform/drm/host/drm_overlay_manager.h index 89f8b41..6e5a0ac 100644 --- a/ui/ozone/platform/drm/host/drm_overlay_manager.h +++ b/ui/ozone/platform/drm/host/drm_overlay_manager.h
@@ -28,6 +28,8 @@ std::unique_ptr<OverlayCandidatesOzone> CreateOverlayCandidates( gfx::AcceleratedWidget w) override; + // Invoked on changes to the window (aka display) that require re-populating + // the cache from the DRM thread. void ResetCache(); // Communication-free implementations of actions performed in response to
diff --git a/ui/views/bubble/bubble_dialog_delegate.cc b/ui/views/bubble/bubble_dialog_delegate.cc index 502bc0b8..8ce99c3 100644 --- a/ui/views/bubble/bubble_dialog_delegate.cc +++ b/ui/views/bubble/bubble_dialog_delegate.cc
@@ -110,9 +110,6 @@ NonClientFrameView* BubbleDialogDelegateView::CreateNonClientFrameView( Widget* widget) { BubbleFrameView* frame = new BubbleFrameView(title_margins_, margins_); - // Note: In CreateBubble, the call to SizeToContents() will cause - // the relayout that this call requires. - frame->SetTitleFontList(GetTitleFontList()); frame->SetFootnoteView(CreateFootnoteView()); BubbleBorder::Arrow adjusted_arrow = arrow(); @@ -238,13 +235,6 @@ adjust_if_offscreen_ && !anchor_minimized); } -const gfx::FontList& BubbleDialogDelegateView::GetTitleFontList() const { - ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); - if (ui::MaterialDesignController::IsSecondaryUiMaterial()) - return rb.GetFontListWithDelta(ui::kTitleFontSizeDelta); - return rb.GetFontList(ui::ResourceBundle::MediumFont); -} - void BubbleDialogDelegateView::OnNativeThemeChanged( const ui::NativeTheme* theme) { UpdateColorsFromTheme(theme);
diff --git a/ui/views/bubble/bubble_dialog_delegate.h b/ui/views/bubble/bubble_dialog_delegate.h index 76d0235..c3fc5473 100644 --- a/ui/views/bubble/bubble_dialog_delegate.h +++ b/ui/views/bubble/bubble_dialog_delegate.h
@@ -15,7 +15,6 @@ #include "ui/views/window/dialog_delegate.h" namespace gfx { -class FontList; class Rect; } @@ -130,10 +129,6 @@ // Get bubble bounds from the anchor rect and client view's preferred size. virtual gfx::Rect GetBubbleBounds(); - // Return a FontList to use for the title of the bubble. - // (The default is MediumFont). - virtual const gfx::FontList& GetTitleFontList() const; - // View overrides: void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
diff --git a/ui/views/bubble/bubble_dialog_delegate_unittest.cc b/ui/views/bubble/bubble_dialog_delegate_unittest.cc index 6524d04..0887c89 100644 --- a/ui/views/bubble/bubble_dialog_delegate_unittest.cc +++ b/ui/views/bubble/bubble_dialog_delegate_unittest.cc
@@ -8,10 +8,12 @@ #include "base/i18n/rtl.h" #include "base/macros.h" +#include "base/strings/utf_string_conversions.h" #include "ui/base/hit_test.h" #include "ui/events/event_utils.h" #include "ui/views/bubble/bubble_frame_view.h" #include "ui/views/controls/button/label_button.h" +#include "ui/views/test/test_views.h" #include "ui/views/test/test_widget_observer.h" #include "ui/views/test/views_test_base.h" #include "ui/views/widget/widget.h" @@ -25,7 +27,9 @@ public: TestBubbleDialogDelegateView(View* anchor_view) : BubbleDialogDelegateView(anchor_view, BubbleBorder::TOP_LEFT), - view_(new View()) { + view_(new View()), + title_view_(nullptr), + should_show_close_button_(false) { view_->SetFocusBehavior(FocusBehavior::ALWAYS); AddChildView(view_); } @@ -36,12 +40,29 @@ gfx::Size CalculatePreferredSize() const override { return gfx::Size(200, 200); } + void AddedToWidget() override { + if (title_view_) + GetBubbleFrameView()->SetTitleView(std::move(title_view_)); + } + + base::string16 GetWindowTitle() const override { + return base::ASCIIToUTF16("TITLE TITLE TITLE"); + } + + bool ShouldShowCloseButton() const override { + return should_show_close_button_; + } + + void set_title_view(View* title_view) { title_view_.reset(title_view); } + void show_close_button() { should_show_close_button_ = true; } using BubbleDialogDelegateView::SetAnchorRect; using BubbleDialogDelegateView::GetBubbleFrameView; private: View* view_; + std::unique_ptr<View> title_view_; + bool should_show_close_button_; DISALLOW_COPY_AND_ASSIGN(TestBubbleDialogDelegateView); }; @@ -251,7 +272,7 @@ const int point; const int hit; } cases[] = { - {border, HTNOWHERE}, {border + 50, HTCLIENT}, {1000, HTNOWHERE}, + {border, HTNOWHERE}, {border + 60, HTCLIENT}, {1000, HTNOWHERE}, }; for (size_t i = 0; i < arraysize(cases); ++i) { @@ -333,4 +354,34 @@ } } +TEST_F(BubbleDialogDelegateTest, CustomTitle) { + std::unique_ptr<Widget> anchor_widget(CreateTestWidget()); + TestBubbleDialogDelegateView* bubble_delegate = + new TestBubbleDialogDelegateView(anchor_widget->GetContentsView()); + constexpr int kTitlePreferredHeight = 20; + View* title_view = new StaticSizedView(gfx::Size(10, kTitlePreferredHeight)); + bubble_delegate->set_title_view(title_view); + Widget* bubble_widget = + BubbleDialogDelegateView::CreateBubble(bubble_delegate); + bubble_widget->Show(); + + BubbleFrameView* bubble_frame = static_cast<BubbleFrameView*>( + bubble_widget->non_client_view()->frame_view()); + EXPECT_EQ(title_view, bubble_frame->title()); + EXPECT_EQ(bubble_frame, title_view->parent()); + // Title takes up the whole bubble width when there's no icon or close button. + EXPECT_EQ(bubble_delegate->width(), title_view->size().width()); + EXPECT_EQ(kTitlePreferredHeight, title_view->size().height()); + + bubble_delegate->show_close_button(); + bubble_frame->ResetWindowControls(); + bubble_frame->Layout(); + + Button* close_button = bubble_frame->GetCloseButtonForTest(); + // Title moves over for the close button. + EXPECT_EQ(close_button->x() - LayoutProvider::Get()->GetDistanceMetric( + DISTANCE_CLOSE_BUTTON_MARGIN), + title_view->bounds().right()); +} + } // namespace views
diff --git a/ui/views/bubble/bubble_frame_view.cc b/ui/views/bubble/bubble_frame_view.cc index 2dd002e5..079300c9 100644 --- a/ui/views/bubble/bubble_frame_view.cc +++ b/ui/views/bubble/bubble_frame_view.cc
@@ -25,10 +25,10 @@ #include "ui/strings/grit/ui_strings.h" #include "ui/vector_icons/vector_icons.h" #include "ui/views/bubble/bubble_border.h" +#include "ui/views/bubble/bubble_dialog_delegate.h" #include "ui/views/controls/button/image_button.h" #include "ui/views/controls/button/image_button_factory.h" #include "ui/views/controls/image_view.h" -#include "ui/views/controls/label.h" #include "ui/views/layout/box_layout.h" #include "ui/views/layout/layout_provider.h" #include "ui/views/resources/grit/views_resources.h" @@ -81,18 +81,15 @@ title_margins_(title_margins), content_margins_(content_margins), title_icon_(new views::ImageView()), - title_(nullptr), + default_title_(CreateDefaultTitleLabel(base::string16()).release()), + custom_title_(nullptr), close_(nullptr), footnote_container_(nullptr), close_button_clicked_(false) { AddChildView(title_icon_); - title_ = new Label(base::string16(), style::CONTEXT_DIALOG_TITLE); - title_->SetHorizontalAlignment(gfx::ALIGN_LEFT); - title_->set_collapse_when_hidden(true); - title_->SetVisible(false); - title_->SetMultiLine(true); - AddChildView(title_); + default_title_->SetVisible(false); + AddChildView(default_title_); close_ = CreateCloseButton(this); close_->SetVisible(false); @@ -107,6 +104,16 @@ BubbleFrameView::~BubbleFrameView() {} // static +std::unique_ptr<Label> BubbleFrameView::CreateDefaultTitleLabel( + const base::string16& title_text) { + auto title = base::MakeUnique<Label>(title_text, style::CONTEXT_DIALOG_TITLE); + title->SetHorizontalAlignment(gfx::ALIGN_LEFT); + title->set_collapse_when_hidden(true); + title->SetMultiLine(true); + return title; +} + +// static Button* BubbleFrameView::CreateCloseButton(ButtonListener* listener) { ImageButton* close_button = nullptr; if (ui::MaterialDesignController::IsSecondaryUiMaterial()) { @@ -174,7 +181,7 @@ sys_rect.set_origin(gfx::Point(GetMirroredXForRect(sys_rect), 0)); if (sys_rect.Contains(point)) return HTSYSMENU; - if (point.y() < title_->bounds().bottom()) + if (point.y() < title()->bounds().bottom()) return HTCAPTION; } @@ -233,14 +240,23 @@ } void BubbleFrameView::UpdateWindowTitle() { - title_->SetText(GetWidget()->widget_delegate()->GetWindowTitle()); - title_->SetVisible(GetWidget()->widget_delegate()->ShouldShowWindowTitle()); + if (default_title_) { + const WidgetDelegate* delegate = GetWidget()->widget_delegate(); + default_title_->SetVisible(delegate->ShouldShowWindowTitle()); + default_title_->SetText(delegate->GetWindowTitle()); + } // custom_title_'s updates are handled by its creator. } void BubbleFrameView::SizeConstraintsChanged() {} -void BubbleFrameView::SetTitleFontList(const gfx::FontList& font_list) { - title_->SetFontList(font_list); +void BubbleFrameView::SetTitleView(std::unique_ptr<View> title_view) { + DCHECK(title_view); + delete default_title_; + default_title_ = nullptr; + delete custom_title_; + custom_title_ = title_view.get(); + // Keep the title after the icon for focus order. + AddChildViewAt(title_view.release(), 1); } const char* BubbleFrameView::GetClassName() const { @@ -251,7 +267,7 @@ gfx::Insets insets = content_margins_; const int icon_height = title_icon_->GetPreferredSize().height(); - const int label_height = title_->GetPreferredSize().height(); + const int label_height = title()->GetPreferredSize().height(); const bool has_title = icon_height > 0 || label_height > 0; const int title_padding = has_title ? title_margins_.height() : 0; const int title_height = std::max(icon_height, label_height) + title_padding; @@ -304,7 +320,8 @@ void BubbleFrameView::Layout() { // The title margins may not be set, but make sure that's only the case when // there's no title. - DCHECK(!title_margins_.IsEmpty() || !title_->visible()); + DCHECK(!title_margins_.IsEmpty() || + (!custom_title_ && !default_title_->visible())); const gfx::Rect contents_bounds = GetContentsBounds(); gfx::Rect bounds = contents_bounds; @@ -312,33 +329,34 @@ if (bounds.IsEmpty()) return; - // The close button is positioned somewhat closer to the edge of the bubble. - const int close_margin = - LayoutProvider::Get()->GetDistanceMetric(DISTANCE_CLOSE_BUTTON_MARGIN); - close_->SetPosition( - gfx::Point(contents_bounds.right() - close_margin - close_->width(), - contents_bounds.y() + close_margin)); + int title_label_right = bounds.right(); + if (close_->visible()) { + // The close button is positioned somewhat closer to the edge of the bubble. + const int close_margin = + LayoutProvider::Get()->GetDistanceMetric(DISTANCE_CLOSE_BUTTON_MARGIN); + close_->SetPosition( + gfx::Point(contents_bounds.right() - close_margin - close_->width(), + contents_bounds.y() + close_margin)); + title_label_right = std::min(title_label_right, close_->x() - close_margin); + } gfx::Size title_icon_pref_size(title_icon_->GetPreferredSize()); - int padding = 0; - int title_height = title_icon_pref_size.height(); - - if (title_->visible() && !title_->text().empty()) { - if (title_icon_pref_size.width() > 0) - padding = title_margins_.left(); - - const int title_label_x = - bounds.x() + title_icon_pref_size.width() + padding; - title_->SizeToFit(std::max(1, close_->x() - title_label_x)); - title_height = std::max(title_height, title_->height()); - title_->SetPosition(gfx::Point( - title_label_x, bounds.y() + (title_height - title_->height()) / 2)); - } + const int title_icon_padding = + title_icon_pref_size.width() > 0 ? title_margins_.left() : 0; + const int title_label_x = + bounds.x() + title_icon_pref_size.width() + title_icon_padding; + const int title_available_width = + std::max(1, title_label_right - title_label_x); + const int title_preferred_height = + title()->GetHeightForWidth(title_available_width); + const int title_height = + std::max(title_icon_pref_size.height(), title_preferred_height); + title()->SetBounds(title_label_x, + bounds.y() + (title_height - title_preferred_height) / 2, + title_available_width, title_height); title_icon_->SetBounds(bounds.x(), bounds.y(), title_icon_pref_size.width(), title_height); - bounds.set_width(title_->bounds().right() - bounds.x()); - bounds.set_height(title_height); if (footnote_container_) { const int width = contents_bounds.width(); @@ -529,7 +547,7 @@ // Accommodate the width of the title bar elements. int title_bar_width = title_margins_.width() + border()->GetInsets().width(); gfx::Size title_icon_size = title_icon_->GetPreferredSize(); - gfx::Size title_label_size = title_->GetPreferredSize(); + gfx::Size title_label_size = title()->GetPreferredSize(); if (title_icon_size.width() > 0 && title_label_size.width() > 0) title_bar_width += title_margins_.left(); title_bar_width += title_icon_size.width();
diff --git a/ui/views/bubble/bubble_frame_view.h b/ui/views/bubble/bubble_frame_view.h index 4f4d9464..015cc5f 100644 --- a/ui/views/bubble/bubble_frame_view.h +++ b/ui/views/bubble/bubble_frame_view.h
@@ -8,17 +8,14 @@ #include "base/compiler_specific.h" #include "base/gtest_prod_util.h" #include "base/macros.h" +#include "ui/gfx/font_list.h" #include "ui/gfx/geometry/insets.h" #include "ui/views/controls/button/button.h" +#include "ui/views/controls/label.h" #include "ui/views/window/non_client_view.h" -namespace gfx { -class FontList; -} - namespace views { -class Label; class BubbleBorder; class ImageView; @@ -33,6 +30,9 @@ const gfx::Insets& content_margins); ~BubbleFrameView() override; + static std::unique_ptr<Label> CreateDefaultTitleLabel( + const base::string16& title_text); + // Creates a close button used in the corner of the dialog. static Button* CreateCloseButton(ButtonListener* listener); @@ -48,9 +48,9 @@ void UpdateWindowTitle() override; void SizeConstraintsChanged() override; - // Set the FontList to be used for the title of the bubble. - // Caller must arrange to update the layout to have the call take effect. - void SetTitleFontList(const gfx::FontList& font_list); + // Sets a custom view to be the dialog title instead of the |default_title_| + // label. If there is an existing title view it will be deleted. + void SetTitleView(std::unique_ptr<View> title_view); // View: const char* GetClassName() const override; @@ -73,6 +73,14 @@ BubbleBorder* bubble_border() const { return bubble_border_; } void SetBubbleBorder(std::unique_ptr<BubbleBorder> border); + const View* title() const { + return custom_title_ ? custom_title_ : default_title_; + } + View* title() { + return const_cast<View*>( + static_cast<const BubbleFrameView*>(this)->title()); + } + gfx::Insets content_margins() const { return content_margins_; } void SetFootnoteView(View* view); @@ -124,9 +132,16 @@ // Margins between the content and the inside of the border, in pixels. gfx::Insets content_margins_; - // The optional title icon, title, and (x) close button. + // The optional title icon. views::ImageView* title_icon_; - Label* title_; + + // One of these fields is used as the dialog title. If SetTitleView is called + // the custom title view is stored in |custom_title_| and this class assumes + // ownership. Otherwise |default_title_| is used. + Label* default_title_; + View* custom_title_; + + // The optional close button (the X). Button* close_; // A view to contain the footnote view, if it exists.
diff --git a/ui/views/controls/scroll_view.cc b/ui/views/controls/scroll_view.cc index 539d23e..61f853f 100644 --- a/ui/views/controls/scroll_view.cc +++ b/ui/views/controls/scroll_view.cc
@@ -237,9 +237,9 @@ a_view->SetBackground(CreateSolidBackground(GetBackgroundColor())); } a_view->SetPaintToLayer(); - a_view->layer()->SetScrollable( - contents_viewport_->layer(), + a_view->layer()->SetDidScrollCallback( base::Bind(&ScrollView::OnLayerScrolled, base::Unretained(this))); + a_view->layer()->SetScrollable(contents_viewport_->bounds().size()); } SetHeaderOrContents(contents_viewport_, a_view, &contents_); } @@ -474,6 +474,7 @@ gfx::Size container_size = contents_ ? contents_->size() : gfx::Size(); container_size.SetToMax(viewport_bounds.size()); contents_->SetBoundsRect(gfx::Rect(container_size)); + contents_->layer()->SetScrollable(viewport_bounds.size()); } header_viewport_->SetBounds(contents_x, contents_y,
diff --git a/ui/views/window/dialog_delegate_unittest.cc b/ui/views/window/dialog_delegate_unittest.cc index 936936f..98ef4b80 100644 --- a/ui/views/window/dialog_delegate_unittest.cc +++ b/ui/views/window/dialog_delegate_unittest.cc
@@ -324,6 +324,20 @@ dialog2->TearDown(); } +TEST_F(DialogTest, ActualBoundsMatchPreferredBounds) { + dialog()->set_title(base::ASCIIToUTF16( + "La la la look at me I'm a really really long title that needs to be " + "really really long so that the title will multiline wrap.")); + dialog()->GetWidget()->UpdateWindowTitle(); + + views::View* root_view = dialog()->GetWidget()->GetRootView(); + gfx::Size preferred_size(root_view->GetPreferredSize()); + EXPECT_FALSE(preferred_size.IsEmpty()); + root_view->SizeToPreferredSize(); + root_view->Layout(); + EXPECT_EQ(preferred_size, root_view->size()); +} + // Tests default focus is assigned correctly when showing a new dialog. TEST_F(DialogTest, InitialFocus) { EXPECT_TRUE(dialog()->input()->HasFocus());
diff --git a/ui/webui/resources/cr_elements/cr_drawer/cr_drawer.html b/ui/webui/resources/cr_elements/cr_drawer/cr_drawer.html index 1b1bbe4..20d1505 100644 --- a/ui/webui/resources/cr_elements/cr_drawer/cr_drawer.html +++ b/ui/webui/resources/cr_elements/cr_drawer/cr_drawer.html
@@ -70,7 +70,7 @@ } </style> <div id="container" on-tap="onContainerTap_"> - <div class="drawer-header" tabindex="-1">[[title]]</div> + <div class="drawer-header" tabindex="-1">[[heading]]</div> <content></content> </div> </template>
diff --git a/ui/webui/resources/cr_elements/cr_drawer/cr_drawer.js b/ui/webui/resources/cr_elements/cr_drawer/cr_drawer.js index 5a8b56bf..4255422 100644 --- a/ui/webui/resources/cr_elements/cr_drawer/cr_drawer.js +++ b/ui/webui/resources/cr_elements/cr_drawer/cr_drawer.js
@@ -7,7 +7,7 @@ extends: 'dialog', properties: { - title: String, + heading: String, /** Enables notifications for |Dialog.open|. */ open: {